mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Changing energy Eq in interCondensatingEvaporatingFoam
from e to T. T proved to be more generic solution.
This commit is contained in:
@ -1,25 +0,0 @@
|
|||||||
fvVectorMatrix UEqn
|
|
||||||
(
|
|
||||||
fvm::ddt(rho, U)
|
|
||||||
+ fvm::div(rhoPhi, U)
|
|
||||||
+ turbulence->divDevRhoReff(rho, U)
|
|
||||||
);
|
|
||||||
|
|
||||||
UEqn.relax();
|
|
||||||
|
|
||||||
if (pimple.momentumPredictor())
|
|
||||||
{
|
|
||||||
solve
|
|
||||||
(
|
|
||||||
UEqn
|
|
||||||
==
|
|
||||||
fvc::reconstruct
|
|
||||||
(
|
|
||||||
(
|
|
||||||
interface.surfaceTensionForce()
|
|
||||||
- ghf*fvc::snGrad(rho)
|
|
||||||
- fvc::snGrad(p_rgh)
|
|
||||||
) * mesh.magSf()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -40,9 +40,6 @@ autoPtr<temperaturePhaseChangeTwoPhaseMixture> mixture =
|
|||||||
temperaturePhaseChangeTwoPhaseMixture::New(thermo(), mesh);
|
temperaturePhaseChangeTwoPhaseMixture::New(thermo(), mesh);
|
||||||
|
|
||||||
|
|
||||||
// Correct e from T and alpha
|
|
||||||
//thermo->correct();
|
|
||||||
|
|
||||||
volScalarField& alpha1(thermo->alpha1());
|
volScalarField& alpha1(thermo->alpha1());
|
||||||
volScalarField& alpha2(thermo->alpha2());
|
volScalarField& alpha2(thermo->alpha2());
|
||||||
|
|
||||||
@ -139,3 +136,17 @@ volScalarField pDivU
|
|||||||
dimensionedScalar(p.dimensions()/dimTime, Zero)
|
dimensionedScalar(p.dimensions()/dimTime, Zero)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Need to store rho for ddt(rhoCp, U)
|
||||||
|
volScalarField rhoCp
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"rhoCp",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
rho*thermo->Cp()
|
||||||
|
);
|
||||||
|
rhoCp.oldTime();
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
tmp<volScalarField> tcp(thermo->Cp());
|
tmp<volScalarField> tcp(thermo->Cp());
|
||||||
const volScalarField& cp = tcp();
|
const volScalarField& cp = tcp();
|
||||||
|
rhoCp = rho*cp;
|
||||||
|
|
||||||
kappaEff = thermo->kappa() + rho*cp*turbulence->nut()/Prt;
|
kappaEff = thermo->kappa() + rho*cp*turbulence->nut()/Prt;
|
||||||
|
|
||||||
@ -11,18 +12,26 @@
|
|||||||
pDivU = (p*fvc::div(rhoPhi/fvc::interpolate(rho)));
|
pDivU = (p*fvc::div(rhoPhi/fvc::interpolate(rho)));
|
||||||
}
|
}
|
||||||
|
|
||||||
fvScalarMatrix eEqn
|
const surfaceScalarField rhoCpPhi(fvc::interpolate(cp)*rhoPhi);
|
||||||
|
|
||||||
|
Pair<tmp<volScalarField>> vDotAlphal = mixture->mDot();
|
||||||
|
|
||||||
|
const volScalarField& vDotcAlphal = vDotAlphal[0]();
|
||||||
|
const volScalarField& vDotvAlphal = vDotAlphal[1]();
|
||||||
|
const volScalarField vDotvmcAlphal(vDotvAlphal - vDotcAlphal);
|
||||||
|
|
||||||
|
fvScalarMatrix TEqn
|
||||||
(
|
(
|
||||||
fvm::ddt(rho, e)
|
fvm::ddt(rhoCp, T)
|
||||||
+ fvm::div(rhoPhi, e)
|
+ fvm::div(rhoCpPhi, T, "div(rhoCpPhi,T)")
|
||||||
- fvm::laplacian(kappaEff/cp, e)
|
- fvm::Sp(fvc::ddt(rhoCp) + fvc::div(rhoCpPhi), T)
|
||||||
+ pDivU
|
- fvm::laplacian(kappaEff, T)
|
||||||
|
+ thermo->hc()*vDotvmcAlphal
|
||||||
|
+ pDivU
|
||||||
);
|
);
|
||||||
|
|
||||||
eEqn.relax();
|
TEqn.relax();
|
||||||
eEqn.solve();
|
TEqn.solve();
|
||||||
|
|
||||||
thermo->correct();
|
|
||||||
|
|
||||||
Info<< "min/max(T) = " << min(T).value() << ", "
|
Info<< "min/max(T) = " << min(T).value() << ", "
|
||||||
<< max(T).value() <<endl;
|
<< max(T).value() <<endl;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -79,8 +79,6 @@ int main(int argc, char *argv[])
|
|||||||
#include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
|
|
||||||
volScalarField& T = thermo->T();
|
volScalarField& T = thermo->T();
|
||||||
volScalarField& e = thermo->he();
|
|
||||||
e.oldTime();
|
|
||||||
|
|
||||||
turbulence->validate();
|
turbulence->validate();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user