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
|
IOobject
|
||||||
(
|
(
|
||||||
"transportProperties",
|
"DT",
|
||||||
runTime.constant(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ_IF_MODIFIED,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::NO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
)
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar(dimViscosity, Zero)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!DT.headerOk())
|
||||||
Info<< "Reading diffusivity DT\n" << endl;
|
{
|
||||||
|
IOdictionary transportProperties
|
||||||
dimensionedScalar DT("DT", dimViscosity, transportProperties);
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"transportProperties",
|
||||||
|
runTime.constant(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ_IF_MODIFIED,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
)
|
||||||
|
);
|
||||||
|
DT = dimensionedScalar("DT", dimViscosity, transportProperties);
|
||||||
|
}
|
||||||
|
|
||||||
#include "createFvOptions.H"
|
#include "createFvOptions.H"
|
||||||
|
|||||||
@ -41,6 +41,18 @@
|
|||||||
gradT.component(vector::Z)
|
gradT.component(vector::Z)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
volVectorField DTgradT
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"flux",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
DT*gradT
|
||||||
|
);
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user