|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
scripts/grid.gen is the standalone structured-grid generation utility used by the grid.mode: grid_gen workflow. This page documents what it can generate directly, how its config files work, and how pic.flow wraps it.
Use grid.gen when you want:
.picgrid geometry instead of C-side programmatic_c geometry,.info) and visualization output (.vts).This is distinct from:
grid.mode: programmatic_c: geometry is generated inside the C runtime,grid.mode: file: an existing .picgrid file is staged and used directly.General form:
Examples from the current script interface:
grid.gen accepts both:
--config) for reusable defaults,CLI values override config-file values.
Current subcommands:
cpipe: bent pipe with a rectangular cross-sectionpipe: bent pipe with a circular cross-section (O-grid style)warp: generic warped Cartesian blockThese map to different geometric parameter sets inside grid.gen.
Reusable config files live naturally in config/grids/, but can also live beside a study for reproducibility snapshots.
Current shared example:
config/grids/coarse_square_tube_curved.cfgThe config file is INI-style:
[cpipe], [pipe], [warp])Typical contents include:
Depending on settings, grid.gen can emit:
.picgrid: solver-ingestible structured grid file.info: grid quality/statistics summary.vts: visualization helper for ParaViewgrid.gen also prints mesh-quality information to the console when enabled, including normalized warpage checks.
pic.flow wraps the generator through:
Behavior in pic.flow:
scripts/grid.gen,grid.run artifact for C-side ingestion.This means grid_gen remains a Python-side preprocessing workflow even though the final solver still receives a normalized file grid.
Use programmatic_c when:
Use file when:
.picgrid,Use grid_gen when:
.info/.vts outputs alongside the mesh.