This page provides operational recipes for common PICurv tasks. Each recipe includes what to change, why it matters, and a quick verification action.
What to change (in case.yml):
Why:
\[ Re = \frac{\rho U L}{\mu} \]
These values set the non-dimensional operating point consumed by solver controls.
Quick check:
picurv validate ...,.control file for updated values.Why:
2D holds the i velocity component fixed (-TwoD 1), so the flow plane is j-k and the thin direction must be i; thinning j or k instead freezes an in-plane component,im keeps the structured-grid machinery working without resolving a direction the flow does not use.Quick check:
-TwoD 1 and the expected i resolution,2D never changes it.Status: 2D is experimental; see 2D.
programmatic_c: increase im/jm/km arrays,file: use finer .picgrid,grid_gen: increase generator resolution args.Verification:
Why:
Verification:
validate first and check BC generation files under <run.config>/.Periodicity is derived exclusively from paired PERIODIC boundary conditions; there are no separate YAML periodic flags. Geometric periodicity requires the opposite grid surfaces to match pointwise under one constant Cartesian translation and at least four physical nodes along the periodic axis.
Verification:
Optional partition hints:
Note: da_processors_* are scalar globals, not per-block vectors.
Stage artifacts without starting execution:
Add --cluster my_case/cluster.yml to stage Slurm scripts instead of local command metadata.
Submit an already staged run later:
Cancel a submitted run by directory:
Request a solver final-output shutdown before exiting:
Use plain cancel if the solver is wedged or not reaching runtime checkpoints.
Generated Slurm solver jobs already enable an automatic runtime walltime guard. Override it only when you need a different warmup/headroom policy:
Ask Slurm for an early warning signal as fallback protection when you want PICurv to flush one last snapshot before walltime or preemption:
If the batch script launches mpirun directly, use signal: "B:USR1@300" and prefer exec mpirun ....
Verification:
<run.scheduler>/*.sbatch and submission.json in run directory.PICURV_JOB_START_EPOCH and PICURV_WALLTIME_LIMIT_SECONDS.signal fallback policy before submission.Pass --restart-from on the CLI to point at the previous run:
Meaning:
start_step: 500.total_steps is the number of additional steps to run.--restart-from is given, picurv automatically resolves the previous run's restart directory from that run's <run.config>/monitor.yml and injects the correct -restart_dir into the new control file.Keep solver.yml -> operation_mode.eulerian_field_source: "solve" (the default). With start_step > 0 the solver reads the restart state at start_step and then advances it. load is a different mode: it replays a stored field at every step and never solves, so a continuation under load needs a checkpoint at every step it would advance through.
Particle restart choices (case.yml):
Full restart of the existing particle swarm:
Restart the flow field but reseed particles from scratch:
Common combinations:
start_step > 0, eulerian_field_source: solve, restart_mode: loadstart_step > 0, eulerian_field_source: solve, restart_mode: initeulerian_field_source: load, with a checkpoint at every replayed stepeulerian_field_source: analytical regenerates the analytical field at the requested (t, step) instead of loading restart files.How to think about this workflow:
run --solve path; there is no separate restart command,--restart-from on the CLI is the preferred way to point picurv at the old run automatically,--continue as a shorthand when resuming from the most recent run of the same case,picurv.Before launching a restart, verify:
start_step,--restart-from path points to the intended previous run directory,picurv storage restore --run-dir <previous_run> --checkpoint <start_step> when cold),start_step matches an actual saved timestep, not just a desired number.Common restart mistakes:
start_step: 501 after a run that ended at 500. Use start_step: 500.solver.yml -> operation_mode.eulerian_field_source: load for a continuation. That replays stored fields instead of solving, and fails at the first step with no checkpoint.particles.restart_mode: load or init explicitly.Verification:
See also:
Use this for local diagnosis of instability or boundary anomalies. Prefer narrow function lists to keep logs manageable.
Use when solver outputs already exist and you are iterating only on analysis pipeline.
To catch up the same recipe in batches while the solver is still running, repeat the same command and keep the full desired window in post.yml. Each run processes only the steps whose output is missing or stale.
Behavior notes:
0..60 and post.yml still asks for 0..100, PICurv processes only 70..100.420, PICurv processes the committed steps and exits successfully; a later run picks up the newer steps.--recompute.For the broader run-directory lifecycle around restart, post-only reuse, and generated scheduler artifacts, see Run Artifact Lifecycle Contract.
For a physical-time movie across a restart campaign, add io.paraview_series: {enabled: true, scope: lineage} to the existing post recipe. Postprocess the parent before the child, using the same recipe and a window that includes the desired parent history. The child processes only its owned steps and writes <run.visualization>/<recipe_id>/<output_filename_prefix>.pvd, which references both runs. Open that PVD in ParaView. A later catch-up invocation refreshes it; reopen it to load new frames. Use scope: run to restrict the view to one run. Different solver timesteps use checkpoint physical time; changing the post stride or fields creates a different recipe ID, which is not automatically combined with the earlier one. See Configuration Reference: Postprocessor YAML for reset and retention rules.
Qcrit itself is cell-centred and cannot be written directly; the nodal average places it on the grid nodes the .vts file uses.
Verification:
Qcrit_nodal field is present.Verification:
<run.analysis>/statistics/<recipe_id>/Stats_msd.csv.--only spectra skips the field post-processor, so re-measuring after changing the binning or the fluctuation definition costs seconds rather than a full rebuild of the .vts output.
Verification:
<run.analysis>/spectra/<recipe_id>/Spectrum_shell_spectrum_Ucat_block0000_continuum.csv holds step,time,k,energy, one row per shell per processed step._history.csv beside it holds one row per step; parseval_residual there must stay at round-off, since summed shell energy must equal the resolved kinetic energy.shell_spectrum requires a triply periodic, single-block, uniform Cartesian box, and picurv validate --case ... --post ... refuses a case that is not one before any field is read.
For anything else, which spectrum applies depends on how many directions are statistically homogeneous:
line_spectrum and plane_spectrum tasks transform one selected physical line or plane on a single-block Cartesian grid. Set axes to the uniform periodic directions and fixed_indices to the remaining physical cell indices; see 8. spectra. Parallel-sample averaging remains planned in 13. Offline Line And Plane Spectra.This copies template files and writes metadata. Runtime binaries (simulator, postprocessor) are resolved from the project bin/ directory via PATH — no copies are placed in the case.
--pin-executables copies simulator and postprocessor into the run's <run.config.bin> and launches those copies at every stage of the run, so rebuilding the repository after staging does not change what the job runs. Set reproducibility.pin_executables: true in the workspace to pin every run staged there. See 12. Binary Resolution and Rebuild Safety for continuation and sweep behavior.
picurv init --pin-binaries predates this. Its case-local copies are used only when the picurv in that case directory is invoked, which init does not set up.
picurv (the Python conductor) can be updated at any time — it only launches jobs, it does not run during solver execution.simulator and postprocessor in bin/ are overwritten by make all. If a queued Slurm job references them by absolute path, the running binary may change.--pin-executables if you expect to rebuild while it is queued.What you get:
If a case is killed (e.g. walltime), continue the study:
Re-aggregate metrics manually:
See Sweep and Study Guide for full contract details.