frm) example is the primary validation case for AMR Multiphase. It simulates a two-phase Newtonian fluid driven by a body force that produces four counter-rotating vortices on the periodic domain . The network-phase volume fraction is initialized as a smooth radial blob at the center of the domain.
Complete the build and install steps before continuing. You need a compiled
frm executable in your build/frm/ directory.Running the four-roll-mill simulation
1
Navigate to the frm directory
The input file and executable are both located in the
frm/ subdirectory of your build tree.2
Run the executable
Launch These flags configure the PETSc Krylov solver used for the coupled saddle-point system at each time step:
frm with input2d as the input file and pass solver options on the command line:3
Monitor progress via log files
While the simulation runs, progress is written to the log file named Each time step prints the current simulation time, time step size, and linear solver convergence information. Logging is controlled by
output in the working directory. You can tail it in a separate terminal:ENABLE_LOGGING = TRUE in input2d.4
Visualize results with VisIt
Visualization dumps are written to the
viz2d_four_roll_mill/ directory at the interval set by VIZ_DUMP_TIME_INTERVAL. Open VisIt and load the dumps.visit file from that directory:- Launch VisIt.
- Select File → Open and navigate to
build/frm/viz2d_four_roll_mill/dumps.visit. - Add a Pseudocolor plot on the variable
Thn_nto see the network-phase volume fraction. - Use the time slider to step through the simulation.
hier_data_four_roll_mill/.Key input file parameters
The simulation is fully controlled byfrm/input2d. The parameters below are the most important ones to understand and tune.
Grid and time stepping
Fluid parameters
Initial condition for the volume fraction
DELTA = 0.175 sets the radius of the initial volume-fraction blob. The function evaluates to a smooth radially symmetric bump of amplitude 0.25 centered at the origin, on top of a background value of 0.25.
Convective discretization
Viscoelastic model
USE_CF flag enables the Oldroyd-B conformation tensor model for viscoelastic simulations. It is disabled in the default four-roll-mill configuration, which uses a purely Newtonian model. Set USE_CF = TRUE to activate it and configure the CFMultiphaseOldroydB parameters.
Visualization and output
Next steps
Convergence testing
Run
frm_convergence to verify second-order accuracy across grid refinementsPhysical boundary conditions
Explore the channel flow example with non-periodic boundary conditions
Input parameters reference
Full reference for every parameter in the input file
Multiphase model
Understand the two-fluid mixture equations and physical parameters