CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   How to calc time devirative of a scalar (

chris1980 June 23, 2006 04:42

I want to do a volume average
I want to do a volume average of volScalarField and from this scalar I want to calc the time devirative.

I have tried:

scalar dpmdt = ddt(p.weightedAverage(mesh.V()).value());

but the ddt function does not allow a scalar argument.

How can I do this?

hjasak June 23, 2006 13:50

Basically, by hand: store seve
Basically, by hand: store several scalars and calculate the ddt directly from their values. A scalar variable is just a float (or a double) and it does not record its own history.


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