Commit 55ed74eb authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: Added include file to calculate the mechanical energy

parent 954123ce
......@@ -69,8 +69,7 @@ volScalarField dpdt
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
);
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));
#include "createK.H"
#include "createMRF.H"
......
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));
if (U.nOldTimes())
{
volVectorField* Uold = &U.oldTime();
volScalarField* Kold = &K.oldTime();
*Kold == 0.5*magSqr(*Uold);
while (Uold->nOldTimes())
{
Uold = &Uold->oldTime();
Kold = &Kold->oldTime();
*Kold == 0.5*magSqr(*Uold);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment