diff --git a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/pEqn.H b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/pEqn.H index 88ee90883a..d291705f49 100644 --- a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/pEqn.H +++ b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/pEqn.H @@ -34,7 +34,7 @@ fvc::div(phiHbyA) - fvm::laplacian(rAUf, p_rgh) == - vDotv - vDotc + vDotv + vDotc ); p_rghEqn.setReference(pRefCell, pRefValue); diff --git a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/constant/constant.C b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/constant/constant.C index 5be98a1344..36342d9393 100644 --- a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/constant/constant.C +++ b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/constant/constant.C @@ -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> ( - coeffC_*mixture_.rho2()*limitedAlpha2*max(TSat - T, T0), - -coeffE_*mixture_.rho1()*limitedAlpha1*max(T - TSat, T0) + tmp(new volScalarField(mDotC)), + tmp(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; }