|
[Sponsors] |
August 9, 2019, 13:59 |
Fluctuating component of a scalar quantity
|
#1 |
New Member
Pietro Tavazzi
Join Date: Aug 2019
Location: Milan, Italy
Posts: 8
Rep Power: 7 |
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 |
|
September 9, 2019, 12:15 |
possible answer to question number 2
|
#2 |
New Member
Pietro Tavazzi
Join Date: Aug 2019
Location: Milan, Italy
Posts: 8
Rep Power: 7 |
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. |
|
January 30, 2020, 05:35 |
|
#3 | |
Member
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 14 |
Quote:
hi, would you mind sharing your script for this part? |
||
January 31, 2020, 07:40 |
|
#4 |
New Member
Pietro Tavazzi
Join Date: Aug 2019
Location: Milan, Italy
Posts: 8
Rep Power: 7 |
This is the code. The C2H4 scalarField is the one being transported within the flow field |
|
January 31, 2020, 07:46 |
|
#5 |
Member
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 14 |
thanks a lot!
|
|
February 21, 2020, 09:05 |
|
#6 |
Member
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 14 |
||
February 24, 2020, 08:57 |
|
#7 |
Member
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 14 |
||
February 27, 2020, 16:38 |
|
#8 |
New Member
Pietro Tavazzi
Join Date: Aug 2019
Location: Milan, Italy
Posts: 8
Rep Power: 7 |
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)
|
|
February 27, 2020, 16:40 |
|
#9 |
Member
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 14 |
||
April 9, 2022, 11:13 |
|
#10 | |
New Member
Shengjie Lu
Join Date: Sep 2020
Location: Nanjing,China
Posts: 12
Rep Power: 6 |
Quote:
In my LES case, the Umean and cMean only makes sense when they are statistically converged. So I set a timeStart for this coded FO. I imposed your code in my simulation, trying to calculate time-averaged <u*c> and <u'*c'>. However, the simulation aborted at the half of the calculation, and the error shows: Code:
new cannot satisfy memory request. This does not necessarily mean you have run out of virtual memory. It could be due to a stack violation caused by e.g. bad use of pointers or an out of date shared library Code:
fluctuation_flux1 { type coded; libs ("libutilityFunctionObjects.so"); enabled true; timeStart 74; timeEnd 200; writeControl adjustableRunTime; writeInterval 200; name flux1; codeExecute #{ const volVectorField& U = mesh().lookupObject<volVectorField>("U"); const volScalarField& s = mesh().lookupObject<volScalarField>("s"); obr_.store ( new volVectorField ( IOobject ( "flux1", obr_.time().timeName(), obr_, IOobject::NO_READ, IOobject::AUTO_WRITE ), U*s ) ); const volVectorField& flux1 = obr_.lookupObject<volVectorField>("flux1"); #}; } Code:
fieldAverage1 { type fieldAverage; functionObjectLibs ( "libfieldFunctionObjects.so" ); resetOnRestart true; resetOnOutput false; startTime 75; endTime 200; writeControl adjustableRunTime; writeInterval 200; fields ( flux1 { mean on; prime2Mean on; base time; } ); } |
||
Tags |
fieldaverageitem, turbulence intensity, uprime |
|
|
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 01:50 |
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' | muth | OpenFOAM Running, Solving & CFD | 3 | August 27, 2018 05:18 |
Division by zero exception - loop over scalarField | Pat84 | OpenFOAM Programming & Development | 6 | February 18, 2017 06:57 |
Diverging solution in transonicMRFDyMFoam | tsalter | OpenFOAM Running, Solving & CFD | 30 | July 7, 2014 07:20 |
compressible flow in turbocharger | riesotto | OpenFOAM | 50 | May 26, 2014 02:47 |