Dear Foamers
I have simulat
Dear Foamers
I have simulated a LES case. In results files I have mean values, R values but there are no rms values. How are rms values for velocity abbreviated and where can I find them? Thanks in advance for your help. 
Hi ,
As far as i know , the
Hi ,
As far as i know , there are no rms values output. you will have to post process the output files to calculate these. and the R values denotes a part of SGS stresses. hope this helps kumar 
Hi,
I want to confirm what
Hi,
I want to confirm what kumar said. And add, that, there is a tool called postChannel which calculate rms value BUT, for a channel. If your geometry looks like a channel or is a periodic geometry, you can modify the tool. But in other case .... as far as I know, there is no tools. enjoy, Cedric 
Hi all
Off course it would
Hi all
Off course it would be possible for you to get an estimate of the rms values using postprocessing, but if you want the rms some quantity, e.g. pressure, then I would suggest that you rerun your calculation and calculate the rmsvalue during runtime. In that way you are certain that you get the effect of all turbulent fluctuations. By the way, I have been looking quickly in oodles and lesInterFoam and it looks like the average values are calculated in a wrong way. At the moment the average value is calculated based on a counter which is incremented each time step. This gives an even weighting of all time steps, but are you using a Courant based time step then the averaging should take the actual time step into account, otherwise the velocities for the small time steps get a significantly larger impact on the average, and since the velocities are large during these small time steps, the average velocities will be larger than is actually correct. Do you agree with me, or is it still too early in the morninghttp://www.cfdonline.com/OpenFOAM_D...part/happy.gif  Niels 
Hi
Thanks for your answers
Hi
Thanks for your answers guys. Yes I would like to calculate my rms values during the run as Neils suggested. However, when I set up the case I dont see no options to set up rms calculations. If you want to calculate P rms for channelOodles tutorials where would you set up the rms calculations? My mean results look Ok when I compare them with published results! OF Newbie 
One last thing in FoamX if we
One last thing in FoamX if we follow on from velocityField there is an option callled "uprime". What is this for? Thanks

Hi Newbie
I do not think th
Hi Newbie
I do not think there is such an option, so if you need the rms values during runtime, you have to make your own implementation. You could try to take a look at the calculateAverages.H, which is in the lesfolders. Have fun, Niels 
BTW are you using a constant t
BTW are you using a constant time step? If so that explains why your average values match with experiments.
 Niels 
Hello everybody, hello ngj,
you are talking about making an own implementation for calculating the rms value during runtime of a simulation. Since I am a total newbie in programming with C/C++, I have no idea, how an implementation could look like. Has anyone of you already made an own implementation or give me some hints on how to do it? For some aeroacoustic application I need the rms value of the pressure, but for now, I'm stuck with my work, unfortunately. I would be very grateful, if anyone could try to help me out! Thanks already and have a nice sunday. /Bastian 
Quote:
The channelFoam solver computes the averages automatically during the simulation using the fieldAverage function object. At the end of the controlDict you find Code:
functions If you then take a look at postChannel, you find out how the RMS are computed. In particular readFields.H contains: Code:
volSymmTensorField UPrime2Mean scalarField urmsValues = sqrt(mag(RxxValues)); scalarField vrmsValues = sqrt(mag(RyyValues)); scalarField wrmsValues = sqrt(mag(RzzValues)); To make it short, you simply have to write a small utility that does this, since the unsteady data are already stored for you by the fieldAverage. @Niels: What version of OF are you looking at? It seems to me averages are computed correctly in 1.6.x: http://foam.sourceforge.net/doc/Doxy...ce.html#l00139 If you consider to know the average <u> at time t, and you want to update it at t+dt, you just need to do, assuming sum_i(dt) is updated to the current time: (<u> *(sum_i(dt)  dt_current) + dt_current*u_current)/(sum_i(dt)) which should give you the correct weighted average. Best, 
Quote:
thanks for your help. This clarifies a lot. So, in order to get the rms of the pressure, it is sufficient to simply take the sqrt of pPrime2Mean and compensate for the density, since it is already a scalar field? And if so, does it make a difference, if I take the sqrt during run time or during postprocessing (i.e. with the calculator tool in EnSight)? Thanks again. Best regards, Bastian 
Dear Alberto,
fieldAverage seems only can export u'^2, v'^2, w'^2, u'v', u'w' ,v'w', p'^2, T'^2. but if I want to get vector and scalar multiply componet, <u'T'>,<v'T'>, <w'T'>, which T is tempeture, how can I modify to release this ? Thank you very much. 
Quote:
Quote:
Best, 
Quote:
Best, 
Quote:
/Bastian 
Dear all,
my field has temperature, I want to get turbulent heat flux <w'T'>. I do like this: 1. Add three field variables to creatFields.H . Info<< "Reading field Wave\n" << endl; // the averaged value of w velocity. volScalarField Wave ( IOobject ( "Wave", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); Info<< "Reading field Tave\n" << endl; // the averaged value of temperature. volScalarField Tave ( IOobject ( "Tave", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); Info<< "Reading field WTA\n" << endl; // the value o f<w'T'>. volScalarField WTA ( IOobject ( "WTA", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); 2. in my solver of *.C file, I add the following: int main(int argc, char *argv[]) { ................... ................... int nCounter = 0; Info<< "\nStarting time loop\n" << endl; while (runTime.loop()) { Info<< "Time = " << runTime.timeName() << nl << endl; nCounter++; // new added #include "readTimeControls.H" #include "readPISOControls.H" #include "CourantNo.H" #include "setDeltaT.H" #include "UEqn.H" #include "TEqn.H" #include "CEqn.H" //  PISO loop for (int corr=0; corr<nCorr; corr++) { #include "pEqn.H" } turbulence>correct(); Wave = (Wave*(nCounter1)+U.component(2))/nCounter; Tave = (Tave*(nCounter1)+T)/nCounter; WTA = (WTA*(nCounter1)+(U.component(2)Wave)*(TTave))/nCounter; runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; } Info<< "End\n" << endl; return 0; } I can get my result. but I think this is not smart. Because the definition of so many field variables will consume a lot of memory. And I think if I use functionObject " fieldAverage" in the same time, I don't need to calculate the average value Wave and Tave, because fieldAvegare already do this , but How can I use this average value from fieldAverage ? Who can give me some suggestions ? Thanks . 
1) I added these few lines at the end of the creatFields.H file of the solver:[/B]
Info<< "Reading field UT\n" << endl; volVectorField UT ( IOobject ( "UT", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); 2) Then added this line to the buoyantPimpleFoam.C file UT = thermo.T()*U; just after the two lines #include "UEqn.H" #include "EEqn.H" 3) Make a file for "UT" in the "0" directory with proper (calculated) initial and boundary conditions and dimensions (0 1 1 1 0 0 0) 4) Now OpenFOAM knows "UT" and you can add it to the filedAverage items in the ControlDict file: functions { fieldAverage1 { type fieldAverage; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; outputControl outputTime; fields ( U { mean on; prime2Mean on; base time; } p { mean on; prime2Mean on; base time; } T { mean on; prime2Mean on; base time; } UT { mean on; prime2Mean on; base time; } ); } } 
All times are GMT 4. The time now is 17:51. 