4 U.correctBoundaryConditions();
6 // Calculate enthalpy from rhoE
7 const volScalarField Cp = thermo->Cp();
8 const volScalarField Cv = thermo->Cv();
10 // h = rhoE/rho - 0.5*magSqr(U) + p/rho;
11 // Alternative formulation, Felipe Alves Portela TU Delft
12 h = Cp/Cv*(rhoE/rho - 0.5*magSqr(U));
13 h.correctBoundaryConditions();
16 dimensionedScalar CpMin = min(Cp);
17 dimensionedScalar CpMax = max(Cp);
19 dimensionedScalar hMin = CpMin*TMin;
20 dimensionedScalar hMax = CpMax*TMax;
22 boundMinMax(h, hMin, hMax);
24 // Correct thermodynamics
28 boundMinMax(rho, rhoMin, rhoMax);
31 p = rho*(thermo->Cp() - thermo->Cv())*T;
32 p.correctBoundaryConditions();
35 boundMinMax(p, pMin, pMax);