CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Fluctuating component of a scalar quantity

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 2 Post By elden
  • 1 Post By elden

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 9, 2019, 12:59
Default Fluctuating component of a scalar quantity
  #1
New Member
 
Pietro Tavazzi
Join Date: Aug 2019
Location: Milan, Italy
Posts: 7
Rep Power: 3
elden is on a distinguished road
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.

Thanks for reading.
Hoping to find some answers
elden is offline   Reply With Quote

Old   September 9, 2019, 11:15
Default possible answer to question number 2
  #2
New Member
 
Pietro Tavazzi
Join Date: Aug 2019
Location: Milan, Italy
Posts: 7
Rep Power: 3
elden is on a distinguished road
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 and agustinvo like this.
elden is offline   Reply With Quote

Old   January 30, 2020, 04:35
Default
  #3
Member
 
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 80
Rep Power: 10
pedroxramos is on a distinguished road
Quote:
Originally Posted by elden View Post
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?
pedroxramos is offline   Reply With Quote

Old   January 31, 2020, 06:40
Default
  #4
New Member
 
Pietro Tavazzi
Join Date: Aug 2019
Location: Milan, Italy
Posts: 7
Rep Power: 3
elden is on a distinguished road
Quote:
Originally Posted by pedroxramos View Post
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
Attached Images
File Type: png postProcess.png (78.7 KB, 21 views)
pedroxramos likes this.
elden is offline   Reply With Quote

Old   January 31, 2020, 06:46
Default
  #5
Member
 
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 80
Rep Power: 10
pedroxramos is on a distinguished road
thanks a lot!
pedroxramos is offline   Reply With Quote

Old   February 21, 2020, 08:05
Default
  #6
Member
 
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 80
Rep Power: 10
pedroxramos is on a distinguished road
Quote:
Originally Posted by elden View Post
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 is offline   Reply With Quote

Old   February 24, 2020, 07:57
Default
  #7
Member
 
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 80
Rep Power: 10
pedroxramos is on a distinguished road
Quote:
Originally Posted by elden View Post
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?
pedroxramos is offline   Reply With Quote

Old   February 27, 2020, 15:38
Default
  #8
New Member
 
Pietro Tavazzi
Join Date: Aug 2019
Location: Milan, Italy
Posts: 7
Rep Power: 3
elden is on a distinguished road
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)
elden is offline   Reply With Quote

Old   February 27, 2020, 15:40
Default
  #9
Member
 
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 80
Rep Power: 10
pedroxramos is on a distinguished road
Quote:
Originally Posted by elden View Post
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!
pedroxramos is offline   Reply With Quote

Reply

Tags
fieldaverageitem, turbulence intensity, uprime

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM extended 4.0 Error with Multinode Set-up Liweix OpenFOAM Running, Solving & CFD 1 February 18, 2020 00:50
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' muth OpenFOAM Running, Solving & CFD 3 August 27, 2018 04:18
Division by zero exception - loop over scalarField Pat84 OpenFOAM Programming & Development 6 February 18, 2017 05:57
Diverging solution in transonicMRFDyMFoam tsalter OpenFOAM Running, Solving & CFD 30 July 7, 2014 06:20
compressible flow in turbocharger riesotto OpenFOAM 50 May 26, 2014 01:47


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