PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
This page provides a collection of quick, goal-oriented guides for common simulation and configuration tasks. Use these recipes to solve specific problems without needing to read the full reference manuals.
The Reynolds number (Re
) is calculated automatically by pic-flow
from the physical properties in your case.yml
file using the formula Re = (ρ * U * L) / μ
.
To change Re
, you can modify any of the four defining parameters in the properties
section. For example, to double the Reynolds number, you could either double the density
or halve the viscosity
.
**case.yml
:**
Set the dimensionality
parameter to "2D"
in your case.yml
. The C-solver will then ignore computations in the z-direction. For a programmatic grid, you should also set the resolution in the z-direction (km
) to a small number (e.g., 3) to minimize computational overhead.
**case.yml
:**
This depends on your grid mode
in case.yml
.
programmatic_c
grids: Change the number of cells in the im
, jm
, and km
lists. yaml grid: mode: programmatic_c programmatic_settings: im: [257] # Doubled resolution jm: [129] km: [129]
file
grids: You must generate a new grid file using an external tool and update the source_file
path. yaml grid: mode: file source_file: my_grids/new_fine_mesh.picgrid
Simulation time is controlled in case.yml
, while output frequency is in monitor.yml
.
total_steps
or adjust dt_physical
in case.yml
. yaml @section autotoc_md9 In case.yml run_control: dt_physical: 0.0001 total_steps: 5000 # Run for 5000 steps instead of 2000
data_output_frequency
in monitor.yml
. yaml @section autotoc_md10 In monitor.yml io: data_output_frequency: 50 # Save every 50 steps instead of 100
Define it in the boundary_conditions
list in your case.yml
. Each entry needs a face
, type
, and handler
. Some handlers require params
.
Example: A constant velocity inlet and a no-slip wall.
Refer to the Case Reference for a full list of handlers.
Set the corresponding periodic flag to true
under models.domain
in your case.yml
. For example, for a channel that is periodic in the x-direction:
**case.yml
:**
You must also ensure that the boundary conditions for the periodic faces (e.g., -Xi
and +Xi
) are set to the INTERFACE
type with the periodic
handler.
Use the -n
flag with pic-flow run
. To optimize performance, you can optionally suggest a processor decomposition to PETSc in your case.yml
.
Run command:
Optional case.yml
for a 4x2x2 layout:
Set the start_step
in case.yml
to the time step you want to restart from. The solver will automatically find the corresponding output files in the results
directory.
**case.yml
:**
This configuration would run the simulation from step 1000 to step 3000.
Use the logging
section of your monitor.yml
. Set the verbosity
to DEBUG
and specify the C function(s) you want to inspect in the enabled_functions
list.
**monitor.yml
for debugging the projection step:**
Use the --post-process
and --run-dir
flags with pic.flow run
. You also need to provide a post-processing recipe with --post
.
Add the task to the eulerian_pipeline
list in your post.yml
recipe. Then, add the name of the output field (Qcrit
in this case) to the eulerian_fields
list to ensure it gets saved to the VTK file.
**my_analysis.yml
:**
This page serves as a quick reference for common tasks. For a broader overview of all features available through the configuration files, see the summary page.
Proceed to the Capabilities Summary: What You Can Do.