Fluid Variables
Variable
Definition
\(\rho\)
Fluid density
\(U\)
Fluid velocity
\(p\)
Pressure
\(\eta\)
Viscosity (
incflo.mufor a Newtonian fluid)\(\tau\)
Viscous stress tensor, \(\eta (\nabla U + (\nabla U)^T)\)
\(\mu_s\)
scalar diffusivity
\(\mu_T\)
thermal conductivity
\(c_p\)
Specific heat (
incflo.cp)\({\bf g}\)
Gravitational acceleration
\({\bf H}_U\)
\(= (H_x , H_y , H_z )\), External Forces
\(H_s\)
External sources
\(H_T\)
External heat sources
Fluid Equations
Conservation of fluid mass:
Conservation of fluid momentum:
By default, incflo solves the equivalent convective form,
\(\rho ( \partial U / \partial t + U \cdot \nabla U ) + \nabla p = \nabla \cdot \tau + {\bf H}_U\);
incflo.advect_momentum = true selects the conservative form above.
With incflo.use_tensor_solve = false, the velocity components are diffused separately, with
\(\nabla \cdot (\eta \nabla U)\) in place of \(\nabla \cdot \tau\) (the two are equal for a
constant viscosity).
Velocity constraint:
or, with incflo.use_divu_source = 1, the constraint
for a given source \(S\), as in low Mach number models. Mass is still conserved, so
the density changes along particle paths as \(D\rho/Dt = -\rho S\). With
incflo.constant_density = 1 the density is not evolved, so mass is not conserved:
the constraint adds mass at the rate \(\rho_0 S\) per unit volume. That is not a low
Mach number model, and incflo warns about it, but it has exact solutions that are useful
for testing. \(S\) comes from incflo::compute_divu_source, which by default
uses an analytic \(S\) defined for the chosen incflo.probtype. It is virtual,
so a class derived from incflo can compute \(S\) from the state instead.
In a closed domain (only walls and periodic boundaries) the
projections can only enforce \(\nabla \cdot U = S - \bar{S}\), where \(\bar{S}\) is
the mean of \(S\); incflo warns when \(\bar{S} \ne 0\). That is a uniform change
of the thermodynamic pressure, which incflo does not evolve.
Tracer(s): for conservative,
or, for non-conservative (see incflo.trac_is_conservative),
Optional temperature:
By default, \(H_s = 0\), \(H_T = 0\), and \({\bf H}_U = {\bf 0}\).
If gravity is set (incflo.gravity), then \({\bf H}_U = \rho {\bf g}\), except for the
Boussinesq problems (incflo.probtype = 11, 111, 112, 113 and 500), which use
\({\bf H}_U = \rho s_0 {\bf g}\), where \(s_0\) is the first tracer.
Background pressure
Except for the Boussinesq problems, incflo writes the pressure as \(p = p_0 + p'\), where the background pressure \(p_0\) has a constant gradient, and solves for \(p'\):
in a direction with gravity, \(\nabla p_0 = \rho_0 {\bf g}\), the hydrostatic pressure gradient for the density \(\rho_0\) (
incflo.ro_0);in the direction in which
incflo.delpis non-zero, \(\nabla p_0 = - \mathrm{delp} / L\), where \(L\) is the length of the domain in that direction. This pressure drop drives the flow, e.g. in a periodic channel;in a direction with a pressure inflow at one end and a pressure outflow at the other, \(\nabla p_0 = (p_{hi} - p_{lo}) / L\), where \(p_{lo}\) and \(p_{hi}\) are the boundary pressures.
Only one direction can have a delp or a pressure inflow/outflow pair, and gravity cannot be in
that direction. The pressure written to plotfiles (p) is \(p'\), while the pressure gradient
(gpx, gpy and gpz) includes \(\nabla p_0\).