CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   STAR-CCM+ (https://www.cfd-online.com/Forums/star-ccm/)
-   -   flow distribution index (gamma function) (https://www.cfd-online.com/Forums/star-ccm/67704-flow-distribution-index-gamma-function.html)

 bramv101 August 24, 2009 10:53

flow distribution index (gamma function)

Hi all,

in fluent you could write a piece of usercode that represented the flow distribution index (gamma)

gamma = 1-V_prime/2*Vavg
Vprime=Area AVGD of abs(V-Vavg)

Has anyone done something similar in StarCCM+ and willing to explain me?

 kyle August 24, 2009 17:01

You can do it by creating a new report and a field function...

1. Add an "Area Averaged Report" and add the boundary or section plane you are interested in to the report. Set velocity magnitude as the scalar. This will create another new field function that will have the value of the the average velocity. The name of the new field function will be based on the name you gave your report.

2. You can then create a new field function called gamma: 1 - abs(\$VelocityMagnitude - \$VelocityAverageReport) / (2 * \$VelocityAverageReport)
(The name of the field function "\$VelocityAverageReport" will depend on what you named your report)

Note that you will have to create an average velocity report and a different gamma field function for each boundary or section that you want to work with.

 bramv101 August 26, 2009 10:53

Many Thx this worked for me

 bramv101 August 27, 2009 04:48

If i created the field function, how can i then display this value?
Another avg report doesnt seam logical to me

 bramv101 August 27, 2009 09:16

Never mind, i should use expression report.
However one thing:
your definition of the gamma function is somewhat odd to me.
you do not use axial velocity but magnitude instead, and you dont area avg your abs(V_cell_axial-AA_v_axial)

 kyle August 27, 2009 15:51

If you want to use axial velocity you need to create a new field function to use instead of velocity magnitude:

abs(dot(unit(\$\$Area), \$\$Velocity))

 Priyankv April 20, 2015 08:30

Quote:
 Originally Posted by kyle (Post 227343) You can do it by creating a new report and a field function... 1. Add an "Area Averaged Report" and add the boundary or section plane you are interested in to the report. Set velocity magnitude as the scalar. This will create another new field function that will have the value of the the average velocity. The name of the new field function will be based on the name you gave your report. 2. You can then create a new field function called gamma: 1 - abs(\$VelocityMagnitude - \$VelocityAverageReport) / (2 * \$VelocityAverageReport) (The name of the field function "\$VelocityAverageReport" will depend on what you named your report) Note that you will have to create an average velocity report and a different gamma field function for each boundary or section that you want to work with.
Here do we consider Mass flow average or Area average? I am checking FDI at SCR inlet. Please let me know which one do i need to consider and why?

 kyle April 20, 2015 11:17

The formula I posted (six years ago!) is area averaged. It's up to you to determine whether you need area or mass averaged. I don't know your requirements.

 ggulgulia April 21, 2015 05:08

Hi

Mass averaged reports are generally needed when you are considering the bulk volume of your continua or a part of it, or in more layman terms the control volume for eg: total pressure, static pressure, total temperature, entropy, enthalpy etc.

However the surface averaged reports (as the name suggests) gives the values at a surface, for eg uniformity index and other values which you may need at surface.

(I am omitting the mathematics, you can always look them up in the help manual :) )

 Priyankv April 21, 2015 07:43

Quote:
 Originally Posted by kyle (Post 542778) The formula I posted (six years ago!) is area averaged. It's up to you to determine whether you need area or mass averaged. I don't know your requirements.
Thank you for your prompt response! Well i'm running flow analysis for an SCR. Acceptance criteria for FDI is 0.85, When i calculated it considering Area avg it was 0.84, when i considered Mass avg i got 0.86. So was wondering if i can show mass avg results :P Thanks, Priyank V

 All times are GMT -4. The time now is 23:03.