INSVCTwoFluidStaggeredHierarchyIntegrator block of the input file, but PETSc options can also be passed on the command line.
Krylov solver (solver_db)
Thesolver_db sub-block inside INSVCTwoFluidStaggeredHierarchyIntegrator is forwarded to the PETScKrylovLinearSolver that drives the coupled momentum–pressure system.
PETSc Krylov solver type.
fgmres (Flexible GMRES) is strongly recommended because the FAC preconditioner is not a fixed linear operator — it changes slightly from iteration to iteration. Standard gmres may diverge in this case.PETSc command-line options
PETSc solver parameters can be set on the command line at runtime without modifying the input file. The solver uses the prefixsolver_. Common options:
Maximum number of Krylov iterations per time step. If the solver does not converge in this many iterations, it reports a divergence warning and continues.
Relative residual tolerance for convergence. The solve is considered converged when
||r|| / ||r_0|| < rtol. A value of 1e-14 is used for convergence testing; 1e-8 to 1e-10 is adequate for most production runs.FAC multigrid preconditioner (precond_db)
Theprecond_db sub-block configures the FullFACPreconditioner and its underlying MultiphaseStaggeredStokesBoxRelaxationFACOperator.
Multigrid cycle type.
V_CYCLE is the standard choice and is the only type currently tested with this solver.Number of box-relaxation smoothing sweeps applied before visiting coarser levels (pre-smoothing). Increasing this improves convergence per outer Krylov iteration at the cost of more work per step. Values of 0–5 are common; 0 pre-sweeps with 5 post-sweeps works well for many problems.
Number of box-relaxation smoothing sweeps applied after returning from coarser levels (post-smoothing).
Number of levels used inside the preconditioner hierarchy. Should match or be less than the
MAX_MULTIGRID_LEVELS top-level scalar. The preconditioner coarsens the grid until this many levels are used, independently of GriddingAlgorithm.max_levels.Enable logging inside the FAC preconditioner. When
TRUE, the preconditioner reports convergence information for each cycle.Viscous time-stepping scheme
Time-stepping method for the viscous stress terms. Set this top-level scalar and also pass it into the integrator block:
TRAPEZOIDAL_RULE (Crank–Nicolson) is required for second-order temporal accuracy. An explicit scheme would impose a severe stability constraint on the time step for diffusion-dominated flows.Advection–diffusion integrator (AdvDiffIntegrator)
TheAdvDiffIntegrator block configures the AdvDiffSemiImplicitHierarchyIntegrator used to transport the network volume fraction thn.
Convective operator used to transport the volume fraction. Options:
CUI— Cubic Upwind Interpolation. Third-order accurate and the default choice.PPM— Piecewise Parabolic Method.UPWIND— First-order upwind (diffusive; use only for debugging).
Time-stepping method for the convective term in the advection–diffusion equation.
ADAMS_BASHFORTH— Second-order explicit multi-step method.FORWARD_EULER— First-order explicit (for startup or debugging).TRAPEZOIDAL_RULE— Second-order implicit.
Discretization form of the convective term.
CONSERVATIVE— Uses the divergence form∇·(u θ). Preferred when the velocity field may not be exactly divergence-free.ADVECTIVE— Uses the advective formu·∇θ.
Number of predictor–corrector cycles per time step for the advection–diffusion solve. Should be consistent with
NUM_CYCLES in the fluid integrator.TimerManager block
TheTimerManager block activates IBAMR’s built-in wall-clock timers. Timer output is written to the log file at the end of the run.
Print exclusive time (time in a routine excluding time in called sub-routines). Useful for profiling individual functions.
Print total (inclusive) time for each timer. This is the most useful mode for identifying overall bottlenecks.
Minimum percentage of total runtime a timer must represent to appear in the output. Increase this to suppress output from fast routines.
Glob pattern controlling which timers are active.
"IBTK::*::*" activates all IBTK timers. For more detail, add "IBAMR::*::*" or "*::*::*" to capture all SAMRAI and application-level timers.StandardTagAndInitialize block
Controls the cell-tagging strategy used byGriddingAlgorithm to decide where to refine.
How to identify cells for refinement:
GRADIENT_DETECTOR— Tags cells where the volume-fraction gradient exceedsgrad_abs_thresh. Requiresuse_grad_tagging = TRUEin the integrator block.REFINE_BOXES— Tags a fixed set of index-space boxes specified in aRefineBoxessub-block. Useful for convergence tests where the refinement region is known in advance.
LoadBalancer block
Algorithm used to assign patches to MPI ranks.
SPATIAL groups spatially nearby patches together, which tends to minimize communication. The alternative is GREEDY.