[WIP] add average/integral/sum diagnostic output #587
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This adds the
DiagConditional
diagnostic from PelePhysics.It computes the volume average, volume integral, or sum of a variable. This operation is optionally filtered by and/or conditioned on other variables, and outputs it to a text file at periodic intervals while a simulation is evolved. Only 1D conditional distributions are computed (higher dimensions are not implemented).
Mass-weighted averages or integrals are NOT yet supported for this diagnostic.
If an unconditioned volume average, volume integral, or sum is desired, you can condition on a "dummy variable" and set the number of bins of the conditional distribution to 1. This is equivalent to the unconditioned value. A future PR will remove the need for this workaround.
Example usage to find the (unconditioned) volume average temperature (and standard deviation):
Example usage to find the volume average temperature (and standard deviation) conditioned on (i.e., as a function of) gas density:
Note: Conditioning always uses linear-spaced bins (log-spaced bins are not yet supported).
Related issues
N/A
Checklist
Before this pull request can be reviewed, all of these tasks should be completed. Denote completed tasks with an
x
inside the square brackets[ ]
in the Markdown source below:/azp run
.