Implicit schemes for the divergence of a symmetric tensor of a vectorial equation defined on faces. More...
Namespaces | |
module | enum_navier_diffusion_term_scheme |
Discretization schemes for the diffusion momentum term (divergence of the stress tensor) | |
Functions | |
subroutine | mod_add_face_div_symmetric_tensor_term_centered_o2::add_face_div_symmetric_tensor_term_centered_o2 (matrix, mu_velocity_gradient, navier_stencil, navier_ls_map) |
Put div(stress_tensor) to a from computed coefficients. | |
subroutine mod_add_face_div_symmetric_tensor_term_centered_o2::add_face_div_symmetric_tensor_term_centered_o2 | ( | double precision, dimension(:), intent(inout) | matrix, |
type(t_face_vector_gradient), intent(inout) | mu_velocity_gradient, | ||
type(t_face_stencil), intent(in) | navier_stencil, | ||
type(t_face_ls_map), intent(in) | navier_ls_map ) |
The vector divergence of \( \nabla \cdot \mathbf{S} (\mathbf{u})\) is decomposed as:
\[ \nabla \cdot\mathbf{S} = \left[ \begin{matrix} \nabla \cdot \mathbf{S}_u (\mathbf{u}) \\ \nabla \cdot \mathbf{S}_v (\mathbf{u}) \\ \nabla \cdot \mathbf{S}_w (\mathbf{u}) \end{matrix} \right] \]
where the component \(\nabla \cdot \mathbf{S}_u (\mathbf{u})\) corresponds to the \(\mathtt{u}\) block of the \(\mathtt{U}\) column-matrix, \(\nabla \cdot \mathbf{S}_v (\mathbf{u})\) corresponds to the \(\mathtt{v}\) block of the \(\mathtt{U}\) column-matrix, and \(\nabla \cdot \mathbf{S}_w (\mathbf{u})\) corresponds to the \(\mathtt{w}\) block of the \(\mathtt{U}\) column-matrix:
\[ \mathtt{U} = \left[ \begin{matrix} \mathtt{u} \\ \mathtt{v} \\ \mathtt{w} \end{matrix} \right] \]
The following sections descibes the discretization of each block.
This component can be expanded into five terms:
\[ \nabla \cdot\mathbf{S}_u = \underbrace{ \frac {\partial} {\partial x} \Big( 2 \mu \frac {\partial u} {\partial x} \Big) }_{1} + \underbrace{ \frac {\partial} {\partial y} \Big( \mu \frac {\partial u} {\partial y} \Big) }_{2} + \underbrace{ \frac {\partial} {\partial y} \Big( \mu \frac {\partial v} {\partial x} \Big) }_{3} + \underbrace{ \frac {\partial} {\partial z} \Big( \mu \frac {\partial u} {\partial z} \Big) }_{4} + \underbrace{ \frac {\partial} {\partial z} \Big( \mu \frac {\partial w} {\partial x} \Big) }_{5} \]
The discretization of this term must be performed at the x-face centers. The outer derivatives are discretized using finite volumes, i. e. by evaluating fluxes across a control volume around the x-face center (in bold lines in the schemes below). The inner derivatives are discretized by finite differences from x-face center values.
left right ┌──┏━━┯━━┓──┐ y │ ┃ │ ┃ │ │ > o > o > o──x │ ┃ │ ┃ │ z └──┗━━┷━━┛──┘ im im i i ip
\begin{align} \text{Outer derivative:}&& \frac {\partial} {\partial x} \Big( 2 \mu \frac {\partial u} {\partial x} \Big) &= \mathtt{ \frac {1} {\Delta xu_i} } \left( \Big( 2 \mu \frac {\partial u} {\partial x} \Big)_{\texttt{i}} - \Big( 2 \mu \frac {\partial u} {\partial x} \Big)_{\texttt{im}} \right) \\ \text{Inner derivative:}&& &= \mathtt{ \frac {1} {\Delta xu_i} } \left( \mathtt{ \frac {2 \mu_i} {\Delta x_i} } \Big( \mathtt{u_{ip,j}} - \mathtt{u_{i,j}} \Big) - \mathtt{ \frac {2 \mu_{im}} {\Delta x_{im}} } \Big( \mathtt{u_{i,j}} - \mathtt{u_{im,j}} \Big) \right) \end{align}
The terms \(\mathtt{ \frac {2\mu_i} {\Delta x_i} } \) correspond to the mu_velocity_gradientux
argument.
┌─────┬─────┐ │ │ │ │ > │ jp │ │ │ top ├──┏━━×━━┓──┤ jp y │ ┃ │ ┃ │ │ │ ┃ > ┃ │ j o──x │ ┃ │ ┃ │ z bottom ├──┗━━×━━┛──┤ j │ │ │ │ > │ jm │ │ │ └─────┴─────┘
\begin{align} \text{Outer derivative:}&& \frac {\partial} {\partial y} \Big( \mu \frac {\partial u} {\partial y} \Big) &= \mathtt{ \frac {1} {\Delta y_j} } \left( \Big( \mu \frac {\partial u} {\partial y} \Big)_{\texttt{jp}} - \Big( \mu \frac {\partial u} {\partial y} \Big)_{\texttt{j}} \right) \\ \text{Inner derivative:}&& &= \mathtt{ \frac {1} {\Delta y_j} } \left( \mathtt{ \frac {\mu_{jp}} {\Delta yv_{jp}} } \Big( \mathtt{u_{i,jp}} - \mathtt{u_{i,j}} \Big) - \mathtt{ \frac {\mu_j} {\Delta yv_j} } \Big( \mathtt{u_{i,j}} - \mathtt{u_{i,jm}} \Big) \right) \end{align}
The terms \(\mathtt{ \frac {\mu_j} {\Delta yv_j} } \) correspond to the mu_velocity_gradientuy
argument.
left_top ┌──∧━━×━━∧──┐ jp right_top y │ ┃ │ ┃ │ │ │ ┃ > ┃ │ j o──x │ ┃ │ ┃ │ z left_bottom └──∧━━×━━∧──┘ j right_bottom im i i
\begin{align} \text{Outer derivative:}&& \frac {\partial} {\partial y} \Big( \mu \frac {\partial v} {\partial x} \Big) &= \mathtt{ \frac {1} {\Delta y_j} } \left( \Big( \mu \frac {\partial v} {\partial x} \Big)_{\texttt{jp}} - \Big( \mu \frac {\partial v} {\partial x} \Big)_{\texttt{j}} \right) \\ \text{Inner derivative:}&& &= \mathtt{ \frac {1} {\Delta y_j} } \left( \mathtt{ \frac {\mu_{jp}} {\Delta xu_i} } \Big( \mathtt{v_{i,jp}} - \mathtt{v_{im,jp}} \Big) - \mathtt{ \frac {\mu_j} {\Delta xu_i} } \Big( \mathtt{v_{i,j}} - \mathtt{v_{im,j}} \Big) \right) \end{align}
The terms \(\mathtt{ \frac {\mu_j} {\Delta xu_i} } \) correspond to the mu_velocity_gradientvx
argument.
┌─────┬─────┐ │ │ │ front │ > │ kp │ │ │ ├──┏━━×━━┓──┤ kp z │ ┃ │ ┃ │ │ │ ┃ > ┃ │ k ×──x │ ┃ │ ┃ │ y ├──┗━━×━━┛──┤ k │ │ │ back │ > │ km │ │ │ └─────┴─────┘
left_front ┌──∧━━×━━∧──┐ kp right_front z │ ┃ │ ┃ │ │ │ ┃ > ┃ │ k ×──x │ ┃ │ ┃ │ y left_back └──∧━━×━━∧──┘ k right_back im i i
\begin{align} \text{Outer derivative:}&& \frac {\partial} {\partial z} \Big( \mu \frac {\partial w} {\partial x} \Big) &= \mathtt{ \frac {1} {\Delta z_k} } \left( \Big( \mu \frac {\partial w} {\partial x} \Big)_{\texttt{kp}} - \Big( \mu \frac {\partial w} {\partial x} \Big)_{\texttt{k}} \right) \\ \text{Inner derivative:}&& &= \mathtt{ \frac {1} {\Delta z_k} } \left( \mathtt{ \frac {\mu_{kp}} {\Delta xu_i} } \Big( \mathtt{w_{i,kp}} - \mathtt{w_{im,kp}} \Big) - \mathtt{ \frac {\mu_k} {\Delta xu_i} } \Big( \mathtt{w_{i,k}} - \mathtt{w_{im,k}} \Big) \right) \end{align}
\[ \nabla \cdot\mathbf{S}_v = \underbrace{ \frac {\partial} {\partial x} \Big( \mu \frac {\partial v} {\partial x} \Big) }_{2} + \underbrace{ \frac {\partial} {\partial x} \Big( \mu \frac {\partial u} {\partial y} \Big) }_{3} + \underbrace{ \frac {\partial} {\partial y} \Big( 2 \mu \frac {\partial v} {\partial y} \Big) }_{1} + \underbrace{ \frac {\partial} {\partial z} \Big( \mu \frac {\partial v} {\partial z} \Big) }_{4} + \underbrace{ \frac {\partial} {\partial z} \Big( \mu \frac {\partial w} {\partial y} \Big) }_{5} \]
This is how each term is discretized:
┌──∧──┐ jp │ │ top ┏━━o━━┓ j y ┃ ┃ │ ┃──∧──┃ j o──x ┃ ┃ z bottom ┗━━o━━┛ jm │ │ └──∧──┘ jm
left right ┌─────┬─────┬─────┐ │ │ │ │ │ ┏━━━━━┓ │ y │ ┃ ┃ │ │ ├──∧──×──∧──×──∧──┤ o──x │ ┃ ┃ │ z │ ┗━━━━━┛ │ │ │ │ │ └─────┴─────┴─────┘ im i i ip ip
┌─────┐ │ │ left_top >━━━━━> j right_top y ┃ ┃ │ ×──∧──× j o──x ┃ ┃ z left_bottom >━━━━━> jm right_bottom │ │ └─────┘ i i ip
┌─────┬─────┐ │ │ │ front │ > │ kp │ │ │ ├──┏━━×━━┓──┤ kp z │ ┃ │ ┃ │ │ │ ┃ > ┃ │ k o──y │ ┃ │ ┃ │ x ├──┗━━×━━┛──┤ k │ │ │ back │ > │ km │ │ │ └─────┴─────┘
bottom_front ┌──∧━━×━━∧──┐ kp up_front z │ ┃ │ ┃ │ │ │ ┃ > ┃ │ k o──y │ ┃ │ ┃ │ x bottom_back └──∧━━×━━∧──┘ k up_back jm j j
\begin{align} \text{Outer derivative:}&& \frac {\partial} {\partial z} \Big( \mu \frac {\partial w} {\partial y} \Big) &= \mathtt{ \frac {1} {\Delta z_k} } \left( \Big( \mu \frac {\partial w} {\partial y} \Big)_{\texttt{kp}} - \Big( \mu \frac {\partial w} {\partial y} \Big)_{\texttt{k}} \right) \\ \text{Inner derivative:}&& &= \mathtt{ \frac {1} {\Delta z_k} } \left( \mathtt{ \frac {\mu_{kp}} {\Delta yv_j} } \Big( \mathtt{w_{j,kp}} - \mathtt{w_{jm,kp}} \Big) - \mathtt{ \frac {\mu_k} {\Delta yv_j} } \Big( \mathtt{w_{j,k}} - \mathtt{w_{jm,k}} \Big) \right) \end{align}
\[ \nabla \cdot\mathbf{S}_w = \underbrace{ \frac {\partial} {\partial x} \Big( \mu \frac {\partial w} {\partial x} \Big) }_{2} + \underbrace{ \frac {\partial} {\partial x} \Big( \mu \frac {\partial x} {\partial z} \Big) }_{3} + \underbrace{ \frac {\partial} {\partial y} \Big( \mu \frac {\partial w} {\partial y} \Big) }_{4} + \underbrace{ \frac {\partial} {\partial y} \Big( \mu \frac {\partial v} {\partial z} \Big) }_{5} + \underbrace{ \frac {\partial} {\partial z} \Big( 2 \mu \frac {\partial w} {\partial z} \Big) }_{1} \]
This is how each term is discretized:
┌──∧──┐ kp │ │ front ┏━━o━━┓ k z ┃ ┃ │ ┃──∧──┃ k ×──x ┃ ┃ y back ┗━━o━━┛ km │ │ └──∧──┘ km
left right ┌─────┬─────┬─────┐ │ │ │ │ │ ┏━━━━━┓ │ z │ ┃ ┃ │ │ ├──∧──×──∧──×──∧──┤ ×──x │ ┃ ┃ │ y │ ┗━━━━━┛ │ │ │ │ │ └─────┴─────┴─────┘ im i i ip ip
┌─────┐ │ │ left_front >━━━━━> k right_front z ┃ ┃ │ ×──∧──× k ×──x ┃ ┃ y left_back >━━━━━> km right_back │ │ └─────┘ i i ip
bottom top ┌─────┬─────┬─────┐ │ │ │ │ │ ┏━━━━━┓ │ z │ ┃ ┃ │ │ ├──∧──×──∧──×──∧──┤ o──y │ ┃ ┃ │ x │ ┗━━━━━┛ │ │ │ │ │ └─────┴─────┴─────┘ jm j j jp jp
┌─────┐ │ │ bottom_front >━━━━━> k up_front z ┃ ┃ │ ×──∧──× k o──y ┃ ┃ x bottom_back >━━━━━> km up_back │ │ └─────┘ j j jp