Histogram¶
Introduction¶
A Histogram is a distribution formed by collecting observation values—optionally weighted—on a voxel or particle basis and sorting them into bins over a specified range. This feature is useful for predicting things like particle distributions, fluid shear distributions, temperature distributions, etc. The code predicts and reports, over time, both the non-cumulative frequency distribution and the corresponding cumulative distribution function (CDF).
In the example below, we compute and plot the probability distribution function (PDF) of the local fluid energy dissipation rate throughout the vessel. The distribution spans from 0.25 to 1.5 W/kg and is constructed using 100 bins. The oscillatory motion of the disc produces a time-varying PDF. The corresponding cumulative distribution function (CDF), though not shown here, is also available for inspection.
Download Sample File: Histogram
Property Grid¶
General¶
- Bin Range Start
Start value for histogram bin range.
- Bin Range End
End value for histogram bin range.
- Number of Bins
Number of histogram bins.
- Input Data
This setting determines what type of data are used when computing the histogram. It does not change where the data are stored (it is always defined per within each histogram bin); but this setting controls which underlying data sources are observed when defining the histogram.
- Fluid
This calculation uses continuous local field data from the lattice to define observation variables. The observation variables can include any combination of fluid properties, temperature fields, scalar field variables, or other continuous quantities defined on the grid.
- Particles
This calculation uses continuous local particle data to define observation variables. The observation variables can include any combination of particle properties.
- Particle Set
This parameter defines which particle set will be observed.
- Histogram UDF
user-defined units | This UDF defines the observation value and any associated weighing function associated with the observation. One output must be defined within the UDF: a floating-point variable named
value. These output values are the observations that are sorted into histogram bins, defined by the Bin Range Start, Bin Range End, and Number of Bins.Histogram observations may be computed either on a particle-by-particle basis or a voxel-by-voxel basis, as determined by the observation type. When the observation type is Voxel, the local UDF is calculated on a voxel-by-voxel basis using the local fluid properties. The number of observations populating the histogram will be related to the lattice size. When the observation type is Particle, the local UDF is calculated on a particle-by-particle basis using the local particle properties. The number of observations populating the histogram will be related to the particle count of the corresponding particle selection.
One optional second floating point variable named
weightcan also be defined within the UDF. This variable defines the weight associated with each observation. If no value is specified, the weight will default to 1, implying each observation has the same weight/influence on the distribution. The output value weight is unitless. This is either a particle-based or a voxel-based local UDF.This example simulates hydrodynamics and gas dispersion in a baffled stirred tank reactor driven by a down-pumping pitched blade turbine. Gas injection is modeled via a toroidal sparger. The simulation tracks the evolution of the bubble size distribution over a 60-second physical time window to reach a quasi-steady state. Two histogram outputs track the bubble size distribution:
Number-Based Distribution: Weights the distribution toward fines, reflecting the high number of smaller bubbles
Volume-Based Distribution: Shifts the mean toward larger diameters, reflecting the volumetric dominance of larger bubbles
Download Sample File:
Histogram- Units
Optional units to add to file output.
Histogram Output Data¶
The time-evolving histogram data will be recorded in tab-separated ASCII .txt files. Each histogram will have a unique output file with a file name linked to its dynamic name. Both the probability distribution function and cumulative distribution function are printed, in accordance with the user-defined bin range start, bin range end, and number of bins.
Histogram Toolbar¶
Context-Specific Toolbar Forms |
Description |
|---|---|
|
The Help command launches the M-Star reference documentation in your web browser. |
For a full description of each selection on the Context-Specific Toolbar, see Toolbar Selections.
Help