mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Bound Tsource and pEq sign for condensation. Fix #1682.
This commit is contained in:
@ -34,7 +34,7 @@
|
||||
fvc::div(phiHbyA)
|
||||
- fvm::laplacian(rAUf, p_rgh)
|
||||
==
|
||||
vDotv - vDotc
|
||||
vDotv + vDotc
|
||||
);
|
||||
|
||||
p_rghEqn.setReference(pRefCell, pRefValue);
|
||||
|
||||
@ -122,19 +122,25 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDot() const
|
||||
|
||||
const dimensionedScalar T0(dimTemperature, Zero);
|
||||
|
||||
volScalarField mDotE
|
||||
(
|
||||
"mDotE", coeffE_*mixture_.rho1()*limitedAlpha1*max(T - TSat, T0)
|
||||
);
|
||||
volScalarField mDotC
|
||||
(
|
||||
"mDotC", coeffC_*mixture_.rho2()*limitedAlpha2*max(TSat - T, T0)
|
||||
);
|
||||
|
||||
if (mesh_.time().outputTime())
|
||||
{
|
||||
volScalarField mDot
|
||||
(
|
||||
"mDot", coeffE_*mixture_.rho1()*limitedAlpha1*max(T - TSat, T0)
|
||||
);
|
||||
mDot.write();
|
||||
mDotC.write();
|
||||
mDotE.write();
|
||||
}
|
||||
|
||||
return Pair<tmp<volScalarField>>
|
||||
(
|
||||
coeffC_*mixture_.rho2()*limitedAlpha2*max(TSat - T, T0),
|
||||
-coeffE_*mixture_.rho1()*limitedAlpha1*max(T - TSat, T0)
|
||||
tmp<volScalarField>(new volScalarField(mDotC)),
|
||||
tmp<volScalarField>(new volScalarField(-mDotE))
|
||||
);
|
||||
}
|
||||
|
||||
@ -209,16 +215,16 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::TSource() const
|
||||
|
||||
const volScalarField Vcoeff
|
||||
(
|
||||
coeffE_*mixture_.rho1()*limitedAlpha1*L
|
||||
coeffE_*mixture_.rho1()*limitedAlpha1*L*pos(T - TSat)
|
||||
);
|
||||
const volScalarField Ccoeff
|
||||
(
|
||||
coeffC_*mixture_.rho2()*limitedAlpha2*L
|
||||
coeffC_*mixture_.rho2()*limitedAlpha2*L*pos(TSat - T)
|
||||
);
|
||||
|
||||
TSource =
|
||||
fvm::Sp(Vcoeff, T) - Vcoeff*TSat
|
||||
- fvm::Sp(Ccoeff, T) + Ccoeff*TSat;
|
||||
+ fvm::Sp(Ccoeff, T) - Ccoeff*TSat;
|
||||
|
||||
return tTSource;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user