Skip to content
Snippets Groups Projects
Commit 86c10e5d authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: Updated pressure-work term creation for moving meshes

parent 5db2f67a
No related branches found
No related tags found
1 merge request!121Merge develop into master for v1706 release
...@@ -40,6 +40,8 @@ SourceFiles ...@@ -40,6 +40,8 @@ SourceFiles
#include "autoPtr.H" #include "autoPtr.H"
#include "runTimeSelectionTables.H" #include "runTimeSelectionTables.H"
#define MOVING_MESH
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
......
...@@ -40,6 +40,8 @@ SourceFiles ...@@ -40,6 +40,8 @@ SourceFiles
#include "autoPtr.H" #include "autoPtr.H"
#include "runTimeSelectionTables.H" #include "runTimeSelectionTables.H"
#define MOVING_MESH
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
......
Info<< "Creating field dpdt\n" << endl; #if defined(MOVING_MESH)
volScalarField dpdt Info<< "Creating field dpdt for moving meshes\n" << endl;
(
IOobject // Note: set to read if present and auto write to simplify dpdt correction
// by meshPhi
volScalarField dpdt
(
IOobject
(
"dpdt",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
fvc::ddt(p)
);
#else
Info<< "Creating field dpdt\n" << endl;
volScalarField dpdt
( (
"dpdt", IOobject
runTime.timeName(), (
mesh, "dpdt",
IOobject::NO_READ, runTime.timeName(),
IOobject::NO_WRITE mesh,
), IOobject::NO_READ,
fvc::ddt(p) IOobject::NO_WRITE
); ),
fvc::ddt(p)
);
#endif
if (!thermo.dpdt()) if (!thermo.dpdt())
{ {
dpdt == dimensionedScalar("0", dpdt.dimensions(), 0); dpdt == dimensionedScalar("0", dpdt.dimensions(), 0);
dpdt.writeOpt() = IOobject::NO_WRITE;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment