|August 27, 2010, 10:05||
Adding a term that includes time
Join Date: May 2009
Posts: 16Rep Power: 9
A very simple question: In OpenFOAM, how can I add a term that includes time into my equations?
My first attempt which doesn't work is as follows:
Thanks for any comments,
|August 27, 2010, 10:23||
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,702Rep Power: 27
time() is not a known object, so use runTime.time().value() instead. The "value()" request is given as it strips off the dimensionality of the given time and merely returns a scalar. This is needed as exp() does not know how to handle dimensionedScalar.
Further you need to do "A * Foam::exp(- runTime.time().value())", where A is a dimensionedScalar A("null", dims , 1), where dims is the dimensions of ddt(T). If this is not added you will get an error while running the program due to the dimensional checking functionality, however the program will compile.
Instead of dims you could e.g. do "dimensionSet( 0, 1, -1, 0, 0, 0, 0)" which sets the dimensions to those of velocity.
Have a nice weekend,
|Thread||Thread Starter||Forum||Replies||Last Post|
|Superlinear speedup in OpenFOAM 13||msrinath80||OpenFOAM Running, Solving & CFD||18||March 3, 2015 06:36|
|Floating point exception error||Alan||OpenFOAM Running, Solving & CFD||10||April 6, 2012 14:02|
|Convective term evaluated at time n+1/2||Lionel S.||Main CFD Forum||0||February 12, 2007 15:22|
|Could anybody help me see this error and give help||liugx212||OpenFOAM Running, Solving & CFD||3||January 4, 2006 19:07|
|unsteady calcs in FLUENT||Sanjay Padhiar||Main CFD Forum||1||March 31, 1999 12:32|