CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

How to calc time devirative of a scalar

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 23, 2006, 05:42
Default I want to do a volume average
  #1
Member
 
chris book
Join Date: Mar 2009
Posts: 85
Rep Power: 17
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, 14:50
Default Basically, by hand: store seve
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
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.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Reply


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 Off
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 20: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 10:12.