PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
Loading...
Searching...
No Matches
Modular Selector Extension Guide

This page is the contributor checklist for adding new selector-driven options without drifting the YAML -> launcher -> C runtime contract.

1. Standard Checklist For Any Selector

For every new selector value:

  1. define the canonical user-facing value in YAML docs/templates,
  2. add or update Python normalization/validation in scripts/picurv,
  3. emit the correct generated control/post artifact mapping,
  4. add any C enum/storage and parser wiring,
  5. add the runtime dispatch/consumer branch,
  6. update tests,
  7. update the relevant reference pages.

Use the canonical value only. Do not add placeholder enum values or compatibility aliases for unimplemented options.

2. Momentum Solver Selector

3. Boundary Condition Type Or Handler

4. Particle Initialization Mode

5. Interpolation Method

6. Field Initialization Mode

  • Schema home: case.yml -> properties.initial_conditions.mode
  • Canonical values:
    • Zero
    • Constant
    • Poiseuille
  • Python hooks:
    • normalize_field_init_mode()
    • resolve_initial_velocity_components()
  • Generated mapping:
    • mode -> -finit
    • u_physical/v_physical/w_physical -> -ucont_x/-ucont_y/-ucont_z
  • C storage/parser:
  • Runtime:
  • Tests/docs to update:

7. Analytical Type

8. Verification Source Overrides

  • Schema home: solver.yml -> verification.sources.*
  • Design intent:
    • reserved for verification-only source injections when no ordinary end-to-end path is sufficient
    • keep runtime call sites thin and centralize override implementations in verification_sources.*
  • Current support:
    • verification.sources.diffusivity
    • verification.sources.scalar
    • diffusivity profile LINEAR_X
    • scalar profiles CONSTANT, LINEAR_X, SIN_PRODUCT
  • Python hooks:
    • validation and flag emission in scripts/picurv
  • Generated mapping:
    • verification.sources.diffusivity.mode -> -verification_diffusivity_mode
    • verification.sources.diffusivity.profile -> -verification_diffusivity_profile
    • verification.sources.diffusivity.gamma0 -> -verification_diffusivity_gamma0
    • verification.sources.diffusivity.slope_x -> -verification_diffusivity_slope_x
    • verification.sources.scalar.mode -> -verification_scalar_mode
    • verification.sources.scalar.profile -> -verification_scalar_profile
    • verification.sources.scalar.value -> -verification_scalar_value
    • verification.sources.scalar.phi0 -> -verification_scalar_phi0
    • verification.sources.scalar.slope_x -> -verification_scalar_slope_x
    • verification.sources.scalar.amplitude -> -verification_scalar_amplitude
    • verification.sources.scalar.kx/ky/kz -> -verification_scalar_kx/-verification_scalar_ky/-verification_scalar_kz
  • C storage/parser:
  • Runtime:
  • Design boundary:
    • verification sources exist only for otherwise-unreachable verification scenarios
    • analytical truth definitions belong in AnalyticalSolutions, not in model-evolution code such as ParticlePhysics
  • Tests/docs to update:

9. Grid Selector / Generator Selector

  • Schema homes:
    • case.yml -> grid.mode
    • case.yml -> grid.generator.grid_type
  • Canonical values:
    • programmatic_c
    • file
    • grid_gen
  • Python orchestration:
    • scripts/picurv grid validation and run-dir staging
  • Generator implementation:
    • scripts/grid.gen
  • Generated mapping:
    • programmatic_c emits -im/-jm/-km/...
    • file emits -grid_file
    • grid_gen shells out to grid.gen
  • C consumption:
  • Tests/docs to update:

10. Profiling Selector

  • Schema home: monitor.yml -> profiling.timestep_output.mode
  • Canonical values:
    • off
    • selected
    • all
  • Python hooks:
    • resolve_profiling_config()
    • prepare_monitor_files() in scripts/picurv
  • Generated mapping:
    • timestep_output.mode -> -profiling_timestep_mode
    • timestep_output.file -> -profiling_timestep_file
    • final_summary.enabled -> -profiling_final_summary
    • selected function list -> profile.run + -profile_config_file
  • C storage/parser:
  • Runtime:
  • Tests/docs to update:

11. Postprocessing / Statistics Tasks

11. Related Pages

CFD Reader Guidance and Practical Use

This page describes Modular Selector Extension Guide 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.

What To Extract Before Changing A Case

  • Identify which YAML role or runtime stage this page governs.
  • List the primary control knobs (tolerances, cadence, paths, selectors, or mode flags).
  • Record expected success indicators (convergence trend, artifact presence, or stable derived metrics).
  • Record failure signals that require rollback or parameter isolation.

Practical CFD Troubleshooting Pattern

  1. Reproduce the issue on a tiny case or narrow timestep window.
  2. Change one control at a time and keep all other roles/configs fixed.
  3. Validate generated artifacts and logs after each change before scaling up.
  4. If behavior remains inconsistent, compare against a known-good baseline example and re-check grid/BC consistency.