|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
This page describes the pressure-correction solve path used by projection in PICurv.
The correction solve enforces incompressibility through:
\[ \nabla^2 \phi = \frac{1}{\Delta t}\nabla\cdot\mathbf{u}^*. \]
In code terms:
Null-space handling is explicitly configured for Neumann-like pressure systems via function PoissonNullSpaceFunction in the Poisson module.
PoissonSolver_MG currently:
KSP + PCMG,Phi.After Poisson solve:
From solver.yml via scripts/picurv:
poisson_solver.method -> -ps_ksp_typepoisson_solver.absolute_tolerance -> -ps_ksp_atol and legacy -poisson_tolpoisson_solver.relative_tolerance -> -ps_ksp_rtolpoisson_solver.max_iterations -> -ps_ksp_max_itpoisson_solver.gmres.restart -> -ps_ksp_gmres_restartpoisson_solver.preconditioner.type -> -ps_pc_type; only multigrid is supported todaypoisson_solver.multigrid.levels -> -mg_levelpoisson_solver.multigrid.pre_sweeps -> -mg_pre_itpoisson_solver.multigrid.post_sweeps -> -mg_post_itpoisson_solver.multigrid.semi_coarsening.{i,j,k} -> -mg_i_semi, -mg_j_semi, -mg_k_semipoisson_solver.multigrid.level_solvers.level_N.method -> -ps_mg_levels_N_ksp_typepoisson_solver.multigrid.level_solvers.level_N.preconditioner -> -ps_mg_levels_N_pc_typepoisson_solver.multigrid.cycle and .mode are accepted structured keys; current supported values are v and multiplicativepressure_solver remains a legacy alias for poisson_solverpetsc_passthrough_options -> advanced PETSc flags not exposed as structured YAMLFinal option parsing happens in function CreateSimulationContext during context creation.
MG level numbering follows PETSc/PICurv convention: level_0 is the coarsest grid. Larger level numbers are progressively finer. The default MG level preconditioner is block Jacobi (bjacobi) when not specified. The current PETSc binding applies one MG smoother count; if pre_sweeps and post_sweeps differ, PICurv uses the larger value and logs a warning.
Common MG-level preconditioner notes:
jacobi and sor are simple smoother PCs. SOR can use -ps_mg_levels_N_pc_sor_omega <positive-real> through passthrough when needed.ilu and lu are factor PCs. Useful passthrough knobs include -ps_mg_levels_N_pc_factor_levels <nonnegative-integer> and -ps_mg_levels_N_pc_factor_shift_amount <nonnegative-real>.bjacobi owns nested block solves; inspect exact nested PETSc prefixes with -ps_ksp_view before tuning sub-KSP/sub-PC options for a specific PETSc build.Current implementation includes:
Nvert/solid checks),monitor.yml -> solver_monitoring.poisson.pic_true_residual.If pressure solve quality degrades, check first:
Current direct tests are strongest for helper and invariant behavior:
PoissonLHSNewProjectionPoissonNullSpaceFunctionComputeRHSThe main remaining gap is PoissonSolver_MG: it is exercised in runtime smoke, but still lacks equivalent direct bespoke coverage for debugging. Periodic and immersed-boundary stencil branches also remain thinner than the core Cartesian helper surface.
This page describes Pressure-Poisson, GMRES, and Multigrid within the PICurv workflow. For CFD users, the most reliable reading strategy is to map the page content to a concrete run decision: what is configured, what runtime stage it influences, and which diagnostics should confirm expected behavior.
Treat this page as both a conceptual reference and a runbook. If you are debugging, pair the method/procedure described here with monitor output, generated runtime artifacts under runs/<run_id>/config, and the associated solver/post logs so numerical intent and implementation behavior stay aligned.