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

46 lines
1.1 KiB
C
Raw Normal View History

{
// Solid side
# include "readSolidControls.H"
for (int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++)
{
coupledFvScalarMatrix TEqns(2);
2013-07-17 13:57:27 +00:00
fvScalarMatrix* TFluidEqn = new fvScalarMatrix
(
2013-07-17 13:57:27 +00:00
rho*Cp*
(
fvm::ddt(T)
+ fvm::div(phi, T)
)
2013-07-17 13:57:27 +00:00
- fvm::laplacian(kappaEff, T)
==
radiation->Ru()
- fvm::Sp(4.0*radiation->Rp()*pow3(T), T)
+ 3.0*radiation->Rp()*pow4(T)
);
2013-07-17 13:57:27 +00:00
//Done automatically in 1.6.1-ext
//TFluidEqn->boundaryManipulate(T.boundaryField());
fvScalarMatrix* TSolidEqn = new fvScalarMatrix
(
2013-07-17 13:57:27 +00:00
fvm::ddt(rhoCpsolid, Tsolid)
- fvm::laplacian(ksolidf, Tsolid, "laplacian(k,T)")
+ fvm::SuSp(-solidThermo.S()/Tsolid, Tsolid)
);
2013-07-17 13:57:27 +00:00
//Done automatically in 1.6.1-ext
//TSolidEqn->boundaryManipulate(Tsolid.boundaryField());
// Add fluid equation
TEqns.set(0, TFluidEqn);
// Add solid equation
TEqns.set(1, TSolidEqn);
TEqns.solve();
}
}