diff --git a/applications/solvers/basic/laplacianFoam/createFields.H b/applications/solvers/basic/laplacianFoam/createFields.H index 616afe1a885d3324aec5389b820e90edfd105db6..7056505e9928a5f5273addf0739ca64f836e3619 100644 --- a/applications/solvers/basic/laplacianFoam/createFields.H +++ b/applications/solvers/basic/laplacianFoam/createFields.H @@ -1,37 +1,39 @@ - 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 +); diff --git a/applications/solvers/basic/scalarTransportFoam/createFields.H b/applications/solvers/basic/scalarTransportFoam/createFields.H index c6ba83629ba6e7dff1b18f1c9632d22d64cd2b8c..54dcb3fca52260004cf02be1bf3c31d6a68a574b 100644 --- a/applications/solvers/basic/scalarTransportFoam/createFields.H +++ b/applications/solvers/basic/scalarTransportFoam/createFields.H @@ -1,55 +1,57 @@ - 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" diff --git a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/readThermodynamicProperties.H b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/readThermodynamicProperties.H index 82ebe7ae30f210d690ff15e035f31e9040d14543..8f420d91c691c7fe7459a237dfca2219bf609985 100644 --- a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/readThermodynamicProperties.H +++ b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/readThermodynamicProperties.H @@ -1,37 +1,37 @@ - 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); diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C index ccbe3b814160f1b25d9659d3061bfdef4be03f21..7296a8cb37b5e83b70ac4e1a315b7c53ce1977ab 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C @@ -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); diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H index 93da72123d65d759c4b0b5f94652471b1d6b4925..bba352e71c9a14b1408f19accdbe888971e8430a 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H @@ -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();