Skip to content
Snippets Groups Projects
Commit f1c40221 authored by Sergio Ferraris's avatar Sergio Ferraris
Browse files

ENH: Adding error if the interRegionHeatTransferMode is used with semi-implicit mode

with solid/fluid
parent e1ff0a97
Branches
Tags
No related merge requests found
......@@ -216,19 +216,39 @@ void Foam::fv::interRegionHeatTransferModel::addSup
{
if (h.dimensions() == dimEnergy/dimMass)
{
const fluidThermo& thermo =
mesh_.lookupObject<fluidThermo>("thermophysicalProperties");
if (mesh_.foundObject<fluidThermo>("thermophysicalProperties"))
{
const basicThermo& thermo =
mesh_.lookupObject<basicThermo>("thermophysicalProperties");
eqn += htc_*Tmapped - fvm::SuSp(htc_/thermo.Cp(), h);
eqn += htc_*Tmapped - fvm::SuSp(htc_/thermo.Cp(), h);
if (debug)
{
const dimensionedScalar energy =
fvc::domainIntegrate(htc_*(h/thermo.Cp() - Tmapped));
if (debug)
{
const dimensionedScalar energy =
fvc::domainIntegrate(htc_*(h/thermo.Cp() - Tmapped));
Info<< "Energy exchange from region " << nbrMesh.name()
<< " To " << mesh_.name() << " : " << energy.value()
<< endl;
Info<< "Energy exchange from region " << nbrMesh.name()
<< " To " << mesh_.name() << " : " << energy.value()
<< endl;
}
}
else
{
FatalErrorIn
(
"void Foam::fv::interRegionHeatTransferModel::addSup"
"("
" fvMatrix<scalar>&, "
" const label "
")"
) << " on mesh " << mesh_.name()
<< " could not find object fluidThermo."
<< " The available objects : "
<< mesh_.names()
<< " The semi implicit option can only be used for "
<< "fluid-fluid inter region heat transfer models "
<< exit(FatalError);
}
}
else if (h.dimensions() == dimTemperature)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment