Simulation Parameters¶
Introduction¶
These are general simulation parameters which control run time, space resolution, temporal resolution, initial condition loading, and time averaging properties. When setting these parameters, simultaneous consideration should be given to accuracy, precision, and simulation duration.
The available options depend on user selection. Click on each component to display the associated properties, including the multi-choice combo boxes.
The context-specific simulation parameters toolbar offers a help link to relevant documentation.
Property Grid¶
Run Time
¶
M-Star CFD is an explicit solver which advances through time until a user-defined endpoint. This user-defined endpoint may be a maximum run time or a user-defined stop condition.
- Run Time
The total simulation run time. Simulation processing and data output will end once the solver has modeled this many seconds [s] of system dynamics. Increasing/decreasing the length of the simulation has no effect on simulation precision; however, the simulation run time must be sufficient to capture the relevant process physics.
- Stop Condition
A user-defined logic that automatically ends a simulation.
- None
No specified logic. Simulation will run to maximum user-defined run time.
- Custom
User-defined control logic written as a function of global variables and time.
- Stop Condition UDF
unitless | This UDF defines the run time simulation stop logic. Use this to stop the simulation based on global variables. This is a System UDF.
Download Sample File:
Stop Condition
GlobalVar - Pre-defined logic based on user-selected global variables and conditional expressions. This is conditional logic that stops the simulation when a certain state is achieved.
Stop Condition Variable - The variable used to assess convergence within the control logic.
- Compare Operator - The comparison operator used to assess whether convergence has been achieved.
Less Than
Less Than Or Equal To
Greater Than
Greater Than Or Equal To
Equal To
Not Equal To
Variable Value - The target value used to assess convergence of the stop control variable.
Min Run Time - s | The minimum run time before the stop condition will be considered.
Space Resolution
¶
The baseline resolution of the fluid, species, and thermal fields. The default mesh is Cartesian, rectangular, and uniform. Additional refinement can be added as needed. Take into consideration how to keep the simulation reasonable, as discussed below.
- Reference
The reference dimension used to characterize the resolution. The number of points you define along the reference dimension defines the simulation resolution. When defining the uniform grid, you can choose your reference and your resolution. Since the mesh is Cartesian, defining the resolution in one direction automatically defines the resolution in the other directions.
X - Defines the resolution along the X direction.
Y - Defines the resolution along the Y direction.
Z - Defines the resolution along the Z direction.
DX - Manually specify user resolution.
- Resolution LX
The number of lattice points in the X direction, which determines the domain spacing, DX, and total lattice size. If the reference is set to X, this value is user-defined. If the reference length is set to another value, this number is computed automatically.
- Resolution LY
The number of lattice points in the Y direction, which determines the domain spacing, DX, and total lattice size. If the reference is set to Y, this value is user-defined. If the reference length is set to another value, this number is computed automatically.
- Resolution LZ
The number of lattice points in the Z direction, which determines the domain spacing, DX, and total lattice size. If the reference is set to Z, this value is user-defined. If the reference length is set to another value, this number is computed automatically.
- dx
The computed grid domain spacing in model units [m]. The default unit is meters. To change the units, go to the Menu and select Edit > Unit Settings or see Edit. If the reference is set to dx, this value is user-defined. If the reference is set to another value, dx is computed from the user-defined resolutions along that reference.
- Estimated Lattice Size
The number of lattice points for estimating memory requirements.
Important
The fluid and species are modeled using a Cartesian lattice which fills the extent of the main lattice. Adjust this value based on:
memory limits
disk space limits
analysis accuracy needs
time constraints
Note
Hardware informs how complex you can make your simulation. Build models with your hardware in mind. In the simulation you are presented with a lattice size; look at this number and make sure that the number you are evoking is reasonable within your system.
For example:
A reasonable number on a laptop is one to 10 million lattice points.
A reasonable number on a desktop HPC is 10 to 100 million lattice points.
A reasonable number on a multi-GPU interface is up to a billion lattice points.
More than a billion lattice points typically requires dedicated HPC resources.
As a rule, the lattice spacing and resolution is informed by the characteristic length scale of the system and the associated integral eddy scale. For agitated tanks, with a characteristic length scale defined by an impeller diameter, simulations should contain between 30 and 100 lattice points per impeller diameter. For pipe flow systems, simulations should contain approximately 30 to 80 lattice points per pipe diameter. For agitated tanks with inlets and outlets, the resolution should be sufficient to allow at least five lattice points across the smallest tank opening.
In general for blending and residence time problems, users should specify 30 to 50 lattice points per impeller diameter to correctly capture the pumping effects of an impeller, and 50 to 80 lattice points per impeller diameter to predict power numbers. To correctly capture energy dissipation, users should specify between 80 and 100 lattice points per impeller diameter. For static mixing and pipe-flow systems, users should aim for 30 to 50 lattice points per pipe diameter, with increasing resolution required for increasingly complex internal features. For sloshing and tank filling simulations, users should specify approximately 100 lattice points across the open tank diameter.
Time Resolution
¶
As an explicit solver, time step must be specified. This time step defines the intervals at which the simulation will advance through time. The time step cannot be arbitrary. It must satisfy the Courant-Friedrichs-Lewy condition in order for the simulation to remain stable. These default parameters are based on observation and are selected to balance stability with run time.
A key parameter defining the simulation time step is the Courant number. The Courant number defines the ratio of fluid velocity to lattice velocity. In general, this number should be 0.1 or lower. Users can overwrite the default Courant number by selecting CoSpecified from the Time Step Option and specifying their own value in the Courant Number field. You can specify a Courant number or you can specify a time step.
- Time Step Option
This is how the user defines the time step in the simulation.
Auto The Courant number is automatically set by the solver. The reference velocity evoked and the calculated time step are reported to the user for reference.
CoSpecified The user specifies a custom Courant number. The reference velocity evoked and the calculated time step are reported to the user for reference.
DtSpecified The user specifies a custom time step value. The reference velocity evoked and the calculated Courant number are reported to the user for reference.
- Courant Number
The Courant number is the ratio of fluid velocity to lattice velocity. It is defined by
where
is the simulation time step, is lattice spacing, and is the reference velocity.- dt
s | The simulation time step is defined by the domain spacing, the Courant number, and the reference velocity. The time step is constant, although it can be scaled should users evoke a frozen fluid model.
- Maximum Velocity
m/s | This value is taken as the maximum value from a set of moving object reference velocities and boundary condition computed velocities. See also reference velocities.
Important
Appropriate adjustments to the Courant number can produce decreases in runtime. For example, manually adjusting the Courant number to 0.1 for a laminar open system would increase the time step by a factor of 10 (since the default Courant would be 0.01). This larger time step would then decrease simulation runtimes by a factor of 10. Note that increasing the Courant number can lead to system instabilities due to the explicit nature of the time integration. As such, care should be taken when adjusting this value.
For systems with hydrostatic pressure fields (free surface simulations) and open systems with significant pressure difference between inlets and outlets, users may need to reduce the Courant number by a factor of 2 to 4 to eliminate any spurious effects of fluid compressibility. Only rarely would the Courant number need to be lower than 0.001.
For systems with constrictions, the maximum velocity realized in the simulation may exceed the velocity computed from the moving objects and the boundary condition. In these cases, the Courant number should be reduced to handle the higher velocities.
For systems with high viscosities (e.g., large Newtonian viscosity, non-Newtonian fluids), a smaller time step may be required to ensure that the relaxation does not realize excessively large/nonphysical values.
Initial State
¶
By default, simulations begin with a quiescent fluid and particles at rest. Users can choose to start the simulation with an initial fluid velocity and particle positions/velocities initialized from a previous simulation’s checkpoint file. The initial state map allows you to map fields (fluid pressure, velocity, scalars, particles, etc.) from one case to another. The mapped fields define the initial condition for the new case. These inputs are defined under Initial State.
- State Mode
The simulation’s initial state.
Default - The initial fluid and particle velocities are set to 0. No mapping is done.
External Load - Load initial state from a previous simulation’s checkpoint file. Fluid velocity, fluid pressure, scalar concentration, fluid volume fraction, temperature field, particle positions, and particle velocities can be individually loaded in from previous checkpoint files.
State Map - Displays the check point mapping which shows how source data from a previous case will be mapped onto the current one. See Check Point Mapping and Loading initial state from another case for an example on using this feature.
Time Averaging
¶
M-Star CFD is a time-accurate solver. In addition to predicting these time-varying flow properties, the solver can also time-average the results to compute the steady-state flow patterns inside the domain. By default, the time-averaging begins at the start of the simulation. Should users want to set a different time origin (e.g., a value closer to the time it takes for the system to become steady), an alternative time origin can be specified here.
In addition to the instantaneous properties, the time averaged quantities can be reported as visual output and used as input to other user defined functions. The sample weighting function can either be uniform or exponentially smooth.
- Time Avg Sampling
Specifies the frequency with which data is collected to enter into the time average.
Every Time Step - Average every time step of data.
Custom Interval - Average at a user-specified sampling interval.
- Begin Time Average
s | The time to begin time averaging.
- Weight Function
Defines the averaging function.
Uniform - All time points are weighted equally in the moving average.
Exponential - Exponential smoothing which gives higher weight to more recent time in the time averaging.
Time Constant - The exponential moving average time constant.
Advanced
¶
- Meshtype
Defines the topology of the mesh.
Box - The full lattice is kept after voxelization. This is the most efficient solution approach, but it is not memory optimized.
Sparse - The unused lattice will be deallocated after voxelization. This reduces the memory requirements, but can decrease solver efficiency.
Simulation Parameters Toolbar¶
Context-Specific Toolbar Forms |
Description |
---|---|
|
The Help command launches the M-Star reference documentation in your web browser. |
For a full description of each option, see Context-Specific Toolbar selections.