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

Reduce a duct's field-statistics window to cross-section fields and bisector profiles. More...

Go to the source code of this file.

Namespaces

namespace  cross_section_profile
 

Functions

 cross_section_profile.load_channel_tool ()
 Import the window reduction from the channel tool rather than duplicating it.
 
 cross_section_profile.transform (numpy, mean, covariance, pairs, permutation, sign)
 Apply a component permutation with sign changes to a mean and its covariance.
 
 cross_section_profile.main (argv=None)
 Entry point.
 

Variables

 cross_section_profile.CHANNEL_TOOL
 

Detailed Description

Reduce a duct's field-statistics window to cross-section fields and bisector profiles.

A square duct has one homogeneous direction, the streamwise one, so its statistics reduce to a cross-section rather than a wall-normal line. The reduction itself, the window lookup in checkpoint.meta and the covariance over the homogeneous set, is the one driven_channel/tools/wall_normal_profile.py performs and is imported from it; this script averages along the stream only and then reads off what the case's acceptance criteria name (driven_duct.md section 5):

The cross-section is folded onto one octant by default: its four reflections and, when the two cross-stream axes carry identical node distributions, the diagonal swap. A reflection reverses the velocity component normal to its mirror line, so that component's mean and its covariances with the other two change sign. Folding averages eight images of one long average, which is what makes a 1-3% secondary flow readable; --no-fold keeps the raw cross-section, whose asymmetry is a measure of the remaining sampling error.

The friction velocity is the perimeter mean of the wall shear: from --body-force as sqrt(f A / P), the exact mean force balance; from --u-tau; or by default from the first cells' resolved gradient, nu U / d, which is meaningful only when the first cells lie in the viscous sublayer.

Usage:

cross_section_profile.py \\
--checkpoint RUN/output/checkpoints/step_000000200000 --window stationary \\
--grid RUN/inputs/grid/grid.run --viscosity 4.5351474e-04 \\
--output-prefix duct

Definition in file cross_section_profile.py.