mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
dimensioned<Type>: Added constructor from name, dimensions and dictionary
to simplify construction of dimensionedScalar properties and avoid the duplication of the name string in the constructor call.
This commit is contained in:
@ -14,22 +14,30 @@ IOdictionary transportProperties
|
||||
|
||||
dimensionedScalar rho
|
||||
(
|
||||
transportProperties.lookup("rho")
|
||||
"rho",
|
||||
dimDensity,
|
||||
transportProperties
|
||||
);
|
||||
|
||||
dimensionedScalar nu
|
||||
(
|
||||
transportProperties.lookup("nu")
|
||||
"nu",
|
||||
dimViscosity,
|
||||
transportProperties
|
||||
);
|
||||
|
||||
dimensionedScalar mu
|
||||
(
|
||||
transportProperties.lookup("mu")
|
||||
"mu",
|
||||
dimensionSet(1, 1, -2, 0, 0, -2, 0),
|
||||
transportProperties
|
||||
);
|
||||
|
||||
dimensionedScalar sigma
|
||||
(
|
||||
transportProperties.lookup("sigma")
|
||||
"sigma",
|
||||
dimensionSet(-1, -3, 3, 0, 0, 2, 0),
|
||||
transportProperties
|
||||
);
|
||||
|
||||
Info<< "Reading field p\n" << endl;
|
||||
|
||||
Reference in New Issue
Block a user