|
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/pic.flow converts YAML to control flags (-finit, -ucont_*, -pinit, etc.).Ucont.YAML:
pic.flow 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.C-side entry points:
-finit = 0 (Zero):
-finit = 1 (Constant Normal Velocity):
InitialConstantContra as target normal speed,-finit = 2 (Poiseuille-like Normal Velocity):
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.
In InitializeEulerianState:
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).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,u_physical directly to Ucont without accounting for metric-face scaling.