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 "createTime.H"
|
||||
# include "createFluidMesh.H"
|
||||
# include "createMesh.H"
|
||||
# include "createSolidMesh.H"
|
||||
|
||||
pisoControl piso(mesh);
|
||||
simpleControl simpleSolid(solidMesh);
|
||||
|
||||
# include "readGravitationalAcceleration.H"
|
||||
# include "createFields.H"
|
||||
|
@ -72,7 +73,7 @@ int main(int argc, char *argv[])
|
|||
# include "CourantNo.H"
|
||||
# include "setDeltaT.H"
|
||||
|
||||
// Detach patches
|
||||
// Detach coupled CHT patches
|
||||
# include "detachPatches.H"
|
||||
|
||||
# include "UEqn.H"
|
||||
|
@ -99,7 +100,7 @@ int main(int argc, char *argv[])
|
|||
rhoCpsolid.oldTime();
|
||||
rhoCpsolid = solidThermo.rho()*solidThermo.C();
|
||||
|
||||
// Coupled patches
|
||||
// Attached coupled CHT patches
|
||||
# include "attachPatches.H"
|
||||
|
||||
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())
|
||||
{
|
||||
coupledFvScalarMatrix TEqns(2);
|
||||
|
||||
// Fluid side
|
||||
fvScalarMatrix* TFluidEqn = new fvScalarMatrix
|
||||
(
|
||||
rho*Cp*
|
||||
|
@ -20,6 +18,7 @@
|
|||
+ 3.0*radiation->Rp()*pow4(T)
|
||||
);
|
||||
|
||||
// Solid side
|
||||
fvScalarMatrix* TSolidEqn = new fvScalarMatrix
|
||||
(
|
||||
fvm::ddt(rhoCpsolid, Tsolid)
|
||||
|
|
|
@ -46,10 +46,11 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createFluidMesh.H"
|
||||
# include "createMesh.H"
|
||||
# include "createSolidMesh.H"
|
||||
|
||||
simpleControl simple(mesh);
|
||||
simpleControl simpleSolid(solidMesh);
|
||||
|
||||
# include "readGravitationalAcceleration.H"
|
||||
# include "createFields.H"
|
||||
|
@ -64,7 +65,7 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
// Detach patches
|
||||
// Detach coupled CHT patches
|
||||
# include "detachPatches.H"
|
||||
|
||||
p_rgh.storePrevIter();
|
||||
|
@ -75,16 +76,17 @@ int main(int argc, char *argv[])
|
|||
// Update turbulent quantities
|
||||
turbulence->correct();
|
||||
|
||||
// Correct radiation
|
||||
radiation->correct();
|
||||
|
||||
// Update thermal conductivity in the fluid
|
||||
// Update thermal diffusivity in the fluid
|
||||
kappaEff = rho*Cp*(turbulence->nu()/Pr + turbulence->nut()/Prt);
|
||||
|
||||
// Update thermal conductivity in the solid
|
||||
solidThermo.correct();
|
||||
kSolid = solidThermo.k();
|
||||
|
||||
// Coupled patches
|
||||
// Attached coupled CHT patches
|
||||
# include "attachPatches.H"
|
||||
|
||||
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())
|
||||
{
|
||||
coupledFvScalarMatrix TEqns(2);
|
||||
|
||||
// Fluid side
|
||||
fvScalarMatrix* TFluidEqn = new fvScalarMatrix
|
||||
(
|
||||
rho*Cp*
|
||||
|
@ -22,6 +20,7 @@
|
|||
|
||||
TFluidEqn->relax();
|
||||
|
||||
// Solid side
|
||||
fvScalarMatrix* TSolidEqn = new fvScalarMatrix
|
||||
(
|
||||
- fvm::laplacian(kSolidf, Tsolid, "laplacian(k,T)")
|
||||
|
|
Reference in a new issue