CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Running, Solving & CFD

How to calc time devirative of a scalar

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   June 23, 2006, 04:42
Default I want to do a volume average
chris book
Join Date: Mar 2009
Posts: 85
Rep Power: 10
chris1980 is on a distinguished road
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?
chris1980 is offline   Reply With Quote

Old   June 23, 2006, 13:50
Default Basically, by hand: store seve
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,806
Rep Power: 25
hjasak will become famous soon enough
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.

Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting:
hjasak is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
IS calc. with 2nd order discret. always necessary? Azman FLUENT 2 March 14, 2013 05:28
the derivative of Scalar on time ? owen FLUENT 0 March 5, 2009 05:59
The Time dependent Scalar-Transport Equation Michail Main CFD Forum 0 April 26, 2004 19:07
Can someone help me calc. flow through this???? Todd Main CFD Forum 3 January 17, 2002 09:35
calc time Andrew Parker FLUENT 4 November 29, 2001 06:10

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