This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/solvers/compressible/steadyCompressibleMRFFoam/iEqn.H

32 lines
699 B
C++
Raw Normal View History

{
// Solve the rothalpy equation
// Create relative velocity
Urel == U;
mrfZones.relativeVelocity(Urel);
// Create rotational velocity (= omega x r)
2016-03-15 12:56:56 +00:00
Urot == U - Urel;
fvScalarMatrix iEqn
(
fvm::ddt(rho, i)
+ fvm::div(phi, i)
- fvm::laplacian(turbulence->alphaEff(), i)
==
// Viscous heating: note sign (devRhoReff has a minus in it)
- (turbulence->devRhoReff() && fvc::grad(Urel))
);
iEqn.relax();
iEqn.solve();
// Calculate enthalpy out of rothalpy
2016-03-15 12:56:56 +00:00
h = i + 0.5*(magSqr(Urot) - magSqr(Urel));
h.correctBoundaryConditions();
thermo.correct();
2015-11-11 13:17:46 +00:00
psis = thermo.psi()/thermo.Cp()*thermo.Cv();
}