BUG: Correct div(u*p) for Teqn in compressibleInterFoam .Gitlab 1400.

This commit is contained in:
sergio
2019-08-21 11:34:18 -07:00
committed by Andrew Heather
parent 8fe96e5dee
commit 785241178f
5 changed files with 8 additions and 5 deletions

View File

@ -4,7 +4,7 @@
fvm::ddt(rho, T) + fvm::div(rhoPhi, T) - fvm::Sp(contErr, T)
- fvm::laplacian(turbulence.alphaEff(), T)
+ (
(divU*p)() - contErr/rho*p
divUp - contErr/rho*p
+ (fvc::ddt(rho, K) + fvc::div(rhoPhi, K))() - contErr*K
)
*(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenCFD Ltd
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2017 OpenFOAM Foundation
@ -88,10 +88,11 @@ int main(int argc, char *argv[])
{
#include "readDyMControls.H"
// Store divU from the previous mesh so that it can be mapped
// Store divU and divUp from the previous mesh so that it can be mapped
// and used in correctPhi to ensure the corrected phi has the
// same divergence
volScalarField divU("divU0", fvc::div(fvc::absolute(phi, U)));
volScalarField divUp("divUp", fvc::div(fvc::absolute(phi, U), p));
if (LTS)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) OpenCFD Ltd. 2017
\\ / A nd | Copyright (C) OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2017 OpenFOAM Foundation
@ -118,7 +118,7 @@ int main(int argc, char *argv[])
turbulence.correctPhasePhi();
#include "UEqn.H"
volScalarField divU(fvc::div(fvc::absolute(phi, U)));
volScalarField divUp("divUp", fvc::div(fvc::absolute(phi, U), p));
#include "TEqn.H"
// --- Pressure corrector loop

View File

@ -34,6 +34,7 @@ divSchemes
div(rhoPhi,T) Gauss linear;
div(rhoPhi,K) Gauss linear;
div((phi+meshPhi),p) Gauss linear;
div(U,p) Gauss linear;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;

View File

@ -39,6 +39,7 @@ divSchemes
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
div((phi+meshPhi),p) Gauss linear;
div(phi,p) Gauss linear;
div((muEff*dev2(T(grad(U))))) Gauss linear;
}