Standard deviation for every time step
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); } ); /************************************************** **/ |
Quote:
Code:
variables ( But maybe I misunderstood your question |
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. |
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) |
All times are GMT -4. The time now is 22:51. |