You need to create distributions for surface averaged values and want to visualize the result? Check out this methodology! It gives you a way to create many mass flow average, surface standard deviation, volume average, minima and maximum at once.
Attachments: | SA_MFA_SSD_MIN_MAX.sim (40 MB) |
This FAQ describes a methodology for cases where creating a surface average or mass flow average report for every entity is not practical.
Maybe you need to calculate the mass flow on many different surfaces, and you want to export the values as .csv file?
Or you want to plot the distribution of the mass flow summed up in one direction?
This article builds on the techniques shown in a previous article:
How to calculate and visualize multiple Sums using Histograms and Heatmaps
Background:
A Histogram splits the input into equally sized chunks, called bins.
The binning is defined by a Field Function (FF) in STAR-CCM+. The standard behavior would simply count the elements in each bin, analogous to the element count report. The elements counted could be cells or faces (... or particles).
for each bin: ∑n 1
In Simcenter STAR-CCM+ you have the option to add a weighting, though. This changes each bin into a sum of a field function (FF), just like the sum report.
for each bin: ∑n FF
To calculate the surface or mass flow average two sums must be calculated. One in the denominator and another in the numerator. We simply use two histogram tables to calculate each sum.
for each bin: Mass Flow Average (MFA) ∑n FF*mfn / ∑n mfn ; Surface Average (SA): ∑n FF*An / ∑n An ; Volume Average (SA): ∑n FF*Vn / ∑n Vn
Equivalently the surface standard deviation can be calculated using: sqrt(∑n pow(FF - FFSA, 2)/ ∑n An)
Example:
Let's take a mini example, the file is attached. A gas flow from left to right with some restriction holes. The pressure drop is our main concern. Therefore, we want to measure the sectional averaged total pressure.
A section plane with 100 multiples is created as shown below - these will be used to calculate the surface and mass flow average.
In the following plot you can see the total pressure distribution over the X-Position with various evaluations.
In small black squares the actual range on one plane sections is shown. Red and blue squares mark the maximum and minimum values. The surface and mass flow averaged total pressure distribution is shown in green and magenta respectively. At last, the surface standard deviation is shown in grey.
Below, a scene with the total pressure is shown. In the lower right-hand side, you can also find the vertical mass flow distribution on the plane marked in magenta.
How-To:
To create these distributions easily you want to copy some objects from the attached template.
MFA | SA | SSD | sum | minMax | VA |
---|---|---|---|---|---|
mass flow average | surface average | surface standard deviation | sum | minimum/ maximum | volume average |