Commit f2a1f31f authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: Updated reading of dimensioned types from transportProperties dictionary...

ENH: Updated reading of dimensioned types from transportProperties dictionary to avoid the need to provide the dimension set
parent 50ab263c
Info<< "Reading field T\n" << endl;
Info<< "Reading field T\n" << endl;
volScalarField T
volScalarField T
(
IOobject
(
IOobject
(
"T",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
"T",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading transportProperties\n" << endl;
Info<< "Reading transportProperties\n" << endl;
IOdictionary transportProperties
IOdictionary transportProperties
(
IOobject
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
Info<< "Reading diffusivity DT\n" << endl;
Info<< "Reading diffusivity DT\n" << endl;
dimensionedScalar DT
(
transportProperties.lookup("DT")
);
dimensionedScalar DT
(
"DT",
dimArea/dimTime,
transportProperties
);
Info<< "Reading field T\n" << endl;
Info<< "Reading field T\n" << endl;
volScalarField T
volScalarField T
(
IOobject
(
IOobject
(
"T",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
"T",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field U\n" << endl;
Info<< "Reading field U\n" << endl;
volVectorField U
volVectorField U
(
IOobject
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading transportProperties\n" << endl;
Info<< "Reading transportProperties\n" << endl;
IOdictionary transportProperties
IOdictionary transportProperties
(
IOobject
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
Info<< "Reading diffusivity DT\n" << endl;
Info<< "Reading diffusivity DT\n" << endl;
dimensionedScalar DT
(
transportProperties.lookup("DT")
);
dimensionedScalar DT
(
"DT",
dimArea/dimTime,
transportProperties
);
#include "createPhi.H"
#include "createPhi.H"
Info<< "Reading thermodynamicProperties\n" << endl;
Info<< "Reading thermodynamicProperties\n" << endl;
IOdictionary thermodynamicProperties
IOdictionary thermodynamicProperties
(
IOobject
(
IOobject
(
"thermodynamicProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
"thermodynamicProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
dimensionedScalar rho0
(
"rho0",
dimDensity,
thermodynamicProperties
);
dimensionedScalar rho0
(
"rho0",
dimDensity,
thermodynamicProperties
);
dimensionedScalar p0
(
"p0",
dimPressure,
thermodynamicProperties
);
dimensionedScalar p0
(
"p0",
dimPressure,
thermodynamicProperties
);
dimensionedScalar psi
(
"psi",
dimCompressibility,
thermodynamicProperties
);
dimensionedScalar psi
(
"psi",
dimCompressibility,
thermodynamicProperties
);
// Density offset, i.e. the constant part of the density
dimensionedScalar rhoO("rhoO", rho0 - psi*p0);
// Density offset, i.e. the constant part of the density
dimensionedScalar rhoO("rhoO", rho0 - psi*p0);
......@@ -93,8 +93,6 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.timeName() << nl << endl;
laminarTransport.lookup("lambda") >> lambda;
//alpha +=
// mesh.relaxationFactor("alpha")
// *(lambda*max(Ua & U, zeroSensitivity) - alpha);
......
......@@ -89,8 +89,19 @@ autoPtr<incompressible::turbulenceModel> turbulence
dimensionedScalar zeroSensitivity("0", dimVelocity*dimVelocity, 0.0);
dimensionedScalar zeroAlpha("0", dimless/dimTime, 0.0);
dimensionedScalar lambda(laminarTransport.lookup("lambda"));
dimensionedScalar alphaMax(laminarTransport.lookup("alphaMax"));
dimensionedScalar lambda
(
"lambda",
dimTime/sqr(dimLength),
laminarTransport
);
dimensionedScalar alphaMax
(
"alphaMax",
dimless/dimTime,
laminarTransport
);
const labelList& inletCells = mesh.boundary()["inlet"].faceCells();
//const labelList& outletCells = mesh.boundary()["outlet"].faceCells();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment