|
MFC
Exascale flow solver
|
Example Python case files, also referred to as input files, can be found in the examples/ directory. They print a Python dictionary containing input parameters for MFC. Their contents, and a guide to filling them out, are documented in the user manual. A commented, tutorial script can also be found in examples/3d_sphbubcollapse/.
The skeleton for an input file may look like the following:
Thus, you can run your case file with Python to view the computed case dictionary that will be processed by MFC when you run:
This is particularly useful when computations are done in Python to generate the case.
Input files can accept command line arguments, forwarded by mfc.sh run. Consider this example from the scaling case:
The --mfc argument is a JSON string representing mfc.sh run's internal state, passed in when MFC runs your input file. It contains all the runtime information you might want from the build/run system. You can add as many additional arguments and options as you may need.
To run such a case, use the following format:
For example, to run the scaling case in "weak-scaling" mode:
Before diving into parameter details, check the Feature Compatibility Guide to understand:
Parameter Lookup:
There are multiple sets of parameters that must be specified in the python input file:
Items 8, 9, 10, 11 and 12 are optional sets of parameters that activate the acoustic source model, ensemble-averaged bubble model, initial velocity field setup, phase change, artificial Mach number respectively. Definition of the parameters is described in the following subsections.
Enumerated parameters accept named values as well as integer codes: "riemann_solver": "hllc" is equivalent to "riemann_solver": 2. Defined names appear in each parameter's table entry (e.g. 1 (hll), 2 (hllc)). Existing case files can be rewritten to named syntax with ./mfc.sh validate case.py --migrate.
| Parameter | Type | Description |
|---|---|---|
| run_time_info | Logical | Output run-time information |
| rdma_mpi | Logical | (GPUs) Enable RDMA for MPI communication. |
| case_dir | String | Case directory path |
| old_grid | Logical | Use grid from previous simulation |
| old_ic | Logical | Use initial conditions from previous simulation |
| t_step_old | Integer | Time step to restart from |
| n_start_old | Integer | Starting index from previous simulation |
| Parameter | Type | Description |
|---|---|---|
| x[y,z]_domain%beg[end] | Real | Beginning [ending] of the $x$[y,z]-direction domain |
| stretch_x[y,z] | Logical | Stretching of the mesh in the $x$[y,z]-direction |
| a_x[y,z] | Real | Rate at which the grid is stretched in the $x$[y,z]-direction |
| x[y,z]_a | Real | Beginning of the stretching in the negative $x$[y,z]-direction |
| x[y,z]_b | Real | Beginning of the stretching in the positive $x$[y,z]-direction |
| loops_x[y,z] | Integer | Number of times to recursively apply grid stretching |
| cyl_coord | Logical | Cylindrical coordinates (2D: Axisymmetric, 3D: Cylindrical) |
| m | Integer | Number of grid cells in the $x$-coordinate direction |
| n | Integer | Number of grid cells in the $y$-coordinate direction |
| p | Integer | Number of grid cells in the $z$-coordinate direction |
| pref | Real | Reference pressure |
| rhoref | Real | Reference density |
The parameters define the boundaries of the spatial and temporal domains, and their discretization that are used in simulation.
[x,y,z]_domain%[beg,end] define the spatial domain in $x$, $y$, and $z$ Cartesian coordinates:
\[ x \in \left[ x\_domain\%beg, \; x\_domain\%end \right], \quad y \in \left[ y\_domain\%beg, \; y\_domain\%end \right], \quad z \in \left[ z\_domain\%beg, \; z\_domain\%end \right] \]
a_[x,y,z], [x,y,z]_a, and [x,y,z]_b are parameters that define the grid stretching function. When grid stretching along the $x$ axis is considered, the stretching function is given as:
\[ x_{cb,stretch} = x_{cb} + \frac{x_{cb}}{a_x} \Bigg[ \mathrm{log}\left[\mathrm{cosh} \left( \frac{a_x(x_{cb}-x_a)}{L} \right) \right] + \mathrm{log}\left[\mathrm{cosh} \left( \frac{a_x(x_{cb}-x_b)}{L} \right) \right] -2 \mathrm{log}\left[\mathrm{cosh} \left( \frac{a_x(x_b-x_a)}{2L} \right) \right] \Bigg] \]
where x_cb and x_[cb,stretch] are the coordinates of a cell boundary at the original and stretched domains, respectively. L is the domain length along the x axis: L=x_domain%end-x_domain%beg. Crudely speaking, x_a and x_b define the coordinates at which the grid begins to get stretched in the negative and positive directions along the $x$ axis, respectively. $a_x$ defines the smoothness of the stretching. Stretching along the $y$ and $z$ axes follows the same logistics. Optimal choice of the parameters for grid stretching is case-dependent and left to the user. loops_x[y,z] defines the number of times the grid stretching function is applied and has a default value of one.
| Parameter | Type | Analytical Definition | Description |
|---|---|---|---|
| num_patches | Integer | Not Supported | Number of initial condition geometric patches. |
| num_fluids | Integer | Not Supported | Number of fluids/components present in the flow. |
| geometry * | Integer | Not Supported | Geometry configuration of the patch. |
| alter_patch(i) * | Logical | Not Supported | Alter the $i$-th patch. |
| x[y,z]_centroid * | Real | Not Supported | Centroid of the applied geometry in the $[x,y,z]$-direction. |
| length_x[y,z] * | Real | Not Supported | Length, if applicable, in the $[x,y,z]$-direction. |
| radius * | Real | Not Supported | Radius, if applicable, of the applied geometry. |
| smoothen * | Logical | Not Supported | Smoothen the applied patch. |
| smooth_patch_id * | Integer | Not Supported | A patch with which the applied patch is smoothened. |
| smooth_coeff * | Real | Not Supported | Smoothen coefficient. |
| alpha(i) * | Real | Supported | Volume fraction of fluid $i$. |
| alpha_rho(i) * | Real | Supported | Partial density of fluid $i$. |
| pres * | Real | Supported | Pressure. |
| vel(i) * | Real | Supported | Velocity in direction $i$. |
| tau_e(i) * | Real | Supported | Elastic stresses. |
| hcid * | Integer | N/A | Hard coded patch id |
| cf_val * | Real | Supported | Surface tension color function value |
| model_id | Integer | Not Supported | Index into the stl_models array (geometry 21) |
*: These parameters should be prepended with patch_icpp(j)% where $j$ is the patch index.
The Table lists the patch parameters. The parameters define the geometries and physical parameters of fluid components (patch) in the domain at initial condition. Note that the domain must be fully filled with patche(s). The code outputs error messages when an empty region is left in the domain.
Some parameters, as described above, can be defined by analytical functions in the input file. For example, one can define the following patch:
where alpha_rho is defined with the 1 + 0.1*sin(20*x*pi) function.
Expressions use Python syntax and are parsed at case load time. Syntax errors and unknown variable or function names are immediate, named errors — they are reported before any Fortran is compiled, with a message identifying the offending expression and listing the available names.
The following variables are available in IC patch expressions:
| Shorthand | Expands To | Shorthand | Expands To | Shorthand | Expands To |
|---|---|---|---|---|---|
| x | x_cc(i) | lx | The patch's length_x | xc | The patch's x_centroid |
| y | y_cc(j) | ly | The patch's length_y | yc | The patch's y_centroid |
| z | z_cc(k) | lz | The patch's length_z | zc | The patch's z_centroid |
| eps | The patch's epsilon | beta | The patch's beta | radii | The patch's radii |
| tau_e | The patch's tau_e | r | The patch's radius | pi | \(\pi\) (Fortran constant from m_constants) |
where $(i,j,k)$ are the grid-indices of the current cell in each coordinate direction.
The allowed functions are the standard Fortran intrinsics: sin, cos, tan, asin, acos, atan, atan2, sinh, cosh, tanh, exp, log, log10, sqrt, abs, min, max, mod, sign.
Euler's number: bare e is not a variable. Write exp(1.0) or a numeric literal instead (e.g. 2.718281828).
In the example above, the following code is generated:
Some patch configurations are not adequately handled with the above analytic variable definitions. In this case, a hard coded patch can be used. Hard coded patches can be added by adding additional hard coded patch identifiers to src/common/include/1[2,3]dHardcodedIC.fpp. When using a hard coded patch, the patch_icpp(patch_id)%hcid must be set to the hard-coded patch id. For example, to add a 2D Hardcoded patch with an id of 200, one would add the following to src/common/include/2dHardcodedIC.fpp
and use patch_icpp(i)%hcid = 200 in the input file. Additional variables can be declared in Hardcoded1[2,3]DVariables and used in hardcoded1[2,3]D. As a convention, any hard coded patches that are part of the MFC master branch should be identified as 1[2,3]xx where the first digit indicates the number of dimensions.
The code provides three pre-built patches for dimensional extrusion of initial conditions:
Setup: Only requires specifying init_dir and filename pattern via zeros_default. Grid dimensions are automatically detected from the data files. Implementation: All variables and file handling are managed in src/common/include/ExtrusionHardcodedIC.fpp with no manual grid configuration needed. Usage: Ideal for initializing simulations from lower-dimensional solutions, enabling users to add perturbations or modifications to the base extruded fields for flow instability studies.
Initial conditions in which not all patches support the patch_icpp(j)%smoothen parameter can still be smoothed by applying iterations of the heat equation to the initial condition. This is enabled by adding 'elliptic_smoothing': "T", and 'elliptic_smoothing_iters': N, to the case dictionary, where N is the number of smoothing iterations to apply.
| Parameter | Type | Description |
|---|---|---|
| num_ibs | Integer | Number of immersed boundary patches |
| num_stl_models | Integer | Number of STL/OBJ model entries in the stl_models array |
| num_particle_clouds | Integer | Number of particle bed specifications to generate immersed boundary patches from |
| ib_neighborhood_radius | Integer | Parameter that controls the neighborhood size for IB detection. |
| many_ib_patch_parallelism | Logical | Parallelize over IB patches instead of grid cells (better for many small patches). |
| geometry | Integer | Geometry configuration of the patch. |
| x[y,z]_centroid | Real | Centroid of the applied geometry in the [x,y,z]-direction. |
| length_x[y,z] | Real | Length, if applicable, in the [x,y,z]-direction. |
| radius | Real | Radius, if applicable, of the applied geometry. |
| airfoil_id | Integer | Index into ib_airfoil array for NACA airfoil geometry patches. |
| model_id | Integer | Index into stl_models array for STL/OBJ geometry patches. |
| slip | Logical | Apply a slip boundary |
| moving_ibm | Integer | Sets the method used for IB movement. |
| vel(i) | Real | Initial velocity of the moving IB in the i-th direction. |
| angular_vel(i) | Real | Initial angular velocity of the moving IB in the i-th direction. |
| coefficient_of_restitution | Real | A number 0 to 1 describing how elastic IB collisions are |
| collision_model | Integer | Integer to select the collision model being used for IB collisions. |
| collision_time | Real | Amount of simulation time used to resolve collisions |
| ib_coefficient_of_friction | Real | Coefficient of friction used in IB collisions |
These parameters should be prepended with patch_ib(j)% where $j$ is the patch index.
STL/OBJ model geometry parameters are set on the stl_models array (indexed by model_id):
| Parameter | Type | Description |
|---|---|---|
| model_filepath | String | Path to an STL or OBJ file (not all OBJs are supported). |
| model_scale(i) | Real | Model's scaling factor for component $i$. |
| model_translate(i) | Real | Model's $i$-th component of translation. |
| model_threshold | Real | Winding number threshold above which a cell is marked as inside the model. |
These parameters should be prepended with stl_models(k)% where $k$ is the model index.
angular_vel(i) is the initial angular velocity of the IB about the x, y, z axes for i=1, 2, 3 in radians per second. When moving_ibm equals 2, this rotation rate is just the starting rate of the object, which will then change due to external torques. If moving_ibm equals 1, then this is constant if it is a number, or can be described analytically with an expression.
Moving-IB analytic expressions use the same Python syntax and error-reporting as IC patch expressions (see the "Analytical Definition of Primitive Variables" section above). Available variables: x (x_cc(i)), y (y_cc(j)), z (z_cc(k)), t (current simulation time), and r (the IB patch radius). The same intrinsic functions and pi constant apply; bare e is not available.
A particle cloud is a compact specification of a bed of identical circular (2D) or spherical (3D) immersed boundaries; each cloud is expanded into individual patch_ib particles at startup. Set num_particle_clouds to the number of beds and prepend the parameters below with particle_cloud(j)% where $j$ is the cloud index.
| Parameter | Type | Description |
|---|---|---|
| x[y,z]_centroid | Real | Centre of the cloud region in the [x,y,z]-direction. |
| length_x[y,z] | Real | Extent of the cloud region in the [x,y,z]-direction. |
| num_particles | Integer | Number of particles to place in the region. |
| radius | Real | Radius of every particle in the cloud. |
| mass | Real | Mass of every particle in the cloud. |
| min_spacing | Real | Minimum surface-to-surface gap between particles (centres are 2*radius + min_spacing apart). |
| moving_ibm | Integer | Motion flag applied to every particle (see patch_ib(j)%moving_ibm). |
| seed | Integer | Random seed for reproducible placement (used by packing_method = 1). |
| packing_method | Integer | Algorithm used to place the particles. |
| Parameter | Type | Description |
|---|---|---|
| gamma | Real | Stiffened-gas parameter \(\Gamma\) of fluid. |
| pi_inf | Real | Stiffened-gas parameter \(\Pi_\infty\) of fluid. |
| Re(1) * | Real | Shear viscosity of fluid. |
| Re(2) * | Real | Volume viscosity of fluid. |
| cv ** | Real | Sffened-gas parameter $c_v$ of fluid. |
| qv ** | Real | Stiffened-gas parameter $q$ of fluid. |
| qvp ** | Real | Stiffened-gas parameter $q'$ of fluid. |
| sigma | Real | Surface tension coefficient |
| G | Real | Shear modulus of solid. |
Fluid material's parameters. All parameters except for sigma should be prepended with fluid_pp(i) where $i$ is the fluid index.
*: Parameters that work only with model_eqns = 2.
**: Parameters that work only with model_eqns = 3.
The table lists the fluid material's parameters. The parameters define material's property of compressible fluids that are used in simulation.
When these parameters are undefined, fluids are treated as inviscid. Details of implementation of viscosity in MFC can be found in Coralic [14].
Stored-form parameters: The values gamma, pi_inf, and Re(1)/Re(2) are not the raw physical quantities. MFC expects transformed stored forms:
- gamma = \(1/(\gamma-1)\), not \(\gamma\) itself
- pi_inf = \(\gamma\,\pi_\infty / (\gamma - 1)\), not \(\pi_\infty\) itself
- Re(1) = \(1/\mu\) (inverse viscosity), not \(\mu\) itself
Setting gamma = 1.4 for air is a common mistake; the correct value is 1.0 / (1.4 - 1.0) = 2.5. See Stored Parameter Conventions and Common Material Values in the Equations reference for the full table.
See Equations for the mathematical models these parameters control.
| Parameter | Type | Description |
|---|---|---|
| bc_[x,y,z]%beg[end] | Integer | Beginning [ending] boundary condition in the $[x,y,z]$-direction (negative integer, see table Boundary Conditions) |
| bc_[x,y,z]%vb[1,2,3]‡ | Real | Velocity in the (x,1), (y, 2), (z,3) direction applied to bc_[x,y,z]%beg |
| bc_[x,y,z]%ve[1,2,3]‡ | Real | Velocity in the (x,1), (y, 2), (z,3) direction applied to bc_[x,y,z]%end |
| model_eqns | Integer | Multicomponent model: [1] \(\Gamma/\Pi_\infty\); [2] 5-equation; [3] 6-equation; [4] 4-equation |
| alt_soundspeed * | Logical | Alternate sound speed and \(K \nabla \cdot u\) for 5-equation model |
| adv_n | Logical | Solving directly for the number density (in the method of classes) and compute void fraction from the number density |
| mpp_lim | Logical | Mixture physical parameters limits |
| mixture_err | Logical | Mixture properties correction |
| time_stepper | Integer | Runge–Kutta order [1-3] |
| adap_dt | Logical | Strang splitting scheme with adaptive time stepping |
| recon_type | Integer | Reconstruction Type: [1] WENO; [2] MUSCL |
| adap_dt_tol | Real | Tolerance for adaptive time stepping in Strang splitting scheme |
| adap_dt_max_iters | Integer | Max iteration for adaptive time stepping in Strang splitting scheme |
| weno_order | Integer | WENO order [1,3,5] |
| weno_eps | Real | WENO perturbation (avoid division by zero) |
| mapped_weno | Logical | WENO-M (WENO with mapping of nonlinear weights) |
| wenoz | Logical | WENO-Z |
| wenoz_q | Real | WENO-Z power parameter q (only for WENO7) |
| teno | Logical | TENO (Targeted ENO) |
| teno_CT | Real | TENO threshold for smoothness detection |
| null_weights | Logical | Null WENO weights at boundaries |
| mp_weno | Logical | Monotonicity preserving WENO |
| muscl_order | Integer | MUSCL order [1,2] |
| muscl_lim | Integer | MUSCL Slope Limiter: [1] minmod; [2] monotonized central; [3] Van Albada; [4] Van Leer; [5] SUPERBEE |
| muscl_eps | Real | MUSCL limiter slope-product threshold (default: hard-coded thresholds; set to 0 for textbook behavior) |
| int_comp | Integer | Interface Compression [0] Off [1] THINC [2] MTHINC (default 0) |
| flux_lim | Integer | Flux limiter for post-process: [1] minmod; [2] MUSCL; [3] OSPRE; [4] SUPERBEE |
| ic_eps | Real | Interface compression threshold (default: 1e-4) |
| ic_beta | Real | Interface compression sharpness parameter (default: 1.6) |
| riemann_solver | Integer | Riemann solver algorithm: [1] HLL*; [2] HLLC; [3] Exact*; [4] HLLD (only for MHD) |
| low_Mach | Integer | Low Mach number correction for HLLC Riemann solver: [0] None; [1] Pressure (Chen et al. [11]); [2] Velocity (Thornber et al. [50]) |
| avg_state | Integer | Averaged state evaluation method: [1] Roe average*; [2] Arithmetic mean |
| wave_speeds | Integer | Wave-speed estimation: [1] Direct (Batten et al. [5]); [2] Pressure-velocity* (Toro [52]) |
| weno_Re_flux | Logical | Compute velocity gradient using scalar divergence theorem |
| weno_avg | Logical | Arithmetic mean of left and right, WENO-reconstructed, cell-boundary values |
| dt | Real | Time step size |
| t_step_start | Integer | Simulation starting time step |
| t_step_stop | Integer | Simulation stopping time step |
| t_step_save | Integer | Frequency to output data |
| t_step_print | Integer | Frequency to print the current step number to standard output (default 1) |
| cfl_adap_dt | Logical | CFL based adaptive time-stepping |
| cfl_const_dt | Logical | CFL based non-adaptive time-stepping |
| cfl_dt | Logical | Enable CFL-based time stepping |
| cfl_target | Real | Specified CFL value |
| n_start | Integer | Save file from which to start simulation |
| t_save | Real | Time duration between data output |
| t_stop | Real | Simulation stop time |
| surface_tension | Logical | Activate surface tension |
| viscous | Logical | Activate viscosity |
| hypoelasticity | Logical | Activate hypoelasticity* |
| pre_stress | Logical | Enable pre-stress initialization for hypoelasticity |
| igr | Logical | Enable solution via information geometric regularization (IGR) Cao and Schafer [9] |
| igr_order | Integer | Order of reconstruction for IGR [3,5] |
| alf_factor | Real | Alpha factor for IGR entropic pressure (default 10) |
| igr_pres_lim | Logical | Limit IGR pressure to avoid negative values (default F) |
| igr_iter_solver | Integer | Solution method for IGR elliptic solve [1] Jacobi [2] Gauss-Seidel |
| num_igr_iters | Integer | Number of iterations for for the IGR elliptic solve (default 2) |
| num_igr_warm_start_iters | Integer | Number of iterations for the IGR elliptic solve at the first time step (default 50) |
The table lists simulation algorithm parameters. The parameters are used to specify options in algorithms that are used to integrate the governing equations of the multi-component flow based on the initial condition. Models and assumptions that are used to formulate and discretize the governing equations are described in Wilfong et al. [55] and Bryngelson et al. [8]. Details of the simulation algorithms and implementation of the WENO scheme can be found in Coralic [14].
| Parameter | Type | Description |
|---|---|---|
| num_bc_patches | Integer | Number of boundary condition patches |
| dir* | Integer | Direction of the boundary patch. [1]: x; [2]: y; [3]: z |
| loc* | Integer | Location of the patch in the domain |
| type* | Integer | The geometry of the patch. [1]: Line [2]: Circle [3]: Rectangle |
| x[y,z]_centroid* | Real | Centroid of the boundary patch in the x[y,z]-direction |
| length_x[y,z]* | Real | Length of the boundary patch in the x[y,z]-direction |
| radius* | Real | Radius of the boundary patch |
*: These parameters should be prepended with patch_bc(j)% where $j$ is the patch index.
Boundary condition patches can be used with the following boundary condition types:
Line segments along each domain edge are supported for 2D simulations. Squares and circles on each face are supported for 3D simulations.
t_step_save is the time step interval for data output during simulation. To newly start the simulation, set t_step_start = 0. To restart the simulation from $k$-th time step, set t_step_start = k; see Restarting Cases.
To newly start the simulation, set n_start = 0. To restart the simulation from $k$-th time step, see Restarting Cases.
| Parameter | Type | Description |
|---|---|---|
| format | Integer | Output format. [1]: Silo-HDF5; [2] Binary |
| precision | Integer | [1] Single; [2] Double |
| parallel_io | Logical | Parallel I/O |
| file_per_process | Logical | Whether or not to write one IO file per process |
| cons_vars_wrt | Logical | Write conservative variables |
| prim_vars_wrt | Logical | Write primitive variables |
| alpha_rho_wrt(i) | Logical | Add the partial density of the fluid $i$ to the database | |
| rho_wrt | Logical | Add the mixture density to the database |
| mom_wrt(i) | Logical | Add the $i$-direction momentum to the database |
| vel_wrt(i) | Logical | Add the $i$-direction velocity to the database |
| E_wrt | Logical | Add the total energy to the database |
| pres_wrt | Logical | Add the pressure to the database |
| alpha_wrt(i) | Logical | Add the volume fraction of fluid $i$ to the database |
| gamma_wrt | Logical | Add the specific heat ratio function to the database |
| heat_ratio_wrt | Logical | Add the specific heat ratio to the database |
| ib_state_wrt | Logical | Parameter to handle writing IB state on saves and outputting the state as a point mesh to SILO files. |
| pi_inf_wrt | Logical | Add the liquid stiffness function to the database |
| pres_inf_wrt | Logical | Add the liquid stiffness to the formatted database |
| c_wrt | Logical | Add the sound speed to the database |
| omega_wrt(i) | Logical | Add the $i$-direction vorticity to the database |
| schlieren_wrt | Logical | Add the numerical schlieren to the database |
| qm_wrt | Logical | Add the Q-criterion to the database |
| liutex_wrt | Logical | Add the Liutex to the database |
| cf_wrt | Logical | Write color function field |
| chem_wrt_T | Logical | Write temperature field for chemistry output |
| fft_wrt | Logical | Enable FFT output |
| sim_data | Logical | Write interface and energy data files (post_process) |
| integral_wrt | Logical | Write integral data |
| num_integrals | Integer | Number of integral regions |
| down_sample | Logical | Enable output downsampling |
| fd_order | Integer | Order of finite differences for computing the vorticity and the numerical Schlieren function [1,2,4] |
| schlieren_alpha(i) | Real | Intensity of the numerical Schlieren computed via alpha(i) |
| probe_wrt | Logical | Write the flow chosen probes data files for each time step |
| num_probes | Integer | Number of probes |
| probe(i)%[x,y,z] | Real | Coordinates of probe $i$ |
| output_partial_domain | Logical | Output part of the domain |
| [x,y,z]_output%beg | Real | Beginning of the output domain in the [x,y,z]-direction |
| [x,y,z]_output%end | Real | End of the output domain in the [x,y,z]-direction |
| lag_txt_wrt | Logical | Write Lagrangian bubble data to .dat files |
| lag_header | Logical | Write header to Lagrangian bubble .dat files |
| lag_db_wrt | Logical | Write Lagrangian bubble data to silo/hdf5 database files |
| lag_id_wrt | Logical | Add the global bubble idea to the database file |
| lag_pos_wrt | Logical | Add the bubble position to the database file |
| lag_pos_prev_wrt | Logical | Add the previous bubble position to the database file |
| lag_vel_wrt | Logical | Add the bubble translational velocity to the database file |
| lag_rad_wrt | Logical | Add the bubble radius to the database file |
| lag_rvel_wrt | Logical | Add the bubble radial velocity to the database file |
| lag_r0_wrt | Logical | Add the bubble initial radius to the database file |
| lag_rmax_wrt | Logical | Add the bubble maximum radius to the database file |
| lag_rmin_wrt | Logical | Add the bubble minimum radius to the database file |
| lag_dphidt_wrt | Logical | Add the bubble subgrid velocity potential to the database file |
| lag_pres_wrt | Logical | Add the bubble pressure to the database file |
| lag_mv_wrt | Logical | Add the bubble vapor mass to the database file |
| lag_mg_wrt | Logical | Add the bubble gas mass to the database file |
| lag_betaT_wrt | Logical | Add the bubble heat flux model coefficient to the database file |
| lag_betaC_wrt | Logical | Add the bubble mass flux model coefficient to the database file |
The table lists formatted database output parameters. The parameters define variables that are outputted from simulation and file types and formats of data as well as options for post-processing.
| Parameter | Type | Description |
|---|---|---|
| acoustic_source | Logical | Acoustic source module activation |
| num_source | Integer | Number of acoustic sources |
| acoustic(i)%support | Integer | Geometry of spatial support for the acoustic source |
| acoustic(i)%dipole | Logical | Dipole source activation (optional; default = false -> monopole) |
| acoustic(i)%loc(j) | Real | $j$-th coordinate of the point that defines the acoustic source location |
| acoustic(i)%pulse | Integer | Acoustic wave form: [1] Sine [2] Gaussian [3] Square [4] Broadband |
| acoustic(i)%npulse | Real | Number of pulse cycles |
| acoustic(i)%mag | Real | Pulse magnitude |
| acoustic(i)%frequency | Real | Sine/Square - Frequency of the acoustic wave (exclusive) |
| acoustic(i)%wavelength | Real | Sine/Square - Wavelength of the acoustic wave (exclusive) |
| acoustic(i)%gauss_sigma_time | Real | Gaussian - Gaussian pulse time width in terms of sigma (exclusive) |
| acoustic(i)%gauss_sigma_dist | Real | Gaussian - Gaussian pulse spatial width in terms of sigma (exclusive) |
| acoustic(i)%delay | Real | Time delay of the acoustic wave (optional for %pulse = 1 or 3; default = 0) |
| acoustic(i)%dir | Real | Planer - Direction of acoustic propagation |
| acoustic(i)%length | Real | 2D/3D Planer - Spatial pulse length |
| acoustic(i)%height | Real | 3D Planer - Spatial pulse height |
| acoustic(i)%foc_length | Real | Transducer - Focal length of the transducer |
| acoustic(i)%aperture | Real | Transducer - Aperture of the transducer |
| acoustic(i)%num_elements | Integer | Transducer array - Number of transducer elements in a transducer array |
| acoustic(i)%element_on | Integer | Transducer array - Element number that is on (optional; default = 0 -> all elements) |
| acoustic(i)%element_spacing_angle | Real | 2D Transducer array - Spacing angle (in rad) between adjacent transducer elements |
| acoustic(i)%element_polygon_ratio | Real | 3D Transducer array - Ratio of polygon side length to transducer element radius |
| acoustic(i)%rotate_angle | Real | 3D Transducer array - Rotation angle of the transducer array (optional; default = 0) |
| acoustic(i)%bb_num_freq | integer | Number of frequencies in broadband wave |
| acoustic(i)%bb_bandwidth | Real | The bandwidth of each frequency in the broadband wave |
| acoustic(i)%bb_lowest_freq | Real | The lower frequency bound of the broadband wave |
Details of the transducer acoustic source model can be found in Maeda and Colonius [29].
| Parameter | Type | Description |
|---|---|---|
| bubbles_euler | Logical | Ensemble-averaged bubble modeling |
| bubbles_lagrange | Logical | Volume-averaged bubble modeling |
| bubble_model | Integer | [1] Gilmore; [2] Keller–Miksis; [3] Rayleigh-Plesset |
| Ca | Real | Cavitation number |
| Web | Real | Weber number |
| Re_inv | Real | Inverse Reynolds number |
| pref | Real | Reference pressure for bubble models |
| rhoref | Real | Reference density for bubble models |
| fluid_rho | Real | Reference fluid density |
| bub_pp%R0ref*†‡ | Real | Reference bubble radius |
| bub_pp%p0ref*†‡ | Real | Reference pressure |
| bub_pp%rho0ref*†‡ | Real | Reference density |
| bub_pp%T0ref†‡ | Real | Reference temperature |
| bub_pp%ss*†‡ | Real | Surface tension between host and gas (bubble) |
| bub_pp%pv*†‡ | Real | Vapor pressure of host |
| bub_pp%vd† ‡ | Real | Vapor diffusivity in gas (bubble) |
| bub_pp%mu_l*†‡ | Real | Viscosity of host in liquid state |
| bub_pp%mu_v† | Real | Viscosity of host in vapor state |
| bub_pp%mu_g† | Real | Viscosity of gas (bubble) |
| bub_pp%gam_v†‡ | Real | Specific heat ratio of host in vapor state |
| bub_pp%gam_g*†‡ | Real | Specific heat ratio of gas (bubble) |
| bub_pp%M_v†‡ | Real | Molecular weight of host |
| bub_pp%M_g†‡ | Real | Molecular weight of gas (bubble) |
| bub_pp%k_v†‡ | Real | Thermal conductivity of host in vapor state |
| bub_pp%k_g†‡ | Real | Thermal conductivity of gas (bubble) |
| bub_pp%cp_v‡ | Real | Specific heat capacity in constant pressure of host in vapor state |
| bub_pp%cp_g‡ | Real | Specific heat capacity in constant pressure of gas (bubble) |
| bub_pp%R_v†‡ | Real | Gas constant of host in vapor state |
| bub_pp%R_g†‡ | Real | Gas constant of gas (bubble) |
This table lists the sub-grid bubble model parameters, which can be utilized in both the ensemble-averaged and volume-averaged bubble models.
Implementation of the parameters into the model follows Ando [3].
See Equations Section 9 for the bubble dynamics equations.
| Parameter | Type | Description |
|---|---|---|
| bubbles_euler | Logical | Ensemble-averaged bubble modeling |
| polytropic | Logical | Polytropic gas compression |
| thermal | Integer | Thermal model: [1] Adiabatic; [2] Isothermal; [3] Transfer |
| polydisperse | Logical | Polydispersity in equilibrium bubble radius R0 |
| nb | Integer | Number of bins: [1] Monodisperse; [$>1$] Polydisperse |
| poly_sigma | Real | Standard deviation for probability density function of polydisperse bubble populations |
| qbmm | Logical | Quadrature by method of moments |
| dist_type | Integer | Joint probability density function for bubble radius and velocity (only for qbmm = 'T') |
| sigR | Real | Standard deviation for the probability density function of bubble radius (only for qbmm = 'T') (EE) |
| sigV | Real | Standard deviation for the probability density function of bubble velocity (only for qbmm = 'T') (EE) |
| rhoRV | Real | Correlation coefficient for the joint probability density function of bubble radius and velocity (only for qbmm = 'T') |
This table lists the ensemble-averaged bubble model parameters.
| Parameter | Type | Description |
|---|---|---|
| bubbles_lagrange | Logical | Lagrangian subgrid bubble model switch |
| nBubs_glb | Integer | Global number of bubbles |
| solver_approach | Integer | 1: One-way coupling, 2: two-way coupling |
| cluster_type | Integer | Method to find p_inf |
| pressure_corrector | Logical | Cell pressure correction term |
| smooth_type | Integer | Smoothing function. 1: Gaussian, 2:Delta 3x3 |
| heatTransfer_model | Logical | Activates the interface heat transfer model |
| massTransfer_model | Logical | Activates the interface mass transfer model |
| write_bubbles | Logical | Write files to track the bubble evolution each time step |
| write_bubbles_stats | Logical | Write the maximum and minimum radius of each bubble |
| epsilonb | Real | Standard deviation scaling for the gaussian function |
| charwidth | Real | Domain virtual depth (z direction, for 2D simulations) |
| valmaxvoid | Real | Maximum void fraction permitted |
| Parameter | Type | Description |
|---|---|---|
| perturb_flow | Logical | Perturb the initial velocity field by random noise |
| perturb_flow_fluid | Integer | Fluid density whose flow is to be perturbed |
| perturb_flow_mag | Real | Set the magnitude of flow perturbations |
| perturb_sph | Logical | Perturb the initial partial density by random noise |
| perturb_sph_fluid | Integer | Fluid component whose partial density is to be perturbed |
| mixlayer_vel_profile | Logical | Set the mean streamwise velocity to hyperbolic tangent profile |
| mixlayer_vel_coef | Real | Coefficient for the hyperbolic tangent profile of a mixing layer |
| mixlayer_perturb | Logical | Perturb the initial velocity field using a spectrum-based synthetic turbulence generation method |
| mixlayer_perturb_k0 | Real | Base wavenumber for mixing layer perturbation |
| mixlayer_perturb_nk | Integer | Number of perturbation modes for mixing layer |
| simplex_perturb | Logical | Enable simplex noise perturbation of initial conditions |
The table lists velocity field parameters. The parameters are optionally used to define initial velocity profiles and perturbations.
mixlayer_vel_coef is a parameter for the hyperbolic tangent profile of a mixing layer when mixlayer_vel_profile = 'T'. The mean streamwise velocity profile is given as:
\[ u = \text{patch\_icpp(1)\%vel(1)} \cdot \tanh( y_{cc} \cdot \text{mixlayer\_vel\_coef}) \]
| Parameter | Type | Description |
|---|---|---|
| relax | Logical | Activates Phase Change model |
| relax_model | Integer | Phase change model: [5] pT-equilibrium; [6] pTg-equilibrium |
| palpha_eps | Real | tolerance of the Newton Solver to activate pT-equilibrium |
| ptgalpha_eps | Real | tolerance of the Newton Solver to activate pTg-equilibrium |
| Parameter | Type | Description |
|---|---|---|
| pi_fac | Real | Ratio of artificial and true pi_\infty values |
| Parameter | Type | Description |
|---|---|---|
| bf_x[y,z] | Logical | Enable body forces in the x[y,z] direction |
| k_x[y,y] | Real | Magnitude of oscillating acceleration |
| w_x[y,z] | Real | Frequency of oscillating acceleration |
| p_x[y,z] | Real | Phase shift of oscillating acceleration |
| g_x[y,z] | Real | Magnitude of background acceleration |
k_x[y,z], w_x[y,z], p_x[y,z], and g_x[y,z] define an oscillating acceleration in the x[y,z] direction with the form
\[ a_{x[y,z]} = g_{x[y,z]} + k_{x[y,z]}\sin\left(w_{x[y,z]}t + p_{x[y,z]}\right). \]
By convention, positive accelerations in the x[y,z] direction are in the positive x[y,z] direction.
| Parameter | Type | Description |
|---|---|---|
| mhd | Logical | Enable ideal MHD simulation |
| relativity | Logical | Enable relativistic MHD simulation |
| hyper_cleaning | Logical | Enable hyperbolic (GLM) divergence cleaning for div B |
| hyper_cleaning_speed | Real | Cleaning wave speed c_h |
| hyper_cleaning_tau | Real | Cleaning damping timescale tau |
| Bx[y,z] | Real | Initial magnetic field in the x[y,z] direction |
| Bx0 | Real | Constant magnetic field in the x direction (1D only) |
Note: In 1D/2D/3D simulations, all three velocity components are treated as state variables and must be specified in the case file.
Note: For relativistic flow, the conservative and primitive densities are different. rho_wrt outputs the primitive (rest mass) density.
| Parameter | Type | Description |
|---|---|---|
| hypoelasticity | Logical | Enable hypoelasticity simulation |
| hyperelasticity | Logical | Enable hyperelasticity simulation |
| cont_damage | Logical | Enable continuum damage model |
| tau_star | Real | Threshold stress for continuum damage model |
| cont_damage_s | Real | Power s for continuum damage model |
| alpha_bar | Real | Damage factor (rate) for continuum damage model |
When cyl_coord = 'T' is set in 3D the following constraints must be met:
When cyl_coord = 'T' is set in 2D the following constraints must be met:
| Parameter | Type | Description |
|---|---|---|
| chemistry | Logical | Enable chemistry simulation |
| chem_params%diffusion | Logical | Enable multispecies diffusion |
| chem_params%reactions | Logical | Enable chemical reactions |
| chem_params%gamma_method | Integer | Methodology for calculating the heat capacity ratio |
| chem_params%transport_model | Integer | Methodology for calculating the diffusion coefficients |
| cantera_file | String | Cantera-format mechanism file (e.g., .yaml) |
| Parameter | Type | Description |
|---|---|---|
| bc_[x,y,z]%isothermal_in | Logical | Enable isothermal wall at the domain entrance (minimum coordinate). |
| bc_[x,y,z]%isothermal_out | Logical | Enable isothermal wall at the domain exit (maximum coordinate). |
| bc_[x,y,z]%Twall_in | Real | Temperature [K] of the entrance isothermal wall. |
| bc_[x,y,z]%Twall_out | Real | Temperature [K] of the exit isothermal wall. |
This boundary condition can be used for fixed-temperature (isothermal) walls at the domain extremities. It is exclusively available for reacting flows and requires chemistry to be enabled. It properly evaluates heat and species fluxes at the interface when chemistry = 'T', chem_params%diffusion = 'T', and the corresponding domain boundary is set to a slip wall (bc_[x,y,z]%%[beg,end] = -15) or a no-slip wall (bc_[x,y,z]%%[beg,end] = -16).
| Parameter | Type | Description |
|---|---|---|
| fluid_pp(i)%non_newtonian | Logical | Enable Herschel-Bulkley non-Newtonian viscosity for fluid \(i\). |
| fluid_pp(i)%K | Real | Consistency index \(K\). |
| fluid_pp(i)%nn | Real | Flow index \(n\) ( \(n<1\) shear-thinning, \(n>1\) shear-thickening). |
| fluid_pp(i)%tau0 | Real | Yield stress \(\tau_0\); set to 0 for pure power-law. |
| fluid_pp(i)%hb_m | Real | Papanastasiou regularization parameter \(m\); required when tau0 > 0. |
| fluid_pp(i)%mu_min | Real | Lower viscosity clamp \(\mu_{\min}\). |
| fluid_pp(i)%mu_max | Real | Upper viscosity clamp \(\mu_{\max}\) (required). |
| fluid_pp(i)%mu_bulk | Real | Reserved; non-Newtonian bulk viscosity is not yet supported. The validator rejects it on a non-Newtonian fluid; on a Newtonian fluid it is accepted and ignored. |
The effective dynamic viscosity is computed from the Papanastasiou-regularized Herschel-Bulkley model:
\[\mu_{\rm eff}(\dot\gamma) = \frac{\tau_0}{\dot\gamma}\!\left(1 - e^{-m\,\dot\gamma}\right) + K\,\dot\gamma^{n-1}, \qquad \dot\gamma = \sqrt{2\,D_{ij}D_{ij}}, \]
where \(D_{ij} = \frac{1}{2}(\partial_i u_j + \partial_j u_i)\) is the strain-rate tensor and \(\dot\gamma\) is the scalar shear rate. The result is clamped to \([\mu_{\min},\,\mu_{\max}]\).
Special cases:
Usage notes:
| Parameter | Type | Description |
|---|---|---|
| nv_uvm_out_of_core | Logical | Enable NVIDIA Unified Virtual Memory out-of-core execution |
| nv_uvm_pref_gpu | Logical | Prefer GPU placement for NVIDIA UVM allocations |
| nv_uvm_igr_temps_on_gpu | Integer | Store IGR temporaries on GPU with UVM |
| # | Type | Description |
|---|---|---|
| -1 | Normal | Periodic |
| -2 | Normal | Reflective |
| -3 | Normal | Ghost cell extrapolation |
| -4 | Normal | Riemann extrapolation |
| -5 | Characteristic | Slip wall |
| -6 | Characteristic | Non-reflecting subsonic buffer |
| -7 | Characteristic | Non-reflecting subsonic inflow |
| -8 | Characteristic | Non-reflecting subsonic outflow |
| -9 | Characteristic | Force-free subsonic outflow |
| -10 | Characteristic | Constant pressure subsonic outflow |
| -11 | Characteristic | Supersonic inflow |
| -12 | Characteristic | Supersonic outflow |
| -14 | Normal | Axis * |
| -15 | Normal | Slip wall |
| -16 | Normal | No-slip wall |
*: This boundary condition is only used for bc_y%beg when using cylindrical coordinates (cyl_coord = 'T' and 3D). For axisymmetric problems, use bc_y%beg = -2 with cyl_coord = 'T' in 2D.
The boundary condition supported by the MFC are listed in table Boundary Conditions. Their number (#) corresponds to the input value in input.py labeled bc_[x,y,z]%[beg,end] (see table Simulation Algorithm Parameters). The entries labeled "Characteristic." are characteristic boundary conditions based on Thompson [48] and Thompson [49].
| Parameter | Type | Description |
|---|---|---|
| bc_[x,y,z]%grcbc_in | Logical | Enable grcbc for subsonic inflow |
| bc_[x,y,z]%grcbc_out | Logical | Enable grcbc for subsonic outflow (pressure) |
| bc_[x,y,z]%grcbc_vel_out | Logical | Enable grcbc for subsonic outflow (pressure + normal velocity) |
| bc_[x,y,z]%vel_in | Real Array | Inflow velocities in x, y and z directions |
| bc_[x,y,z]%vel_out | Real Array | Outflow velocities in x, y and z directions |
| bc_[x,y,z]%pres_in | Real | Inflow pressure |
| bc_[x,y,z]%pres_out | Real | Outflow pressure |
| bc_[x,y,z]%alpha_rho_in | Real Array | Inflow density |
| bc_[x,y,z]%alpha_in | Real Array | Inflow void fraction |
This boundary condition can be used for subsonic inflow (bc_[x,y,z]%[beg,end] = -7) and subsonic outflow (bc_[x,y,z]%[beg,end] = -8) characteristic boundary conditions. These are based on Pirozzoli and Colonius [37]. This enables to provide inflow and outflow conditions outside the computational domain.
| # | Name | Dim. | Smooth | Description |
|---|---|---|---|---|
| 1 | Line segment | 1 | N | Requires x_centroid and length_x. |
| 2 | Circle | 2 | Y | Requires [x,y]_centroid and radius. |
| 3 | Rectangle | 2 | N | Coordinate-aligned. Requires [x,y]_centroid and length_[x,y]. |
| 4 | Sweep line | 2 | Y | Not coordinate aligned. Requires [x,y]_centroid and normal(i). |
| 5 | Ellipse | 2 | Y | Requires [x,y]_centroid and radii(i). |
| 6 | N/A | N/A | N/A | No longer exists. Empty. |
| 7 | N/A | N/A | N/A | No longer exists. Empty. |
| 8 | Sphere | 3 | Y | Requires [x,y,z]_centroid and radius |
| 9 | Cuboid | 3 | N | Coordinate-aligned. Requires [x,y,z]_centroid and length_[x,y,z]. |
| 10 | Cylinder | 3 | Y | Requires [x,y,z]_centroid, radius, and length_[x,y,z]. |
| 11 | Sweep plane | 3 | Y | Not coordinate-aligned. Requires x[y,z]_centroid and normal(i). |
| 12 | Ellipsoid | 3 | Y | Requires [x,y,z]_centroid and radii(i). |
| 13 | 2D modal (Fourier) | 2 | Y | Requires x_centroid, y_centroid, radius. Optional: fourier_cos(n), fourier_sin(n) (n=1..10), modal_clip_r_to_min, modal_r_min, modal_use_exp_form. |
| 14 | 3D spherical harmonic | 3 | Y | Requires x_centroid, y_centroid, z_centroid, radius. Optional: sph_har_coeff(l,m) (l=0..5, m=-l..l). |
| 15 | N/A | N/A | N/A | No longer exists. Empty. |
| 16 | 1D bubble pulse | 1 | N | Requires x_centroid, length_x |
| 17 | Spiral | 2 | N | Requires [x,y]_centroid |
| 18 | 2D Varcircle | 2 | Y | Requires [x,y]_centroid, radius, and thickness |
| 19 | 3D Varcircle | 3 | Y | Requires [x,y,z]_centroid, length_z, radius, and thickness |
| 20 | 2D Taylor-Green Vortex | 2 | N | Requires [x,y]_centroid, length_x, length_y, vel(1), and vel(2) |
| 21 | Model | 2 & 3 | Y | Imports a Model (STL/OBJ). Requires model_id. |
The patch types supported by the MFC are listed in table Patch Types. This includes types exclusive to one-, two-, and three-dimensional problems. The patch type number (#) corresponds to the input value in input.py labeled patch_icpp(j)%geometry where $j$ is the patch index. Each patch requires a different set of parameters, which are also listed in this table.
Geometry 13: 2D modal (Fourier):
Boundary is at polar angle \(\theta = \mathrm{atan2}(y - y_{\mathrm{centroid}}, x - x_{\mathrm{centroid}})\).
| # | Name | Dim. |
|---|---|---|
| 2 | 2D Circle | 2 |
| 3 | 2D Rectangle | 2 |
| 4 | 2D Airfoil | 2 |
| 8 | 3D Sphere | 3 |
| 10 | 3D Cylinder | 3 | length_x sets the axial length of the cylinder. | | 11 | 3D Airfoil | 3 |
| # | Name | Dim. | Requirements |
|---|---|---|---|
| 1 | Planar source | 1D | %loc(1), %pulse, %npulse, %mag, and %dir |
| 2 | Planar source | 2D | #1 requirements, %loc(2) and %length |
| 3 | Planar source | 3D | #2 requirements and %height |
| 5 | Cylindrical Transducer | 2D | %loc(1), %loc(2), %pulse, %npulse, %mag, %foc_length, %aperture |
| 6 | Spherical Transducer | 2D-Axisym | #5 requirements |
| 7 | Spherical Transducer | 3D | #5 requirements and %loc(3) |
| 9 | Arcuate Transducer Array | 2D | #5 requirements, %num_elements, %element_on, %element_spacing_angle |
| 10 | Annular Transducer Array | 2D-Axisym | #9 requirements |
| 11 | Circular Transducer Array | 3D | #7 requirements, %element_polygon_ratio, and %rotate_angle |
The required parameters for each acoustic support type are listed in Acoustic Source. The acoustic support number (#) corresponds to the acoustic support type Acoustic(i)%support, where $i$ is the acoustic source index. For each %parameter, prepend the parameter with acoustic(i)%.
Additional requirements for all acoustic support types:
Description of the acoustic support types:
| 5-eqn | 6-eqn |
|---|---|
| num_fluids continuity variables | num_fluids continuity variables |
| num_dims momentum variables | num_dims momentum variables |
| 1 energy variable | 1 energy variable |
| num_fluids advection variables | num_fluids advection variables |
| N/A | num_fluids internal energy variables |
The above variables are used for all simulations.
| 5-eqn | 6-eqn |
|---|---|
| sub-grid bubble variables | N/A |
| hypoelastic variables | N/A |
The above variables correspond to optional physics.
| 5-eqn | 6-eqn |
|---|---|
| num_fluids densities | num_fluids densities |
| num_dims velocities | num_dims velocities |
| 1 pressure | 1 pressure |
| num_fluids volume fractions | num_fluids volume fractions |
| N/A | num_fluids partial pressures |
The above variables are used for all simulations.
| 5-eqn | 6-eqn |
|---|---|
| sub-grid bubble variables | N/A |
| hypoelastic variables | N/A |
The above variables correspond to optional physics.