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 | |
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):
<prefix>_cross_section.csv: every cell's mean velocity and the six covariance components, in solver units, for contouring the secondary flow;<prefix>_wall_bisector.csv: wall units along the wall bisector, with the wall-normal secondary velocity;<prefix>_corner_bisector.csv: wall units along the corner bisector, with the secondary velocity along it (square cross-sections only);<prefix>_wall_shear.csv: the local wall shear around the perimeter, normalized by its perimeter mean.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:
Definition in file cross_section_profile.py.