# Miscible Fluids¶

## Basic Concepts¶

This functionality is used to model interactions between miscible fluids with user-defined density and rheology. Examples of miscible fluids include glycerin/water, brine/salt water, and most biomass/water combination. Common applications of these models include fluid dilution, miscible fluid blending, and simulations of cleaning/washing.

Miscible fluids can enter the fluid domain via a background concentration, injection within a child geometry, or a non-zero concentration at an inlet. Miscible fluids can be removed from a system via outlets. The viscosity of the system, as a function of miscible fluid volume fraction, is defined using a custom viscosity model.

Miscible fluid output files are created for each fluid, and record the time-evolution of the mean miscible fluid volume fraction, the standard deviation of the miscible fluid volume fraction across the tank volume and the total miscible fluid volume. The volume fraction of each miscible fluid at each inlet and outlet are also recorded in the boundary condition output files.

Miscible fluid are characterized by a parent-child relationship. Within this relationship, the parent defines the properties of the miscible field and any user-specified initial background volume fraction in the fluid. The children define the shape/geometry/topology of any initial injection conditions, with a user-specified volume fraction for the children.

## Parent Properties¶

- Miscible 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

- Unit of Measure
Indicates how the initial background concentration is defined.

Volume Fraction: Define the initial condition a volume fraction within the child geometry

Volume of Fluid (m^3): Define the total volume of the fluid contained inside the child geometry

- Initial Background Concentration
Initial background concentration

This is the uniform background concentration of the species at the start of the simulation. Units defined by the Unit of Measure (defined above).

- Diffusion Coefficient
Diffusion coefficient [m^2/s]

Diffusion coefficient of the miscible through the base fluid.

- Density Option
Indicates if the miscible field density is to be modeled explicitly.

Off: Miscible field has no affect on local fluid density

On: Miscible field informs the local fluid density via a user-provided density

The effective fluid density at each point in the tank is taken to be the volume-fraction averaged density. This relationship does not need to be specified by the user.

## Child Geometry Injection Conditions¶

- Injection Geometry
Inject In Volume: the miscible fluid boundary condition is imposed on all points contained inside the geometry.

Inject At Surface: the miscible fluid 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.

- Unit of Measure
Volume Fraction: User-specified miscible fluid volume fraction in the child geometry

Volume (m^3): User-specified miscible fluid volume in the child geometry

- Start Time
Injection start time [s].

Time at which to adding miscible fluid into child geometry

- Stop Time
Injection stop time [s].

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

## Boundary Conditions¶

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

- BC Type
Specified Value

Zero Gradient

Zero Flux

RecircSpecifiedValue

The specified value defines the miscible field value at boundary condition, as measured in volume fraction. The specified value can be a function of time and position across the inlet face.

A zero gradient is a Neumann boundary condition, which implies no variation in the miscible field volume fraction at the boundary condition in the direction of flow. Most outlets are zero gradient boundary condition.

A zero flux implies no miscible fluid transport though the boundary.

For recirculation inlets (RecircSpecifiedValue), the inlet concentration can be a function of the miscible fluid volume fraction exiting through the suction side of the coupled boundary condition.

*Configuring Recirculation Boundary Conditions*If this value is set to

`c`

and Recirculation Link Flow Ratio is 1, the volume fraction of the miscible fluid returning to the vessel through the recirculation loop will be equal to the volume flow rate leaving the vessel. This behavior represents a system were all of the miscible fluid leaving through suction side of the recirculation loop returns to the inlet.If this value were set to

`0.5c`

, the volume fraction of the miscible fluid returning to the vessel through the recirculation loop will be 50% that leaving the vessel through the suction side of the recirculation line. Under these settings, the concentration in the tank will decrease. This behavior represents a system were some of the miscible fluid is removed from the recirculation line and replace with base fluid prior to returning to the vessel.If this value were set to

`0`

, the volume fraction of the miscible fluid returning to the vessel through the recirculation loop will zero. This behavior represents a system were all of the miscible fluid is removed from the recirculation line prior to returning to the vessel.If this value were set to

`2c`

and Recirculation Link Flow Ratio is 1, the volume fraction of the miscible fluid returning to the vessel through the recirculation loop will 2x larger than that leaving the vessel through the suction side of the recirculation line. This behavior represents a system were miscible fluid replaces base fluid in the recirculation line prior to returning to the vessel.Note that, consistent with most outlet boundary conditions, the suction side of the recirculation inlet is typically set to zero flux. If multiple recirculation inlets are coupled to a single suction-side boundary condition, the ratio of miscible fluid entering through each coupled inlet will be proportional to the surface area of each inlet to the total surface area across all coupled inlets.

## Advanced¶

- 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 considers fluxes in the directions of the fluid lattice

- 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.

## Output Data¶

- Statistics Output Frequency
For each miscible fluid, the instantaneous total miscible fluid volume, the mean volume fraction, the volume fraction standard deviation, and volume fraction percent relative standard deviation is printed to a unique output text file.

- Slices Output Frequency
The spatial variation in the miscible fluid volume fraction, fluid density, and fluid viscosity are reported on each slice.

- Volume Output Frequency
The spatial variation in the miscible fluid volume fraction, fluid density, and fluid viscosity are reported on the fluid volume output.