Four-field solver
The Solvers.FourField module in OpenSTREAM provides tools and classes for simulating annular two-phase flows using a four-field approach. In this method, the liquid phase is represented by three distinct fields (base film, disturbance waves, and droplets) each governed by its own set of conservation equations for mass, momentum, and energy. The vapor phase is solved using the Solvers.Mixture module. This framework enables detailed modeling of liquid film structures, interfacial interactions, slip velocities, and hydrodynamic non-equilibrium effects, making it particularly suitable for annular boiling two-phase flow regimes where field separation and wave dynamics play a significant role.
This module includes:
Solver class for four-field-based flow simulations:
Solvers.FourField.FourFieldSolverBase film, wave and drop field classes:
Solvers.FourField.Base,Solvers.FourField.Wave,Solvers.FourField.DropFilm class:
Solvers.FourField.FilmFour-field primary properties:
Solvers.FourField.Base.W,Solvers.FourField.Base.U,Solvers.FourField.Base.H,Solvers.FourField.Wave.W,Solvers.FourField.Wave.U,Solvers.FourField.Wave.HKey solver class methods:
Solvers.FourField.FourFieldSolver.initializeSolver,Solvers.FourField.FourFieldSolver.solve(),Solvers.FourField.FourFieldSolver.plotzField class methods for calculating secondary four-field parameters.
- Solvers.FourField.FourFieldSolver.solve(ffSolver)
SOLVE Executes the four-field solver for steady-state and transient simulations.
Runs the full solution process for the
Solvers.FourField.FourFieldSolverobject. It manages initialization, time stepping, axial sweeps, inner iterations, convergence checks, and logging.Workflow:
Enables logging and opens persistent log file
Validates solver state before execution
Runs steady-state initialization (solveINIT = true)
If initial step converges, proceeds with transient simulation
Handles exceptions and ensures proper log closure
Notes:
Uses internal solver function to handle both steady-state and transient modes
Applies relaxation factors for phase flows, velocities, and enthalpies
Supports thermal non-equilibrium modeling
Logs progress and outputs to session directory
- class Solvers.FourField.FourFieldSolver.FourFieldSolver(inputSet, mixSolver)
Bases:
Solvers.ThreeField.ThreeFieldSolverFOURFIELDSOLVER Solver for initializing, solving, and visualizing four-field flow.
The FourFieldSolver class extends
Solvers.ThreeField.ThreeFieldSolverto handle thermal-hydraulic simulations using a four-field approach.Responsibilities:
Initializes solver parameters from an
Inputs.InputSetobjectConstructs
Solvers.FourField.Film,Solvers.FourField.Wave,Solvers.FourField.Base, andSolvers.FourField.Dropobjects for transient and steady-state analysisProvides plotting utilities for spatial and temporal distributions
Key Components:
Liquid film (base and wave) and drop field construction
Field mass/momentum/energy transport modeling
Pressure drop gradient obtained from mixture solver
Vapor solution obtained from mixture solver
Visualization of results across time and axial domains
- Constructor Summary
- FourFieldSolver(inputSet, mixSolver)
FOURFIELDSOLVER Constructor for the FourFieldSolver class.
Creates a new instance of the FourFieldSolver class using the provided
Inputs.InputSet. This constructor initializes the solver by calling theSolvers.ThreeField.ThreeFieldSolverconstructor and then sets up all necessary solver parameters and internal data structures viaSolvers.FourField.FourFieldSolver.initializeSolverInput:
inputSet — An
Inputs.InputSetobject containing model configuration, geometry, boundary conditions, and solver options.
Notes:
If mixSolver is unsolved, it will be solved automatically.
Initialization includes film, wave, base, and droplet objects.
- Method Summary
- EQUIL(ffSolver, flm, drp, mix, zIdx)
EQUIL Find entrained ratio at film/drop equilibrium state [-]
Iteratively computes the entrained liquid ratio at the onset of annular flow by balancing droplet deposition and film entrainment rates.
Inputs:
ffSolver —
Solvers.FourField.FourFieldSolverobjectflm — Film field object (
Solvers.FourField.Film)drp — Droplet field object (
Solvers.FourField.Drop)mix — Mixture object (
Solvers.Mixture.Mixture)zIdx — Axial index for evaluation
Algorithm:
Starts with an initial guess for droplet mass flow (50% of liquid mass)
Updates droplet and film flow rates iteratively
Computes difference between deposition and entrainment rates
Stops when error < 1e-4 kg/s/m or after 100 iterations
Notes:
Uses interpolation for improved convergence
Falls back to ad-hoc update if interpolation fails
- initializeSolver(ffSolver)
INITIALIZESOLVER Initializes solver parameters and constructs film, wave, base, and drop objects.
Sets up the solver’s internal state using the provided
Inputs.InputSetand mixture solver solutions. Includes initialization of data structures for transient and steady-state simulations.Operations performed:
Initializes film, wave, and base arrays for each time step
Initializes fluid property objects
Sets up mixture object
Assigns initial conditions for field mass flow rates, velocities, enthalpies
Notes:
Assumes uniform axial discretization.
Wall heat flux computed from interpolated boundary conditions.
- plott(ffSolver, zIdx, opt)
PLOTT Plots temporal distributions of four-field parameters at a given axial location.
Generates time-series plots of selected four-field parameters at a specified axial index. The method supports multiple display modes, wall selections, and plot arrangements.
Inputs:
ffSolver —
Solvers.FourField.FourFieldSolverobject containing simulation datazIdx — Axial index (scalar, positive integer)
opt.display — Parameters to display (e.g., ‘HFLUX’, ‘W’, ‘U’, etc.)
opt.solveMode — Solve mode: ‘REAL’ or ‘NULL’
opt.wall — Wall index(es) to plot
opt.tIdx — Time indices to include in the plot
opt.reverseTime — Logical flag to reverse time axis
opt.unitTemp — Temperature unit: ‘K’ or ‘C’
opt.arrangement — Plot arrangement: ‘flow’, ‘vertical’, or ‘horizontal’
opt.resize — Resize factor for plot scaling
Notes:
If opt.display is set to ‘ALL’, all supported parameters are plotted.
The function validates that at least two time indices are provided.
Temperature unit conversion is applied if ‘C’ is selected.
Each wall is plotted in a separate tile with appropriate legends and axis scaling.
- plotz(ffSolver, tIdx, opts)
PLOTZ Plots spatial (axial) distributions of four-field parameters.
Generates axial plots of selected four-field parameters at specified time indices. The function supports multiple display modes, wall selections, and optional animation over time.
Inputs:
ffSolver —
Solvers.FourField.FourFieldSolverobject containing simulation datatIdx — Time index or indices (vector of positive integers)
opts.display — Parameters to display (e.g., ‘HFLUX’, ‘W’, ‘U’, etc.)
opts.solveMode — Solve mode: ‘REAL’ or ‘NULL’
opts.wall — Wall index(es) to plot
opts.zIdx — Axial indices to include in the plot
opts.obstructions — Logical flag to display obstruction locations
opts.annular — Logical flag to plot annular two-phase flow parameters only from the onset of annular flow
opts.unitTemp — Temperature unit: ‘K’ or ‘C’
opts.arrangement — Plot arrangement: ‘flow’, ‘vertical’, or ‘horizontal’
opts.resize — Resize factor for plot scaling
Notes:
If multiple time indices are provided, the function creates an animated plot.
At least two axial indices must be specified to enable spatial plotting.
Temperature unit conversion is applied if ‘C’ is selected.
Obstruction locations are plotted if opts.obstructions is true.
Each wall is plotted in a separate tile with appropriate legends and axis scaling.
- plotzt(ffSolver, opt)
PLOTZT Plots 2D time/elevation distributions of four-field parameters.
Generates surface plots of selected four-field related parameters over time and axial (elevation) positions. It supports plotting for base and wave fields, and can handle both real and null (initial) transient data.
Inputs:
ffSolver —
Solvers.FourField.FourFieldSolverobject containing simulation dataopt.display — Parameter(s) to display (e.g., ‘HFLUX’, ‘U’, etc.)
opt.label — Corresponding labels for display parameters
opt.unit — Units for each parameter
opt.field — Field to plot: ‘film’ or ‘drop’
opt.solveMode — Solve mode: ‘REAL’ or ‘NULL’
opt.wall — Wall index(es) to plot
opt.zIdx — Axial indices (must include at least 2)
opt.tIdx — Time indices (must include at least 2)
opt.reverseTime — Logical flag to reverse time axis
opt.shading — Surface shading style: ‘faceted’, ‘flat’, or ‘interp’
opt.view — View angle for 3D plot [azimuth elevation]
Notes:
If ‘ALL’ is passed to opt.display, all supported parameters are plotted.
The function validates that at least two axial and time indices are provided to enable meaningful 2D plotting.
Each wall is plotted in a separate figure window with appropriate titles and subplot grouping.
- class Solvers.FourField.Film(inputSet, fluid)
Bases:
Solvers.AbstractFilmFILM Class for modeling liquid film in four-field solver
Represents the physical and numerical properties of the liquid film in a four-field thermal-hydraulic solver. The film consists of two sub-fields: base film and wave film, which interact with vapor and droplet phases.
This class manages initialization, mass flow distribution, velocity and enthalpy calculations, and provides methods for splitting film flow at the onset of annular flow (OAF) according to model options.
Key responsibilities:
Store solver state (time, axial positions, heat flux, evaporation flux)
Aggregate flow properties from base and wave components
Initialize base and wave fields and apply OAF split logic
Support equilibrium calculations for film thickness and flow ratios
- Constructor Summary
- Film(inputSet, fluid)
FILM Creates a Film object
Initializes the film object with input set and fluid properties required by the four-field solver.
Inputs:
inputSet —
Inputs.InputSetobject containing geometry and model optionsfluid —
Inputs.FluidPropertiesobject containing thermophysical properties
- Property Summary
- DT = 0
Time step size [s] from
Inputs.options.TSTEP
- H
(:,:) double {mustBeNumeric} = 1E6 % Enthalpy [J/kg]
- HFLUX = 1.
Film heat flux [W/m^2]
- ITR
Iteration tracking
- MEVAP = -1.
Evaporation mass flux [kg/s/m^2]
- NTIME = 0
Number of time steps [-]
- NZ = 0
Number of axial steps [-] from
Inputs.Model.NNODES
- TIDX = 1
Time step index [-]
- TIME = 0
Time series [s]
- U
(:,:) double {mustBeNumeric} = 1. % Velocity [m/s]
- W
(:,:) double {mustBeNumeric} = 1. % Mass flow rate [kg/s]
- Z = 1.
Elevation [m]
- base = NaN
Solvers.FourField.Baseobject
- wave = NaN
Solvers.FourField.Waveobject
- Method Summary
- EQUIL(film, Wf, zIdx)
EQUIL Equilibrium base/wave split ratio [-]
Calculates the equilibrium split ratio of film mass flow between base and wave using base equilibrium thickness, base velocity, perimeter, and liquid density.
Inputs:
film —
Solvers.FourField.FilmobjectWf — Film mass flow rate [kg/s]
zIdx — Axial indices to evaluate (optional)
- copyFlowProperties(srcObj, targetObj, opts)
COPYFLOWPROPERTIES Copy flow properties between Film objects
Copies flow-related properties (base and wave fields) from a source Film object to one or more target Film objects. Ensures that spatial meshes match before copying.
Inputs:
srcObj — Source
Solvers.FourField.FilmobjecttargetObj — Target
Solvers.FourField.Filmobject(s)opts.all — Logical flag to copy all properties (optional, default = false)
- distributeOAFW(film, Wf, zIdx)
DISTRIBUTEOAFW Distribute film mass flow at OAF [kg/s]
Distributes the film mass flow rate at the onset of annular flow (OAF) between base and wave fields according to the
Inputs.Model.OAFFILMSPLITmodel option.Inputs:
film —
Solvers.FourField.FilmobjectWf — Film mass flow rate to distribute [kg/s] (per wall or per z-index)
zIdx — Axial indices to apply distribution (optional)
- initializeBaseAndWave(film, WIN, ITR)
INITIALIZEBASEANDWAVE Initialize base and wave fields
Initializes base and wave arrays given inlet film mass flow rate and iteration settings. Performs OAF film split, computes velocities, enthalpies, and sets initial wave frequency using equilibrium correlations.
Inputs:
film —
Solvers.FourField.FilmobjectWIN — Inlet film mass flow rate [kg/s]
ITR — Iteration control struct
- class Solvers.FourField.Wave(film)
Bases:
Solvers.AbstractFilmWAVE Class for modeling liquid waves in four-field solver
This class represents the physical and numerical properties of the wave field in a four-field thermal-hydraulic solver. It handles flow variables, heat transfer, and phase interaction mechanisms between the waves and other fields (base film, drop, vapor).
The class supports initialization from an existing film object and provides methods for computing derived quantities such as mass flow fractions, interfacial fractions, and deposition/evaporation fluxes.
- Constructor Summary
- Wave(film)
WAVE Constructor for Wave class
Initializes the wave object using properties from an existing film object. Copies solver configuration and geometry data, and allocates flow property arrays for multiple walls.
Inputs:
film —
Solvers.AbstractFilmobject representing the parent film
- Property Summary
- DT = 0
Time step size [s] from
Inputs.options.TSTEP
- FREQUENCY = 1
Wave frequency [Hz]
- H = 1E6
Enthalpy [J/kg]
- HFLUX = 1.
Film heat flux [W/m^2]
- ITR
Iteration tracking
- NTIME = 0
Number of time steps [-]
- NZ = 0
Number of axial steps [-] from
Inputs.Model.NNODES
- TIDX = 1
Time step index [-]
- TIME = 0
Time series [s]
- U = 1.
Velocity [m/s]
- W = 1.
Mass flow rate [kg/s]
- Z = 1.
Elevation [m]
- film
Parent
Solvers.AbstractFilmobject
- Method Summary
- AMPLITUDE(wave, zIdx)
AMPLITUDE Wave amplitude [m]
Computes wave amplitude based on mass flow, shape factor, fluid density, and frequency. Limited by half the hydraulic diameter.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- BETA(wave, zIdx)
BETA Wave film interfacial fraction [-]
Calculates the fraction of the interface occupied by waves.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- BETAP(wave, zIdx)
BETAP Wave film heat flux fraction [-]
Determines the fraction of heat flux directed to the waves.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- DELTAFREQ(wave, zIdx)
DELTAFREQ Wave frequency source/sink [Hz/m]
Calculates the exchange term for wave frequency relaxation toward equilibrium frequency.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- DRAGCOEF(wave, zIdx)
DRAGCOEF Wave drag coefficient [-]
Calculates the drag coefficient for vapor-wave interaction based on Reynolds number and
Inputs.Model.WAVEDRAGCOEFmodel coefficients.Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- EPSILON(wave, zIdx)
EPSILON Wave mass flow fraction [-]
Computes the fraction of total film mass flow carried by waves.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- EQFREQUENCY(wave, zIdx)
EQFREQUENCY Equilibrium wave frequency [Hz]
Computes the equilibrium wave frequency based on Strouhal number and vapor velocity.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- EQPERIOD(wave, zIdx)
EQPERIOD Equilibrium wave period [s]
Calculates the inverse of equilibrium wave frequency.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- EQSTROUHAL(wave, zIdx)
EQSTROUHAL Equilibrium Strouhal number [-]
Calculates the equilibrium Strouhal number using selected
Inputs.Model.EQSTROUHALmodel.Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- ETA(wave, zIdx)
ETA Wave film deposition fraction
Computes the fraction of deposition attributed to waves.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- FBASE(wave, drop, zIdx)
FBASE Base interfacial force [N/m^2]
Computes the interfacial force between wave and base film.
Inputs:
wave —
Solvers.FourField.Waveobjectdrop —
Solvers.FourField.DropobjectzIdx — Axial indices to evaluate (optional)
- FBASEMASS(wave, drop, zIdx)
FBASEMASS Wave mass exchange force [N/m^2]
Calculates the force due to mass exchange between wave and base film.
Inputs:
wave —
Solvers.FourField.Waveobjectdrop —
Solvers.FourField.DropobjectzIdx — Axial indices to evaluate (optional)
- FDEP(wave, drop, zIdx)
FDEP Droplet interaction force [N/m^2]
Calculates the force due to deposition of droplets onto the wave field.
Inputs:
wave —
Solvers.FourField.Waveobjectdrop —
Solvers.FourField.DropobjectzIdx — Axial indices to evaluate (optional)
- FDRAG(wave, zIdx)
FDRAG Vapor drag force on wave [N/m^2]
Calculates the shear stress due to vapor drag acting on the wave field.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- FSHEAR(wave, zIdx)
FSHEAR Vapor shear stress [N/m^2]
Computes the shear stress exerted by vapor on the wave field using friction factor.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- FTOT(wave, drop, zIdx)
FTOT Total interfacial force [N/m^2]
Computes the total interfacial force acting on the wave field, including vapor shear, buoyancy, gravity, droplet interaction, and base film forces.
Inputs:
wave —
Solvers.FourField.Waveobjectdrop —
Solvers.FourField.DropobjectzIdx — Axial indices to evaluate (optional)
- FVAPOR(wave, zIdx)
FVAPOR Wave vapor shear stress [N/m^2]
Computes the total shear stress exerted by vapor on the wave field.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- FWALL(wave, zIdx)
FWALL Wave wall shear stress [N/m^2]
Placeholder method. Wave does not implement wall shear stress.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- MBASE(wave, drop, zIdx)
MBASE Mass flux interaction with base film [kg/m^2/s]
Computes the net mass exchange between wave and base film, including turbulent mixing.
Inputs:
wave —
Solvers.FourField.Waveobjectdrop —
Solvers.FourField.DropobjectzIdx — Axial indices to evaluate (optional)
- MDEP(wave, drop, zIdx)
MDEP Wave deposition mass flux [kg/m^2/s]
Computes the deposition mass flux from waves to droplets.
Inputs:
wave —
Solvers.FourField.Waveobjectdrop —
Solvers.FourField.DropobjectzIdx — Axial indices to evaluate (optional)
- MENT(wave, zIdx)
MENT Wave entrainment mass flux [kg/m^2/s]
Computes the mass flux associated with entrainment from the wave field.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- MEVAP(wave, zIdx)
MEVAP Wave evaporation mass flux [kg/m^2/s]
Calculates the evaporation mass flux from the wave field based on heat flux fraction.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- MTOT(wave, drop, zIdx)
MTOT Total mass flux [kg/m^2/s]
Calculates the total mass flux for the wave field, including evaporation, entrainment, deposition, and interactions with base film.
Inputs:
wave —
Solvers.FourField.Waveobjectdrop —
Solvers.FourField.DropobjectzIdx — Axial indices to evaluate (optional)
- MTURB(wave, zIdx)
MTURB Turbulent mass exchange [kg/m^2/s]
Returns the turbulent mixing mass flux between wave and base film.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- N(wave, zIdx)
N Wave number density [1/m]
Computes the number of waves per unit length (inverse of wave spacing).
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- PERIOD(wave, zIdx)
PERIOD Wave time period [s]
Calculates the inverse of wave frequency.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- REV(wave, zIdx)
REV Vapor Reynolds number (relative to waves) [-]
Computes the Reynolds number for vapor flow interacting with waves.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- SHAPEFACTOR(wave, zIdx)
SHAPEFACTOR Wave shape factor [-]
Computes the dimensionless shape factor for waves based on Reynolds number and
Inputs.Model.SHAPEFACTORCOEFmodel.Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- SPACING(wave, zIdx)
SPACING Wave spacing [m]
Computes the axial spacing between waves based on velocity and frequency.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- THICK(wave, zIdx)
THICK Wave thickness [m]
Computes the wave thickness as the product of amplitude and interfacial fraction. This parameter represents the thickness that the wave field would have if fully overlayed on top of the base film.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- WIDTH(wave, zIdx)
WIDTH Wave width [m]
Calculates wave width as a function of amplitude and shape factor, limited by wave spacing.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- WL(wave, zIdx)
WL Wave mass flow rate per unit perimeter [kg/s/m]
Calculates the mass flow carried by the wave field at specified axial locations.
Inputs:
wave —
Solvers.FourField.WaveobjectzIdx — Axial indices to evaluate (optional)
- class Solvers.FourField.Base(film)
Bases:
Solvers.AbstractFilmBASE Class for modeling liquid base film in four-field solver
This class represents the physical and numerical properties of the base film field in a four-field thermal-hydraulic solver. It handles flow variables, heat transfer, and phase interaction mechanisms between the base film and other fields (wave, drop, vapor).
The class supports initialization from an existing film object and provides methods for computing derived quantities such as mass flow fractions, interfacial fractions, and deposition/evaporation fluxes.
- Constructor Summary
- Base(film)
BASE Constructor for Base class
Initializes the base film object using properties from an existing film object. Copies solver configuration and geometry data, and allocates flow property arrays for multiple walls.
Inputs:
film —
Solvers.AbstractFilmobject representing the parent film
- Property Summary
- DT = 0
Time step size [s] from
Inputs.options.TSTEP
- H = 1E6
Enthalpy [J/kg]
- HFLUX = 1.
Film heat flux [W/m^2]
- ITR
Iteration tracking
- NTIME = 0
Number of time steps [-]
- NZ = 0
Number of axial steps [-] from
Inputs.Model.NNODES
- TIDX = 1
Time step index [-]
- TIME = 0
Time series [s]
- U = 1.
Velocity [m/s]
- W = 1.
Mass flow rate [kg/s]
- Z = 1.
Elevation [m]
- Method Summary
- BETA(base, zIdx)
BETA Base film interfacial fraction [-]
Computes the fraction of interfacial area attributed to the base film.
Inputs:
base —
Solvers.FourField.BaseobjectzIdx — Axial indices to evaluate (optional)
- BETAP(base, zIdx)
BETAP Base film heat flux fraction [-]
Determines the fraction of heat flux directed to the base film. Applies suppression in pre-annular region to enforce target base film thickness at onset of annular flow (OAF).
Inputs:
base —
Solvers.FourField.BaseobjectzIdx — Axial indices to evaluate (optional)
Notes:
Applies suppression in pre-annular region to enforce target base film thickness at onset of annular flow (OAF). The entire film evaporation hence occurs in the wave field.
- EPSILON(base, zIdx)
EPSILON Base film mass flow fraction [-]
Calculates the fraction of total film mass flow carried by the base film at specified axial locations.
Inputs:
base —
Solvers.FourField.BaseobjectzIdx — Axial indices to evaluate (optional)
- EQTHICK(base, zIdx)
EQTHICK Base equilibrium thickness [m]
Computes the equilibrium thickness of the base film based on
Inputs.Model.BASEEQTHICKmodel.Inputs:
base —
Solvers.FourField.BaseobjectzIdx — Axial indices to evaluate (optional)
- ETA(base, zIdx)
ETA Base film deposition fraction [-]
Computes the fraction of drop deposition allocated to the base film based on mass flow and interfacial fractions.
Inputs:
base —
Solvers.FourField.BaseobjectzIdx — Axial indices to evaluate (optional)
- FBASEVAPOR(base, zIdx)
FBASEVAPOR Vapor shear stress on base film [N/m^2]
Computes the shear force exerted by the vapor phase on the base film, scaled by interfacial fraction.
Inputs:
base —
Solvers.FourField.BaseobjectzIdx — Axial indices to evaluate (optional)
- FDEP(base, drop, zIdx)
FDEP Droplet deposition force [N/m^2]
Calculates the momentum transfer to the base film from droplet deposition, based on velocity difference and deposition flux.
Inputs:
base —
Solvers.FourField.Baseobjectdrop —
Solvers.FourField.DropobjectzIdx — Axial indices to evaluate (optional)
- FDRY(base, drop, zIdx)
FDRY Dry fraction [-]
Computes the fraction of the exposure period during which the base film is expected to be dry.
Inputs:
base —
Solvers.FourField.Baseobjectdrop —
Solvers.FourField.DropobjectzIdx — Axial indices to evaluate (optional)
- FTOT(base, drop, zIdx)
FTOT Total interfacial force on base film [N/m^2]
Aggregates all force contributions acting on the base film, including wall shear, wave interaction, vapor shear, buoyancy, gravity, and droplet deposition based on
Inputs.Model.MOMENTBASEmodel.Inputs:
base —
Solvers.FourField.Baseobjectdrop —
Solvers.FourField.DropobjectzIdx — Axial indices to evaluate (optional)
- FWAVE(base, drop, zIdx)
FWAVE Wave interfacial force [N/m^2]
Computes the interfacial shear force exerted by the wave field on the base film based on
Inputs.Model.WAVEBASEINTmodel.Inputs:
base —
Solvers.FourField.Baseobjectdrop —
Solvers.FourField.DropobjectzIdx — Axial indices to evaluate (optional)
- FWAVEMASS(base, drop, zIdx)
FWAVEMASS Base-wave mass exchange force [N/m^2]
Calculates the momentum exchange force due to mass transfer between base and wave films, based on velocity difference and MWAVE flux.
Inputs:
base —
Solvers.FourField.Baseobjectdrop —
Solvers.FourField.DropobjectzIdx — Axial indices to evaluate (optional)
- MDEP(base, drop, zIdx)
MDEP Base deposition mass flux [kg/m^2/s]
Calculates deposition flux to the base film from drops, scaled by deposition fraction.
Inputs:
base —
Solvers.FourField.BaseobjectzIdx — Axial indices to evaluate (optional)
- MENT(base, zIdx)
MENT Base entrainment mass flux [kg/m^2/s]
Placeholder for future implementation if needed. Currently returns zero entrainment.
Inputs:
base —
Solvers.FourField.BaseobjectzIdx — Axial indices to evaluate (optional)
- MEVAP(base, zIdx)
MEVAP Base evaporation mass flux [kg/m^2/s]
Computes evaporation flux from the base film using heat flux fraction and parent film evaporation rate.
Inputs:
base —
Solvers.FourField.BaseobjectzIdx — Axial indices to evaluate (optional)
- MTOT(base, drop, zIdx)
MTOT Total mass flux of the base film [kg/m^2/s]
Calculates the total mass flux exchange associated with the base film, including evaporation, entrainment, deposition, and wave interaction.
Inputs:
base —
Solvers.FourField.Baseobjectdrop —
Solvers.FourField.DropobjectzIdx — Axial indices to evaluate (optional)
- MTURB(base, zIdx)
MTURB Turbulent mass exchange [kg/m^2/s]
Estimates turbulent mass exchange between base and wave films using wave mixing coefficient
Inputs.Model.WAVEMIXCOEF.Inputs:
base —
Solvers.FourField.BaseobjectzIdx — Axial indices to evaluate (optional)
- MWAVE(base, drop, zIdx)
MWAVE Base film mass flux interaction with wave [kg/m^2/s]
Computes the mass flux exchange between the base film and wave field. Includes net exchange term based on relaxation toward equilibrium thickness and turbulent mixing contribution.
Inputs:
base —
Solvers.FourField.Baseobjectdrop —
Solvers.FourField.DropobjectzIdx — Axial indices to evaluate (optional)
Outputs:
Mwave — Mass flux transferred to wave field [kg/m^2/s]
Mnet — Net exchange term before turbulent adjustment [kg/m^2/s]
- TBASE(base, zIdx)
TBASE Base film exposure time [s]
Calculates the time during which the base film is exposed to vapor between successive waves, based on wave spacing and relative velocity (eq 24 of Le Corre [2022]).
Inputs:
base —
Solvers.FourField.BaseobjectzIdx — Axial indices to evaluate (optional)
- TDRY(base, drop, zIdx)
TDRY Base film dry-out time [s]
Estimates the time of base film dry out under current evaporation and deposition conditions. Returns zero if dry-out does not occur.
Inputs:
base —
Solvers.FourField.Baseobjectdrop —
Solvers.FourField.DropobjectzIdx — Axial indices to evaluate (optional)
- THICKMIN(base, drop, zIdx)
THICKMIN Minimum base film thickness [m]
Calculates the minimum thickness of the base film at the end of its exposure period, based on mass flow rate, liquid density, velocity, and channel perimeter (eq. 28 of Le Corre [2022]).
Inputs:
base —
Solvers.FourField.Baseobjectdrop —
Solvers.FourField.DropobjectzIdx — Axial indices to evaluate (optional)
- WMIN(base, drop, zIdx)
WMIN Minimum base film mass flow rate [kg/s]
Calculates the minimum mass flow rate of the base film at the end of its exposure period (TBASE), accounting for evaporation and deposition.
Inputs:
base —
Solvers.FourField.Baseobjectdrop —
Solvers.FourField.DropobjectzIdx — Axial indices to evaluate (optional)
- WMINL(base, drop, zIdx)
WMINL Minimum base film mass flow rate per perimeter [kg/m-s]
Computes the minimum base film mass flow rate normalized by channel perimeter.
Inputs:
base —
Solvers.FourField.Baseobjectdrop —
Solvers.FourField.DropobjectzIdx — Axial indices to evaluate (optional)
- copyFlowProperties(srcObj, targetObj, opts)
COPYFLOWPROPERTIES Copy flow property arrays between Base objects
Copies selected flow properties (W, U, H) from a source object to one or more target Base objects. Supports full copy or partial copy (excluding first axial node) based on options.
Inputs:
srcObj — Source object containing flow properties
targetObj — Array of
Solvers.FourField.Baseobjects to updateopts.all — Logical flag; if true, copies all axial nodes, otherwise skips the first node (default: false)
- class Solvers.FourField.Drop
Bases:
Solvers.ThreeField.DropDROP Class for modeling drop field in four-field solver
This class encapsulates the physical and numerical properties of the drop field, including flow variables and phase interactions. It supports multiple solver models and provides methods for computing derived quantities.
All methods are inherited from
Solvers.ThreeField.ThreeFieldSolver