Changed the constructor for pd to MUST_READ.

Calculate p from pd (note p is still read in by the termo package) and correct thermo.
This commit is contained in:
h.weller@opencfd.co.uk 2008-06-27 12:42:22 +01:00 committed by graham
parent 31b83d862b
commit 3eea88674a
5 changed files with 24 additions and 12 deletions

View File

@ -67,10 +67,14 @@
(
"pd",
runTime.timeName(),
mesh
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
p - rho*gh - pRef,
p.boundaryField().types()
mesh
);
p = pd + rho*gh + pRef;
thermo->correct();
dimensionedScalar initialMass = fvc::domainIntegrate(rho);

View File

@ -64,12 +64,16 @@
(
"pd",
runTime.timeName(),
mesh
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
p - rho*gh - pRef,
p.boundaryField().types()
mesh
);
p = pd + rho*gh + pRef;
thermo->correct();
label pdRefCell = 0;
scalar pdRefValue = 0.0;

View File

@ -65,12 +65,16 @@
(
"pd",
runTime.timeName(),
mesh
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
p - rho*gh - pRef,
p.boundaryField().types()
mesh
);
p = pd + rho*gh + pRef;
thermo->correct();
label pdRefCell = 0;
scalar pdRefValue = 0.0;

View File

@ -173,7 +173,7 @@
Info<< " Updating p from pd\n" << endl;
thermof[i].p() == pdf[i] + rhof[i]*ghf[i] + pRef;
thermof[i].correct();
initialMassf[i] = fvc::domainIntegrate(rhof[i]).value();
}

View File

@ -37,7 +37,7 @@
mesh
);
# include "compressibleCreatePhi.H"
#include "compressibleCreatePhi.H"
Info<< "Creating turbulence model\n" << endl;
@ -69,7 +69,7 @@
mesh
);
//pd = p - rho*gh - pRef;
p = pd + rho*gh + pRef;
thermo->correct();
dimensionedScalar initialMass = fvc::domainIntegrate(rho);