
[Sponsors] 
April 18, 2012, 05:29 
Standard deviation for every time step

#1 
New Member
shyam prasad
Join Date: Mar 2009
Posts: 25
Rep Power: 9 
Dear Foamers,
I would like to track the standard deviation of a tracer in the domain with respect to time. The following is what I have appended in the controlDict to get the sum(xixmean)^2. Later I can manipulate this using excel or python to evaluate the standard deviation. Is there any way I can obtain standard deviation in the function objects itself. /***********************************************/ libs ( "libOpenFOAM.so" // keeps paraFoam happy "libtwoPhaseInterfaceProperties.so" "libinterfaceProperties.so" "libsimpleSwakFunctionObjects.so" "libswakFunctionObjects.so" ); functions ( deviation { type swakExpression; valueType internalField; verbose true; expression "(pow((T0.0220541),2))"; accumulations (sum); } ); /************************************************** **/ 

April 18, 2012, 19:05 

#2  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,953
Rep Power: 41 
Quote:
Code:
variables ( "Tmean=average(T);" ); expression "pow((TTmean),2)"; accumulations (average); But maybe I misunderstood your question 

April 19, 2012, 00:45 

#3 
New Member
shyam prasad
Join Date: Mar 2009
Posts: 25
Rep Power: 9 
Thanks Bernhard,
Would like to thank you for making swak4Foam available for the openfoam community. functions ( deviation { type swakExpression; valueType internalField; verbose true; expression "(pow((T0.0220541),2))"; accumulations (sum); } ); I want to use the above sum as below sd = pow(sum,0.5)/no. of cells. 

April 19, 2012, 07:39 

#4  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,953
Rep Power: 41 
Quote:
As I said in the other posting: arithmetic mean only makes sense if all cells are of the same size (otherwise tiny cells have the same "influence" as big cells) 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Hydrostatic Pressure and Gravity  miliante  OpenFOAM Running, Solving & CFD  132  October 7, 2012 22:50 
Problem with FloatingObject  Leech  OpenFOAM Running, Solving & CFD  10  March 29, 2012 15:24 
High Courant Number @ icoFoam  Artex85  OpenFOAM Running, Solving & CFD  9  January 3, 2012 09:06 
Intermediate step during a time step  Burn  OpenFOAM  0  July 16, 2009 10:01 
Could anybody help me see this error and give help  liugx212  OpenFOAM Running, Solving & CFD  3  January 4, 2006 19:07 