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/solveEnergy.H
2018-06-18 10:53:43 +01:00

37 lines
892 B
C++

{
while (simpleSolid.correctNonOrthogonal())
{
coupledFvScalarMatrix TEqns(2);
// Fluid side
fvScalarMatrix* TFluidEqn = new fvScalarMatrix
(
rho*Cp*
(
fvm::ddt(T)
+ fvm::div(phi, T)
)
- fvm::laplacian(kappaEff, T)
==
radiation->Ru()
- fvm::Sp(4.0*radiation->Rp()*pow3(T), T)
+ 3.0*radiation->Rp()*pow4(T)
);
// Solid side
fvScalarMatrix* TSolidEqn = new fvScalarMatrix
(
fvm::ddt(rhoCpsolid, Tsolid)
- fvm::laplacian(ksolidf, Tsolid, "laplacian(k,T)")
+ fvm::SuSp(-solidThermo.S()/Tsolid, Tsolid)
);
// Add fluid equation
TEqns.set(0, TFluidEqn);
// Add solid equation
TEqns.set(1, TSolidEqn);
TEqns.solve();
}
}