<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://e6.ijs.si/api.php?action=feedcontributions&amp;user=Ipribec&amp;feedformat=atom</id>
		<title>Medusa: Coordinate Free Mehless Method implementation - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://e6.ijs.si/api.php?action=feedcontributions&amp;user=Ipribec&amp;feedformat=atom"/>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Special:Contributions/Ipribec"/>
		<updated>2026-05-13T21:33:22Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.1</generator>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1765</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1765"/>
				<updated>2017-12-11T18:42:04Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right)&lt;br /&gt;
\label{buoyancy}&lt;br /&gt;
\end{equation}&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Governing equations==&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities $\b{v} = \left(u, v\right)^T$ rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c\frac{\partial T}{\partial t} + \b{v}\cdot\nabla T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[t' = \frac{\alpha t}{L^2}, \quad x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{L^2}{\alpha}\omega, \quad \psi' = \frac{\psi}{\alpha}\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c)$ is the thermal diffusivity. Upon inserting the buoyancy term \eqref{buoyancy}, substituting with the dimensionless variables and dropping the prime $'$ for simplicity, the dimensionless equations are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + \b{v}\cdot\nabla\omega = \mathit{Pr} \Delta \omega + \mathit{Ra}_L \mathit{Pr} \frac{\partial \phi}{\partial x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \phi}{\partial t} + \b{v}\cdot\nabla\phi = \Delta \phi&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The dimensionless variables that appear in these equations are the ''Prandtl number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Pr} = \frac{\mu c}{k} = \frac{\nu}{\alpha}&lt;br /&gt;
\]&lt;br /&gt;
and the ''Rayleigh number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Ra}_L = \frac{g \beta \left(T_\mathrm{i} - T_\mathrm{o}\right)L^3}{\nu \alpha}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
==Boundary conditions==&lt;br /&gt;
&lt;br /&gt;
The boundary conditions that appear in this problem are two impermeable isothermal walls at constant radii. The stream function $\psi$ is constant along each wall. Since no flow enter or escapes form the enclosure, the stream function is set equal to zero on all boundaries. The dimensionless temperature equals unity on the inner cylinder and zero on the outer cylinder. The value of the vorticity at the boundaries may be found by directly applying&lt;br /&gt;
\[&lt;br /&gt;
\omega = \Delta \psi&lt;br /&gt;
\]&lt;br /&gt;
along the walls.&lt;br /&gt;
&lt;br /&gt;
The boundary condition are therefore&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 1&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the inner cylinder and&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 0&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the outer cylinder.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&lt;br /&gt;
A snippet of MLSM code for the stream function - vorticity approach looks like: (full examples will be available soon under the examples folder in the code repository [[Main Page]]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line&amp;gt;&lt;br /&gt;
    // Boundary Conditions&lt;br /&gt;
    T2[inner] = 1.0;&lt;br /&gt;
    T1 = T2;&lt;br /&gt;
&lt;br /&gt;
    // Poisson equation matrix&lt;br /&gt;
    SparseMatrix&amp;lt;double, RowMajor&amp;gt; M_scal(size,size);&lt;br /&gt;
    M_scal.reserve(Range&amp;lt;int&amp;gt;(size,n));&lt;br /&gt;
    BiCGSTAB&amp;lt;SparseMatrix&amp;lt;double, RowMajor&amp;gt;&amp;gt; solver;&lt;br /&gt;
    VecXd rhs(size,0);&lt;br /&gt;
    for (int c : boundary) op.value(M_scal, c, 1.0);&lt;br /&gt;
    for (int c : interior) op.lap(M_scal, c, 1.0);&lt;br /&gt;
    M_scal.makeCompressed();&lt;br /&gt;
    solver.compute(M_scal);&lt;br /&gt;
&lt;br /&gt;
    // Vorticity transport equation&lt;br /&gt;
    auto derivative_W = [&amp;amp;](double, const Eigen::VectorXd&amp;amp; w) {&lt;br /&gt;
        Range&amp;lt;double&amp;gt; rw = reshape(w);&lt;br /&gt;
        Range&amp;lt;double&amp;gt; der(rw.size(), 0);&lt;br /&gt;
        int i;&lt;br /&gt;
        #pragma omp parallel for private(i) schedule(static)&lt;br /&gt;
        for (i = 0; i &amp;lt; interior.size(); ++i) {&lt;br /&gt;
            int c = interior[i];&lt;br /&gt;
            der[c] = Pr*op.lap(rw, c) + Ra*Pr*op.grad(T2,c)[0] - U[c].dot(op.grad(rw,c));&lt;br /&gt;
        }&lt;br /&gt;
        return reshape(der);&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    // Temperature equation&lt;br /&gt;
    auto derivative_T = [&amp;amp;](double, const VecXd&amp;amp; T) {&lt;br /&gt;
        VecXd der = Eigen::VectorXd::Zero(T.size());&lt;br /&gt;
        int i;&lt;br /&gt;
        #pragma omp parallel for private(i) schedule(static)&lt;br /&gt;
        for (i = 0; i &amp;lt; interior.size(); ++i) {&lt;br /&gt;
            int c = interior[i];&lt;br /&gt;
            der[c] = op.lap(T, c) - U[c].dot(op.grad(T, c));&lt;br /&gt;
        }&lt;br /&gt;
        return der;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    auto integrator_W = integrators::Explicit::RK4().solve(derivative_W, 0.0, time, dt, reshape(W1));&lt;br /&gt;
    auto integrator_T = integrators::Explicit::RK4().solve(derivative_T, 0.0, time, dt, reshape(T1));&lt;br /&gt;
&lt;br /&gt;
    auto W_stepper = integrator_W.begin();&lt;br /&gt;
    auto T_stepper = integrator_T.begin();&lt;br /&gt;
&lt;br /&gt;
    for (int step = 0; step &amp;lt;= t_steps; ++step) {&lt;br /&gt;
&lt;br /&gt;
        // Poisson equation for stream function&lt;br /&gt;
        for (auto c : interior) {&lt;br /&gt;
            rhs[c] = W1[c];&lt;br /&gt;
        }&lt;br /&gt;
        PSI = reshape(solver.solveWithGuess(rhs, reshape(PSI)));&lt;br /&gt;
&lt;br /&gt;
        // Calculate velocity&lt;br /&gt;
        for (auto c : interior) {&lt;br /&gt;
            vec_t grad_psi = op.grad(PSI,c);&lt;br /&gt;
            U[c] = vec_t{grad_psi[1],-grad_psi[0]};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        ++T_stepper;&lt;br /&gt;
        T2 = reshape(T_stepper.value());&lt;br /&gt;
&lt;br /&gt;
        // Apply vorticity BC&lt;br /&gt;
        for (auto c : boundary) {&lt;br /&gt;
            W1[c] = op.lap(PSI,c);&lt;br /&gt;
        }        &lt;br /&gt;
        ++W_stepper;&lt;br /&gt;
        W2 = reshape(W_stepper.value());&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        W1.swap(W2);&lt;br /&gt;
        T1.swap(T2);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
[[File:ra100.png|800px]]&lt;br /&gt;
&lt;br /&gt;
[[File:ra1000.png|800px]]&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
&lt;br /&gt;
Kuehn, T. H., &amp;amp; Goldstein, R. J. (1976). An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders. Journal of Fluid mechanics, 74(4), 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1764</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1764"/>
				<updated>2017-12-11T18:40:18Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right)&lt;br /&gt;
\label{buoyancy}&lt;br /&gt;
\end{equation}&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Governing equations==&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities $\b{v} = \left(u, v\right)^T$ rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c\frac{\partial T}{\partial t} + \b{v}\cdot\nabla T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[t' = \frac{\alpha t}{L^2}, \quad x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{L^2}{\alpha}\omega, \quad \psi' = \frac{\psi}{\alpha}\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c)$ is the thermal diffusivity. Upon inserting the buoyancy term \eqref{buoyancy}, substituting with the dimensionless variables and dropping the prime $'$ for simplicity, the dimensionless equations are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + \b{v}\cdot\nabla\omega = \mathit{Pr} \Delta \omega + \mathit{Ra}_L \mathit{Pr} \frac{\partial \phi}{\partial x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \phi}{\partial t} + \b{v}\cdot\nabla\phi = \Delta \phi&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The dimensionless variables that appear in these equations are the ''Prandtl number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Pr} = \frac{\mu c}{k} = \frac{\nu}{\alpha}&lt;br /&gt;
\]&lt;br /&gt;
and the ''Rayleigh number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Ra}_L = \frac{g \beta \left(T_\mathrm{i} - T_\mathrm{o}\right)L^3}{\nu \alpha}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
==Boundary conditions==&lt;br /&gt;
&lt;br /&gt;
The boundary conditions that appear in this problem are two impermeable isothermal walls at constant radii. The stream function $\psi$ is constant along each wall. Since no flow enter or escapes form the enclosure, the stream function is set equal to zero on all boundaries. The dimensionless temperature equals unity on the inner cylinder and zero on the outer cylinder. The value of the vorticity at the boundaries may be found by directly applying&lt;br /&gt;
\[&lt;br /&gt;
\omega = \Delta \psi&lt;br /&gt;
\]&lt;br /&gt;
along the walls.&lt;br /&gt;
&lt;br /&gt;
The boundary condition are therefore&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 1&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the inner cylinder and&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 0&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the outer cylinder.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&lt;br /&gt;
A snippet of MLSM code for the stream function - vorticity approach looks like: (full examples will be available soon under the examples folder in the code repository [[Main Page]]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line&amp;gt;&lt;br /&gt;
    // Boundary Conditions&lt;br /&gt;
    T2[inner] = 1.0;&lt;br /&gt;
    T1 = T2;&lt;br /&gt;
&lt;br /&gt;
    // Poisson equation matrix&lt;br /&gt;
    SparseMatrix&amp;lt;double, RowMajor&amp;gt; M_scal(size,size);&lt;br /&gt;
    M_scal.reserve(Range&amp;lt;int&amp;gt;(size,n));&lt;br /&gt;
    BiCGSTAB&amp;lt;SparseMatrix&amp;lt;double, RowMajor&amp;gt;&amp;gt; solver;&lt;br /&gt;
    VecXd rhs(size,0);&lt;br /&gt;
    for (int c : boundary) op.value(M_scal, c, 1.0);&lt;br /&gt;
    for (int c : interior) op.lap(M_scal, c, 1.0);&lt;br /&gt;
    M_scal.makeCompressed();&lt;br /&gt;
    solver.compute(M_scal);&lt;br /&gt;
&lt;br /&gt;
    // Vorticity transport equation&lt;br /&gt;
    auto derivative_W = [&amp;amp;](double, const Eigen::VectorXd&amp;amp; w) {&lt;br /&gt;
        Range&amp;lt;double&amp;gt; rw = reshape(w);&lt;br /&gt;
        Range&amp;lt;double&amp;gt; der(rw.size(), 0);&lt;br /&gt;
        int i;&lt;br /&gt;
        #pragma omp parallel for private(i) schedule(static)&lt;br /&gt;
        for (i = 0; i &amp;lt; interior.size(); ++i) {&lt;br /&gt;
            int c = interior[i];&lt;br /&gt;
            der[c] = Pr*op.lap(rw, c) + Ra*Pr*op.grad(T2,c)[0] - U[c].dot(op.grad(rw,c));&lt;br /&gt;
        }&lt;br /&gt;
        return reshape(der);&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    // Temperature equation&lt;br /&gt;
    auto derivative_T = [&amp;amp;](double, const VecXd&amp;amp; T) {&lt;br /&gt;
        VecXd der = Eigen::VectorXd::Zero(T.size());&lt;br /&gt;
        int i;&lt;br /&gt;
        #pragma omp parallel for private(i) schedule(static)&lt;br /&gt;
        for (i = 0; i &amp;lt; interior.size(); ++i) {&lt;br /&gt;
            int c = interior[i];&lt;br /&gt;
            der[c] = op.lap(T, c) - U[c].dot(op.grad(T, c));&lt;br /&gt;
        }&lt;br /&gt;
        return der;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    auto integrator_W = integrators::Explicit::RK4().solve(derivative_W, 0.0, time, dt, reshape(W1));&lt;br /&gt;
    auto integrator_T = integrators::Explicit::RK4().solve(derivative_T, 0.0, time, dt, reshape(T1));&lt;br /&gt;
&lt;br /&gt;
    auto W_stepper = integrator_W.begin();&lt;br /&gt;
    auto T_stepper = integrator_T.begin();&lt;br /&gt;
&lt;br /&gt;
    for (int step = 0; step &amp;lt;= t_steps; ++step) {&lt;br /&gt;
&lt;br /&gt;
        // Poisson equation for stream function&lt;br /&gt;
        for (auto c : interior) {&lt;br /&gt;
            rhs[c] = W1[c];&lt;br /&gt;
        }&lt;br /&gt;
        PSI = reshape(solver.solveWithGuess(rhs, reshape(PSI)));&lt;br /&gt;
&lt;br /&gt;
        // Calculate velocity&lt;br /&gt;
        for (auto c : interior) {&lt;br /&gt;
            vec_t grad_psi = op.grad(PSI,c);&lt;br /&gt;
            U[c] = vec_t{grad_psi[1],-grad_psi[0]};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        ++T_stepper;&lt;br /&gt;
        T2 = reshape(T_stepper.value());&lt;br /&gt;
        &lt;br /&gt;
        ++W_stepper;&lt;br /&gt;
        W2 = reshape(W_stepper.value());&lt;br /&gt;
        // Apply vorticity BC&lt;br /&gt;
        for (auto c : boundary) {&lt;br /&gt;
            W2[c] = op.lap(PSI,c);&lt;br /&gt;
        }&lt;br /&gt;
        W_stepper.value() = reshape(W2);&lt;br /&gt;
&lt;br /&gt;
        W1.swap(W2);&lt;br /&gt;
        T1.swap(T2);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
[[File:ra100.png|800px]]&lt;br /&gt;
&lt;br /&gt;
[[File:ra1000.png|800px]]&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
&lt;br /&gt;
Kuehn, T. H., &amp;amp; Goldstein, R. J. (1976). An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders. Journal of Fluid mechanics, 74(4), 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=File:Ra1000.png&amp;diff=1763</id>
		<title>File:Ra1000.png</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=File:Ra1000.png&amp;diff=1763"/>
				<updated>2017-12-11T18:40:09Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: File uploaded with MsUpload&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;File uploaded with MsUpload&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1762</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1762"/>
				<updated>2017-12-11T18:00:05Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Sources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right)&lt;br /&gt;
\label{buoyancy}&lt;br /&gt;
\end{equation}&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Governing equations==&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities $\b{v} = \left(u, v\right)^T$ rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c\frac{\partial T}{\partial t} + \b{v}\cdot\nabla T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[t' = \frac{\alpha t}{L^2}, \quad x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{L^2}{\alpha}\omega, \quad \psi' = \frac{\psi}{\alpha}\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c)$ is the thermal diffusivity. Upon inserting the buoyancy term \eqref{buoyancy}, substituting with the dimensionless variables and dropping the prime $'$ for simplicity, the dimensionless equations are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + \b{v}\cdot\nabla\omega = \mathit{Pr} \Delta \omega + \mathit{Ra}_L \mathit{Pr} \frac{\partial \phi}{\partial x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \phi}{\partial t} + \b{v}\cdot\nabla\phi = \Delta \phi&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The dimensionless variables that appear in these equations are the ''Prandtl number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Pr} = \frac{\mu c}{k} = \frac{\nu}{\alpha}&lt;br /&gt;
\]&lt;br /&gt;
and the ''Rayleigh number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Ra}_L = \frac{g \beta \left(T_\mathrm{i} - T_\mathrm{o}\right)L^3}{\nu \alpha}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
==Boundary conditions==&lt;br /&gt;
&lt;br /&gt;
The boundary conditions that appear in this problem are two impermeable isothermal walls at constant radii. The stream function $\psi$ is constant along each wall. Since no flow enter or escapes form the enclosure, the stream function is set equal to zero on all boundaries. The dimensionless temperature equals unity on the inner cylinder and zero on the outer cylinder. The value of the vorticity at the boundaries may be found by directly applying&lt;br /&gt;
\[&lt;br /&gt;
\omega = \Delta \psi&lt;br /&gt;
\]&lt;br /&gt;
along the walls.&lt;br /&gt;
&lt;br /&gt;
The boundary condition are therefore&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 1&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the inner cylinder and&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 0&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the outer cylinder.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&lt;br /&gt;
A snippet of MLSM code for the stream function - vorticity approach looks like: (full examples will be available soon under the examples folder in the code repository [[Main Page]]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line&amp;gt;&lt;br /&gt;
    // Boundary Conditions&lt;br /&gt;
    T2[inner] = 1.0;&lt;br /&gt;
    T1 = T2;&lt;br /&gt;
&lt;br /&gt;
    // Poisson equation matrix&lt;br /&gt;
    SparseMatrix&amp;lt;double, RowMajor&amp;gt; M_scal(size,size);&lt;br /&gt;
    M_scal.reserve(Range&amp;lt;int&amp;gt;(size,n));&lt;br /&gt;
    BiCGSTAB&amp;lt;SparseMatrix&amp;lt;double, RowMajor&amp;gt;&amp;gt; solver;&lt;br /&gt;
    VecXd rhs(size,0);&lt;br /&gt;
    for (int c : boundary) op.value(M_scal, c, 1.0);&lt;br /&gt;
    for (int c : interior) op.lap(M_scal, c, 1.0);&lt;br /&gt;
    M_scal.makeCompressed();&lt;br /&gt;
    solver.compute(M_scal);&lt;br /&gt;
&lt;br /&gt;
    // Vorticity transport equation&lt;br /&gt;
    auto derivative_W = [&amp;amp;](double, const Eigen::VectorXd&amp;amp; w) {&lt;br /&gt;
        Range&amp;lt;double&amp;gt; rw = reshape(w);&lt;br /&gt;
        Range&amp;lt;double&amp;gt; der(rw.size(), 0);&lt;br /&gt;
        int i;&lt;br /&gt;
        #pragma omp parallel for private(i) schedule(static)&lt;br /&gt;
        for (i = 0; i &amp;lt; interior.size(); ++i) {&lt;br /&gt;
            int c = interior[i];&lt;br /&gt;
            der[c] = Pr*op.lap(rw, c) + Ra*Pr*op.grad(T2,c)[0] - U[c].dot(op.grad(rw,c));&lt;br /&gt;
        }&lt;br /&gt;
        return reshape(der);&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    // Temperature equation&lt;br /&gt;
    auto derivative_T = [&amp;amp;](double, const VecXd&amp;amp; T) {&lt;br /&gt;
        VecXd der = Eigen::VectorXd::Zero(T.size());&lt;br /&gt;
        int i;&lt;br /&gt;
        #pragma omp parallel for private(i) schedule(static)&lt;br /&gt;
        for (i = 0; i &amp;lt; interior.size(); ++i) {&lt;br /&gt;
            int c = interior[i];&lt;br /&gt;
            der[c] = op.lap(T, c) - U[c].dot(op.grad(T, c));&lt;br /&gt;
        }&lt;br /&gt;
        return der;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    auto integrator_W = integrators::Explicit::RK4().solve(derivative_W, 0.0, time, dt, reshape(W1));&lt;br /&gt;
    auto integrator_T = integrators::Explicit::RK4().solve(derivative_T, 0.0, time, dt, reshape(T1));&lt;br /&gt;
&lt;br /&gt;
    auto W_stepper = integrator_W.begin();&lt;br /&gt;
    auto T_stepper = integrator_T.begin();&lt;br /&gt;
&lt;br /&gt;
    for (int step = 0; step &amp;lt;= t_steps; ++step) {&lt;br /&gt;
&lt;br /&gt;
        // Poisson equation for stream function&lt;br /&gt;
        for (auto c : interior) {&lt;br /&gt;
            rhs[c] = W1[c];&lt;br /&gt;
        }&lt;br /&gt;
        PSI = reshape(solver.solveWithGuess(rhs, reshape(PSI)));&lt;br /&gt;
&lt;br /&gt;
        // Calculate velocity&lt;br /&gt;
        for (auto c : interior) {&lt;br /&gt;
            vec_t grad_psi = op.grad(PSI,c);&lt;br /&gt;
            U[c] = vec_t{grad_psi[1],-grad_psi[0]};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        ++T_stepper;&lt;br /&gt;
        T2 = reshape(T_stepper.value());&lt;br /&gt;
        &lt;br /&gt;
        ++W_stepper;&lt;br /&gt;
        W2 = reshape(W_stepper.value());&lt;br /&gt;
        // Apply vorticity BC&lt;br /&gt;
        for (auto c : boundary) {&lt;br /&gt;
            W2[c] = op.lap(PSI,c);&lt;br /&gt;
        }&lt;br /&gt;
        W_stepper.value() = reshape(W2);&lt;br /&gt;
&lt;br /&gt;
        W1.swap(W2);&lt;br /&gt;
        T1.swap(T2);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
&lt;br /&gt;
[[File:ra100.png|800px]]&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
&lt;br /&gt;
Kuehn, T. H., &amp;amp; Goldstein, R. J. (1976). An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders. Journal of Fluid mechanics, 74(4), 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=File:Ra100.png&amp;diff=1761</id>
		<title>File:Ra100.png</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=File:Ra100.png&amp;diff=1761"/>
				<updated>2017-12-11T17:59:50Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: File uploaded with MsUpload&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;File uploaded with MsUpload&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1759</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1759"/>
				<updated>2017-12-11T13:16:31Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right)&lt;br /&gt;
\label{buoyancy}&lt;br /&gt;
\end{equation}&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Governing equations==&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities $\b{v} = \left(u, v\right)^T$ rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c\frac{\partial T}{\partial t} + \b{v}\cdot\nabla T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[t' = \frac{\alpha t}{L^2}, \quad x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{L^2}{\alpha}\omega, \quad \psi' = \frac{\psi}{\alpha}\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c)$ is the thermal diffusivity. Upon inserting the buoyancy term \eqref{buoyancy}, substituting with the dimensionless variables and dropping the prime $'$ for simplicity, the dimensionless equations are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + \b{v}\cdot\nabla\omega = \mathit{Pr} \Delta \omega + \mathit{Ra}_L \mathit{Pr} \frac{\partial \phi}{\partial x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \phi}{\partial t} + \b{v}\cdot\nabla\phi = \Delta \phi&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The dimensionless variables that appear in these equations are the ''Prandtl number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Pr} = \frac{\mu c}{k} = \frac{\nu}{\alpha}&lt;br /&gt;
\]&lt;br /&gt;
and the ''Rayleigh number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Ra}_L = \frac{g \beta \left(T_\mathrm{i} - T_\mathrm{o}\right)L^3}{\nu \alpha}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
==Boundary conditions==&lt;br /&gt;
&lt;br /&gt;
The boundary conditions that appear in this problem are two impermeable isothermal walls at constant radii. The stream function $\psi$ is constant along each wall. Since no flow enter or escapes form the enclosure, the stream function is set equal to zero on all boundaries. The dimensionless temperature equals unity on the inner cylinder and zero on the outer cylinder. The value of the vorticity at the boundaries may be found by directly applying&lt;br /&gt;
\[&lt;br /&gt;
\omega = \Delta \psi&lt;br /&gt;
\]&lt;br /&gt;
along the walls.&lt;br /&gt;
&lt;br /&gt;
The boundary condition are therefore&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 1&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the inner cylinder and&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 0&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the outer cylinder.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&lt;br /&gt;
A snippet of the OpenMP parallel MLSM code for the stream function - vorticity approach looks like: (full examples will be available soon under the examples folder in the code repository [[Main Page]]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line&amp;gt;&lt;br /&gt;
    // Boundary Conditions&lt;br /&gt;
    T2[inner] = 1.0;&lt;br /&gt;
    T1 = T2;&lt;br /&gt;
&lt;br /&gt;
    // Poisson equation matrix&lt;br /&gt;
    SparseMatrix&amp;lt;double, RowMajor&amp;gt; M_scal(size,size);&lt;br /&gt;
    M_scal.reserve(Range&amp;lt;int&amp;gt;(size,n));&lt;br /&gt;
    BiCGSTAB&amp;lt;SparseMatrix&amp;lt;double, RowMajor&amp;gt;&amp;gt; solver;&lt;br /&gt;
    VecXd rhs(size,0);&lt;br /&gt;
    for (int c : boundary) op.value(M_scal, c, 1.0);&lt;br /&gt;
    for (int c : interior) op.lap(M_scal, c, 1.0);&lt;br /&gt;
    M_scal.makeCompressed();&lt;br /&gt;
    solver.compute(M_scal);&lt;br /&gt;
&lt;br /&gt;
    // Vorticity transport equation&lt;br /&gt;
    auto derivative_W = [&amp;amp;](double, const Eigen::VectorXd&amp;amp; w) {&lt;br /&gt;
        Range&amp;lt;double&amp;gt; rw = reshape(w);&lt;br /&gt;
        Range&amp;lt;double&amp;gt; der(rw.size(), 0);&lt;br /&gt;
        int i;&lt;br /&gt;
        #pragma omp parallel for private(i) schedule(static)&lt;br /&gt;
        for (i = 0; i &amp;lt; interior.size(); ++i) {&lt;br /&gt;
            int c = interior[i];&lt;br /&gt;
            der[c] = Pr*op.lap(rw, c) + Ra*Pr*op.grad(T2,c)[0] - U[c].dot(op.grad(rw,c));&lt;br /&gt;
        }&lt;br /&gt;
        return reshape(der);&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    // Temperature equation&lt;br /&gt;
    auto derivative_T = [&amp;amp;](double, const VecXd&amp;amp; T) {&lt;br /&gt;
        VecXd der = Eigen::VectorXd::Zero(T.size());&lt;br /&gt;
        int i;&lt;br /&gt;
        #pragma omp parallel for private(i) schedule(static)&lt;br /&gt;
        for (i = 0; i &amp;lt; interior.size(); ++i) {&lt;br /&gt;
            int c = interior[i];&lt;br /&gt;
            der[c] = op.lap(T, c) - U[c].dot(op.grad(T, c));&lt;br /&gt;
        }&lt;br /&gt;
        return der;&lt;br /&gt;
    };&lt;br /&gt;
&lt;br /&gt;
    auto integrator_W = integrators::Explicit::RK4().solve(derivative_W, 0.0, time, dt, reshape(W1));&lt;br /&gt;
    auto integrator_T = integrators::Explicit::RK4().solve(derivative_T, 0.0, time, dt, reshape(T1));&lt;br /&gt;
&lt;br /&gt;
    auto W_stepper = integrator_W.begin();&lt;br /&gt;
    auto T_stepper = integrator_T.begin();&lt;br /&gt;
&lt;br /&gt;
    for (int step = 0; step &amp;lt;= t_steps; ++step) {&lt;br /&gt;
&lt;br /&gt;
        // Poisson equation for stream function&lt;br /&gt;
        for (auto c : interior) {&lt;br /&gt;
            rhs[c] = W1[c];&lt;br /&gt;
        }&lt;br /&gt;
        PSI = reshape(solver.solveWithGuess(rhs, reshape(PSI)));&lt;br /&gt;
&lt;br /&gt;
        // Calculate velocity&lt;br /&gt;
        for (auto c : interior) {&lt;br /&gt;
            vec_t grad_psi = op.grad(PSI,c);&lt;br /&gt;
            U[c] = vec_t{grad_psi[1],-grad_psi[0]};&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        ++T_stepper;&lt;br /&gt;
        T2 = reshape(T_stepper.value());&lt;br /&gt;
        &lt;br /&gt;
        ++W_stepper;&lt;br /&gt;
        W2 = reshape(W_stepper.value());&lt;br /&gt;
        // Apply vorticity BC&lt;br /&gt;
        for (auto c : boundary) {&lt;br /&gt;
            W2[c] = op.lap(PSI,c);&lt;br /&gt;
        }&lt;br /&gt;
        W_stepper.value() = reshape(W2);&lt;br /&gt;
&lt;br /&gt;
        W1.swap(W2);&lt;br /&gt;
        T1.swap(T2);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
&lt;br /&gt;
Kuehn, T. H., &amp;amp; Goldstein, R. J. (1976). An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders. Journal of Fluid mechanics, 74(4), 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1758</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1758"/>
				<updated>2017-12-11T11:44:18Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Governing equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right)&lt;br /&gt;
\label{buoyancy}&lt;br /&gt;
\end{equation}&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Governing equations==&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities $\b{v} = \left(u, v\right)^T$ rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c\frac{\partial T}{\partial t} + \b{v}\cdot\nabla T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[t' = \frac{\alpha t}{L^2}, \quad x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{L^2}{\alpha}\omega, \quad \psi' = \frac{\psi}{\alpha}\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c)$ is the thermal diffusivity. Upon inserting the buoyancy term \eqref{buoyancy}, substituting with the dimensionless variables and dropping the prime $'$ for simplicity, the dimensionless equations are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + \b{v}\cdot\nabla\omega = \mathit{Pr} \Delta \omega + \mathit{Ra}_L \mathit{Pr} \frac{\partial \phi}{\partial x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \phi}{\partial t} + \b{v}\cdot\nabla\phi = \Delta \phi&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The dimensionless variables that appear in these equations are the ''Prandtl number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Pr} = \frac{\mu c}{k} = \frac{\nu}{\alpha}&lt;br /&gt;
\]&lt;br /&gt;
and the ''Rayleigh number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Ra}_L = \frac{g \beta \left(T_\mathrm{i} - T_\mathrm{o}\right)L^3}{\nu \alpha}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
==Boundary conditions==&lt;br /&gt;
&lt;br /&gt;
The boundary conditions that appear in this problem are two impermeable isothermal walls at constant radii. The stream function $\psi$ is constant along each wall. Since no flow enter or escapes form the enclosure, the stream function is set equal to zero on all boundaries. The dimensionless temperature equals unity on the inner cylinder and zero on the outer cylinder. The value of the vorticity at the boundaries may be found by directly applying&lt;br /&gt;
\[&lt;br /&gt;
\omega = \Delta \psi&lt;br /&gt;
\]&lt;br /&gt;
along the walls.&lt;br /&gt;
&lt;br /&gt;
The boundary condition are therefore&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 1&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the inner cylinder and&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 0&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the outer cylinder.&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
&lt;br /&gt;
Kuehn, T. H., &amp;amp; Goldstein, R. J. (1976). An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders. Journal of Fluid mechanics, 74(4), 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1757</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1757"/>
				<updated>2017-12-11T11:31:39Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right)&lt;br /&gt;
\label{buoyancy}&lt;br /&gt;
\end{equation}&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Governing equations==&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities $\b{v} = \left(u, v\right)^T$ rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c\frac{\partial T}{\partial t} + \b{v}\cdot\nabla T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[t' = \frac{\alpha t}{L^2}, \quad x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{L^2}{\alpha}\omega, \quad \psi' = \frac{\psi}{\alpha}\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c)$ is the thermal diffusivity. Upon inserting the buoyancy term \eqref{buoyancy}, substituting with the dimensionless variables and dropping the prime $'$ for simplicity, the dimensionless equations are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \mathit{Pr} \Delta \omega + \mathit{Ra}_L \mathit{Pr} \frac{\partial \phi}{\partial x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \phi}{\partial t} + \b{v}\cdot\nabla\phi = \Delta \phi&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The dimensionless variables that appear in these equations are the ''Prandtl number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Pr} = \frac{\mu c}{k} = \frac{\nu}{\alpha}&lt;br /&gt;
\]&lt;br /&gt;
and the ''Rayleigh number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Ra}_L = \frac{g \beta \left(T_\mathrm{i} - T_\mathrm{o}\right)L^3}{\nu \alpha}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
==Boundary conditions==&lt;br /&gt;
&lt;br /&gt;
The boundary conditions that appear in this problem are two impermeable isothermal walls at constant radii. The stream function $\psi$ is constant along each wall. Since no flow enter or escapes form the enclosure, the stream function is set equal to zero on all boundaries. The dimensionless temperature equals unity on the inner cylinder and zero on the outer cylinder. The value of the vorticity at the boundaries may be found by directly applying&lt;br /&gt;
\[&lt;br /&gt;
\omega = \Delta \psi&lt;br /&gt;
\]&lt;br /&gt;
along the walls.&lt;br /&gt;
&lt;br /&gt;
The boundary condition are therefore&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 1&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the inner cylinder and&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 0&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the outer cylinder.&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
&lt;br /&gt;
Kuehn, T. H., &amp;amp; Goldstein, R. J. (1976). An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders. Journal of Fluid mechanics, 74(4), 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1756</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1756"/>
				<updated>2017-12-11T02:50:40Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Sources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\[ \b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right) \]&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Governing equations==&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities $\b{v} = \left(u, v\right)^T$ rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c\frac{\partial T}{\partial t} + \b{v}\cdot\nabla T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[t' = \frac{\alpha t}{L^2}, \quad x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{L^2}{\alpha}\omega, \quad \psi' = \frac{\psi}{\alpha}\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c)$ is the thermal diffusivity. Upon substituting with the dimensionless variables and dropping the prime $'$ for simplicity, the dimensionless equations are given by:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \mathit{Pr} \Delta \omega + \mathit{Ra}_L \mathit{Pr} \frac{\partial \phi}{\partial x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \phi}{\partial t} + \b{v}\cdot\nabla\phi = \Delta \phi&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The dimensionless variables that appear in these equations are the ''Prandtl number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Pr} = \frac{\mu c}{k} = \frac{\nu}{\alpha}&lt;br /&gt;
\]&lt;br /&gt;
and the ''Rayleigh number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Ra}_L = \frac{g \beta \left(T_\mathrm{i} - T_\mathrm{o}\right)L^3}{\nu \alpha}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
==Boundary conditions==&lt;br /&gt;
&lt;br /&gt;
The boundary conditions that appear in this problem are two impermeable isothermal walls at constant radii. The stream function $\psi$ is constant along each wall. Since no flow enter or escapes form the enclosure, the stream function is set equal to zero on all boundaries. The dimensionless temperature equals unity on the inner cylinder and zero on the outer cylinder. The value of the vorticity at the boundaries may be found by directly applying&lt;br /&gt;
\[&lt;br /&gt;
\omega = \Delta \psi&lt;br /&gt;
\]&lt;br /&gt;
along the walls.&lt;br /&gt;
&lt;br /&gt;
The boundary condition are therefore&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 1&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the inner cylinder and&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 0&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the outer cylinder.&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
&lt;br /&gt;
Kuehn, T. H., &amp;amp; Goldstein, R. J. (1976). An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders. Journal of Fluid mechanics, 74(4), 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1755</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1755"/>
				<updated>2017-12-11T02:47:07Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Governing equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\[ \b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right) \]&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Governing equations==&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities $\b{v} = \left(u, v\right)^T$ rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c\frac{\partial T}{\partial t} + \b{v}\cdot\nabla T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[t' = \frac{\alpha t}{L^2}, \quad x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{L^2}{\alpha}\omega, \quad \psi' = \frac{\psi}{\alpha}\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c)$ is the thermal diffusivity. Upon substituting with the dimensionless variables and dropping the prime $'$ for simplicity, the dimensionless equations are given by:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \mathit{Pr} \Delta \omega + \mathit{Ra}_L \mathit{Pr} \frac{\partial \phi}{\partial x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \phi}{\partial t} + \b{v}\cdot\nabla\phi = \Delta \phi&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The dimensionless variables that appear in these equations are the ''Prandtl number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Pr} = \frac{\mu c}{k} = \frac{\nu}{\alpha}&lt;br /&gt;
\]&lt;br /&gt;
and the ''Rayleigh number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Ra}_L = \frac{g \beta \left(T_\mathrm{i} - T_\mathrm{o}\right)L^3}{\nu \alpha}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
==Boundary conditions==&lt;br /&gt;
&lt;br /&gt;
The boundary conditions that appear in this problem are two impermeable isothermal walls at constant radii. The stream function $\psi$ is constant along each wall. Since no flow enter or escapes form the enclosure, the stream function is set equal to zero on all boundaries. The dimensionless temperature equals unity on the inner cylinder and zero on the outer cylinder. The value of the vorticity at the boundaries may be found by directly applying&lt;br /&gt;
\[&lt;br /&gt;
\omega = \Delta \psi&lt;br /&gt;
\]&lt;br /&gt;
along the walls.&lt;br /&gt;
&lt;br /&gt;
The boundary condition are therefore&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 1&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the inner cylinder and&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 0&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the outer cylinder.&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
Kuehn, T. H., and R. J. Goldstein. &amp;quot;An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders.&amp;quot; Journal of Fluid mechanics 74, no. 4 (1976): 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1754</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1754"/>
				<updated>2017-12-11T02:46:42Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Governing equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\[ \b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right) \]&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Governing equations==&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities $\b{v} = \left(u, v\right)^T$ rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c\frac{\partial T}{\partial t} + \b{v}\cdot\nabla T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[t' = \frac{\alpha t}{L^2}, \quad x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{L^2}{\alpha}\omega, \quad \psi' = \frac{\psi}{\alpha}\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c)$ is the thermal diffusivity. Upon substituting with the dimensionless variables and dropping the prime $'$ for simplicity, the dimensionless equations are given by:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \mathit{Pr} \Delta \omega + \mathit{Pr}\mathit{Ra}_L \frac{\partial \phi}{\partial x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \phi}{\partial t} + \b{v}\cdot\nabla\phi = \Delta \phi&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The dimensionless variables that appear in these equations are the ''Prandtl number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Pr} = \frac{\mu c}{k} = \frac{\nu}{\alpha}&lt;br /&gt;
\]&lt;br /&gt;
and the ''Rayleigh number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Ra}_L = \frac{g \beta \left(T_\mathrm{i} - T_\mathrm{o}\right)L^3}{\nu \alpha}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
==Boundary conditions==&lt;br /&gt;
&lt;br /&gt;
The boundary conditions that appear in this problem are two impermeable isothermal walls at constant radii. The stream function $\psi$ is constant along each wall. Since no flow enter or escapes form the enclosure, the stream function is set equal to zero on all boundaries. The dimensionless temperature equals unity on the inner cylinder and zero on the outer cylinder. The value of the vorticity at the boundaries may be found by directly applying&lt;br /&gt;
\[&lt;br /&gt;
\omega = \Delta \psi&lt;br /&gt;
\]&lt;br /&gt;
along the walls.&lt;br /&gt;
&lt;br /&gt;
The boundary condition are therefore&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 1&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the inner cylinder and&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 0&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the outer cylinder.&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
Kuehn, T. H., and R. J. Goldstein. &amp;quot;An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders.&amp;quot; Journal of Fluid mechanics 74, no. 4 (1976): 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1753</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1753"/>
				<updated>2017-12-11T02:42:53Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Governing equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\[ \b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right) \]&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Governing equations==&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities $\b{v} = \left(u, v\right)^T$ rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c\frac{\partial T}{\partial t} + \b{v}\cdot\nabla T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[t' = \frac{\alpha t}{L^2}, \quad x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{\alpha}{L^2}\omega, \quad \psi' = \frac{\psi}{\alpha}\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c)$ is the thermal diffusivity. Upon substituting with the dimensionless variables and dropping the prime $'$ for simplicity, the dimensionless equations are given by:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \mathit{Pr} \Delta \omega + \mathit{Pr}\mathit{Ra}_L \frac{\partial \phi}{\partial x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \phi}{\partial t} + \b{v}\cdot\nabla\phi = \Delta \phi&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The dimensionless variables that appear in these equations are the ''Prandtl number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Pr} = \frac{\mu c}{k} = \frac{\nu}{\alpha}&lt;br /&gt;
\]&lt;br /&gt;
and the ''Rayleigh number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Ra}_L = \frac{g \beta \left(T_\mathrm{i} - T_\mathrm{o}\right)L^3}{\nu \alpha}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
==Boundary conditions==&lt;br /&gt;
&lt;br /&gt;
The boundary conditions that appear in this problem are two impermeable isothermal walls at constant radii. The stream function $\psi$ is constant along each wall. Since no flow enter or escapes form the enclosure, the stream function is set equal to zero on all boundaries. The dimensionless temperature equals unity on the inner cylinder and zero on the outer cylinder. The value of the vorticity at the boundaries may be found by directly applying&lt;br /&gt;
\[&lt;br /&gt;
\omega = \Delta \psi&lt;br /&gt;
\]&lt;br /&gt;
along the walls.&lt;br /&gt;
&lt;br /&gt;
The boundary condition are therefore&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 1&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the inner cylinder and&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 0&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the outer cylinder.&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
Kuehn, T. H., and R. J. Goldstein. &amp;quot;An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders.&amp;quot; Journal of Fluid mechanics 74, no. 4 (1976): 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1752</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1752"/>
				<updated>2017-12-11T02:40:43Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Governing equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\[ \b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right) \]&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Governing equations==&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities $\b{v} = \left(u, v\right)^T$ rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c\frac{\partial T}{\partial t} + \b{v}\cdot\nabla T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[t' = \frac{\alpha t}{L^2}, \quad x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{L^2}{\alpha}\omega, \quad \psi' = \frac{\psi}{\alpha}\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c)$ is the thermal diffusivity. Upon substituting with the dimensionless variables and dropping the prime $'$ for simplicity, the dimensionless equations are given by:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \mathit{Pr} \Delta \omega + \mathit{Pr}\mathit{Ra}_L \frac{\partial \phi}{\partial x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \phi}{\partial t} + \b{v}\cdot\nabla\phi = \Delta \phi&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The dimensionless variables that appear in these equations are the ''Prandtl number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Pr} = \frac{\mu c}{k} = \frac{\nu}{\alpha}&lt;br /&gt;
\]&lt;br /&gt;
and the ''Rayleigh number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Ra}_L = \frac{g \beta \left(T_\mathrm{i} - T_\mathrm{o}\right)L^3}{\nu \alpha}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
==Boundary conditions==&lt;br /&gt;
&lt;br /&gt;
The boundary conditions that appear in this problem are two impermeable isothermal walls at constant radii. The stream function $\psi$ is constant along each wall. Since no flow enter or escapes form the enclosure, the stream function is set equal to zero on all boundaries. The dimensionless temperature equals unity on the inner cylinder and zero on the outer cylinder. The value of the vorticity at the boundaries may be found by directly applying&lt;br /&gt;
\[&lt;br /&gt;
\omega = \Delta \psi&lt;br /&gt;
\]&lt;br /&gt;
along the walls.&lt;br /&gt;
&lt;br /&gt;
The boundary condition are therefore&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 1&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the inner cylinder and&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 0&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the outer cylinder.&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
Kuehn, T. H., and R. J. Goldstein. &amp;quot;An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders.&amp;quot; Journal of Fluid mechanics 74, no. 4 (1976): 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1751</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1751"/>
				<updated>2017-12-11T02:39:58Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Governing equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\[ \b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right) \]&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Governing equations==&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c\frac{\partial T}{\partial t} + \b{v}\cdot\nabla T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[t' = \frac{\alpha t}{L^2}, \quad x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{L^2}{\alpha}\omega, \quad \psi' = \frac{\psi}{\alpha}\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c)$ is the thermal diffusivity. Upon substituting with the dimensionless variables and dropping the prime $'$ for simplicity, the dimensionless equations are given by:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \mathit{Pr} \Delta \omega + \mathit{Pr}\mathit{Ra}_L \frac{\partial \phi}{\partial x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \phi}{\partial t} + \b{v}\cdot\nabla\phi = \Delta \phi&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The dimensionless variables that appear in these equations are the ''Prandtl number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Pr} = \frac{\mu c}{k} = \frac{\nu}{\alpha}&lt;br /&gt;
\]&lt;br /&gt;
and the ''Rayleigh number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Ra}_L = \frac{g \beta \left(T_\mathrm{i} - T_\mathrm{o}\right)L^3}{\nu \alpha}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
==Boundary conditions==&lt;br /&gt;
&lt;br /&gt;
The boundary conditions that appear in this problem are two impermeable isothermal walls at constant radii. The stream function $\psi$ is constant along each wall. Since no flow enter or escapes form the enclosure, the stream function is set equal to zero on all boundaries. The dimensionless temperature equals unity on the inner cylinder and zero on the outer cylinder. The value of the vorticity at the boundaries may be found by directly applying&lt;br /&gt;
\[&lt;br /&gt;
\omega = \Delta \psi&lt;br /&gt;
\]&lt;br /&gt;
along the walls.&lt;br /&gt;
&lt;br /&gt;
The boundary condition are therefore&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 1&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the inner cylinder and&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 0&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the outer cylinder.&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
Kuehn, T. H., and R. J. Goldstein. &amp;quot;An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders.&amp;quot; Journal of Fluid mechanics 74, no. 4 (1976): 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1750</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1750"/>
				<updated>2017-12-11T02:38:54Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Governing equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\[ \b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right) \]&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Governing equations==&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c\frac{\partial T}{\partial t} + \b{v}\cdot\nablaT = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[t' = \frac{\alpha t}{L^2}, \quad x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{L^2}{\alpha}\omega, \quad \psi' = \frac{\psi}{\alpha}\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c)$ is the thermal diffusivity. Upon substituting with the dimensionless variables and dropping the prime $'$ for simplicity, the dimensionless equations are given by:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \mathit{Pr} \Delta \omega + \mathit{Pr}\mathit{Ra}_L \frac{\partial \phi}{\partial x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \phi}{\partial t} + \b{v}\cdot\nabla\phi = \Delta \phi&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The dimensionless variables that appear in these equations are the ''Prandtl number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Pr} = \frac{\mu c}{k} = \frac{\nu}{\alpha}&lt;br /&gt;
\]&lt;br /&gt;
and the ''Rayleigh number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Ra}_L = \frac{g \beta \left(T_\mathrm{i} - T_\mathrm{o}\right)L^3}{\nu \alpha}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
==Boundary conditions==&lt;br /&gt;
&lt;br /&gt;
The boundary conditions that appear in this problem are two impermeable isothermal walls at constant radii. The stream function $\psi$ is constant along each wall. Since no flow enter or escapes form the enclosure, the stream function is set equal to zero on all boundaries. The dimensionless temperature equals unity on the inner cylinder and zero on the outer cylinder. The value of the vorticity at the boundaries may be found by directly applying&lt;br /&gt;
\[&lt;br /&gt;
\omega = \Delta \psi&lt;br /&gt;
\]&lt;br /&gt;
along the walls.&lt;br /&gt;
&lt;br /&gt;
The boundary condition are therefore&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 1&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the inner cylinder and&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 0&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the outer cylinder.&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
Kuehn, T. H., and R. J. Goldstein. &amp;quot;An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders.&amp;quot; Journal of Fluid mechanics 74, no. 4 (1976): 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1749</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1749"/>
				<updated>2017-12-11T02:34:39Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Boundary conditions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\[ \b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right) \]&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Governing equations==&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c\frac{\partial T}{\partial t} + (\b{v}\cdot\nabla)T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[t' = \frac{\alpha t}{L^2}, \quad x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{L^2}{\alpha}\omega, \quad \psi' = \frac{\psi}{\alpha}\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c)$ is the thermal diffusivity. Upon substituting with the dimensionless variables and dropping the prime $'$ for simplicity, the dimensionless equations are given by:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \mathit{Pr} \Delta \omega + \mathit{Pr}\mathit{Ra}_L \frac{\partial \phi}{\partial x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \phi}{\partial t} + (\b{v}\cdot\nabla)\phi = \Delta \phi&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The dimensionless variables that appear in these equations are the ''Prandtl number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Pr} = \frac{\mu c}{k} = \frac{\nu}{\alpha}&lt;br /&gt;
\]&lt;br /&gt;
and the ''Rayleigh number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Ra}_L = \frac{g \beta \left(T_\mathrm{i} - T_\mathrm{o}\right)L^3}{\nu \alpha}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
==Boundary conditions==&lt;br /&gt;
&lt;br /&gt;
The boundary conditions that appear in this problem are two impermeable isothermal walls at constant radii. The stream function $\psi$ is constant along each wall. Since no flow enter or escapes form the enclosure, the stream function is set equal to zero on all boundaries. The dimensionless temperature equals unity on the inner cylinder and zero on the outer cylinder. The value of the vorticity at the boundaries may be found by directly applying&lt;br /&gt;
\[&lt;br /&gt;
\omega = \Delta \psi&lt;br /&gt;
\]&lt;br /&gt;
along the walls.&lt;br /&gt;
&lt;br /&gt;
The boundary condition are therefore&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 1&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the inner cylinder and&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\psi = u = v = 0, \quad \omega = \Delta \psi, \quad \phi = 0&lt;br /&gt;
\end{equation}&lt;br /&gt;
on the outer cylinder.&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
Kuehn, T. H., and R. J. Goldstein. &amp;quot;An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders.&amp;quot; Journal of Fluid mechanics 74, no. 4 (1976): 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1748</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1748"/>
				<updated>2017-12-11T02:32:28Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Boundary conditions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\[ \b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right) \]&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Governing equations==&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c\frac{\partial T}{\partial t} + (\b{v}\cdot\nabla)T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[t' = \frac{\alpha t}{L^2}, \quad x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{L^2}{\alpha}\omega, \quad \psi' = \frac{\psi}{\alpha}\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c)$ is the thermal diffusivity. Upon substituting with the dimensionless variables and dropping the prime $'$ for simplicity, the dimensionless equations are given by:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \mathit{Pr} \Delta \omega + \mathit{Pr}\mathit{Ra}_L \frac{\partial \phi}{\partial x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \phi}{\partial t} + (\b{v}\cdot\nabla)\phi = \Delta \phi&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The dimensionless variables that appear in these equations are the ''Prandtl number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Pr} = \frac{\mu c}{k} = \frac{\nu}{\alpha}&lt;br /&gt;
\]&lt;br /&gt;
and the ''Rayleigh number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Ra}_L = \frac{g \beta \left(T_\mathrm{i} - T_\mathrm{o}\right)L^3}{\nu \alpha}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
==Boundary conditions==&lt;br /&gt;
&lt;br /&gt;
The boundary conditions that appear in this problem are two impermeable isothermal walls at constant radii. The stream function $\psi$ is constant along each wall. Since no flow enter or escapes form the enclosure, the stream function is set equal to zero on all boundaries. The dimensionless temperature equals unity on the inner cylinder and zero on the outer cylinder. The value of the vorticity at the boundaries may be found from the \ref{poisson_stream}.&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
Kuehn, T. H., and R. J. Goldstein. &amp;quot;An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders.&amp;quot; Journal of Fluid mechanics 74, no. 4 (1976): 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1747</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1747"/>
				<updated>2017-12-11T02:27:57Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\[ \b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right) \]&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Governing equations==&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c\frac{\partial T}{\partial t} + (\b{v}\cdot\nabla)T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[t' = \frac{\alpha t}{L^2}, \quad x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{L^2}{\alpha}\omega, \quad \psi' = \frac{\psi}{\alpha}\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c)$ is the thermal diffusivity. Upon substituting with the dimensionless variables and dropping the prime $'$ for simplicity, the dimensionless equations are given by:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \mathit{Pr} \Delta \omega + \mathit{Pr}\mathit{Ra}_L \frac{\partial \phi}{\partial x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \phi}{\partial t} + (\b{v}\cdot\nabla)\phi = \Delta \phi&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The dimensionless variables that appear in these equations are the ''Prandtl number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Pr} = \frac{\mu c}{k} = \frac{\nu}{\alpha}&lt;br /&gt;
\]&lt;br /&gt;
and the ''Rayleigh number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Ra}_L = \frac{g \beta \left(T_\mathrm{i} - T_\mathrm{o}\right)L^3}{\nu \alpha}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
==Boundary conditions==&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
Kuehn, T. H., and R. J. Goldstein. &amp;quot;An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders.&amp;quot; Journal of Fluid mechanics 74, no. 4 (1976): 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1746</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1746"/>
				<updated>2017-12-11T02:26:24Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\[ \b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right) \]&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c\frac{\partial T}{\partial t} + (\b{v}\cdot\nabla)T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[t' = \frac{\alpha t}{L^2}, \quad x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{L^2}{\alpha}\omega, \quad \psi' = \frac{\psi}{\alpha}\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c)$ is the thermal diffusivity. Upon substituting with the dimensionless variables and dropping the prime $'$ for simplicity, the dimensionless equations are given by:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \mathit{Pr} \Delta \omega + \mathit{Pr}\mathit{Ra}_L \frac{\partial \phi}{\partial x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \phi}{\partial t} + (\b{v}\cdot\nabla)\phi = \Delta \phi&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The dimensionless variables that appear in these equations are the ''Prandtl number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Pr} = \frac{\mu c}{k} = \frac{\nu}{\alpha}&lt;br /&gt;
\]&lt;br /&gt;
and the ''Rayleigh number''&lt;br /&gt;
\[&lt;br /&gt;
\mathit{Ra}_L = \frac{g \beta \left(T_\mathrm{i} - T_\mathrm{o}\right)L^3}{\nu \alpha}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
Kuehn, T. H., and R. J. Goldstein. &amp;quot;An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders.&amp;quot; Journal of Fluid mechanics 74, no. 4 (1976): 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1745</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1745"/>
				<updated>2017-12-11T02:25:02Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\[ \b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right) \]&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c\frac{\partial T}{\partial t} + (\b{v}\cdot\nabla)T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[t' = \frac{\alpha t}{L^2}, \quad x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{L^2}{\alpha}\omega, \quad \psi' = \frac{\psi}{\alpha}\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c)$ is the thermal diffusivity. Upon substituting with the dimensionless variables and dropping the prime $'$ for simplicity, the dimensionless equations are given by:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \mathit{Pr} \Delta \omega + \mathit{Pr}\mathit{Ra}_L \frac{\partial \phi}{\partial x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \phi}{\partial t} + (\b{v}\cdot\nabla)\phi = \Delta \phi&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The dimensionless variables that appear in these equations are the &lt;br /&gt;
\[&lt;br /&gt;
\text{Prandtl number} \quad \mathit{Pr} = \frac{\mu c}{k} = \frac{\nu}{\alpha}&lt;br /&gt;
\]&lt;br /&gt;
and &lt;br /&gt;
\[&lt;br /&gt;
\text{Rayleigh number} \quad \mathit{Ra}_L = \frac{g \beta (T_\mathrm{i} - T_\mathrm{o})L^3}{\nu \alpha}}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
Kuehn, T. H., and R. J. Goldstein. &amp;quot;An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders.&amp;quot; Journal of Fluid mechanics 74, no. 4 (1976): 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1744</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1744"/>
				<updated>2017-12-11T02:20:14Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\[ \b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right) \]&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c\frac{\partial T}{\partial t} + (\b{v}\cdot\nabla)T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
These fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[t' = \frac{\alpha t}{L^2}, \quad x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{L^2}{\alpha}\omega, \quad \psi' = \frac{\psi}{\alpha}\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c)$ is the thermal diffusivity. Upon substituting with the dimensionless variables and dropping the prime $'$ for simplicity, the dimensionless equations are given by:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \mathit{Pr} \Delta \omega + \mathit{Pr}\mathit{Ra}_L \frac{\partial \phi}{\partial x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \phi}{\partial t} + (\b{v}\cdot\nabla)\phi = \Delta \phi&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
Kuehn, T. H., and R. J. Goldstein. &amp;quot;An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders.&amp;quot; Journal of Fluid mechanics 74, no. 4 (1976): 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1743</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1743"/>
				<updated>2017-12-11T02:10:30Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\[ \b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right) \]&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c\frac{\partial T}{\partial t} + (\b{v}\cdot\nabla)T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
These fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[t' = \frac{\alpha t}{L^2}, \quad x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{L^2}{\alpha}\omega,\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c)$ is the thermal diffusivity.&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
Kuehn, T. H., and R. J. Goldstein. &amp;quot;An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders.&amp;quot; Journal of Fluid mechanics 74, no. 4 (1976): 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1742</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1742"/>
				<updated>2017-12-11T02:08:55Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\[ \b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right) \]&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c_\mathrm{p}\frac{\partial T}{\partial t} + (\b{v}\cdot\nabla)T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
These fluid properties that appear in this problem are the fluid density $\rho$, specific heat $c_\mathrm{p}$, kinematic viscosity $\nu$ and thermal conductivity $k$. The equations can be put into dimensionless form by introducing the following new variables:&lt;br /&gt;
&lt;br /&gt;
\[x' = \frac{x}{L}, \quad y' = \frac{y}{L}, \quad \phi = \frac{T- T_\mathrm{o}}{T_\mathrm{i}-T_\mathrm{o}}, \quad u' = \frac{uL}{\alpha}, \quad v' = \frac{vL}{\alpha}, \quad \omega' = \frac{L^2}{\alpha}\omega,\]&lt;br /&gt;
where $L = R_\mathrm{o} - R_\mathrm{i}$ is the gap between cylinders and $\alpha = k/(\rho c_\mathrm{p})$ is the thermal diffusivity.&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
Kuehn, T. H., and R. J. Goldstein. &amp;quot;An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders.&amp;quot; Journal of Fluid mechanics 74, no. 4 (1976): 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1741</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1741"/>
				<updated>2017-12-11T02:00:34Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\[ \b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right) \]&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities rather than the derivatives of the stream function in the coefficients. The equations to be solved are:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c_\mathrm{p}\frac{\partial T}{\partial t} + (\b{v}\cdot\nabla)T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
Kuehn, T. H., and R. J. Goldstein. &amp;quot;An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders.&amp;quot; Journal of Fluid mechanics 74, no. 4 (1976): 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1740</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1740"/>
				<updated>2017-12-11T02:00:06Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\[ \b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right) \]&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To solve this problem we will use the same formulation as Kuehn and Goldstein (1975) only that we will use MLSM to supply the discrete approximations to the PDE operators. Note that in the actual computations it is convenient to use the velocities rather than the derivatives of the stream function in the coefficients. The equations to be solved may then be written as&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\rho c_\mathrm{p}\frac{\partial T}{\partial t} + (\b{v}\cdot\nabla)T = k \Delta T&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
Kuehn, T. H., and R. J. Goldstein. &amp;quot;An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders.&amp;quot; Journal of Fluid mechanics 74, no. 4 (1976): 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1739</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1739"/>
				<updated>2017-12-11T01:53:40Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which leads to a two-dimensional flow configuration as schematically shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\[ \b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right) \]&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. The inner cylinder is held at a constant temperature $T_\mathrm{i}$.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The equations to be solved are&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
Kuehn, T. H., and R. J. Goldstein. &amp;quot;An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders.&amp;quot; Journal of Fluid mechanics 74, no. 4 (1976): 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1738</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1738"/>
				<updated>2017-12-11T01:50:14Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which lead to a two-dimensional flow configuration as shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\[ \b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right) \]&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The equations to be solved are&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
Kuehn, T. H., and R. J. Goldstein. &amp;quot;An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders.&amp;quot; Journal of Fluid mechanics 74, no. 4 (1976): 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1737</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1737"/>
				<updated>2017-12-11T01:49:53Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. Several assumptions are made in specifying the problem. First of all the flow is assumed to be invariant along the axis of the cylinders which lead to a two-dimensional flow configuration as shown in the figure below. A constant property Boussinesq approximation is used. The buoyancy force may then be given as:&lt;br /&gt;
\[ \b{g} = \left(\begin{matrix}g_x \\ g_y \end{matrix}\right) = \left(\begin{matrix}0 \\ g \beta \left(T - T_\mathrm{o}\right) \end{matrix}\right)&lt;br /&gt;
where $g$ is the gravitational acceleration, $T$ the temperature at a point within the fluid, $T_\mathrm{o}$ the temperature of the outer cylinder and $\beta$ the thermal volumetric expansion coefficient. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The equations to be solved are&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + u\frac{\partial \omega}{\partial x} + v\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
Kuehn, T. H., and R. J. Goldstein. &amp;quot;An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders.&amp;quot; Journal of Fluid mechanics 74, no. 4 (1976): 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=File:Cylinders.png&amp;diff=1736</id>
		<title>File:Cylinders.png</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=File:Cylinders.png&amp;diff=1736"/>
				<updated>2017-12-11T01:35:07Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: Ipribec uploaded a new version of File:Cylinders.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;File uploaded with MsUpload&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1735</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1735"/>
				<updated>2017-12-11T01:32:45Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Another classical fluid flow benchmark is that of natural convection heat transfer in the annular space between concentric cylinders. This problem was first studied numerically by Kuehn and Goldstein (1975) using a stream function-vorticity formulation of the Navier-Stokes equations. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:annulus_setup&amp;quot;&amp;gt;&lt;br /&gt;
[[File:cylinders.png|400px|thumb|upright=2|center|&amp;lt;caption&amp;gt;Schematic diagram for the concentric cylinder geometry.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Sources=&lt;br /&gt;
Kuehn, T. H., and R. J. Goldstein. &amp;quot;An experimental and theoretical study of natural convection in the annulus between horizontal concentric cylinders.&amp;quot; Journal of Fluid mechanics 74, no. 4 (1976): 695-719.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=File:Cylinders.png&amp;diff=1734</id>
		<title>File:Cylinders.png</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=File:Cylinders.png&amp;diff=1734"/>
				<updated>2017-12-11T01:28:06Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: File uploaded with MsUpload&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;File uploaded with MsUpload&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1733</id>
		<title>Natural convection between concentric cylinders</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Natural_convection_between_concentric_cylinders&amp;diff=1733"/>
				<updated>2017-12-11T00:32:37Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: Created page with &amp;quot;Click here to return back to Fluid Mechanics  =Introduction=&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Click here to return back to [[Fluid Mechanics]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Medusa&amp;diff=1732</id>
		<title>Medusa</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Medusa&amp;diff=1732"/>
				<updated>2017-12-11T00:31:11Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Applications / Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--__NOTITLE__--&amp;gt;&lt;br /&gt;
In Parallel and Distributed Systems Laboratory we are working on a C++ library that is first and foremost focused on tools for solving Partial Differential Equations by meshless methods. The basic idea is to create generic codes for tools that are needed for solving not only PDEs but many other problems, e.g. Moving Least Squares approximation, kD-tree, domain generation engines, etc. We call this open source meshless project a Meshless Machine (MM).&lt;br /&gt;
&lt;br /&gt;
Technical details about code, examples, and  can be found on our [http://www-e6.ijs.si/ParallelAndDistributedSystems/MeshlessMachine/technical_docs/html/ '''documentation page''' ] and [https://gitlab.com/e62Lab/e62numcodes '''the code''']. [[File:C.png|100px||link=https://gitlab.com/e62Lab/e62numcodes|alt=Alt text|code]] [[File:doxygen.png|100px|link=http://www-e6.ijs.si/ParallelAndDistributedSystems/MeshlessMachine/technical_docs/html/ |alt=Alt text|Documentation page]]&lt;br /&gt;
&lt;br /&gt;
This wiki site is meant for more relaxed discussions about general principles, possible and already implemented applications, preliminary analyses, etc.&lt;br /&gt;
Note, that there are many grammatical mistakes, typos, stupid sentences, etc. This wiki is meant for quick information exchange and therefore we do not invest a lot of energy into styling :).  &lt;br /&gt;
&lt;br /&gt;
== Building blocks ==&lt;br /&gt;
* [[Moving Least Squares (MLS)]]&lt;br /&gt;
* [[Kd Tree]]&lt;br /&gt;
* [[Positioning of computational nodes]] &lt;br /&gt;
* [[Meshless Local Strong Form Method (MLSM)]]&lt;br /&gt;
* [[Computation of shape functions]]&lt;br /&gt;
* [[Integrators for time stepping]]&lt;br /&gt;
&lt;br /&gt;
== Applications / Examples ==&lt;br /&gt;
* [[Analysis of MLSM performance | Basic MLSM solutions]]&lt;br /&gt;
* [[Attenuation due to liquid water content in the atmosphere|Attenuation of a satellite communication]]&lt;br /&gt;
* [[Heart rate variability detection]]&lt;br /&gt;
&amp;lt;!-- * [[Dynamic Thermal Rating of over head lines]] --&amp;gt; &lt;br /&gt;
* [[Solid Mechanics]]&lt;br /&gt;
** [[MLSM and Solid Mechanics]]&lt;br /&gt;
** [[Point contact]]&lt;br /&gt;
** [[Hertzian contact]]&lt;br /&gt;
** [[Cantilever beam]]&lt;br /&gt;
** [[FWO case]]&lt;br /&gt;
* [[Fluid Mechanics]]&lt;br /&gt;
** [[Lid driven cavity]]&lt;br /&gt;
** [[de Vahl Davis natural convection test]]&lt;br /&gt;
** [[Natural convection between concentric cylinders]]&lt;br /&gt;
&lt;br /&gt;
== Performance analyses ==&lt;br /&gt;
* [[Execution on Intel® Xeon Phi™ co-processor]]&lt;br /&gt;
* [[1D MLSM and FDM comparison]]&lt;br /&gt;
* [[:File:tech_report.pdf|Execution overheads due to clumsy types::technical report]] [[File:pdf-file.gif]]&lt;br /&gt;
* [[Solving sparse systems]]&lt;br /&gt;
* [[Eigen paralelization]]&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
* [https://gitlab.com/e62Lab/e62numcodes Code and README on Gitlab]&lt;br /&gt;
* [[How to build | Installation and building]]&lt;br /&gt;
* [[Testing | Running unit tests]]&lt;br /&gt;
* [http://www-e6.ijs.si/ParallelAndDistributedSystems/MeshlessMachine/technical_docs/ Technical documentation]&lt;br /&gt;
* [[Coding style | Coding style]]&lt;br /&gt;
* [[Wiki editing guide | Wiki editing and backup guide]]&lt;br /&gt;
&lt;br /&gt;
== Last changes ==&lt;br /&gt;
&amp;lt;news unique=1 limit = 5&amp;gt;&lt;br /&gt;
*{{{timeanddate}}} :: {{{title}}} &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/news&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MISC ==&lt;br /&gt;
* Also see FAQ  -[[Frequently asked questions]]. &lt;br /&gt;
* [[List of contributors]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* Depolli, M., Kosec, G., Assessment of differential evolution for multi-objective optimization in a natural convection problem solved by a local meshless method. Engineering optimization, 2017, vol. 49, no. 4, pp. 675-692 ;[http://comms.ijs.si/~gkosec/data/papers/29639719.pdf manuscript]&lt;br /&gt;
* Kosec G., A local numerical solution of a fluid-flow problem on an irregular domain. Advances in engineering software. 2016;7 ; [29512743] ; [http://comms.ijs.si/~gkosec/data/papers/29512743.pdf manuscript]&lt;br /&gt;
* Kosec G., Trobec R., Simulation of semiconductor devices with a local numerical approach. Engineering analysis with boundary elements. 2015;69-75; [27912487] ; [http://comms.ijs.si/~gkosec/data/papers/27912487.pdf manuscript]&lt;br /&gt;
* Kosec G., Šarler B., Simulation of macrosegregation with mesosegregates in binary metallic casts by a meshless method. Engineering analysis with boundary elements. 2014;36-44; [http://comms.ijs.si/~gkosec/data/papers/3218939.pdf manuscript]&lt;br /&gt;
* Kosec G., Depolli M., Rashkovska A., Trobec R., Super linear speedup in a local parallel meshless solution of thermo-fluid problem. Computers &amp;amp; Structures. 2014;133:30-38; [http://comms.ijs.si/~gkosec/data/papers/27339815.pdf manuscript]&lt;br /&gt;
* Kosec G., Zinterhof P., Local strong form meshless method on multiple Graphics Processing Units. Computer modeling in engineering &amp;amp; sciences. 2013;91:377-396; [http://comms.ijs.si/~gkosec/data/papers/26785063.pdf manuscript]&lt;br /&gt;
* Kosec G., Šarler B., H-adaptive local radial basis function collocation meshless method. Computers, materials &amp;amp; continua. 2011;26:227-253; [http://comms.ijs.si/~gkosec/data/papers/KosecSarlerBurgers.pdf manuscript]&lt;br /&gt;
* Trobec R., Kosec G., Šterk M., Šarler B., Comparison of local weak and strong form meshless methods for 2-D diffusion equation. Engineering analysis with boundary elements. 2012;36:310-321; [http://comms.ijs.si/~gkosec/data/papers/EABE2499.pdf manuscript]&lt;br /&gt;
* Kosec G, Zaloznik M, Sarler B, Combeau H. A Meshless Approach Towards Solution of Macrosegregation Phenomena. CMC: Computers, Materials, &amp;amp; Continua. 2011;580:1-27 [http://comms.ijs.si/~gkosec/data/papers/KosecZaloznikSarlerCombeauSegregation.pdf manuscript]&lt;br /&gt;
* Kosec G, Sarler B. Solution of thermo-fluid problems by collocation with local pressure correction. International Journal of Numerical Methods for Heat &amp;amp; Fluid Flow. 2008;18:868-82 [http://comms.ijs.si/~gkosec/data/papers/KosecSarlerNS2008.pdf manuscript]&lt;br /&gt;
*  Trobec R., Kosec G., Parallel Scientific Computing, ISBN: 978-3-319-17072-5 (Print) 978-3-319-17073-2.&lt;br /&gt;
*  Slak, J., Kosec, G.. Detection of heart rate variability from a wearable differential ECG device., MIPRO 2016, 39th International Convention, 2016, Opatija, Croatia, ISSN 1847-3938, pp 450-455.&lt;br /&gt;
*  Kolman, M., Kosec, G. Correlation between attenuation of 20 GHz satellite communication link and liquid water content in the atmosphere. MIPRO 2016, 39th International Convention, 2016, Opatija, Croatia, ISSN 1847-3938. pp. 308-313.&lt;br /&gt;
&lt;br /&gt;
==Related pages==&lt;br /&gt;
* http://www-e6.ijs.si/ParallelAndDistributedSystems/#!NumericalMethods&lt;br /&gt;
* http://www-e6.ijs.si/ParallelAndDistributedSystems/#!utils&lt;br /&gt;
* http://www-e6.ijs.si/ParallelAndDistributedSystems/#!NUMA&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Fluid_Mechanics&amp;diff=1731</id>
		<title>Fluid Mechanics</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Fluid_Mechanics&amp;diff=1731"/>
				<updated>2017-12-11T00:20:56Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: q&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Computational fluid dynamics (CFD) is a field of a great interest among researchers in many fields of science, e.g. studying mathematical fundaments of numerical methods, developing novel physical models, improving computer implementations, and many others. Pushing the limits of all involved fields of science helps community to deepen the understanding of several natural and technological phenomena. Weather forecast, ocean dynamics, water transport, casting, various energetic studies, etc., are just few examples where fluid dynamics plays a crucial role. The core problem of the CFD is solving the Navier-Stokes Equation or its variants, e.g. Darcy or Brinkman equation for flow in porous media. Here, we discuss basic algorithms for solving CFD problems. Check reference list on the [[Main Page]] for more details about related work.&lt;br /&gt;
&lt;br /&gt;
Long story short, we want to solve&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \b{v}}{\partial t}+\nabla \cdot \left( \rho \b{vv}\right)=-\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f}&lt;br /&gt;
\label{NavierStokes}&lt;br /&gt;
\end{equation}&lt;br /&gt;
also known as a Navier-Stokes equation. In many cases we are interested in the incompressible fluids (Ma&amp;lt;0.3), reducing the continuity equation to&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\nabla \cdot \b{v}=0&lt;br /&gt;
\label{contuinity}&lt;br /&gt;
\end{equation}&lt;br /&gt;
which implies a simplification&lt;br /&gt;
&lt;br /&gt;
\[\frac{\partial \left( \rho \b{v} \right)}{\partial t}+\nabla \cdot \left( \rho \b{vv} \right)=\frac{\partial \left( \rho \b{v} \right)}{\partial t}+(\rho \b{v}\cdot \nabla )\cdot \b{v}. \]&lt;br /&gt;
&lt;br /&gt;
Note that the $\b{v}\b{v}$ stands for the tensor or dyadic product \[ \b{v}\b{v} = \b{v}\otimes\b{v} = \b{v}\b{v}^\T = \left[ \begin{matrix}&lt;br /&gt;
   {{v}_{1}}{{v}_{1}} &amp;amp; \cdots &amp;amp; {{v}_{1}}{{v}_{n}}  \\&lt;br /&gt;
   \vdots &amp;amp; \ddots &amp;amp; \vdots  \\&lt;br /&gt;
   {{v}_{n}}{{v}_{1}} &amp;amp; \cdots &amp;amp; {{v}_{n}}{{v}_{n}}  \\&lt;br /&gt;
\end{matrix} \right]\]&lt;br /&gt;
An example of incompressible variant of advection term in 2D would therefore be&lt;br /&gt;
\[\left( \b{v}\cdot \nabla  \right)\b{v}=\left( \left( \begin{matrix}&lt;br /&gt;
   u  \\&lt;br /&gt;
   v  \\&lt;br /&gt;
\end{matrix} \right) \cdot \left( \begin{matrix}&lt;br /&gt;
   \frac{\partial }{\partial x}  \\&lt;br /&gt;
   \frac{\partial }{\partial y}  \\&lt;br /&gt;
\end{matrix} \right) \right)\left( \begin{matrix}&lt;br /&gt;
   u  \\&lt;br /&gt;
   v  \\&lt;br /&gt;
\end{matrix} \right)=\left( \begin{matrix}&lt;br /&gt;
   u\frac{\partial u}{\partial x}+v\frac{\partial u}{\partial y}  \\&lt;br /&gt;
   u\frac{\partial v}{\partial x}+v\frac{\partial v}{\partial y}  \\&lt;br /&gt;
\end{matrix} \right)\]&lt;br /&gt;
&lt;br /&gt;
The goal of CFD is to solve system \ref{NavierStokes} and \ref{contuinity}. It is obvious that a special treatment will be needed to couple both equations. In following discussion we cover some basic approaches, how this can be accomplished.&lt;br /&gt;
&lt;br /&gt;
= Numerical examples =&lt;br /&gt;
== [[Lid driven cavity]] ==&lt;br /&gt;
== [[de Vahl Davis natural convection test]] ==&lt;br /&gt;
&lt;br /&gt;
= Solutions algorithms =&lt;br /&gt;
== Artificial compressibility method ==&lt;br /&gt;
The simplest, completely explicit approach, is an artificial compressibility method (ACM), where a compressibility term is included in the mass continuity&lt;br /&gt;
\[\frac{\partial \b{v}}{\partial t}+(\b{v}\cdot\nabla )\b{v}=-\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f}\]&lt;br /&gt;
\[\frac{ 1 }{ \rho } \frac{\partial \rho }{\partial t}+\nabla \cdot \b{v}=0\]&lt;br /&gt;
\[\frac{ 1 }{ \rho } \frac{\partial \rho }{\partial p}\frac{\partial p}{\partial t}+\nabla \cdot \b{v}=0\]&lt;br /&gt;
Now, the above system can be solved directly.&lt;br /&gt;
&lt;br /&gt;
The addition of the time derivative of the pressure term physically means that waves of finite speed (the propagation of which depends on the magnitude of the ACM)&lt;br /&gt;
are introduced into the flow field as a mean to distribute the pressure within the domain. In a true&lt;br /&gt;
incompressible flow, the pressure field is affected instantaneously throughout the whole domain. In ACM there is a time delay between the flow disturbance and its effect on the&lt;br /&gt;
pressure field. Upon rearranging the equation yields&lt;br /&gt;
\[\frac{\partial p}{\partial t}+\rho {{C}^{2}}\nabla \cdot \b{v}=0\]&lt;br /&gt;
where the continuity equation is perturbed by the quantity $\frac{\partial p}{\partial t}$ denominated herein&lt;br /&gt;
as the AC parameter/artificial sound speed recognized by&lt;br /&gt;
$C$ [m/s] - speed of sound&lt;br /&gt;
\[\frac{1}{C^2}=\frac{\partial \rho }{\partial p}\]&lt;br /&gt;
Or in another words&lt;br /&gt;
\[C^2=\left( \frac{\partial p}{\partial \rho}\right)_S\]&lt;br /&gt;
where $\rho$ is the density of the material. It follows, by replacing partial derivatives, that the isentropic compressibility can be expressed as:&lt;br /&gt;
\[\beta =\frac{1}{\rho {{C}^{2}}}\]&lt;br /&gt;
The evaluation of the local ACM parameter in incompressible flows is inspired by the&lt;br /&gt;
speed of sound computations in compressible flows (for instance, from the perfect gas law).&lt;br /&gt;
However, in the incompressible flow situation, employing such a relation is difficult, but an artificial&lt;br /&gt;
relation can be developed from the convective and diffusive velocities.&lt;br /&gt;
Reverting to the justification of continuity modification, it can be immediately seen that the&lt;br /&gt;
artificial sound speed must be sufficiently large to have a significant regularizing effect and at&lt;br /&gt;
the same time must be as small as possible to minimizing perturbations on the incompressibility&lt;br /&gt;
equation.  Therefore, $C$ influences the convergence rate and stability of the solution method. In other words,&lt;br /&gt;
assists in reducing large disparity in the eigenvalues, leading to a well-conditioned system. &lt;br /&gt;
The $C$ can be '''estimated''' with&lt;br /&gt;
&lt;br /&gt;
\[ C = \beta \max \left( \left|\b{v}\right|_2, \left|\b{v}_{ref}\right|_2 \right),\]&lt;br /&gt;
where $\b{v}_{ref}$ stands for a reference velocity. &lt;br /&gt;
Values for $\beta$ in the range of 1–10 are recommended for better convergence to the steady state at which the&lt;br /&gt;
mass conservation is enforced. In addition, Equation ensures that $C$ does not reach zero at stagnation points&lt;br /&gt;
that cause instabilities in pseudo-time, effecting convergence&lt;br /&gt;
&lt;br /&gt;
Note, that for more complex simulation an internal iteration loops is required before marching in time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;ACM&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ACM BlockDiagram.png|600px]]&lt;br /&gt;
&amp;lt;caption&amp;gt;Scheme of the ACM algorithm &amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Explicit/Implicit pressure calculation ==&lt;br /&gt;
&lt;br /&gt;
Applying divergence on \ref{NavierStokes} yields&lt;br /&gt;
\[\nabla \cdot \frac{\partial \b{v}}{\partial t}+\nabla \cdot (\b{v}\cdot \nabla )\b{v}=-\frac{1}{\rho }{{\nabla }^{2}}p+\nabla \cdot \nu {{\nabla }^{2}}\b{v}+\nabla \cdot \b{f}\]&lt;br /&gt;
&lt;br /&gt;
And since $\nabla \cdot \b{v}=0$ and we can change order in $\nabla \cdot \nabla^2$ and $ \nabla^2 \cdot \nabla$ equation simplifies to&lt;br /&gt;
\[\frac{1}{\rho }{{\nabla }^{2}}p=\nabla \cdot \b{f}-\nabla \cdot (\b{v}\cdot \nabla )\b{v}\]&lt;br /&gt;
Now, we need boundary conditions that can be obtained by multiplying the equation  with a boundary normal vector&lt;br /&gt;
\[\b{\hat{n}}\cdot \left( \frac{\partial \b{v}}{\partial t}+(\b{v}\cdot \nabla )\b{v} \right)=\b{\hat{n}}\cdot \left( -\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{n}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f}-\frac{\partial \b{v}}{\partial t}-(\b{v}\cdot\nabla ) \b{v} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
&lt;br /&gt;
Note that using tangential boundary vector gives equivalent BCs&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{t}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f}-\frac{\partial \b{v}}{\partial t}-(\b{v}\cdot\nabla ) \b{v} \right)\cdot \b{\hat{t}}\]&lt;br /&gt;
For no-slip boundaries BCs simplify to&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{n}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
Otherwise an appropriate expression regarding the velocity can be written, i.e. write full  and taken in account velocity BCs. For example, Neumann velocity $\frac{\partial u}{\partial x}=0$ in 2D&lt;br /&gt;
\[\frac{\partial p}{\partial x}=\left( \nu {{\nabla }^{2}}u + {{f}_{x}}-\frac{\partial u}{\partial t}+v\frac{\partial u}{\partial y} \right)\]&lt;br /&gt;
Note that you allready know everything about the velocity and thus you can compute all the terms explicitely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So the procedure is:&lt;br /&gt;
&lt;br /&gt;
* Compute Navier Stokes either explicitly or implicitly&lt;br /&gt;
* Solve pressure equations with  computed velocities&lt;br /&gt;
* March in time&lt;br /&gt;
&lt;br /&gt;
Basic boundary conditions&lt;br /&gt;
Wall:   $\b{v}=0$, \[\frac{\partial p}{\partial \hat{n}}=\left( \nabla \cdot \left( \nu \nabla \b{v} \right)+\b{f} \right)\cdot \hat{n}\]&lt;br /&gt;
Inlet:  $\b{v}=\b{a}$, \[\frac{\partial p}{\partial \hat{n}}=\left( \nabla \cdot \left( \nu \nabla \b{v} \right)+\b{f}-\nabla \cdot (\rho \b{v}\b{v})-\rho \frac{\partial \b{v}}{\partial t} \right)\cdot \hat{n}\]&lt;br /&gt;
&lt;br /&gt;
Above system can be linearized (advection term) and solved either explicitly or implicitly.&lt;br /&gt;
&lt;br /&gt;
Further reading:&lt;br /&gt;
&lt;br /&gt;
W. D. Henshaw, A fourth-order accurate method for the incompressible Navier–Stokes equations on overlapping grids, J. Comput. Phys. 113, 13 (1994)&lt;br /&gt;
&lt;br /&gt;
J. C. Strikwerda, Finite difference methods for the Stokes and Navier–Stokes equations, SIAM J. Sci. Stat.&lt;br /&gt;
Comput. 5(1), 56 (1984)&lt;br /&gt;
&lt;br /&gt;
== Explicit Pressure correction ==&lt;br /&gt;
Another possibility is to solve pressure correction equation. Again Consider the momentum equation and mass continuity and discretize it explicitly&lt;br /&gt;
\[\frac{{{\b{v}}_{2}}-{{\b{v}}_{1}}}{\Delta t}=-\frac{1}{\rho }\nabla {{p}_{1}}-({{\b{v}}_{1}}\nabla )\cdot {{\b{v}}_{1}}+\nu {{\nabla }^{2}}{{\b{v}}_{1}}+\b{f}\]&lt;br /&gt;
Computed velocity obviously does not satisfy the mass contunity and therefore let’s call it intermediate velocity. Intermediate velocity is calculated from guessed pressure and old velocity values.&lt;br /&gt;
\[{{\b{v}}^{inter}}=\b{v}_1 + \Delta t\left( -\frac{1}{\rho }\nabla {{p}_{1}}-({{\b{v}}_{1}}\nabla )\cdot {{\b{v}}_{1}}+\nu {{\nabla }^{2}}{{\b{v}}_{1}}+\b{f} \right)\]&lt;br /&gt;
A correction term is added that drives velocity to divergence free field&lt;br /&gt;
\[\nabla \cdot ({{\b{v}}^{inter}}+{{\b{v}}^{corr}})=0 \qquad \to \qquad \nabla \cdot {{\b{v}}^{inter}}=-\nabla \cdot {{\b{v}}^{corr}}\]&lt;br /&gt;
&lt;br /&gt;
Velocity correction is affected only by effect of pressure correction. This fact is obvious due to all terms except gradient of pressure on the right side of equation  are constant.&lt;br /&gt;
\[{{\b{v}}^{corr}}=-\frac{\Delta t}{\rho }\nabla {{p}^{corr}} \]&lt;br /&gt;
&lt;br /&gt;
Note that corrected velocity also satisfies boundary conditions&lt;br /&gt;
\[\b{v}^{iter}+\b{v}^{corr}=\b{v}^{BC}\]&lt;br /&gt;
Applying divergence  and  we get '''pressure correction poisson equation'''.&lt;br /&gt;
\[\,{{\nabla }^{2}}{{p}^{corr}}\,=\frac{\rho }{\Delta t}\nabla \cdot {{\mathbf{v}}^{iter}}\,\]&lt;br /&gt;
&lt;br /&gt;
Boundary conditions can be obtained by mulitplying the equation with a unit normal vector $\b{\hat{n}}$&lt;br /&gt;
\[\frac{\Delta t}{\rho }\frac{\partial {p}^{corr}}{\partial \b{\hat{n}}} = \b{\hat{n}} \cdot \left(\b{v}^{iter} - \b{v}^{BC} \right) \]&lt;br /&gt;
The most straightforward approach, for dirichlet BCs, is to take into account velocity boundary condition in computation of intermediate velocity, and clearly in such cases, pressure boundary condition simplifies to &lt;br /&gt;
\[\frac{\partial p^{corr}}{\partial \b{\hat{n}}} = 0 \]&lt;br /&gt;
As ${{\b{v}}^{\operatorname{int}er}}={{\b{v}}^{BC}}$ . Another option is to explicitely compute intermediate velocity also on boundaries and then correct it through pressure correction.&lt;br /&gt;
&lt;br /&gt;
The pressure poisson equation is, at given boundary conditions, defined only up to a constant. One solution is to select a node and set it to a constant, e.g. p(0, 0) = 0, however much more stable approach is to enforce solution with additional condition, also referred to as a regularization&lt;br /&gt;
	\[\int_{\Omega }^{{}}{pd}\Omega =0\]&lt;br /&gt;
\[\,{{\nabla }^{2}}{{p}^{corr}}\,-\alpha =\frac{\rho }{\Delta t}\nabla \cdot {{\b{v}}^{iter}}\,\]&lt;br /&gt;
Where $\alpha $ stands for Lagrange multiplier. Or in discrete form&lt;br /&gt;
	\[\sum\limits_{i}{p\left( {{x}_{i}} \right)=0}\]&lt;br /&gt;
	\[\b{Mp}-\alpha \b{1}=\frac{\rho }{\Delta t}\nabla \cdot {{\b{v}}^{iter}}\]&lt;br /&gt;
&lt;br /&gt;
where $\b{M}$ holds Laplace shape functions, i.e. the discrete version of Laplace differential operator. &lt;br /&gt;
&lt;br /&gt;
Solution of a system&lt;br /&gt;
&lt;br /&gt;
	\[\left[ \begin{matrix}&lt;br /&gt;
   {{M}_{11}} &amp;amp; .. &amp;amp; {{M}_{1n}} &amp;amp; 1  \\&lt;br /&gt;
   .. &amp;amp; .. &amp;amp; .. &amp;amp; 1  \\&lt;br /&gt;
   {{M}_{n1}} &amp;amp; ... &amp;amp; {{M}_{nn}} &amp;amp; 1  \\&lt;br /&gt;
   1 &amp;amp; 1 &amp;amp; 1 &amp;amp; 0  \\&lt;br /&gt;
\end{matrix} \right]\left[ \begin{matrix}&lt;br /&gt;
   {{p}_{1}}  \\&lt;br /&gt;
   ...  \\&lt;br /&gt;
   {{p}_{n}}  \\&lt;br /&gt;
   \alpha   \\&lt;br /&gt;
\end{matrix} \right]=\frac{\rho }{\Delta t}\left[ \begin{matrix}&lt;br /&gt;
   \nabla \cdot \b{v}_{_{1}}^{\text{iter}}  \\&lt;br /&gt;
   ...  \\&lt;br /&gt;
   \nabla \cdot \b{v}_{n}^{\text{iter}}  \\&lt;br /&gt;
   0  \\&lt;br /&gt;
\end{matrix} \right]\]&lt;br /&gt;
Gives us a solution of pressure correction.&lt;br /&gt;
&lt;br /&gt;
== CBS Algorithm ==&lt;br /&gt;
With explicit temporal discretization problem is formulated as&lt;br /&gt;
\[\b{\hat{v}}={{\b{v}}_{0}}+\Delta t\left( -\nabla {{p}_{0}}+\frac{1}{Re}{{\nabla }^{2}}{{\b{v}}_{0}}-\nabla \cdot ({{\b{v}}_{0}}{{\b{v}}_{0}}) \right)\]&lt;br /&gt;
\[p={{p}_{0}}-\xi \Delta {{t}_{F}}\nabla \b{\hat{v}}+\xi \Delta {{t}_{F}}\Delta t{{\nabla }^{2}}{{\overset{\scriptscriptstyle\frown}{P}}_{0}},\]&lt;br /&gt;
where $\b{\hat{v}}$, $\Delta t$, $\xi$ and $\Delta t_F$ stand for intermediate velocity, time step, relaxation parameter, and artificial time step, respectively, and index 0 stands for previous time / iteration step. First, the intermediate velocity is computed from previous time step. Second, the velocity is driven towards solenoidal field by correcting the pressure. Note that no special boundary conditions for pressure are used, i.e., the pressure on boundaries is computed with the same approach as in the interior of the domain. In general, the internal iteration with an artificial time step is required until the divergence of the velocity field is not below required criteria. However, if one is interested only in a steady-state solution, the internal iteration can be skipped and $\Delta t$ equals $\Delta {{t}_{F}}$. Without internal stepping the transient of the solution is distorted by artificial compressibility effect. This approach is also known as ACM with Characteristics-based discretization of continuity equation, where the relaxation parameter relates to the artificial speed of sound [35].&lt;br /&gt;
&lt;br /&gt;
The relaxation parameter should be set between 1-10, lower number more stable solution.&lt;br /&gt;
&lt;br /&gt;
And also dimensional form&lt;br /&gt;
&lt;br /&gt;
\[p={{p}_{0}}-{{C}^{2}}\Delta {{t}_{F}}\rho \nabla \b{\hat{v}}+{{C}^{2}}\Delta {{t}_{F}}\Delta t{{\nabla }^{2}}{{p}_{0}},\]&lt;br /&gt;
&lt;br /&gt;
Where C is speed of sound [m/s]&lt;br /&gt;
&lt;br /&gt;
== The Stream Function - Vorticity Approach ==&lt;br /&gt;
&lt;br /&gt;
In two dimensions, the Navier–Stokes equations can be expressed using the&lt;br /&gt;
stream function $\psi$ and the vorticity $\omega$ in place of the primitive variables $u$, $v$, and&lt;br /&gt;
$p$. This involves the elimination of the pressure $p$, thus yielding one dependent&lt;br /&gt;
variable less. In three dimensions, however, this formulation leads to six unknowns&lt;br /&gt;
rather than four (in primitive variables), which makes this approach less attractive&lt;br /&gt;
for that case.&lt;br /&gt;
&lt;br /&gt;
In the following, we briefly derive the resulting two-dimensional equations for&lt;br /&gt;
$\psi$ and $\omega$. We begin by considering the momentum equations:&lt;br /&gt;
\begin{align}&lt;br /&gt;
\frac{\partial u}{\partial t} + u \frac{\partial u}{\partial x} + v \frac{\partial u}{\partial y}&amp;amp; = -\frac{1}{\rho}\frac{\partial p}{\partial x} + \nu \left(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2}\right) + g_x \\&lt;br /&gt;
\frac{\partial v}{\partial t} + u \frac{\partial v}{\partial x} + v \frac{\partial v}{\partial y}&amp;amp; = -\frac{1}{\rho}\frac{\partial p}{\partial y} + \nu \left(\frac{\partial^2 v}{\partial x^2} + \frac{\partial^2 v}{\partial y^2}\right) + g_y&lt;br /&gt;
\end{align}&lt;br /&gt;
from which we can eliminate the pressure by differentiating the first equation by $y$ and the second by $x$, subtracting the second from the first and then substituting the definition for the vorticity $\omega = \partial u / \partial y - \partial v / \partial x$. In this manner we obtain the equation:&lt;br /&gt;
\[\frac{\partial \omega}{\partial t} + \frac{\partial u}{\partial x} \omega + u \frac{\partial \omega}{\partial x} + \frac{\partial v}{\partial y}\omega + v \frac{\partial \omega}{\partial y} = \nu \left(\frac{\partial^2 \omega}{\partial x^2} + \frac{\partial^2 \omega}{\partial y^2}\right) + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)\]&lt;br /&gt;
&lt;br /&gt;
We can get rid of the terms containing $\partial u / \partial x$ and $\partial v / \partial y$ by using the continuity equation \eqref{contuinity}. Finally using the definition for the stream function $\partial \psi / \partial y = u$ and $\partial \psi / \partial x = -v$ we can transform the above equation to what is known as the ''vorticity transport equation'':&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + \frac{\partial \psi}{\partial y}\frac{\partial \omega}{\partial x} - \frac{\partial \psi}{\partial x}\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\label{vorticity_transport}&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
Another equation is obtained by inserting the definition of the stream function into that of the vorticity:&lt;br /&gt;
\[\omega = \frac{\partial u}{\partial y} - \frac{\partial v}{\partial x} = \frac{\partial}{\partial y}\left(\frac{\partial \psi}{\partial y}\right) + \frac{\partial }{\partial x}\left(\frac{\partial \psi}{\partial x}\right) = \Delta \psi\]&lt;br /&gt;
leading to the ''Poisson equation for the stream function''&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\label{poisson_stream}&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The two equations (\ref{vorticity_transport}) and (\ref{poisson_stream}) form a nonlinear coupled system of equations in which pressure has been eliminated and in which the continuity equation has been satisfied automatically.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Fluid_Mechanics&amp;diff=1730</id>
		<title>Fluid Mechanics</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Fluid_Mechanics&amp;diff=1730"/>
				<updated>2017-12-11T00:17:38Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* The Stream Function - Vorticity Approach */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Computational fluid dynamics (CFD) is a field of a great interest among researchers in many fields of science, e.g. studying mathematical fundaments of numerical methods, developing novel physical models, improving computer implementations, and many others. Pushing the limits of all involved fields of science helps community to deepen the understanding of several natural and technological phenomena. Weather forecast, ocean dynamics, water transport, casting, various energetic studies, etc., are just few examples where fluid dynamics plays a crucial role. The core problem of the CFD is solving the Navier-Stokes Equation or its variants, e.g. Darcy or Brinkman equation for flow in porous media. Here, we discuss basic algorithms for solving CFD problems. Check reference list on the [[Main Page]] for more details about related work.&lt;br /&gt;
&lt;br /&gt;
Long story short, we want to solve&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \b{v}}{\partial t}+\nabla \cdot \left( \rho \b{vv}\right)=-\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f}&lt;br /&gt;
\label{NavierStokes}&lt;br /&gt;
\end{equation}&lt;br /&gt;
also known as a Navier-Stokes equation. In many cases we are interested in the incompressible fluids (Ma&amp;lt;0.3), reducing the continuity equation to&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\nabla \cdot \b{v}=0&lt;br /&gt;
\label{contuinity}&lt;br /&gt;
\end{equation}&lt;br /&gt;
which implies a simplification&lt;br /&gt;
&lt;br /&gt;
\[\frac{\partial \left( \rho \b{v} \right)}{\partial t}+\nabla \cdot \left( \rho \b{vv} \right)=\frac{\partial \left( \rho \b{v} \right)}{\partial t}+(\rho \b{v}\cdot \nabla )\cdot \b{v}. \]&lt;br /&gt;
&lt;br /&gt;
Note that the $\b{v}\b{v}$ stands for the tensor or dyadic product \[ \b{v}\b{v} = \b{v}\otimes\b{v} = \b{v}\b{v}^\T = \left[ \begin{matrix}&lt;br /&gt;
   {{v}_{1}}{{v}_{1}} &amp;amp; \cdots &amp;amp; {{v}_{1}}{{v}_{n}}  \\&lt;br /&gt;
   \vdots &amp;amp; \ddots &amp;amp; \vdots  \\&lt;br /&gt;
   {{v}_{n}}{{v}_{1}} &amp;amp; \cdots &amp;amp; {{v}_{n}}{{v}_{n}}  \\&lt;br /&gt;
\end{matrix} \right]\]&lt;br /&gt;
An example of incompressible variant of advection term in 2D would therefore be&lt;br /&gt;
\[\left( \b{v}\cdot \nabla  \right)\b{v}=\left( \left( \begin{matrix}&lt;br /&gt;
   u  \\&lt;br /&gt;
   v  \\&lt;br /&gt;
\end{matrix} \right) \cdot \left( \begin{matrix}&lt;br /&gt;
   \frac{\partial }{\partial x}  \\&lt;br /&gt;
   \frac{\partial }{\partial y}  \\&lt;br /&gt;
\end{matrix} \right) \right)\left( \begin{matrix}&lt;br /&gt;
   u  \\&lt;br /&gt;
   v  \\&lt;br /&gt;
\end{matrix} \right)=\left( \begin{matrix}&lt;br /&gt;
   u\frac{\partial u}{\partial x}+v\frac{\partial u}{\partial y}  \\&lt;br /&gt;
   u\frac{\partial v}{\partial x}+v\frac{\partial v}{\partial y}  \\&lt;br /&gt;
\end{matrix} \right)\]&lt;br /&gt;
&lt;br /&gt;
The goal of CFD is to solve system \ref{NavierStokes} and \ref{contuinity}. It is obvious that a special treatment will be needed to couple both equations. In following discussion we cover some basic approaches, how this can be accomplished.&lt;br /&gt;
&lt;br /&gt;
= Numerical examples =&lt;br /&gt;
== [[Lid driven cavity]] ==&lt;br /&gt;
== [[de Vahl Davis natural convection test]] ==&lt;br /&gt;
&lt;br /&gt;
= Solutions algorithms =&lt;br /&gt;
== Artificial compressibility method ==&lt;br /&gt;
The simplest, completely explicit approach, is an artificial compressibility method (ACM), where a compressibility term is included in the mass continuity&lt;br /&gt;
\[\frac{\partial \b{v}}{\partial t}+(\b{v}\cdot\nabla )\b{v}=-\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f}\]&lt;br /&gt;
\[\frac{ 1 }{ \rho } \frac{\partial \rho }{\partial t}+\nabla \cdot \b{v}=0\]&lt;br /&gt;
\[\frac{ 1 }{ \rho } \frac{\partial \rho }{\partial p}\frac{\partial p}{\partial t}+\nabla \cdot \b{v}=0\]&lt;br /&gt;
Now, the above system can be solved directly.&lt;br /&gt;
&lt;br /&gt;
The addition of the time derivative of the pressure term physically means that waves of finite speed (the propagation of which depends on the magnitude of the ACM)&lt;br /&gt;
are introduced into the flow field as a mean to distribute the pressure within the domain. In a true&lt;br /&gt;
incompressible flow, the pressure field is affected instantaneously throughout the whole domain. In ACM there is a time delay between the flow disturbance and its effect on the&lt;br /&gt;
pressure field. Upon rearranging the equation yields&lt;br /&gt;
\[\frac{\partial p}{\partial t}+\rho {{C}^{2}}\nabla \cdot \b{v}=0\]&lt;br /&gt;
where the continuity equation is perturbed by the quantity $\frac{\partial p}{\partial t}$ denominated herein&lt;br /&gt;
as the AC parameter/artificial sound speed recognized by&lt;br /&gt;
$C$ [m/s] - speed of sound&lt;br /&gt;
\[\frac{1}{C^2}=\frac{\partial \rho }{\partial p}\]&lt;br /&gt;
Or in another words&lt;br /&gt;
\[C^2=\left( \frac{\partial p}{\partial \rho}\right)_S\]&lt;br /&gt;
where $\rho$ is the density of the material. It follows, by replacing partial derivatives, that the isentropic compressibility can be expressed as:&lt;br /&gt;
\[\beta =\frac{1}{\rho {{C}^{2}}}\]&lt;br /&gt;
The evaluation of the local ACM parameter in incompressible flows is inspired by the&lt;br /&gt;
speed of sound computations in compressible flows (for instance, from the perfect gas law).&lt;br /&gt;
However, in the incompressible flow situation, employing such a relation is difficult, but an artificial&lt;br /&gt;
relation can be developed from the convective and diffusive velocities.&lt;br /&gt;
Reverting to the justification of continuity modification, it can be immediately seen that the&lt;br /&gt;
artificial sound speed must be sufficiently large to have a significant regularizing effect and at&lt;br /&gt;
the same time must be as small as possible to minimizing perturbations on the incompressibility&lt;br /&gt;
equation.  Therefore, $C$ influences the convergence rate and stability of the solution method. In other words,&lt;br /&gt;
assists in reducing large disparity in the eigenvalues, leading to a well-conditioned system. &lt;br /&gt;
The $C$ can be '''estimated''' with&lt;br /&gt;
&lt;br /&gt;
\[ C = \beta \max \left( \left|\b{v}\right|_2, \left|\b{v}_{ref}\right|_2 \right),\]&lt;br /&gt;
where $\b{v}_{ref}$ stands for a reference velocity. &lt;br /&gt;
Values for $\beta$ in the range of 1–10 are recommended for better convergence to the steady state at which the&lt;br /&gt;
mass conservation is enforced. In addition, Equation ensures that $C$ does not reach zero at stagnation points&lt;br /&gt;
that cause instabilities in pseudo-time, effecting convergence&lt;br /&gt;
&lt;br /&gt;
Note, that for more complex simulation an internal iteration loops is required before marching in time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;ACM&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ACM BlockDiagram.png|600px]]&lt;br /&gt;
&amp;lt;caption&amp;gt;Scheme of the ACM algorithm &amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Explicit/Implicit pressure calculation ==&lt;br /&gt;
&lt;br /&gt;
Applying divergence on \ref{NavierStokes} yields&lt;br /&gt;
\[\nabla \cdot \frac{\partial \b{v}}{\partial t}+\nabla \cdot (\b{v}\cdot \nabla )\b{v}=-\frac{1}{\rho }{{\nabla }^{2}}p+\nabla \cdot \nu {{\nabla }^{2}}\b{v}+\nabla \cdot \b{f}\]&lt;br /&gt;
&lt;br /&gt;
And since $\nabla \cdot \b{v}=0$ and we can change order in $\nabla \cdot \nabla^2$ and $ \nabla^2 \cdot \nabla$ equation simplifies to&lt;br /&gt;
\[\frac{1}{\rho }{{\nabla }^{2}}p=\nabla \cdot \b{f}-\nabla \cdot (\b{v}\cdot \nabla )\b{v}\]&lt;br /&gt;
Now, we need boundary conditions that can be obtained by multiplying the equation  with a boundary normal vector&lt;br /&gt;
\[\b{\hat{n}}\cdot \left( \frac{\partial \b{v}}{\partial t}+(\b{v}\cdot \nabla )\b{v} \right)=\b{\hat{n}}\cdot \left( -\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{n}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f}-\frac{\partial \b{v}}{\partial t}-(\b{v}\cdot\nabla ) \b{v} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
&lt;br /&gt;
Note that using tangential boundary vector gives equivalent BCs&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{t}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f}-\frac{\partial \b{v}}{\partial t}-(\b{v}\cdot\nabla ) \b{v} \right)\cdot \b{\hat{t}}\]&lt;br /&gt;
For no-slip boundaries BCs simplify to&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{n}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
Otherwise an appropriate expression regarding the velocity can be written, i.e. write full  and taken in account velocity BCs. For example, Neumann velocity $\frac{\partial u}{\partial x}=0$ in 2D&lt;br /&gt;
\[\frac{\partial p}{\partial x}=\left( \nu {{\nabla }^{2}}u + {{f}_{x}}-\frac{\partial u}{\partial t}+v\frac{\partial u}{\partial y} \right)\]&lt;br /&gt;
Note that you allready know everything about the velocity and thus you can compute all the terms explicitely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So the procedure is:&lt;br /&gt;
&lt;br /&gt;
* Compute Navier Stokes either explicitly or implicitly&lt;br /&gt;
* Solve pressure equations with  computed velocities&lt;br /&gt;
* March in time&lt;br /&gt;
&lt;br /&gt;
Basic boundary conditions&lt;br /&gt;
Wall:   $\b{v}=0$, \[\frac{\partial p}{\partial \hat{n}}=\left( \nabla \cdot \left( \nu \nabla \b{v} \right)+\b{f} \right)\cdot \hat{n}\]&lt;br /&gt;
Inlet:  $\b{v}=\b{a}$, \[\frac{\partial p}{\partial \hat{n}}=\left( \nabla \cdot \left( \nu \nabla \b{v} \right)+\b{f}-\nabla \cdot (\rho \b{v}\b{v})-\rho \frac{\partial \b{v}}{\partial t} \right)\cdot \hat{n}\]&lt;br /&gt;
&lt;br /&gt;
Above system can be linearized (advection term) and solved either explicitly or implicitly.&lt;br /&gt;
&lt;br /&gt;
Further reading:&lt;br /&gt;
&lt;br /&gt;
W. D. Henshaw, A fourth-order accurate method for the incompressible Navier–Stokes equations on overlapping grids, J. Comput. Phys. 113, 13 (1994)&lt;br /&gt;
&lt;br /&gt;
J. C. Strikwerda, Finite difference methods for the Stokes and Navier–Stokes equations, SIAM J. Sci. Stat.&lt;br /&gt;
Comput. 5(1), 56 (1984)&lt;br /&gt;
&lt;br /&gt;
== Explicit Pressure correction ==&lt;br /&gt;
Another possibility is to solve pressure correction equation. Again Consider the momentum equation and mass continuity and discretize it explicitly&lt;br /&gt;
\[\frac{{{\b{v}}_{2}}-{{\b{v}}_{1}}}{\Delta t}=-\frac{1}{\rho }\nabla {{p}_{1}}-({{\b{v}}_{1}}\nabla )\cdot {{\b{v}}_{1}}+\nu {{\nabla }^{2}}{{\b{v}}_{1}}+\b{f}\]&lt;br /&gt;
Computed velocity obviously does not satisfy the mass contunity and therefore let’s call it intermediate velocity. Intermediate velocity is calculated from guessed pressure and old velocity values.&lt;br /&gt;
\[{{\b{v}}^{inter}}=\b{v}_1 + \Delta t\left( -\frac{1}{\rho }\nabla {{p}_{1}}-({{\b{v}}_{1}}\nabla )\cdot {{\b{v}}_{1}}+\nu {{\nabla }^{2}}{{\b{v}}_{1}}+\b{f} \right)\]&lt;br /&gt;
A correction term is added that drives velocity to divergence free field&lt;br /&gt;
\[\nabla \cdot ({{\b{v}}^{inter}}+{{\b{v}}^{corr}})=0 \qquad \to \qquad \nabla \cdot {{\b{v}}^{inter}}=-\nabla \cdot {{\b{v}}^{corr}}\]&lt;br /&gt;
&lt;br /&gt;
Velocity correction is affected only by effect of pressure correction. This fact is obvious due to all terms except gradient of pressure on the right side of equation  are constant.&lt;br /&gt;
\[{{\b{v}}^{corr}}=-\frac{\Delta t}{\rho }\nabla {{p}^{corr}} \]&lt;br /&gt;
&lt;br /&gt;
Note that corrected velocity also satisfies boundary conditions&lt;br /&gt;
\[\b{v}^{iter}+\b{v}^{corr}=\b{v}^{BC}\]&lt;br /&gt;
Applying divergence  and  we get '''pressure correction poisson equation'''.&lt;br /&gt;
\[\,{{\nabla }^{2}}{{p}^{corr}}\,=\frac{\rho }{\Delta t}\nabla \cdot {{\mathbf{v}}^{iter}}\,\]&lt;br /&gt;
&lt;br /&gt;
Boundary conditions can be obtained by mulitplying the equation with a unit normal vector $\b{\hat{n}}$&lt;br /&gt;
\[\frac{\Delta t}{\rho }\frac{\partial {p}^{corr}}{\partial \b{\hat{n}}} = \b{\hat{n}} \cdot \left(\b{v}^{iter} - \b{v}^{BC} \right) \]&lt;br /&gt;
The most straightforward approach, for dirichlet BCs, is to take into account velocity boundary condition in computation of intermediate velocity, and clearly in such cases, pressure boundary condition simplifies to &lt;br /&gt;
\[\frac{\partial p^{corr}}{\partial \b{\hat{n}}} = 0 \]&lt;br /&gt;
As ${{\b{v}}^{\operatorname{int}er}}={{\b{v}}^{BC}}$ . Another option is to explicitely compute intermediate velocity also on boundaries and then correct it through pressure correction.&lt;br /&gt;
&lt;br /&gt;
The pressure poisson equation is, at given boundary conditions, defined only up to a constant. One solution is to select a node and set it to a constant, e.g. p(0, 0) = 0, however much more stable approach is to enforce solution with additional condition, also referred to as a regularization&lt;br /&gt;
	\[\int_{\Omega }^{{}}{pd}\Omega =0\]&lt;br /&gt;
\[\,{{\nabla }^{2}}{{p}^{corr}}\,-\alpha =\frac{\rho }{\Delta t}\nabla \cdot {{\b{v}}^{iter}}\,\]&lt;br /&gt;
Where $\alpha $ stands for Lagrange multiplier. Or in discrete form&lt;br /&gt;
	\[\sum\limits_{i}{p\left( {{x}_{i}} \right)=0}\]&lt;br /&gt;
	\[\b{Mp}-\alpha \b{1}=\frac{\rho }{\Delta t}\nabla \cdot {{\b{v}}^{iter}}\]&lt;br /&gt;
&lt;br /&gt;
where $\b{M}$ holds Laplace shape functions, i.e. the discrete version of Laplace differential operator. &lt;br /&gt;
&lt;br /&gt;
Solution of a system&lt;br /&gt;
&lt;br /&gt;
	\[\left[ \begin{matrix}&lt;br /&gt;
   {{M}_{11}} &amp;amp; .. &amp;amp; {{M}_{1n}} &amp;amp; 1  \\&lt;br /&gt;
   .. &amp;amp; .. &amp;amp; .. &amp;amp; 1  \\&lt;br /&gt;
   {{M}_{n1}} &amp;amp; ... &amp;amp; {{M}_{nn}} &amp;amp; 1  \\&lt;br /&gt;
   1 &amp;amp; 1 &amp;amp; 1 &amp;amp; 0  \\&lt;br /&gt;
\end{matrix} \right]\left[ \begin{matrix}&lt;br /&gt;
   {{p}_{1}}  \\&lt;br /&gt;
   ...  \\&lt;br /&gt;
   {{p}_{n}}  \\&lt;br /&gt;
   \alpha   \\&lt;br /&gt;
\end{matrix} \right]=\frac{\rho }{\Delta t}\left[ \begin{matrix}&lt;br /&gt;
   \nabla \cdot \b{v}_{_{1}}^{\text{iter}}  \\&lt;br /&gt;
   ...  \\&lt;br /&gt;
   \nabla \cdot \b{v}_{n}^{\text{iter}}  \\&lt;br /&gt;
   0  \\&lt;br /&gt;
\end{matrix} \right]\]&lt;br /&gt;
Gives us a solution of pressure correction.&lt;br /&gt;
&lt;br /&gt;
== CBS Algorithm ==&lt;br /&gt;
With explicit temporal discretization problem is formulated as&lt;br /&gt;
\[\b{\hat{v}}={{\b{v}}_{0}}+\Delta t\left( -\nabla {{p}_{0}}+\frac{1}{Re}{{\nabla }^{2}}{{\b{v}}_{0}}-\nabla \cdot ({{\b{v}}_{0}}{{\b{v}}_{0}}) \right)\]&lt;br /&gt;
\[p={{p}_{0}}-\xi \Delta {{t}_{F}}\nabla \b{\hat{v}}+\xi \Delta {{t}_{F}}\Delta t{{\nabla }^{2}}{{\overset{\scriptscriptstyle\frown}{P}}_{0}},\]&lt;br /&gt;
where $\b{\hat{v}}$, $\Delta t$, $\xi$ and $\Delta t_F$ stand for intermediate velocity, time step, relaxation parameter, and artificial time step, respectively, and index 0 stands for previous time / iteration step. First, the intermediate velocity is computed from previous time step. Second, the velocity is driven towards solenoidal field by correcting the pressure. Note that no special boundary conditions for pressure are used, i.e., the pressure on boundaries is computed with the same approach as in the interior of the domain. In general, the internal iteration with an artificial time step is required until the divergence of the velocity field is not below required criteria. However, if one is interested only in a steady-state solution, the internal iteration can be skipped and $\Delta t$ equals $\Delta {{t}_{F}}$. Without internal stepping the transient of the solution is distorted by artificial compressibility effect. This approach is also known as ACM with Characteristics-based discretization of continuity equation, where the relaxation parameter relates to the artificial speed of sound [35].&lt;br /&gt;
&lt;br /&gt;
The relaxation parameter should be set between 1-10, lower number more stable solution.&lt;br /&gt;
&lt;br /&gt;
And also dimensional form&lt;br /&gt;
&lt;br /&gt;
\[p={{p}_{0}}-{{C}^{2}}\Delta {{t}_{F}}\rho \nabla \b{\hat{v}}+{{C}^{2}}\Delta {{t}_{F}}\Delta t{{\nabla }^{2}}{{p}_{0}},\]&lt;br /&gt;
&lt;br /&gt;
Where C is speed of sound [m/s]&lt;br /&gt;
&lt;br /&gt;
== The Stream Function - Vorticity Approach ==&lt;br /&gt;
&lt;br /&gt;
In two dimensions, the Navier–Stokes equations can be expressed using the&lt;br /&gt;
stream function $\psi$ and the vorticity $\omega$ in place of the primitive variables $u$, $v$, and&lt;br /&gt;
$p$. This involves the elimination of the pressure $p$, thus yielding one dependent&lt;br /&gt;
variable less. In three dimensions, however, this formulation leads to six unknowns&lt;br /&gt;
rather than four (in primitive variables), which makes this approach less attractive&lt;br /&gt;
for that case.&lt;br /&gt;
&lt;br /&gt;
In the following, we briefly derive the resulting two-dimensional equations for&lt;br /&gt;
$\psi$ and $\omega$. We begin by considering the momentum equations:&lt;br /&gt;
\begin{align}&lt;br /&gt;
\frac{\partial u}{\partial t} + u \frac{\partial u}{\partial x} + v \frac{\partial u}{\partial y}&amp;amp; = -\frac{1}{\rho}\frac{\partial p}{\partial x} + \nu \left(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2}\right) + g_x \\&lt;br /&gt;
\frac{\partial v}{\partial t} + u \frac{\partial v}{\partial x} + v \frac{\partial v}{\partial y}&amp;amp; = -\frac{1}{\rho}\frac{\partial p}{\partial y} + \nu \left(\frac{\partial^2 v}{\partial x^2} + \frac{\partial^2 v}{\partial y^2}\right) + g_y&lt;br /&gt;
\end{align}&lt;br /&gt;
from which we can eliminate the pressure by differentiating the first equation by $y$ and the second by $x$, subtracting the second from the first and then substituting the definition for the vorticity $\omega = \partial u / \partial y - \partial v / \partial x$. In this manner we obtain the equation:&lt;br /&gt;
\[\frac{\partial \omega}{\partial t} + \frac{\partial u}{\partial x} \omega + u \frac{\partial \omega}{\partial x} + \frac{\partial v}{\partial y}\omega + v \frac{\partial \omega}{\partial y} = \nu \left(\frac{\partial^2 \omega}{\partial x^2} + \frac{\partial^2 \omega}{\partial y^2}\right) + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)\]&lt;br /&gt;
&lt;br /&gt;
We can get rid of the terms containing $\partial u / \partial x$ and $\partial v / \partial y$ by using the continuity equation \ref{contuinity}. Finally using the definition for the stream function $\partial \psi / \partial y = u$ and $\partial \psi / \partial x = -v$ we can transform the above equation to what is known as the ''vorticity transport equation'':&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + \frac{\partial \psi}{\partial y}\frac{\partial \omega}{\partial x} - \frac{\partial \psi}{\partial x}\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\label{vorticity_transport}&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
Another equation is obtained by inserting the definition of the stream function into that of the vorticity:&lt;br /&gt;
\[\omega = \frac{\partial u}{\partial y} - \frac{\partial v}{\partial x} = \frac{\partial}{\partial y}\frac{\partial \psi}{\partial y} + \frac{\partial }{\partial x}\frac{\partial \psi}{\partial x} = \Delta \psi\]&lt;br /&gt;
leading to the ''Poisson equation for the stream function''&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\label{poisson_stream}&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The two equations (\ref{vorticity_transport}) and (\ref{poisson_stream}) form a nonlinear coupled system of equations in which pressure has been eliminated and in which the continuity equation has been satisfied automatically.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Fluid_Mechanics&amp;diff=1729</id>
		<title>Fluid Mechanics</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Fluid_Mechanics&amp;diff=1729"/>
				<updated>2017-12-11T00:16:57Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* The Stream function - Vorticity approach */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Computational fluid dynamics (CFD) is a field of a great interest among researchers in many fields of science, e.g. studying mathematical fundaments of numerical methods, developing novel physical models, improving computer implementations, and many others. Pushing the limits of all involved fields of science helps community to deepen the understanding of several natural and technological phenomena. Weather forecast, ocean dynamics, water transport, casting, various energetic studies, etc., are just few examples where fluid dynamics plays a crucial role. The core problem of the CFD is solving the Navier-Stokes Equation or its variants, e.g. Darcy or Brinkman equation for flow in porous media. Here, we discuss basic algorithms for solving CFD problems. Check reference list on the [[Main Page]] for more details about related work.&lt;br /&gt;
&lt;br /&gt;
Long story short, we want to solve&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \b{v}}{\partial t}+\nabla \cdot \left( \rho \b{vv}\right)=-\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f}&lt;br /&gt;
\label{NavierStokes}&lt;br /&gt;
\end{equation}&lt;br /&gt;
also known as a Navier-Stokes equation. In many cases we are interested in the incompressible fluids (Ma&amp;lt;0.3), reducing the continuity equation to&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\nabla \cdot \b{v}=0&lt;br /&gt;
\label{contuinity}&lt;br /&gt;
\end{equation}&lt;br /&gt;
which implies a simplification&lt;br /&gt;
&lt;br /&gt;
\[\frac{\partial \left( \rho \b{v} \right)}{\partial t}+\nabla \cdot \left( \rho \b{vv} \right)=\frac{\partial \left( \rho \b{v} \right)}{\partial t}+(\rho \b{v}\cdot \nabla )\cdot \b{v}. \]&lt;br /&gt;
&lt;br /&gt;
Note that the $\b{v}\b{v}$ stands for the tensor or dyadic product \[ \b{v}\b{v} = \b{v}\otimes\b{v} = \b{v}\b{v}^\T = \left[ \begin{matrix}&lt;br /&gt;
   {{v}_{1}}{{v}_{1}} &amp;amp; \cdots &amp;amp; {{v}_{1}}{{v}_{n}}  \\&lt;br /&gt;
   \vdots &amp;amp; \ddots &amp;amp; \vdots  \\&lt;br /&gt;
   {{v}_{n}}{{v}_{1}} &amp;amp; \cdots &amp;amp; {{v}_{n}}{{v}_{n}}  \\&lt;br /&gt;
\end{matrix} \right]\]&lt;br /&gt;
An example of incompressible variant of advection term in 2D would therefore be&lt;br /&gt;
\[\left( \b{v}\cdot \nabla  \right)\b{v}=\left( \left( \begin{matrix}&lt;br /&gt;
   u  \\&lt;br /&gt;
   v  \\&lt;br /&gt;
\end{matrix} \right) \cdot \left( \begin{matrix}&lt;br /&gt;
   \frac{\partial }{\partial x}  \\&lt;br /&gt;
   \frac{\partial }{\partial y}  \\&lt;br /&gt;
\end{matrix} \right) \right)\left( \begin{matrix}&lt;br /&gt;
   u  \\&lt;br /&gt;
   v  \\&lt;br /&gt;
\end{matrix} \right)=\left( \begin{matrix}&lt;br /&gt;
   u\frac{\partial u}{\partial x}+v\frac{\partial u}{\partial y}  \\&lt;br /&gt;
   u\frac{\partial v}{\partial x}+v\frac{\partial v}{\partial y}  \\&lt;br /&gt;
\end{matrix} \right)\]&lt;br /&gt;
&lt;br /&gt;
The goal of CFD is to solve system \ref{NavierStokes} and \ref{contuinity}. It is obvious that a special treatment will be needed to couple both equations. In following discussion we cover some basic approaches, how this can be accomplished.&lt;br /&gt;
&lt;br /&gt;
= Numerical examples =&lt;br /&gt;
== [[Lid driven cavity]] ==&lt;br /&gt;
== [[de Vahl Davis natural convection test]] ==&lt;br /&gt;
&lt;br /&gt;
= Solutions algorithms =&lt;br /&gt;
== Artificial compressibility method ==&lt;br /&gt;
The simplest, completely explicit approach, is an artificial compressibility method (ACM), where a compressibility term is included in the mass continuity&lt;br /&gt;
\[\frac{\partial \b{v}}{\partial t}+(\b{v}\cdot\nabla )\b{v}=-\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f}\]&lt;br /&gt;
\[\frac{ 1 }{ \rho } \frac{\partial \rho }{\partial t}+\nabla \cdot \b{v}=0\]&lt;br /&gt;
\[\frac{ 1 }{ \rho } \frac{\partial \rho }{\partial p}\frac{\partial p}{\partial t}+\nabla \cdot \b{v}=0\]&lt;br /&gt;
Now, the above system can be solved directly.&lt;br /&gt;
&lt;br /&gt;
The addition of the time derivative of the pressure term physically means that waves of finite speed (the propagation of which depends on the magnitude of the ACM)&lt;br /&gt;
are introduced into the flow field as a mean to distribute the pressure within the domain. In a true&lt;br /&gt;
incompressible flow, the pressure field is affected instantaneously throughout the whole domain. In ACM there is a time delay between the flow disturbance and its effect on the&lt;br /&gt;
pressure field. Upon rearranging the equation yields&lt;br /&gt;
\[\frac{\partial p}{\partial t}+\rho {{C}^{2}}\nabla \cdot \b{v}=0\]&lt;br /&gt;
where the continuity equation is perturbed by the quantity $\frac{\partial p}{\partial t}$ denominated herein&lt;br /&gt;
as the AC parameter/artificial sound speed recognized by&lt;br /&gt;
$C$ [m/s] - speed of sound&lt;br /&gt;
\[\frac{1}{C^2}=\frac{\partial \rho }{\partial p}\]&lt;br /&gt;
Or in another words&lt;br /&gt;
\[C^2=\left( \frac{\partial p}{\partial \rho}\right)_S\]&lt;br /&gt;
where $\rho$ is the density of the material. It follows, by replacing partial derivatives, that the isentropic compressibility can be expressed as:&lt;br /&gt;
\[\beta =\frac{1}{\rho {{C}^{2}}}\]&lt;br /&gt;
The evaluation of the local ACM parameter in incompressible flows is inspired by the&lt;br /&gt;
speed of sound computations in compressible flows (for instance, from the perfect gas law).&lt;br /&gt;
However, in the incompressible flow situation, employing such a relation is difficult, but an artificial&lt;br /&gt;
relation can be developed from the convective and diffusive velocities.&lt;br /&gt;
Reverting to the justification of continuity modification, it can be immediately seen that the&lt;br /&gt;
artificial sound speed must be sufficiently large to have a significant regularizing effect and at&lt;br /&gt;
the same time must be as small as possible to minimizing perturbations on the incompressibility&lt;br /&gt;
equation.  Therefore, $C$ influences the convergence rate and stability of the solution method. In other words,&lt;br /&gt;
assists in reducing large disparity in the eigenvalues, leading to a well-conditioned system. &lt;br /&gt;
The $C$ can be '''estimated''' with&lt;br /&gt;
&lt;br /&gt;
\[ C = \beta \max \left( \left|\b{v}\right|_2, \left|\b{v}_{ref}\right|_2 \right),\]&lt;br /&gt;
where $\b{v}_{ref}$ stands for a reference velocity. &lt;br /&gt;
Values for $\beta$ in the range of 1–10 are recommended for better convergence to the steady state at which the&lt;br /&gt;
mass conservation is enforced. In addition, Equation ensures that $C$ does not reach zero at stagnation points&lt;br /&gt;
that cause instabilities in pseudo-time, effecting convergence&lt;br /&gt;
&lt;br /&gt;
Note, that for more complex simulation an internal iteration loops is required before marching in time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;ACM&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ACM BlockDiagram.png|600px]]&lt;br /&gt;
&amp;lt;caption&amp;gt;Scheme of the ACM algorithm &amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Explicit/Implicit pressure calculation ==&lt;br /&gt;
&lt;br /&gt;
Applying divergence on \ref{NavierStokes} yields&lt;br /&gt;
\[\nabla \cdot \frac{\partial \b{v}}{\partial t}+\nabla \cdot (\b{v}\cdot \nabla )\b{v}=-\frac{1}{\rho }{{\nabla }^{2}}p+\nabla \cdot \nu {{\nabla }^{2}}\b{v}+\nabla \cdot \b{f}\]&lt;br /&gt;
&lt;br /&gt;
And since $\nabla \cdot \b{v}=0$ and we can change order in $\nabla \cdot \nabla^2$ and $ \nabla^2 \cdot \nabla$ equation simplifies to&lt;br /&gt;
\[\frac{1}{\rho }{{\nabla }^{2}}p=\nabla \cdot \b{f}-\nabla \cdot (\b{v}\cdot \nabla )\b{v}\]&lt;br /&gt;
Now, we need boundary conditions that can be obtained by multiplying the equation  with a boundary normal vector&lt;br /&gt;
\[\b{\hat{n}}\cdot \left( \frac{\partial \b{v}}{\partial t}+(\b{v}\cdot \nabla )\b{v} \right)=\b{\hat{n}}\cdot \left( -\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{n}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f}-\frac{\partial \b{v}}{\partial t}-(\b{v}\cdot\nabla ) \b{v} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
&lt;br /&gt;
Note that using tangential boundary vector gives equivalent BCs&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{t}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f}-\frac{\partial \b{v}}{\partial t}-(\b{v}\cdot\nabla ) \b{v} \right)\cdot \b{\hat{t}}\]&lt;br /&gt;
For no-slip boundaries BCs simplify to&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{n}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
Otherwise an appropriate expression regarding the velocity can be written, i.e. write full  and taken in account velocity BCs. For example, Neumann velocity $\frac{\partial u}{\partial x}=0$ in 2D&lt;br /&gt;
\[\frac{\partial p}{\partial x}=\left( \nu {{\nabla }^{2}}u + {{f}_{x}}-\frac{\partial u}{\partial t}+v\frac{\partial u}{\partial y} \right)\]&lt;br /&gt;
Note that you allready know everything about the velocity and thus you can compute all the terms explicitely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So the procedure is:&lt;br /&gt;
&lt;br /&gt;
* Compute Navier Stokes either explicitly or implicitly&lt;br /&gt;
* Solve pressure equations with  computed velocities&lt;br /&gt;
* March in time&lt;br /&gt;
&lt;br /&gt;
Basic boundary conditions&lt;br /&gt;
Wall:   $\b{v}=0$, \[\frac{\partial p}{\partial \hat{n}}=\left( \nabla \cdot \left( \nu \nabla \b{v} \right)+\b{f} \right)\cdot \hat{n}\]&lt;br /&gt;
Inlet:  $\b{v}=\b{a}$, \[\frac{\partial p}{\partial \hat{n}}=\left( \nabla \cdot \left( \nu \nabla \b{v} \right)+\b{f}-\nabla \cdot (\rho \b{v}\b{v})-\rho \frac{\partial \b{v}}{\partial t} \right)\cdot \hat{n}\]&lt;br /&gt;
&lt;br /&gt;
Above system can be linearized (advection term) and solved either explicitly or implicitly.&lt;br /&gt;
&lt;br /&gt;
Further reading:&lt;br /&gt;
&lt;br /&gt;
W. D. Henshaw, A fourth-order accurate method for the incompressible Navier–Stokes equations on overlapping grids, J. Comput. Phys. 113, 13 (1994)&lt;br /&gt;
&lt;br /&gt;
J. C. Strikwerda, Finite difference methods for the Stokes and Navier–Stokes equations, SIAM J. Sci. Stat.&lt;br /&gt;
Comput. 5(1), 56 (1984)&lt;br /&gt;
&lt;br /&gt;
== Explicit Pressure correction ==&lt;br /&gt;
Another possibility is to solve pressure correction equation. Again Consider the momentum equation and mass continuity and discretize it explicitly&lt;br /&gt;
\[\frac{{{\b{v}}_{2}}-{{\b{v}}_{1}}}{\Delta t}=-\frac{1}{\rho }\nabla {{p}_{1}}-({{\b{v}}_{1}}\nabla )\cdot {{\b{v}}_{1}}+\nu {{\nabla }^{2}}{{\b{v}}_{1}}+\b{f}\]&lt;br /&gt;
Computed velocity obviously does not satisfy the mass contunity and therefore let’s call it intermediate velocity. Intermediate velocity is calculated from guessed pressure and old velocity values.&lt;br /&gt;
\[{{\b{v}}^{inter}}=\b{v}_1 + \Delta t\left( -\frac{1}{\rho }\nabla {{p}_{1}}-({{\b{v}}_{1}}\nabla )\cdot {{\b{v}}_{1}}+\nu {{\nabla }^{2}}{{\b{v}}_{1}}+\b{f} \right)\]&lt;br /&gt;
A correction term is added that drives velocity to divergence free field&lt;br /&gt;
\[\nabla \cdot ({{\b{v}}^{inter}}+{{\b{v}}^{corr}})=0 \qquad \to \qquad \nabla \cdot {{\b{v}}^{inter}}=-\nabla \cdot {{\b{v}}^{corr}}\]&lt;br /&gt;
&lt;br /&gt;
Velocity correction is affected only by effect of pressure correction. This fact is obvious due to all terms except gradient of pressure on the right side of equation  are constant.&lt;br /&gt;
\[{{\b{v}}^{corr}}=-\frac{\Delta t}{\rho }\nabla {{p}^{corr}} \]&lt;br /&gt;
&lt;br /&gt;
Note that corrected velocity also satisfies boundary conditions&lt;br /&gt;
\[\b{v}^{iter}+\b{v}^{corr}=\b{v}^{BC}\]&lt;br /&gt;
Applying divergence  and  we get '''pressure correction poisson equation'''.&lt;br /&gt;
\[\,{{\nabla }^{2}}{{p}^{corr}}\,=\frac{\rho }{\Delta t}\nabla \cdot {{\mathbf{v}}^{iter}}\,\]&lt;br /&gt;
&lt;br /&gt;
Boundary conditions can be obtained by mulitplying the equation with a unit normal vector $\b{\hat{n}}$&lt;br /&gt;
\[\frac{\Delta t}{\rho }\frac{\partial {p}^{corr}}{\partial \b{\hat{n}}} = \b{\hat{n}} \cdot \left(\b{v}^{iter} - \b{v}^{BC} \right) \]&lt;br /&gt;
The most straightforward approach, for dirichlet BCs, is to take into account velocity boundary condition in computation of intermediate velocity, and clearly in such cases, pressure boundary condition simplifies to &lt;br /&gt;
\[\frac{\partial p^{corr}}{\partial \b{\hat{n}}} = 0 \]&lt;br /&gt;
As ${{\b{v}}^{\operatorname{int}er}}={{\b{v}}^{BC}}$ . Another option is to explicitely compute intermediate velocity also on boundaries and then correct it through pressure correction.&lt;br /&gt;
&lt;br /&gt;
The pressure poisson equation is, at given boundary conditions, defined only up to a constant. One solution is to select a node and set it to a constant, e.g. p(0, 0) = 0, however much more stable approach is to enforce solution with additional condition, also referred to as a regularization&lt;br /&gt;
	\[\int_{\Omega }^{{}}{pd}\Omega =0\]&lt;br /&gt;
\[\,{{\nabla }^{2}}{{p}^{corr}}\,-\alpha =\frac{\rho }{\Delta t}\nabla \cdot {{\b{v}}^{iter}}\,\]&lt;br /&gt;
Where $\alpha $ stands for Lagrange multiplier. Or in discrete form&lt;br /&gt;
	\[\sum\limits_{i}{p\left( {{x}_{i}} \right)=0}\]&lt;br /&gt;
	\[\b{Mp}-\alpha \b{1}=\frac{\rho }{\Delta t}\nabla \cdot {{\b{v}}^{iter}}\]&lt;br /&gt;
&lt;br /&gt;
where $\b{M}$ holds Laplace shape functions, i.e. the discrete version of Laplace differential operator. &lt;br /&gt;
&lt;br /&gt;
Solution of a system&lt;br /&gt;
&lt;br /&gt;
	\[\left[ \begin{matrix}&lt;br /&gt;
   {{M}_{11}} &amp;amp; .. &amp;amp; {{M}_{1n}} &amp;amp; 1  \\&lt;br /&gt;
   .. &amp;amp; .. &amp;amp; .. &amp;amp; 1  \\&lt;br /&gt;
   {{M}_{n1}} &amp;amp; ... &amp;amp; {{M}_{nn}} &amp;amp; 1  \\&lt;br /&gt;
   1 &amp;amp; 1 &amp;amp; 1 &amp;amp; 0  \\&lt;br /&gt;
\end{matrix} \right]\left[ \begin{matrix}&lt;br /&gt;
   {{p}_{1}}  \\&lt;br /&gt;
   ...  \\&lt;br /&gt;
   {{p}_{n}}  \\&lt;br /&gt;
   \alpha   \\&lt;br /&gt;
\end{matrix} \right]=\frac{\rho }{\Delta t}\left[ \begin{matrix}&lt;br /&gt;
   \nabla \cdot \b{v}_{_{1}}^{\text{iter}}  \\&lt;br /&gt;
   ...  \\&lt;br /&gt;
   \nabla \cdot \b{v}_{n}^{\text{iter}}  \\&lt;br /&gt;
   0  \\&lt;br /&gt;
\end{matrix} \right]\]&lt;br /&gt;
Gives us a solution of pressure correction.&lt;br /&gt;
&lt;br /&gt;
== CBS Algorithm ==&lt;br /&gt;
With explicit temporal discretization problem is formulated as&lt;br /&gt;
\[\b{\hat{v}}={{\b{v}}_{0}}+\Delta t\left( -\nabla {{p}_{0}}+\frac{1}{Re}{{\nabla }^{2}}{{\b{v}}_{0}}-\nabla \cdot ({{\b{v}}_{0}}{{\b{v}}_{0}}) \right)\]&lt;br /&gt;
\[p={{p}_{0}}-\xi \Delta {{t}_{F}}\nabla \b{\hat{v}}+\xi \Delta {{t}_{F}}\Delta t{{\nabla }^{2}}{{\overset{\scriptscriptstyle\frown}{P}}_{0}},\]&lt;br /&gt;
where $\b{\hat{v}}$, $\Delta t$, $\xi$ and $\Delta t_F$ stand for intermediate velocity, time step, relaxation parameter, and artificial time step, respectively, and index 0 stands for previous time / iteration step. First, the intermediate velocity is computed from previous time step. Second, the velocity is driven towards solenoidal field by correcting the pressure. Note that no special boundary conditions for pressure are used, i.e., the pressure on boundaries is computed with the same approach as in the interior of the domain. In general, the internal iteration with an artificial time step is required until the divergence of the velocity field is not below required criteria. However, if one is interested only in a steady-state solution, the internal iteration can be skipped and $\Delta t$ equals $\Delta {{t}_{F}}$. Without internal stepping the transient of the solution is distorted by artificial compressibility effect. This approach is also known as ACM with Characteristics-based discretization of continuity equation, where the relaxation parameter relates to the artificial speed of sound [35].&lt;br /&gt;
&lt;br /&gt;
The relaxation parameter should be set between 1-10, lower number more stable solution.&lt;br /&gt;
&lt;br /&gt;
And also dimensional form&lt;br /&gt;
&lt;br /&gt;
\[p={{p}_{0}}-{{C}^{2}}\Delta {{t}_{F}}\rho \nabla \b{\hat{v}}+{{C}^{2}}\Delta {{t}_{F}}\Delta t{{\nabla }^{2}}{{p}_{0}},\]&lt;br /&gt;
&lt;br /&gt;
Where C is speed of sound [m/s]&lt;br /&gt;
&lt;br /&gt;
== The Stream Function - Vorticity Approach ==&lt;br /&gt;
&lt;br /&gt;
In two dimensions, the Navier–Stokes equations can be expressed using the&lt;br /&gt;
stream function $\psi$ and the vorticity $\omega$ in place of the primitive variables $u$, $v$, and&lt;br /&gt;
$p$. This involves the elimination of the pressure $p$, thus yielding one dependent&lt;br /&gt;
variable less. In three dimensions, however, this formulation leads to six unknowns&lt;br /&gt;
rather than four (in primitive variables), which makes this approach less attractive&lt;br /&gt;
for that case.&lt;br /&gt;
&lt;br /&gt;
In the following, we briefly derive the resulting two-dimensional equations for&lt;br /&gt;
$\psi$ and $\omega$. We begin by considering the momentum equations:&lt;br /&gt;
\begin{align}&lt;br /&gt;
\frac{\partial u}{\partial t} + u \frac{\partial u}{\partial x} + v \frac{\partial u}{\partial y}&amp;amp; = -\frac{1}{\rho}\frac{\partial p}{\partial x} + \nu \left(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2}\right) + g_x \\&lt;br /&gt;
\frac{\partial v}{\partial t} + u \frac{\partial v}{\partial x} + v \frac{\partial v}{\partial y}&amp;amp; = -\frac{1}{\rho}\frac{\partial p}{\partial y} + \nu \left(\frac{\partial^2 v}{\partial x^2} + \frac{\partial^2 v}{\partial y^2}\right) + g_y&lt;br /&gt;
\end{align}&lt;br /&gt;
from which we can eliminate the pressure by differentiating the first equation by $y$ and the second by $x$, subtracting the second from the first and then substituting the definition for the vorticity $\omega = \partial u / \partial y - \partial v / \partial x$. In this manner we obtain the equation:&lt;br /&gt;
\[\frac{\partial \omega}{\partial t} + \frac{\partial u}{\partial x} \omega + u \frac{\partial \omega}{\partial x} + \frac{\partial v}{\partial y}\omega + v \frac{\partial \omega}{\partial y} = \nu \left(\frac{\partial^2 \omega}{\partial x^2} + \frac{\partial^2 \omega}{\partial y^2}\right) + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)\]&lt;br /&gt;
&lt;br /&gt;
We can get rid of the terms containing $\partial u / \partial x$ and $\partial v / \partial y$ by using the continuity equation \ref{contuinity}. Finally using the definition for the stream function $\partial \psi / \partial y = u$ and $\partial \psi / \partial x = -v$ we can transform the above equation to what is known as the ''vorticity transport equation'':&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + \frac{\partial \psi}{\partial y}\frac{\partial \omega}{\partial x} - \frac{\partial \psi}{\partial x}\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\label{vorticity_transport}&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
Another equation is obtained by inserting the definition of the stream function into that of the vorticity:&lt;br /&gt;
\[\omega = \frac{\partial u}{\partial y} - \frac{\partial v}{\partial x} = \frac{\partial}{\partial y}\frac{\partial \psi}{\partial y} + \frac{\partial }{\partial x}\frac{\partial \psi}{\partial x} = \Delta \psi\]&lt;br /&gt;
leading to the ''Poisson equation for the stream function''&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\label{poisson_stream}&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
The two equations \ref{vorticity_transport} and \ref{poisson_stream} form a nonlinear coupled system of equations in which pressure has been eliminated and in which the continuity equation has been satisfied automatically.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Fluid_Mechanics&amp;diff=1728</id>
		<title>Fluid Mechanics</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Fluid_Mechanics&amp;diff=1728"/>
				<updated>2017-12-11T00:13:55Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* The Stream function - Vorticity approach */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Computational fluid dynamics (CFD) is a field of a great interest among researchers in many fields of science, e.g. studying mathematical fundaments of numerical methods, developing novel physical models, improving computer implementations, and many others. Pushing the limits of all involved fields of science helps community to deepen the understanding of several natural and technological phenomena. Weather forecast, ocean dynamics, water transport, casting, various energetic studies, etc., are just few examples where fluid dynamics plays a crucial role. The core problem of the CFD is solving the Navier-Stokes Equation or its variants, e.g. Darcy or Brinkman equation for flow in porous media. Here, we discuss basic algorithms for solving CFD problems. Check reference list on the [[Main Page]] for more details about related work.&lt;br /&gt;
&lt;br /&gt;
Long story short, we want to solve&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \b{v}}{\partial t}+\nabla \cdot \left( \rho \b{vv}\right)=-\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f}&lt;br /&gt;
\label{NavierStokes}&lt;br /&gt;
\end{equation}&lt;br /&gt;
also known as a Navier-Stokes equation. In many cases we are interested in the incompressible fluids (Ma&amp;lt;0.3), reducing the continuity equation to&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\nabla \cdot \b{v}=0&lt;br /&gt;
\label{contuinity}&lt;br /&gt;
\end{equation}&lt;br /&gt;
which implies a simplification&lt;br /&gt;
&lt;br /&gt;
\[\frac{\partial \left( \rho \b{v} \right)}{\partial t}+\nabla \cdot \left( \rho \b{vv} \right)=\frac{\partial \left( \rho \b{v} \right)}{\partial t}+(\rho \b{v}\cdot \nabla )\cdot \b{v}. \]&lt;br /&gt;
&lt;br /&gt;
Note that the $\b{v}\b{v}$ stands for the tensor or dyadic product \[ \b{v}\b{v} = \b{v}\otimes\b{v} = \b{v}\b{v}^\T = \left[ \begin{matrix}&lt;br /&gt;
   {{v}_{1}}{{v}_{1}} &amp;amp; \cdots &amp;amp; {{v}_{1}}{{v}_{n}}  \\&lt;br /&gt;
   \vdots &amp;amp; \ddots &amp;amp; \vdots  \\&lt;br /&gt;
   {{v}_{n}}{{v}_{1}} &amp;amp; \cdots &amp;amp; {{v}_{n}}{{v}_{n}}  \\&lt;br /&gt;
\end{matrix} \right]\]&lt;br /&gt;
An example of incompressible variant of advection term in 2D would therefore be&lt;br /&gt;
\[\left( \b{v}\cdot \nabla  \right)\b{v}=\left( \left( \begin{matrix}&lt;br /&gt;
   u  \\&lt;br /&gt;
   v  \\&lt;br /&gt;
\end{matrix} \right) \cdot \left( \begin{matrix}&lt;br /&gt;
   \frac{\partial }{\partial x}  \\&lt;br /&gt;
   \frac{\partial }{\partial y}  \\&lt;br /&gt;
\end{matrix} \right) \right)\left( \begin{matrix}&lt;br /&gt;
   u  \\&lt;br /&gt;
   v  \\&lt;br /&gt;
\end{matrix} \right)=\left( \begin{matrix}&lt;br /&gt;
   u\frac{\partial u}{\partial x}+v\frac{\partial u}{\partial y}  \\&lt;br /&gt;
   u\frac{\partial v}{\partial x}+v\frac{\partial v}{\partial y}  \\&lt;br /&gt;
\end{matrix} \right)\]&lt;br /&gt;
&lt;br /&gt;
The goal of CFD is to solve system \ref{NavierStokes} and \ref{contuinity}. It is obvious that a special treatment will be needed to couple both equations. In following discussion we cover some basic approaches, how this can be accomplished.&lt;br /&gt;
&lt;br /&gt;
= Numerical examples =&lt;br /&gt;
== [[Lid driven cavity]] ==&lt;br /&gt;
== [[de Vahl Davis natural convection test]] ==&lt;br /&gt;
&lt;br /&gt;
= Solutions algorithms =&lt;br /&gt;
== Artificial compressibility method ==&lt;br /&gt;
The simplest, completely explicit approach, is an artificial compressibility method (ACM), where a compressibility term is included in the mass continuity&lt;br /&gt;
\[\frac{\partial \b{v}}{\partial t}+(\b{v}\cdot\nabla )\b{v}=-\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f}\]&lt;br /&gt;
\[\frac{ 1 }{ \rho } \frac{\partial \rho }{\partial t}+\nabla \cdot \b{v}=0\]&lt;br /&gt;
\[\frac{ 1 }{ \rho } \frac{\partial \rho }{\partial p}\frac{\partial p}{\partial t}+\nabla \cdot \b{v}=0\]&lt;br /&gt;
Now, the above system can be solved directly.&lt;br /&gt;
&lt;br /&gt;
The addition of the time derivative of the pressure term physically means that waves of finite speed (the propagation of which depends on the magnitude of the ACM)&lt;br /&gt;
are introduced into the flow field as a mean to distribute the pressure within the domain. In a true&lt;br /&gt;
incompressible flow, the pressure field is affected instantaneously throughout the whole domain. In ACM there is a time delay between the flow disturbance and its effect on the&lt;br /&gt;
pressure field. Upon rearranging the equation yields&lt;br /&gt;
\[\frac{\partial p}{\partial t}+\rho {{C}^{2}}\nabla \cdot \b{v}=0\]&lt;br /&gt;
where the continuity equation is perturbed by the quantity $\frac{\partial p}{\partial t}$ denominated herein&lt;br /&gt;
as the AC parameter/artificial sound speed recognized by&lt;br /&gt;
$C$ [m/s] - speed of sound&lt;br /&gt;
\[\frac{1}{C^2}=\frac{\partial \rho }{\partial p}\]&lt;br /&gt;
Or in another words&lt;br /&gt;
\[C^2=\left( \frac{\partial p}{\partial \rho}\right)_S\]&lt;br /&gt;
where $\rho$ is the density of the material. It follows, by replacing partial derivatives, that the isentropic compressibility can be expressed as:&lt;br /&gt;
\[\beta =\frac{1}{\rho {{C}^{2}}}\]&lt;br /&gt;
The evaluation of the local ACM parameter in incompressible flows is inspired by the&lt;br /&gt;
speed of sound computations in compressible flows (for instance, from the perfect gas law).&lt;br /&gt;
However, in the incompressible flow situation, employing such a relation is difficult, but an artificial&lt;br /&gt;
relation can be developed from the convective and diffusive velocities.&lt;br /&gt;
Reverting to the justification of continuity modification, it can be immediately seen that the&lt;br /&gt;
artificial sound speed must be sufficiently large to have a significant regularizing effect and at&lt;br /&gt;
the same time must be as small as possible to minimizing perturbations on the incompressibility&lt;br /&gt;
equation.  Therefore, $C$ influences the convergence rate and stability of the solution method. In other words,&lt;br /&gt;
assists in reducing large disparity in the eigenvalues, leading to a well-conditioned system. &lt;br /&gt;
The $C$ can be '''estimated''' with&lt;br /&gt;
&lt;br /&gt;
\[ C = \beta \max \left( \left|\b{v}\right|_2, \left|\b{v}_{ref}\right|_2 \right),\]&lt;br /&gt;
where $\b{v}_{ref}$ stands for a reference velocity. &lt;br /&gt;
Values for $\beta$ in the range of 1–10 are recommended for better convergence to the steady state at which the&lt;br /&gt;
mass conservation is enforced. In addition, Equation ensures that $C$ does not reach zero at stagnation points&lt;br /&gt;
that cause instabilities in pseudo-time, effecting convergence&lt;br /&gt;
&lt;br /&gt;
Note, that for more complex simulation an internal iteration loops is required before marching in time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;ACM&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ACM BlockDiagram.png|600px]]&lt;br /&gt;
&amp;lt;caption&amp;gt;Scheme of the ACM algorithm &amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Explicit/Implicit pressure calculation ==&lt;br /&gt;
&lt;br /&gt;
Applying divergence on \ref{NavierStokes} yields&lt;br /&gt;
\[\nabla \cdot \frac{\partial \b{v}}{\partial t}+\nabla \cdot (\b{v}\cdot \nabla )\b{v}=-\frac{1}{\rho }{{\nabla }^{2}}p+\nabla \cdot \nu {{\nabla }^{2}}\b{v}+\nabla \cdot \b{f}\]&lt;br /&gt;
&lt;br /&gt;
And since $\nabla \cdot \b{v}=0$ and we can change order in $\nabla \cdot \nabla^2$ and $ \nabla^2 \cdot \nabla$ equation simplifies to&lt;br /&gt;
\[\frac{1}{\rho }{{\nabla }^{2}}p=\nabla \cdot \b{f}-\nabla \cdot (\b{v}\cdot \nabla )\b{v}\]&lt;br /&gt;
Now, we need boundary conditions that can be obtained by multiplying the equation  with a boundary normal vector&lt;br /&gt;
\[\b{\hat{n}}\cdot \left( \frac{\partial \b{v}}{\partial t}+(\b{v}\cdot \nabla )\b{v} \right)=\b{\hat{n}}\cdot \left( -\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{n}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f}-\frac{\partial \b{v}}{\partial t}-(\b{v}\cdot\nabla ) \b{v} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
&lt;br /&gt;
Note that using tangential boundary vector gives equivalent BCs&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{t}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f}-\frac{\partial \b{v}}{\partial t}-(\b{v}\cdot\nabla ) \b{v} \right)\cdot \b{\hat{t}}\]&lt;br /&gt;
For no-slip boundaries BCs simplify to&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{n}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
Otherwise an appropriate expression regarding the velocity can be written, i.e. write full  and taken in account velocity BCs. For example, Neumann velocity $\frac{\partial u}{\partial x}=0$ in 2D&lt;br /&gt;
\[\frac{\partial p}{\partial x}=\left( \nu {{\nabla }^{2}}u + {{f}_{x}}-\frac{\partial u}{\partial t}+v\frac{\partial u}{\partial y} \right)\]&lt;br /&gt;
Note that you allready know everything about the velocity and thus you can compute all the terms explicitely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So the procedure is:&lt;br /&gt;
&lt;br /&gt;
* Compute Navier Stokes either explicitly or implicitly&lt;br /&gt;
* Solve pressure equations with  computed velocities&lt;br /&gt;
* March in time&lt;br /&gt;
&lt;br /&gt;
Basic boundary conditions&lt;br /&gt;
Wall:   $\b{v}=0$, \[\frac{\partial p}{\partial \hat{n}}=\left( \nabla \cdot \left( \nu \nabla \b{v} \right)+\b{f} \right)\cdot \hat{n}\]&lt;br /&gt;
Inlet:  $\b{v}=\b{a}$, \[\frac{\partial p}{\partial \hat{n}}=\left( \nabla \cdot \left( \nu \nabla \b{v} \right)+\b{f}-\nabla \cdot (\rho \b{v}\b{v})-\rho \frac{\partial \b{v}}{\partial t} \right)\cdot \hat{n}\]&lt;br /&gt;
&lt;br /&gt;
Above system can be linearized (advection term) and solved either explicitly or implicitly.&lt;br /&gt;
&lt;br /&gt;
Further reading:&lt;br /&gt;
&lt;br /&gt;
W. D. Henshaw, A fourth-order accurate method for the incompressible Navier–Stokes equations on overlapping grids, J. Comput. Phys. 113, 13 (1994)&lt;br /&gt;
&lt;br /&gt;
J. C. Strikwerda, Finite difference methods for the Stokes and Navier–Stokes equations, SIAM J. Sci. Stat.&lt;br /&gt;
Comput. 5(1), 56 (1984)&lt;br /&gt;
&lt;br /&gt;
== Explicit Pressure correction ==&lt;br /&gt;
Another possibility is to solve pressure correction equation. Again Consider the momentum equation and mass continuity and discretize it explicitly&lt;br /&gt;
\[\frac{{{\b{v}}_{2}}-{{\b{v}}_{1}}}{\Delta t}=-\frac{1}{\rho }\nabla {{p}_{1}}-({{\b{v}}_{1}}\nabla )\cdot {{\b{v}}_{1}}+\nu {{\nabla }^{2}}{{\b{v}}_{1}}+\b{f}\]&lt;br /&gt;
Computed velocity obviously does not satisfy the mass contunity and therefore let’s call it intermediate velocity. Intermediate velocity is calculated from guessed pressure and old velocity values.&lt;br /&gt;
\[{{\b{v}}^{inter}}=\b{v}_1 + \Delta t\left( -\frac{1}{\rho }\nabla {{p}_{1}}-({{\b{v}}_{1}}\nabla )\cdot {{\b{v}}_{1}}+\nu {{\nabla }^{2}}{{\b{v}}_{1}}+\b{f} \right)\]&lt;br /&gt;
A correction term is added that drives velocity to divergence free field&lt;br /&gt;
\[\nabla \cdot ({{\b{v}}^{inter}}+{{\b{v}}^{corr}})=0 \qquad \to \qquad \nabla \cdot {{\b{v}}^{inter}}=-\nabla \cdot {{\b{v}}^{corr}}\]&lt;br /&gt;
&lt;br /&gt;
Velocity correction is affected only by effect of pressure correction. This fact is obvious due to all terms except gradient of pressure on the right side of equation  are constant.&lt;br /&gt;
\[{{\b{v}}^{corr}}=-\frac{\Delta t}{\rho }\nabla {{p}^{corr}} \]&lt;br /&gt;
&lt;br /&gt;
Note that corrected velocity also satisfies boundary conditions&lt;br /&gt;
\[\b{v}^{iter}+\b{v}^{corr}=\b{v}^{BC}\]&lt;br /&gt;
Applying divergence  and  we get '''pressure correction poisson equation'''.&lt;br /&gt;
\[\,{{\nabla }^{2}}{{p}^{corr}}\,=\frac{\rho }{\Delta t}\nabla \cdot {{\mathbf{v}}^{iter}}\,\]&lt;br /&gt;
&lt;br /&gt;
Boundary conditions can be obtained by mulitplying the equation with a unit normal vector $\b{\hat{n}}$&lt;br /&gt;
\[\frac{\Delta t}{\rho }\frac{\partial {p}^{corr}}{\partial \b{\hat{n}}} = \b{\hat{n}} \cdot \left(\b{v}^{iter} - \b{v}^{BC} \right) \]&lt;br /&gt;
The most straightforward approach, for dirichlet BCs, is to take into account velocity boundary condition in computation of intermediate velocity, and clearly in such cases, pressure boundary condition simplifies to &lt;br /&gt;
\[\frac{\partial p^{corr}}{\partial \b{\hat{n}}} = 0 \]&lt;br /&gt;
As ${{\b{v}}^{\operatorname{int}er}}={{\b{v}}^{BC}}$ . Another option is to explicitely compute intermediate velocity also on boundaries and then correct it through pressure correction.&lt;br /&gt;
&lt;br /&gt;
The pressure poisson equation is, at given boundary conditions, defined only up to a constant. One solution is to select a node and set it to a constant, e.g. p(0, 0) = 0, however much more stable approach is to enforce solution with additional condition, also referred to as a regularization&lt;br /&gt;
	\[\int_{\Omega }^{{}}{pd}\Omega =0\]&lt;br /&gt;
\[\,{{\nabla }^{2}}{{p}^{corr}}\,-\alpha =\frac{\rho }{\Delta t}\nabla \cdot {{\b{v}}^{iter}}\,\]&lt;br /&gt;
Where $\alpha $ stands for Lagrange multiplier. Or in discrete form&lt;br /&gt;
	\[\sum\limits_{i}{p\left( {{x}_{i}} \right)=0}\]&lt;br /&gt;
	\[\b{Mp}-\alpha \b{1}=\frac{\rho }{\Delta t}\nabla \cdot {{\b{v}}^{iter}}\]&lt;br /&gt;
&lt;br /&gt;
where $\b{M}$ holds Laplace shape functions, i.e. the discrete version of Laplace differential operator. &lt;br /&gt;
&lt;br /&gt;
Solution of a system&lt;br /&gt;
&lt;br /&gt;
	\[\left[ \begin{matrix}&lt;br /&gt;
   {{M}_{11}} &amp;amp; .. &amp;amp; {{M}_{1n}} &amp;amp; 1  \\&lt;br /&gt;
   .. &amp;amp; .. &amp;amp; .. &amp;amp; 1  \\&lt;br /&gt;
   {{M}_{n1}} &amp;amp; ... &amp;amp; {{M}_{nn}} &amp;amp; 1  \\&lt;br /&gt;
   1 &amp;amp; 1 &amp;amp; 1 &amp;amp; 0  \\&lt;br /&gt;
\end{matrix} \right]\left[ \begin{matrix}&lt;br /&gt;
   {{p}_{1}}  \\&lt;br /&gt;
   ...  \\&lt;br /&gt;
   {{p}_{n}}  \\&lt;br /&gt;
   \alpha   \\&lt;br /&gt;
\end{matrix} \right]=\frac{\rho }{\Delta t}\left[ \begin{matrix}&lt;br /&gt;
   \nabla \cdot \b{v}_{_{1}}^{\text{iter}}  \\&lt;br /&gt;
   ...  \\&lt;br /&gt;
   \nabla \cdot \b{v}_{n}^{\text{iter}}  \\&lt;br /&gt;
   0  \\&lt;br /&gt;
\end{matrix} \right]\]&lt;br /&gt;
Gives us a solution of pressure correction.&lt;br /&gt;
&lt;br /&gt;
== CBS Algorithm ==&lt;br /&gt;
With explicit temporal discretization problem is formulated as&lt;br /&gt;
\[\b{\hat{v}}={{\b{v}}_{0}}+\Delta t\left( -\nabla {{p}_{0}}+\frac{1}{Re}{{\nabla }^{2}}{{\b{v}}_{0}}-\nabla \cdot ({{\b{v}}_{0}}{{\b{v}}_{0}}) \right)\]&lt;br /&gt;
\[p={{p}_{0}}-\xi \Delta {{t}_{F}}\nabla \b{\hat{v}}+\xi \Delta {{t}_{F}}\Delta t{{\nabla }^{2}}{{\overset{\scriptscriptstyle\frown}{P}}_{0}},\]&lt;br /&gt;
where $\b{\hat{v}}$, $\Delta t$, $\xi$ and $\Delta t_F$ stand for intermediate velocity, time step, relaxation parameter, and artificial time step, respectively, and index 0 stands for previous time / iteration step. First, the intermediate velocity is computed from previous time step. Second, the velocity is driven towards solenoidal field by correcting the pressure. Note that no special boundary conditions for pressure are used, i.e., the pressure on boundaries is computed with the same approach as in the interior of the domain. In general, the internal iteration with an artificial time step is required until the divergence of the velocity field is not below required criteria. However, if one is interested only in a steady-state solution, the internal iteration can be skipped and $\Delta t$ equals $\Delta {{t}_{F}}$. Without internal stepping the transient of the solution is distorted by artificial compressibility effect. This approach is also known as ACM with Characteristics-based discretization of continuity equation, where the relaxation parameter relates to the artificial speed of sound [35].&lt;br /&gt;
&lt;br /&gt;
The relaxation parameter should be set between 1-10, lower number more stable solution.&lt;br /&gt;
&lt;br /&gt;
And also dimensional form&lt;br /&gt;
&lt;br /&gt;
\[p={{p}_{0}}-{{C}^{2}}\Delta {{t}_{F}}\rho \nabla \b{\hat{v}}+{{C}^{2}}\Delta {{t}_{F}}\Delta t{{\nabla }^{2}}{{p}_{0}},\]&lt;br /&gt;
&lt;br /&gt;
Where C is speed of sound [m/s]&lt;br /&gt;
&lt;br /&gt;
== The Stream function - Vorticity approach ==&lt;br /&gt;
&lt;br /&gt;
In two dimensions, the Navier–Stokes equations can be expressed using the&lt;br /&gt;
stream function $\psi$ and the vorticity $\omega$ in place of the primitive variables $u$, $v$, and&lt;br /&gt;
$p$. This involves the elimination of the pressure $p$, thus yielding one dependent&lt;br /&gt;
variable less. In three dimensions, however, this formulation leads to six unknowns&lt;br /&gt;
rather than four (in primitive variables), which makes this approach less attractive&lt;br /&gt;
for that case.&lt;br /&gt;
&lt;br /&gt;
In the following, we briefly derive the resulting two-dimensional equations for&lt;br /&gt;
$\psi$ and $\omega$. We begin by considering the momentum equations:&lt;br /&gt;
\begin{align}&lt;br /&gt;
\frac{\partial u}{\partial t} + u \frac{\partial u}{\partial x} + v \frac{\partial u}{\partial y}&amp;amp; = -\frac{1}{\rho}\frac{\partial p}{\partial x} + \nu \left(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2}\right) + g_x \\&lt;br /&gt;
\frac{\partial v}{\partial t} + u \frac{\partial v}{\partial x} + v \frac{\partial v}{\partial y}&amp;amp; = -\frac{1}{\rho}\frac{\partial p}{\partial y} + \nu \left(\frac{\partial^2 v}{\partial x^2} + \frac{\partial^2 v}{\partial y^2}\right) + g_y&lt;br /&gt;
\end{align}&lt;br /&gt;
from which we can eliminate the pressure by differentiating the first equation by $y$ and the second by $x$, subtracting the second from the first and then substituting the definition for the vorticity $\omega = \partial u / \partial y - \partial v / \partial x$. In this manner we obtain the equation:&lt;br /&gt;
\[\frac{\partial \omega}{\partial t} + \frac{\partial u}{\partial x} \omega + u \frac{\partial \omega}{\partial x} + \frac{\partial v}{\partial y}\omega + v \frac{\partial \omega}{\partial y} = \nu \left(\frac{\partial^2 \omega}{\partial x^2} + \frac{\partial^2 \omega}{\partial y^2}\right) + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)\]&lt;br /&gt;
&lt;br /&gt;
We can get rid of the terms containing $\partial u / \partial x$ and $\partial v / \partial y$ by using the continuity equation \ref{contuinity}. Finally using the definition for the stream function $\partial \psi / \partial y = u$ and $\partial \psi / \partial x = -v$ we can transform the above equation to what is known as the ''vorticity transport equation'':&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + \frac{\partial \psi}{\partial y}\frac{\partial \omega}{\partial x} - \frac{\partial \psi}{\partial x}\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
Another equation is obtained by inserting the definition of the stream function into that of the vorticity:&lt;br /&gt;
\[\omega = \frac{\partial u}{\partial y} - \frac{\partial v}{\partial x} = \frac{\partial}{\partial y}\frac{\partial \psi}{\partial y} + \frac{\partial }{\partial x}\frac{\partial \psi}{\partial x} = \Delta \psi\]&lt;br /&gt;
leading to the ''Poisson equation for the stream function''&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\Delta \psi = \omega&lt;br /&gt;
\end{equation}&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Fluid_Mechanics&amp;diff=1727</id>
		<title>Fluid Mechanics</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Fluid_Mechanics&amp;diff=1727"/>
				<updated>2017-12-11T00:12:42Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* The stream function - vorticity approach */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Computational fluid dynamics (CFD) is a field of a great interest among researchers in many fields of science, e.g. studying mathematical fundaments of numerical methods, developing novel physical models, improving computer implementations, and many others. Pushing the limits of all involved fields of science helps community to deepen the understanding of several natural and technological phenomena. Weather forecast, ocean dynamics, water transport, casting, various energetic studies, etc., are just few examples where fluid dynamics plays a crucial role. The core problem of the CFD is solving the Navier-Stokes Equation or its variants, e.g. Darcy or Brinkman equation for flow in porous media. Here, we discuss basic algorithms for solving CFD problems. Check reference list on the [[Main Page]] for more details about related work.&lt;br /&gt;
&lt;br /&gt;
Long story short, we want to solve&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \b{v}}{\partial t}+\nabla \cdot \left( \rho \b{vv}\right)=-\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f}&lt;br /&gt;
\label{NavierStokes}&lt;br /&gt;
\end{equation}&lt;br /&gt;
also known as a Navier-Stokes equation. In many cases we are interested in the incompressible fluids (Ma&amp;lt;0.3), reducing the continuity equation to&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\nabla \cdot \b{v}=0&lt;br /&gt;
\label{contuinity}&lt;br /&gt;
\end{equation}&lt;br /&gt;
which implies a simplification&lt;br /&gt;
&lt;br /&gt;
\[\frac{\partial \left( \rho \b{v} \right)}{\partial t}+\nabla \cdot \left( \rho \b{vv} \right)=\frac{\partial \left( \rho \b{v} \right)}{\partial t}+(\rho \b{v}\cdot \nabla )\cdot \b{v}. \]&lt;br /&gt;
&lt;br /&gt;
Note that the $\b{v}\b{v}$ stands for the tensor or dyadic product \[ \b{v}\b{v} = \b{v}\otimes\b{v} = \b{v}\b{v}^\T = \left[ \begin{matrix}&lt;br /&gt;
   {{v}_{1}}{{v}_{1}} &amp;amp; \cdots &amp;amp; {{v}_{1}}{{v}_{n}}  \\&lt;br /&gt;
   \vdots &amp;amp; \ddots &amp;amp; \vdots  \\&lt;br /&gt;
   {{v}_{n}}{{v}_{1}} &amp;amp; \cdots &amp;amp; {{v}_{n}}{{v}_{n}}  \\&lt;br /&gt;
\end{matrix} \right]\]&lt;br /&gt;
An example of incompressible variant of advection term in 2D would therefore be&lt;br /&gt;
\[\left( \b{v}\cdot \nabla  \right)\b{v}=\left( \left( \begin{matrix}&lt;br /&gt;
   u  \\&lt;br /&gt;
   v  \\&lt;br /&gt;
\end{matrix} \right) \cdot \left( \begin{matrix}&lt;br /&gt;
   \frac{\partial }{\partial x}  \\&lt;br /&gt;
   \frac{\partial }{\partial y}  \\&lt;br /&gt;
\end{matrix} \right) \right)\left( \begin{matrix}&lt;br /&gt;
   u  \\&lt;br /&gt;
   v  \\&lt;br /&gt;
\end{matrix} \right)=\left( \begin{matrix}&lt;br /&gt;
   u\frac{\partial u}{\partial x}+v\frac{\partial u}{\partial y}  \\&lt;br /&gt;
   u\frac{\partial v}{\partial x}+v\frac{\partial v}{\partial y}  \\&lt;br /&gt;
\end{matrix} \right)\]&lt;br /&gt;
&lt;br /&gt;
The goal of CFD is to solve system \ref{NavierStokes} and \ref{contuinity}. It is obvious that a special treatment will be needed to couple both equations. In following discussion we cover some basic approaches, how this can be accomplished.&lt;br /&gt;
&lt;br /&gt;
= Numerical examples =&lt;br /&gt;
== [[Lid driven cavity]] ==&lt;br /&gt;
== [[de Vahl Davis natural convection test]] ==&lt;br /&gt;
&lt;br /&gt;
= Solutions algorithms =&lt;br /&gt;
== Artificial compressibility method ==&lt;br /&gt;
The simplest, completely explicit approach, is an artificial compressibility method (ACM), where a compressibility term is included in the mass continuity&lt;br /&gt;
\[\frac{\partial \b{v}}{\partial t}+(\b{v}\cdot\nabla )\b{v}=-\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f}\]&lt;br /&gt;
\[\frac{ 1 }{ \rho } \frac{\partial \rho }{\partial t}+\nabla \cdot \b{v}=0\]&lt;br /&gt;
\[\frac{ 1 }{ \rho } \frac{\partial \rho }{\partial p}\frac{\partial p}{\partial t}+\nabla \cdot \b{v}=0\]&lt;br /&gt;
Now, the above system can be solved directly.&lt;br /&gt;
&lt;br /&gt;
The addition of the time derivative of the pressure term physically means that waves of finite speed (the propagation of which depends on the magnitude of the ACM)&lt;br /&gt;
are introduced into the flow field as a mean to distribute the pressure within the domain. In a true&lt;br /&gt;
incompressible flow, the pressure field is affected instantaneously throughout the whole domain. In ACM there is a time delay between the flow disturbance and its effect on the&lt;br /&gt;
pressure field. Upon rearranging the equation yields&lt;br /&gt;
\[\frac{\partial p}{\partial t}+\rho {{C}^{2}}\nabla \cdot \b{v}=0\]&lt;br /&gt;
where the continuity equation is perturbed by the quantity $\frac{\partial p}{\partial t}$ denominated herein&lt;br /&gt;
as the AC parameter/artificial sound speed recognized by&lt;br /&gt;
$C$ [m/s] - speed of sound&lt;br /&gt;
\[\frac{1}{C^2}=\frac{\partial \rho }{\partial p}\]&lt;br /&gt;
Or in another words&lt;br /&gt;
\[C^2=\left( \frac{\partial p}{\partial \rho}\right)_S\]&lt;br /&gt;
where $\rho$ is the density of the material. It follows, by replacing partial derivatives, that the isentropic compressibility can be expressed as:&lt;br /&gt;
\[\beta =\frac{1}{\rho {{C}^{2}}}\]&lt;br /&gt;
The evaluation of the local ACM parameter in incompressible flows is inspired by the&lt;br /&gt;
speed of sound computations in compressible flows (for instance, from the perfect gas law).&lt;br /&gt;
However, in the incompressible flow situation, employing such a relation is difficult, but an artificial&lt;br /&gt;
relation can be developed from the convective and diffusive velocities.&lt;br /&gt;
Reverting to the justification of continuity modification, it can be immediately seen that the&lt;br /&gt;
artificial sound speed must be sufficiently large to have a significant regularizing effect and at&lt;br /&gt;
the same time must be as small as possible to minimizing perturbations on the incompressibility&lt;br /&gt;
equation.  Therefore, $C$ influences the convergence rate and stability of the solution method. In other words,&lt;br /&gt;
assists in reducing large disparity in the eigenvalues, leading to a well-conditioned system. &lt;br /&gt;
The $C$ can be '''estimated''' with&lt;br /&gt;
&lt;br /&gt;
\[ C = \beta \max \left( \left|\b{v}\right|_2, \left|\b{v}_{ref}\right|_2 \right),\]&lt;br /&gt;
where $\b{v}_{ref}$ stands for a reference velocity. &lt;br /&gt;
Values for $\beta$ in the range of 1–10 are recommended for better convergence to the steady state at which the&lt;br /&gt;
mass conservation is enforced. In addition, Equation ensures that $C$ does not reach zero at stagnation points&lt;br /&gt;
that cause instabilities in pseudo-time, effecting convergence&lt;br /&gt;
&lt;br /&gt;
Note, that for more complex simulation an internal iteration loops is required before marching in time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;ACM&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ACM BlockDiagram.png|600px]]&lt;br /&gt;
&amp;lt;caption&amp;gt;Scheme of the ACM algorithm &amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Explicit/Implicit pressure calculation ==&lt;br /&gt;
&lt;br /&gt;
Applying divergence on \ref{NavierStokes} yields&lt;br /&gt;
\[\nabla \cdot \frac{\partial \b{v}}{\partial t}+\nabla \cdot (\b{v}\cdot \nabla )\b{v}=-\frac{1}{\rho }{{\nabla }^{2}}p+\nabla \cdot \nu {{\nabla }^{2}}\b{v}+\nabla \cdot \b{f}\]&lt;br /&gt;
&lt;br /&gt;
And since $\nabla \cdot \b{v}=0$ and we can change order in $\nabla \cdot \nabla^2$ and $ \nabla^2 \cdot \nabla$ equation simplifies to&lt;br /&gt;
\[\frac{1}{\rho }{{\nabla }^{2}}p=\nabla \cdot \b{f}-\nabla \cdot (\b{v}\cdot \nabla )\b{v}\]&lt;br /&gt;
Now, we need boundary conditions that can be obtained by multiplying the equation  with a boundary normal vector&lt;br /&gt;
\[\b{\hat{n}}\cdot \left( \frac{\partial \b{v}}{\partial t}+(\b{v}\cdot \nabla )\b{v} \right)=\b{\hat{n}}\cdot \left( -\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{n}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f}-\frac{\partial \b{v}}{\partial t}-(\b{v}\cdot\nabla ) \b{v} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
&lt;br /&gt;
Note that using tangential boundary vector gives equivalent BCs&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{t}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f}-\frac{\partial \b{v}}{\partial t}-(\b{v}\cdot\nabla ) \b{v} \right)\cdot \b{\hat{t}}\]&lt;br /&gt;
For no-slip boundaries BCs simplify to&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{n}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
Otherwise an appropriate expression regarding the velocity can be written, i.e. write full  and taken in account velocity BCs. For example, Neumann velocity $\frac{\partial u}{\partial x}=0$ in 2D&lt;br /&gt;
\[\frac{\partial p}{\partial x}=\left( \nu {{\nabla }^{2}}u + {{f}_{x}}-\frac{\partial u}{\partial t}+v\frac{\partial u}{\partial y} \right)\]&lt;br /&gt;
Note that you allready know everything about the velocity and thus you can compute all the terms explicitely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So the procedure is:&lt;br /&gt;
&lt;br /&gt;
* Compute Navier Stokes either explicitly or implicitly&lt;br /&gt;
* Solve pressure equations with  computed velocities&lt;br /&gt;
* March in time&lt;br /&gt;
&lt;br /&gt;
Basic boundary conditions&lt;br /&gt;
Wall:   $\b{v}=0$, \[\frac{\partial p}{\partial \hat{n}}=\left( \nabla \cdot \left( \nu \nabla \b{v} \right)+\b{f} \right)\cdot \hat{n}\]&lt;br /&gt;
Inlet:  $\b{v}=\b{a}$, \[\frac{\partial p}{\partial \hat{n}}=\left( \nabla \cdot \left( \nu \nabla \b{v} \right)+\b{f}-\nabla \cdot (\rho \b{v}\b{v})-\rho \frac{\partial \b{v}}{\partial t} \right)\cdot \hat{n}\]&lt;br /&gt;
&lt;br /&gt;
Above system can be linearized (advection term) and solved either explicitly or implicitly.&lt;br /&gt;
&lt;br /&gt;
Further reading:&lt;br /&gt;
&lt;br /&gt;
W. D. Henshaw, A fourth-order accurate method for the incompressible Navier–Stokes equations on overlapping grids, J. Comput. Phys. 113, 13 (1994)&lt;br /&gt;
&lt;br /&gt;
J. C. Strikwerda, Finite difference methods for the Stokes and Navier–Stokes equations, SIAM J. Sci. Stat.&lt;br /&gt;
Comput. 5(1), 56 (1984)&lt;br /&gt;
&lt;br /&gt;
== Explicit Pressure correction ==&lt;br /&gt;
Another possibility is to solve pressure correction equation. Again Consider the momentum equation and mass continuity and discretize it explicitly&lt;br /&gt;
\[\frac{{{\b{v}}_{2}}-{{\b{v}}_{1}}}{\Delta t}=-\frac{1}{\rho }\nabla {{p}_{1}}-({{\b{v}}_{1}}\nabla )\cdot {{\b{v}}_{1}}+\nu {{\nabla }^{2}}{{\b{v}}_{1}}+\b{f}\]&lt;br /&gt;
Computed velocity obviously does not satisfy the mass contunity and therefore let’s call it intermediate velocity. Intermediate velocity is calculated from guessed pressure and old velocity values.&lt;br /&gt;
\[{{\b{v}}^{inter}}=\b{v}_1 + \Delta t\left( -\frac{1}{\rho }\nabla {{p}_{1}}-({{\b{v}}_{1}}\nabla )\cdot {{\b{v}}_{1}}+\nu {{\nabla }^{2}}{{\b{v}}_{1}}+\b{f} \right)\]&lt;br /&gt;
A correction term is added that drives velocity to divergence free field&lt;br /&gt;
\[\nabla \cdot ({{\b{v}}^{inter}}+{{\b{v}}^{corr}})=0 \qquad \to \qquad \nabla \cdot {{\b{v}}^{inter}}=-\nabla \cdot {{\b{v}}^{corr}}\]&lt;br /&gt;
&lt;br /&gt;
Velocity correction is affected only by effect of pressure correction. This fact is obvious due to all terms except gradient of pressure on the right side of equation  are constant.&lt;br /&gt;
\[{{\b{v}}^{corr}}=-\frac{\Delta t}{\rho }\nabla {{p}^{corr}} \]&lt;br /&gt;
&lt;br /&gt;
Note that corrected velocity also satisfies boundary conditions&lt;br /&gt;
\[\b{v}^{iter}+\b{v}^{corr}=\b{v}^{BC}\]&lt;br /&gt;
Applying divergence  and  we get '''pressure correction poisson equation'''.&lt;br /&gt;
\[\,{{\nabla }^{2}}{{p}^{corr}}\,=\frac{\rho }{\Delta t}\nabla \cdot {{\mathbf{v}}^{iter}}\,\]&lt;br /&gt;
&lt;br /&gt;
Boundary conditions can be obtained by mulitplying the equation with a unit normal vector $\b{\hat{n}}$&lt;br /&gt;
\[\frac{\Delta t}{\rho }\frac{\partial {p}^{corr}}{\partial \b{\hat{n}}} = \b{\hat{n}} \cdot \left(\b{v}^{iter} - \b{v}^{BC} \right) \]&lt;br /&gt;
The most straightforward approach, for dirichlet BCs, is to take into account velocity boundary condition in computation of intermediate velocity, and clearly in such cases, pressure boundary condition simplifies to &lt;br /&gt;
\[\frac{\partial p^{corr}}{\partial \b{\hat{n}}} = 0 \]&lt;br /&gt;
As ${{\b{v}}^{\operatorname{int}er}}={{\b{v}}^{BC}}$ . Another option is to explicitely compute intermediate velocity also on boundaries and then correct it through pressure correction.&lt;br /&gt;
&lt;br /&gt;
The pressure poisson equation is, at given boundary conditions, defined only up to a constant. One solution is to select a node and set it to a constant, e.g. p(0, 0) = 0, however much more stable approach is to enforce solution with additional condition, also referred to as a regularization&lt;br /&gt;
	\[\int_{\Omega }^{{}}{pd}\Omega =0\]&lt;br /&gt;
\[\,{{\nabla }^{2}}{{p}^{corr}}\,-\alpha =\frac{\rho }{\Delta t}\nabla \cdot {{\b{v}}^{iter}}\,\]&lt;br /&gt;
Where $\alpha $ stands for Lagrange multiplier. Or in discrete form&lt;br /&gt;
	\[\sum\limits_{i}{p\left( {{x}_{i}} \right)=0}\]&lt;br /&gt;
	\[\b{Mp}-\alpha \b{1}=\frac{\rho }{\Delta t}\nabla \cdot {{\b{v}}^{iter}}\]&lt;br /&gt;
&lt;br /&gt;
where $\b{M}$ holds Laplace shape functions, i.e. the discrete version of Laplace differential operator. &lt;br /&gt;
&lt;br /&gt;
Solution of a system&lt;br /&gt;
&lt;br /&gt;
	\[\left[ \begin{matrix}&lt;br /&gt;
   {{M}_{11}} &amp;amp; .. &amp;amp; {{M}_{1n}} &amp;amp; 1  \\&lt;br /&gt;
   .. &amp;amp; .. &amp;amp; .. &amp;amp; 1  \\&lt;br /&gt;
   {{M}_{n1}} &amp;amp; ... &amp;amp; {{M}_{nn}} &amp;amp; 1  \\&lt;br /&gt;
   1 &amp;amp; 1 &amp;amp; 1 &amp;amp; 0  \\&lt;br /&gt;
\end{matrix} \right]\left[ \begin{matrix}&lt;br /&gt;
   {{p}_{1}}  \\&lt;br /&gt;
   ...  \\&lt;br /&gt;
   {{p}_{n}}  \\&lt;br /&gt;
   \alpha   \\&lt;br /&gt;
\end{matrix} \right]=\frac{\rho }{\Delta t}\left[ \begin{matrix}&lt;br /&gt;
   \nabla \cdot \b{v}_{_{1}}^{\text{iter}}  \\&lt;br /&gt;
   ...  \\&lt;br /&gt;
   \nabla \cdot \b{v}_{n}^{\text{iter}}  \\&lt;br /&gt;
   0  \\&lt;br /&gt;
\end{matrix} \right]\]&lt;br /&gt;
Gives us a solution of pressure correction.&lt;br /&gt;
&lt;br /&gt;
== CBS Algorithm ==&lt;br /&gt;
With explicit temporal discretization problem is formulated as&lt;br /&gt;
\[\b{\hat{v}}={{\b{v}}_{0}}+\Delta t\left( -\nabla {{p}_{0}}+\frac{1}{Re}{{\nabla }^{2}}{{\b{v}}_{0}}-\nabla \cdot ({{\b{v}}_{0}}{{\b{v}}_{0}}) \right)\]&lt;br /&gt;
\[p={{p}_{0}}-\xi \Delta {{t}_{F}}\nabla \b{\hat{v}}+\xi \Delta {{t}_{F}}\Delta t{{\nabla }^{2}}{{\overset{\scriptscriptstyle\frown}{P}}_{0}},\]&lt;br /&gt;
where $\b{\hat{v}}$, $\Delta t$, $\xi$ and $\Delta t_F$ stand for intermediate velocity, time step, relaxation parameter, and artificial time step, respectively, and index 0 stands for previous time / iteration step. First, the intermediate velocity is computed from previous time step. Second, the velocity is driven towards solenoidal field by correcting the pressure. Note that no special boundary conditions for pressure are used, i.e., the pressure on boundaries is computed with the same approach as in the interior of the domain. In general, the internal iteration with an artificial time step is required until the divergence of the velocity field is not below required criteria. However, if one is interested only in a steady-state solution, the internal iteration can be skipped and $\Delta t$ equals $\Delta {{t}_{F}}$. Without internal stepping the transient of the solution is distorted by artificial compressibility effect. This approach is also known as ACM with Characteristics-based discretization of continuity equation, where the relaxation parameter relates to the artificial speed of sound [35].&lt;br /&gt;
&lt;br /&gt;
The relaxation parameter should be set between 1-10, lower number more stable solution.&lt;br /&gt;
&lt;br /&gt;
And also dimensional form&lt;br /&gt;
&lt;br /&gt;
\[p={{p}_{0}}-{{C}^{2}}\Delta {{t}_{F}}\rho \nabla \b{\hat{v}}+{{C}^{2}}\Delta {{t}_{F}}\Delta t{{\nabla }^{2}}{{p}_{0}},\]&lt;br /&gt;
&lt;br /&gt;
Where C is speed of sound [m/s]&lt;br /&gt;
&lt;br /&gt;
== The Stream function - Vorticity approach ==&lt;br /&gt;
&lt;br /&gt;
In two dimensions, the Navier–Stokes equations can be expressed using the&lt;br /&gt;
stream function $\psi$ and the vorticity $\omega$ in place of the primitive variables $u$, $v$, and&lt;br /&gt;
$p$. This involves the elimination of the pressure $p$, thus yielding one dependent&lt;br /&gt;
variable less. In three dimensions, however, this formulation leads to six unknowns&lt;br /&gt;
rather than four (in primitive variables), which makes this approach less attractive&lt;br /&gt;
for that case.&lt;br /&gt;
&lt;br /&gt;
In the following, we briefly derive the resulting two-dimensional equations for&lt;br /&gt;
$\psi$ and $\omega$. We begin by considering the momentum equations:&lt;br /&gt;
\begin{align}&lt;br /&gt;
\frac{\partial u}{\partial t} + u \frac{\partial u}{\partial x} + v \frac{\partial u}{\partial y}&amp;amp; = -\frac{1}{\rho}\frac{\partial p}{\partial x} + \nu \left(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2}\right) + g_x \\&lt;br /&gt;
\frac{\partial v}{\partial t} + u \frac{\partial v}{\partial x} + v \frac{\partial v}{\partial y}&amp;amp; = -\frac{1}{\rho}\frac{\partial p}{\partial y} + \nu \left(\frac{\partial^2 v}{\partial x^2} + \frac{\partial^2 v}{\partial y^2}\right) + g_y&lt;br /&gt;
\end{align}&lt;br /&gt;
from which we can eliminate the pressure by differentiating the first equation by $y$ and the second by $x$, subtracting the second from the first and then substituting the definition for the vorticity $\omega = \partial u / \partial y - \partial v / \partial x$. In this manner we obtain the equation:&lt;br /&gt;
\[\frac{\partial \omega}{\partial t} + \frac{\partial u}{\partial x} \omega + u \frac{\partial \omega}{\partial x} + \frac{\partial v}{\partial y}\omega + v \frac{\partial \omega}{\partial y} = \nu \left(\frac{\partial^2 \omega}{\partial x^2} + \frac{\partial^2 \omega}{\partial y^2}\right) + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)\]&lt;br /&gt;
&lt;br /&gt;
We can get rid of the terms containing $\partial u / \partial x$ and $\partial v / \partial y$ by using the continuity equation \ref{contuinity}. Finally using the definition for the stream function $\partial \psi / \partial y = u$ and $\partial \psi / \partial x = -v$ we can transform the above equation to what is known as the ''vorticity transport equation'':&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + \frac{\partial \psi}{\partial y}\frac{\partial \omega}{\partial x} - \frac{\partial \psi}{\partial x}\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
Another equation is obtained by inserting the definition of the stream function into that of the vorticity:&lt;br /&gt;
\[\omega = \frac{\partial u}{\partial y} - \frac{\partial v}{\partial x} = \frac{\partial}{\partial y}\frac{\partial \psi}{\partial y} + \frac{\partial }{\partial x}\frac{\partial \psi}{\partial x} = \Delta \psi\]&lt;br /&gt;
This equation is also known as the ''Poisson equation for the stream function''.&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Fluid_Mechanics&amp;diff=1726</id>
		<title>Fluid Mechanics</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Fluid_Mechanics&amp;diff=1726"/>
				<updated>2017-12-11T00:11:37Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Computational fluid dynamics (CFD) is a field of a great interest among researchers in many fields of science, e.g. studying mathematical fundaments of numerical methods, developing novel physical models, improving computer implementations, and many others. Pushing the limits of all involved fields of science helps community to deepen the understanding of several natural and technological phenomena. Weather forecast, ocean dynamics, water transport, casting, various energetic studies, etc., are just few examples where fluid dynamics plays a crucial role. The core problem of the CFD is solving the Navier-Stokes Equation or its variants, e.g. Darcy or Brinkman equation for flow in porous media. Here, we discuss basic algorithms for solving CFD problems. Check reference list on the [[Main Page]] for more details about related work.&lt;br /&gt;
&lt;br /&gt;
Long story short, we want to solve&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \b{v}}{\partial t}+\nabla \cdot \left( \rho \b{vv}\right)=-\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f}&lt;br /&gt;
\label{NavierStokes}&lt;br /&gt;
\end{equation}&lt;br /&gt;
also known as a Navier-Stokes equation. In many cases we are interested in the incompressible fluids (Ma&amp;lt;0.3), reducing the continuity equation to&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\nabla \cdot \b{v}=0&lt;br /&gt;
\label{contuinity}&lt;br /&gt;
\end{equation}&lt;br /&gt;
which implies a simplification&lt;br /&gt;
&lt;br /&gt;
\[\frac{\partial \left( \rho \b{v} \right)}{\partial t}+\nabla \cdot \left( \rho \b{vv} \right)=\frac{\partial \left( \rho \b{v} \right)}{\partial t}+(\rho \b{v}\cdot \nabla )\cdot \b{v}. \]&lt;br /&gt;
&lt;br /&gt;
Note that the $\b{v}\b{v}$ stands for the tensor or dyadic product \[ \b{v}\b{v} = \b{v}\otimes\b{v} = \b{v}\b{v}^\T = \left[ \begin{matrix}&lt;br /&gt;
   {{v}_{1}}{{v}_{1}} &amp;amp; \cdots &amp;amp; {{v}_{1}}{{v}_{n}}  \\&lt;br /&gt;
   \vdots &amp;amp; \ddots &amp;amp; \vdots  \\&lt;br /&gt;
   {{v}_{n}}{{v}_{1}} &amp;amp; \cdots &amp;amp; {{v}_{n}}{{v}_{n}}  \\&lt;br /&gt;
\end{matrix} \right]\]&lt;br /&gt;
An example of incompressible variant of advection term in 2D would therefore be&lt;br /&gt;
\[\left( \b{v}\cdot \nabla  \right)\b{v}=\left( \left( \begin{matrix}&lt;br /&gt;
   u  \\&lt;br /&gt;
   v  \\&lt;br /&gt;
\end{matrix} \right) \cdot \left( \begin{matrix}&lt;br /&gt;
   \frac{\partial }{\partial x}  \\&lt;br /&gt;
   \frac{\partial }{\partial y}  \\&lt;br /&gt;
\end{matrix} \right) \right)\left( \begin{matrix}&lt;br /&gt;
   u  \\&lt;br /&gt;
   v  \\&lt;br /&gt;
\end{matrix} \right)=\left( \begin{matrix}&lt;br /&gt;
   u\frac{\partial u}{\partial x}+v\frac{\partial u}{\partial y}  \\&lt;br /&gt;
   u\frac{\partial v}{\partial x}+v\frac{\partial v}{\partial y}  \\&lt;br /&gt;
\end{matrix} \right)\]&lt;br /&gt;
&lt;br /&gt;
The goal of CFD is to solve system \ref{NavierStokes} and \ref{contuinity}. It is obvious that a special treatment will be needed to couple both equations. In following discussion we cover some basic approaches, how this can be accomplished.&lt;br /&gt;
&lt;br /&gt;
= Numerical examples =&lt;br /&gt;
== [[Lid driven cavity]] ==&lt;br /&gt;
== [[de Vahl Davis natural convection test]] ==&lt;br /&gt;
&lt;br /&gt;
= Solutions algorithms =&lt;br /&gt;
== Artificial compressibility method ==&lt;br /&gt;
The simplest, completely explicit approach, is an artificial compressibility method (ACM), where a compressibility term is included in the mass continuity&lt;br /&gt;
\[\frac{\partial \b{v}}{\partial t}+(\b{v}\cdot\nabla )\b{v}=-\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f}\]&lt;br /&gt;
\[\frac{ 1 }{ \rho } \frac{\partial \rho }{\partial t}+\nabla \cdot \b{v}=0\]&lt;br /&gt;
\[\frac{ 1 }{ \rho } \frac{\partial \rho }{\partial p}\frac{\partial p}{\partial t}+\nabla \cdot \b{v}=0\]&lt;br /&gt;
Now, the above system can be solved directly.&lt;br /&gt;
&lt;br /&gt;
The addition of the time derivative of the pressure term physically means that waves of finite speed (the propagation of which depends on the magnitude of the ACM)&lt;br /&gt;
are introduced into the flow field as a mean to distribute the pressure within the domain. In a true&lt;br /&gt;
incompressible flow, the pressure field is affected instantaneously throughout the whole domain. In ACM there is a time delay between the flow disturbance and its effect on the&lt;br /&gt;
pressure field. Upon rearranging the equation yields&lt;br /&gt;
\[\frac{\partial p}{\partial t}+\rho {{C}^{2}}\nabla \cdot \b{v}=0\]&lt;br /&gt;
where the continuity equation is perturbed by the quantity $\frac{\partial p}{\partial t}$ denominated herein&lt;br /&gt;
as the AC parameter/artificial sound speed recognized by&lt;br /&gt;
$C$ [m/s] - speed of sound&lt;br /&gt;
\[\frac{1}{C^2}=\frac{\partial \rho }{\partial p}\]&lt;br /&gt;
Or in another words&lt;br /&gt;
\[C^2=\left( \frac{\partial p}{\partial \rho}\right)_S\]&lt;br /&gt;
where $\rho$ is the density of the material. It follows, by replacing partial derivatives, that the isentropic compressibility can be expressed as:&lt;br /&gt;
\[\beta =\frac{1}{\rho {{C}^{2}}}\]&lt;br /&gt;
The evaluation of the local ACM parameter in incompressible flows is inspired by the&lt;br /&gt;
speed of sound computations in compressible flows (for instance, from the perfect gas law).&lt;br /&gt;
However, in the incompressible flow situation, employing such a relation is difficult, but an artificial&lt;br /&gt;
relation can be developed from the convective and diffusive velocities.&lt;br /&gt;
Reverting to the justification of continuity modification, it can be immediately seen that the&lt;br /&gt;
artificial sound speed must be sufficiently large to have a significant regularizing effect and at&lt;br /&gt;
the same time must be as small as possible to minimizing perturbations on the incompressibility&lt;br /&gt;
equation.  Therefore, $C$ influences the convergence rate and stability of the solution method. In other words,&lt;br /&gt;
assists in reducing large disparity in the eigenvalues, leading to a well-conditioned system. &lt;br /&gt;
The $C$ can be '''estimated''' with&lt;br /&gt;
&lt;br /&gt;
\[ C = \beta \max \left( \left|\b{v}\right|_2, \left|\b{v}_{ref}\right|_2 \right),\]&lt;br /&gt;
where $\b{v}_{ref}$ stands for a reference velocity. &lt;br /&gt;
Values for $\beta$ in the range of 1–10 are recommended for better convergence to the steady state at which the&lt;br /&gt;
mass conservation is enforced. In addition, Equation ensures that $C$ does not reach zero at stagnation points&lt;br /&gt;
that cause instabilities in pseudo-time, effecting convergence&lt;br /&gt;
&lt;br /&gt;
Note, that for more complex simulation an internal iteration loops is required before marching in time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;ACM&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ACM BlockDiagram.png|600px]]&lt;br /&gt;
&amp;lt;caption&amp;gt;Scheme of the ACM algorithm &amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Explicit/Implicit pressure calculation ==&lt;br /&gt;
&lt;br /&gt;
Applying divergence on \ref{NavierStokes} yields&lt;br /&gt;
\[\nabla \cdot \frac{\partial \b{v}}{\partial t}+\nabla \cdot (\b{v}\cdot \nabla )\b{v}=-\frac{1}{\rho }{{\nabla }^{2}}p+\nabla \cdot \nu {{\nabla }^{2}}\b{v}+\nabla \cdot \b{f}\]&lt;br /&gt;
&lt;br /&gt;
And since $\nabla \cdot \b{v}=0$ and we can change order in $\nabla \cdot \nabla^2$ and $ \nabla^2 \cdot \nabla$ equation simplifies to&lt;br /&gt;
\[\frac{1}{\rho }{{\nabla }^{2}}p=\nabla \cdot \b{f}-\nabla \cdot (\b{v}\cdot \nabla )\b{v}\]&lt;br /&gt;
Now, we need boundary conditions that can be obtained by multiplying the equation  with a boundary normal vector&lt;br /&gt;
\[\b{\hat{n}}\cdot \left( \frac{\partial \b{v}}{\partial t}+(\b{v}\cdot \nabla )\b{v} \right)=\b{\hat{n}}\cdot \left( -\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{n}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f}-\frac{\partial \b{v}}{\partial t}-(\b{v}\cdot\nabla ) \b{v} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
&lt;br /&gt;
Note that using tangential boundary vector gives equivalent BCs&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{t}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f}-\frac{\partial \b{v}}{\partial t}-(\b{v}\cdot\nabla ) \b{v} \right)\cdot \b{\hat{t}}\]&lt;br /&gt;
For no-slip boundaries BCs simplify to&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{n}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
Otherwise an appropriate expression regarding the velocity can be written, i.e. write full  and taken in account velocity BCs. For example, Neumann velocity $\frac{\partial u}{\partial x}=0$ in 2D&lt;br /&gt;
\[\frac{\partial p}{\partial x}=\left( \nu {{\nabla }^{2}}u + {{f}_{x}}-\frac{\partial u}{\partial t}+v\frac{\partial u}{\partial y} \right)\]&lt;br /&gt;
Note that you allready know everything about the velocity and thus you can compute all the terms explicitely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So the procedure is:&lt;br /&gt;
&lt;br /&gt;
* Compute Navier Stokes either explicitly or implicitly&lt;br /&gt;
* Solve pressure equations with  computed velocities&lt;br /&gt;
* March in time&lt;br /&gt;
&lt;br /&gt;
Basic boundary conditions&lt;br /&gt;
Wall:   $\b{v}=0$, \[\frac{\partial p}{\partial \hat{n}}=\left( \nabla \cdot \left( \nu \nabla \b{v} \right)+\b{f} \right)\cdot \hat{n}\]&lt;br /&gt;
Inlet:  $\b{v}=\b{a}$, \[\frac{\partial p}{\partial \hat{n}}=\left( \nabla \cdot \left( \nu \nabla \b{v} \right)+\b{f}-\nabla \cdot (\rho \b{v}\b{v})-\rho \frac{\partial \b{v}}{\partial t} \right)\cdot \hat{n}\]&lt;br /&gt;
&lt;br /&gt;
Above system can be linearized (advection term) and solved either explicitly or implicitly.&lt;br /&gt;
&lt;br /&gt;
Further reading:&lt;br /&gt;
&lt;br /&gt;
W. D. Henshaw, A fourth-order accurate method for the incompressible Navier–Stokes equations on overlapping grids, J. Comput. Phys. 113, 13 (1994)&lt;br /&gt;
&lt;br /&gt;
J. C. Strikwerda, Finite difference methods for the Stokes and Navier–Stokes equations, SIAM J. Sci. Stat.&lt;br /&gt;
Comput. 5(1), 56 (1984)&lt;br /&gt;
&lt;br /&gt;
== Explicit Pressure correction ==&lt;br /&gt;
Another possibility is to solve pressure correction equation. Again Consider the momentum equation and mass continuity and discretize it explicitly&lt;br /&gt;
\[\frac{{{\b{v}}_{2}}-{{\b{v}}_{1}}}{\Delta t}=-\frac{1}{\rho }\nabla {{p}_{1}}-({{\b{v}}_{1}}\nabla )\cdot {{\b{v}}_{1}}+\nu {{\nabla }^{2}}{{\b{v}}_{1}}+\b{f}\]&lt;br /&gt;
Computed velocity obviously does not satisfy the mass contunity and therefore let’s call it intermediate velocity. Intermediate velocity is calculated from guessed pressure and old velocity values.&lt;br /&gt;
\[{{\b{v}}^{inter}}=\b{v}_1 + \Delta t\left( -\frac{1}{\rho }\nabla {{p}_{1}}-({{\b{v}}_{1}}\nabla )\cdot {{\b{v}}_{1}}+\nu {{\nabla }^{2}}{{\b{v}}_{1}}+\b{f} \right)\]&lt;br /&gt;
A correction term is added that drives velocity to divergence free field&lt;br /&gt;
\[\nabla \cdot ({{\b{v}}^{inter}}+{{\b{v}}^{corr}})=0 \qquad \to \qquad \nabla \cdot {{\b{v}}^{inter}}=-\nabla \cdot {{\b{v}}^{corr}}\]&lt;br /&gt;
&lt;br /&gt;
Velocity correction is affected only by effect of pressure correction. This fact is obvious due to all terms except gradient of pressure on the right side of equation  are constant.&lt;br /&gt;
\[{{\b{v}}^{corr}}=-\frac{\Delta t}{\rho }\nabla {{p}^{corr}} \]&lt;br /&gt;
&lt;br /&gt;
Note that corrected velocity also satisfies boundary conditions&lt;br /&gt;
\[\b{v}^{iter}+\b{v}^{corr}=\b{v}^{BC}\]&lt;br /&gt;
Applying divergence  and  we get '''pressure correction poisson equation'''.&lt;br /&gt;
\[\,{{\nabla }^{2}}{{p}^{corr}}\,=\frac{\rho }{\Delta t}\nabla \cdot {{\mathbf{v}}^{iter}}\,\]&lt;br /&gt;
&lt;br /&gt;
Boundary conditions can be obtained by mulitplying the equation with a unit normal vector $\b{\hat{n}}$&lt;br /&gt;
\[\frac{\Delta t}{\rho }\frac{\partial {p}^{corr}}{\partial \b{\hat{n}}} = \b{\hat{n}} \cdot \left(\b{v}^{iter} - \b{v}^{BC} \right) \]&lt;br /&gt;
The most straightforward approach, for dirichlet BCs, is to take into account velocity boundary condition in computation of intermediate velocity, and clearly in such cases, pressure boundary condition simplifies to &lt;br /&gt;
\[\frac{\partial p^{corr}}{\partial \b{\hat{n}}} = 0 \]&lt;br /&gt;
As ${{\b{v}}^{\operatorname{int}er}}={{\b{v}}^{BC}}$ . Another option is to explicitely compute intermediate velocity also on boundaries and then correct it through pressure correction.&lt;br /&gt;
&lt;br /&gt;
The pressure poisson equation is, at given boundary conditions, defined only up to a constant. One solution is to select a node and set it to a constant, e.g. p(0, 0) = 0, however much more stable approach is to enforce solution with additional condition, also referred to as a regularization&lt;br /&gt;
	\[\int_{\Omega }^{{}}{pd}\Omega =0\]&lt;br /&gt;
\[\,{{\nabla }^{2}}{{p}^{corr}}\,-\alpha =\frac{\rho }{\Delta t}\nabla \cdot {{\b{v}}^{iter}}\,\]&lt;br /&gt;
Where $\alpha $ stands for Lagrange multiplier. Or in discrete form&lt;br /&gt;
	\[\sum\limits_{i}{p\left( {{x}_{i}} \right)=0}\]&lt;br /&gt;
	\[\b{Mp}-\alpha \b{1}=\frac{\rho }{\Delta t}\nabla \cdot {{\b{v}}^{iter}}\]&lt;br /&gt;
&lt;br /&gt;
where $\b{M}$ holds Laplace shape functions, i.e. the discrete version of Laplace differential operator. &lt;br /&gt;
&lt;br /&gt;
Solution of a system&lt;br /&gt;
&lt;br /&gt;
	\[\left[ \begin{matrix}&lt;br /&gt;
   {{M}_{11}} &amp;amp; .. &amp;amp; {{M}_{1n}} &amp;amp; 1  \\&lt;br /&gt;
   .. &amp;amp; .. &amp;amp; .. &amp;amp; 1  \\&lt;br /&gt;
   {{M}_{n1}} &amp;amp; ... &amp;amp; {{M}_{nn}} &amp;amp; 1  \\&lt;br /&gt;
   1 &amp;amp; 1 &amp;amp; 1 &amp;amp; 0  \\&lt;br /&gt;
\end{matrix} \right]\left[ \begin{matrix}&lt;br /&gt;
   {{p}_{1}}  \\&lt;br /&gt;
   ...  \\&lt;br /&gt;
   {{p}_{n}}  \\&lt;br /&gt;
   \alpha   \\&lt;br /&gt;
\end{matrix} \right]=\frac{\rho }{\Delta t}\left[ \begin{matrix}&lt;br /&gt;
   \nabla \cdot \b{v}_{_{1}}^{\text{iter}}  \\&lt;br /&gt;
   ...  \\&lt;br /&gt;
   \nabla \cdot \b{v}_{n}^{\text{iter}}  \\&lt;br /&gt;
   0  \\&lt;br /&gt;
\end{matrix} \right]\]&lt;br /&gt;
Gives us a solution of pressure correction.&lt;br /&gt;
&lt;br /&gt;
== CBS Algorithm ==&lt;br /&gt;
With explicit temporal discretization problem is formulated as&lt;br /&gt;
\[\b{\hat{v}}={{\b{v}}_{0}}+\Delta t\left( -\nabla {{p}_{0}}+\frac{1}{Re}{{\nabla }^{2}}{{\b{v}}_{0}}-\nabla \cdot ({{\b{v}}_{0}}{{\b{v}}_{0}}) \right)\]&lt;br /&gt;
\[p={{p}_{0}}-\xi \Delta {{t}_{F}}\nabla \b{\hat{v}}+\xi \Delta {{t}_{F}}\Delta t{{\nabla }^{2}}{{\overset{\scriptscriptstyle\frown}{P}}_{0}},\]&lt;br /&gt;
where $\b{\hat{v}}$, $\Delta t$, $\xi$ and $\Delta t_F$ stand for intermediate velocity, time step, relaxation parameter, and artificial time step, respectively, and index 0 stands for previous time / iteration step. First, the intermediate velocity is computed from previous time step. Second, the velocity is driven towards solenoidal field by correcting the pressure. Note that no special boundary conditions for pressure are used, i.e., the pressure on boundaries is computed with the same approach as in the interior of the domain. In general, the internal iteration with an artificial time step is required until the divergence of the velocity field is not below required criteria. However, if one is interested only in a steady-state solution, the internal iteration can be skipped and $\Delta t$ equals $\Delta {{t}_{F}}$. Without internal stepping the transient of the solution is distorted by artificial compressibility effect. This approach is also known as ACM with Characteristics-based discretization of continuity equation, where the relaxation parameter relates to the artificial speed of sound [35].&lt;br /&gt;
&lt;br /&gt;
The relaxation parameter should be set between 1-10, lower number more stable solution.&lt;br /&gt;
&lt;br /&gt;
And also dimensional form&lt;br /&gt;
&lt;br /&gt;
\[p={{p}_{0}}-{{C}^{2}}\Delta {{t}_{F}}\rho \nabla \b{\hat{v}}+{{C}^{2}}\Delta {{t}_{F}}\Delta t{{\nabla }^{2}}{{p}_{0}},\]&lt;br /&gt;
&lt;br /&gt;
Where C is speed of sound [m/s]&lt;br /&gt;
&lt;br /&gt;
== The stream function - vorticity approach ==&lt;br /&gt;
&lt;br /&gt;
In two dimensions, the Navier–Stokes equations can be expressed using the&lt;br /&gt;
stream function $\psi$ and the vorticity $\omega$ in place of the primitive variables $u$, $v$, and&lt;br /&gt;
$p$. This involves the elimination of the pressure $p$, thus yielding one dependent&lt;br /&gt;
variable less. In three dimensions, however, this formulation leads to six unknowns&lt;br /&gt;
rather than four (in primitive variables), which makes this approach less attractive&lt;br /&gt;
for that case.&lt;br /&gt;
&lt;br /&gt;
In the following, we briefly derive the resulting two-dimensional equations for&lt;br /&gt;
$\psi$ and $\omega$. We begin by considering the momentum equations:&lt;br /&gt;
\begin{align}&lt;br /&gt;
\frac{\partial u}{\partial t} + u \frac{\partial u}{\partial x} + v \frac{\partial u}{\partial y}&amp;amp; = -\frac{1}{\rho}\frac{\partial p}{\partial x} + \nu \left(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2}\right) + g_x \\&lt;br /&gt;
\frac{\partial v}{\partial t} + u \frac{\partial v}{\partial x} + v \frac{\partial v}{\partial y}&amp;amp; = -\frac{1}{\rho}\frac{\partial p}{\partial y} + \nu \left(\frac{\partial^2 v}{\partial x^2} + \frac{\partial^2 v}{\partial y^2}\right) + g_y&lt;br /&gt;
\end{align}&lt;br /&gt;
from which we can eliminate the pressure by differentiating the first equation by $y$ and the second by $x$, subtracting the second from the first and then substituting the definition for the vorticity $\omega = \partial u / \partial y - \partial v / \partial x$. In this manner we obtain the equation:&lt;br /&gt;
\[\frac{\partial \omega}{\partial t} + \frac{\partial u}{\partial x} \omega + u \frac{\partial \omega}{\partial x} + \frac{\partial v}{\partial y}\omega + v \frac{\partial \omega}{\partial y} = \nu \left(\frac{\partial^2 \omega}{\partial x^2} + \frac{\partial^2 \omega}{\partial y^2}\right) + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)\]&lt;br /&gt;
&lt;br /&gt;
We can get rid of the terms containing $\partial u / \partial x$ and $\partial v / \partial y$ by using the continuity equation \ref{contuinity}. Finally using the definition for the stream function $\partial \psi / \partial y = u$ and $\partial \psi / \partial x = -v$ we can transform the above equation to what is known as the ''vorticity transport equation'':&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + \frac{\partial \psi}{\partial y}\frac{\partial \omega}{\partial x} - \frac{\partial \psi}{\partial x}\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
Another equation is obtained by inserting the definition of the stream function into that of the vorticity:&lt;br /&gt;
\[\omega = \frac{\partial u}{\partial y} - \frac{\partial v}{\partial x} = \frac{\partial}{\partial y}\frac{\partial \psi}{\partial y} + \frac{\partial }{\partial x}\frac{\partial \psi}{\partial x} = \nabla \psi\]&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Fluid_Mechanics&amp;diff=1725</id>
		<title>Fluid Mechanics</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Fluid_Mechanics&amp;diff=1725"/>
				<updated>2017-12-11T00:05:57Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* The stream function - vorticity approach */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Computational fluid dynamics (CFD) is a field of a great interest among researchers in many fields of science, e.g. studying mathematical fundaments of numerical methods, developing novel physical models, improving computer implementations, and many others. Pushing the limits of all involved fields of science helps community to deepen the understanding of several natural and technological phenomena. Weather forecast, ocean dynamics, water transport, casting, various energetic studies, etc., are just few examples where fluid dynamics plays a crucial role. The core problem of the CFD is solving the Navier-Stokes Equation or its variants, e.g. Darcy or Brinkman equation for flow in porous media. Here, we discuss basic algorithms for solving CFD problems. Check reference list on the [[Main Page]] for more details about related work.&lt;br /&gt;
&lt;br /&gt;
Long story short, we want to solve&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \b{v}}{\partial t}+\nabla \cdot \left( \rho \b{vv}\right)=-\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f}&lt;br /&gt;
\label{NavierStokes}&lt;br /&gt;
\end{equation}&lt;br /&gt;
also known as a Navier-Stokes equation. In many cases we are interested in the incompressible fluids (Ma&amp;lt;0.3), reducing the continuity equation to&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\nabla \cdot \b{v}=0&lt;br /&gt;
\label{contuinity}&lt;br /&gt;
\end{equation}&lt;br /&gt;
which implies a simplification&lt;br /&gt;
&lt;br /&gt;
\[\frac{\partial \left( \rho \b{v} \right)}{\partial t}+\nabla \cdot \left( \rho \b{vv} \right)=\frac{\partial \left( \rho \b{v} \right)}{\partial t}+(\rho \b{v}\cdot \nabla )\cdot \b{v}. \]&lt;br /&gt;
&lt;br /&gt;
Note that the $\b{v}\b{v}$ stands for the tensor or dyadic product \[ \b{v}\b{v} = \b{v}\otimes\b{v} = \b{v}\b{v}^\T = \left[ \begin{matrix}&lt;br /&gt;
   {{v}_{1}}{{v}_{1}} &amp;amp; \cdots &amp;amp; {{v}_{1}}{{v}_{n}}  \\&lt;br /&gt;
   \vdots &amp;amp; \ddots &amp;amp; \vdots  \\&lt;br /&gt;
   {{v}_{n}}{{v}_{1}} &amp;amp; \cdots &amp;amp; {{v}_{n}}{{v}_{n}}  \\&lt;br /&gt;
\end{matrix} \right]\]&lt;br /&gt;
An example of incompressible variant of advection term in 2D would therefore be&lt;br /&gt;
\[\left( \b{v}\cdot \nabla  \right)\b{v}=\left( \left( \begin{matrix}&lt;br /&gt;
   u  \\&lt;br /&gt;
   v  \\&lt;br /&gt;
\end{matrix} \right) \cdot \left( \begin{matrix}&lt;br /&gt;
   \frac{\partial }{\partial x}  \\&lt;br /&gt;
   \frac{\partial }{\partial y}  \\&lt;br /&gt;
\end{matrix} \right) \right)\left( \begin{matrix}&lt;br /&gt;
   u  \\&lt;br /&gt;
   v  \\&lt;br /&gt;
\end{matrix} \right)=\left( \begin{matrix}&lt;br /&gt;
   u\frac{\partial u}{\partial x}+v\frac{\partial u}{\partial y}  \\&lt;br /&gt;
   u\frac{\partial v}{\partial x}+v\frac{\partial v}{\partial y}  \\&lt;br /&gt;
\end{matrix} \right)\]&lt;br /&gt;
&lt;br /&gt;
The goal of CFD is to solve system \ref{NavierStokes} and \ref{contuinity}. It is obvious that a special treatment will be needed to couple both equations. In following discussion we cover some basic approaches, how this can be accomplished.&lt;br /&gt;
&lt;br /&gt;
= Numerical examples =&lt;br /&gt;
== [[Lid driven cavity]] ==&lt;br /&gt;
== [[de Vahl Davis natural convection test]] ==&lt;br /&gt;
&lt;br /&gt;
= Solutions algorithms =&lt;br /&gt;
== Artificial compressibility method ==&lt;br /&gt;
The simplest, completely explicit approach, is an artificial compressibility method (ACM), where a compressibility term is included in the mass continuity&lt;br /&gt;
\[\frac{\partial \b{v}}{\partial t}+(\b{v}\cdot\nabla )\b{v}=-\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f}\]&lt;br /&gt;
\[\frac{ 1 }{ \rho } \frac{\partial \rho }{\partial t}+\nabla \cdot \b{v}=0\]&lt;br /&gt;
\[\frac{ 1 }{ \rho } \frac{\partial \rho }{\partial p}\frac{\partial p}{\partial t}+\nabla \cdot \b{v}=0\]&lt;br /&gt;
Now, the above system can be solved directly.&lt;br /&gt;
&lt;br /&gt;
The addition of the time derivative of the pressure term physically means that waves of finite speed (the propagation of which depends on the magnitude of the ACM)&lt;br /&gt;
are introduced into the flow field as a mean to distribute the pressure within the domain. In a true&lt;br /&gt;
incompressible flow, the pressure field is affected instantaneously throughout the whole domain. In ACM there is a time delay between the flow disturbance and its effect on the&lt;br /&gt;
pressure field. Upon rearranging the equation yields&lt;br /&gt;
\[\frac{\partial p}{\partial t}+\rho {{C}^{2}}\nabla \cdot \b{v}=0\]&lt;br /&gt;
where the continuity equation is perturbed by the quantity $\frac{\partial p}{\partial t}$ denominated herein&lt;br /&gt;
as the AC parameter/artificial sound speed recognized by&lt;br /&gt;
$C$ [m/s] - speed of sound&lt;br /&gt;
\[\frac{1}{C^2}=\frac{\partial \rho }{\partial p}\]&lt;br /&gt;
Or in another words&lt;br /&gt;
\[C^2=\left( \frac{\partial p}{\partial \rho}\right)_S\]&lt;br /&gt;
where $\rho$ is the density of the material. It follows, by replacing partial derivatives, that the isentropic compressibility can be expressed as:&lt;br /&gt;
\[\beta =\frac{1}{\rho {{C}^{2}}}\]&lt;br /&gt;
The evaluation of the local ACM parameter in incompressible flows is inspired by the&lt;br /&gt;
speed of sound computations in compressible flows (for instance, from the perfect gas law).&lt;br /&gt;
However, in the incompressible flow situation, employing such a relation is difficult, but an artificial&lt;br /&gt;
relation can be developed from the convective and diffusive velocities.&lt;br /&gt;
Reverting to the justification of continuity modification, it can be immediately seen that the&lt;br /&gt;
artificial sound speed must be sufficiently large to have a significant regularizing effect and at&lt;br /&gt;
the same time must be as small as possible to minimizing perturbations on the incompressibility&lt;br /&gt;
equation.  Therefore, $C$ influences the convergence rate and stability of the solution method. In other words,&lt;br /&gt;
assists in reducing large disparity in the eigenvalues, leading to a well-conditioned system. &lt;br /&gt;
The $C$ can be '''estimated''' with&lt;br /&gt;
&lt;br /&gt;
\[ C = \beta \max \left( \left|\b{v}\right|_2, \left|\b{v}_{ref}\right|_2 \right),\]&lt;br /&gt;
where $\b{v}_{ref}$ stands for a reference velocity. &lt;br /&gt;
Values for $\beta$ in the range of 1–10 are recommended for better convergence to the steady state at which the&lt;br /&gt;
mass conservation is enforced. In addition, Equation ensures that $C$ does not reach zero at stagnation points&lt;br /&gt;
that cause instabilities in pseudo-time, effecting convergence&lt;br /&gt;
&lt;br /&gt;
Note, that for more complex simulation an internal iteration loops is required before marching in time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;ACM&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ACM BlockDiagram.png|600px]]&lt;br /&gt;
&amp;lt;caption&amp;gt;Scheme of the ACM algorithm &amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Explicit/Implicit pressure calculation ==&lt;br /&gt;
&lt;br /&gt;
Applying divergence on \ref{NavierStokes} yields&lt;br /&gt;
\[\nabla \cdot \frac{\partial \b{v}}{\partial t}+\nabla \cdot (\b{v}\cdot \nabla )\b{v}=-\frac{1}{\rho }{{\nabla }^{2}}p+\nabla \cdot \nu {{\nabla }^{2}}\b{v}+\nabla \cdot \b{f}\]&lt;br /&gt;
&lt;br /&gt;
And since $\nabla \cdot \b{v}=0$ and we can change order in $\nabla \cdot \nabla^2$ and $ \nabla^2 \cdot \nabla$ equation simplifies to&lt;br /&gt;
\[\frac{1}{\rho }{{\nabla }^{2}}p=\nabla \cdot \b{f}-\nabla \cdot (\b{v}\cdot \nabla )\b{v}\]&lt;br /&gt;
Now, we need boundary conditions that can be obtained by multiplying the equation  with a boundary normal vector&lt;br /&gt;
\[\b{\hat{n}}\cdot \left( \frac{\partial \b{v}}{\partial t}+(\b{v}\cdot \nabla )\b{v} \right)=\b{\hat{n}}\cdot \left( -\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{n}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f}-\frac{\partial \b{v}}{\partial t}-(\b{v}\cdot\nabla ) \b{v} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
&lt;br /&gt;
Note that using tangential boundary vector gives equivalent BCs&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{t}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f}-\frac{\partial \b{v}}{\partial t}-(\b{v}\cdot\nabla ) \b{v} \right)\cdot \b{\hat{t}}\]&lt;br /&gt;
For no-slip boundaries BCs simplify to&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{n}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
Otherwise an appropriate expression regarding the velocity can be written, i.e. write full  and taken in account velocity BCs. For example, Neumann velocity $\frac{\partial u}{\partial x}=0$ in 2D&lt;br /&gt;
\[\frac{\partial p}{\partial x}=\left( \nu {{\nabla }^{2}}u + {{f}_{x}}-\frac{\partial u}{\partial t}+v\frac{\partial u}{\partial y} \right)\]&lt;br /&gt;
Note that you allready know everything about the velocity and thus you can compute all the terms explicitely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So the procedure is:&lt;br /&gt;
&lt;br /&gt;
* Compute Navier Stokes either explicitly or implicitly&lt;br /&gt;
* Solve pressure equations with  computed velocities&lt;br /&gt;
* March in time&lt;br /&gt;
&lt;br /&gt;
Basic boundary conditions&lt;br /&gt;
Wall:   $\b{v}=0$, \[\frac{\partial p}{\partial \hat{n}}=\left( \nabla \cdot \left( \nu \nabla \b{v} \right)+\b{f} \right)\cdot \hat{n}\]&lt;br /&gt;
Inlet:  $\b{v}=\b{a}$, \[\frac{\partial p}{\partial \hat{n}}=\left( \nabla \cdot \left( \nu \nabla \b{v} \right)+\b{f}-\nabla \cdot (\rho \b{v}\b{v})-\rho \frac{\partial \b{v}}{\partial t} \right)\cdot \hat{n}\]&lt;br /&gt;
&lt;br /&gt;
Above system can be linearized (advection term) and solved either explicitly or implicitly.&lt;br /&gt;
&lt;br /&gt;
Further reading:&lt;br /&gt;
&lt;br /&gt;
W. D. Henshaw, A fourth-order accurate method for the incompressible Navier–Stokes equations on overlapping grids, J. Comput. Phys. 113, 13 (1994)&lt;br /&gt;
&lt;br /&gt;
J. C. Strikwerda, Finite difference methods for the Stokes and Navier–Stokes equations, SIAM J. Sci. Stat.&lt;br /&gt;
Comput. 5(1), 56 (1984)&lt;br /&gt;
&lt;br /&gt;
== Explicit Pressure correction ==&lt;br /&gt;
Another possibility is to solve pressure correction equation. Again Consider the momentum equation and mass continuity and discretize it explicitly&lt;br /&gt;
\[\frac{{{\b{v}}_{2}}-{{\b{v}}_{1}}}{\Delta t}=-\frac{1}{\rho }\nabla {{p}_{1}}-({{\b{v}}_{1}}\nabla )\cdot {{\b{v}}_{1}}+\nu {{\nabla }^{2}}{{\b{v}}_{1}}+\b{f}\]&lt;br /&gt;
Computed velocity obviously does not satisfy the mass contunity and therefore let’s call it intermediate velocity. Intermediate velocity is calculated from guessed pressure and old velocity values.&lt;br /&gt;
\[{{\b{v}}^{inter}}=\b{v}_1 + \Delta t\left( -\frac{1}{\rho }\nabla {{p}_{1}}-({{\b{v}}_{1}}\nabla )\cdot {{\b{v}}_{1}}+\nu {{\nabla }^{2}}{{\b{v}}_{1}}+\b{f} \right)\]&lt;br /&gt;
A correction term is added that drives velocity to divergence free field&lt;br /&gt;
\[\nabla \cdot ({{\b{v}}^{inter}}+{{\b{v}}^{corr}})=0 \qquad \to \qquad \nabla \cdot {{\b{v}}^{inter}}=-\nabla \cdot {{\b{v}}^{corr}}\]&lt;br /&gt;
&lt;br /&gt;
Velocity correction is affected only by effect of pressure correction. This fact is obvious due to all terms except gradient of pressure on the right side of equation  are constant.&lt;br /&gt;
\[{{\b{v}}^{corr}}=-\frac{\Delta t}{\rho }\nabla {{p}^{corr}} \]&lt;br /&gt;
&lt;br /&gt;
Note that corrected velocity also satisfies boundary conditions&lt;br /&gt;
\[\b{v}^{iter}+\b{v}^{corr}=\b{v}^{BC}\]&lt;br /&gt;
Applying divergence  and  we get '''pressure correction poisson equation'''.&lt;br /&gt;
\[\,{{\nabla }^{2}}{{p}^{corr}}\,=\frac{\rho }{\Delta t}\nabla \cdot {{\mathbf{v}}^{iter}}\,\]&lt;br /&gt;
&lt;br /&gt;
Boundary conditions can be obtained by mulitplying the equation with a unit normal vector $\b{\hat{n}}$&lt;br /&gt;
\[\frac{\Delta t}{\rho }\frac{\partial {p}^{corr}}{\partial \b{\hat{n}}} = \b{\hat{n}} \cdot \left(\b{v}^{iter} - \b{v}^{BC} \right) \]&lt;br /&gt;
The most straightforward approach, for dirichlet BCs, is to take into account velocity boundary condition in computation of intermediate velocity, and clearly in such cases, pressure boundary condition simplifies to &lt;br /&gt;
\[\frac{\partial p^{corr}}{\partial \b{\hat{n}}} = 0 \]&lt;br /&gt;
As ${{\b{v}}^{\operatorname{int}er}}={{\b{v}}^{BC}}$ . Another option is to explicitely compute intermediate velocity also on boundaries and then correct it through pressure correction.&lt;br /&gt;
&lt;br /&gt;
The pressure poisson equation is, at given boundary conditions, defined only up to a constant. One solution is to select a node and set it to a constant, e.g. p(0, 0) = 0, however much more stable approach is to enforce solution with additional condition, also referred to as a regularization&lt;br /&gt;
	\[\int_{\Omega }^{{}}{pd}\Omega =0\]&lt;br /&gt;
\[\,{{\nabla }^{2}}{{p}^{corr}}\,-\alpha =\frac{\rho }{\Delta t}\nabla \cdot {{\b{v}}^{iter}}\,\]&lt;br /&gt;
Where $\alpha $ stands for Lagrange multiplier. Or in discrete form&lt;br /&gt;
	\[\sum\limits_{i}{p\left( {{x}_{i}} \right)=0}\]&lt;br /&gt;
	\[\b{Mp}-\alpha \b{1}=\frac{\rho }{\Delta t}\nabla \cdot {{\b{v}}^{iter}}\]&lt;br /&gt;
&lt;br /&gt;
where $\b{M}$ holds Laplace shape functions, i.e. the discrete version of Laplace differential operator. &lt;br /&gt;
&lt;br /&gt;
Solution of a system&lt;br /&gt;
&lt;br /&gt;
	\[\left[ \begin{matrix}&lt;br /&gt;
   {{M}_{11}} &amp;amp; .. &amp;amp; {{M}_{1n}} &amp;amp; 1  \\&lt;br /&gt;
   .. &amp;amp; .. &amp;amp; .. &amp;amp; 1  \\&lt;br /&gt;
   {{M}_{n1}} &amp;amp; ... &amp;amp; {{M}_{nn}} &amp;amp; 1  \\&lt;br /&gt;
   1 &amp;amp; 1 &amp;amp; 1 &amp;amp; 0  \\&lt;br /&gt;
\end{matrix} \right]\left[ \begin{matrix}&lt;br /&gt;
   {{p}_{1}}  \\&lt;br /&gt;
   ...  \\&lt;br /&gt;
   {{p}_{n}}  \\&lt;br /&gt;
   \alpha   \\&lt;br /&gt;
\end{matrix} \right]=\frac{\rho }{\Delta t}\left[ \begin{matrix}&lt;br /&gt;
   \nabla \cdot \b{v}_{_{1}}^{\text{iter}}  \\&lt;br /&gt;
   ...  \\&lt;br /&gt;
   \nabla \cdot \b{v}_{n}^{\text{iter}}  \\&lt;br /&gt;
   0  \\&lt;br /&gt;
\end{matrix} \right]\]&lt;br /&gt;
Gives us a solution of pressure correction.&lt;br /&gt;
&lt;br /&gt;
== CBS Algorithm ==&lt;br /&gt;
With explicit temporal discretization problem is formulated as&lt;br /&gt;
\[\b{\hat{v}}={{\b{v}}_{0}}+\Delta t\left( -\nabla {{p}_{0}}+\frac{1}{Re}{{\nabla }^{2}}{{\b{v}}_{0}}-\nabla \cdot ({{\b{v}}_{0}}{{\b{v}}_{0}}) \right)\]&lt;br /&gt;
\[p={{p}_{0}}-\xi \Delta {{t}_{F}}\nabla \b{\hat{v}}+\xi \Delta {{t}_{F}}\Delta t{{\nabla }^{2}}{{\overset{\scriptscriptstyle\frown}{P}}_{0}},\]&lt;br /&gt;
where $\b{\hat{v}}$, $\Delta t$, $\xi$ and $\Delta t_F$ stand for intermediate velocity, time step, relaxation parameter, and artificial time step, respectively, and index 0 stands for previous time / iteration step. First, the intermediate velocity is computed from previous time step. Second, the velocity is driven towards solenoidal field by correcting the pressure. Note that no special boundary conditions for pressure are used, i.e., the pressure on boundaries is computed with the same approach as in the interior of the domain. In general, the internal iteration with an artificial time step is required until the divergence of the velocity field is not below required criteria. However, if one is interested only in a steady-state solution, the internal iteration can be skipped and $\Delta t$ equals $\Delta {{t}_{F}}$. Without internal stepping the transient of the solution is distorted by artificial compressibility effect. This approach is also known as ACM with Characteristics-based discretization of continuity equation, where the relaxation parameter relates to the artificial speed of sound [35].&lt;br /&gt;
&lt;br /&gt;
The relaxation parameter should be set between 1-10, lower number more stable solution.&lt;br /&gt;
&lt;br /&gt;
And also dimensional form&lt;br /&gt;
&lt;br /&gt;
\[p={{p}_{0}}-{{C}^{2}}\Delta {{t}_{F}}\rho \nabla \b{\hat{v}}+{{C}^{2}}\Delta {{t}_{F}}\Delta t{{\nabla }^{2}}{{p}_{0}},\]&lt;br /&gt;
&lt;br /&gt;
Where C is speed of sound [m/s]&lt;br /&gt;
&lt;br /&gt;
== The stream function - vorticity approach ==&lt;br /&gt;
&lt;br /&gt;
In two dimensions, the Navier–Stokes equations can be expressed using the&lt;br /&gt;
stream function $\psi$ and the vorticity $\omega$ in place of the primitive variables $u$, $v$, and&lt;br /&gt;
$p$. This involves the elimination of the pressure $p$, thus yielding one dependent&lt;br /&gt;
variable less. In three dimensions, however, this formulation leads to six unknowns&lt;br /&gt;
rather than four (in primitive variables), which makes this approach less attractive&lt;br /&gt;
for that case.&lt;br /&gt;
&lt;br /&gt;
In the following, we briefly derive the resulting two-dimensional equations for&lt;br /&gt;
$\psi$ and $\omega$. We begin by considering the momentum equations:&lt;br /&gt;
\begin{align}&lt;br /&gt;
\frac{\partial u}{\partial t} + u \frac{\partial u}{\partial x} + v \frac{\partial u}{\partial y}&amp;amp; = -\frac{1}{\rho}\frac{\partial p}{\partial x} + \nu \left(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2}\right) + g_x \\&lt;br /&gt;
\frac{\partial v}{\partial t} + u \frac{\partial v}{\partial x} + v \frac{\partial v}{\partial y}&amp;amp; = -\frac{1}{\rho}\frac{\partial p}{\partial y} + \nu \left(\frac{\partial^2 v}{\partial x^2} + \frac{\partial^2 v}{\partial y^2}\right) + g_y&lt;br /&gt;
\end{align}&lt;br /&gt;
from which we can eliminate the pressure by differentiating the first equation by $y$ and the second by $x$, subtracting the second from the first and then substituting the definition for vorticity $\omega = \partial u / \partial y - \partial v / \partial x$. In this manner we obtain the equation:&lt;br /&gt;
\[\frac{\partial \omega}{\partial t} + \frac{\partial u}{\partial x} \omega + u \frac{\partial \omega}{\partial x} + \frac{\partial v}{\partial y}\omega + v \frac{\partial \omega}{\partial y} = \nu \left(\frac{\partial^2 \omega}{\partial x^2} + \frac{\partial^2 \omega}{\partial y^2}\right) + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)\]&lt;br /&gt;
&lt;br /&gt;
We can get rid of the terms containing $\partial u / \partial x$ and $\partial v / \partial y$ by using the continuity equation \ref{continuity}. Finally using the definition for the stream function $\partial \psi / \partial y = u$ and $\partial \psi / \partial x = -v$ we can transform the above equation to what is known as the ''vorticity transport equation'':&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \omega}{\partial t} + \frac{\partial \psi}{\partial y}\frac{\partial \omega}{\partial x} - \frac{\partial \psi}{\partial x}\frac{\partial \omega}{\partial y} = \nu \Delta \omega + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)&lt;br /&gt;
\end{equation}&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Fluid_Mechanics&amp;diff=1724</id>
		<title>Fluid Mechanics</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Fluid_Mechanics&amp;diff=1724"/>
				<updated>2017-12-10T23:58:40Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* CBS Algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Computational fluid dynamics (CFD) is a field of a great interest among researchers in many fields of science, e.g. studying mathematical fundaments of numerical methods, developing novel physical models, improving computer implementations, and many others. Pushing the limits of all involved fields of science helps community to deepen the understanding of several natural and technological phenomena. Weather forecast, ocean dynamics, water transport, casting, various energetic studies, etc., are just few examples where fluid dynamics plays a crucial role. The core problem of the CFD is solving the Navier-Stokes Equation or its variants, e.g. Darcy or Brinkman equation for flow in porous media. Here, we discuss basic algorithms for solving CFD problems. Check reference list on the [[Main Page]] for more details about related work.&lt;br /&gt;
&lt;br /&gt;
Long story short, we want to solve&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial \b{v}}{\partial t}+\nabla \cdot \left( \rho \b{vv}\right)=-\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f}&lt;br /&gt;
\label{NavierStokes}&lt;br /&gt;
\end{equation}&lt;br /&gt;
also known as a Navier-Stokes equation. In many cases we are interested in the incompressible fluids (Ma&amp;lt;0.3), reducing the continuity equation to&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\nabla \cdot \b{v}=0&lt;br /&gt;
\label{contuinity}&lt;br /&gt;
\end{equation}&lt;br /&gt;
which implies a simplification&lt;br /&gt;
&lt;br /&gt;
\[\frac{\partial \left( \rho \b{v} \right)}{\partial t}+\nabla \cdot \left( \rho \b{vv} \right)=\frac{\partial \left( \rho \b{v} \right)}{\partial t}+(\rho \b{v}\cdot \nabla )\cdot \b{v}. \]&lt;br /&gt;
&lt;br /&gt;
Note that the $\b{v}\b{v}$ stands for the tensor or dyadic product \[ \b{v}\b{v} = \b{v}\otimes\b{v} = \b{v}\b{v}^\T = \left[ \begin{matrix}&lt;br /&gt;
   {{v}_{1}}{{v}_{1}} &amp;amp; \cdots &amp;amp; {{v}_{1}}{{v}_{n}}  \\&lt;br /&gt;
   \vdots &amp;amp; \ddots &amp;amp; \vdots  \\&lt;br /&gt;
   {{v}_{n}}{{v}_{1}} &amp;amp; \cdots &amp;amp; {{v}_{n}}{{v}_{n}}  \\&lt;br /&gt;
\end{matrix} \right]\]&lt;br /&gt;
An example of incompressible variant of advection term in 2D would therefore be&lt;br /&gt;
\[\left( \b{v}\cdot \nabla  \right)\b{v}=\left( \left( \begin{matrix}&lt;br /&gt;
   u  \\&lt;br /&gt;
   v  \\&lt;br /&gt;
\end{matrix} \right) \cdot \left( \begin{matrix}&lt;br /&gt;
   \frac{\partial }{\partial x}  \\&lt;br /&gt;
   \frac{\partial }{\partial y}  \\&lt;br /&gt;
\end{matrix} \right) \right)\left( \begin{matrix}&lt;br /&gt;
   u  \\&lt;br /&gt;
   v  \\&lt;br /&gt;
\end{matrix} \right)=\left( \begin{matrix}&lt;br /&gt;
   u\frac{\partial u}{\partial x}+v\frac{\partial u}{\partial y}  \\&lt;br /&gt;
   u\frac{\partial v}{\partial x}+v\frac{\partial v}{\partial y}  \\&lt;br /&gt;
\end{matrix} \right)\]&lt;br /&gt;
&lt;br /&gt;
The goal of CFD is to solve system \ref{NavierStokes} and \ref{contuinity}. It is obvious that a special treatment will be needed to couple both equations. In following discussion we cover some basic approaches, how this can be accomplished.&lt;br /&gt;
&lt;br /&gt;
= Numerical examples =&lt;br /&gt;
== [[Lid driven cavity]] ==&lt;br /&gt;
== [[de Vahl Davis natural convection test]] ==&lt;br /&gt;
&lt;br /&gt;
= Solutions algorithms =&lt;br /&gt;
== Artificial compressibility method ==&lt;br /&gt;
The simplest, completely explicit approach, is an artificial compressibility method (ACM), where a compressibility term is included in the mass continuity&lt;br /&gt;
\[\frac{\partial \b{v}}{\partial t}+(\b{v}\cdot\nabla )\b{v}=-\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f}\]&lt;br /&gt;
\[\frac{ 1 }{ \rho } \frac{\partial \rho }{\partial t}+\nabla \cdot \b{v}=0\]&lt;br /&gt;
\[\frac{ 1 }{ \rho } \frac{\partial \rho }{\partial p}\frac{\partial p}{\partial t}+\nabla \cdot \b{v}=0\]&lt;br /&gt;
Now, the above system can be solved directly.&lt;br /&gt;
&lt;br /&gt;
The addition of the time derivative of the pressure term physically means that waves of finite speed (the propagation of which depends on the magnitude of the ACM)&lt;br /&gt;
are introduced into the flow field as a mean to distribute the pressure within the domain. In a true&lt;br /&gt;
incompressible flow, the pressure field is affected instantaneously throughout the whole domain. In ACM there is a time delay between the flow disturbance and its effect on the&lt;br /&gt;
pressure field. Upon rearranging the equation yields&lt;br /&gt;
\[\frac{\partial p}{\partial t}+\rho {{C}^{2}}\nabla \cdot \b{v}=0\]&lt;br /&gt;
where the continuity equation is perturbed by the quantity $\frac{\partial p}{\partial t}$ denominated herein&lt;br /&gt;
as the AC parameter/artificial sound speed recognized by&lt;br /&gt;
$C$ [m/s] - speed of sound&lt;br /&gt;
\[\frac{1}{C^2}=\frac{\partial \rho }{\partial p}\]&lt;br /&gt;
Or in another words&lt;br /&gt;
\[C^2=\left( \frac{\partial p}{\partial \rho}\right)_S\]&lt;br /&gt;
where $\rho$ is the density of the material. It follows, by replacing partial derivatives, that the isentropic compressibility can be expressed as:&lt;br /&gt;
\[\beta =\frac{1}{\rho {{C}^{2}}}\]&lt;br /&gt;
The evaluation of the local ACM parameter in incompressible flows is inspired by the&lt;br /&gt;
speed of sound computations in compressible flows (for instance, from the perfect gas law).&lt;br /&gt;
However, in the incompressible flow situation, employing such a relation is difficult, but an artificial&lt;br /&gt;
relation can be developed from the convective and diffusive velocities.&lt;br /&gt;
Reverting to the justification of continuity modification, it can be immediately seen that the&lt;br /&gt;
artificial sound speed must be sufficiently large to have a significant regularizing effect and at&lt;br /&gt;
the same time must be as small as possible to minimizing perturbations on the incompressibility&lt;br /&gt;
equation.  Therefore, $C$ influences the convergence rate and stability of the solution method. In other words,&lt;br /&gt;
assists in reducing large disparity in the eigenvalues, leading to a well-conditioned system. &lt;br /&gt;
The $C$ can be '''estimated''' with&lt;br /&gt;
&lt;br /&gt;
\[ C = \beta \max \left( \left|\b{v}\right|_2, \left|\b{v}_{ref}\right|_2 \right),\]&lt;br /&gt;
where $\b{v}_{ref}$ stands for a reference velocity. &lt;br /&gt;
Values for $\beta$ in the range of 1–10 are recommended for better convergence to the steady state at which the&lt;br /&gt;
mass conservation is enforced. In addition, Equation ensures that $C$ does not reach zero at stagnation points&lt;br /&gt;
that cause instabilities in pseudo-time, effecting convergence&lt;br /&gt;
&lt;br /&gt;
Note, that for more complex simulation an internal iteration loops is required before marching in time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;ACM&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ACM BlockDiagram.png|600px]]&lt;br /&gt;
&amp;lt;caption&amp;gt;Scheme of the ACM algorithm &amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Explicit/Implicit pressure calculation ==&lt;br /&gt;
&lt;br /&gt;
Applying divergence on \ref{NavierStokes} yields&lt;br /&gt;
\[\nabla \cdot \frac{\partial \b{v}}{\partial t}+\nabla \cdot (\b{v}\cdot \nabla )\b{v}=-\frac{1}{\rho }{{\nabla }^{2}}p+\nabla \cdot \nu {{\nabla }^{2}}\b{v}+\nabla \cdot \b{f}\]&lt;br /&gt;
&lt;br /&gt;
And since $\nabla \cdot \b{v}=0$ and we can change order in $\nabla \cdot \nabla^2$ and $ \nabla^2 \cdot \nabla$ equation simplifies to&lt;br /&gt;
\[\frac{1}{\rho }{{\nabla }^{2}}p=\nabla \cdot \b{f}-\nabla \cdot (\b{v}\cdot \nabla )\b{v}\]&lt;br /&gt;
Now, we need boundary conditions that can be obtained by multiplying the equation  with a boundary normal vector&lt;br /&gt;
\[\b{\hat{n}}\cdot \left( \frac{\partial \b{v}}{\partial t}+(\b{v}\cdot \nabla )\b{v} \right)=\b{\hat{n}}\cdot \left( -\frac{1}{\rho }\nabla p+\nu {{\nabla }^{2}}\b{v}+\b{f} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{n}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f}-\frac{\partial \b{v}}{\partial t}-(\b{v}\cdot\nabla ) \b{v} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
&lt;br /&gt;
Note that using tangential boundary vector gives equivalent BCs&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{t}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f}-\frac{\partial \b{v}}{\partial t}-(\b{v}\cdot\nabla ) \b{v} \right)\cdot \b{\hat{t}}\]&lt;br /&gt;
For no-slip boundaries BCs simplify to&lt;br /&gt;
\[\frac{\partial p}{\partial \b{\hat{n}}}=\left( \nu {{\nabla }^{2}}\b{v}+\b{f} \right)\cdot \b{\hat{n}}\]&lt;br /&gt;
Otherwise an appropriate expression regarding the velocity can be written, i.e. write full  and taken in account velocity BCs. For example, Neumann velocity $\frac{\partial u}{\partial x}=0$ in 2D&lt;br /&gt;
\[\frac{\partial p}{\partial x}=\left( \nu {{\nabla }^{2}}u + {{f}_{x}}-\frac{\partial u}{\partial t}+v\frac{\partial u}{\partial y} \right)\]&lt;br /&gt;
Note that you allready know everything about the velocity and thus you can compute all the terms explicitely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So the procedure is:&lt;br /&gt;
&lt;br /&gt;
* Compute Navier Stokes either explicitly or implicitly&lt;br /&gt;
* Solve pressure equations with  computed velocities&lt;br /&gt;
* March in time&lt;br /&gt;
&lt;br /&gt;
Basic boundary conditions&lt;br /&gt;
Wall:   $\b{v}=0$, \[\frac{\partial p}{\partial \hat{n}}=\left( \nabla \cdot \left( \nu \nabla \b{v} \right)+\b{f} \right)\cdot \hat{n}\]&lt;br /&gt;
Inlet:  $\b{v}=\b{a}$, \[\frac{\partial p}{\partial \hat{n}}=\left( \nabla \cdot \left( \nu \nabla \b{v} \right)+\b{f}-\nabla \cdot (\rho \b{v}\b{v})-\rho \frac{\partial \b{v}}{\partial t} \right)\cdot \hat{n}\]&lt;br /&gt;
&lt;br /&gt;
Above system can be linearized (advection term) and solved either explicitly or implicitly.&lt;br /&gt;
&lt;br /&gt;
Further reading:&lt;br /&gt;
&lt;br /&gt;
W. D. Henshaw, A fourth-order accurate method for the incompressible Navier–Stokes equations on overlapping grids, J. Comput. Phys. 113, 13 (1994)&lt;br /&gt;
&lt;br /&gt;
J. C. Strikwerda, Finite difference methods for the Stokes and Navier–Stokes equations, SIAM J. Sci. Stat.&lt;br /&gt;
Comput. 5(1), 56 (1984)&lt;br /&gt;
&lt;br /&gt;
== Explicit Pressure correction ==&lt;br /&gt;
Another possibility is to solve pressure correction equation. Again Consider the momentum equation and mass continuity and discretize it explicitly&lt;br /&gt;
\[\frac{{{\b{v}}_{2}}-{{\b{v}}_{1}}}{\Delta t}=-\frac{1}{\rho }\nabla {{p}_{1}}-({{\b{v}}_{1}}\nabla )\cdot {{\b{v}}_{1}}+\nu {{\nabla }^{2}}{{\b{v}}_{1}}+\b{f}\]&lt;br /&gt;
Computed velocity obviously does not satisfy the mass contunity and therefore let’s call it intermediate velocity. Intermediate velocity is calculated from guessed pressure and old velocity values.&lt;br /&gt;
\[{{\b{v}}^{inter}}=\b{v}_1 + \Delta t\left( -\frac{1}{\rho }\nabla {{p}_{1}}-({{\b{v}}_{1}}\nabla )\cdot {{\b{v}}_{1}}+\nu {{\nabla }^{2}}{{\b{v}}_{1}}+\b{f} \right)\]&lt;br /&gt;
A correction term is added that drives velocity to divergence free field&lt;br /&gt;
\[\nabla \cdot ({{\b{v}}^{inter}}+{{\b{v}}^{corr}})=0 \qquad \to \qquad \nabla \cdot {{\b{v}}^{inter}}=-\nabla \cdot {{\b{v}}^{corr}}\]&lt;br /&gt;
&lt;br /&gt;
Velocity correction is affected only by effect of pressure correction. This fact is obvious due to all terms except gradient of pressure on the right side of equation  are constant.&lt;br /&gt;
\[{{\b{v}}^{corr}}=-\frac{\Delta t}{\rho }\nabla {{p}^{corr}} \]&lt;br /&gt;
&lt;br /&gt;
Note that corrected velocity also satisfies boundary conditions&lt;br /&gt;
\[\b{v}^{iter}+\b{v}^{corr}=\b{v}^{BC}\]&lt;br /&gt;
Applying divergence  and  we get '''pressure correction poisson equation'''.&lt;br /&gt;
\[\,{{\nabla }^{2}}{{p}^{corr}}\,=\frac{\rho }{\Delta t}\nabla \cdot {{\mathbf{v}}^{iter}}\,\]&lt;br /&gt;
&lt;br /&gt;
Boundary conditions can be obtained by mulitplying the equation with a unit normal vector $\b{\hat{n}}$&lt;br /&gt;
\[\frac{\Delta t}{\rho }\frac{\partial {p}^{corr}}{\partial \b{\hat{n}}} = \b{\hat{n}} \cdot \left(\b{v}^{iter} - \b{v}^{BC} \right) \]&lt;br /&gt;
The most straightforward approach, for dirichlet BCs, is to take into account velocity boundary condition in computation of intermediate velocity, and clearly in such cases, pressure boundary condition simplifies to &lt;br /&gt;
\[\frac{\partial p^{corr}}{\partial \b{\hat{n}}} = 0 \]&lt;br /&gt;
As ${{\b{v}}^{\operatorname{int}er}}={{\b{v}}^{BC}}$ . Another option is to explicitely compute intermediate velocity also on boundaries and then correct it through pressure correction.&lt;br /&gt;
&lt;br /&gt;
The pressure poisson equation is, at given boundary conditions, defined only up to a constant. One solution is to select a node and set it to a constant, e.g. p(0, 0) = 0, however much more stable approach is to enforce solution with additional condition, also referred to as a regularization&lt;br /&gt;
	\[\int_{\Omega }^{{}}{pd}\Omega =0\]&lt;br /&gt;
\[\,{{\nabla }^{2}}{{p}^{corr}}\,-\alpha =\frac{\rho }{\Delta t}\nabla \cdot {{\b{v}}^{iter}}\,\]&lt;br /&gt;
Where $\alpha $ stands for Lagrange multiplier. Or in discrete form&lt;br /&gt;
	\[\sum\limits_{i}{p\left( {{x}_{i}} \right)=0}\]&lt;br /&gt;
	\[\b{Mp}-\alpha \b{1}=\frac{\rho }{\Delta t}\nabla \cdot {{\b{v}}^{iter}}\]&lt;br /&gt;
&lt;br /&gt;
where $\b{M}$ holds Laplace shape functions, i.e. the discrete version of Laplace differential operator. &lt;br /&gt;
&lt;br /&gt;
Solution of a system&lt;br /&gt;
&lt;br /&gt;
	\[\left[ \begin{matrix}&lt;br /&gt;
   {{M}_{11}} &amp;amp; .. &amp;amp; {{M}_{1n}} &amp;amp; 1  \\&lt;br /&gt;
   .. &amp;amp; .. &amp;amp; .. &amp;amp; 1  \\&lt;br /&gt;
   {{M}_{n1}} &amp;amp; ... &amp;amp; {{M}_{nn}} &amp;amp; 1  \\&lt;br /&gt;
   1 &amp;amp; 1 &amp;amp; 1 &amp;amp; 0  \\&lt;br /&gt;
\end{matrix} \right]\left[ \begin{matrix}&lt;br /&gt;
   {{p}_{1}}  \\&lt;br /&gt;
   ...  \\&lt;br /&gt;
   {{p}_{n}}  \\&lt;br /&gt;
   \alpha   \\&lt;br /&gt;
\end{matrix} \right]=\frac{\rho }{\Delta t}\left[ \begin{matrix}&lt;br /&gt;
   \nabla \cdot \b{v}_{_{1}}^{\text{iter}}  \\&lt;br /&gt;
   ...  \\&lt;br /&gt;
   \nabla \cdot \b{v}_{n}^{\text{iter}}  \\&lt;br /&gt;
   0  \\&lt;br /&gt;
\end{matrix} \right]\]&lt;br /&gt;
Gives us a solution of pressure correction.&lt;br /&gt;
&lt;br /&gt;
== CBS Algorithm ==&lt;br /&gt;
With explicit temporal discretization problem is formulated as&lt;br /&gt;
\[\b{\hat{v}}={{\b{v}}_{0}}+\Delta t\left( -\nabla {{p}_{0}}+\frac{1}{Re}{{\nabla }^{2}}{{\b{v}}_{0}}-\nabla \cdot ({{\b{v}}_{0}}{{\b{v}}_{0}}) \right)\]&lt;br /&gt;
\[p={{p}_{0}}-\xi \Delta {{t}_{F}}\nabla \b{\hat{v}}+\xi \Delta {{t}_{F}}\Delta t{{\nabla }^{2}}{{\overset{\scriptscriptstyle\frown}{P}}_{0}},\]&lt;br /&gt;
where $\b{\hat{v}}$, $\Delta t$, $\xi$ and $\Delta t_F$ stand for intermediate velocity, time step, relaxation parameter, and artificial time step, respectively, and index 0 stands for previous time / iteration step. First, the intermediate velocity is computed from previous time step. Second, the velocity is driven towards solenoidal field by correcting the pressure. Note that no special boundary conditions for pressure are used, i.e., the pressure on boundaries is computed with the same approach as in the interior of the domain. In general, the internal iteration with an artificial time step is required until the divergence of the velocity field is not below required criteria. However, if one is interested only in a steady-state solution, the internal iteration can be skipped and $\Delta t$ equals $\Delta {{t}_{F}}$. Without internal stepping the transient of the solution is distorted by artificial compressibility effect. This approach is also known as ACM with Characteristics-based discretization of continuity equation, where the relaxation parameter relates to the artificial speed of sound [35].&lt;br /&gt;
&lt;br /&gt;
The relaxation parameter should be set between 1-10, lower number more stable solution.&lt;br /&gt;
&lt;br /&gt;
And also dimensional form&lt;br /&gt;
&lt;br /&gt;
\[p={{p}_{0}}-{{C}^{2}}\Delta {{t}_{F}}\rho \nabla \b{\hat{v}}+{{C}^{2}}\Delta {{t}_{F}}\Delta t{{\nabla }^{2}}{{p}_{0}},\]&lt;br /&gt;
&lt;br /&gt;
Where C is speed of sound [m/s]&lt;br /&gt;
&lt;br /&gt;
== The stream function - vorticity approach ==&lt;br /&gt;
&lt;br /&gt;
In two dimensions, the Navier–Stokes equations can be expressed using the&lt;br /&gt;
stream function $\psi$ and the vorticity $\omega$ in place of the primitive variables $u$, $v$, and&lt;br /&gt;
$p$. This involves the elimination of the pressure $p$, thus yielding one dependent&lt;br /&gt;
variable less. In three dimensions, however, this formulation leads to six unknowns&lt;br /&gt;
rather than four (in primitive variables), which makes this approach less attractive&lt;br /&gt;
for that case.&lt;br /&gt;
&lt;br /&gt;
In the following, we briefly derive the resulting two-dimensional equations for&lt;br /&gt;
$\psi$ and $\omega$. We begin by considering the momentum equations:&lt;br /&gt;
\begin{align}&lt;br /&gt;
\frac{\partial u}{\partial t} + u \frac{\partial u}{\partial x} + v \frac{\partial u}{\partial y}&amp;amp; = -\frac{1}{\rho}\frac{\partial p}{\partial x} + \nu \left(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2}\right) + g_x \\&lt;br /&gt;
\frac{\partial v}{\partial t} + u \frac{\partial v}{\partial x} + v \frac{\partial v}{\partial y}&amp;amp; = -\frac{1}{\rho}\frac{\partial p}{\partial y} + \nu \left(\frac{\partial^2 v}{\partial x^2} + \frac{\partial^2 v}{\partial y^2}\right) + g_y&lt;br /&gt;
\end{align}&lt;br /&gt;
from which we can eliminate the pressure by differentiating the first equation by $y$ and the second by $x$, subtracting the second from the first and then substituting the definition for vorticity $\omega = \partial u / \partial y - \partial v / \partial x$. In this manner we obtain the equation:&lt;br /&gt;
\[\frac{\partial \omega}{\partial t} + \frac{\partial u}{\partial x} \omega + u \frac{\partial \omega}{\partial x} + \frac{\partial v}{\partial y}\omega + v \frac{\partial \omega}{\partial y} = \nu \left(\frac{\partial^2 \omega}{\partial x^2} + \frac{\partial^2 \omega}{\partial y^2}\right) + \left(\frac{\partial g_x}{\partial y} - \frac{\partial g_y}{\partial x}\right)\]&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=List_of_wiki_contributors&amp;diff=1589</id>
		<title>List of wiki contributors</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=List_of_wiki_contributors&amp;diff=1589"/>
				<updated>2017-11-16T11:51:39Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Active */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Active ==&lt;br /&gt;
* [http://comms.ijs.si/~gkosec/, Gregor Kosec ] (research associate at JSI)&lt;br /&gt;
* Jure Slak (young researcher at JSI, PhD student at FMF)&lt;br /&gt;
* Maks Kolman (student researcher at JSI, student at FMF)&lt;br /&gt;
* Ivan Pribec (researcher at LBGT, PhD student at TUM) &lt;br /&gt;
* Jure Močnik - Berljavac (student researcher at JSI, student at FMF) &lt;br /&gt;
* Blaž Stojanovič (student researcher at JSI, student at FMF)&lt;br /&gt;
&lt;br /&gt;
== Felt bored and moved on ==&lt;br /&gt;
* Anja Petković (last seen as PhD student at FMF)&lt;br /&gt;
* Jure Lapajne (last seen working on master's thesis at FMF)&lt;br /&gt;
* Matjaž Ličer (last seen at Slovenian Environmental Agency)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''JSI - Jozef Stefan Institute&lt;br /&gt;
&lt;br /&gt;
''FMF - Faculty of Mathematics and Physics&lt;br /&gt;
&lt;br /&gt;
''LBGT - Lehrstuhl für Brau- und Getränketechnologie''&lt;br /&gt;
&lt;br /&gt;
''TUM - Technische Universität München''&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Integrators_for_time_stepping&amp;diff=1555</id>
		<title>Integrators for time stepping</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Integrators_for_time_stepping&amp;diff=1555"/>
				<updated>2017-11-13T22:02:26Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to solve ordinary differential equations numerically with examples from our library. &lt;br /&gt;
&lt;br /&gt;
== Introduction and notation ==&lt;br /&gt;
&lt;br /&gt;
We are solving an initial value problem, given as &lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
\begin{align*}&lt;br /&gt;
  \dot{y}(t) &amp;amp;= f(t, y) \\&lt;br /&gt;
  y(t_0) &amp;amp;= y_0&lt;br /&gt;
\end{align*}&lt;br /&gt;
$&lt;br /&gt;
&lt;br /&gt;
where $y$ is the unknown (possibly vector) function, $t_0$ is the start time, $f$ is the derivative (the functions we wish to integrate) and $y_0$ is the initial value of $y$.&lt;br /&gt;
Numerically, we usually choose a time step $\Delta t$ and integrate the function up to a certain time $t_{\max}$. Times os subsequent time steps are denoted with $t_i$ and function values with $y_i$. &lt;br /&gt;
&lt;br /&gt;
The simplest method is explicit Euler's method:&lt;br /&gt;
$y_{n+1} = y_{n} + \Delta t f(t, y_n)$&lt;br /&gt;
&lt;br /&gt;
== Explicit (single step) methods ==&lt;br /&gt;
&lt;br /&gt;
A family of single step methods are exaplicit Runge-Kutta methods, which uses intermediate derivative values to give a better estimation of value $y_{n+1}$ on the next step.&lt;br /&gt;
&lt;br /&gt;
It is given by&lt;br /&gt;
&lt;br /&gt;
$y_{n+1} = y_n + h \displaystyle \sum_{i=1}^s \beta_i k_i$&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
\begin{align*}&lt;br /&gt;
 k_1 &amp;amp; = f(t_n, y_n), \\&lt;br /&gt;
 k_2 &amp;amp; = f(t_n+\gamma_2h, y_n+h(\alpha_{21}k_1)), \\&lt;br /&gt;
 k_3 &amp;amp; = f(t_n+\gamma_3h, y_n+h(\alpha_{31}k_1+\alpha_{32}k_2)), \\&lt;br /&gt;
     &amp;amp; \ \ \vdots \\&lt;br /&gt;
 k_s &amp;amp; = f(t_n+\gamma_sh, y_n+h(\alpha_{s1}k_1+\alpha_{s2}k_2+\cdots+\alpha_{s,s-1}k_{s-1})).&lt;br /&gt;
\end{align*}&lt;br /&gt;
$&lt;br /&gt;
&lt;br /&gt;
To specify a particular method, one needs to provide the integer $s$ (the number of stages), and the coefficients $\alpha_{ij}$, $\beta_i$ and $\gamma_i$. This structure is known as the Butcher's tableau of the method: &lt;br /&gt;
$&lt;br /&gt;
\begin{array}{l|l}&lt;br /&gt;
  \gamma &amp;amp; \alpha \\ \hline&lt;br /&gt;
  &amp;amp; \beta^\T&lt;br /&gt;
\end{array}&lt;br /&gt;
$&lt;br /&gt;
&lt;br /&gt;
First order method is the Euler's method above, while methods of very high error are available.&lt;br /&gt;
The most famous is RK4, the Runge Kutta method of fourth order. A more complete list can be found [https://en.wikipedia.org/wiki/List_of_Runge%E2%80%93Kutta_methods here].&lt;br /&gt;
&lt;br /&gt;
Most common methods are implemented in the [http://www-e6.ijs.si/ParallelAndDistributedSystems/MeshlessMachine/technical_docs/html/namespacemm_1_1integrators_1_1Explicit.html Explicit] namespace.&lt;br /&gt;
&lt;br /&gt;
== Explicit multistep methods ==&lt;br /&gt;
These methods are called Adams–Bashforth methods, and need previous $s$ are used to estimate next value with a higher order. These method hope to gain computational efficiency by decreasing the number of function computations needed by using already computed values.&lt;br /&gt;
&lt;br /&gt;
The explicit version is stated as $y_{n+s} = y_{n+s-1} + \sum_{i=1}^s b_i y_{n+s-i}$. The values $b_i$ are called weights.&lt;br /&gt;
&lt;br /&gt;
The drawbacks of these mehtods are that another method of same order is needed to compute the initial time steps and that they can not be easily modified to work with adaptive time steps.&lt;br /&gt;
&lt;br /&gt;
Most common methods are implemented in [http://www-e6.ijs.si/ParallelAndDistributedSystems/MeshlessMachine/technical_docs/html/namespacemm_1_1integrators_1_1ExplicitMultistep.html ExplicitMultistep] namespace.&lt;br /&gt;
&lt;br /&gt;
== Adaptive methods ==&lt;br /&gt;
Adaptive methods estimate the error on each time step and descrease or increase the step as necessary. &lt;br /&gt;
Usually the have some addition parameters, such as $\Delta t_{\max}$ and $\Delta t_{\min}$ representing maximal and minimal allowed time steps and $\varepsilon$, represeting tolrance. &lt;br /&gt;
&lt;br /&gt;
A family of adaptive methods can be derived from Runge Kutta methods above. Using a method of order $k$ and $k+1$, that differ only in weights, called $\beta$ and $\beta^\ast$, error can be estimated using [https://en.wikipedia.org/wiki/Richardson_extrapolation Richardson Extrapolation]:&lt;br /&gt;
&lt;br /&gt;
$e_{n+1} = y_{n+1} - y^*_{n+1} = h\sum_{i=1}^s (\beta_i - \beta^*_i) k_i$.&lt;br /&gt;
&lt;br /&gt;
If $\|e_{n+1}\| &amp;lt; \varepsilon$, time step can be increased, otherwise it is decreased. This cn be achieved by scaling $\Delta t$ in accorance with $\varepsilon / \|e_{n+1}\|$.&lt;br /&gt;
&lt;br /&gt;
These methods are implemented in Matlab as ode45 and similar. They can be found [https://en.wikipedia.org/wiki/List_of_Runge%E2%80%93Kutta_methods#Embedded_methods here], with a sample Matlab implementation of Cash-Karp method [https://github.com/jureslak/numerika-fmf/blob/master/ninde/hw2/CashKarp.m here].&lt;br /&gt;
&lt;br /&gt;
These methods are not implemented yet, but will probably be added in the future.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
Ordinary ODE:&lt;br /&gt;
Solve $\dot{x} = y, \dot{y} = -x$ with $x(0) = 1, y(0) = 0$. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
// define the function&lt;br /&gt;
std::function&amp;lt;Eigen::VectorXd(double, const Eigen::VectorXd&amp;amp;)&amp;gt; func =&lt;br /&gt;
        [](double, const Eigen::VectorXd&amp;amp; y) {&lt;br /&gt;
            Eigen::VectorXd r(2);&lt;br /&gt;
            r(0) = -y(1);&lt;br /&gt;
            r(1) = y(0);&lt;br /&gt;
            return r;&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
double tmax = 2*M_PI;&lt;br /&gt;
double step = 0.1;&lt;br /&gt;
Eigen::VectorXd y0(2); y0 &amp;lt;&amp;lt; 1.0, 0.0;&lt;br /&gt;
auto integrator = integrators::Explicit::RK4().solve(func, 0.0, tmax, step, y0);  // clss representing the method and storing the function and initial conditions.&lt;br /&gt;
&lt;br /&gt;
auto stepper = integrator_rk4.begin();  // iterator over the solver, integrating $f$ step by step&lt;br /&gt;
&lt;br /&gt;
while (stepper_rk4) {  // cast to bool tells us if we are done&lt;br /&gt;
    ++stepper_rk4;&lt;br /&gt;
    // do something with step&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// multiple steppers can exists at the same time&lt;br /&gt;
auto stepper2 = integrator.begin(); &lt;br /&gt;
&lt;br /&gt;
// we can also use range based for loop to integrate by time&lt;br /&gt;
for (auto&amp;amp; step : integrator) {&lt;br /&gt;
   //  do something with step&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Heat equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
// after domain and operators are created&lt;br /&gt;
auto dv_dt = [&amp;amp;](double, const VecXd&amp;amp; y) {&lt;br /&gt;
    Eigen::VectorXd der(y.size());&lt;br /&gt;
    for (int c : interior) {&lt;br /&gt;
        der[c] = op.lap(y, c);&lt;br /&gt;
    }&lt;br /&gt;
    for (int c : boundary) {&lt;br /&gt;
        der[c] = 0;&lt;br /&gt;
    }&lt;br /&gt;
    return der;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
auto integrator = integrators::Explicit::RK4().solve(dv_dt, 0.0, time, dt, T1);  // choose your own integrator&lt;br /&gt;
for (auto&amp;amp; step : integrator) {&lt;br /&gt;
   // do something&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/Lorenz_system Lorenz system:]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// System parameters&lt;br /&gt;
double sigma = 10.;&lt;br /&gt;
double rho = 28.;&lt;br /&gt;
double beta = 8./3.;&lt;br /&gt;
&lt;br /&gt;
auto dy_dt = [&amp;amp;](double, const Vec3d&amp;amp; y) {&lt;br /&gt;
    Vec3d der(3);&lt;br /&gt;
    der(0) = sigma*(y(1)-y(0));&lt;br /&gt;
    der(1) = y(0)*(rho-y(2))-y(1);&lt;br /&gt;
    der(2) = y(0)*y(1)-beta*y(2);&lt;br /&gt;
    return der;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
double dt = 0.001; // Timestep&lt;br /&gt;
Vec3d y0 = {1, 1, 1}; // Initial condition&lt;br /&gt;
&lt;br /&gt;
auto integrator = integrators::Explicit::RK4().solve(dy_dt, 0, 100, dt, y0);&lt;br /&gt;
for (auto&amp;amp; step : integrator) {&lt;br /&gt;
    auto t = step.time();&lt;br /&gt;
    auto y = step.value();&lt;br /&gt;
    // output values&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;figure id=&amp;quot;fig:lorenz_system&amp;quot;&amp;gt;&lt;br /&gt;
[[File:lorenz.png|500px|thumb|upright=2|center|&amp;lt;caption&amp;gt;A sample solution of the Lorenz system for the values $\sigma=10$, $\rho=28$ and $\beta = 8/3$. The two trajectories (one in orange, the other in blue) correspond to two initial points that differ by a small amount in the $z$-coordinate.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&amp;lt;/figure&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Integrators_for_time_stepping&amp;diff=1554</id>
		<title>Integrators for time stepping</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Integrators_for_time_stepping&amp;diff=1554"/>
				<updated>2017-11-13T19:05:44Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to solve ordinary differential equations numerically with examples from our library. &lt;br /&gt;
&lt;br /&gt;
== Introduction and notation ==&lt;br /&gt;
&lt;br /&gt;
We are solving an initial value problem, given as &lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
\begin{align*}&lt;br /&gt;
  \dot{y}(t) &amp;amp;= f(t, y) \\&lt;br /&gt;
  y(t_0) &amp;amp;= y_0&lt;br /&gt;
\end{align*}&lt;br /&gt;
$&lt;br /&gt;
&lt;br /&gt;
where $y$ is the unknown (possibly vector) function, $t_0$ is the start time, $f$ is the derivative (the functions we wish to integrate) and $y_0$ is the initial value of $y$.&lt;br /&gt;
Numerically, we usually choose a time step $\Delta t$ and integrate the function up to a certain time $t_{\max}$. Times os subsequent time steps are denoted with $t_i$ and function values with $y_i$. &lt;br /&gt;
&lt;br /&gt;
The simplest method is explicit Euler's method:&lt;br /&gt;
$y_{n+1} = y_{n} + \Delta t f(t, y_n)$&lt;br /&gt;
&lt;br /&gt;
== Explicit (single step) methods ==&lt;br /&gt;
&lt;br /&gt;
A family of single step methods are exaplicit Runge-Kutta methods, which uses intermediate derivative values to give a better estimation of value $y_{n+1}$ on the next step.&lt;br /&gt;
&lt;br /&gt;
It is given by&lt;br /&gt;
&lt;br /&gt;
$y_{n+1} = y_n + h \displaystyle \sum_{i=1}^s \beta_i k_i$&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
\begin{align*}&lt;br /&gt;
 k_1 &amp;amp; = f(t_n, y_n), \\&lt;br /&gt;
 k_2 &amp;amp; = f(t_n+\gamma_2h, y_n+h(\alpha_{21}k_1)), \\&lt;br /&gt;
 k_3 &amp;amp; = f(t_n+\gamma_3h, y_n+h(\alpha_{31}k_1+\alpha_{32}k_2)), \\&lt;br /&gt;
     &amp;amp; \ \ \vdots \\&lt;br /&gt;
 k_s &amp;amp; = f(t_n+\gamma_sh, y_n+h(\alpha_{s1}k_1+\alpha_{s2}k_2+\cdots+\alpha_{s,s-1}k_{s-1})).&lt;br /&gt;
\end{align*}&lt;br /&gt;
$&lt;br /&gt;
&lt;br /&gt;
To specify a particular method, one needs to provide the integer $s$ (the number of stages), and the coefficients $\alpha_{ij}$, $\beta_i$ and $\gamma_i$. This structure is known as the Butcher's tableau of the method: &lt;br /&gt;
$&lt;br /&gt;
\begin{array}{l|l}&lt;br /&gt;
  \gamma &amp;amp; \alpha \\ \hline&lt;br /&gt;
  &amp;amp; \beta^\T&lt;br /&gt;
\end{array}&lt;br /&gt;
$&lt;br /&gt;
&lt;br /&gt;
First order method is the Euler's method above, while methods of very high error are available.&lt;br /&gt;
The most famous is RK4, the Runge Kutta method of fourth order. A more complete list can be found [https://en.wikipedia.org/wiki/List_of_Runge%E2%80%93Kutta_methods here].&lt;br /&gt;
&lt;br /&gt;
Most common methods are implemented in the [http://www-e6.ijs.si/ParallelAndDistributedSystems/MeshlessMachine/technical_docs/html/namespacemm_1_1integrators_1_1Explicit.html Explicit] namespace.&lt;br /&gt;
&lt;br /&gt;
== Explicit multistep methods ==&lt;br /&gt;
These methods are called Adams–Bashforth methods, and need previous $s$ are used to estimate next value with a higher order. These method hope to gain computational efficiency by decreasing the number of function computations needed by using already computed values.&lt;br /&gt;
&lt;br /&gt;
The explicit version is stated as $y_{n+s} = y_{n+s-1} + \sum_{i=1}^s b_i y_{n+s-i}$. The values $b_i$ are called weights.&lt;br /&gt;
&lt;br /&gt;
The drawbacks of these mehtods are that another method of same order is needed to compute the initial time steps and that they can not be easily modified to work with adaptive time steps.&lt;br /&gt;
&lt;br /&gt;
Most common methods are implemented in [http://www-e6.ijs.si/ParallelAndDistributedSystems/MeshlessMachine/technical_docs/html/namespacemm_1_1integrators_1_1ExplicitMultistep.html ExplicitMultistep] namespace.&lt;br /&gt;
&lt;br /&gt;
== Adaptive methods ==&lt;br /&gt;
Adaptive methods estimate the error on each time step and descrease or increase the step as necessary. &lt;br /&gt;
Usually the have some addition parameters, such as $\Delta t_{\max}$ and $\Delta t_{\min}$ representing maximal and minimal allowed time steps and $\varepsilon$, represeting tolrance. &lt;br /&gt;
&lt;br /&gt;
A family of adaptive methods can be derived from Runge Kutta methods above. Using a method of order $k$ and $k+1$, that differ only in weights, called $\beta$ and $\beta^\ast$, error can be estimated using [https://en.wikipedia.org/wiki/Richardson_extrapolation Richardson Extrapolation]:&lt;br /&gt;
&lt;br /&gt;
$e_{n+1} = y_{n+1} - y^*_{n+1} = h\sum_{i=1}^s (\beta_i - \beta^*_i) k_i$.&lt;br /&gt;
&lt;br /&gt;
If $\|e_{n+1}\| &amp;lt; \varepsilon$, time step can be increased, otherwise it is decreased. This cn be achieved by scaling $\Delta t$ in accorance with $\varepsilon / \|e_{n+1}\|$.&lt;br /&gt;
&lt;br /&gt;
These methods are implemented in Matlab as ode45 and similar. They can be found [https://en.wikipedia.org/wiki/List_of_Runge%E2%80%93Kutta_methods#Embedded_methods here], with a sample Matlab implementation of Cash-Karp method [https://github.com/jureslak/numerika-fmf/blob/master/ninde/hw2/CashKarp.m here].&lt;br /&gt;
&lt;br /&gt;
These methods are not implemented yet, but will probably be added in the future.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
Ordinary ODE:&lt;br /&gt;
Solve $\dot{x} = y, \dot{y} = -x$ with $x(0) = 1, y(0) = 0$. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
// define the function&lt;br /&gt;
std::function&amp;lt;Eigen::VectorXd(double, const Eigen::VectorXd&amp;amp;)&amp;gt; func =&lt;br /&gt;
        [](double, const Eigen::VectorXd&amp;amp; y) {&lt;br /&gt;
            Eigen::VectorXd r(2);&lt;br /&gt;
            r(0) = -y(1);&lt;br /&gt;
            r(1) = y(0);&lt;br /&gt;
            return r;&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
double tmax = 2*M_PI;&lt;br /&gt;
double step = 0.1;&lt;br /&gt;
Eigen::VectorXd y0(2); y0 &amp;lt;&amp;lt; 1.0, 0.0;&lt;br /&gt;
auto integrator = integrators::Explicit::RK4().solve(func, 0.0, tmax, step, y0);  // clss representing the method and storing the function and initial conditions.&lt;br /&gt;
&lt;br /&gt;
auto stepper = integrator_rk4.begin();  // iterator over the solver, integrating $f$ step by step&lt;br /&gt;
&lt;br /&gt;
while (stepper_rk4) {  // cast to bool tells us if we are done&lt;br /&gt;
    ++stepper_rk4;&lt;br /&gt;
    // do something with step&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// multiple steppers can exists at the same time&lt;br /&gt;
auto stepper2 = integrator.begin(); &lt;br /&gt;
&lt;br /&gt;
// we can also use range based for loop to integrate by time&lt;br /&gt;
for (auto&amp;amp; step : integrator) {&lt;br /&gt;
   //  do something with step&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Heat equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
// after domain and operators are created&lt;br /&gt;
auto dv_dt = [&amp;amp;](double, const VecXd&amp;amp; y) {&lt;br /&gt;
    Eigen::VectorXd der(y.size());&lt;br /&gt;
    for (int c : interior) {&lt;br /&gt;
        der[c] = op.lap(y, c);&lt;br /&gt;
    }&lt;br /&gt;
    for (int c : boundary) {&lt;br /&gt;
        der[c] = 0;&lt;br /&gt;
    }&lt;br /&gt;
    return der;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
auto integrator = integrators::Explicit::RK4().solve(dv_dt, 0.0, time, dt, T1);  // choose your own integrator&lt;br /&gt;
for (auto&amp;amp; step : integrator) {&lt;br /&gt;
   // do something&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/Lorenz_system Lorenz system:]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// System parameters&lt;br /&gt;
double sigma = 10.;&lt;br /&gt;
double rho = 28.;&lt;br /&gt;
double beta = 8./3.;&lt;br /&gt;
&lt;br /&gt;
auto dy_dt = [&amp;amp;](double, const Vec3d&amp;amp; y) {&lt;br /&gt;
    Vec3d der(3);&lt;br /&gt;
    der(0) = sigma*(y(1)-y(0));&lt;br /&gt;
    der(1) = y(0)*(rho-y(2))-y(1);&lt;br /&gt;
    der(2) = y(0)*y(1)-beta*y(2);&lt;br /&gt;
    return der;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
double dt = 0.001; // Timestep&lt;br /&gt;
Vec3d y0 = {1, 1, 1}; // Initial condition&lt;br /&gt;
&lt;br /&gt;
auto integrator = integrators::Explicit::RK4().solve(dy_dt, 0, 100, dt, y0);&lt;br /&gt;
for (auto&amp;amp; step : integrator) {&lt;br /&gt;
    auto t = step.time();&lt;br /&gt;
    auto y = step.value();&lt;br /&gt;
    // output values&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:lorenz.png|500px]]&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Integrators_for_time_stepping&amp;diff=1553</id>
		<title>Integrators for time stepping</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Integrators_for_time_stepping&amp;diff=1553"/>
				<updated>2017-11-13T19:05:06Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: Added Lorenz Attractor Example.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to solve ordinary differential equations numerically with examples from our library. &lt;br /&gt;
&lt;br /&gt;
== Introduction and notation ==&lt;br /&gt;
&lt;br /&gt;
We are solving an initial value problem, given as &lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
\begin{align*}&lt;br /&gt;
  \dot{y}(t) &amp;amp;= f(t, y) \\&lt;br /&gt;
  y(t_0) &amp;amp;= y_0&lt;br /&gt;
\end{align*}&lt;br /&gt;
$&lt;br /&gt;
&lt;br /&gt;
where $y$ is the unknown (possibly vector) function, $t_0$ is the start time, $f$ is the derivative (the functions we wish to integrate) and $y_0$ is the initial value of $y$.&lt;br /&gt;
Numerically, we usually choose a time step $\Delta t$ and integrate the function up to a certain time $t_{\max}$. Times os subsequent time steps are denoted with $t_i$ and function values with $y_i$. &lt;br /&gt;
&lt;br /&gt;
The simplest method is explicit Euler's method:&lt;br /&gt;
$y_{n+1} = y_{n} + \Delta t f(t, y_n)$&lt;br /&gt;
&lt;br /&gt;
== Explicit (single step) methods ==&lt;br /&gt;
&lt;br /&gt;
A family of single step methods are exaplicit Runge-Kutta methods, which uses intermediate derivative values to give a better estimation of value $y_{n+1}$ on the next step.&lt;br /&gt;
&lt;br /&gt;
It is given by&lt;br /&gt;
&lt;br /&gt;
$y_{n+1} = y_n + h \displaystyle \sum_{i=1}^s \beta_i k_i$&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
&lt;br /&gt;
$&lt;br /&gt;
\begin{align*}&lt;br /&gt;
 k_1 &amp;amp; = f(t_n, y_n), \\&lt;br /&gt;
 k_2 &amp;amp; = f(t_n+\gamma_2h, y_n+h(\alpha_{21}k_1)), \\&lt;br /&gt;
 k_3 &amp;amp; = f(t_n+\gamma_3h, y_n+h(\alpha_{31}k_1+\alpha_{32}k_2)), \\&lt;br /&gt;
     &amp;amp; \ \ \vdots \\&lt;br /&gt;
 k_s &amp;amp; = f(t_n+\gamma_sh, y_n+h(\alpha_{s1}k_1+\alpha_{s2}k_2+\cdots+\alpha_{s,s-1}k_{s-1})).&lt;br /&gt;
\end{align*}&lt;br /&gt;
$&lt;br /&gt;
&lt;br /&gt;
To specify a particular method, one needs to provide the integer $s$ (the number of stages), and the coefficients $\alpha_{ij}$, $\beta_i$ and $\gamma_i$. This structure is known as the Butcher's tableau of the method: &lt;br /&gt;
$&lt;br /&gt;
\begin{array}{l|l}&lt;br /&gt;
  \gamma &amp;amp; \alpha \\ \hline&lt;br /&gt;
  &amp;amp; \beta^\T&lt;br /&gt;
\end{array}&lt;br /&gt;
$&lt;br /&gt;
&lt;br /&gt;
First order method is the Euler's method above, while methods of very high error are available.&lt;br /&gt;
The most famous is RK4, the Runge Kutta method of fourth order. A more complete list can be found [https://en.wikipedia.org/wiki/List_of_Runge%E2%80%93Kutta_methods here].&lt;br /&gt;
&lt;br /&gt;
Most common methods are implemented in the [http://www-e6.ijs.si/ParallelAndDistributedSystems/MeshlessMachine/technical_docs/html/namespacemm_1_1integrators_1_1Explicit.html Explicit] namespace.&lt;br /&gt;
&lt;br /&gt;
== Explicit multistep methods ==&lt;br /&gt;
These methods are called Adams–Bashforth methods, and need previous $s$ are used to estimate next value with a higher order. These method hope to gain computational efficiency by decreasing the number of function computations needed by using already computed values.&lt;br /&gt;
&lt;br /&gt;
The explicit version is stated as $y_{n+s} = y_{n+s-1} + \sum_{i=1}^s b_i y_{n+s-i}$. The values $b_i$ are called weights.&lt;br /&gt;
&lt;br /&gt;
The drawbacks of these mehtods are that another method of same order is needed to compute the initial time steps and that they can not be easily modified to work with adaptive time steps.&lt;br /&gt;
&lt;br /&gt;
Most common methods are implemented in [http://www-e6.ijs.si/ParallelAndDistributedSystems/MeshlessMachine/technical_docs/html/namespacemm_1_1integrators_1_1ExplicitMultistep.html ExplicitMultistep] namespace.&lt;br /&gt;
&lt;br /&gt;
== Adaptive methods ==&lt;br /&gt;
Adaptive methods estimate the error on each time step and descrease or increase the step as necessary. &lt;br /&gt;
Usually the have some addition parameters, such as $\Delta t_{\max}$ and $\Delta t_{\min}$ representing maximal and minimal allowed time steps and $\varepsilon$, represeting tolrance. &lt;br /&gt;
&lt;br /&gt;
A family of adaptive methods can be derived from Runge Kutta methods above. Using a method of order $k$ and $k+1$, that differ only in weights, called $\beta$ and $\beta^\ast$, error can be estimated using [https://en.wikipedia.org/wiki/Richardson_extrapolation Richardson Extrapolation]:&lt;br /&gt;
&lt;br /&gt;
$e_{n+1} = y_{n+1} - y^*_{n+1} = h\sum_{i=1}^s (\beta_i - \beta^*_i) k_i$.&lt;br /&gt;
&lt;br /&gt;
If $\|e_{n+1}\| &amp;lt; \varepsilon$, time step can be increased, otherwise it is decreased. This cn be achieved by scaling $\Delta t$ in accorance with $\varepsilon / \|e_{n+1}\|$.&lt;br /&gt;
&lt;br /&gt;
These methods are implemented in Matlab as ode45 and similar. They can be found [https://en.wikipedia.org/wiki/List_of_Runge%E2%80%93Kutta_methods#Embedded_methods here], with a sample Matlab implementation of Cash-Karp method [https://github.com/jureslak/numerika-fmf/blob/master/ninde/hw2/CashKarp.m here].&lt;br /&gt;
&lt;br /&gt;
These methods are not implemented yet, but will probably be added in the future.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
Ordinary ODE:&lt;br /&gt;
Solve $\dot{x} = y, \dot{y} = -x$ with $x(0) = 1, y(0) = 0$. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
// define the function&lt;br /&gt;
std::function&amp;lt;Eigen::VectorXd(double, const Eigen::VectorXd&amp;amp;)&amp;gt; func =&lt;br /&gt;
        [](double, const Eigen::VectorXd&amp;amp; y) {&lt;br /&gt;
            Eigen::VectorXd r(2);&lt;br /&gt;
            r(0) = -y(1);&lt;br /&gt;
            r(1) = y(0);&lt;br /&gt;
            return r;&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
double tmax = 2*M_PI;&lt;br /&gt;
double step = 0.1;&lt;br /&gt;
Eigen::VectorXd y0(2); y0 &amp;lt;&amp;lt; 1.0, 0.0;&lt;br /&gt;
auto integrator = integrators::Explicit::RK4().solve(func, 0.0, tmax, step, y0);  // clss representing the method and storing the function and initial conditions.&lt;br /&gt;
&lt;br /&gt;
auto stepper = integrator_rk4.begin();  // iterator over the solver, integrating $f$ step by step&lt;br /&gt;
&lt;br /&gt;
while (stepper_rk4) {  // cast to bool tells us if we are done&lt;br /&gt;
    ++stepper_rk4;&lt;br /&gt;
    // do something with step&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// multiple steppers can exists at the same time&lt;br /&gt;
auto stepper2 = integrator.begin(); &lt;br /&gt;
&lt;br /&gt;
// we can also use range based for loop to integrate by time&lt;br /&gt;
for (auto&amp;amp; step : integrator) {&lt;br /&gt;
   //  do something with step&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Heat equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
// after domain and operators are created&lt;br /&gt;
auto dv_dt = [&amp;amp;](double, const VecXd&amp;amp; y) {&lt;br /&gt;
    Eigen::VectorXd der(y.size());&lt;br /&gt;
    for (int c : interior) {&lt;br /&gt;
        der[c] = op.lap(y, c);&lt;br /&gt;
    }&lt;br /&gt;
    for (int c : boundary) {&lt;br /&gt;
        der[c] = 0;&lt;br /&gt;
    }&lt;br /&gt;
    return der;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
auto integrator = integrators::Explicit::RK4().solve(dv_dt, 0.0, time, dt, T1);  // choose your own integrator&lt;br /&gt;
for (auto&amp;amp; step : integrator) {&lt;br /&gt;
   // do something&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/Lorenz_system Lorenz Attractor]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// System parameters&lt;br /&gt;
double sigma = 10.;&lt;br /&gt;
double rho = 28.;&lt;br /&gt;
double beta = 8./3.;&lt;br /&gt;
&lt;br /&gt;
// The Lorenz System&lt;br /&gt;
auto dy_dt = [&amp;amp;](double, const Vec3d&amp;amp; y) {&lt;br /&gt;
    Vec3d der(3);&lt;br /&gt;
    der(0) = sigma*(y(1)-y(0));&lt;br /&gt;
    der(1) = y(0)*(rho-y(2))-y(1);&lt;br /&gt;
    der(2) = y(0)*y(1)-beta*y(2);&lt;br /&gt;
    return der;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
double dt = 0.001; // Timestep&lt;br /&gt;
Vec3d y0 = {1, 1, 1}; // Initial condition&lt;br /&gt;
&lt;br /&gt;
auto integrator = integrators::Explicit::RK4().solve(dy_dt, 0, 100, dt, y0);&lt;br /&gt;
for (auto&amp;amp; step : integrator) {&lt;br /&gt;
    auto t = step.time();&lt;br /&gt;
    auto y = step.value();&lt;br /&gt;
    // output values&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:lorenz.png|500px]]&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=File:Lorenz.png&amp;diff=1552</id>
		<title>File:Lorenz.png</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=File:Lorenz.png&amp;diff=1552"/>
				<updated>2017-11-13T19:02:17Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: File uploaded with MsUpload&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;File uploaded with MsUpload&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Solid_Mechanics&amp;diff=1440</id>
		<title>Solid Mechanics</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Solid_Mechanics&amp;diff=1440"/>
				<updated>2017-10-08T16:33:18Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Von Mises stress */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Case studies =&lt;br /&gt;
&lt;br /&gt;
The following pages describe several case studies in the field of elastostatics and elastodynamics. The subpages include the problem description (equations and boundary conditions), analytical solutions if obtainable and numerical results for given parameter values.&lt;br /&gt;
&lt;br /&gt;
*[[Point contact]]&lt;br /&gt;
*[[Cantilever beam]]&lt;br /&gt;
*[[Hertzian contact]]&lt;br /&gt;
*[[FWO case]]&lt;br /&gt;
&lt;br /&gt;
=Basic equations of elasticity=&lt;br /&gt;
&lt;br /&gt;
To determine the distribution of static stresses and displacements in a solid body we must obtain a solution (either analytically or numerically) to the basic equations of the theory of elasticity, satisfying the boundary conditions on forces and/or displacements. The equations thus form a boundary value problem. For a general three dimensional solid object the equations governing its behavior are:&lt;br /&gt;
* equations of equilibrium (3)&lt;br /&gt;
* strain-displacement equations (6)&lt;br /&gt;
* stress-strain equations (6)&lt;br /&gt;
where the number in brackets indicates the number of equations. The equations of equilibrium are three tensor partial differential equations for the balance of linear momentum, the strain-displacement equations are relations that stem from infinitesimal strain theory and the stress-strain equations are a set of linear algebraic constitutive relations (3D Hooke's law). In two dimensions these equations simplify to 8 equations (2 equilibrium, 3 strain-displacement, and 3 stress-strain).&lt;br /&gt;
&lt;br /&gt;
A large amount of confusion regarding linear elasticity originates from the many different notations used in this field. For this reason we first provide an overview of the different notations that are used.&lt;br /&gt;
&lt;br /&gt;
=== Direct tensor form ===&lt;br /&gt;
In direct tensor form (independent of coordinate system) the governing equations are:&lt;br /&gt;
*Equation of motion (an expression of Newton's second law):&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{\nabla} \cdot \boldsymbol{\sigma} + \boldsymbol{F} = \rho \ddot{\boldsymbol{u}}&lt;br /&gt;
\]&lt;br /&gt;
*Strain-displacement equations:&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{\varepsilon} = \frac{1}{2}\left[ \boldsymbol{\nabla} \boldsymbol{u} + (\boldsymbol{\nabla} \boldsymbol{u})^T  \right]&lt;br /&gt;
\]&lt;br /&gt;
*Stress-displacement equations (constitutive equations). For a linear elastic material this is Hooke's law:&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{\sigma} = \boldsymbol{C} : \boldsymbol{\varepsilon}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
where $\boldsymbol{\sigma}$ is the Cauchy stress tensor, $\boldsymbol{\varepsilon}$ is the infinitesimal strain tensor, $\boldsymbol{u}$ is the displacement vector, $\boldsymbol{C}$ is the fourth order stiffness tensor, $\boldsymbol{F}$ is the body force per unit volume (a vector quantity), $\rho$ is the mass density, $\boldsymbol{\nabla}(\bullet)$ is the gradient operator, $\boldsymbol{\nabla}\cdot(\bullet)$ is the divergence operator, $(\bullet)^T$ represents a transpose, $\ddot{(\bullet)}$ is the second derivative with respect to time, and $\boldsymbol{A}:\boldsymbol{B}$ is the inner product of two second order tensors (a tensor contraction).&lt;br /&gt;
&lt;br /&gt;
=== Cartesian coordinate form ===&lt;br /&gt;
&lt;br /&gt;
Using the Einstein summation convention (implied summations over repeated indexes) the equations are:&lt;br /&gt;
*Equation of motion (an expression of Newton's second law):&lt;br /&gt;
\[&lt;br /&gt;
\sigma_{ji,j} + F_i = \rho \partial_{tt} u_i&lt;br /&gt;
\]&lt;br /&gt;
*Strain-displacement equations:&lt;br /&gt;
\[&lt;br /&gt;
\varepsilon_{ij} = \frac{1}{2}\left(u_{j,i}+u_{i,j}\right)&lt;br /&gt;
\]&lt;br /&gt;
*Stress-displacement equations (constitutive equations). For a linear elastic material this is Hooke's law:&lt;br /&gt;
\[&lt;br /&gt;
\sigma_{i,j} = C_{ijkl} \varepsilon_{kl},&lt;br /&gt;
\]&lt;br /&gt;
where $i,j = 1,2,3$ represent, respectively, $x$, $y$ and $z$, the $(\bullet),j$ subscript is a shorthand for partial derivative $\partial(\bullet)/\partial x_j$ and $\partial_{tt}$ is shorthand notation for $\partial^2/\partial t^2$, $\sigma_{ij}=\sigma_{ji}$ is the Cauchy stress tensor (with 6 independent components), $F_i$ are the body forces, $\rho$ is the mass density, $u_i$ is the displacement, $\varepsilon_{ij} = \varepsilon_{ji}$ is the strain tensor (also with 6 independent components), and, finally $C_{ijkl}$ is the fourth-order stiffness tensor that due to symmetry requirements $C_{ijkl} = C_{klij} = C_{jikl} =C_{ijkl}$ can be reduced to 21 different elements.&lt;br /&gt;
&lt;br /&gt;
=== Matrix-vector (FEM) notation ===&lt;br /&gt;
&lt;br /&gt;
*Equation of motion:&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{L}^T\boldsymbol{\sigma} + \boldsymbol{F} = \rho\ddot{\boldsymbol{u}}&lt;br /&gt;
\]&lt;br /&gt;
*Strain-displacement equations:&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{\varepsilon} = \boldsymbol{L}\boldsymbol{u}&lt;br /&gt;
\]&lt;br /&gt;
*Stress-displacement equations (constitutive equations). For a linear elastic material this is Hooke's law:&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{\sigma} = \boldsymbol{C}\boldsymbol{\varepsilon}&lt;br /&gt;
\]&lt;br /&gt;
where $\boldsymbol{\sigma}$ is the Cauchy stress tensor represented in vector form (6 components), $\boldsymbol{L}$ is a differential operator matrix (size $3 \times 6$), $\bullet^T$ is transpose of a matrix $\bullet$, $\boldsymbol{F}$ is the body force vector, $\rho$ is the mass density, $\boldsymbol{u}$ is the displacement vector, $\boldsymbol{\varepsilon}$ is the strain tensor represented in vector form (6 components), and $\boldsymbol{C}$ is the symmetric stress-strain matrix (size $6 \times 6$ with 21 material constants $C_{ij} = C_{ji}$). Certain literature prefers using the symbol $\boldsymbol{D}$ instead of $\boldsymbol{C}$ for the stress-strain matrix. The symbol $C$ is then used as the &amp;quot;compliance tensor&amp;quot; that relates the strains to the stresses, e.g. $\boldsymbol{\varepsilon} = \boldsymbol{C}\boldsymbol{\sigma}$.&lt;br /&gt;
&lt;br /&gt;
To solve the basic equations of elasticity two approaches exist according to the boundary conditions of the boundary value problem. In the '''displacement formulation''' the displacements are prescribed everywhere at the boundaries and the stresses and strains are eliminated from the formulation. The other possible option is that the surface tractions are prescribed everywhere on the surface boundary. The equations of elasticity are then manipulated to leave the stresses as the unknown to be solved for. This approach is known as the [https://en.wikipedia.org/wiki/Linear_elasticity#Stress_formulation '''stress formulation'''] and will not be considered here further.&lt;br /&gt;
&lt;br /&gt;
== Displacement formulation ==&lt;br /&gt;
&lt;br /&gt;
The goal of the displacement formulation is to eliminate the strains and stresses from the basic equations of elasticity and leave only the displacements as the unknown to be solved for. The first step is to substitute the strain-displacement equations into Hooke's law, eliminating the strains as unknowns:&lt;br /&gt;
\begin{equation}\label{eq:3d_hooke}&lt;br /&gt;
\sigma_{ij} = \lambda\delta_{ij}\varepsilon_{kk} + 2\mu\varepsilon_{ij} \quad \Rightarrow \quad &lt;br /&gt;
\begin{cases} &lt;br /&gt;
\sigma_{xx} = \lambda (u_{x,x}+u_{y,y}+u_{z,z}) + 2\mu u_{x,x}\\ &lt;br /&gt;
\sigma_{yy} = \lambda (u_{x,x}+u_{y,y}+u_{z,z}) + 2\mu u_{y,y}\\&lt;br /&gt;
\sigma_{zz} = \lambda (u_{x,x}+u_{y,y}+u_{z,z}) + 2\mu u_{z,z}\\&lt;br /&gt;
\sigma_{xy} = \mu (u_{x,y} + u_{y,x})\\&lt;br /&gt;
\sigma_{yz} = \mu (u_{y,z} + u_{z,y})\\&lt;br /&gt;
\sigma_{zx} = \mu (u_{z,x} + u_{x,z})&lt;br /&gt;
\end{cases}&lt;br /&gt;
\end{equation}&lt;br /&gt;
where $\lambda$ and $\mu$ are [https://en.wikipedia.org/wiki/Lam%C3%A9_parameters Lamé parameters]. The formula above can also be written more concisely as &lt;br /&gt;
\[&lt;br /&gt;
\sigma_{ij} = \lambda \delta_{ij} u_{k,k} + \mu(u_{i,j}+u_{j,i}).&lt;br /&gt;
\]&lt;br /&gt;
The next step is to substitute these equations into the equilibrium equation&lt;br /&gt;
\[&lt;br /&gt;
\sigma_{ij,j} + F_i = \rho \partial_{tt} u_i \quad \Rightarrow \quad &lt;br /&gt;
\begin{cases}&lt;br /&gt;
\frac{\partial \sigma_{xx}}{\partial x} + \frac{\partial \sigma_{xy}}{\partial y} + \frac{\partial \sigma_{xz}}{\partial z} + F_x = \rho \frac{\partial^2 u_x}{\partial t^2} \\&lt;br /&gt;
\frac{\partial \sigma_{yx}}{\partial x} + \frac{\partial \sigma_{yy}}{\partial y} + \frac{\partial \sigma_{yz}}{\partial z} + F_y = \rho \frac{\partial^2 u_y}{\partial t^2} \\&lt;br /&gt;
\frac{\partial \sigma_{zx}}{\partial x} + \frac{\partial \sigma_{zy}}{\partial y} + \frac{\partial \sigma_{zz}}{\partial z} + F_z = \rho \frac{\partial^2 u_z}{\partial t^2} &lt;br /&gt;
\end{cases}&lt;br /&gt;
\]&lt;br /&gt;
resulting in&lt;br /&gt;
\begin{align*}&lt;br /&gt;
&lt;br /&gt;
\frac{\partial}{\partial x}\left( \lambda \left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} + \frac{\partial u_z}{\partial z} \right) + 2\mu \frac{\partial u_x}{\partial x} \right) + \frac{\partial}{\partial y}\left(\mu\left(\frac{\partial u_x}{\partial y}+\frac{\partial u_y}{\partial x}\right)\right) + \frac{\partial}{\partial z}\left(\mu\left(\frac{\partial u_x}{\partial z}+\frac{\partial u_z}{\partial x}\right)\right) + F_x &amp;amp;= \rho \frac{\partial^2 u_x}{\partial t^2} \\&lt;br /&gt;
\frac{\partial}{\partial x}\left(\mu\left(\frac{\partial u_y}{\partial x}+\frac{\partial u_x}{\partial y}\right)\right) + \frac{\partial}{\partial y}\left(\lambda \left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} + \frac{\partial u_z}{\partial z} \right) + 2\mu \frac{\partial u_y}{\partial y}\right) + \frac{\partial}{\partial z}\left(\mu\left(\frac{\partial u_y}{\partial z}+\frac{\partial u_z}{\partial y}\right)\right) + F_y &amp;amp;= \rho \frac{\partial^2 u_y}{\partial t^2}\\&lt;br /&gt;
\frac{\partial}{\partial x}\left(\mu\left(\frac{\partial u_z}{\partial x}+\frac{\partial u_x}{\partial z}\right)\right) + \frac{\partial}{\partial y}\left(\mu\left(\frac{\partial u_z}{\partial y}+\frac{\partial u_y}{\partial z}\right)\right) + \frac{\partial}{\partial z}\left(\lambda \left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} + \frac{\partial u_z}{\partial z} \right) + 2\mu \frac{\partial u_z}{\partial z}\right) + F_z &amp;amp;= \rho \frac{\partial^2 u_z}{\partial t^2}&lt;br /&gt;
&lt;br /&gt;
\end{align*}&lt;br /&gt;
Using the assumption that Lamé parameters $\lambda$ and $\mu$ are constant we can rearrange to produce:&lt;br /&gt;
\begin{align*}&lt;br /&gt;
(\lambda + \mu) \frac{\partial}{\partial x}\left(\frac{\partial u_x}{\partial x}+\frac{\partial u_y}{\partial y}+\frac{\partial u_z}{\partial z}\right) + \mu\left(\frac{\partial^2 u_x}{\partial x^2}+\frac{\partial^2 u_x}{\partial y^2}+\frac{\partial^2 u_x}{\partial z^2}\right) + F_x &amp;amp;= \rho \frac{\partial^2 u_x}{\partial t^2} \\&lt;br /&gt;
(\lambda + \mu) \frac{\partial}{\partial y}\left(\frac{\partial u_x}{\partial x}+\frac{\partial u_y}{\partial y}+\frac{\partial u_z}{\partial z}\right) + \mu\left(\frac{\partial^2 u_y}{\partial x^2}+\frac{\partial^2 u_y}{\partial y^2}+\frac{\partial^2 u_y}{\partial z^2}\right) + F_y &amp;amp;= \rho \frac{\partial^2 u_y}{\partial t^2} \\&lt;br /&gt;
(\lambda + \mu) \frac{\partial}{\partial z}\left(\frac{\partial u_x}{\partial x}+\frac{\partial u_y}{\partial y}+\frac{\partial u_z}{\partial z}\right) + \mu\left(\frac{\partial^2 u_z}{\partial x^2}+\frac{\partial^2 u_z}{\partial y^2}+\frac{\partial^2 u_z}{\partial z^2}\right) + F_z &amp;amp;= \rho \frac{\partial^2 u_z}{\partial t^2} \\&lt;br /&gt;
\end{align*}&lt;br /&gt;
&lt;br /&gt;
We can easily see that only the displacements are left in these equations. The equations obtaines in this manner are known as the Navier-Cauchy equations.&lt;br /&gt;
&lt;br /&gt;
=== Navier-Cauchy equations ===&lt;br /&gt;
The Navier or Navier-Cauchy equations describe the dynamics of a solid through the displacement vector field $\b{u}$. The equations can also be expressed concisely in vector form as follows&lt;br /&gt;
\begin{equation}\label{eq:navier_mu_lambda}&lt;br /&gt;
\rho \frac{\partial^2 \b{u}}{\partial t^2} = (\lambda + \mu) \nabla(\nabla \cdot \b{u}) + \mu \nabla^2 \b{u} + \b{F}&lt;br /&gt;
\end{equation}&lt;br /&gt;
where $\mu$ and $\lambda$ are Lamé constants, $\rho$ is the object density and $\b{F}$ are the external forces. In certain cases we may prefer to use the Young modulus $E$ and the Poisson ratio $\nu$ instead of the Lamé constants. In this case the Navier equations are&lt;br /&gt;
\begin{equation}\label{eq:navier_young_poisson}&lt;br /&gt;
\rho \frac{\partial^2 \b{u}}{\partial t^2} = \frac{E}{2(1+\nu)}\left(\nabla^2 \b{u} + \frac{1}{1-2\nu}\nabla\left(\nabla \cdot \b{u}\right)\right) + \b{F}&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ==Strain-displacement equations==&lt;br /&gt;
&lt;br /&gt;
Under the action of applied forces, a point in the solid originally at $\boldsymbol{x} = (x,y,z)$ moves to position $\boldsymbol{X} = (X,Y,Z)$. This movement can be described completely by the displacement vector &lt;br /&gt;
\begin{equation*}&lt;br /&gt;
\boldsymbol{u}(\boldsymbol{x}) = \boldsymbol{X} - \boldsymbol{x},&lt;br /&gt;
\end{equation*}&lt;br /&gt;
consisting of three components&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\boldsymbol{u} = \{u_x \quad u_y \quad u_z\}.&lt;br /&gt;
\end{equation}&lt;br /&gt;
The brackets $\{\}$ indicate that this is a column vector. The components of this vector are mutually orthogonal and their positive directions correspond to the positive directions of the coordinate axes. To prevent confusion with the shorthand notation for partial derivatives, the components of $\boldsymbol{u}$ are sometimes represented with the letter $u, v, w$, e.g. $\boldsymbol{u} = \{u \quad v \quad w\}$.&lt;br /&gt;
&lt;br /&gt;
The strains in the deformed structure can be expressed as partial derivatives of the displacements as follows: --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Two-dimensional stress distributions ==&lt;br /&gt;
Many problems in elasticity can be simplified as two-dimensional problems described by ''plane theory of elasticity''. In general there are two types of problems we may encounter in plane analysis: '''plane stress''' and '''plane strain'''. The first problem arises in analysis of thin plates loaded in the plane of the plate, while the second is used for elongated bodies of constant cross section subject to uniform loading.&lt;br /&gt;
&lt;br /&gt;
=== Plane stress ===&lt;br /&gt;
&lt;br /&gt;
Plane stress distributions build on the assumption that the normal stress and shear stresses directed perpendicular to the $x$-$y$ plane are assumed zero:&lt;br /&gt;
\begin{equation}\label{eq:pstress_assump}&lt;br /&gt;
\sigma_{zz} = \sigma_{zx} = \sigma_{zy} = 0.&lt;br /&gt;
\end{equation}&lt;br /&gt;
It is also assumed that the stress components do not vary through the thickness of the plate (the assumptions do violate some compatibility conditions, but are still sufficiently accurate for practical applications if the plate is thin).&lt;br /&gt;
&lt;br /&gt;
Using (\ref{eq:pstress_assump}) the three-dimensional Hooke's law can be reduced to:&lt;br /&gt;
\begin{equation}\label{eq:planestress}&lt;br /&gt;
\boldsymbol{\sigma} = \boldsymbol{C}\boldsymbol{\varepsilon}&lt;br /&gt;
\end{equation}&lt;br /&gt;
in matrix form where for isotropic materials, we have&lt;br /&gt;
\begin{equation}\label{eq:planestressmatrix}&lt;br /&gt;
\boldsymbol{C}&lt;br /&gt;
= \frac{E}{1-\nu^2}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1 &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1 &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1-\nu}{2}&lt;br /&gt;
\end{bmatrix} \qquad \text{(Plane stress)}&lt;br /&gt;
\end{equation}&lt;br /&gt;
and &lt;br /&gt;
\begin{equation}\label{eq:2d_stress}&lt;br /&gt;
\b{\sigma} = \begin{bmatrix} \sigma_{xx} \\ \sigma_{yy} \\ \sigma_{xy}\end{bmatrix},&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}\label{eq:2d_strain}&lt;br /&gt;
\b{\varepsilon} = \begin{bmatrix} \varepsilon_{xx} \\ \varepsilon_{yy} \\ \gamma_{xy} \end{bmatrix} =&lt;br /&gt;
\begin{bmatrix} \varepsilon_{xx} \\ \varepsilon_{yy} \\ 2\varepsilon_{xy} \end{bmatrix} = &lt;br /&gt;
\begin{bmatrix} \frac{\partial u_x}{\partial x} \\ \frac{\partial u_y}{\partial y} \\ \frac{\partial u_y}{\partial x} + \frac{\partial u_x}{\partial y} \end{bmatrix}.&lt;br /&gt;
\end{equation}&lt;br /&gt;
Note that the strain tensor uses the so-called engineering shear strain $\gamma_{ij}$. Under the plane stress assumption the Navier equations are given as:&lt;br /&gt;
\begin{equation}\label{eq:navier_plane_stress}&lt;br /&gt;
\rho \frac{\partial^2 \b{u}}{\partial t^2} = \frac{E}{2(1+\nu)} \left( \b{\nabla}^2 \b{u} + \frac{1+\nu}{1-\nu}\b{\nabla}\left( \b{\nabla}\cdot \b{u}\right)  \right) + \b{F}&lt;br /&gt;
\end{equation}&lt;br /&gt;
or in component notation&lt;br /&gt;
\begin{align}&lt;br /&gt;
\rho \frac{\partial^2 u_x}{\partial t^2} &amp;amp;= \frac{E}{2(1+\nu)} \left( \frac{\partial^2 u_x}{\partial x^2} + \frac{\partial^2 u_x}{\partial y^2} \right) + \frac{E}{2(1-\nu)} \frac{\partial}{\partial x}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right) \\&lt;br /&gt;
\rho \frac{\partial^2 u_y}{\partial t^2} &amp;amp;= \frac{E}{2(1+\nu)} \left( \frac{\partial^2 u_y}{\partial x^2} + \frac{\partial^2 u_y}{\partial y^2} \right) + \frac{E}{2(1-\nu)} \frac{\partial}{\partial y}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right)&lt;br /&gt;
\end{align}&lt;br /&gt;
&lt;br /&gt;
==== Plane stress with Lamé constants ====&lt;br /&gt;
&lt;br /&gt;
The plane stress stiffness tensor (\ref{eq:planestressmatrix}) may also be expressed in terms of Lamé constants $\lambda$ and $\mu$ by substituting $E$ and $\nu$ with &lt;br /&gt;
\[E = \frac{\mu(3\lambda+2\mu)}{\lambda+\mu}\] &lt;br /&gt;
\[\nu = \frac{\lambda}{2(\lambda+\mu)}\]&lt;br /&gt;
&lt;br /&gt;
=== Plane strain ===&lt;br /&gt;
&lt;br /&gt;
The plane strain problem arises in analysis of walls, dams, tunnels where one dimension of the structure is very large in comparison to the other two dimensions ($x$- and $y$- coordinates). It is also appropriate for small-scale problems such as bars and rollers compressed by forces normal to their cross section. In all such problems the body may be imagined as a prismatic cylinder with one dimension much larger that the other two. The applied forces act in the $x$-$y$ plane and do not vary in the $z$ direction, leading to the assumption&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial}{\partial z} = u_z = 0.&lt;br /&gt;
\end{equation} &lt;br /&gt;
&lt;br /&gt;
With the above assumption it follows immediately that&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\varepsilon_{zz} = \varepsilon_{zx} = \varepsilon_{zy} = 0.&lt;br /&gt;
\end{equation}&lt;br /&gt;
The three dimensional Hooke's law can now be reduced to&lt;br /&gt;
\begin{equation}\label{eq:planestrain}&lt;br /&gt;
\boldsymbol{\sigma} = \boldsymbol{C}\boldsymbol{\varepsilon}&lt;br /&gt;
\end{equation}&lt;br /&gt;
where the matrix $C$ is given by&lt;br /&gt;
\begin{equation}\label{eq:matrixplanestrain}&lt;br /&gt;
\boldsymbol{C}&lt;br /&gt;
= \frac{E}{(1+\nu)(1-2\nu)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\nu &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1-\nu &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1-2\nu}{2}&lt;br /&gt;
\end{bmatrix} \qquad \text{(Plane strain)}&lt;br /&gt;
\end{equation}&lt;br /&gt;
The vectors $\boldsymbol{\sigma}$ and $\boldsymbol{\varepsilon}$ are the same as above for plane stress and are given in (\ref{eq:2d_stress}) and (\ref{eq:2d_strain}), respectively. In the case of plane strain we have additonal non-zero components of the stress tensor:&lt;br /&gt;
\begin{equation}\label{eq:sigmazz}&lt;br /&gt;
\sigma_{zz} = \nu(\sigma_{xx}+\sigma_{yy})&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\sigma_{yz} = \sigma_{zx} = 0&lt;br /&gt;
\end{equation}&lt;br /&gt;
The reason $\sigma_{zz}$ is not included in the matrix stress-strain equation (\ref{eq:planestrain}) is because it is linearly dependent on the normal stresses $\sigma_{xx}$ and $\sigma_{zz}$.&lt;br /&gt;
&lt;br /&gt;
The Navier-Cauchy equation that follows from the plane strain assumption can be found in (\ref{eq:navier_young_poisson}). For purposes of completeness we provide here the equations in component notation:&lt;br /&gt;
\begin{align}&lt;br /&gt;
\rho \frac{\partial^2 u_x}{\partial t^2} &amp;amp;= \frac{E}{2(1+\nu)} \left( \frac{\partial^2 u_x}{\partial x^2} + \frac{\partial^2 u_x}{\partial y^2} \right) + \frac{E}{2(1+\nu)(1-2\nu)} \frac{\partial}{\partial x}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right) \\&lt;br /&gt;
\rho \frac{\partial^2 u_y}{\partial t^2} &amp;amp;= \frac{E}{2(1+\nu)} \left( \frac{\partial^2 u_y}{\partial x^2} + \frac{\partial^2 u_y}{\partial y^2} \right) + \frac{E}{2(1+\nu)(1-2\nu)} \frac{\partial}{\partial y}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right)&lt;br /&gt;
\end{align}&lt;br /&gt;
&lt;br /&gt;
==== Plane strain with Lamé constants ====&lt;br /&gt;
&lt;br /&gt;
Alternatively the stiffness tensor $\b{C}$ in the stress-strain equation $\b{\sigma} = \b{C}\b{\varepsilon}$ may be expressed in terms of $\mu$ and $\lambda$:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\boldsymbol{C}&lt;br /&gt;
= &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
2\mu + \lambda &amp;amp; \lambda &amp;amp; 0 \\&lt;br /&gt;
\lambda &amp;amp; 2\mu + \lambda &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \mu^*&lt;br /&gt;
\end{bmatrix} \qquad \text{(Plane strain)}&lt;br /&gt;
\end{equation}&lt;br /&gt;
(*Note that this matrix requires the strain tensor to be defined using the engineering shear strain $\gamma_{xy} = 2\varepsilon_{xy}$. If we define the strain tensor as $\b{\varepsilon} = \{\varepsilon_{xx}\;\varepsilon_{yy}\;\varepsilon_{xy}\}^T$ then matrix component $C_{33}$ must be $2\mu$.)&lt;br /&gt;
&lt;br /&gt;
The Navier equations in vector form can be found in (\ref{eq:navier_mu_lambda}). In component notation the equations are:&lt;br /&gt;
\begin{align}&lt;br /&gt;
\rho \frac{\partial^2 u_x}{\partial t^2} &amp;amp;= \mu \left( \frac{\partial^2 u_x}{\partial x^2} + \frac{\partial^2 u_x}{\partial y^2} \right) + (\lambda+\mu) \frac{\partial}{\partial x}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right) \\&lt;br /&gt;
\rho \frac{\partial^2 u_y}{\partial t^2} &amp;amp;= \mu \left( \frac{\partial^2 u_y}{\partial x^2} + \frac{\partial^2 u_y}{\partial y^2} \right) + (\lambda+\mu) \frac{\partial}{\partial y}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right)&lt;br /&gt;
\end{align}&lt;br /&gt;
&lt;br /&gt;
=== Connection between plane stress and plane strain ===&lt;br /&gt;
&lt;br /&gt;
For '''isotropic''' materials with elastic modulus $E$ and Poisson's ratio $\nu$ it is possible to go from plane stress to plane strain, or vice-versa, by replacing $E$ and $\nu$ in the stress-strain matrix with a fictitious modulus $E^*$ and fictitious Poisson ratio $\nu^*$. This allows us to &amp;quot;reuse&amp;quot; a plane stress program to solve plane strain or again vice-versa (as long as the material is isotropic). A few exercises on this topic are given [http://www.colorado.edu/engineering/cas/courses.d/IFEM.d/IFEM.Ch14.d/IFEM.Ch14.pdf at this link (page 13)].&lt;br /&gt;
&lt;br /&gt;
To go from plane stres'''s''' ($s$) to plane strai'''n''' ($n$) insert the fictitious quantities&lt;br /&gt;
\begin{equation}\label{eq:ston1}&lt;br /&gt;
E_n^* = \frac{E_s}{1-\nu_s^2},&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}\label{eq:ston2}&lt;br /&gt;
\nu_n^* = \frac{\nu_s}{1-\nu_s}.&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
'''Substitution from plane stress to plane strain'''&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;Note: this derivation is shown just to confirm the above formulas. In a numerical program, we keep the stress-strain matrix and just use the above formulas (\ref{eq:ston1}) and (\ref{eq:ston2}) to update the values of $E$ and $\nu$. Also note we have omitted the indexes ($s$) and ($n$) in the following derivations.&lt;br /&gt;
&lt;br /&gt;
We start with the plane stress matrix with the inserted fictitious values $E^*$ and $\nu^*$&lt;br /&gt;
\[&lt;br /&gt;
\frac{E^*}{1-{\nu^*}^2}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1 &amp;amp; \nu^* &amp;amp; 0 \\&lt;br /&gt;
\nu^* &amp;amp; 1 &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-\nu^*)&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\] &lt;br /&gt;
and make the above substitutions (\ref{eq:ston1}) and (\ref{eq:ston2}) leading to:&lt;br /&gt;
\[&lt;br /&gt;
\frac{E}{\left(1-\nu^2\right)\left(1-\left(\frac{\nu}{1-\nu}\right)^2\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1 &amp;amp; \frac{\nu}{1-\nu} &amp;amp; 0 \\&lt;br /&gt;
\frac{\nu}{1-\nu} &amp;amp; 1 &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-\frac{\nu}{1-\nu})&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
We can then use the rule to convert sums of squares into products as well as bring the factor $1/(1-v)$ out of the matrix:&lt;br /&gt;
\[&lt;br /&gt;
\frac{E}{\left(1-\nu\right)\left(1+\nu\right)\left(1-\frac{\nu}{1-\nu}\right)\left(1+\frac{\nu}{1-\nu}\right)\left(1-\nu\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\nu &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1-\nu &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-2\nu)&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
By joining some of the factors to a common denominator and rearranging leads to&lt;br /&gt;
\[&lt;br /&gt;
\frac{E\left(1-\nu\right)\left(1-\nu\right)}{\left(1-\nu\right)\left(1+\nu\right)\left(1-2\nu\right)1\left(1-\nu\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\nu &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1-\nu &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-2\nu)&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
The final step is canceling the factors that occur in both the numerator and denominator &lt;br /&gt;
\[&lt;br /&gt;
\frac{E}{\left(1+\nu\right)\left(1-2\nu\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\nu &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1-\nu &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-2\nu)&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\]&lt;br /&gt;
which leads exactly to the relationship for plane strain given in (\ref{eq:planestrain}).&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the opposite case we want to go from plane strai'''n''' ($n$) to plane stres'''s''' ($s$) we can use:&lt;br /&gt;
\begin{equation}\label{eq:ntos1}&lt;br /&gt;
E_s^* = \frac{E_n(1+2\nu_n)}{(1+\nu_n)^2},&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}\label{eq:ntos2}&lt;br /&gt;
\nu_s^* = \frac{\nu_n}{1+\nu_n}.&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
'''Substitution from plane strain to plane stress'''&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Note that we have again omitted the indexes ($s$) and ($n$) since our wish is expressed by the bold title.&lt;br /&gt;
&lt;br /&gt;
We start with the plane strain matrix with the inserted fictitious values $E^*$ and $\nu^*$&lt;br /&gt;
\[&lt;br /&gt;
\frac{E^*}{\left(1+\nu^*\right)\left(1-2\nu^*\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\nu^* &amp;amp; \nu^* &amp;amp; 0 \\&lt;br /&gt;
\nu^* &amp;amp; 1-\nu^* &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-2\nu^*)&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\] &lt;br /&gt;
and make the above substitutions (\ref{eq:ntos1}) and (\ref{eq:ntos2}) leading to:&lt;br /&gt;
\[&lt;br /&gt;
\frac{E(1+2\nu)}{\left(1+\nu\right)^2\left(1+\frac{\nu}{1+\nu}\right)\left(1-2\frac{\nu}{1+\nu}\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\frac{\nu}{1+\nu} &amp;amp; \frac{\nu}{1+\nu} &amp;amp; 0 \\&lt;br /&gt;
\frac{\nu}{1+\nu} &amp;amp; 1-\frac{\nu}{1+\nu} &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-2\frac{\nu}{1+\nu})&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
Writing some of the sums with common denominators and rearranging leads to&lt;br /&gt;
\[&lt;br /&gt;
\frac{E(1+2\nu)(1+\nu)(1+\nu)}{\left(1+\nu\right)^2\left(1+2\nu\right)\left(1-\nu\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\frac{1}{1+\nu} &amp;amp; \frac{\nu}{1+\nu} &amp;amp; 0 \\&lt;br /&gt;
\frac{\nu}{1+\nu} &amp;amp; \frac{1}{1+\nu} &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}\left(\frac{1-\nu}{1+\nu}\right)&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
We can also bring the factor $1/(1+\nu)$ out from the matrix components. After canceling all factors that occur in both denominator and numerator we are left with&lt;br /&gt;
\[&lt;br /&gt;
\frac{E}{\left(1+\nu\right)\left(1-\nu\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1 &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1 &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-\nu)&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
Rewriting the product of sums as a sum of squares gives us the matrix for plane stress in (\ref{eq:planestress}).&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Principal stresses ===&lt;br /&gt;
This are the stresses when we rotate our coordinate system so that there are no shear components.&lt;br /&gt;
The principal stresses for plane stress conditions are given as eigenvalues of $\sigma$ with &lt;br /&gt;
\[&lt;br /&gt;
  \sigma_{1,2} = \frac12 (s_{xx} + s_{zz}) \pm \sqrt{\frac{1}{4}(s_{xx}-s_{zz})^2 + s_{xz}^2}.&lt;br /&gt;
\]&lt;br /&gt;
The principal shear stress or principal stress difference is the stress where only shear stresses are present. In case of plane stress it is calculated as&lt;br /&gt;
\[&lt;br /&gt;
  \tau_1 = \sqrt{\frac{1}{4}(s_{xx}-s_{zz})^2 + s_{xz}^2} = \frac{|\sigma_1 - \sigma_2|}{2}.&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
When the stress tensor is z 3x3 matrix, the formulas for eigenvalues are more complicated.&lt;br /&gt;
&lt;br /&gt;
=== Von Mises stress ===&lt;br /&gt;
&lt;br /&gt;
A more detailed explanation of the von Mises stress can be found on [https://en.wikipedia.org/wiki/Von_Mises_yield_criterion Wikipedia].&lt;br /&gt;
&lt;br /&gt;
In materials science and engineering the von Mises yield criterion can be also formulated in terms of the von Mises stress or equivalent tensile stress, $\sigma_\mathrm{v}$. This is a scalar value of stress that can be computed from the Cauchy stress tensor $\boldsymbol{\sigma}$. In this case, a material is said to start yielding when the von Mises stress reaches a value known as yield strength, $\sigma_\mathrm{y}$.&lt;br /&gt;
&lt;br /&gt;
Mathematically the von Mises yield criterion can be expressed as:&lt;br /&gt;
\[&lt;br /&gt;
  \sigma _\mathrm{v}=\sigma_\mathrm{y}={\sqrt {3J_{2}}}, &lt;br /&gt;
\]&lt;br /&gt;
where $J_2$ is the [https://en.wikipedia.org/wiki/Cauchy_stress_tensor#Stress_deviator_tensor second deviatoric stress invariant].&lt;br /&gt;
&lt;br /&gt;
In the case of general '''plane stress''' ($\sigma_{33}=0$,$\sigma_{23}=0$, $\sigma_{31}=0$) the von Mises stress can be calculated as:&lt;br /&gt;
\[&lt;br /&gt;
\sigma_\mathrm{v} = \sqrt{\sigma_{11}^2 - \sigma_{11}\sigma_{22}+\sigma_{22}^2 + 3\sigma_{12}^2}.&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* Theory of matrix structural analysis&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Solid_Mechanics&amp;diff=1372</id>
		<title>Solid Mechanics</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Solid_Mechanics&amp;diff=1372"/>
				<updated>2017-10-05T13:20:09Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Von Mises stress */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Case studies =&lt;br /&gt;
&lt;br /&gt;
The following pages describe several case studies in the field of elastostatics and elastodynamics. The subpages include the problem description (equations and boundary conditions), analytical solutions if obtainable and numerical results for given parameter values.&lt;br /&gt;
&lt;br /&gt;
*[[Point contact]]&lt;br /&gt;
*[[Cantilever beam]]&lt;br /&gt;
*[[Hertzian contact]]&lt;br /&gt;
*[[FWO case]]&lt;br /&gt;
&lt;br /&gt;
=Basic equations of elasticity=&lt;br /&gt;
&lt;br /&gt;
To determine the distribution of static stresses and displacements in a solid body we must obtain a solution (either analytically or numerically) to the basic equations of the theory of elasticity, satisfying the boundary conditions on forces and/or displacements. The equations thus form a boundary value problem. For a general three dimensional solid object the equations governing its behavior are:&lt;br /&gt;
* equations of equilibrium (3)&lt;br /&gt;
* strain-displacement equations (6)&lt;br /&gt;
* stress-strain equations (6)&lt;br /&gt;
where the number in brackets indicates the number of equations. The equations of equilibrium are three tensor partial differential equations for the balance of linear momentum, the strain-displacement equations are relations that stem from infinitesimal strain theory and the stress-strain equations are a set of linear algebraic constitutive relations (3D Hooke's law). In two dimensions these equations simplify to 8 equations (2 equilibrium, 3 strain-displacement, and 3 stress-strain).&lt;br /&gt;
&lt;br /&gt;
A large amount of confusion regarding linear elasticity originates from the many different notations used in this field. For this reason we first provide an overview of the different notations that are used.&lt;br /&gt;
&lt;br /&gt;
=== Direct tensor form ===&lt;br /&gt;
In direct tensor form (independent of coordinate system) the governing equations are:&lt;br /&gt;
*Equation of motion (an expression of Newton's second law):&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{\nabla} \cdot \boldsymbol{\sigma} + \boldsymbol{F} = \rho \ddot{\boldsymbol{u}}&lt;br /&gt;
\]&lt;br /&gt;
*Strain-displacement equations:&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{\varepsilon} = \frac{1}{2}\left[ \boldsymbol{\nabla} \boldsymbol{u} + (\boldsymbol{\nabla} \boldsymbol{u})^T  \right]&lt;br /&gt;
\]&lt;br /&gt;
*Stress-displacement equations (constitutive equations). For a linear elastic material this is Hooke's law:&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{\sigma} = \boldsymbol{C} : \boldsymbol{\varepsilon}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
where $\boldsymbol{\sigma}$ is the Cauchy stress tensor, $\boldsymbol{\varepsilon}$ is the infinitesimal strain tensor, $\boldsymbol{u}$ is the displacement vector, $\boldsymbol{C}$ is the fourth order stiffness tensor, $\boldsymbol{F}$ is the body force per unit volume (a vector quantity), $\rho$ is the mass density, $\boldsymbol{\nabla}(\bullet)$ is the gradient operator, $\boldsymbol{\nabla}\cdot(\bullet)$ is the divergence operator, $(\bullet)^T$ represents a transpose, $\ddot{(\bullet)}$ is the second derivative with respect to time, and $\boldsymbol{A}:\boldsymbol{B}$ is the inner product of two second order tensors (a tensor contraction).&lt;br /&gt;
&lt;br /&gt;
=== Cartesian coordinate form ===&lt;br /&gt;
&lt;br /&gt;
Using the Einstein summation convention (implied summations over repeated indexes) the equations are:&lt;br /&gt;
*Equation of motion (an expression of Newton's second law):&lt;br /&gt;
\[&lt;br /&gt;
\sigma_{ji,j} + F_i = \rho \partial_{tt} u_i&lt;br /&gt;
\]&lt;br /&gt;
*Strain-displacement equations:&lt;br /&gt;
\[&lt;br /&gt;
\varepsilon_{ij} = \frac{1}{2}\left(u_{j,i}+u_{i,j}\right)&lt;br /&gt;
\]&lt;br /&gt;
*Stress-displacement equations (constitutive equations). For a linear elastic material this is Hooke's law:&lt;br /&gt;
\[&lt;br /&gt;
\sigma_{i,j} = C_{ijkl} \varepsilon_{kl},&lt;br /&gt;
\]&lt;br /&gt;
where $i,j = 1,2,3$ represent, respectively, $x$, $y$ and $z$, the $(\bullet),j$ subscript is a shorthand for partial derivative $\partial(\bullet)/\partial x_j$ and $\partial_{tt}$ is shorthand notation for $\partial^2/\partial t^2$, $\sigma_{ij}=\sigma_{ji}$ is the Cauchy stress tensor (with 6 independent components), $F_i$ are the body forces, $\rho$ is the mass density, $u_i$ is the displacement, $\varepsilon_{ij} = \varepsilon_{ji}$ is the strain tensor (also with 6 independent components), and, finally $C_{ijkl}$ is the fourth-order stiffness tensor that due to symmetry requirements $C_{ijkl} = C_{klij} = C_{jikl} =C_{ijkl}$ can be reduced to 21 different elements.&lt;br /&gt;
&lt;br /&gt;
=== Matrix-vector (FEM) notation ===&lt;br /&gt;
&lt;br /&gt;
*Equation of motion:&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{L}^T\boldsymbol{\sigma} + \boldsymbol{F} = \rho\ddot{\boldsymbol{u}}&lt;br /&gt;
\]&lt;br /&gt;
*Strain-displacement equations:&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{\varepsilon} = \boldsymbol{L}\boldsymbol{u}&lt;br /&gt;
\]&lt;br /&gt;
*Stress-displacement equations (constitutive equations). For a linear elastic material this is Hooke's law:&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{\sigma} = \boldsymbol{C}\boldsymbol{\varepsilon}&lt;br /&gt;
\]&lt;br /&gt;
where $\boldsymbol{\sigma}$ is the Cauchy stress tensor represented in vector form (6 components), $\boldsymbol{L}$ is a differential operator matrix (size $3 \times 6$), $\bullet^T$ is transpose of a matrix $\bullet$, $\boldsymbol{F}$ is the body force vector, $\rho$ is the mass density, $\boldsymbol{u}$ is the displacement vector, $\boldsymbol{\varepsilon}$ is the strain tensor represented in vector form (6 components), and $\boldsymbol{C}$ is the symmetric stress-strain matrix (size $6 \times 6$ with 21 material constants $C_{ij} = C_{ji}$). Certain literature prefers using the symbol $\boldsymbol{D}$ instead of $\boldsymbol{C}$ for the stress-strain matrix. The symbol $C$ is then used as the &amp;quot;compliance tensor&amp;quot; that relates the strains to the stresses, e.g. $\boldsymbol{\varepsilon} = \boldsymbol{C}\boldsymbol{\sigma}$.&lt;br /&gt;
&lt;br /&gt;
To solve the basic equations of elasticity two approaches exist according to the boundary conditions of the boundary value problem. In the '''displacement formulation''' the displacements are prescribed everywhere at the boundaries and the stresses and strains are eliminated from the formulation. The other possible option is that the surface tractions are prescribed everywhere on the surface boundary. The equations of elasticity are then manipulated to leave the stresses as the unknown to be solved for. This approach is known as the [https://en.wikipedia.org/wiki/Linear_elasticity#Stress_formulation '''stress formulation'''] and will not be considered here further.&lt;br /&gt;
&lt;br /&gt;
== Displacement formulation ==&lt;br /&gt;
&lt;br /&gt;
The goal of the displacement formulation is to eliminate the strains and stresses from the basic equations of elasticity and leave only the displacements as the unknown to be solved for. The first step is to substitute the strain-displacement equations into Hooke's law, eliminating the strains as unknowns:&lt;br /&gt;
\begin{equation}\label{eq:3d_hooke}&lt;br /&gt;
\sigma_{ij} = \lambda\delta_{ij}\varepsilon_{kk} + 2\mu\varepsilon_{ij} \quad \Rightarrow \quad &lt;br /&gt;
\begin{cases} &lt;br /&gt;
\sigma_{xx} = \lambda (u_{x,x}+u_{y,y}+u_{z,z}) + 2\mu u_{x,x}\\ &lt;br /&gt;
\sigma_{yy} = \lambda (u_{x,x}+u_{y,y}+u_{z,z}) + 2\mu u_{y,y}\\&lt;br /&gt;
\sigma_{zz} = \lambda (u_{x,x}+u_{y,y}+u_{z,z}) + 2\mu u_{z,z}\\&lt;br /&gt;
\sigma_{xy} = \mu (u_{x,y} + u_{y,x})\\&lt;br /&gt;
\sigma_{yz} = \mu (u_{y,z} + u_{z,y})\\&lt;br /&gt;
\sigma_{zx} = \mu (u_{z,x} + u_{x,z})&lt;br /&gt;
\end{cases}&lt;br /&gt;
\end{equation}&lt;br /&gt;
where $\lambda$ and $\mu$ are [https://en.wikipedia.org/wiki/Lam%C3%A9_parameters Lamé parameters]. The formula above can also be written more concisely as &lt;br /&gt;
\[&lt;br /&gt;
\sigma_{ij} = \lambda \delta_{ij} u_{k,k} + \mu(u_{i,j}+u_{j,i}).&lt;br /&gt;
\]&lt;br /&gt;
The next step is to substitute these equations into the equilibrium equation&lt;br /&gt;
\[&lt;br /&gt;
\sigma_{ij,j} + F_i = \rho \partial_{tt} u_i \quad \Rightarrow \quad &lt;br /&gt;
\begin{cases}&lt;br /&gt;
\frac{\partial \sigma_{xx}}{\partial x} + \frac{\partial \sigma_{xy}}{\partial y} + \frac{\partial \sigma_{xz}}{\partial z} + F_x = \rho \frac{\partial^2 u_x}{\partial t^2} \\&lt;br /&gt;
\frac{\partial \sigma_{yx}}{\partial x} + \frac{\partial \sigma_{yy}}{\partial y} + \frac{\partial \sigma_{yz}}{\partial z} + F_y = \rho \frac{\partial^2 u_y}{\partial t^2} \\&lt;br /&gt;
\frac{\partial \sigma_{zx}}{\partial x} + \frac{\partial \sigma_{zy}}{\partial y} + \frac{\partial \sigma_{zz}}{\partial z} + F_z = \rho \frac{\partial^2 u_z}{\partial t^2} &lt;br /&gt;
\end{cases}&lt;br /&gt;
\]&lt;br /&gt;
resulting in&lt;br /&gt;
\begin{align*}&lt;br /&gt;
&lt;br /&gt;
\frac{\partial}{\partial x}\left( \lambda \left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} + \frac{\partial u_z}{\partial z} \right) + 2\mu \frac{\partial u_x}{\partial x} \right) + \frac{\partial}{\partial y}\left(\mu\left(\frac{\partial u_x}{\partial y}+\frac{\partial u_y}{\partial x}\right)\right) + \frac{\partial}{\partial z}\left(\mu\left(\frac{\partial u_x}{\partial z}+\frac{\partial u_z}{\partial x}\right)\right) + F_x &amp;amp;= \rho \frac{\partial^2 u_x}{\partial t^2} \\&lt;br /&gt;
\frac{\partial}{\partial x}\left(\mu\left(\frac{\partial u_y}{\partial x}+\frac{\partial u_x}{\partial y}\right)\right) + \frac{\partial}{\partial y}\left(\lambda \left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} + \frac{\partial u_z}{\partial z} \right) + 2\mu \frac{\partial u_y}{\partial y}\right) + \frac{\partial}{\partial z}\left(\mu\left(\frac{\partial u_y}{\partial z}+\frac{\partial u_z}{\partial y}\right)\right) + F_y &amp;amp;= \rho \frac{\partial^2 u_y}{\partial t^2}\\&lt;br /&gt;
\frac{\partial}{\partial x}\left(\mu\left(\frac{\partial u_z}{\partial x}+\frac{\partial u_x}{\partial z}\right)\right) + \frac{\partial}{\partial y}\left(\mu\left(\frac{\partial u_z}{\partial y}+\frac{\partial u_y}{\partial z}\right)\right) + \frac{\partial}{\partial z}\left(\lambda \left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} + \frac{\partial u_z}{\partial z} \right) + 2\mu \frac{\partial u_z}{\partial z}\right) + F_z &amp;amp;= \rho \frac{\partial^2 u_z}{\partial t^2}&lt;br /&gt;
&lt;br /&gt;
\end{align*}&lt;br /&gt;
Using the assumption that Lamé parameters $\lambda$ and $\mu$ are constant we can rearrange to produce:&lt;br /&gt;
\begin{align*}&lt;br /&gt;
(\lambda + \mu) \frac{\partial}{\partial x}\left(\frac{\partial u_x}{\partial x}+\frac{\partial u_y}{\partial y}+\frac{\partial u_z}{\partial z}\right) + \mu\left(\frac{\partial^2 u_x}{\partial x^2}+\frac{\partial^2 u_x}{\partial y^2}+\frac{\partial^2 u_x}{\partial z^2}\right) + F_x &amp;amp;= \rho \frac{\partial^2 u_x}{\partial t^2} \\&lt;br /&gt;
(\lambda + \mu) \frac{\partial}{\partial y}\left(\frac{\partial u_x}{\partial x}+\frac{\partial u_y}{\partial y}+\frac{\partial u_z}{\partial z}\right) + \mu\left(\frac{\partial^2 u_y}{\partial x^2}+\frac{\partial^2 u_y}{\partial y^2}+\frac{\partial^2 u_y}{\partial z^2}\right) + F_y &amp;amp;= \rho \frac{\partial^2 u_y}{\partial t^2} \\&lt;br /&gt;
(\lambda + \mu) \frac{\partial}{\partial z}\left(\frac{\partial u_x}{\partial x}+\frac{\partial u_y}{\partial y}+\frac{\partial u_z}{\partial z}\right) + \mu\left(\frac{\partial^2 u_z}{\partial x^2}+\frac{\partial^2 u_z}{\partial y^2}+\frac{\partial^2 u_z}{\partial z^2}\right) + F_z &amp;amp;= \rho \frac{\partial^2 u_z}{\partial t^2} \\&lt;br /&gt;
\end{align*}&lt;br /&gt;
&lt;br /&gt;
We can easily see that only the displacements are left in these equations. The equations obtaines in this manner are known as the Navier-Cauchy equations.&lt;br /&gt;
&lt;br /&gt;
=== Navier-Cauchy equations ===&lt;br /&gt;
The Navier or Navier-Cauchy equations describe the dynamics of a solid through the displacement vector field $\b{u}$. The equations can also be expressed concisely in vector form as follows&lt;br /&gt;
\begin{equation}\label{eq:navier_mu_lambda}&lt;br /&gt;
\rho \frac{\partial^2 \b{u}}{\partial t^2} = (\lambda + \mu) \nabla(\nabla \cdot \b{u}) + \mu \nabla^2 \b{u} + \b{F}&lt;br /&gt;
\end{equation}&lt;br /&gt;
where $\mu$ and $\lambda$ are Lamé constants, $\rho$ is the object density and $\b{F}$ are the external forces. In certain cases we may prefer to use the Young modulus $E$ and the Poisson ratio $\nu$ instead of the Lamé constants. In this case the Navier equations are&lt;br /&gt;
\begin{equation}\label{eq:navier_young_poisson}&lt;br /&gt;
\rho \frac{\partial^2 \b{u}}{\partial t^2} = \frac{E}{2(1+\nu)}\left(\nabla^2 \b{u} + \frac{1}{1-2\nu}\nabla\left(\nabla \cdot \b{u}\right)\right) + \b{F}&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ==Strain-displacement equations==&lt;br /&gt;
&lt;br /&gt;
Under the action of applied forces, a point in the solid originally at $\boldsymbol{x} = (x,y,z)$ moves to position $\boldsymbol{X} = (X,Y,Z)$. This movement can be described completely by the displacement vector &lt;br /&gt;
\begin{equation*}&lt;br /&gt;
\boldsymbol{u}(\boldsymbol{x}) = \boldsymbol{X} - \boldsymbol{x},&lt;br /&gt;
\end{equation*}&lt;br /&gt;
consisting of three components&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\boldsymbol{u} = \{u_x \quad u_y \quad u_z\}.&lt;br /&gt;
\end{equation}&lt;br /&gt;
The brackets $\{\}$ indicate that this is a column vector. The components of this vector are mutually orthogonal and their positive directions correspond to the positive directions of the coordinate axes. To prevent confusion with the shorthand notation for partial derivatives, the components of $\boldsymbol{u}$ are sometimes represented with the letter $u, v, w$, e.g. $\boldsymbol{u} = \{u \quad v \quad w\}$.&lt;br /&gt;
&lt;br /&gt;
The strains in the deformed structure can be expressed as partial derivatives of the displacements as follows: --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Two-dimensional stress distributions ==&lt;br /&gt;
Many problems in elasticity can be simplified as two-dimensional problems described by ''plane theory of elasticity''. In general there are two types of problems we may encounter in plane analysis: '''plane stress''' and '''plane strain'''. The first problem arises in analysis of thin plates loaded in the plane of the plate, while the second is used for elongated bodies of constant cross section subject to uniform loading.&lt;br /&gt;
&lt;br /&gt;
=== Plane stress ===&lt;br /&gt;
&lt;br /&gt;
Plane stress distributions build on the assumption that the normal stress and shear stresses directed perpendicular to the $x$-$y$ plane are assumed zero:&lt;br /&gt;
\begin{equation}\label{eq:pstress_assump}&lt;br /&gt;
\sigma_{zz} = \sigma_{zx} = \sigma_{zy} = 0.&lt;br /&gt;
\end{equation}&lt;br /&gt;
It is also assumed that the stress components do not vary through the thickness of the plate (the assumptions do violate some compatibility conditions, but are still sufficiently accurate for practical applications if the plate is thin).&lt;br /&gt;
&lt;br /&gt;
Using (\ref{eq:pstress_assump}) the three-dimensional Hooke's law can be reduced to:&lt;br /&gt;
\begin{equation}\label{eq:planestress}&lt;br /&gt;
\boldsymbol{\sigma} = \boldsymbol{C}\boldsymbol{\varepsilon}&lt;br /&gt;
\end{equation}&lt;br /&gt;
in matrix form where for isotropic materials, we have&lt;br /&gt;
\begin{equation}\label{eq:planestressmatrix}&lt;br /&gt;
\boldsymbol{C}&lt;br /&gt;
= \frac{E}{1-\nu^2}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1 &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1 &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1-\nu}{2}&lt;br /&gt;
\end{bmatrix} \qquad \text{(Plane stress)}&lt;br /&gt;
\end{equation}&lt;br /&gt;
and &lt;br /&gt;
\begin{equation}\label{eq:2d_stress}&lt;br /&gt;
\b{\sigma} = \begin{bmatrix} \sigma_{xx} \\ \sigma_{yy} \\ \sigma_{xy}\end{bmatrix},&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}\label{eq:2d_strain}&lt;br /&gt;
\b{\varepsilon} = \begin{bmatrix} \varepsilon_{xx} \\ \varepsilon_{yy} \\ \gamma_{xy} \end{bmatrix} =&lt;br /&gt;
\begin{bmatrix} \varepsilon_{xx} \\ \varepsilon_{yy} \\ 2\varepsilon_{xy} \end{bmatrix} = &lt;br /&gt;
\begin{bmatrix} \frac{\partial u_x}{\partial x} \\ \frac{\partial u_y}{\partial y} \\ \frac{\partial u_y}{\partial x} + \frac{\partial u_x}{\partial y} \end{bmatrix}.&lt;br /&gt;
\end{equation}&lt;br /&gt;
Note that the strain tensor uses the so-called engineering shear strain $\gamma_{ij}$. Under the plane stress assumption the Navier equations are given as:&lt;br /&gt;
\begin{equation}\label{eq:navier_plane_stress}&lt;br /&gt;
\rho \frac{\partial^2 \b{u}}{\partial t^2} = \frac{E}{2(1+\nu)} \left( \b{\nabla}^2 \b{u} + \frac{1+\nu}{1-\nu}\b{\nabla}\left( \b{\nabla}\cdot \b{u}\right)  \right) + \b{F}&lt;br /&gt;
\end{equation}&lt;br /&gt;
or in component notation&lt;br /&gt;
\begin{align}&lt;br /&gt;
\rho \frac{\partial^2 u_x}{\partial t^2} &amp;amp;= \frac{E}{2(1+\nu)} \left( \frac{\partial^2 u_x}{\partial x^2} + \frac{\partial^2 u_x}{\partial y^2} \right) + \frac{E}{2(1-\nu)} \frac{\partial}{\partial x}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right) \\&lt;br /&gt;
\rho \frac{\partial^2 u_y}{\partial t^2} &amp;amp;= \frac{E}{2(1+\nu)} \left( \frac{\partial^2 u_y}{\partial x^2} + \frac{\partial^2 u_y}{\partial y^2} \right) + \frac{E}{2(1-\nu)} \frac{\partial}{\partial y}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right)&lt;br /&gt;
\end{align}&lt;br /&gt;
&lt;br /&gt;
==== Plane stress with Lamé constants ====&lt;br /&gt;
&lt;br /&gt;
The plane stress stiffness tensor (\ref{eq:planestressmatrix}) may also be expressed in terms of Lamé constants $\lambda$ and $\mu$ by substituting $E$ and $\nu$ with &lt;br /&gt;
\[E = \frac{\mu(3\lambda+2\mu)}{\lambda+\mu}\] &lt;br /&gt;
\[\nu = \frac{\lambda}{2(\lambda+\mu)}\]&lt;br /&gt;
&lt;br /&gt;
=== Plane strain ===&lt;br /&gt;
&lt;br /&gt;
The plane strain problem arises in analysis of walls, dams, tunnels where one dimension of the structure is very large in comparison to the other two dimensions ($x$- and $y$- coordinates). It is also appropriate for small-scale problems such as bars and rollers compressed by forces normal to their cross section. In all such problems the body may be imagined as a prismatic cylinder with one dimension much larger that the other two. The applied forces act in the $x$-$y$ plane and do not vary in the $z$ direction, leading to the assumption&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial}{\partial z} = u_z = 0.&lt;br /&gt;
\end{equation} &lt;br /&gt;
&lt;br /&gt;
With the above assumption it follows immediately that&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\varepsilon_{zz} = \varepsilon_{zx} = \varepsilon_{zy} = 0.&lt;br /&gt;
\end{equation}&lt;br /&gt;
The three dimensional Hooke's law can now be reduced to&lt;br /&gt;
\begin{equation}\label{eq:planestrain}&lt;br /&gt;
\boldsymbol{\sigma} = \boldsymbol{C}\boldsymbol{\varepsilon}&lt;br /&gt;
\end{equation}&lt;br /&gt;
where the matrix $C$ is given by&lt;br /&gt;
\begin{equation}\label{eq:matrixplanestrain}&lt;br /&gt;
\boldsymbol{C}&lt;br /&gt;
= \frac{E}{(1+\nu)(1-2\nu)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\nu &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1-\nu &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1-2\nu}{2}&lt;br /&gt;
\end{bmatrix} \qquad \text{(Plane strain)}&lt;br /&gt;
\end{equation}&lt;br /&gt;
The vectors $\boldsymbol{\sigma}$ and $\boldsymbol{\varepsilon}$ are the same as above for plane stress and are given in (\ref{eq:2d_stress}) and (\ref{eq:2d_strain}), respectively. In the case of plane strain we have additonal non-zero components of the stress tensor:&lt;br /&gt;
\begin{equation}\label{eq:sigmazz}&lt;br /&gt;
\sigma_{zz} = \nu(\sigma_{xx}+\sigma_{yy})&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\sigma_{yz} = \sigma_{zx} = 0&lt;br /&gt;
\end{equation}&lt;br /&gt;
The reason $\sigma_{zz}$ is not included in the matrix stress-strain equation (\ref{eq:planestrain}) is because it is linearly dependent on the normal stresses $\sigma_{xx}$ and $\sigma_{zz}$.&lt;br /&gt;
&lt;br /&gt;
The Navier-Cauchy equation that follows from the plane strain assumption can be found in (\ref{eq:navier_young_poisson}). For purposes of completeness we provide here the equations in component notation:&lt;br /&gt;
\begin{align}&lt;br /&gt;
\rho \frac{\partial^2 u_x}{\partial t^2} &amp;amp;= \frac{E}{2(1+\nu)} \left( \frac{\partial^2 u_x}{\partial x^2} + \frac{\partial^2 u_x}{\partial y^2} \right) + \frac{E}{2(1+\nu)(1-2\nu)} \frac{\partial}{\partial x}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right) \\&lt;br /&gt;
\rho \frac{\partial^2 u_y}{\partial t^2} &amp;amp;= \frac{E}{2(1+\nu)} \left( \frac{\partial^2 u_y}{\partial x^2} + \frac{\partial^2 u_y}{\partial y^2} \right) + \frac{E}{2(1+\nu)(1-2\nu)} \frac{\partial}{\partial y}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right)&lt;br /&gt;
\end{align}&lt;br /&gt;
&lt;br /&gt;
==== Plane strain with Lamé constants ====&lt;br /&gt;
&lt;br /&gt;
Alternatively the stiffness tensor $\b{C}$ in the stress-strain equation $\b{\sigma} = \b{C}\b{\varepsilon}$ may be expressed in terms of $\mu$ and $\lambda$:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\boldsymbol{C}&lt;br /&gt;
= &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
2\mu + \lambda &amp;amp; \lambda &amp;amp; 0 \\&lt;br /&gt;
\lambda &amp;amp; 2\mu + \lambda &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \mu^*&lt;br /&gt;
\end{bmatrix} \qquad \text{(Plane strain)}&lt;br /&gt;
\end{equation}&lt;br /&gt;
(*Note that this matrix requires the strain tensor to be defined using the engineering shear strain $\gamma_{xy} = 2\varepsilon_{xy}$. If we define the strain tensor as $\b{\varepsilon} = \{\varepsilon_{xx}\;\varepsilon_{yy}\;\varepsilon_{xy}\}^T$ then matrix component $C_{33}$ must be $2\mu$.)&lt;br /&gt;
&lt;br /&gt;
The Navier equations in vector form can be found in (\ref{eq:navier_mu_lambda}). In component notation the equations are:&lt;br /&gt;
\begin{align}&lt;br /&gt;
\rho \frac{\partial^2 u_x}{\partial t^2} &amp;amp;= \mu \left( \frac{\partial^2 u_x}{\partial x^2} + \frac{\partial^2 u_x}{\partial y^2} \right) + (\lambda+\mu) \frac{\partial}{\partial x}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right) \\&lt;br /&gt;
\rho \frac{\partial^2 u_y}{\partial t^2} &amp;amp;= \mu \left( \frac{\partial^2 u_y}{\partial x^2} + \frac{\partial^2 u_y}{\partial y^2} \right) + (\lambda+\mu) \frac{\partial}{\partial y}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right)&lt;br /&gt;
\end{align}&lt;br /&gt;
&lt;br /&gt;
=== Connection between plane stress and plane strain ===&lt;br /&gt;
&lt;br /&gt;
For '''isotropic''' materials with elastic modulus $E$ and Poisson's ratio $\nu$ it is possible to go from plane stress to plane strain, or vice-versa, by replacing $E$ and $\nu$ in the stress-strain matrix with a fictitious modulus $E^*$ and fictitious Poisson ratio $\nu^*$. This allows us to &amp;quot;reuse&amp;quot; a plane stress program to solve plane strain or again vice-versa (as long as the material is isotropic). A few exercises on this topic are given [http://www.colorado.edu/engineering/cas/courses.d/IFEM.d/IFEM.Ch14.d/IFEM.Ch14.pdf at this link (page 13)].&lt;br /&gt;
&lt;br /&gt;
To go from plane stres'''s''' ($s$) to plane strai'''n''' ($n$) insert the fictitious quantities&lt;br /&gt;
\begin{equation}\label{eq:ston1}&lt;br /&gt;
E_n^* = \frac{E_s}{1-\nu_s^2},&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}\label{eq:ston2}&lt;br /&gt;
\nu_n^* = \frac{\nu_s}{1-\nu_s}.&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
'''Substitution from plane stress to plane strain'''&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;Note: this derivation is shown just to confirm the above formulas. In a numerical program, we keep the stress-strain matrix and just use the above formulas (\ref{eq:ston1}) and (\ref{eq:ston2}) to update the values of $E$ and $\nu$. Also note we have omitted the indexes ($s$) and ($n$) in the following derivations.&lt;br /&gt;
&lt;br /&gt;
We start with the plane stress matrix with the inserted fictitious values $E^*$ and $\nu^*$&lt;br /&gt;
\[&lt;br /&gt;
\frac{E^*}{1-{\nu^*}^2}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1 &amp;amp; \nu^* &amp;amp; 0 \\&lt;br /&gt;
\nu^* &amp;amp; 1 &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-\nu^*)&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\] &lt;br /&gt;
and make the above substitutions (\ref{eq:ston1}) and (\ref{eq:ston2}) leading to:&lt;br /&gt;
\[&lt;br /&gt;
\frac{E}{\left(1-\nu^2\right)\left(1-\left(\frac{\nu}{1-\nu}\right)^2\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1 &amp;amp; \frac{\nu}{1-\nu} &amp;amp; 0 \\&lt;br /&gt;
\frac{\nu}{1-\nu} &amp;amp; 1 &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-\frac{\nu}{1-\nu})&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
We can then use the rule to convert sums of squares into products as well as bring the factor $1/(1-v)$ out of the matrix:&lt;br /&gt;
\[&lt;br /&gt;
\frac{E}{\left(1-\nu\right)\left(1+\nu\right)\left(1-\frac{\nu}{1-\nu}\right)\left(1+\frac{\nu}{1-\nu}\right)\left(1-\nu\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\nu &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1-\nu &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-2\nu)&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
By joining some of the factors to a common denominator and rearranging leads to&lt;br /&gt;
\[&lt;br /&gt;
\frac{E\left(1-\nu\right)\left(1-\nu\right)}{\left(1-\nu\right)\left(1+\nu\right)\left(1-2\nu\right)1\left(1-\nu\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\nu &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1-\nu &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-2\nu)&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
The final step is canceling the factors that occur in both the numerator and denominator &lt;br /&gt;
\[&lt;br /&gt;
\frac{E}{\left(1+\nu\right)\left(1-2\nu\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\nu &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1-\nu &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-2\nu)&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\]&lt;br /&gt;
which leads exactly to the relationship for plane strain given in (\ref{eq:planestrain}).&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the opposite case we want to go from plane strai'''n''' ($n$) to plane stres'''s''' ($s$) we can use:&lt;br /&gt;
\begin{equation}\label{eq:ntos1}&lt;br /&gt;
E_s^* = \frac{E_n(1+2\nu_n)}{(1+\nu_n)^2},&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}\label{eq:ntos2}&lt;br /&gt;
\nu_s^* = \frac{\nu_n}{1+\nu_n}.&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
'''Substitution from plane strain to plane stress'''&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Note that we have again omitted the indexes ($s$) and ($n$) since our wish is expressed by the bold title.&lt;br /&gt;
&lt;br /&gt;
We start with the plane strain matrix with the inserted fictitious values $E^*$ and $\nu^*$&lt;br /&gt;
\[&lt;br /&gt;
\frac{E^*}{\left(1+\nu^*\right)\left(1-2\nu^*\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\nu^* &amp;amp; \nu^* &amp;amp; 0 \\&lt;br /&gt;
\nu^* &amp;amp; 1-\nu^* &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-2\nu^*)&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\] &lt;br /&gt;
and make the above substitutions (\ref{eq:ntos1}) and (\ref{eq:ntos2}) leading to:&lt;br /&gt;
\[&lt;br /&gt;
\frac{E(1+2\nu)}{\left(1+\nu\right)^2\left(1+\frac{\nu}{1+\nu}\right)\left(1-2\frac{\nu}{1+\nu}\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\frac{\nu}{1+\nu} &amp;amp; \frac{\nu}{1+\nu} &amp;amp; 0 \\&lt;br /&gt;
\frac{\nu}{1+\nu} &amp;amp; 1-\frac{\nu}{1+\nu} &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-2\frac{\nu}{1+\nu})&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
Writing some of the sums with common denominators and rearranging leads to&lt;br /&gt;
\[&lt;br /&gt;
\frac{E(1+2\nu)(1+\nu)(1+\nu)}{\left(1+\nu\right)^2\left(1+2\nu\right)\left(1-\nu\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\frac{1}{1+\nu} &amp;amp; \frac{\nu}{1+\nu} &amp;amp; 0 \\&lt;br /&gt;
\frac{\nu}{1+\nu} &amp;amp; \frac{1}{1+\nu} &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}\left(\frac{1-\nu}{1+\nu}\right)&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
We can also bring the factor $1/(1+\nu)$ out from the matrix components. After canceling all factors that occur in both denominator and numerator we are left with&lt;br /&gt;
\[&lt;br /&gt;
\frac{E}{\left(1+\nu\right)\left(1-\nu\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1 &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1 &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-\nu)&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
Rewriting the product of sums as a sum of squares gives us the matrix for plane stress in (\ref{eq:planestress}).&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Principal stresses ===&lt;br /&gt;
This are the stresses when we rotate our coordinate system so that there are no shear components.&lt;br /&gt;
The principal stresses for plane stress conditions are given as eigenvalues of $\sigma$ with &lt;br /&gt;
\[&lt;br /&gt;
  \sigma_{1,2} = \frac12 (s_{xx} + s_{zz}) \pm \sqrt{\frac{1}{4}(s_{xx}-s_{zz})^2 + s_{xz}^2}.&lt;br /&gt;
\]&lt;br /&gt;
The principal shear stress or principal stress difference is the stress where only shear stresses are present. In case of plane stress it is calculated as&lt;br /&gt;
\[&lt;br /&gt;
  \tau_1 = \sqrt{\frac{1}{4}(s_{xx}-s_{zz})^2 + s_{xz}^2} = \frac{|\sigma_1 - \sigma_2|}{2}.&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
When the stress tensor is z 3x3 matrix, the formulas for eigenvalues are more complicated.&lt;br /&gt;
&lt;br /&gt;
=== Von Mises stress ===&lt;br /&gt;
&lt;br /&gt;
A more detailed explanation of the von Mises stress can be found on [https://en.wikipedia.org/wiki/Von_Mises_yield_criterion Wikipedia].&lt;br /&gt;
&lt;br /&gt;
In materials science and engineering the von Mises yield criterion can be also formulated in terms of the von Mises stress or equivalent tensile stress, $\sigma_v$. This is a scalar value of stress that can be computed from the Cauchy stress tensor $\boldsymbol{\sigma}$. In this case, a material is said to start yielding when the von Mises stress reaches a value known as yield strength, $\sigma_y$.&lt;br /&gt;
&lt;br /&gt;
Mathematically the von Mises yield criterion can be expressed as:&lt;br /&gt;
\[&lt;br /&gt;
  \sigma _{v}=\sigma _{y}={\sqrt {3J_{2}}}, &lt;br /&gt;
\]&lt;br /&gt;
where $J_2$ is the [https://en.wikipedia.org/wiki/Cauchy_stress_tensor#Stress_deviator_tensor second deviatoric stress invariant].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* Theory of matrix structural analysis&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Solid_Mechanics&amp;diff=1371</id>
		<title>Solid Mechanics</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Solid_Mechanics&amp;diff=1371"/>
				<updated>2017-10-05T13:19:36Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Von Mises stress */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Case studies =&lt;br /&gt;
&lt;br /&gt;
The following pages describe several case studies in the field of elastostatics and elastodynamics. The subpages include the problem description (equations and boundary conditions), analytical solutions if obtainable and numerical results for given parameter values.&lt;br /&gt;
&lt;br /&gt;
*[[Point contact]]&lt;br /&gt;
*[[Cantilever beam]]&lt;br /&gt;
*[[Hertzian contact]]&lt;br /&gt;
*[[FWO case]]&lt;br /&gt;
&lt;br /&gt;
=Basic equations of elasticity=&lt;br /&gt;
&lt;br /&gt;
To determine the distribution of static stresses and displacements in a solid body we must obtain a solution (either analytically or numerically) to the basic equations of the theory of elasticity, satisfying the boundary conditions on forces and/or displacements. The equations thus form a boundary value problem. For a general three dimensional solid object the equations governing its behavior are:&lt;br /&gt;
* equations of equilibrium (3)&lt;br /&gt;
* strain-displacement equations (6)&lt;br /&gt;
* stress-strain equations (6)&lt;br /&gt;
where the number in brackets indicates the number of equations. The equations of equilibrium are three tensor partial differential equations for the balance of linear momentum, the strain-displacement equations are relations that stem from infinitesimal strain theory and the stress-strain equations are a set of linear algebraic constitutive relations (3D Hooke's law). In two dimensions these equations simplify to 8 equations (2 equilibrium, 3 strain-displacement, and 3 stress-strain).&lt;br /&gt;
&lt;br /&gt;
A large amount of confusion regarding linear elasticity originates from the many different notations used in this field. For this reason we first provide an overview of the different notations that are used.&lt;br /&gt;
&lt;br /&gt;
=== Direct tensor form ===&lt;br /&gt;
In direct tensor form (independent of coordinate system) the governing equations are:&lt;br /&gt;
*Equation of motion (an expression of Newton's second law):&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{\nabla} \cdot \boldsymbol{\sigma} + \boldsymbol{F} = \rho \ddot{\boldsymbol{u}}&lt;br /&gt;
\]&lt;br /&gt;
*Strain-displacement equations:&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{\varepsilon} = \frac{1}{2}\left[ \boldsymbol{\nabla} \boldsymbol{u} + (\boldsymbol{\nabla} \boldsymbol{u})^T  \right]&lt;br /&gt;
\]&lt;br /&gt;
*Stress-displacement equations (constitutive equations). For a linear elastic material this is Hooke's law:&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{\sigma} = \boldsymbol{C} : \boldsymbol{\varepsilon}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
where $\boldsymbol{\sigma}$ is the Cauchy stress tensor, $\boldsymbol{\varepsilon}$ is the infinitesimal strain tensor, $\boldsymbol{u}$ is the displacement vector, $\boldsymbol{C}$ is the fourth order stiffness tensor, $\boldsymbol{F}$ is the body force per unit volume (a vector quantity), $\rho$ is the mass density, $\boldsymbol{\nabla}(\bullet)$ is the gradient operator, $\boldsymbol{\nabla}\cdot(\bullet)$ is the divergence operator, $(\bullet)^T$ represents a transpose, $\ddot{(\bullet)}$ is the second derivative with respect to time, and $\boldsymbol{A}:\boldsymbol{B}$ is the inner product of two second order tensors (a tensor contraction).&lt;br /&gt;
&lt;br /&gt;
=== Cartesian coordinate form ===&lt;br /&gt;
&lt;br /&gt;
Using the Einstein summation convention (implied summations over repeated indexes) the equations are:&lt;br /&gt;
*Equation of motion (an expression of Newton's second law):&lt;br /&gt;
\[&lt;br /&gt;
\sigma_{ji,j} + F_i = \rho \partial_{tt} u_i&lt;br /&gt;
\]&lt;br /&gt;
*Strain-displacement equations:&lt;br /&gt;
\[&lt;br /&gt;
\varepsilon_{ij} = \frac{1}{2}\left(u_{j,i}+u_{i,j}\right)&lt;br /&gt;
\]&lt;br /&gt;
*Stress-displacement equations (constitutive equations). For a linear elastic material this is Hooke's law:&lt;br /&gt;
\[&lt;br /&gt;
\sigma_{i,j} = C_{ijkl} \varepsilon_{kl},&lt;br /&gt;
\]&lt;br /&gt;
where $i,j = 1,2,3$ represent, respectively, $x$, $y$ and $z$, the $(\bullet),j$ subscript is a shorthand for partial derivative $\partial(\bullet)/\partial x_j$ and $\partial_{tt}$ is shorthand notation for $\partial^2/\partial t^2$, $\sigma_{ij}=\sigma_{ji}$ is the Cauchy stress tensor (with 6 independent components), $F_i$ are the body forces, $\rho$ is the mass density, $u_i$ is the displacement, $\varepsilon_{ij} = \varepsilon_{ji}$ is the strain tensor (also with 6 independent components), and, finally $C_{ijkl}$ is the fourth-order stiffness tensor that due to symmetry requirements $C_{ijkl} = C_{klij} = C_{jikl} =C_{ijkl}$ can be reduced to 21 different elements.&lt;br /&gt;
&lt;br /&gt;
=== Matrix-vector (FEM) notation ===&lt;br /&gt;
&lt;br /&gt;
*Equation of motion:&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{L}^T\boldsymbol{\sigma} + \boldsymbol{F} = \rho\ddot{\boldsymbol{u}}&lt;br /&gt;
\]&lt;br /&gt;
*Strain-displacement equations:&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{\varepsilon} = \boldsymbol{L}\boldsymbol{u}&lt;br /&gt;
\]&lt;br /&gt;
*Stress-displacement equations (constitutive equations). For a linear elastic material this is Hooke's law:&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{\sigma} = \boldsymbol{C}\boldsymbol{\varepsilon}&lt;br /&gt;
\]&lt;br /&gt;
where $\boldsymbol{\sigma}$ is the Cauchy stress tensor represented in vector form (6 components), $\boldsymbol{L}$ is a differential operator matrix (size $3 \times 6$), $\bullet^T$ is transpose of a matrix $\bullet$, $\boldsymbol{F}$ is the body force vector, $\rho$ is the mass density, $\boldsymbol{u}$ is the displacement vector, $\boldsymbol{\varepsilon}$ is the strain tensor represented in vector form (6 components), and $\boldsymbol{C}$ is the symmetric stress-strain matrix (size $6 \times 6$ with 21 material constants $C_{ij} = C_{ji}$). Certain literature prefers using the symbol $\boldsymbol{D}$ instead of $\boldsymbol{C}$ for the stress-strain matrix. The symbol $C$ is then used as the &amp;quot;compliance tensor&amp;quot; that relates the strains to the stresses, e.g. $\boldsymbol{\varepsilon} = \boldsymbol{C}\boldsymbol{\sigma}$.&lt;br /&gt;
&lt;br /&gt;
To solve the basic equations of elasticity two approaches exist according to the boundary conditions of the boundary value problem. In the '''displacement formulation''' the displacements are prescribed everywhere at the boundaries and the stresses and strains are eliminated from the formulation. The other possible option is that the surface tractions are prescribed everywhere on the surface boundary. The equations of elasticity are then manipulated to leave the stresses as the unknown to be solved for. This approach is known as the [https://en.wikipedia.org/wiki/Linear_elasticity#Stress_formulation '''stress formulation'''] and will not be considered here further.&lt;br /&gt;
&lt;br /&gt;
== Displacement formulation ==&lt;br /&gt;
&lt;br /&gt;
The goal of the displacement formulation is to eliminate the strains and stresses from the basic equations of elasticity and leave only the displacements as the unknown to be solved for. The first step is to substitute the strain-displacement equations into Hooke's law, eliminating the strains as unknowns:&lt;br /&gt;
\begin{equation}\label{eq:3d_hooke}&lt;br /&gt;
\sigma_{ij} = \lambda\delta_{ij}\varepsilon_{kk} + 2\mu\varepsilon_{ij} \quad \Rightarrow \quad &lt;br /&gt;
\begin{cases} &lt;br /&gt;
\sigma_{xx} = \lambda (u_{x,x}+u_{y,y}+u_{z,z}) + 2\mu u_{x,x}\\ &lt;br /&gt;
\sigma_{yy} = \lambda (u_{x,x}+u_{y,y}+u_{z,z}) + 2\mu u_{y,y}\\&lt;br /&gt;
\sigma_{zz} = \lambda (u_{x,x}+u_{y,y}+u_{z,z}) + 2\mu u_{z,z}\\&lt;br /&gt;
\sigma_{xy} = \mu (u_{x,y} + u_{y,x})\\&lt;br /&gt;
\sigma_{yz} = \mu (u_{y,z} + u_{z,y})\\&lt;br /&gt;
\sigma_{zx} = \mu (u_{z,x} + u_{x,z})&lt;br /&gt;
\end{cases}&lt;br /&gt;
\end{equation}&lt;br /&gt;
where $\lambda$ and $\mu$ are [https://en.wikipedia.org/wiki/Lam%C3%A9_parameters Lamé parameters]. The formula above can also be written more concisely as &lt;br /&gt;
\[&lt;br /&gt;
\sigma_{ij} = \lambda \delta_{ij} u_{k,k} + \mu(u_{i,j}+u_{j,i}).&lt;br /&gt;
\]&lt;br /&gt;
The next step is to substitute these equations into the equilibrium equation&lt;br /&gt;
\[&lt;br /&gt;
\sigma_{ij,j} + F_i = \rho \partial_{tt} u_i \quad \Rightarrow \quad &lt;br /&gt;
\begin{cases}&lt;br /&gt;
\frac{\partial \sigma_{xx}}{\partial x} + \frac{\partial \sigma_{xy}}{\partial y} + \frac{\partial \sigma_{xz}}{\partial z} + F_x = \rho \frac{\partial^2 u_x}{\partial t^2} \\&lt;br /&gt;
\frac{\partial \sigma_{yx}}{\partial x} + \frac{\partial \sigma_{yy}}{\partial y} + \frac{\partial \sigma_{yz}}{\partial z} + F_y = \rho \frac{\partial^2 u_y}{\partial t^2} \\&lt;br /&gt;
\frac{\partial \sigma_{zx}}{\partial x} + \frac{\partial \sigma_{zy}}{\partial y} + \frac{\partial \sigma_{zz}}{\partial z} + F_z = \rho \frac{\partial^2 u_z}{\partial t^2} &lt;br /&gt;
\end{cases}&lt;br /&gt;
\]&lt;br /&gt;
resulting in&lt;br /&gt;
\begin{align*}&lt;br /&gt;
&lt;br /&gt;
\frac{\partial}{\partial x}\left( \lambda \left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} + \frac{\partial u_z}{\partial z} \right) + 2\mu \frac{\partial u_x}{\partial x} \right) + \frac{\partial}{\partial y}\left(\mu\left(\frac{\partial u_x}{\partial y}+\frac{\partial u_y}{\partial x}\right)\right) + \frac{\partial}{\partial z}\left(\mu\left(\frac{\partial u_x}{\partial z}+\frac{\partial u_z}{\partial x}\right)\right) + F_x &amp;amp;= \rho \frac{\partial^2 u_x}{\partial t^2} \\&lt;br /&gt;
\frac{\partial}{\partial x}\left(\mu\left(\frac{\partial u_y}{\partial x}+\frac{\partial u_x}{\partial y}\right)\right) + \frac{\partial}{\partial y}\left(\lambda \left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} + \frac{\partial u_z}{\partial z} \right) + 2\mu \frac{\partial u_y}{\partial y}\right) + \frac{\partial}{\partial z}\left(\mu\left(\frac{\partial u_y}{\partial z}+\frac{\partial u_z}{\partial y}\right)\right) + F_y &amp;amp;= \rho \frac{\partial^2 u_y}{\partial t^2}\\&lt;br /&gt;
\frac{\partial}{\partial x}\left(\mu\left(\frac{\partial u_z}{\partial x}+\frac{\partial u_x}{\partial z}\right)\right) + \frac{\partial}{\partial y}\left(\mu\left(\frac{\partial u_z}{\partial y}+\frac{\partial u_y}{\partial z}\right)\right) + \frac{\partial}{\partial z}\left(\lambda \left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} + \frac{\partial u_z}{\partial z} \right) + 2\mu \frac{\partial u_z}{\partial z}\right) + F_z &amp;amp;= \rho \frac{\partial^2 u_z}{\partial t^2}&lt;br /&gt;
&lt;br /&gt;
\end{align*}&lt;br /&gt;
Using the assumption that Lamé parameters $\lambda$ and $\mu$ are constant we can rearrange to produce:&lt;br /&gt;
\begin{align*}&lt;br /&gt;
(\lambda + \mu) \frac{\partial}{\partial x}\left(\frac{\partial u_x}{\partial x}+\frac{\partial u_y}{\partial y}+\frac{\partial u_z}{\partial z}\right) + \mu\left(\frac{\partial^2 u_x}{\partial x^2}+\frac{\partial^2 u_x}{\partial y^2}+\frac{\partial^2 u_x}{\partial z^2}\right) + F_x &amp;amp;= \rho \frac{\partial^2 u_x}{\partial t^2} \\&lt;br /&gt;
(\lambda + \mu) \frac{\partial}{\partial y}\left(\frac{\partial u_x}{\partial x}+\frac{\partial u_y}{\partial y}+\frac{\partial u_z}{\partial z}\right) + \mu\left(\frac{\partial^2 u_y}{\partial x^2}+\frac{\partial^2 u_y}{\partial y^2}+\frac{\partial^2 u_y}{\partial z^2}\right) + F_y &amp;amp;= \rho \frac{\partial^2 u_y}{\partial t^2} \\&lt;br /&gt;
(\lambda + \mu) \frac{\partial}{\partial z}\left(\frac{\partial u_x}{\partial x}+\frac{\partial u_y}{\partial y}+\frac{\partial u_z}{\partial z}\right) + \mu\left(\frac{\partial^2 u_z}{\partial x^2}+\frac{\partial^2 u_z}{\partial y^2}+\frac{\partial^2 u_z}{\partial z^2}\right) + F_z &amp;amp;= \rho \frac{\partial^2 u_z}{\partial t^2} \\&lt;br /&gt;
\end{align*}&lt;br /&gt;
&lt;br /&gt;
We can easily see that only the displacements are left in these equations. The equations obtaines in this manner are known as the Navier-Cauchy equations.&lt;br /&gt;
&lt;br /&gt;
=== Navier-Cauchy equations ===&lt;br /&gt;
The Navier or Navier-Cauchy equations describe the dynamics of a solid through the displacement vector field $\b{u}$. The equations can also be expressed concisely in vector form as follows&lt;br /&gt;
\begin{equation}\label{eq:navier_mu_lambda}&lt;br /&gt;
\rho \frac{\partial^2 \b{u}}{\partial t^2} = (\lambda + \mu) \nabla(\nabla \cdot \b{u}) + \mu \nabla^2 \b{u} + \b{F}&lt;br /&gt;
\end{equation}&lt;br /&gt;
where $\mu$ and $\lambda$ are Lamé constants, $\rho$ is the object density and $\b{F}$ are the external forces. In certain cases we may prefer to use the Young modulus $E$ and the Poisson ratio $\nu$ instead of the Lamé constants. In this case the Navier equations are&lt;br /&gt;
\begin{equation}\label{eq:navier_young_poisson}&lt;br /&gt;
\rho \frac{\partial^2 \b{u}}{\partial t^2} = \frac{E}{2(1+\nu)}\left(\nabla^2 \b{u} + \frac{1}{1-2\nu}\nabla\left(\nabla \cdot \b{u}\right)\right) + \b{F}&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ==Strain-displacement equations==&lt;br /&gt;
&lt;br /&gt;
Under the action of applied forces, a point in the solid originally at $\boldsymbol{x} = (x,y,z)$ moves to position $\boldsymbol{X} = (X,Y,Z)$. This movement can be described completely by the displacement vector &lt;br /&gt;
\begin{equation*}&lt;br /&gt;
\boldsymbol{u}(\boldsymbol{x}) = \boldsymbol{X} - \boldsymbol{x},&lt;br /&gt;
\end{equation*}&lt;br /&gt;
consisting of three components&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\boldsymbol{u} = \{u_x \quad u_y \quad u_z\}.&lt;br /&gt;
\end{equation}&lt;br /&gt;
The brackets $\{\}$ indicate that this is a column vector. The components of this vector are mutually orthogonal and their positive directions correspond to the positive directions of the coordinate axes. To prevent confusion with the shorthand notation for partial derivatives, the components of $\boldsymbol{u}$ are sometimes represented with the letter $u, v, w$, e.g. $\boldsymbol{u} = \{u \quad v \quad w\}$.&lt;br /&gt;
&lt;br /&gt;
The strains in the deformed structure can be expressed as partial derivatives of the displacements as follows: --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Two-dimensional stress distributions ==&lt;br /&gt;
Many problems in elasticity can be simplified as two-dimensional problems described by ''plane theory of elasticity''. In general there are two types of problems we may encounter in plane analysis: '''plane stress''' and '''plane strain'''. The first problem arises in analysis of thin plates loaded in the plane of the plate, while the second is used for elongated bodies of constant cross section subject to uniform loading.&lt;br /&gt;
&lt;br /&gt;
=== Plane stress ===&lt;br /&gt;
&lt;br /&gt;
Plane stress distributions build on the assumption that the normal stress and shear stresses directed perpendicular to the $x$-$y$ plane are assumed zero:&lt;br /&gt;
\begin{equation}\label{eq:pstress_assump}&lt;br /&gt;
\sigma_{zz} = \sigma_{zx} = \sigma_{zy} = 0.&lt;br /&gt;
\end{equation}&lt;br /&gt;
It is also assumed that the stress components do not vary through the thickness of the plate (the assumptions do violate some compatibility conditions, but are still sufficiently accurate for practical applications if the plate is thin).&lt;br /&gt;
&lt;br /&gt;
Using (\ref{eq:pstress_assump}) the three-dimensional Hooke's law can be reduced to:&lt;br /&gt;
\begin{equation}\label{eq:planestress}&lt;br /&gt;
\boldsymbol{\sigma} = \boldsymbol{C}\boldsymbol{\varepsilon}&lt;br /&gt;
\end{equation}&lt;br /&gt;
in matrix form where for isotropic materials, we have&lt;br /&gt;
\begin{equation}\label{eq:planestressmatrix}&lt;br /&gt;
\boldsymbol{C}&lt;br /&gt;
= \frac{E}{1-\nu^2}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1 &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1 &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1-\nu}{2}&lt;br /&gt;
\end{bmatrix} \qquad \text{(Plane stress)}&lt;br /&gt;
\end{equation}&lt;br /&gt;
and &lt;br /&gt;
\begin{equation}\label{eq:2d_stress}&lt;br /&gt;
\b{\sigma} = \begin{bmatrix} \sigma_{xx} \\ \sigma_{yy} \\ \sigma_{xy}\end{bmatrix},&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}\label{eq:2d_strain}&lt;br /&gt;
\b{\varepsilon} = \begin{bmatrix} \varepsilon_{xx} \\ \varepsilon_{yy} \\ \gamma_{xy} \end{bmatrix} =&lt;br /&gt;
\begin{bmatrix} \varepsilon_{xx} \\ \varepsilon_{yy} \\ 2\varepsilon_{xy} \end{bmatrix} = &lt;br /&gt;
\begin{bmatrix} \frac{\partial u_x}{\partial x} \\ \frac{\partial u_y}{\partial y} \\ \frac{\partial u_y}{\partial x} + \frac{\partial u_x}{\partial y} \end{bmatrix}.&lt;br /&gt;
\end{equation}&lt;br /&gt;
Note that the strain tensor uses the so-called engineering shear strain $\gamma_{ij}$. Under the plane stress assumption the Navier equations are given as:&lt;br /&gt;
\begin{equation}\label{eq:navier_plane_stress}&lt;br /&gt;
\rho \frac{\partial^2 \b{u}}{\partial t^2} = \frac{E}{2(1+\nu)} \left( \b{\nabla}^2 \b{u} + \frac{1+\nu}{1-\nu}\b{\nabla}\left( \b{\nabla}\cdot \b{u}\right)  \right) + \b{F}&lt;br /&gt;
\end{equation}&lt;br /&gt;
or in component notation&lt;br /&gt;
\begin{align}&lt;br /&gt;
\rho \frac{\partial^2 u_x}{\partial t^2} &amp;amp;= \frac{E}{2(1+\nu)} \left( \frac{\partial^2 u_x}{\partial x^2} + \frac{\partial^2 u_x}{\partial y^2} \right) + \frac{E}{2(1-\nu)} \frac{\partial}{\partial x}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right) \\&lt;br /&gt;
\rho \frac{\partial^2 u_y}{\partial t^2} &amp;amp;= \frac{E}{2(1+\nu)} \left( \frac{\partial^2 u_y}{\partial x^2} + \frac{\partial^2 u_y}{\partial y^2} \right) + \frac{E}{2(1-\nu)} \frac{\partial}{\partial y}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right)&lt;br /&gt;
\end{align}&lt;br /&gt;
&lt;br /&gt;
==== Plane stress with Lamé constants ====&lt;br /&gt;
&lt;br /&gt;
The plane stress stiffness tensor (\ref{eq:planestressmatrix}) may also be expressed in terms of Lamé constants $\lambda$ and $\mu$ by substituting $E$ and $\nu$ with &lt;br /&gt;
\[E = \frac{\mu(3\lambda+2\mu)}{\lambda+\mu}\] &lt;br /&gt;
\[\nu = \frac{\lambda}{2(\lambda+\mu)}\]&lt;br /&gt;
&lt;br /&gt;
=== Plane strain ===&lt;br /&gt;
&lt;br /&gt;
The plane strain problem arises in analysis of walls, dams, tunnels where one dimension of the structure is very large in comparison to the other two dimensions ($x$- and $y$- coordinates). It is also appropriate for small-scale problems such as bars and rollers compressed by forces normal to their cross section. In all such problems the body may be imagined as a prismatic cylinder with one dimension much larger that the other two. The applied forces act in the $x$-$y$ plane and do not vary in the $z$ direction, leading to the assumption&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial}{\partial z} = u_z = 0.&lt;br /&gt;
\end{equation} &lt;br /&gt;
&lt;br /&gt;
With the above assumption it follows immediately that&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\varepsilon_{zz} = \varepsilon_{zx} = \varepsilon_{zy} = 0.&lt;br /&gt;
\end{equation}&lt;br /&gt;
The three dimensional Hooke's law can now be reduced to&lt;br /&gt;
\begin{equation}\label{eq:planestrain}&lt;br /&gt;
\boldsymbol{\sigma} = \boldsymbol{C}\boldsymbol{\varepsilon}&lt;br /&gt;
\end{equation}&lt;br /&gt;
where the matrix $C$ is given by&lt;br /&gt;
\begin{equation}\label{eq:matrixplanestrain}&lt;br /&gt;
\boldsymbol{C}&lt;br /&gt;
= \frac{E}{(1+\nu)(1-2\nu)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\nu &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1-\nu &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1-2\nu}{2}&lt;br /&gt;
\end{bmatrix} \qquad \text{(Plane strain)}&lt;br /&gt;
\end{equation}&lt;br /&gt;
The vectors $\boldsymbol{\sigma}$ and $\boldsymbol{\varepsilon}$ are the same as above for plane stress and are given in (\ref{eq:2d_stress}) and (\ref{eq:2d_strain}), respectively. In the case of plane strain we have additonal non-zero components of the stress tensor:&lt;br /&gt;
\begin{equation}\label{eq:sigmazz}&lt;br /&gt;
\sigma_{zz} = \nu(\sigma_{xx}+\sigma_{yy})&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\sigma_{yz} = \sigma_{zx} = 0&lt;br /&gt;
\end{equation}&lt;br /&gt;
The reason $\sigma_{zz}$ is not included in the matrix stress-strain equation (\ref{eq:planestrain}) is because it is linearly dependent on the normal stresses $\sigma_{xx}$ and $\sigma_{zz}$.&lt;br /&gt;
&lt;br /&gt;
The Navier-Cauchy equation that follows from the plane strain assumption can be found in (\ref{eq:navier_young_poisson}). For purposes of completeness we provide here the equations in component notation:&lt;br /&gt;
\begin{align}&lt;br /&gt;
\rho \frac{\partial^2 u_x}{\partial t^2} &amp;amp;= \frac{E}{2(1+\nu)} \left( \frac{\partial^2 u_x}{\partial x^2} + \frac{\partial^2 u_x}{\partial y^2} \right) + \frac{E}{2(1+\nu)(1-2\nu)} \frac{\partial}{\partial x}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right) \\&lt;br /&gt;
\rho \frac{\partial^2 u_y}{\partial t^2} &amp;amp;= \frac{E}{2(1+\nu)} \left( \frac{\partial^2 u_y}{\partial x^2} + \frac{\partial^2 u_y}{\partial y^2} \right) + \frac{E}{2(1+\nu)(1-2\nu)} \frac{\partial}{\partial y}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right)&lt;br /&gt;
\end{align}&lt;br /&gt;
&lt;br /&gt;
==== Plane strain with Lamé constants ====&lt;br /&gt;
&lt;br /&gt;
Alternatively the stiffness tensor $\b{C}$ in the stress-strain equation $\b{\sigma} = \b{C}\b{\varepsilon}$ may be expressed in terms of $\mu$ and $\lambda$:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\boldsymbol{C}&lt;br /&gt;
= &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
2\mu + \lambda &amp;amp; \lambda &amp;amp; 0 \\&lt;br /&gt;
\lambda &amp;amp; 2\mu + \lambda &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \mu^*&lt;br /&gt;
\end{bmatrix} \qquad \text{(Plane strain)}&lt;br /&gt;
\end{equation}&lt;br /&gt;
(*Note that this matrix requires the strain tensor to be defined using the engineering shear strain $\gamma_{xy} = 2\varepsilon_{xy}$. If we define the strain tensor as $\b{\varepsilon} = \{\varepsilon_{xx}\;\varepsilon_{yy}\;\varepsilon_{xy}\}^T$ then matrix component $C_{33}$ must be $2\mu$.)&lt;br /&gt;
&lt;br /&gt;
The Navier equations in vector form can be found in (\ref{eq:navier_mu_lambda}). In component notation the equations are:&lt;br /&gt;
\begin{align}&lt;br /&gt;
\rho \frac{\partial^2 u_x}{\partial t^2} &amp;amp;= \mu \left( \frac{\partial^2 u_x}{\partial x^2} + \frac{\partial^2 u_x}{\partial y^2} \right) + (\lambda+\mu) \frac{\partial}{\partial x}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right) \\&lt;br /&gt;
\rho \frac{\partial^2 u_y}{\partial t^2} &amp;amp;= \mu \left( \frac{\partial^2 u_y}{\partial x^2} + \frac{\partial^2 u_y}{\partial y^2} \right) + (\lambda+\mu) \frac{\partial}{\partial y}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right)&lt;br /&gt;
\end{align}&lt;br /&gt;
&lt;br /&gt;
=== Connection between plane stress and plane strain ===&lt;br /&gt;
&lt;br /&gt;
For '''isotropic''' materials with elastic modulus $E$ and Poisson's ratio $\nu$ it is possible to go from plane stress to plane strain, or vice-versa, by replacing $E$ and $\nu$ in the stress-strain matrix with a fictitious modulus $E^*$ and fictitious Poisson ratio $\nu^*$. This allows us to &amp;quot;reuse&amp;quot; a plane stress program to solve plane strain or again vice-versa (as long as the material is isotropic). A few exercises on this topic are given [http://www.colorado.edu/engineering/cas/courses.d/IFEM.d/IFEM.Ch14.d/IFEM.Ch14.pdf at this link (page 13)].&lt;br /&gt;
&lt;br /&gt;
To go from plane stres'''s''' ($s$) to plane strai'''n''' ($n$) insert the fictitious quantities&lt;br /&gt;
\begin{equation}\label{eq:ston1}&lt;br /&gt;
E_n^* = \frac{E_s}{1-\nu_s^2},&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}\label{eq:ston2}&lt;br /&gt;
\nu_n^* = \frac{\nu_s}{1-\nu_s}.&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
'''Substitution from plane stress to plane strain'''&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;Note: this derivation is shown just to confirm the above formulas. In a numerical program, we keep the stress-strain matrix and just use the above formulas (\ref{eq:ston1}) and (\ref{eq:ston2}) to update the values of $E$ and $\nu$. Also note we have omitted the indexes ($s$) and ($n$) in the following derivations.&lt;br /&gt;
&lt;br /&gt;
We start with the plane stress matrix with the inserted fictitious values $E^*$ and $\nu^*$&lt;br /&gt;
\[&lt;br /&gt;
\frac{E^*}{1-{\nu^*}^2}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1 &amp;amp; \nu^* &amp;amp; 0 \\&lt;br /&gt;
\nu^* &amp;amp; 1 &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-\nu^*)&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\] &lt;br /&gt;
and make the above substitutions (\ref{eq:ston1}) and (\ref{eq:ston2}) leading to:&lt;br /&gt;
\[&lt;br /&gt;
\frac{E}{\left(1-\nu^2\right)\left(1-\left(\frac{\nu}{1-\nu}\right)^2\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1 &amp;amp; \frac{\nu}{1-\nu} &amp;amp; 0 \\&lt;br /&gt;
\frac{\nu}{1-\nu} &amp;amp; 1 &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-\frac{\nu}{1-\nu})&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
We can then use the rule to convert sums of squares into products as well as bring the factor $1/(1-v)$ out of the matrix:&lt;br /&gt;
\[&lt;br /&gt;
\frac{E}{\left(1-\nu\right)\left(1+\nu\right)\left(1-\frac{\nu}{1-\nu}\right)\left(1+\frac{\nu}{1-\nu}\right)\left(1-\nu\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\nu &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1-\nu &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-2\nu)&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
By joining some of the factors to a common denominator and rearranging leads to&lt;br /&gt;
\[&lt;br /&gt;
\frac{E\left(1-\nu\right)\left(1-\nu\right)}{\left(1-\nu\right)\left(1+\nu\right)\left(1-2\nu\right)1\left(1-\nu\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\nu &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1-\nu &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-2\nu)&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
The final step is canceling the factors that occur in both the numerator and denominator &lt;br /&gt;
\[&lt;br /&gt;
\frac{E}{\left(1+\nu\right)\left(1-2\nu\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\nu &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1-\nu &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-2\nu)&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\]&lt;br /&gt;
which leads exactly to the relationship for plane strain given in (\ref{eq:planestrain}).&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the opposite case we want to go from plane strai'''n''' ($n$) to plane stres'''s''' ($s$) we can use:&lt;br /&gt;
\begin{equation}\label{eq:ntos1}&lt;br /&gt;
E_s^* = \frac{E_n(1+2\nu_n)}{(1+\nu_n)^2},&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}\label{eq:ntos2}&lt;br /&gt;
\nu_s^* = \frac{\nu_n}{1+\nu_n}.&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
'''Substitution from plane strain to plane stress'''&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Note that we have again omitted the indexes ($s$) and ($n$) since our wish is expressed by the bold title.&lt;br /&gt;
&lt;br /&gt;
We start with the plane strain matrix with the inserted fictitious values $E^*$ and $\nu^*$&lt;br /&gt;
\[&lt;br /&gt;
\frac{E^*}{\left(1+\nu^*\right)\left(1-2\nu^*\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\nu^* &amp;amp; \nu^* &amp;amp; 0 \\&lt;br /&gt;
\nu^* &amp;amp; 1-\nu^* &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-2\nu^*)&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\] &lt;br /&gt;
and make the above substitutions (\ref{eq:ntos1}) and (\ref{eq:ntos2}) leading to:&lt;br /&gt;
\[&lt;br /&gt;
\frac{E(1+2\nu)}{\left(1+\nu\right)^2\left(1+\frac{\nu}{1+\nu}\right)\left(1-2\frac{\nu}{1+\nu}\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\frac{\nu}{1+\nu} &amp;amp; \frac{\nu}{1+\nu} &amp;amp; 0 \\&lt;br /&gt;
\frac{\nu}{1+\nu} &amp;amp; 1-\frac{\nu}{1+\nu} &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-2\frac{\nu}{1+\nu})&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
Writing some of the sums with common denominators and rearranging leads to&lt;br /&gt;
\[&lt;br /&gt;
\frac{E(1+2\nu)(1+\nu)(1+\nu)}{\left(1+\nu\right)^2\left(1+2\nu\right)\left(1-\nu\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\frac{1}{1+\nu} &amp;amp; \frac{\nu}{1+\nu} &amp;amp; 0 \\&lt;br /&gt;
\frac{\nu}{1+\nu} &amp;amp; \frac{1}{1+\nu} &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}\left(\frac{1-\nu}{1+\nu}\right)&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
We can also bring the factor $1/(1+\nu)$ out from the matrix components. After canceling all factors that occur in both denominator and numerator we are left with&lt;br /&gt;
\[&lt;br /&gt;
\frac{E}{\left(1+\nu\right)\left(1-\nu\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1 &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1 &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-\nu)&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
Rewriting the product of sums as a sum of squares gives us the matrix for plane stress in (\ref{eq:planestress}).&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Principal stresses ===&lt;br /&gt;
This are the stresses when we rotate our coordinate system so that there are no shear components.&lt;br /&gt;
The principal stresses for plane stress conditions are given as eigenvalues of $\sigma$ with &lt;br /&gt;
\[&lt;br /&gt;
  \sigma_{1,2} = \frac12 (s_{xx} + s_{zz}) \pm \sqrt{\frac{1}{4}(s_{xx}-s_{zz})^2 + s_{xz}^2}.&lt;br /&gt;
\]&lt;br /&gt;
The principal shear stress or principal stress difference is the stress where only shear stresses are present. In case of plane stress it is calculated as&lt;br /&gt;
\[&lt;br /&gt;
  \tau_1 = \sqrt{\frac{1}{4}(s_{xx}-s_{zz})^2 + s_{xz}^2} = \frac{|\sigma_1 - \sigma_2|}{2}.&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
When the stress tensor is z 3x3 matrix, the formulas for eigenvalues are more complicated.&lt;br /&gt;
&lt;br /&gt;
=== Von Mises stress ===&lt;br /&gt;
&lt;br /&gt;
A more detailed explanation of the von Mises stress can be found on [https://en.wikipedia.org/wiki/Von_Mises_yield_criterion Wikipedia].&lt;br /&gt;
&lt;br /&gt;
In materials science and engineering the von Mises yield criterion can be also formulated in terms of the von Mises stress or equivalent tensile stress, $\sigma_v$. This is a scalar value of stress that can be computed from the Cauchy stress tensor $\bm{\sigma}$. In this case, a material is said to start yielding when the von Mises stress reaches a value known as yield strength, $\sigma_y$.&lt;br /&gt;
&lt;br /&gt;
Mathematically the von Mises yield criterion can be expressed as:&lt;br /&gt;
\[&lt;br /&gt;
  \sigma _{v}=\sigma _{y}={\sqrt {3J_{2}}}, &lt;br /&gt;
\]&lt;br /&gt;
where $J_2$ is the [https://en.wikipedia.org/wiki/Cauchy_stress_tensor#Stress_deviator_tensor second deviatoric stress invariant].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* Theory of matrix structural analysis&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	<entry>
		<id>https://e6.ijs.si/medusa/wiki/index.php?title=Solid_Mechanics&amp;diff=1362</id>
		<title>Solid Mechanics</title>
		<link rel="alternate" type="text/html" href="https://e6.ijs.si/medusa/wiki/index.php?title=Solid_Mechanics&amp;diff=1362"/>
				<updated>2017-10-05T10:03:28Z</updated>
		
		<summary type="html">&lt;p&gt;Ipribec: /* Principal stresses */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Case studies =&lt;br /&gt;
&lt;br /&gt;
The following pages describe several case studies in the field of elastostatics and elastodynamics. The subpages include the problem description (equations and boundary conditions), analytical solutions if obtainable and numerical results for given parameter values.&lt;br /&gt;
&lt;br /&gt;
*[[Point contact]]&lt;br /&gt;
*[[Cantilever beam]]&lt;br /&gt;
*[[Hertzian contact]]&lt;br /&gt;
*[[FWO case]]&lt;br /&gt;
&lt;br /&gt;
=Basic equations of elasticity=&lt;br /&gt;
&lt;br /&gt;
To determine the distribution of static stresses and displacements in a solid body we must obtain a solution (either analytically or numerically) to the basic equations of the theory of elasticity, satisfying the boundary conditions on forces and/or displacements. The equations thus form a boundary value problem. For a general three dimensional solid object the equations governing its behavior are:&lt;br /&gt;
* equations of equilibrium (3)&lt;br /&gt;
* strain-displacement equations (6)&lt;br /&gt;
* stress-strain equations (6)&lt;br /&gt;
where the number in brackets indicates the number of equations. The equations of equilibrium are three tensor partial differential equations for the balance of linear momentum, the strain-displacement equations are relations that stem from infinitesimal strain theory and the stress-strain equations are a set of linear algebraic constitutive relations (3D Hooke's law). In two dimensions these equations simplify to 8 equations (2 equilibrium, 3 strain-displacement, and 3 stress-strain).&lt;br /&gt;
&lt;br /&gt;
A large amount of confusion regarding linear elasticity originates from the many different notations used in this field. For this reason we first provide an overview of the different notations that are used.&lt;br /&gt;
&lt;br /&gt;
=== Direct tensor form ===&lt;br /&gt;
In direct tensor form (independent of coordinate system) the governing equations are:&lt;br /&gt;
*Equation of motion (an expression of Newton's second law):&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{\nabla} \cdot \boldsymbol{\sigma} + \boldsymbol{F} = \rho \ddot{\boldsymbol{u}}&lt;br /&gt;
\]&lt;br /&gt;
*Strain-displacement equations:&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{\varepsilon} = \frac{1}{2}\left[ \boldsymbol{\nabla} \boldsymbol{u} + (\boldsymbol{\nabla} \boldsymbol{u})^T  \right]&lt;br /&gt;
\]&lt;br /&gt;
*Stress-displacement equations (constitutive equations). For a linear elastic material this is Hooke's law:&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{\sigma} = \boldsymbol{C} : \boldsymbol{\varepsilon}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
where $\boldsymbol{\sigma}$ is the Cauchy stress tensor, $\boldsymbol{\varepsilon}$ is the infinitesimal strain tensor, $\boldsymbol{u}$ is the displacement vector, $\boldsymbol{C}$ is the fourth order stiffness tensor, $\boldsymbol{F}$ is the body force per unit volume (a vector quantity), $\rho$ is the mass density, $\boldsymbol{\nabla}(\bullet)$ is the gradient operator, $\boldsymbol{\nabla}\cdot(\bullet)$ is the divergence operator, $(\bullet)^T$ represents a transpose, $\ddot{(\bullet)}$ is the second derivative with respect to time, and $\boldsymbol{A}:\boldsymbol{B}$ is the inner product of two second order tensors (a tensor contraction).&lt;br /&gt;
&lt;br /&gt;
=== Cartesian coordinate form ===&lt;br /&gt;
&lt;br /&gt;
Using the Einstein summation convention (implied summations over repeated indexes) the equations are:&lt;br /&gt;
*Equation of motion (an expression of Newton's second law):&lt;br /&gt;
\[&lt;br /&gt;
\sigma_{ji,j} + F_i = \rho \partial_{tt} u_i&lt;br /&gt;
\]&lt;br /&gt;
*Strain-displacement equations:&lt;br /&gt;
\[&lt;br /&gt;
\varepsilon_{ij} = \frac{1}{2}\left(u_{j,i}+u_{i,j}\right)&lt;br /&gt;
\]&lt;br /&gt;
*Stress-displacement equations (constitutive equations). For a linear elastic material this is Hooke's law:&lt;br /&gt;
\[&lt;br /&gt;
\sigma_{i,j} = C_{ijkl} \varepsilon_{kl},&lt;br /&gt;
\]&lt;br /&gt;
where $i,j = 1,2,3$ represent, respectively, $x$, $y$ and $z$, the $(\bullet),j$ subscript is a shorthand for partial derivative $\partial(\bullet)/\partial x_j$ and $\partial_{tt}$ is shorthand notation for $\partial^2/\partial t^2$, $\sigma_{ij}=\sigma_{ji}$ is the Cauchy stress tensor (with 6 independent components), $F_i$ are the body forces, $\rho$ is the mass density, $u_i$ is the displacement, $\varepsilon_{ij} = \varepsilon_{ji}$ is the strain tensor (also with 6 independent components), and, finally $C_{ijkl}$ is the fourth-order stiffness tensor that due to symmetry requirements $C_{ijkl} = C_{klij} = C_{jikl} =C_{ijkl}$ can be reduced to 21 different elements.&lt;br /&gt;
&lt;br /&gt;
=== Matrix-vector (FEM) notation ===&lt;br /&gt;
&lt;br /&gt;
*Equation of motion:&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{L}^T\boldsymbol{\sigma} + \boldsymbol{F} = \rho\ddot{\boldsymbol{u}}&lt;br /&gt;
\]&lt;br /&gt;
*Strain-displacement equations:&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{\varepsilon} = \boldsymbol{L}\boldsymbol{u}&lt;br /&gt;
\]&lt;br /&gt;
*Stress-displacement equations (constitutive equations). For a linear elastic material this is Hooke's law:&lt;br /&gt;
\[&lt;br /&gt;
\boldsymbol{\sigma} = \boldsymbol{C}\boldsymbol{\varepsilon}&lt;br /&gt;
\]&lt;br /&gt;
where $\boldsymbol{\sigma}$ is the Cauchy stress tensor represented in vector form (6 components), $\boldsymbol{L}$ is a differential operator matrix (size $3 \times 6$), $\bullet^T$ is transpose of a matrix $\bullet$, $\boldsymbol{F}$ is the body force vector, $\rho$ is the mass density, $\boldsymbol{u}$ is the displacement vector, $\boldsymbol{\varepsilon}$ is the strain tensor represented in vector form (6 components), and $\boldsymbol{C}$ is the symmetric stress-strain matrix (size $6 \times 6$ with 21 material constants $C_{ij} = C_{ji}$). Certain literature prefers using the symbol $\boldsymbol{D}$ instead of $\boldsymbol{C}$ for the stress-strain matrix. The symbol $C$ is then used as the &amp;quot;compliance tensor&amp;quot; that relates the strains to the stresses, e.g. $\boldsymbol{\varepsilon} = \boldsymbol{C}\boldsymbol{\sigma}$.&lt;br /&gt;
&lt;br /&gt;
To solve the basic equations of elasticity two approaches exist according to the boundary conditions of the boundary value problem. In the '''displacement formulation''' the displacements are prescribed everywhere at the boundaries and the stresses and strains are eliminated from the formulation. The other possible option is that the surface tractions are prescribed everywhere on the surface boundary. The equations of elasticity are then manipulated to leave the stresses as the unknown to be solved for. This approach is known as the [https://en.wikipedia.org/wiki/Linear_elasticity#Stress_formulation '''stress formulation'''] and will not be considered here further.&lt;br /&gt;
&lt;br /&gt;
== Displacement formulation ==&lt;br /&gt;
&lt;br /&gt;
The goal of the displacement formulation is to eliminate the strains and stresses from the basic equations of elasticity and leave only the displacements as the unknown to be solved for. The first step is to substitute the strain-displacement equations into Hooke's law, eliminating the strains as unknowns:&lt;br /&gt;
\begin{equation}\label{eq:3d_hooke}&lt;br /&gt;
\sigma_{ij} = \lambda\delta_{ij}\varepsilon_{kk} + 2\mu\varepsilon_{ij} \quad \Rightarrow \quad &lt;br /&gt;
\begin{cases} &lt;br /&gt;
\sigma_{xx} = \lambda (u_{x,x}+u_{y,y}+u_{z,z}) + 2\mu u_{x,x}\\ &lt;br /&gt;
\sigma_{yy} = \lambda (u_{x,x}+u_{y,y}+u_{z,z}) + 2\mu u_{y,y}\\&lt;br /&gt;
\sigma_{zz} = \lambda (u_{x,x}+u_{y,y}+u_{z,z}) + 2\mu u_{z,z}\\&lt;br /&gt;
\sigma_{xy} = \mu (u_{x,y} + u_{y,x})\\&lt;br /&gt;
\sigma_{yz} = \mu (u_{y,z} + u_{z,y})\\&lt;br /&gt;
\sigma_{zx} = \mu (u_{z,x} + u_{x,z})&lt;br /&gt;
\end{cases}&lt;br /&gt;
\end{equation}&lt;br /&gt;
where $\lambda$ and $\mu$ are [https://en.wikipedia.org/wiki/Lam%C3%A9_parameters Lamé parameters]. The formula above can also be written more concisely as &lt;br /&gt;
\[&lt;br /&gt;
\sigma_{ij} = \lambda \delta_{ij} u_{k,k} + \mu(u_{i,j}+u_{j,i}).&lt;br /&gt;
\]&lt;br /&gt;
The next step is to substitute these equations into the equilibrium equation&lt;br /&gt;
\[&lt;br /&gt;
\sigma_{ij,j} + F_i = \rho \partial_{tt} u_i \quad \Rightarrow \quad &lt;br /&gt;
\begin{cases}&lt;br /&gt;
\frac{\partial \sigma_{xx}}{\partial x} + \frac{\partial \sigma_{xy}}{\partial y} + \frac{\partial \sigma_{xz}}{\partial z} + F_x = \rho \frac{\partial^2 u_x}{\partial t^2} \\&lt;br /&gt;
\frac{\partial \sigma_{yx}}{\partial x} + \frac{\partial \sigma_{yy}}{\partial y} + \frac{\partial \sigma_{yz}}{\partial z} + F_y = \rho \frac{\partial^2 u_y}{\partial t^2} \\&lt;br /&gt;
\frac{\partial \sigma_{zx}}{\partial x} + \frac{\partial \sigma_{zy}}{\partial y} + \frac{\partial \sigma_{zz}}{\partial z} + F_z = \rho \frac{\partial^2 u_z}{\partial t^2} &lt;br /&gt;
\end{cases}&lt;br /&gt;
\]&lt;br /&gt;
resulting in&lt;br /&gt;
\begin{align*}&lt;br /&gt;
&lt;br /&gt;
\frac{\partial}{\partial x}\left( \lambda \left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} + \frac{\partial u_z}{\partial z} \right) + 2\mu \frac{\partial u_x}{\partial x} \right) + \frac{\partial}{\partial y}\left(\mu\left(\frac{\partial u_x}{\partial y}+\frac{\partial u_y}{\partial x}\right)\right) + \frac{\partial}{\partial z}\left(\mu\left(\frac{\partial u_x}{\partial z}+\frac{\partial u_z}{\partial x}\right)\right) + F_x &amp;amp;= \rho \frac{\partial^2 u_x}{\partial t^2} \\&lt;br /&gt;
\frac{\partial}{\partial x}\left(\mu\left(\frac{\partial u_y}{\partial x}+\frac{\partial u_x}{\partial y}\right)\right) + \frac{\partial}{\partial y}\left(\lambda \left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} + \frac{\partial u_z}{\partial z} \right) + 2\mu \frac{\partial u_y}{\partial y}\right) + \frac{\partial}{\partial z}\left(\mu\left(\frac{\partial u_y}{\partial z}+\frac{\partial u_z}{\partial y}\right)\right) + F_y &amp;amp;= \rho \frac{\partial^2 u_y}{\partial t^2}\\&lt;br /&gt;
\frac{\partial}{\partial x}\left(\mu\left(\frac{\partial u_z}{\partial x}+\frac{\partial u_x}{\partial z}\right)\right) + \frac{\partial}{\partial y}\left(\mu\left(\frac{\partial u_z}{\partial y}+\frac{\partial u_y}{\partial z}\right)\right) + \frac{\partial}{\partial z}\left(\lambda \left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} + \frac{\partial u_z}{\partial z} \right) + 2\mu \frac{\partial u_z}{\partial z}\right) + F_z &amp;amp;= \rho \frac{\partial^2 u_z}{\partial t^2}&lt;br /&gt;
&lt;br /&gt;
\end{align*}&lt;br /&gt;
Using the assumption that Lamé parameters $\lambda$ and $\mu$ are constant we can rearrange to produce:&lt;br /&gt;
\begin{align*}&lt;br /&gt;
(\lambda + \mu) \frac{\partial}{\partial x}\left(\frac{\partial u_x}{\partial x}+\frac{\partial u_y}{\partial y}+\frac{\partial u_z}{\partial z}\right) + \mu\left(\frac{\partial^2 u_x}{\partial x^2}+\frac{\partial^2 u_x}{\partial y^2}+\frac{\partial^2 u_x}{\partial z^2}\right) + F_x &amp;amp;= \rho \frac{\partial^2 u_x}{\partial t^2} \\&lt;br /&gt;
(\lambda + \mu) \frac{\partial}{\partial y}\left(\frac{\partial u_x}{\partial x}+\frac{\partial u_y}{\partial y}+\frac{\partial u_z}{\partial z}\right) + \mu\left(\frac{\partial^2 u_y}{\partial x^2}+\frac{\partial^2 u_y}{\partial y^2}+\frac{\partial^2 u_y}{\partial z^2}\right) + F_y &amp;amp;= \rho \frac{\partial^2 u_y}{\partial t^2} \\&lt;br /&gt;
(\lambda + \mu) \frac{\partial}{\partial z}\left(\frac{\partial u_x}{\partial x}+\frac{\partial u_y}{\partial y}+\frac{\partial u_z}{\partial z}\right) + \mu\left(\frac{\partial^2 u_z}{\partial x^2}+\frac{\partial^2 u_z}{\partial y^2}+\frac{\partial^2 u_z}{\partial z^2}\right) + F_z &amp;amp;= \rho \frac{\partial^2 u_z}{\partial t^2} \\&lt;br /&gt;
\end{align*}&lt;br /&gt;
&lt;br /&gt;
We can easily see that only the displacements are left in these equations. The equations obtaines in this manner are known as the Navier-Cauchy equations.&lt;br /&gt;
&lt;br /&gt;
=== Navier-Cauchy equations ===&lt;br /&gt;
The Navier or Navier-Cauchy equations describe the dynamics of a solid through the displacement vector field $\b{u}$. The equations can also be expressed concisely in vector form as follows&lt;br /&gt;
\begin{equation}\label{eq:navier_mu_lambda}&lt;br /&gt;
\rho \frac{\partial^2 \b{u}}{\partial t^2} = (\lambda + \mu) \nabla(\nabla \cdot \b{u}) + \mu \nabla^2 \b{u} + \b{F}&lt;br /&gt;
\end{equation}&lt;br /&gt;
where $\mu$ and $\lambda$ are Lamé constants, $\rho$ is the object density and $\b{F}$ are the external forces. In certain cases we may prefer to use the Young modulus $E$ and the Poisson ratio $\nu$ instead of the Lamé constants. In this case the Navier equations are&lt;br /&gt;
\begin{equation}\label{eq:navier_young_poisson}&lt;br /&gt;
\rho \frac{\partial^2 \b{u}}{\partial t^2} = \frac{E}{2(1+\nu)}\left(\nabla^2 \b{u} + \frac{1}{1-2\nu}\nabla\left(\nabla \cdot \b{u}\right)\right) + \b{F}&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ==Strain-displacement equations==&lt;br /&gt;
&lt;br /&gt;
Under the action of applied forces, a point in the solid originally at $\boldsymbol{x} = (x,y,z)$ moves to position $\boldsymbol{X} = (X,Y,Z)$. This movement can be described completely by the displacement vector &lt;br /&gt;
\begin{equation*}&lt;br /&gt;
\boldsymbol{u}(\boldsymbol{x}) = \boldsymbol{X} - \boldsymbol{x},&lt;br /&gt;
\end{equation*}&lt;br /&gt;
consisting of three components&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\boldsymbol{u} = \{u_x \quad u_y \quad u_z\}.&lt;br /&gt;
\end{equation}&lt;br /&gt;
The brackets $\{\}$ indicate that this is a column vector. The components of this vector are mutually orthogonal and their positive directions correspond to the positive directions of the coordinate axes. To prevent confusion with the shorthand notation for partial derivatives, the components of $\boldsymbol{u}$ are sometimes represented with the letter $u, v, w$, e.g. $\boldsymbol{u} = \{u \quad v \quad w\}$.&lt;br /&gt;
&lt;br /&gt;
The strains in the deformed structure can be expressed as partial derivatives of the displacements as follows: --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Two-dimensional stress distributions ==&lt;br /&gt;
Many problems in elasticity can be simplified as two-dimensional problems described by ''plane theory of elasticity''. In general there are two types of problems we may encounter in plane analysis: '''plane stress''' and '''plane strain'''. The first problem arises in analysis of thin plates loaded in the plane of the plate, while the second is used for elongated bodies of constant cross section subject to uniform loading.&lt;br /&gt;
&lt;br /&gt;
=== Plane stress ===&lt;br /&gt;
&lt;br /&gt;
Plane stress distributions build on the assumption that the normal stress and shear stresses directed perpendicular to the $x$-$y$ plane are assumed zero:&lt;br /&gt;
\begin{equation}\label{eq:pstress_assump}&lt;br /&gt;
\sigma_{zz} = \sigma_{zx} = \sigma_{zy} = 0.&lt;br /&gt;
\end{equation}&lt;br /&gt;
It is also assumed that the stress components do not vary through the thickness of the plate (the assumptions do violate some compatibility conditions, but are still sufficiently accurate for practical applications if the plate is thin).&lt;br /&gt;
&lt;br /&gt;
Using (\ref{eq:pstress_assump}) the three-dimensional Hooke's law can be reduced to:&lt;br /&gt;
\begin{equation}\label{eq:planestress}&lt;br /&gt;
\boldsymbol{\sigma} = \boldsymbol{C}\boldsymbol{\varepsilon}&lt;br /&gt;
\end{equation}&lt;br /&gt;
in matrix form where for isotropic materials, we have&lt;br /&gt;
\begin{equation}\label{eq:planestressmatrix}&lt;br /&gt;
\boldsymbol{C}&lt;br /&gt;
= \frac{E}{1-\nu^2}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1 &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1 &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1-\nu}{2}&lt;br /&gt;
\end{bmatrix} \qquad \text{(Plane stress)}&lt;br /&gt;
\end{equation}&lt;br /&gt;
and &lt;br /&gt;
\begin{equation}\label{eq:2d_stress}&lt;br /&gt;
\b{\sigma} = \begin{bmatrix} \sigma_{xx} \\ \sigma_{yy} \\ \sigma_{xy}\end{bmatrix},&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}\label{eq:2d_strain}&lt;br /&gt;
\b{\varepsilon} = \begin{bmatrix} \varepsilon_{xx} \\ \varepsilon_{yy} \\ \gamma_{xy} \end{bmatrix} =&lt;br /&gt;
\begin{bmatrix} \varepsilon_{xx} \\ \varepsilon_{yy} \\ 2\varepsilon_{xy} \end{bmatrix} = &lt;br /&gt;
\begin{bmatrix} \frac{\partial u_x}{\partial x} \\ \frac{\partial u_y}{\partial y} \\ \frac{\partial u_y}{\partial x} + \frac{\partial u_x}{\partial y} \end{bmatrix}.&lt;br /&gt;
\end{equation}&lt;br /&gt;
Note that the strain tensor uses the so-called engineering shear strain $\gamma_{ij}$. Under the plane stress assumption the Navier equations are given as:&lt;br /&gt;
\begin{equation}\label{eq:navier_plane_stress}&lt;br /&gt;
\rho \frac{\partial^2 \b{u}}{\partial t^2} = \frac{E}{2(1+\nu)} \left( \b{\nabla}^2 \b{u} + \frac{1+\nu}{1-\nu}\b{\nabla}\left( \b{\nabla}\cdot \b{u}\right)  \right) + \b{F}&lt;br /&gt;
\end{equation}&lt;br /&gt;
or in component notation&lt;br /&gt;
\begin{align}&lt;br /&gt;
\rho \frac{\partial^2 u_x}{\partial t^2} &amp;amp;= \frac{E}{2(1+\nu)} \left( \frac{\partial^2 u_x}{\partial x^2} + \frac{\partial^2 u_x}{\partial y^2} \right) + \frac{E}{2(1-\nu)} \frac{\partial}{\partial x}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right) \\&lt;br /&gt;
\rho \frac{\partial^2 u_y}{\partial t^2} &amp;amp;= \frac{E}{2(1+\nu)} \left( \frac{\partial^2 u_y}{\partial x^2} + \frac{\partial^2 u_y}{\partial y^2} \right) + \frac{E}{2(1-\nu)} \frac{\partial}{\partial y}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right)&lt;br /&gt;
\end{align}&lt;br /&gt;
&lt;br /&gt;
==== Plane stress with Lamé constants ====&lt;br /&gt;
&lt;br /&gt;
The plane stress stiffness tensor (\ref{eq:planestressmatrix}) may also be expressed in terms of Lamé constants $\lambda$ and $\mu$ by substituting $E$ and $\nu$ with &lt;br /&gt;
\[E = \frac{\mu(3\lambda+2\mu)}{\lambda+\mu}\] &lt;br /&gt;
\[\nu = \frac{\lambda}{2(\lambda+\mu)}\]&lt;br /&gt;
&lt;br /&gt;
=== Plane strain ===&lt;br /&gt;
&lt;br /&gt;
The plane strain problem arises in analysis of walls, dams, tunnels where one dimension of the structure is very large in comparison to the other two dimensions ($x$- and $y$- coordinates). It is also appropriate for small-scale problems such as bars and rollers compressed by forces normal to their cross section. In all such problems the body may be imagined as a prismatic cylinder with one dimension much larger that the other two. The applied forces act in the $x$-$y$ plane and do not vary in the $z$ direction, leading to the assumption&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{\partial}{\partial z} = u_z = 0.&lt;br /&gt;
\end{equation} &lt;br /&gt;
&lt;br /&gt;
With the above assumption it follows immediately that&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\varepsilon_{zz} = \varepsilon_{zx} = \varepsilon_{zy} = 0.&lt;br /&gt;
\end{equation}&lt;br /&gt;
The three dimensional Hooke's law can now be reduced to&lt;br /&gt;
\begin{equation}\label{eq:planestrain}&lt;br /&gt;
\boldsymbol{\sigma} = \boldsymbol{C}\boldsymbol{\varepsilon}&lt;br /&gt;
\end{equation}&lt;br /&gt;
where the matrix $C$ is given by&lt;br /&gt;
\begin{equation}\label{eq:matrixplanestrain}&lt;br /&gt;
\boldsymbol{C}&lt;br /&gt;
= \frac{E}{(1+\nu)(1-2\nu)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\nu &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1-\nu &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1-2\nu}{2}&lt;br /&gt;
\end{bmatrix} \qquad \text{(Plane strain)}&lt;br /&gt;
\end{equation}&lt;br /&gt;
The vectors $\boldsymbol{\sigma}$ and $\boldsymbol{\varepsilon}$ are the same as above for plane stress and are given in (\ref{eq:2d_stress}) and (\ref{eq:2d_strain}), respectively. In the case of plane strain we have additonal non-zero components of the stress tensor:&lt;br /&gt;
\begin{equation}\label{eq:sigmazz}&lt;br /&gt;
\sigma_{zz} = \nu(\sigma_{xx}+\sigma_{yy})&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\sigma_{yz} = \sigma_{zx} = 0&lt;br /&gt;
\end{equation}&lt;br /&gt;
The reason $\sigma_{zz}$ is not included in the matrix stress-strain equation (\ref{eq:planestrain}) is because it is linearly dependent on the normal stresses $\sigma_{xx}$ and $\sigma_{zz}$.&lt;br /&gt;
&lt;br /&gt;
The Navier-Cauchy equation that follows from the plane strain assumption can be found in (\ref{eq:navier_young_poisson}). For purposes of completeness we provide here the equations in component notation:&lt;br /&gt;
\begin{align}&lt;br /&gt;
\rho \frac{\partial^2 u_x}{\partial t^2} &amp;amp;= \frac{E}{2(1+\nu)} \left( \frac{\partial^2 u_x}{\partial x^2} + \frac{\partial^2 u_x}{\partial y^2} \right) + \frac{E}{2(1+\nu)(1-2\nu)} \frac{\partial}{\partial x}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right) \\&lt;br /&gt;
\rho \frac{\partial^2 u_y}{\partial t^2} &amp;amp;= \frac{E}{2(1+\nu)} \left( \frac{\partial^2 u_y}{\partial x^2} + \frac{\partial^2 u_y}{\partial y^2} \right) + \frac{E}{2(1+\nu)(1-2\nu)} \frac{\partial}{\partial y}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right)&lt;br /&gt;
\end{align}&lt;br /&gt;
&lt;br /&gt;
==== Plane strain with Lamé constants ====&lt;br /&gt;
&lt;br /&gt;
Alternatively the stiffness tensor $\b{C}$ in the stress-strain equation $\b{\sigma} = \b{C}\b{\varepsilon}$ may be expressed in terms of $\mu$ and $\lambda$:&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\boldsymbol{C}&lt;br /&gt;
= &lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
2\mu + \lambda &amp;amp; \lambda &amp;amp; 0 \\&lt;br /&gt;
\lambda &amp;amp; 2\mu + \lambda &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \mu^*&lt;br /&gt;
\end{bmatrix} \qquad \text{(Plane strain)}&lt;br /&gt;
\end{equation}&lt;br /&gt;
(*Note that this matrix requires the strain tensor to be defined using the engineering shear strain $\gamma_{xy} = 2\varepsilon_{xy}$. If we define the strain tensor as $\b{\varepsilon} = \{\varepsilon_{xx}\;\varepsilon_{yy}\;\varepsilon_{xy}\}^T$ then matrix component $C_{33}$ must be $2\mu$.)&lt;br /&gt;
&lt;br /&gt;
The Navier equations in vector form can be found in (\ref{eq:navier_mu_lambda}). In component notation the equations are:&lt;br /&gt;
\begin{align}&lt;br /&gt;
\rho \frac{\partial^2 u_x}{\partial t^2} &amp;amp;= \mu \left( \frac{\partial^2 u_x}{\partial x^2} + \frac{\partial^2 u_x}{\partial y^2} \right) + (\lambda+\mu) \frac{\partial}{\partial x}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right) \\&lt;br /&gt;
\rho \frac{\partial^2 u_y}{\partial t^2} &amp;amp;= \mu \left( \frac{\partial^2 u_y}{\partial x^2} + \frac{\partial^2 u_y}{\partial y^2} \right) + (\lambda+\mu) \frac{\partial}{\partial y}\left( \frac{\partial u_x}{\partial x} + \frac{\partial u_y}{\partial y} \right)&lt;br /&gt;
\end{align}&lt;br /&gt;
&lt;br /&gt;
=== Connection between plane stress and plane strain ===&lt;br /&gt;
&lt;br /&gt;
For '''isotropic''' materials with elastic modulus $E$ and Poisson's ratio $\nu$ it is possible to go from plane stress to plane strain, or vice-versa, by replacing $E$ and $\nu$ in the stress-strain matrix with a fictitious modulus $E^*$ and fictitious Poisson ratio $\nu^*$. This allows us to &amp;quot;reuse&amp;quot; a plane stress program to solve plane strain or again vice-versa (as long as the material is isotropic). A few exercises on this topic are given [http://www.colorado.edu/engineering/cas/courses.d/IFEM.d/IFEM.Ch14.d/IFEM.Ch14.pdf at this link (page 13)].&lt;br /&gt;
&lt;br /&gt;
To go from plane stres'''s''' ($s$) to plane strai'''n''' ($n$) insert the fictitious quantities&lt;br /&gt;
\begin{equation}\label{eq:ston1}&lt;br /&gt;
E_n^* = \frac{E_s}{1-\nu_s^2},&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}\label{eq:ston2}&lt;br /&gt;
\nu_n^* = \frac{\nu_s}{1-\nu_s}.&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
'''Substitution from plane stress to plane strain'''&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;Note: this derivation is shown just to confirm the above formulas. In a numerical program, we keep the stress-strain matrix and just use the above formulas (\ref{eq:ston1}) and (\ref{eq:ston2}) to update the values of $E$ and $\nu$. Also note we have omitted the indexes ($s$) and ($n$) in the following derivations.&lt;br /&gt;
&lt;br /&gt;
We start with the plane stress matrix with the inserted fictitious values $E^*$ and $\nu^*$&lt;br /&gt;
\[&lt;br /&gt;
\frac{E^*}{1-{\nu^*}^2}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1 &amp;amp; \nu^* &amp;amp; 0 \\&lt;br /&gt;
\nu^* &amp;amp; 1 &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-\nu^*)&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\] &lt;br /&gt;
and make the above substitutions (\ref{eq:ston1}) and (\ref{eq:ston2}) leading to:&lt;br /&gt;
\[&lt;br /&gt;
\frac{E}{\left(1-\nu^2\right)\left(1-\left(\frac{\nu}{1-\nu}\right)^2\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1 &amp;amp; \frac{\nu}{1-\nu} &amp;amp; 0 \\&lt;br /&gt;
\frac{\nu}{1-\nu} &amp;amp; 1 &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-\frac{\nu}{1-\nu})&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
We can then use the rule to convert sums of squares into products as well as bring the factor $1/(1-v)$ out of the matrix:&lt;br /&gt;
\[&lt;br /&gt;
\frac{E}{\left(1-\nu\right)\left(1+\nu\right)\left(1-\frac{\nu}{1-\nu}\right)\left(1+\frac{\nu}{1-\nu}\right)\left(1-\nu\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\nu &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1-\nu &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-2\nu)&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
By joining some of the factors to a common denominator and rearranging leads to&lt;br /&gt;
\[&lt;br /&gt;
\frac{E\left(1-\nu\right)\left(1-\nu\right)}{\left(1-\nu\right)\left(1+\nu\right)\left(1-2\nu\right)1\left(1-\nu\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\nu &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1-\nu &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-2\nu)&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
The final step is canceling the factors that occur in both the numerator and denominator &lt;br /&gt;
\[&lt;br /&gt;
\frac{E}{\left(1+\nu\right)\left(1-2\nu\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\nu &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1-\nu &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-2\nu)&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\]&lt;br /&gt;
which leads exactly to the relationship for plane strain given in (\ref{eq:planestrain}).&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the opposite case we want to go from plane strai'''n''' ($n$) to plane stres'''s''' ($s$) we can use:&lt;br /&gt;
\begin{equation}\label{eq:ntos1}&lt;br /&gt;
E_s^* = \frac{E_n(1+2\nu_n)}{(1+\nu_n)^2},&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}\label{eq:ntos2}&lt;br /&gt;
\nu_s^* = \frac{\nu_n}{1+\nu_n}.&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
'''Substitution from plane strain to plane stress'''&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
Note that we have again omitted the indexes ($s$) and ($n$) since our wish is expressed by the bold title.&lt;br /&gt;
&lt;br /&gt;
We start with the plane strain matrix with the inserted fictitious values $E^*$ and $\nu^*$&lt;br /&gt;
\[&lt;br /&gt;
\frac{E^*}{\left(1+\nu^*\right)\left(1-2\nu^*\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\nu^* &amp;amp; \nu^* &amp;amp; 0 \\&lt;br /&gt;
\nu^* &amp;amp; 1-\nu^* &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-2\nu^*)&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\] &lt;br /&gt;
and make the above substitutions (\ref{eq:ntos1}) and (\ref{eq:ntos2}) leading to:&lt;br /&gt;
\[&lt;br /&gt;
\frac{E(1+2\nu)}{\left(1+\nu\right)^2\left(1+\frac{\nu}{1+\nu}\right)\left(1-2\frac{\nu}{1+\nu}\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1-\frac{\nu}{1+\nu} &amp;amp; \frac{\nu}{1+\nu} &amp;amp; 0 \\&lt;br /&gt;
\frac{\nu}{1+\nu} &amp;amp; 1-\frac{\nu}{1+\nu} &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-2\frac{\nu}{1+\nu})&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
Writing some of the sums with common denominators and rearranging leads to&lt;br /&gt;
\[&lt;br /&gt;
\frac{E(1+2\nu)(1+\nu)(1+\nu)}{\left(1+\nu\right)^2\left(1+2\nu\right)\left(1-\nu\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\frac{1}{1+\nu} &amp;amp; \frac{\nu}{1+\nu} &amp;amp; 0 \\&lt;br /&gt;
\frac{\nu}{1+\nu} &amp;amp; \frac{1}{1+\nu} &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}\left(\frac{1-\nu}{1+\nu}\right)&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
We can also bring the factor $1/(1+\nu)$ out from the matrix components. After canceling all factors that occur in both denominator and numerator we are left with&lt;br /&gt;
\[&lt;br /&gt;
\frac{E}{\left(1+\nu\right)\left(1-\nu\right)}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
1 &amp;amp; \nu &amp;amp; 0 \\&lt;br /&gt;
\nu &amp;amp; 1 &amp;amp; 0 \\&lt;br /&gt;
0 &amp;amp; 0 &amp;amp; \frac{1}{2}(1-\nu)&lt;br /&gt;
\end{bmatrix}.&lt;br /&gt;
\]&lt;br /&gt;
Rewriting the product of sums as a sum of squares gives us the matrix for plane stress in (\ref{eq:planestress}).&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Principal stresses ===&lt;br /&gt;
This are the stresses when we rotate our coordinate system so that there are no shear components.&lt;br /&gt;
The principal stresses for plane stress conditions are given as eigenvalues of $\sigma$ with &lt;br /&gt;
\[&lt;br /&gt;
  \sigma_{1,2} = \frac12 (s_{xx} + s_{zz}) \pm \sqrt{\frac{1}{4}(s_{xx}-s_{zz})^2 + s_{xz}^2}.&lt;br /&gt;
\]&lt;br /&gt;
The principal shear stress or principal stress difference is the stress where only shear stresses are present. In case of plane stress it is calculated as&lt;br /&gt;
\[&lt;br /&gt;
  \tau_1 = \sqrt{\frac{1}{4}(s_{xx}-s_{zz})^2 + s_{xz}^2} = \frac{|\sigma_1 - \sigma_2|}{2}.&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
When the stress tensor is z 3x3 matrix, the formulas for eigenvalues are more complicated.&lt;br /&gt;
&lt;br /&gt;
=== Von Mises stress ===&lt;br /&gt;
&lt;br /&gt;
A more detailed explanation of the von Mises stress can be found on [https://en.wikipedia.org/wiki/Von_Mises_yield_criterion Wikipedia].&lt;br /&gt;
&lt;br /&gt;
In materials science and engineering the von Mises yield criterion can be also formulated in terms of the von Mises stress or equivalent tensile stress, $\sigma_v$. This is a scalar value of stress that can be computed from the Cauchy stress tensor. In this case, a material is said to start yielding when the von Mises stress reaches a value known as yield strength, $\sigma_y$.&lt;br /&gt;
&lt;br /&gt;
Mathematically the von Mises can be expressed as:&lt;br /&gt;
\[&lt;br /&gt;
  \sigma _{v}=\sigma _{y}={\sqrt {3J_{2}}}, &lt;br /&gt;
\]&lt;br /&gt;
where $J_2$ is the [https://en.wikipedia.org/wiki/Cauchy_stress_tensor#Stress_deviator_tensor second deviatoric stress invariant].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
* Theory of matrix structural analysis&lt;/div&gt;</summary>
		<author><name>Ipribec</name></author>	</entry>

	</feed>