mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: modified laplacianFoam to use dimScalar or volScalar for DT (#1388)
This commit is contained in:
@ -14,23 +14,36 @@ volScalarField T
|
||||
);
|
||||
|
||||
|
||||
Info<< "Reading transportProperties\n" << endl;
|
||||
Info<< "Reading diffusivity DT\n" << endl;
|
||||
|
||||
IOdictionary transportProperties
|
||||
volScalarField DT
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
runTime.constant(),
|
||||
"DT",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dimViscosity, Zero)
|
||||
);
|
||||
|
||||
|
||||
Info<< "Reading diffusivity DT\n" << endl;
|
||||
|
||||
dimensionedScalar DT("DT", dimViscosity, transportProperties);
|
||||
if (!DT.headerOk())
|
||||
{
|
||||
IOdictionary transportProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
DT = dimensionedScalar("DT", dimViscosity, transportProperties);
|
||||
}
|
||||
|
||||
#include "createFvOptions.H"
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user