Fluid Variables

Variable

Definition

\(\rho\)

Fluid density

\(U\)

Fluid velocity

\(\tau\)

Viscous stress tensor

\({\bf H}_U\)

\(= (H_x , H_y , H_z )\), External Forces

\(H_s\)

External sources

Fluid Equations

Conservation of fluid mass:

\[\frac{\partial \rho}{\partial t} + \nabla \cdot (\rho U) = 0\]

Conservation of fluid momentum:

\[\frac{ \partial (\rho U)}{\partial t} + \nabla \cdot (\rho U U) + \nabla p = \nabla \cdot \tau + {\bf H}_U\]

Velocity constraint:

\[\nabla \cdot U = S\]

where \(S\) is zero by default, to model incompressible flow. The \(S \ne 0\) case is discussed below.

Tracer(s):

\[\frac{\partial \rho s}{\partial t} + \nabla \cdot (\rho s U) = \nabla \cdot \beta \nabla s + \rho H_s\]

for conservatively advected scalars and

\[\frac{\partial s}{\partial t} + U \cdot \nabla s = \nabla \cdot \beta \nabla s + H_s\]

for passively advected scalars. In general, one could advect an arbitrary number of scalars.

IAMR has the ability to incorporate general, user-defined external forcing and source terms. The default behaviour is that \(H_s=0\), and \({\bf H}_U\) represents gravitational forces, with \({\bf H}_U= (0 , 0 , -\rho g )\) in 3d and \({\bf H}_U= (0 , -\rho g )\) in 2d, where \(g\) is the magnitude of the gravitational acceleration. However, since by default, \(g=0\), \({\bf H}_U = 0\) unless ns.gravity is set (for more info see Physics Parameters).

By default, IAMR solves the momentum equation in convective form. The inputs parameter ns.do_mom_diff = 1 is used to switch to conservation form. Tracers are passively advected by default. The inputs parameter ns.do_cons_trac = 1 switches the first tracer to conservative. A second tracer can be included with ns.do_trac2 = 1, and it can be conservatively advected with ns.do_cons_trac2 = 1.

IAMR also has the option to solve for temperature, along with a modified divergence constraint on the velocity field:

\[ \begin{align}\begin{aligned}\rho c_p \left( \frac{\partial T}{\partial t} + U \cdot \nabla T \right) = \nabla \cdot \lambda \nabla T + H_T\\\nabla \cdot U = \frac{1}{\rho c_p T} \nabla \cdot \lambda \nabla T\end{aligned}\end{align} \]

Here, the divergence constraint captures compressibily effects due to thermal diffusion. To enable the temperature solve, use ns.do_temp = 1 and set ns.temp_cond_coef to represent \(\lambda / c_p\), which is taken to be constant. More sophiticated treatments are possible; if interested, please open an issue on github: https://github.com/AMReX-Fluids/IAMR/issues