Permalink
Browse files

Solvers: Added support for extrapolated pressure boundary conditions

The boundary conditions of HbyA are now constrained by the new "constrainHbyA"
function which applies the velocity boundary values for patches for which the
velocity cannot be modified by assignment and pressure extrapolation is
not specified via the new
"fixedFluxExtrapolatedPressureFvPatchScalarField".

The new function "constrainPressure" sets the pressure gradient
appropriately for "fixedFluxPressureFvPatchScalarField" and
"fixedFluxExtrapolatedPressureFvPatchScalarField" boundary conditions to
ensure the evaluated flux corresponds to the known velocity values at
the boundary.

The "fixedFluxPressureFvPatchScalarField" boundary condition operates
exactly as before, ensuring the correct flux at fixed-flux boundaries by
compensating for the body forces (gravity in particular) with the
pressure gradient.

The new "fixedFluxExtrapolatedPressureFvPatchScalarField" boundary
condition may be used for cases with or without body-forces to set the
pressure gradient to compensate not only for the body-force but also the
extrapolated "HbyA" which provides a second-order boundary condition for
pressure.  This is useful for a range a problems including impinging
flow, extrapolated inlet conditions with body-forces or for highly
viscous flows, pressure-induced separation etc.  To test this boundary
condition at walls in the motorBike tutorial case set

    lowerWall
    {
        type            fixedFluxExtrapolatedPressure;
    }

    motorBikeGroup
    {
        type            fixedFluxExtrapolatedPressure;
    }

Currently the new extrapolated pressure boundary condition is supported
for all incompressible and sub-sonic compressible solvers except those
providing implicit and tensorial porosity support.  The approach will be
extended to cover these solvers and options in the future.

Note: the extrapolated pressure boundary condition is experimental and
requires further testing to assess the range of applicability,
stability, accuracy etc.

Henry G. Weller
CFD Direct Ltd.
  • Loading branch information...
Henry Weller
Henry Weller committed Feb 13, 2016
1 parent f58a665 commit acaf72b4b4f6e6a13ae16bf1f8a91dbaed37ae1f
Showing with 886 additions and 474 deletions.
  1. +5 −4 applications/solvers/DNS/dnsFoam/dnsFoam.C
  2. +1 −3 applications/solvers/combustion/PDRFoam/pEqn.H
  3. +4 −3 applications/solvers/combustion/XiFoam/pEqn.H
  4. +6 −5 applications/solvers/combustion/engineFoam/pEqn.H
  5. +1 −2 applications/solvers/combustion/fireFoam/fireFoam.C
  6. +3 −13 applications/solvers/combustion/fireFoam/pEqn.H
  7. +4 −3 applications/solvers/combustion/reactingFoam/pEqn.H
  8. +4 −2 applications/solvers/combustion/reactingFoam/pcEqn.H
  9. +3 −13 applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/pEqn.H
  10. +1 −2 applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/rhoReactingBuoyantFoam.C
  11. +4 −3 applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H
  12. +9 −0 ...ons/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.H
  13. +4 −3 applications/solvers/compressible/rhoPimpleFoam/pEqn.H
  14. +4 −2 applications/solvers/compressible/rhoPimpleFoam/pcEqn.H
  15. +4 −3 applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H
  16. +7 −5 applications/solvers/compressible/rhoSimpleFoam/pEqn.H
  17. +4 −4 applications/solvers/compressible/rhoSimpleFoam/pcEqn.H
  18. +4 −4 applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/pEqn.H
  19. +1 −4 applications/solvers/compressible/sonicFoam/pEqn.H
  20. +1 −4 applications/solvers/compressible/sonicFoam/sonicDyMFoam/pEqn.H
  21. +5 −5 applications/solvers/electromagnetics/mhdFoam/mhdFoam.C
  22. +1 −2 applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C
  23. +3 −12 applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/pEqn.H
  24. +1 −2 applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C
  25. +3 −11 applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H
  26. +1 −2 applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C
  27. +8 −18 applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H
  28. +1 −2 applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C
  29. +3 −13 applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H
  30. +1 −2 applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C
  31. +1 −2 ...tions/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C
  32. +3 −13 applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H
  33. +3 −13 applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H
  34. +5 −3 applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C
  35. +5 −4 applications/solvers/incompressible/icoFoam/icoFoam.C
  36. +5 −4 applications/solvers/incompressible/nonNewtonianIcoFoam/nonNewtonianIcoFoam.C
  37. +3 −0 applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H
  38. +4 −15 applications/solvers/incompressible/pimpleFoam/pEqn.H
  39. +4 −15 applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H
  40. +1 −2 applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C
  41. +1 −2 applications/solvers/incompressible/pimpleFoam/pimpleFoam.C
  42. +4 −2 applications/solvers/incompressible/pisoFoam/pEqn.H
  43. +3 −0 applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H
  44. +4 −3 applications/solvers/incompressible/simpleFoam/pEqn.H
  45. +4 −3 applications/solvers/incompressible/simpleFoam/porousSimpleFoam/pEqn.H
  46. +1 −2 applications/solvers/lagrangian/DPMFoam/DPMFoam.C
  47. +2 −9 applications/solvers/lagrangian/DPMFoam/pEqn.H
  48. +4 −3 applications/solvers/lagrangian/coalChemistryFoam/pEqn.H
  49. +3 −13 applications/solvers/lagrangian/reactingParcelFilmFoam/pEqn.H
  50. +1 −2 applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C
  51. +4 −4 applications/solvers/lagrangian/reactingParcelFoam/pEqn.H
  52. +6 −5 applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/pEqn.H
  53. +4 −3 applications/solvers/lagrangian/sprayFoam/pEqn.H
  54. +4 −3 applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/pEqn.H
  55. +1 −3 applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H
  56. +1 −3 applications/solvers/multiphase/cavitatingFoam/pEqn.H
  57. +1 −2 ...ions/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C
  58. +3 −13 applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H
  59. +1 −2 applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C
  60. +3 −13 applications/solvers/multiphase/compressibleInterFoam/pEqn.H
  61. +1 −2 applications/solvers/multiphase/compressibleMultiphaseInterFoam/compressibleMultiphaseInterFoam.C
  62. +3 −13 applications/solvers/multiphase/compressibleMultiphaseInterFoam/pEqn.H
  63. +1 −2 applications/solvers/multiphase/driftFluxFoam/driftFluxFoam.C
  64. +3 −13 applications/solvers/multiphase/driftFluxFoam/pEqn.H
  65. +1 −2 applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C
  66. +3 −13 applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H
  67. +1 −2 applications/solvers/multiphase/interFoam/interFoam.C
  68. +1 −2 applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C
  69. +3 −11 applications/solvers/multiphase/interFoam/pEqn.H
  70. +1 −2 ...cations/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C
  71. +3 −13 applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H
  72. +1 −2 applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C
  73. +3 −13 applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H
  74. +1 −2 applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam.C
  75. +1 −2 applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C
  76. +1 −2 applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C
  77. +3 −12 applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H
  78. +3 −12 applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/pEqn.H
  79. +1 −2 ...ers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/potentialFreeSurfaceDyMFoam.C
  80. +1 −2 applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C
  81. +1 −2 ...ns/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C
  82. +1 −2 ...ations/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.C
  83. +3 −13 applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H
  84. +1 −2 applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C
  85. +1 −2 applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C
  86. +2 −0 src/finiteVolume/Make/files
  87. +73 −0 src/finiteVolume/cfdTools/general/constrainHbyA/constrainHbyA.C
  88. +61 −0 src/finiteVolume/cfdTools/general/constrainHbyA/constrainHbyA.H
  89. +134 −0 src/finiteVolume/cfdTools/general/constrainPressure/constrainPressure.C
  90. +131 −0 src/finiteVolume/cfdTools/general/constrainPressure/constrainPressure.H
  91. +3 −0 src/finiteVolume/cfdTools/general/include/fvCFD.H
  92. +100 −0 ...tchFields/derived/fixedFluxExtrapolatedPressure/fixedFluxExtrapolatedPressureFvPatchScalarField.C
  93. +147 −0 ...tchFields/derived/fixedFluxExtrapolatedPressure/fixedFluxExtrapolatedPressureFvPatchScalarField.H
  94. +1 −7 tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes
  95. +1 −10 tutorials/incompressible/pimpleFoam/pitzDaily/system/fvSchemes
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -88,16 +88,17 @@ int main(int argc, char *argv[])
{
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
surfaceScalarField phiHbyA
(
"phiHbyA",
(fvc::interpolate(HbyA) & mesh.Sf())
+ rAUf*fvc::ddtCorr(U, phi)
);
// Update the pressure BCs to ensure flux consistency
constrainPressure(p, U, phiHbyA, rAUf);
fvScalarMatrix pEqn
(
fvm::laplacian(rAUf, p) == fvc::div(phiHbyA)
@@ -1,9 +1,7 @@
rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A());
volVectorField HbyA("HbyA", U);
HbyA = invA & UEqn.H();
volVectorField HbyA(constrainHbyA(invA & UEqn.H(), U, p));
if (pimple.transonic())
{
@@ -2,9 +2,7 @@ rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
if (pimple.transonic())
{
@@ -52,6 +50,9 @@ else
MRF.makeRelative(phiHbyA);
// Update the pressure BCs to ensure flux consistency
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
@@ -2,9 +2,7 @@ rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
if (pimple.transonic())
{
@@ -29,7 +27,7 @@ if (pimple.transonic())
(
fvm::ddt(psi, p)
+ fvm::div(phid, p)
- fvm::laplacian(rho*rAU, p)
- fvm::laplacian(rhorAUf, p)
==
fvOptions(psi, p, rho.name())
);
@@ -56,13 +54,16 @@ else
fvc::makeRelative(phiHbyA, rho, U);
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
// Update the pressure BCs to ensure flux consistency
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
+ fvc::div(phiHbyA)
- fvm::laplacian(rho*rAU, p)
- fvm::laplacian(rhorAUf, p)
==
fvOptions(psi, p, rho.name())
);
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -41,7 +41,6 @@ Description
#include "psiCombustionModel.H"
#include "pimpleControl.H"
#include "fvOptions.H"
#include "fixedFluxPressureFvPatchScalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -2,9 +2,7 @@ rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
@@ -20,16 +18,8 @@ surfaceScalarField phiHbyA
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
// Update the fixedFluxPressure BCs to ensure flux consistency
setSnGrad<fixedFluxPressureFvPatchScalarField>
(
p_rgh.boundaryField(),
(
phiHbyA.boundaryField()
- MRF.relative(mesh.Sf().boundaryField() & U.boundaryField())
*rho.boundaryField()
)/(mesh.magSf().boundaryField()*rhorAUf.boundaryField())
);
// Update the pressure BCs to ensure flux consistency
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF);
while (pimple.correctNonOrthogonal())
{
@@ -5,9 +5,7 @@ rho.relax();
volScalarField rAU(1.0/UEqn().A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();
volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p));
if (pimple.nCorrPISO() <= 1)
{
@@ -60,6 +58,9 @@ else
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
// Update the pressure BCs to ensure flux consistency
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
@@ -5,8 +5,7 @@ rho.relax();
volScalarField rAU(1.0/UEqn().A());
volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1()));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();
volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p));
if (pimple.nCorrPISO() <= 1)
{
@@ -76,6 +75,9 @@ else
volScalarField rhorAtU("rhorAtU", rho*rAtU);
// Update the pressure BCs to ensure flux consistency
constrainPressure(p, rho, U, phiHbyA, rhorAtU, MRF);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
@@ -7,9 +7,7 @@
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
@@ -25,16 +23,8 @@
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
// Update the fixedFluxPressure BCs to ensure flux consistency
setSnGrad<fixedFluxPressureFvPatchScalarField>
(
p_rgh.boundaryField(),
(
phiHbyA.boundaryField()
- MRF.relative(mesh.Sf().boundaryField() & U.boundaryField())
*rho.boundaryField()
)/(mesh.magSf().boundaryField()*rhorAUf.boundaryField())
);
// Update the pressure BCs to ensure flux consistency
constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF);
fvScalarMatrix p_rghDDtEqn
(
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -36,7 +36,6 @@ Description
#include "multivariateScheme.H"
#include "pimpleControl.H"
#include "fvOptions.H"
#include "fixedFluxPressureFvPatchScalarField.H"
#include "localEulerDdtScheme.H"
#include "fvcSmooth.H"
@@ -7,9 +7,7 @@
volScalarField rAU(1.0/UEqn().A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();
volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p));
if (pimple.transonic())
{
@@ -65,6 +63,9 @@
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
// Update the pressure BCs to ensure flux consistency
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
fvScalarMatrix pDDtEqn
(
fvc::ddt(rho) + psi*correction(fvm::ddt(p))
@@ -130,6 +130,15 @@ public:
// Member functions
// Access
//- Return false: this patch field is not altered by assignment
virtual bool assignable() const
{
return false;
}
// Mapping functions
//- Map (and resize as needed) from self given a mapping object
@@ -5,9 +5,7 @@ rho.relax();
volScalarField rAU(1.0/UEqn().A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();
volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p));
if (pimple.nCorrPISO() <= 1)
{
@@ -60,6 +58,9 @@ else
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
// Update the pressure BCs to ensure flux consistency
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
@@ -5,8 +5,7 @@ rho.relax();
volScalarField rAU(1.0/UEqn().A());
volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1()));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();
volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p));
if (pimple.nCorrPISO() <= 1)
{
@@ -76,6 +75,9 @@ else
volScalarField rhorAtU("rhorAtU", rho*rAtU);
// Update the pressure BCs to ensure flux consistency
constrainPressure(p, rho, U, phiHbyA, rhorAtU, MRF);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
@@ -5,9 +5,7 @@ rho.relax();
volScalarField rAU(1.0/UEqn().A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();
volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p));
if (pimple.nCorrPISO() <= 1)
{
@@ -60,6 +58,9 @@ else
fvc::makeRelative(phiHbyA, rho, U);
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
// Update the pressure BCs to ensure flux consistency
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
while (pimple.correctNonOrthogonal())
{
// Pressure corrector
@@ -1,8 +1,7 @@
{
volScalarField rAU(1.0/UEqn().A());
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p));
UEqn.clear();
bool closedVolume = false;
@@ -23,7 +22,7 @@
fvScalarMatrix pEqn
(
fvm::div(phid, p)
- fvm::laplacian(rho*rAU, p)
- fvm::laplacian(rhorAUf, p)
==
fvOptions(psi, p, rho.name())
);
@@ -53,12 +52,15 @@
closedVolume = adjustPhi(phiHbyA, U, p);
// Update the pressure BCs to ensure flux consistency
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
while (simple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
fvc::div(phiHbyA)
- fvm::laplacian(rho*rAU, p)
- fvm::laplacian(rhorAUf, p)
==
fvOptions(psi, p, rho.name())
);
@@ -1,9 +1,6 @@
volScalarField rAU(1.0/UEqn().A());
volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1()));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();
volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p));
UEqn.clear();
bool closedVolume = false;
@@ -70,6 +67,9 @@ else
volScalarField rhorAtU("rhorAtU", rho*rAtU);
// Update the pressure BCs to ensure flux consistency
constrainPressure(p, rho, U, phiHbyA, rhorAtU, MRF);
while (simple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
Oops, something went wrong.

0 comments on commit acaf72b

Please sign in to comment.