Clean-up of conjugate heat solvers
This commit is contained in:
parent
9a8309a47c
commit
9b72c7e972
6 changed files with 14 additions and 39 deletions
|
@ -47,10 +47,11 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
# include "createFluidMesh.H"
|
# include "createMesh.H"
|
||||||
# include "createSolidMesh.H"
|
# include "createSolidMesh.H"
|
||||||
|
|
||||||
pisoControl piso(mesh);
|
pisoControl piso(mesh);
|
||||||
|
simpleControl simpleSolid(solidMesh);
|
||||||
|
|
||||||
# include "readGravitationalAcceleration.H"
|
# include "readGravitationalAcceleration.H"
|
||||||
# include "createFields.H"
|
# include "createFields.H"
|
||||||
|
@ -72,7 +73,7 @@ int main(int argc, char *argv[])
|
||||||
# include "CourantNo.H"
|
# include "CourantNo.H"
|
||||||
# include "setDeltaT.H"
|
# include "setDeltaT.H"
|
||||||
|
|
||||||
// Detach patches
|
// Detach coupled CHT patches
|
||||||
# include "detachPatches.H"
|
# include "detachPatches.H"
|
||||||
|
|
||||||
# include "UEqn.H"
|
# include "UEqn.H"
|
||||||
|
@ -99,7 +100,7 @@ int main(int argc, char *argv[])
|
||||||
rhoCpsolid.oldTime();
|
rhoCpsolid.oldTime();
|
||||||
rhoCpsolid = solidThermo.rho()*solidThermo.C();
|
rhoCpsolid = solidThermo.rho()*solidThermo.C();
|
||||||
|
|
||||||
// Coupled patches
|
// Attached coupled CHT patches
|
||||||
# include "attachPatches.H"
|
# include "attachPatches.H"
|
||||||
|
|
||||||
kappaEff.correctBoundaryConditions();
|
kappaEff.correctBoundaryConditions();
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
Info<< "Create mesh for time = "
|
|
||||||
<< runTime.timeName() << nl << endl;
|
|
||||||
|
|
||||||
fvMesh mesh
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
fvMesh::defaultRegion,
|
|
||||||
runTime.timeName(),
|
|
||||||
runTime,
|
|
||||||
IOobject::MUST_READ
|
|
||||||
)
|
|
||||||
);
|
|
|
@ -1,11 +1,9 @@
|
||||||
{
|
{
|
||||||
// Solid side
|
|
||||||
simpleControl simpleSolid(solidMesh);
|
|
||||||
|
|
||||||
while (simpleSolid.correctNonOrthogonal())
|
while (simpleSolid.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
coupledFvScalarMatrix TEqns(2);
|
coupledFvScalarMatrix TEqns(2);
|
||||||
|
|
||||||
|
// Fluid side
|
||||||
fvScalarMatrix* TFluidEqn = new fvScalarMatrix
|
fvScalarMatrix* TFluidEqn = new fvScalarMatrix
|
||||||
(
|
(
|
||||||
rho*Cp*
|
rho*Cp*
|
||||||
|
@ -20,6 +18,7 @@
|
||||||
+ 3.0*radiation->Rp()*pow4(T)
|
+ 3.0*radiation->Rp()*pow4(T)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Solid side
|
||||||
fvScalarMatrix* TSolidEqn = new fvScalarMatrix
|
fvScalarMatrix* TSolidEqn = new fvScalarMatrix
|
||||||
(
|
(
|
||||||
fvm::ddt(rhoCpsolid, Tsolid)
|
fvm::ddt(rhoCpsolid, Tsolid)
|
||||||
|
|
|
@ -46,10 +46,11 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
# include "createFluidMesh.H"
|
# include "createMesh.H"
|
||||||
# include "createSolidMesh.H"
|
# include "createSolidMesh.H"
|
||||||
|
|
||||||
simpleControl simple(mesh);
|
simpleControl simple(mesh);
|
||||||
|
simpleControl simpleSolid(solidMesh);
|
||||||
|
|
||||||
# include "readGravitationalAcceleration.H"
|
# include "readGravitationalAcceleration.H"
|
||||||
# include "createFields.H"
|
# include "createFields.H"
|
||||||
|
@ -64,7 +65,7 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
// Detach patches
|
// Detach coupled CHT patches
|
||||||
# include "detachPatches.H"
|
# include "detachPatches.H"
|
||||||
|
|
||||||
p_rgh.storePrevIter();
|
p_rgh.storePrevIter();
|
||||||
|
@ -75,16 +76,17 @@ int main(int argc, char *argv[])
|
||||||
// Update turbulent quantities
|
// Update turbulent quantities
|
||||||
turbulence->correct();
|
turbulence->correct();
|
||||||
|
|
||||||
|
// Correct radiation
|
||||||
radiation->correct();
|
radiation->correct();
|
||||||
|
|
||||||
// Update thermal conductivity in the fluid
|
// Update thermal diffusivity in the fluid
|
||||||
kappaEff = rho*Cp*(turbulence->nu()/Pr + turbulence->nut()/Prt);
|
kappaEff = rho*Cp*(turbulence->nu()/Pr + turbulence->nut()/Prt);
|
||||||
|
|
||||||
// Update thermal conductivity in the solid
|
// Update thermal conductivity in the solid
|
||||||
solidThermo.correct();
|
solidThermo.correct();
|
||||||
kSolid = solidThermo.k();
|
kSolid = solidThermo.k();
|
||||||
|
|
||||||
// Coupled patches
|
// Attached coupled CHT patches
|
||||||
# include "attachPatches.H"
|
# include "attachPatches.H"
|
||||||
|
|
||||||
kappaEff.correctBoundaryConditions();
|
kappaEff.correctBoundaryConditions();
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
Info<< "Create mesh for time = "
|
|
||||||
<< runTime.timeName() << nl << endl;
|
|
||||||
|
|
||||||
fvMesh mesh
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
fvMesh::defaultRegion,
|
|
||||||
runTime.timeName(),
|
|
||||||
runTime,
|
|
||||||
IOobject::MUST_READ
|
|
||||||
)
|
|
||||||
);
|
|
|
@ -1,11 +1,9 @@
|
||||||
{
|
{
|
||||||
// Solid side
|
|
||||||
simpleControl simpleSolid(solidMesh);
|
|
||||||
|
|
||||||
while (simpleSolid.correctNonOrthogonal())
|
while (simpleSolid.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
coupledFvScalarMatrix TEqns(2);
|
coupledFvScalarMatrix TEqns(2);
|
||||||
|
|
||||||
|
// Fluid side
|
||||||
fvScalarMatrix* TFluidEqn = new fvScalarMatrix
|
fvScalarMatrix* TFluidEqn = new fvScalarMatrix
|
||||||
(
|
(
|
||||||
rho*Cp*
|
rho*Cp*
|
||||||
|
@ -22,6 +20,7 @@
|
||||||
|
|
||||||
TFluidEqn->relax();
|
TFluidEqn->relax();
|
||||||
|
|
||||||
|
// Solid side
|
||||||
fvScalarMatrix* TSolidEqn = new fvScalarMatrix
|
fvScalarMatrix* TSolidEqn = new fvScalarMatrix
|
||||||
(
|
(
|
||||||
- fvm::laplacian(kSolidf, Tsolid, "laplacian(k,T)")
|
- fvm::laplacian(kSolidf, Tsolid, "laplacian(k,T)")
|
||||||
|
|
Reference in a new issue