PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
wall_normal_profile.py File Reference

Reduce a field-statistics window into wall-normal profiles for DNS comparison. More...

Go to the source code of this file.

Namespaces

namespace  wall_normal_profile
 

Functions

 wall_normal_profile.load_spectra_helpers ()
 Import the PICGRID and PETSc-Vec readers from generators/spectra.gen.
 
 wall_normal_profile.find_payload (checkpoint_dir, window, field, moment, block)
 Locate one statistics-window payload inside a checkpoint bundle.
 
 wall_normal_profile.homogeneous_average (numpy, field, wall_kji)
 Average a cell array over both directions that are not the wall-normal one.
 
 wall_normal_profile.main (argv=None)
 Entry point.
 

Variables

 wall_normal_profile.REPO_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..", ".."))
 
 wall_normal_profile.SPECTRA_GEN = os.path.join(REPO_ROOT, "generators", "spectra.gen")
 
dict wall_normal_profile.AXIS_TO_KJI = {"Xi": 2, "Eta": 1, "Zeta": 0}
 
dict wall_normal_profile.AXIS_TO_COMPONENT = {"Xi": 0, "Eta": 1, "Zeta": 2}
 

Detailed Description

Reduce a field-statistics window into wall-normal profiles for DNS comparison.

field_statistics accumulates per-cell time moments and is BC-agnostic, so it works unchanged under periodic boundaries. What the postprocessor does not have is a spatial reduction: nothing averages a statistics field over homogeneous directions. Comparing against a channel DNS needs exactly that, so this script does the reduction outside the postprocessor, reading the window payloads directly.

It averages the window's mean and second-moment fields over the two homogeneous (periodic) directions, converts to wall units using the friction velocity implied by the driven body force, and writes a CSV of

y, y+, U+, u'+, v'+, w'+, -<u'v'>+

together with the log-law and viscous-sublayer reference curves.

The PICGRID and PETSc-binary readers are imported from generators/spectra.gen rather than duplicated; that module already owns the DMDA interior-extraction convention (a cell-centred payload is sized (IM+1, JM+1, KM+1) and the physical interior is [1:KM, 1:JM, 1:IM]).

Usage:

wall_normal_profile.py --checkpoint CHECKPOINT_DIR --window stationary \\
--grid GRID.picgrid --wall-axis Eta --stream-axis Zeta \\
--viscosity 3.5714286e-04 --output profile.csv

Definition in file wall_normal_profile.py.