ENH: modified laplacianFoam to use dimScalar or volScalar for DT (#1388)

This commit is contained in:
sergio
2019-10-07 12:59:39 -07:00
committed by Mark Olesen
parent 01b4519f27
commit d04de0d481
2 changed files with 36 additions and 11 deletions

View File

@ -14,8 +14,24 @@ volScalarField T
);
Info<< "Reading transportProperties\n" << endl;
Info<< "Reading diffusivity DT\n" << endl;
volScalarField DT
(
IOobject
(
"DT",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(dimViscosity, Zero)
);
if (!DT.headerOk())
{
IOdictionary transportProperties
(
IOobject
@ -27,10 +43,7 @@ IOdictionary transportProperties
IOobject::NO_WRITE
)
);
Info<< "Reading diffusivity DT\n" << endl;
dimensionedScalar DT("DT", dimViscosity, transportProperties);
DT = dimensionedScalar("DT", dimViscosity, transportProperties);
}
#include "createFvOptions.H"

View File

@ -41,6 +41,18 @@
gradT.component(vector::Z)
);
volVectorField DTgradT
(
IOobject
(
"flux",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
DT*gradT
);
runTime.write();
}