|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
This page documents how PICurv initializes Eulerian velocity fields and particles at startup. It covers both user-facing YAML inputs and the C implementation path that applies them.
Startup sequence:
scripts/picurv converts YAML to control flags (-finit, -ucont_*, -pinit, etc.).Ucont.YAML:
Preferred Poiseuille form:
picurv mapping:
mode -> -finit via normalize_field_init_mode:Zero (or 0) -> 0Constant (or 1) -> 1Poiseuille (or 2) -> 2u_physical/v_physical/w_physical -> -ucont_x/-ucont_y/-ucont_z after non-dimensionalization by U_ref.peak_velocity_physical (Poiseuille only) -> picurv infers the unique inlet axis from boundary_conditions and maps the scalar peak speed onto the matching -ucont_* component.Launcher-side contract:
mode should be set explicitly.Zero, velocity components may be omitted and default to zero.Constant, explicit component values are required.Poiseuille, use either:peak_velocity_physical, oru_physical/v_physical/w_physical but not both in the same block.C-side entry points:
-finit = 0 (Zero):
-finit = 1 (Constant Normal Velocity):
InitialConstantContra as target normal speed,-finit = 2 (Poiseuille-like Normal Velocity):
Vmax / centerline speed), not bulk-average velocity.This means peak_velocity_physical is the clearest user-facing representation for Poiseuille mode.
Initialization is applied to contravariant velocity components, scaled by face-area metrics:
\[ U_n = v_n\,A_n, \]
where face areas are derived from metric vectors (Csi, Eta, Zet) and sign is aligned with inlet face orientation.
This is why equivalent physical inflow speed can map to different Ucont magnitudes on stretched/curved meshes.
StartStep == 0:eulerian_field_source=solve: fresh initialization path.eulerian_field_source=load: reads initial fields from restart files.eulerian_field_source=analytical: uses analytical initializer.StartStep > 0:load source reloads restart fields for the requested step.analytical source regenerates analytical field at current (t, step).Operational note:
StartStep identifies the saved restart state being loaded, not the first new step to compute.N, restart with start_step: N; the first newly advanced step will be N+1.Particle initialization is configured in case.yml -> models.physics.particles, but executed by a separate subsystem.
For full particle mode and restart details, use:
After startup, confirm:
Ucat/Ucont fields.Common pitfalls:
Poiseuille in strongly non-rectangular topology and expecting textbook cylindrical profile,Vmax,u_physical directly to Ucont without accounting for metric-face scaling.This page describes Initial Condition Modes 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.