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/heatTransfer/chtMultiRegionSimpleFoam/solid/createSolidFields.H

92 lines
2.4 KiB
C
Raw Normal View History

2010-08-26 14:22:03 +00:00
// Initialise solid field pointer lists
PtrList<volScalarField> rhos(solidRegions.size());
PtrList<volScalarField> cps(solidRegions.size());
PtrList<volScalarField> rhosCps(solidRegions.size());
2015-08-05 11:34:57 +00:00
PtrList<volScalarField> Kappas(solidRegions.size());
2010-08-26 14:22:03 +00:00
PtrList<volScalarField> Ts(solidRegions.size());
// Populate solid field pointer lists
forAll(solidRegions, i)
{
Info<< "*** Reading solid mesh thermophysical properties for region "
<< solidRegions[i].name() << nl << endl;
Info<< " Adding to rhos\n" << endl;
rhos.set
(
i,
new volScalarField
(
IOobject
(
"rho",
runTime.timeName(),
solidRegions[i],
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
solidRegions[i]
)
);
Info<< " Adding to cps\n" << endl;
cps.set
(
i,
new volScalarField
(
IOobject
(
"cp",
runTime.timeName(),
solidRegions[i],
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
solidRegions[i]
)
);
rhosCps.set
(
i,
new volScalarField("rhosCps", rhos[i]*cps[i])
);
2015-08-05 11:34:57 +00:00
Info<< " Adding to Kappas\n" << endl;
Kappas.set
2010-08-26 14:22:03 +00:00
(
i,
new volScalarField
(
IOobject
(
2015-08-05 11:34:57 +00:00
"Kappa",
2010-08-26 14:22:03 +00:00
runTime.timeName(),
solidRegions[i],
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
solidRegions[i]
)
);
Info<< " Adding to Ts\n" << endl;
Ts.set
(
i,
new volScalarField
(
IOobject
(
"T",
runTime.timeName(),
solidRegions[i],
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
solidRegions[i]
)
);
}