|
[Sponsors] |
November 18, 2011, 17:49 |
Get output of time derivative
|
#1 |
Senior Member
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18 |
Dear Foamers,
I would like to know, if we can get the time derivative of a variable as the output. For instance, if I am solving the transient Navier Stokes, is it possible to get the acceleration (du/dt) too at every time step as an output. Kindly let me know. Regards Vishal Nandigana |
|
November 20, 2011, 21:47 |
|
#2 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
Use fvc::ddt(yourField) to store it in a volField of the same type of your field. Setting the IOobject to AUTO_WRITE will have the time derivative stored.
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
November 21, 2011, 12:45 |
|
#3 |
Senior Member
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18 |
Thanks Alberto. It worked well.
|
|
March 14, 2012, 13:53 |
|
#4 |
Senior Member
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 17 |
Hi,
how can i get the same in a postprocessing? If i use this code: read U read rho volVectorField ddt ( IOobject ( "ddt", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), fvc::ddt(rho,U) ); ddt.write() it returns always zero. best andrea |
|
March 14, 2012, 14:04 |
|
#5 | |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
Quote:
a) declare the field as you did in createFields.H b) add the line Code:
ddt == fvc::ddt(rho,U); Best,
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Extrusion with OpenFoam problem No. Iterations 0 | Lord Kelvin | OpenFOAM Running, Solving & CFD | 8 | March 28, 2016 12:08 |
lift and drag on ship superstructures | vaina74 | OpenFOAM Running, Solving & CFD | 3 | June 8, 2010 13:30 |
ForcesCoeffs | ronaldo | OpenFOAM | 4 | September 14, 2009 08:11 |
Time derivative in transiente run | Antonio Lopes | CFX | 2 | January 12, 2008 12:03 |
How to output variables every time step? | Dazhi Guo | FLUENT | 4 | January 16, 2001 12:17 |