Scalar Fields

Basic Concepts

Scalar fields represent a continuous scalar value defined at all points across the fluid domain (e.g. species concentration). Scalar fields are defined by a name, diffusion coefficient, and reaction rate. Scalars enter the domain via (i) an initial background concentration, (ii) an injection box, (iii) a non-zero concentration at an inlet, or (iv) a reaction rate that drives scalar production. Scalars can be removed from a system by specifying (i) an outlet, or (ii) a reaction rate that drives scalar consumption.

The scalar field is advanced using a high-resolution van Leer scheme. This approach links the time-varying fluid flow to the advection term in the advection-diffusion equation. Chemical reactions are advanced at each time-step using a fourth order Runge-Kutta solver.

Scalar field output files are created for each species, and record the time-evolution of the mean species concentration, the standard deviation of the species concentration across the tank volume, and the species exposure. The concentrations of each species at each inlet and outlet are recorded in the inletOutletData files.

Scalar fields are characterized by a parent-child relationship. Within this relationship, the parent defines the properties of the scalar field. The children define the shape/geometry/topology of these boundary conditions.

Parent Properties

Name

Variable name used in reaction expressions. Name has the following restrictions:

  • Some names are reserved for other quantities: s, t, and T are reserved for strain, time, and temperature.

  • First character must be a letter

  • Must not contain spaces or special characters

  • Must only contain letters, numbers, and under score

Background Spec Type

Indicates how the initial background concentration is defined.

  • Molarity: Define the initial condition as a molarity

  • Number Of Moles: Define the initial condition as a total number of moles

Background Initial Concentration

Initial background concentration [mol/L] This is the uniform background concentration of the species at the start of the simulation.

Background Initial Moles

Initial background concentration in units [mol]

Diffusion Coefficient

Diffusion coefficient [m^2/s]

Diffusion coefficient of the scalar through the base fluid.

Reaction Implementation Type
  • NONE: Reactions are either disabled or defined by a separate Reaction component

  • Custom Expression: Reaction is defined by the Reaction Chemistry . (CPU Only)

  • Plugin: Reaction is defined by a custom C++ plugin loaded at run-time. (CPU Only)

Reaction Chemistry (CPU Only)

Reaction kinetics function for species [mol/s].

Can be specified with either an expression as described below or using the C++ plugin functionality described in User Plugins.

Function of other scalar field variables defined in the system and temperature T. For example, if a system contains four species named S, C, I, and P with reaction rates given by:

\[\begin{split}\frac{dS}{dt}=10[I] - 500[S][C] \\ \frac{dC}{dt}=110[I] - 500[S][C] \\ \frac{dI}{dt}=500[S][C] - 110[I] \\ \frac{dP}{dt}=100[I],\end{split}\]

the reaction chemistry for S, C, I, and P would then be written as the following in each of the Scalar Field variables “Reaction Chemistry” input

10*I - 500*S*C
110*I - 500*S*C
500*S*C - 110*I
100*I

Should a temperature field be defined, reaction rates can also include temperature, such as:

10*exp(0.001*T)*I - 500*exp(0.002*T)*S*C
Injection Geometry
  • Inject In Volume: the scalar boundary condition is imposed on all points contained inside the geometry.

  • Inject At Surface: the scalar boundary condition is imposed on the surface of the child geometry.

These conditions are identical for children geometries that are thin relative to the lattice spacing.

Scalar Injection Amount Spec Type
  • Molarity: Input from Initial Concentration Expr is used with units molarity

  • Number Of Moles: Input from Initial Moles Expr is used with units moles

  • Molar Rate: Input from Initial Moles Rate Expr is used with units moles/s

Initial Concentration Expr

Injection into the geometry is defined as an expression that may be a function of time ‘t’.

[molarity]

Initial Moles Expr

Injection into the geometry is defined as an expression that may be a function of time ‘t’

[moles]

Initial Moles Rate Expr

Injection into the geometry is defined as an expression that may be a function of time ‘t’

[moles/s]

Start Time

Injection start time [s].

Time at which to begin adding scalar into child geometry

Stop Time

Scalar box stop time [s].

Time at which to stop adding scalar into the defined box. Between the Start and Stop times, the scalar field inside the box will be maintained at the user-defined concentration. To mimic the effects of an instantaneous scalar dump, set the Start Time equal to the Stop Time.

Stencil

Stencil used to define advection [Lattice, Finite Volume] The finite volume stencil considers fluxes in the +/- x,y, and z-directions. The lattice stencil

Limiter

Flux limiter used to contain convection [VanLeer, Minmod, MUSCL, Superbee, DonorCell, LaxWendroff, DonorCell]

The Donor Cell is an upwind difference technique valid for systems with a Peclet number greater than 2 (a condition typically satisfied in turbulent systems). The other schemes are total variation diminishing, and necessary in laminar systems.

Visible

Enable/disable the visibility of this component

Boundary Conditions

For each boundary condition present in the simulation, the following inputs are available

BC Type
  • Specified Value: Enables use of Value Input

  • Zero Gradient

Value

Specified value of scalar field at boundary condition