mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
Solvers: Updated to solve EEqn rather than h,hs,eEqn
This commit is contained in:
20
applications/solvers/compressible/rhoPimpleFoam/EEqn.H
Normal file
20
applications/solvers/compressible/rhoPimpleFoam/EEqn.H
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
volScalarField& he = thermo.he();
|
||||
|
||||
fvScalarMatrix EEqn
|
||||
(
|
||||
fvm::ddt(rho, he) + fvm::div(phi, he)
|
||||
+ fvc::ddt(rho, K) + fvc::div(phi, K)
|
||||
+ (
|
||||
he.name() == "e"
|
||||
? fvc::div(phi, volScalarField("Ep", p/rho))
|
||||
: -dpdt
|
||||
)
|
||||
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||
);
|
||||
|
||||
EEqn.relax();
|
||||
EEqn.solve();
|
||||
|
||||
thermo.correct();
|
||||
}
|
||||
@ -5,9 +5,9 @@
|
||||
psiThermo::New(mesh)
|
||||
);
|
||||
psiThermo& thermo = pThermo();
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
|
||||
volScalarField& p = thermo.p();
|
||||
volScalarField& h = thermo.he();
|
||||
const volScalarField& psi = thermo.psi();
|
||||
|
||||
volScalarField rho
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
{
|
||||
fvScalarMatrix hEqn
|
||||
(
|
||||
fvm::ddt(rho, h)
|
||||
+ fvm::div(phi, h)
|
||||
- fvm::laplacian(turbulence->alphaEff(), h)
|
||||
==
|
||||
dpdt
|
||||
- fvc::ddt(rho, K) + fvc::div(phi, K)
|
||||
);
|
||||
|
||||
hEqn.relax();
|
||||
hEqn.solve();
|
||||
|
||||
thermo.correct();
|
||||
}
|
||||
@ -75,7 +75,7 @@ int main(int argc, char *argv[])
|
||||
while (pimple.loop())
|
||||
{
|
||||
#include "UEqn.H"
|
||||
#include "hEqn.H"
|
||||
#include "EEqn.H"
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
|
||||
@ -75,7 +75,7 @@ int main(int argc, char *argv[])
|
||||
while (pimple.loop())
|
||||
{
|
||||
#include "UEqn.H"
|
||||
#include "hEqn.H"
|
||||
#include "EEqn.H"
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
|
||||
@ -85,7 +85,7 @@ int main(int argc, char *argv[])
|
||||
turbulence->correct();
|
||||
|
||||
#include "UEqn.H"
|
||||
#include "hEqn.H"
|
||||
#include "EEqn.H"
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
|
||||
@ -78,7 +78,7 @@ int main(int argc, char *argv[])
|
||||
while (pimple.loop())
|
||||
{
|
||||
#include "UEqn.H"
|
||||
#include "hEqn.H"
|
||||
#include "EEqn.H"
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
|
||||
Reference in New Issue
Block a user