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/conjugateHeatSimpleFoam/solveEnergy.H
2016-04-20 12:55:08 +01:00

41 lines
953 B
C

{
// Solid side
# include "readSolidControls.H"
for (int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++)
{
coupledFvScalarMatrix TEqns(2);
fvScalarMatrix* TFluidEqn = new fvScalarMatrix
(
rho*Cp*
(
fvm::div(phi, T)
+ fvm::SuSp(-fvc::div(phi), T)
)
- fvm::laplacian(kappaEff, T)
==
radiation->Ru()
- fvm::Sp(4.0*radiation->Rp()*pow3(T), T)
+ 3.0*radiation->Rp()*pow4(T)
);
TFluidEqn->relax();
fvScalarMatrix* TSolidEqn = new fvScalarMatrix
(
- fvm::laplacian(kSolidf, Tsolid, "laplacian(k,T)")
+ fvm::SuSp(-solidThermo.S()/Tsolid, Tsolid)
);
TSolidEqn->relax();
// Add fluid equation
TEqns.set(0, TFluidEqn);
// Add solid equation
TEqns.set(1, TSolidEqn);
TEqns.solve();
}
}