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

BUG: thermoFoam - corrected to enable restart and post-processing using...

BUG: thermoFoam - corrected to enable restart and post-processing using thermoFoam -postProcess.  Fixes #598
parent c6208c52
Branches
Tags
No related merge requests found
...@@ -15,12 +15,16 @@ ...@@ -15,12 +15,16 @@
) )
: -dpdt : -dpdt
) )
- fvm::laplacian(alphaEff, he)
== ==
radiation->Sh(thermo, he) radiation->Sh(thermo, he)
+ fvOptions(rho, he) + fvOptions(rho, he)
); );
if (turbulence.valid())
{
EEqn -= fvm::laplacian(turbulence->alphaEff(), he);
}
EEqn.relax(); EEqn.relax();
fvOptions.constrain(EEqn); fvOptions.constrain(EEqn);
......
...@@ -35,7 +35,31 @@ volVectorField U ...@@ -35,7 +35,31 @@ volVectorField U
#include "compressibleCreatePhi.H" #include "compressibleCreatePhi.H"
#include "setAlphaEff.H" autoPtr<compressible::turbulenceModel> turbulence;
IOobject turbulencePropertiesHeader
(
"turbulenceProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
);
if (turbulencePropertiesHeader.typeHeaderOk<IOdictionary>(false))
{
Info<< "Creating turbulence model\n" << endl;
turbulence =
compressible::turbulenceModel::New
(
rho,
U,
phi,
thermo
);
}
#include "createDpdt.H" #include "createDpdt.H"
......
Info<< "Creating turbulence model\n" << endl;
tmp<volScalarField> talphaEff;
IOobject turbulencePropertiesHeader
(
"turbulenceProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
);
if (turbulencePropertiesHeader.typeHeaderOk<IOdictionary>(false))
{
autoPtr<compressible::turbulenceModel> turbulence
(
compressible::turbulenceModel::New
(
rho,
U,
phi,
thermo
)
);
talphaEff = turbulence->alphaEff();
}
else
{
talphaEff = tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"alphaEff",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("0", dimMass/dimLength/dimTime, 0.0)
)
);
}
...@@ -54,8 +54,6 @@ int main(int argc, char *argv[]) ...@@ -54,8 +54,6 @@ int main(int argc, char *argv[])
#include "createFields.H" #include "createFields.H"
#include "createFvOptions.H" #include "createFvOptions.H"
const volScalarField& alphaEff = talphaEff();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nEvolving thermodynamics\n" << endl; Info<< "\nEvolving thermodynamics\n" << endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment