CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Fluctuating component of a scalar quantity (https://www.cfd-online.com/Forums/openfoam-post-processing/219817-fluctuating-component-scalar-quantity.html)

 elden August 9, 2019 12:59

Fluctuating component of a scalar quantity

Hi,
I'm dealing with external aerodynamics problems with dispersion of gaseous substances.
Simulations are carried out considering URANS and a Scale Adaptive approach for the turbulence model (kOmegaSSTSAS). The tracer gas is transported by means of the scalarTransport FO (i.e. as a passive scalar)

I'd like to postprocess not only the Reynolds Stress Tensor by means of the prime2Mean utility but also the turbulent diffusion flux of concentration : <u'*c'>; <v'*c'>; <w'*c'>
Related to the postProcess of these last three quantities I'm facing two problems:

- The first one is mainly conceptual and it's related to the fluctuating part of the velocity field. Since the turbulence model is the kOmegaSSTSAS, should I compute directly the fluctuations of the velocity field? Or should I consider the assumprtion made in the turbulenceIntensity FO (u'=v'=w') accounting for the fluctuating part as uPrime=sqrt(k*2/3)?
- The second is related to the code needed in order to evaluete the turbulence intensity of a scalar (c') and subsequently the turbulent diffusion fluxes (< u_i '*c' >). My intent was to somehow exploit the FO (fieldAverage.C/H and fieldAverageItem) used for prime2Mean computation but I got lost. I can't find the proper way to do that.

 elden September 9, 2019 11:15

possible answer to question number 2

Well,
I think I've menaged to do what I needed. Instead of changing fieldAverageTemplates.C with an additional variable (like, let's say, primeField), I tried to evaluate < u' c' >, < v' c' >, and < w' c' > in the following way:
mean value of U and c thanks the fieldAverage FO --> definition of the new variable U' (3 components vector) * c' as (U - UMean)*(c - cMean) --> mean value of this new variable.
I hope this is a valid approach since the fieldAverage code computes the iterative average.

 pedroxramos January 30, 2020 04:35

Quote:
 Originally Posted by elden (Post 744258) Well, I think I've menaged to do what I needed. Instead of changing fieldAverageTemplates.C with an additional variable (like, let's say, primeField), I tried to evaluate < u' c' >, < v' c' >, and < w' c' > in the following way: mean value of U and c thanks the fieldAverage FO --> definition of the new variable U' (3 components vector) * c' as (U - UMean)*(c - cMean) --> mean value of this new variable. I hope this is a valid approach since the fieldAverage code computes the iterative average.

hi,

would you mind sharing your script for this part?

 elden January 31, 2020 06:40

1 Attachment(s)
Quote:
 Originally Posted by pedroxramos (Post 756092) hi, would you mind sharing your script for this part?

This is the code. The C2H4 scalarField is the one being transported within the flow field

 pedroxramos January 31, 2020 06:46

thanks a lot!

 pedroxramos February 21, 2020 08:05

Quote:
 Originally Posted by elden (Post 756245) This is the code. The C2H4 scalarField is the one being transported within the flow field

hi again, are you sure you only need those files? We tried to run it on the pitzDaily (pisoFoam) and it didn't save the new variable...

 pedroxramos February 24, 2020 07:57

Quote:
 Originally Posted by elden (Post 756245) This is the code. The C2H4 scalarField is the one being transported within the flow field

is the right side to be put in the createFields.H?

 elden February 27, 2020 15:38

In this thread I was talking about the passive transport of a scalar quantity. One way to tackle this task consists into the use of the scalarTransport FO. This FO looks for a file in the 0 folder named as the field name used (in my case C2H4)

 pedroxramos February 27, 2020 15:40

Quote:
 Originally Posted by elden (Post 759827) In this thread I was talking about the passive transport of a scalar quantity. One way to tackle this task consists into the use of the scalarTransport FO. This FO looks for a file in the 0 folder named as the field name used (in my case C2H4)
got it now, thanks!

 All times are GMT -4. The time now is 04:53.