|
[Sponsors] |
April 18, 2012, 06:29 |
Standard deviation for every time step
|
#1 |
New Member
shyam prasad
Join Date: Mar 2009
Posts: 25
Rep Power: 17 |
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(xi-xmean)^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((T-0.0220541),2))"; accumulations (sum); } ); /************************************************** **/ |
|
April 18, 2012, 20:05 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Code:
variables ( "Tmean=average(T);" ); expression "pow((T-Tmean),2)"; accumulations (average); But maybe I misunderstood your question |
||
April 19, 2012, 01:45 |
|
#3 |
New Member
shyam prasad
Join Date: Mar 2009
Posts: 25
Rep Power: 17 |
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((T-0.0220541),2))"; accumulations (sum); } ); I want to use the above sum as below sd = pow(sum,0.5)/no. of cells. |
|
April 19, 2012, 08:39 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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) |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
High Courant Number @ icoFoam | Artex85 | OpenFOAM Running, Solving & CFD | 11 | February 16, 2017 14:40 |
Hydrostatic Pressure and Gravity | miliante | OpenFOAM Running, Solving & CFD | 132 | October 7, 2012 23:50 |
Problem with FloatingObject | Leech | OpenFOAM Running, Solving & CFD | 10 | March 29, 2012 16:24 |
Intermediate step during a time step | Burn | OpenFOAM | 0 | July 16, 2009 11:01 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 19:07 |