CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Post-Processing (
-   -   foamCalc addSubtract (

jclement July 27, 2012 09:32

foamCalc addSubtract
Dear Foamers,

I am new to OpenFoam and would like to realize a substract between two vector fields.
I have tried to use foamCalc but without success:

"foamCalc addSubtract UL ULMean"Create time

Create mesh for time = 0

Invalid calcMode: ULMean
Valid calcModes are add and subtract

From function calcTypes::addSubtract::preCalc
in file basic/addSubtract/addSubtract.C at line 229.

FOAM exiting

If someone have a idea it would be great.

my goal is to calculate the RMS vorticity fluctuation,is somebody know how to do it?

thank you for your help!!

Bernhard July 30, 2012 02:21

The correct syntax would be something like

foamCalc addSubtract UL subtract -field ULmean -resultName ULfluct
or something like that.

A better way to calculate the RMS values, may be to use function objects during runtime:

jclement August 3, 2012 17:19

Thank you Bernard I have tried your second solution and it works.

All times are GMT -4. The time now is 08:08.