This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/solvers/coupled/conjugateHeatFoam/createFields.H

108 lines
2.2 KiB
C++
Raw Normal View History

Info<< "Reading transportProperties\n" << endl;
IOdictionary transportProperties
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);
2013-07-17 13:57:27 +00:00
Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());
surfaceScalarField ghf("ghf", g & mesh.Cf());
2013-07-17 13:57:27 +00:00
Info<< "Reading field p_rgh\n" << endl;
volScalarField p_rgh
(
IOobject
(
2013-07-17 13:57:27 +00:00
"p_rgh",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field T\n" << endl;
volScalarField T
(
IOobject
(
"T",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
# include "createPhi.H"
2013-07-17 13:57:27 +00:00
# include "readTransportProperties.H"
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p_rgh, piso.dict(), pRefCell, pRefValue);
mesh.schemesDict().setFluxRequired(p_rgh.name());
2013-07-17 13:57:27 +00:00
autoPtr<incompressible::RASModel> turbulence
(
incompressible::RASModel::New(U, phi, laminarTransport)
);
2013-07-17 13:57:27 +00:00
# include "attachPatches.H"
Info<< "Reading field kappaEff\n" << endl;
volScalarField kappaEff
(
IOobject
(
2013-07-17 13:57:27 +00:00
"kappaEff",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
2013-07-17 13:57:27 +00:00
// Kinematic density for buoyancy force
volScalarField rhok
(
IOobject
(
"rhok",
runTime.timeName(),
mesh
),
1.0 - beta*(T - TRef)
);
Info<< "Creating radiation model\n" << endl;
autoPtr<radiation::radiationModel> radiation
(
radiation::radiationModel::New(T)
);