fvConstraints: Added limitPressure which replaces pressureControl.limit
To provide more flexibility, extensibility, run-time modifiability and
consistency the handling of optional pressure limits has been moved from
pressureControl (settings in system/fvSolution) to the new limitPressure
fvConstraint (settings in system/fvConstraints).
All tutorials have been updated which provides guidance when upgrading cases but
also helpful error messages are generated for cases using the old settings
providing specific details as to how the case should be updated, e.g. for the
tutorials/compressible/rhoSimpleFoam/squareBend case which has the pressure
limit specification:
SIMPLE
{
...
pMinFactor 0.1;
pMaxFactor 2;
...
generates the error message
--> FOAM FATAL IO ERROR:
Pressure limits should now be specified in fvConstraints:
limitp
{
type limitPressure;
minFactor 0.1;
maxFactor 2;
}
file: /home/dm2/henry/OpenFOAM/OpenFOAM-dev/tutorials/compressible/rhoSimpleFoam/squareBend/system/fvSolution/SIMPLE from line 41 to line 54.
This commit is contained in:
@ -37,7 +37,7 @@ Description
|
|||||||
#include "fluidReactionThermophysicalTransportModel.H"
|
#include "fluidReactionThermophysicalTransportModel.H"
|
||||||
#include "multivariateScheme.H"
|
#include "multivariateScheme.H"
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
#include "pressureControl.H"
|
#include "pressureReference.H"
|
||||||
#include "fvModels.H"
|
#include "fvModels.H"
|
||||||
#include "fvConstraints.H"
|
#include "fvConstraints.H"
|
||||||
#include "localEulerDdtScheme.H"
|
#include "localEulerDdtScheme.H"
|
||||||
|
|||||||
@ -92,7 +92,7 @@ volScalarField p_rgh
|
|||||||
// Force p_rgh to be consistent with p
|
// Force p_rgh to be consistent with p
|
||||||
p_rgh = p - rho*gh - pRef;
|
p_rgh = p - rho*gh - pRef;
|
||||||
|
|
||||||
pressureControl pressureControl
|
pressureReference pressureReference
|
||||||
(
|
(
|
||||||
p,
|
p,
|
||||||
p_rgh,
|
p_rgh,
|
||||||
|
|||||||
@ -38,7 +38,7 @@ volScalarField& p = thermo.p();
|
|||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
pressureControl pressureControl(p, rho, pimple.dict(), false);
|
pressureReference pressureReference(p, rho, pimple.dict(), false);
|
||||||
|
|
||||||
mesh.setFluxRequired(p.name());
|
mesh.setFluxRequired(p.name());
|
||||||
|
|
||||||
|
|||||||
@ -37,7 +37,7 @@ Description
|
|||||||
#include "fluidReactionThermophysicalTransportModel.H"
|
#include "fluidReactionThermophysicalTransportModel.H"
|
||||||
#include "multivariateScheme.H"
|
#include "multivariateScheme.H"
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
#include "pressureControl.H"
|
#include "pressureReference.H"
|
||||||
#include "CorrectPhi.H"
|
#include "CorrectPhi.H"
|
||||||
#include "fvModels.H"
|
#include "fvModels.H"
|
||||||
#include "fvConstraints.H"
|
#include "fvConstraints.H"
|
||||||
|
|||||||
@ -40,7 +40,7 @@ volVectorField U
|
|||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
pressureControl pressureControl
|
pressureReference pressureReference
|
||||||
(
|
(
|
||||||
p,
|
p,
|
||||||
rho,
|
rho,
|
||||||
|
|||||||
@ -82,8 +82,8 @@ if (pimple.transonic())
|
|||||||
|
|
||||||
pEqn.setReference
|
pEqn.setReference
|
||||||
(
|
(
|
||||||
pressureControl.refCell(),
|
pressureReference.refCell(),
|
||||||
pressureControl.refValue()
|
pressureReference.refValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
pEqn.solve();
|
pEqn.solve();
|
||||||
@ -121,8 +121,8 @@ else
|
|||||||
|
|
||||||
pEqn.setReference
|
pEqn.setReference
|
||||||
(
|
(
|
||||||
pressureControl.refCell(),
|
pressureReference.refCell(),
|
||||||
pressureControl.refValue()
|
pressureReference.refValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
pEqn.solve();
|
pEqn.solve();
|
||||||
@ -140,12 +140,12 @@ if (mesh.steady())
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const bool limitedp = pressureControl.limit(p);
|
const bool constrained = fvConstraints.constrain(p);
|
||||||
|
|
||||||
// Thermodynamic density update
|
// Thermodynamic density update
|
||||||
thermo.correctRho(psi*p - psip0);
|
thermo.correctRho(psi*p - psip0);
|
||||||
|
|
||||||
if (limitedp)
|
if (constrained)
|
||||||
{
|
{
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
}
|
}
|
||||||
@ -164,7 +164,7 @@ K = 0.5*magSqr(U);
|
|||||||
|
|
||||||
if (mesh.steady())
|
if (mesh.steady())
|
||||||
{
|
{
|
||||||
pressureControl.limit(p);
|
fvConstraints.constrain(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
// For steady compressible closed-volume cases adjust the pressure level
|
// For steady compressible closed-volume cases adjust the pressure level
|
||||||
|
|||||||
@ -39,7 +39,7 @@ Description
|
|||||||
#include "dynamicMomentumTransportModel.H"
|
#include "dynamicMomentumTransportModel.H"
|
||||||
#include "fluidThermophysicalTransportModel.H"
|
#include "fluidThermophysicalTransportModel.H"
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
#include "pressureControl.H"
|
#include "pressureReference.H"
|
||||||
#include "CorrectPhi.H"
|
#include "CorrectPhi.H"
|
||||||
#include "fvModels.H"
|
#include "fvModels.H"
|
||||||
#include "fvConstraints.H"
|
#include "fvConstraints.H"
|
||||||
|
|||||||
@ -38,7 +38,7 @@ volVectorField U
|
|||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
pressureControl pressureControl
|
pressureReference pressureReference
|
||||||
(
|
(
|
||||||
p,
|
p,
|
||||||
rho,
|
rho,
|
||||||
|
|||||||
@ -72,8 +72,8 @@ if (simple.transonic())
|
|||||||
|
|
||||||
pEqn.setReference
|
pEqn.setReference
|
||||||
(
|
(
|
||||||
pressureControl.refCell(),
|
pressureReference.refCell(),
|
||||||
pressureControl.refValue()
|
pressureReference.refValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
pEqn.solve();
|
pEqn.solve();
|
||||||
@ -106,8 +106,8 @@ else
|
|||||||
|
|
||||||
pEqn.setReference
|
pEqn.setReference
|
||||||
(
|
(
|
||||||
pressureControl.refCell(),
|
pressureReference.refCell(),
|
||||||
pressureControl.refValue()
|
pressureReference.refValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
pEqn.solve();
|
pEqn.solve();
|
||||||
@ -128,7 +128,7 @@ U = HbyA - rAAtU*fvc::grad(p);
|
|||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
fvConstraints.constrain(U);
|
fvConstraints.constrain(U);
|
||||||
|
|
||||||
pressureControl.limit(p);
|
fvConstraints.constrain(p);
|
||||||
|
|
||||||
// For closed-volume cases adjust the pressure and density levels
|
// For closed-volume cases adjust the pressure and density levels
|
||||||
// to obey overall mass continuity
|
// to obey overall mass continuity
|
||||||
|
|||||||
@ -54,8 +54,8 @@
|
|||||||
|
|
||||||
pEqn.setReference
|
pEqn.setReference
|
||||||
(
|
(
|
||||||
pressureControl.refCell(),
|
pressureReference.refCell(),
|
||||||
pressureControl.refValue()
|
pressureReference.refValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
pEqn.solve();
|
pEqn.solve();
|
||||||
@ -83,7 +83,7 @@
|
|||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
fvConstraints.constrain(U);
|
fvConstraints.constrain(U);
|
||||||
|
|
||||||
pressureControl.limit(p);
|
fvConstraints.constrain(p);
|
||||||
|
|
||||||
// For closed-volume cases adjust the pressure and density levels
|
// For closed-volume cases adjust the pressure and density levels
|
||||||
// to obey overall mass continuity
|
// to obey overall mass continuity
|
||||||
|
|||||||
@ -35,7 +35,7 @@ Description
|
|||||||
#include "dynamicMomentumTransportModel.H"
|
#include "dynamicMomentumTransportModel.H"
|
||||||
#include "fluidThermophysicalTransportModel.H"
|
#include "fluidThermophysicalTransportModel.H"
|
||||||
#include "simpleControl.H"
|
#include "simpleControl.H"
|
||||||
#include "pressureControl.H"
|
#include "pressureReference.H"
|
||||||
#include "fvModels.H"
|
#include "fvModels.H"
|
||||||
#include "fvConstraints.H"
|
#include "fvConstraints.H"
|
||||||
#include "IOporosityModelList.H"
|
#include "IOporosityModelList.H"
|
||||||
|
|||||||
@ -34,7 +34,7 @@ Description
|
|||||||
#include "dynamicMomentumTransportModel.H"
|
#include "dynamicMomentumTransportModel.H"
|
||||||
#include "fluidThermophysicalTransportModel.H"
|
#include "fluidThermophysicalTransportModel.H"
|
||||||
#include "simpleControl.H"
|
#include "simpleControl.H"
|
||||||
#include "pressureControl.H"
|
#include "pressureReference.H"
|
||||||
#include "fvModels.H"
|
#include "fvModels.H"
|
||||||
#include "fvConstraints.H"
|
#include "fvConstraints.H"
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ Description
|
|||||||
#include "dynamicMomentumTransportModel.H"
|
#include "dynamicMomentumTransportModel.H"
|
||||||
#include "fluidThermophysicalTransportModel.H"
|
#include "fluidThermophysicalTransportModel.H"
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
#include "pressureControl.H"
|
#include "pressureReference.H"
|
||||||
#include "CorrectPhi.H"
|
#include "CorrectPhi.H"
|
||||||
#include "fvModels.H"
|
#include "fvModels.H"
|
||||||
#include "fvConstraints.H"
|
#include "fvConstraints.H"
|
||||||
|
|||||||
@ -79,7 +79,7 @@ volScalarField p_rgh
|
|||||||
// Force p_rgh to be consistent with p
|
// Force p_rgh to be consistent with p
|
||||||
p_rgh = p - rho*gh - pRef;
|
p_rgh = p - rho*gh - pRef;
|
||||||
|
|
||||||
pressureControl pressureControl
|
pressureReference pressureReference
|
||||||
(
|
(
|
||||||
p,
|
p,
|
||||||
p_rgh,
|
p_rgh,
|
||||||
|
|||||||
@ -65,8 +65,8 @@ if (pimple.transonic())
|
|||||||
|
|
||||||
p_rghEqn.setReference
|
p_rghEqn.setReference
|
||||||
(
|
(
|
||||||
pressureControl.refCell(),
|
pressureReference.refCell(),
|
||||||
pressureControl.refValue()
|
pressureReference.refValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
p_rghEqn.solve();
|
p_rghEqn.solve();
|
||||||
@ -88,8 +88,8 @@ else
|
|||||||
|
|
||||||
p_rghEqn.setReference
|
p_rghEqn.setReference
|
||||||
(
|
(
|
||||||
pressureControl.refCell(),
|
pressureReference.refCell(),
|
||||||
pressureControl.refValue()
|
pressureReference.refValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
p_rghEqn.solve();
|
p_rghEqn.solve();
|
||||||
@ -106,12 +106,12 @@ if (mesh.steady())
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const bool limitedp = pressureControl.limit(p);
|
const bool constrained = fvConstraints.constrain(p);
|
||||||
|
|
||||||
// Thermodynamic density update
|
// Thermodynamic density update
|
||||||
thermo.correctRho(psi*p - psip0);
|
thermo.correctRho(psi*p - psip0);
|
||||||
|
|
||||||
if (limitedp)
|
if (constrained)
|
||||||
{
|
{
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
}
|
}
|
||||||
@ -132,7 +132,7 @@ K = 0.5*magSqr(U);
|
|||||||
|
|
||||||
if (mesh.steady())
|
if (mesh.steady())
|
||||||
{
|
{
|
||||||
pressureControl.limit(p);
|
fvConstraints.constrain(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
// For steady closed-volume compressible cases adjust the pressure level
|
// For steady closed-volume compressible cases adjust the pressure level
|
||||||
|
|||||||
@ -34,7 +34,7 @@ Description
|
|||||||
#include "dynamicMomentumTransportModel.H"
|
#include "dynamicMomentumTransportModel.H"
|
||||||
#include "fluidThermophysicalTransportModel.H"
|
#include "fluidThermophysicalTransportModel.H"
|
||||||
#include "simpleControl.H"
|
#include "simpleControl.H"
|
||||||
#include "pressureControl.H"
|
#include "pressureReference.H"
|
||||||
#include "fvModels.H"
|
#include "fvModels.H"
|
||||||
#include "fvConstraints.H"
|
#include "fvConstraints.H"
|
||||||
|
|
||||||
|
|||||||
@ -77,7 +77,7 @@ volScalarField p_rgh
|
|||||||
// Force p_rgh to be consistent with p
|
// Force p_rgh to be consistent with p
|
||||||
p_rgh = p - rho*gh - pRef;
|
p_rgh = p - rho*gh - pRef;
|
||||||
|
|
||||||
pressureControl pressureControl
|
pressureReference pressureReference
|
||||||
(
|
(
|
||||||
p,
|
p,
|
||||||
p_rgh,
|
p_rgh,
|
||||||
|
|||||||
@ -48,8 +48,8 @@ if (simple.transonic())
|
|||||||
|
|
||||||
p_rghEqn.setReference
|
p_rghEqn.setReference
|
||||||
(
|
(
|
||||||
pressureControl.refCell(),
|
pressureReference.refCell(),
|
||||||
pressureControl.refValue()
|
pressureReference.refValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
p_rghEqn.solve();
|
p_rghEqn.solve();
|
||||||
@ -67,8 +67,8 @@ else
|
|||||||
|
|
||||||
p_rghEqn.setReference
|
p_rghEqn.setReference
|
||||||
(
|
(
|
||||||
pressureControl.refCell(),
|
pressureReference.refCell(),
|
||||||
pressureControl.refValue()
|
pressureReference.refValue()
|
||||||
);
|
);
|
||||||
|
|
||||||
p_rghEqn.solve();
|
p_rghEqn.solve();
|
||||||
@ -90,7 +90,7 @@ U = HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rhorAUf);
|
|||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
fvConstraints.constrain(U);
|
fvConstraints.constrain(U);
|
||||||
|
|
||||||
pressureControl.limit(p);
|
fvConstraints.constrain(p);
|
||||||
|
|
||||||
// For closed-volume compressible cases adjust the pressure level
|
// For closed-volume compressible cases adjust the pressure level
|
||||||
// to obey overall mass continuity
|
// to obey overall mass continuity
|
||||||
|
|||||||
@ -45,7 +45,7 @@ Description
|
|||||||
#include "fvConstraints.H"
|
#include "fvConstraints.H"
|
||||||
#include "coordinateSystem.H"
|
#include "coordinateSystem.H"
|
||||||
#include "pimpleMultiRegionControl.H"
|
#include "pimpleMultiRegionControl.H"
|
||||||
#include "pressureControl.H"
|
#include "pressureReference.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
PtrList<pressureControl> pressureControlFluid(fluidRegions.size());
|
PtrList<pressureReference> pressureReferenceFluid(fluidRegions.size());
|
||||||
|
|
||||||
forAll(fluidRegions, i)
|
forAll(fluidRegions, i)
|
||||||
{
|
{
|
||||||
pressureControlFluid.set
|
pressureReferenceFluid.set
|
||||||
(
|
(
|
||||||
i,
|
i,
|
||||||
new pressureControl
|
new pressureReference
|
||||||
(
|
(
|
||||||
p_rghFluid[i],
|
p_rghFluid[i],
|
||||||
rhoFluid[i],
|
rhoFluid[i],
|
||||||
|
|||||||
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
pimpleNoLoopControl& pimple = pimples.pimple(i);
|
pimpleNoLoopControl& pimple = pimples.pimple(i);
|
||||||
|
|
||||||
pressureControl& pressureControl = pressureControlFluid[i];
|
pressureReference& pressureReference = pressureReferenceFluid[i];
|
||||||
|
|
||||||
scalar cumulativeContErr = cumulativeContErrs[i];
|
scalar cumulativeContErr = cumulativeContErrs[i];
|
||||||
|
|
||||||
|
|||||||
@ -41,7 +41,7 @@ Description
|
|||||||
#include "fvModels.H"
|
#include "fvModels.H"
|
||||||
#include "fvConstraints.H"
|
#include "fvConstraints.H"
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
#include "pressureControl.H"
|
#include "pressureReference.H"
|
||||||
#include "CorrectPhi.H"
|
#include "CorrectPhi.H"
|
||||||
#include "localEulerDdtScheme.H"
|
#include "localEulerDdtScheme.H"
|
||||||
#include "fvcSmooth.H"
|
#include "fvcSmooth.H"
|
||||||
|
|||||||
@ -105,7 +105,7 @@ volScalarField p_rgh
|
|||||||
// Force p_rgh to be consistent with p
|
// Force p_rgh to be consistent with p
|
||||||
p_rgh = p - rho*gh;
|
p_rgh = p - rho*gh;
|
||||||
|
|
||||||
pressureControl pressureControl
|
pressureReference pressureReference
|
||||||
(
|
(
|
||||||
p,
|
p,
|
||||||
p_rgh,
|
p_rgh,
|
||||||
|
|||||||
@ -64,9 +64,9 @@ while (pimple.correctNonOrthogonal())
|
|||||||
|
|
||||||
p = p_rgh + rho*gh;
|
p = p_rgh + rho*gh;
|
||||||
|
|
||||||
bool limitedp = pressureControl.limit(p);
|
bool constrained = fvConstraints.constrain(p);
|
||||||
|
|
||||||
if (limitedp)
|
if (constrained)
|
||||||
{
|
{
|
||||||
p_rgh = p - rho*gh;
|
p_rgh = p - rho*gh;
|
||||||
}
|
}
|
||||||
@ -74,7 +74,7 @@ if (limitedp)
|
|||||||
// Thermodynamic density update
|
// Thermodynamic density update
|
||||||
thermo.correctRho(psi*p - psip0);
|
thermo.correctRho(psi*p - psip0);
|
||||||
|
|
||||||
if (limitedp)
|
if (constrained)
|
||||||
{
|
{
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -87,7 +87,7 @@ volScalarField K("K", 0.5*magSqr(U));
|
|||||||
|
|
||||||
#include "readGravitationalAcceleration.H"
|
#include "readGravitationalAcceleration.H"
|
||||||
|
|
||||||
pressureControl pressureControl
|
pressureReference pressureReference
|
||||||
(
|
(
|
||||||
p,
|
p,
|
||||||
rho,
|
rho,
|
||||||
|
|||||||
@ -41,7 +41,7 @@ Description
|
|||||||
#include "fvModels.H"
|
#include "fvModels.H"
|
||||||
#include "fvConstraints.H"
|
#include "fvConstraints.H"
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
#include "pressureControl.H"
|
#include "pressureReference.H"
|
||||||
#include "CorrectPhi.H"
|
#include "CorrectPhi.H"
|
||||||
#include "localEulerDdtScheme.H"
|
#include "localEulerDdtScheme.H"
|
||||||
#include "fvcSmooth.H"
|
#include "fvcSmooth.H"
|
||||||
|
|||||||
@ -58,12 +58,12 @@ U.correctBoundaryConditions();
|
|||||||
fvConstraints.constrain(U);
|
fvConstraints.constrain(U);
|
||||||
K = 0.5*magSqr(U);
|
K = 0.5*magSqr(U);
|
||||||
|
|
||||||
bool limitedp = pressureControl.limit(p);
|
bool constrained = fvConstraints.constrain(p);
|
||||||
|
|
||||||
// Thermodynamic density update
|
// Thermodynamic density update
|
||||||
thermo.correctRho(psi*p - psip0);
|
thermo.correctRho(psi*p - psip0);
|
||||||
|
|
||||||
if (limitedp)
|
if (constrained)
|
||||||
{
|
{
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,7 +41,7 @@ Description
|
|||||||
#include "fvModels.H"
|
#include "fvModels.H"
|
||||||
#include "fvConstraints.H"
|
#include "fvConstraints.H"
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
#include "pressureControl.H"
|
#include "pressureReference.H"
|
||||||
#include "CorrectPhi.H"
|
#include "CorrectPhi.H"
|
||||||
#include "localEulerDdtScheme.H"
|
#include "localEulerDdtScheme.H"
|
||||||
#include "fvcSmooth.H"
|
#include "fvcSmooth.H"
|
||||||
|
|||||||
@ -36,7 +36,7 @@ if (fluid.found("pMin"))
|
|||||||
<< pimple.dict().name() << endl;
|
<< pimple.dict().name() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
pressureControl pressureControl
|
pressureReference pressureReference
|
||||||
(
|
(
|
||||||
p,
|
p,
|
||||||
p_rgh,
|
p_rgh,
|
||||||
@ -48,7 +48,6 @@ pressureControl pressureControl
|
|||||||
if (fluid.incompressible())
|
if (fluid.incompressible())
|
||||||
{
|
{
|
||||||
p = p_rgh + fluid.rho()*gh;
|
p = p_rgh + fluid.rho()*gh;
|
||||||
pressureControl.limit(p);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_rgh.needReference() && fluid.incompressible())
|
if (p_rgh.needReference() && fluid.incompressible())
|
||||||
@ -57,8 +56,8 @@ if (p_rgh.needReference() && fluid.incompressible())
|
|||||||
(
|
(
|
||||||
"p",
|
"p",
|
||||||
p.dimensions(),
|
p.dimensions(),
|
||||||
pressureControl.refValue()
|
pressureReference.refValue()
|
||||||
- getRefCellValue(p, pressureControl.refCell())
|
- getRefCellValue(p, pressureReference.refCell())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ Description
|
|||||||
#include "phaseSystem.H"
|
#include "phaseSystem.H"
|
||||||
#include "phaseDynamicMomentumTransportModel.H"
|
#include "phaseDynamicMomentumTransportModel.H"
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
#include "pressureControl.H"
|
#include "pressureReference.H"
|
||||||
#include "localEulerDdtScheme.H"
|
#include "localEulerDdtScheme.H"
|
||||||
#include "fvcSmooth.H"
|
#include "fvcSmooth.H"
|
||||||
|
|
||||||
|
|||||||
@ -259,8 +259,8 @@ while (pimple.correct())
|
|||||||
{
|
{
|
||||||
pEqn.setReference
|
pEqn.setReference
|
||||||
(
|
(
|
||||||
pressureControl.refCell(),
|
pressureReference.refCell(),
|
||||||
pressureControl.refValue()
|
pressureReference.refValue()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,7 +332,7 @@ while (pimple.correct())
|
|||||||
|
|
||||||
// Update and limit the static pressure
|
// Update and limit the static pressure
|
||||||
p = p_rgh + rho*gh;
|
p = p_rgh + rho*gh;
|
||||||
pressureControl.limit(p);
|
fvConstraints.constrain(p);
|
||||||
|
|
||||||
// Account for static pressure reference
|
// Account for static pressure reference
|
||||||
if (p_rgh.needReference() && fluid.incompressible())
|
if (p_rgh.needReference() && fluid.incompressible())
|
||||||
@ -341,8 +341,8 @@ while (pimple.correct())
|
|||||||
(
|
(
|
||||||
"p",
|
"p",
|
||||||
p.dimensions(),
|
p.dimensions(),
|
||||||
pressureControl.refValue()
|
pressureReference.refValue()
|
||||||
- getRefCellValue(p, pressureControl.refCell())
|
- getRefCellValue(p, pressureReference.refCell())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -250,8 +250,8 @@ while (pimple.correct())
|
|||||||
{
|
{
|
||||||
pEqn.setReference
|
pEqn.setReference
|
||||||
(
|
(
|
||||||
pressureControl.refCell(),
|
pressureReference.refCell(),
|
||||||
pressureControl.refValue()
|
pressureReference.refValue()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -310,7 +310,7 @@ while (pimple.correct())
|
|||||||
|
|
||||||
// Update and limit the static pressure
|
// Update and limit the static pressure
|
||||||
p = p_rgh + rho*gh;
|
p = p_rgh + rho*gh;
|
||||||
pressureControl.limit(p);
|
fvConstraints.constrain(p);
|
||||||
|
|
||||||
// Account for static pressure reference
|
// Account for static pressure reference
|
||||||
if (p_rgh.needReference() && fluid.incompressible())
|
if (p_rgh.needReference() && fluid.incompressible())
|
||||||
@ -319,8 +319,8 @@ while (pimple.correct())
|
|||||||
(
|
(
|
||||||
"p",
|
"p",
|
||||||
p.dimensions(),
|
p.dimensions(),
|
||||||
pressureControl.refValue()
|
pressureReference.refValue()
|
||||||
- getRefCellValue(p, pressureControl.refCell())
|
- getRefCellValue(p, pressureReference.refCell())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -408,7 +408,7 @@ $(general)/constrainHbyA/constrainHbyA.C
|
|||||||
$(general)/adjustPhi/adjustPhi.C
|
$(general)/adjustPhi/adjustPhi.C
|
||||||
$(general)/bound/bound.C
|
$(general)/bound/bound.C
|
||||||
$(general)/CorrectPhi/correctUphiBCs.C
|
$(general)/CorrectPhi/correctUphiBCs.C
|
||||||
$(general)/pressureControl/pressureControl.C
|
$(general)/pressureReference/pressureReference.C
|
||||||
$(general)/levelSet/levelSet.C
|
$(general)/levelSet/levelSet.C
|
||||||
|
|
||||||
solutionControl = $(general)/solutionControl
|
solutionControl = $(general)/solutionControl
|
||||||
|
|||||||
@ -38,17 +38,21 @@ namespace Foam
|
|||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::fvConstraint::constrainType
|
bool Foam::fvConstraint::constrainType
|
||||||
(
|
(
|
||||||
fvMatrix<Type>& eqn,
|
fvMatrix<Type>& eqn,
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
) const
|
) const
|
||||||
{}
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::fvConstraint::constrainType(VolField<Type>& field) const
|
bool Foam::fvConstraint::constrainType(VolField<Type>& field) const
|
||||||
{}
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -76,7 +76,7 @@ class fvConstraint
|
|||||||
|
|
||||||
//- Apply a constraint to an equation
|
//- Apply a constraint to an equation
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void constrainType
|
bool constrainType
|
||||||
(
|
(
|
||||||
fvMatrix<Type>& eqn,
|
fvMatrix<Type>& eqn,
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
@ -84,7 +84,7 @@ class fvConstraint
|
|||||||
|
|
||||||
//- Apply constraint to a field
|
//- Apply constraint to a field
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void constrainType(VolField<Type>& field) const;
|
bool constrainType(VolField<Type>& field) const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -24,32 +24,32 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#define DEFINE_FV_CONSTRAINT_CONSTRAIN(Type, nullArg) \
|
#define DEFINE_FV_CONSTRAINT_CONSTRAIN(Type, nullArg) \
|
||||||
virtual void constrain \
|
virtual bool constrain \
|
||||||
( \
|
( \
|
||||||
fvMatrix<Type>& eqn, \
|
fvMatrix<Type>& eqn, \
|
||||||
const word& fieldName \
|
const word& fieldName \
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
#define IMPLEMENT_FV_CONSTRAINT_CONSTRAIN(Type, constraintType) \
|
#define IMPLEMENT_FV_CONSTRAINT_CONSTRAIN(Type, constraintType) \
|
||||||
void Foam::constraintType::constrain \
|
bool Foam::constraintType::constrain \
|
||||||
( \
|
( \
|
||||||
fvMatrix<Type>& eqn, \
|
fvMatrix<Type>& eqn, \
|
||||||
const word& fieldName \
|
const word& fieldName \
|
||||||
) const \
|
) const \
|
||||||
{ \
|
{ \
|
||||||
constrainType(eqn, fieldName); \
|
return constrainType(eqn, fieldName); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#define DEFINE_FV_CONSTRAINT_CONSTRAIN_FIELD(Type, nullArg) \
|
#define DEFINE_FV_CONSTRAINT_CONSTRAIN_FIELD(Type, nullArg) \
|
||||||
virtual void constrain(VolField<Type>& field) const;
|
virtual bool constrain(VolField<Type>& field) const;
|
||||||
|
|
||||||
#define IMPLEMENT_FV_CONSTRAINT_CONSTRAIN_FIELD(Type, constraintType) \
|
#define IMPLEMENT_FV_CONSTRAINT_CONSTRAIN_FIELD(Type, constraintType) \
|
||||||
void Foam::constraintType::constrain(VolField<Type>& field) const \
|
bool Foam::constraintType::constrain(VolField<Type>& field) const \
|
||||||
{ \
|
{ \
|
||||||
constrainType(field); \
|
return constrainType(field); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -128,11 +128,11 @@ public:
|
|||||||
|
|
||||||
//- Apply constraints to an equation
|
//- Apply constraints to an equation
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void constrain(fvMatrix<Type>& eqn) const;
|
bool constrain(fvMatrix<Type>& eqn) const;
|
||||||
|
|
||||||
//- Apply constraints to a field
|
//- Apply constraints to a field
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void constrain
|
bool constrain
|
||||||
(
|
(
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field
|
GeometricField<Type, fvPatchField, volMesh>& field
|
||||||
) const;
|
) const;
|
||||||
|
|||||||
@ -26,12 +26,14 @@ License
|
|||||||
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::fvConstraints::constrain(fvMatrix<Type>& eqn) const
|
bool Foam::fvConstraints::constrain(fvMatrix<Type>& eqn) const
|
||||||
{
|
{
|
||||||
checkApplied();
|
checkApplied();
|
||||||
|
|
||||||
const PtrListDictionary<fvConstraint>& constraintList(*this);
|
const PtrListDictionary<fvConstraint>& constraintList(*this);
|
||||||
|
|
||||||
|
bool constrained = false;
|
||||||
|
|
||||||
forAll(constraintList, i)
|
forAll(constraintList, i)
|
||||||
{
|
{
|
||||||
const fvConstraint& constraint = constraintList[i];
|
const fvConstraint& constraint = constraintList[i];
|
||||||
@ -46,14 +48,17 @@ void Foam::fvConstraints::constrain(fvMatrix<Type>& eqn) const
|
|||||||
<< " to field " << eqn.psi().name() << endl;
|
<< " to field " << eqn.psi().name() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
constraint.constrain(eqn, eqn.psi().name());
|
constrained =
|
||||||
|
constrained || constraint.constrain(eqn, eqn.psi().name());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return constrained;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::fvConstraints::constrain
|
bool Foam::fvConstraints::constrain
|
||||||
(
|
(
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field
|
GeometricField<Type, fvPatchField, volMesh>& field
|
||||||
) const
|
) const
|
||||||
@ -62,6 +67,8 @@ void Foam::fvConstraints::constrain
|
|||||||
|
|
||||||
const PtrListDictionary<fvConstraint>& constraintList(*this);
|
const PtrListDictionary<fvConstraint>& constraintList(*this);
|
||||||
|
|
||||||
|
bool constrained = false;
|
||||||
|
|
||||||
forAll(constraintList, i)
|
forAll(constraintList, i)
|
||||||
{
|
{
|
||||||
const fvConstraint& constraint = constraintList[i];
|
const fvConstraint& constraint = constraintList[i];
|
||||||
@ -76,9 +83,12 @@ void Foam::fvConstraints::constrain
|
|||||||
<< " for field " << fieldName << endl;
|
<< " for field " << fieldName << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
constraint.constrain(field);
|
constrained =
|
||||||
|
constrained || constraint.constrain(field);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return constrained;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,285 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration | Website: https://openfoam.org
|
|
||||||
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "pressureControl.H"
|
|
||||||
#include "findRefCell.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::pressureControl::pressureControl
|
|
||||||
(
|
|
||||||
const volScalarField& p,
|
|
||||||
const volScalarField& pRef,
|
|
||||||
const volScalarField& rho,
|
|
||||||
const dictionary& dict,
|
|
||||||
const bool pRefRequired
|
|
||||||
)
|
|
||||||
:
|
|
||||||
refCell_(-1),
|
|
||||||
refValue_(0),
|
|
||||||
pMax_("pMax", dimPressure, great),
|
|
||||||
pMin_("pMin", dimPressure, 0),
|
|
||||||
limitMaxP_(false),
|
|
||||||
limitMinP_(false)
|
|
||||||
{
|
|
||||||
bool pLimits = false;
|
|
||||||
scalar pMax = -great;
|
|
||||||
scalar pMin = great;
|
|
||||||
|
|
||||||
// Set the reference cell and value for closed domain simulations
|
|
||||||
if (pRefRequired && setRefCell(p, pRef, dict, refCell_, refValue_))
|
|
||||||
{
|
|
||||||
pLimits = true;
|
|
||||||
|
|
||||||
pMax = refValue_;
|
|
||||||
pMin = refValue_;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dict.found("pMax") && dict.found("pMin"))
|
|
||||||
{
|
|
||||||
pMax_.value() = dict.lookup<scalar>("pMax");
|
|
||||||
limitMaxP_ = true;
|
|
||||||
pMin_.value() = dict.lookup<scalar>("pMin");
|
|
||||||
limitMinP_ = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
const volScalarField::Boundary& pbf = p.boundaryField();
|
|
||||||
const volScalarField::Boundary& rhobf = rho.boundaryField();
|
|
||||||
|
|
||||||
scalar rhoRefMax = -great;
|
|
||||||
scalar rhoRefMin = great;
|
|
||||||
bool rhoLimits = false;
|
|
||||||
|
|
||||||
forAll(pbf, patchi)
|
|
||||||
{
|
|
||||||
if (pbf[patchi].fixesValue())
|
|
||||||
{
|
|
||||||
pLimits = true;
|
|
||||||
rhoLimits = true;
|
|
||||||
|
|
||||||
pMax = max(pMax, max(pbf[patchi]));
|
|
||||||
pMin = min(pMin, min(pbf[patchi]));
|
|
||||||
|
|
||||||
rhoRefMax = max(rhoRefMax, max(rhobf[patchi]));
|
|
||||||
rhoRefMin = min(rhoRefMin, min(rhobf[patchi]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
reduce(rhoLimits, andOp<bool>());
|
|
||||||
if (rhoLimits)
|
|
||||||
{
|
|
||||||
reduce(pMax, maxOp<scalar>());
|
|
||||||
reduce(pMin, minOp<scalar>());
|
|
||||||
|
|
||||||
reduce(rhoRefMax, maxOp<scalar>());
|
|
||||||
reduce(rhoRefMin, minOp<scalar>());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dict.found("pMax"))
|
|
||||||
{
|
|
||||||
pMax_.value() = dict.lookup<scalar>("pMax");
|
|
||||||
limitMaxP_ = true;
|
|
||||||
}
|
|
||||||
else if (dict.found("pMaxFactor"))
|
|
||||||
{
|
|
||||||
if (!pLimits)
|
|
||||||
{
|
|
||||||
FatalIOErrorInFunction(dict)
|
|
||||||
<< "'pMaxFactor' specified rather than 'pMax'" << nl
|
|
||||||
<< " but the corresponding reference pressure cannot"
|
|
||||||
" be evaluated from the boundary conditions." << nl
|
|
||||||
<< " Please specify 'pMax' rather than 'pMaxFactor'"
|
|
||||||
<< exit(FatalIOError);
|
|
||||||
}
|
|
||||||
|
|
||||||
const scalar pMaxFactor(dict.lookup<scalar>("pMaxFactor"));
|
|
||||||
pMax_.value() = pMaxFactor*pMax;
|
|
||||||
limitMaxP_ = true;
|
|
||||||
}
|
|
||||||
else if (dict.found("rhoMax"))
|
|
||||||
{
|
|
||||||
// For backward-compatibility infer the pMax from rhoMax
|
|
||||||
|
|
||||||
IOWarningInFunction(dict)
|
|
||||||
<< "'rhoMax' specified rather than 'pMax' or 'pMaxFactor'"
|
|
||||||
<< nl
|
|
||||||
<< " This is supported for backward-compatibility but "
|
|
||||||
"'pMax' or 'pMaxFactor' are more reliable." << endl;
|
|
||||||
|
|
||||||
if (!pLimits)
|
|
||||||
{
|
|
||||||
FatalIOErrorInFunction(dict)
|
|
||||||
<< "'rhoMax' specified rather than 'pMax'" << nl
|
|
||||||
<< " but the corresponding reference pressure cannot"
|
|
||||||
" be evaluated from the boundary conditions." << nl
|
|
||||||
<< " Please specify 'pMax' rather than 'rhoMax'"
|
|
||||||
<< exit(FatalIOError);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!rhoLimits)
|
|
||||||
{
|
|
||||||
FatalIOErrorInFunction(dict)
|
|
||||||
<< "'rhoMax' specified rather than 'pMaxFactor'" << nl
|
|
||||||
<< " but the corresponding reference density cannot"
|
|
||||||
" be evaluated from the boundary conditions." << nl
|
|
||||||
<< " Please specify 'pMaxFactor' rather than 'rhoMax'"
|
|
||||||
<< exit(FatalIOError);
|
|
||||||
}
|
|
||||||
|
|
||||||
dimensionedScalar rhoMax("rhoMax", dimDensity, dict);
|
|
||||||
|
|
||||||
pMax_.value() = max(rhoMax.value()/rhoRefMax, 1)*pMax;
|
|
||||||
limitMaxP_ = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dict.found("pMin"))
|
|
||||||
{
|
|
||||||
pMin_.value() = dict.lookup<scalar>("pMin");
|
|
||||||
limitMinP_ = true;
|
|
||||||
}
|
|
||||||
else if (dict.found("pMinFactor"))
|
|
||||||
{
|
|
||||||
if (!pLimits)
|
|
||||||
{
|
|
||||||
FatalIOErrorInFunction(dict)
|
|
||||||
<< "'pMinFactor' specified rather than 'pMin'" << nl
|
|
||||||
<< " but the corresponding reference pressure cannot"
|
|
||||||
" be evaluated from the boundary conditions." << nl
|
|
||||||
<< " Please specify 'pMin' rather than 'pMinFactor'"
|
|
||||||
<< exit(FatalIOError);
|
|
||||||
}
|
|
||||||
|
|
||||||
const scalar pMinFactor(dict.lookup<scalar>("pMinFactor"));
|
|
||||||
pMin_.value() = pMinFactor*pMin;
|
|
||||||
limitMinP_ = true;
|
|
||||||
}
|
|
||||||
else if (dict.found("rhoMin"))
|
|
||||||
{
|
|
||||||
// For backward-compatibility infer the pMin from rhoMin
|
|
||||||
|
|
||||||
IOWarningInFunction(dict)
|
|
||||||
<< "'rhoMin' specified rather than 'pMin' or 'pMinFactor'" << nl
|
|
||||||
<< " This is supported for backward-compatibility but"
|
|
||||||
"'pMin' or 'pMinFactor' are more reliable." << endl;
|
|
||||||
|
|
||||||
if (!pLimits)
|
|
||||||
{
|
|
||||||
FatalIOErrorInFunction(dict)
|
|
||||||
<< "'rhoMin' specified rather than 'pMin'" << nl
|
|
||||||
<< " but the corresponding reference pressure cannot"
|
|
||||||
" be evaluated from the boundary conditions." << nl
|
|
||||||
<< " Please specify 'pMin' rather than 'rhoMin'"
|
|
||||||
<< exit(FatalIOError);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!rhoLimits)
|
|
||||||
{
|
|
||||||
FatalIOErrorInFunction(dict)
|
|
||||||
<< "'rhoMin' specified rather than 'pMinFactor'" << nl
|
|
||||||
<< " but the corresponding reference density cannot"
|
|
||||||
" be evaluated from the boundary conditions." << nl
|
|
||||||
<< " Please specify 'pMinFactor' rather than 'rhoMin'"
|
|
||||||
<< exit(FatalIOError);
|
|
||||||
}
|
|
||||||
|
|
||||||
dimensionedScalar rhoMin("rhoMin", dimDensity, dict);
|
|
||||||
|
|
||||||
pMin_.value() = min(rhoMin.value()/rhoRefMin, 1)*pMin;
|
|
||||||
limitMinP_ = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (limitMaxP_ || limitMinP_)
|
|
||||||
{
|
|
||||||
Info<< "pressureControl" << nl;
|
|
||||||
|
|
||||||
if (limitMaxP_)
|
|
||||||
{
|
|
||||||
Info<< " pMax " << pMax_.value() << nl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (limitMinP_)
|
|
||||||
{
|
|
||||||
Info<< " pMin " << pMin_.value() << nl;
|
|
||||||
}
|
|
||||||
|
|
||||||
Info << endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::pressureControl::pressureControl
|
|
||||||
(
|
|
||||||
const volScalarField& p,
|
|
||||||
const volScalarField& rho,
|
|
||||||
const dictionary& dict,
|
|
||||||
const bool pRefRequired
|
|
||||||
)
|
|
||||||
:
|
|
||||||
pressureControl(p, p, rho, dict, pRefRequired)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
bool Foam::pressureControl::limit(volScalarField& p) const
|
|
||||||
{
|
|
||||||
if (limitMaxP_ || limitMinP_)
|
|
||||||
{
|
|
||||||
if (limitMaxP_)
|
|
||||||
{
|
|
||||||
const scalar pMax = max(p).value();
|
|
||||||
|
|
||||||
if (pMax > pMax_.value())
|
|
||||||
{
|
|
||||||
Info<< "pressureControl: p max " << pMax << endl;
|
|
||||||
p = min(p, pMax_);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (limitMinP_)
|
|
||||||
{
|
|
||||||
const scalar pMin = min(p).value();
|
|
||||||
|
|
||||||
if (pMin < pMin_.value())
|
|
||||||
{
|
|
||||||
Info<< "pressureControl: p min " << pMin << endl;
|
|
||||||
p = max(p, pMin_);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
p.correctBoundaryConditions();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -0,0 +1,124 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "pressureReference.H"
|
||||||
|
#include "findRefCell.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::pressureReference::pressureReference
|
||||||
|
(
|
||||||
|
const volScalarField& p,
|
||||||
|
const volScalarField& pRef,
|
||||||
|
const volScalarField& rho,
|
||||||
|
const dictionary& dict,
|
||||||
|
const bool pRefRequired
|
||||||
|
)
|
||||||
|
:
|
||||||
|
refCell_(-1),
|
||||||
|
refValue_(0)
|
||||||
|
{
|
||||||
|
// Set the reference cell and value for closed domain simulations
|
||||||
|
if (pRefRequired)
|
||||||
|
{
|
||||||
|
setRefCell(p, pRef, dict, refCell_, refValue_);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Print update message fvSolution -> fvConstraints
|
||||||
|
if
|
||||||
|
(
|
||||||
|
dict.found("pMin")
|
||||||
|
|| dict.found("pMax")
|
||||||
|
|| dict.found("pMinFactor")
|
||||||
|
|| dict.found("pMaxFactor")
|
||||||
|
|| dict.found("rhoMin")
|
||||||
|
|| dict.found("rhoMax")
|
||||||
|
)
|
||||||
|
{
|
||||||
|
FatalIOErrorInFunction(dict)
|
||||||
|
<< "Pressure limits should now be specified in fvConstraints:\n\n"
|
||||||
|
"limitp\n"
|
||||||
|
"{\n"
|
||||||
|
" type limitPressure;\n"
|
||||||
|
"\n";
|
||||||
|
|
||||||
|
if (dict.found("pMin"))
|
||||||
|
{
|
||||||
|
FatalIOError
|
||||||
|
<< " min " << dict.lookup<scalar>("pMin")
|
||||||
|
<< ";\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dict.found("pMax"))
|
||||||
|
{
|
||||||
|
FatalIOError
|
||||||
|
<< " max " << dict.lookup<scalar>("pMax")
|
||||||
|
<< ";\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dict.found("pMinFactor"))
|
||||||
|
{
|
||||||
|
FatalIOError
|
||||||
|
<< " minFactor " << dict.lookup<scalar>("pMinFactor")
|
||||||
|
<< ";\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dict.found("pMaxFactor"))
|
||||||
|
{
|
||||||
|
FatalIOError
|
||||||
|
<< " maxFactor " << dict.lookup<scalar>("pMaxFactor")
|
||||||
|
<< ";\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
FatalIOError << "}\n";
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
dict.found("rhoMin")
|
||||||
|
|| dict.found("rhoMax")
|
||||||
|
)
|
||||||
|
{
|
||||||
|
FatalIOError
|
||||||
|
<< "\nrhoMin and rhoMax are no longer supported.\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
FatalIOError << exit(FatalIOError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::pressureReference::pressureReference
|
||||||
|
(
|
||||||
|
const volScalarField& p,
|
||||||
|
const volScalarField& rho,
|
||||||
|
const dictionary& dict,
|
||||||
|
const bool pRefRequired
|
||||||
|
)
|
||||||
|
:
|
||||||
|
pressureReference(p, p, rho, dict, pRefRequired)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,21 +22,19 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::pressureControl
|
Foam::pressureReference
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Provides controls for the pressure reference in closed-volume simulations
|
Provides controls for the pressure reference in closed-volume simulations
|
||||||
and a general method for limiting the pressure during the startup of
|
|
||||||
steady-state simulations.
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
pressureControlI.H
|
pressureReferenceI.H
|
||||||
pressureControl.C
|
pressureReference.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef pressureControl_H
|
#ifndef pressureReference_H
|
||||||
#define pressureControl_H
|
#define pressureReference_H
|
||||||
|
|
||||||
#include "dimensionedScalar.H"
|
#include "dimensionedScalar.H"
|
||||||
#include "volFieldsFwd.H"
|
#include "volFieldsFwd.H"
|
||||||
@ -47,10 +45,10 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class pressureControl Declaration
|
Class pressureReference Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class pressureControl
|
class pressureReference
|
||||||
{
|
{
|
||||||
// Private Data
|
// Private Data
|
||||||
|
|
||||||
@ -60,18 +58,6 @@ class pressureControl
|
|||||||
//- Optional pressure reference level
|
//- Optional pressure reference level
|
||||||
scalar refValue_;
|
scalar refValue_;
|
||||||
|
|
||||||
//- Pressure lower-limit
|
|
||||||
dimensionedScalar pMax_;
|
|
||||||
|
|
||||||
//- Pressure upper-limit
|
|
||||||
dimensionedScalar pMin_;
|
|
||||||
|
|
||||||
//- Pressure lower-limit
|
|
||||||
bool limitMaxP_;
|
|
||||||
|
|
||||||
//- Pressure upper-limit
|
|
||||||
bool limitMinP_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -79,7 +65,7 @@ public:
|
|||||||
|
|
||||||
//- Construct from the simple/pimple sub-dictionary
|
//- Construct from the simple/pimple sub-dictionary
|
||||||
// supporting the pressure and derived pressure fields (e.g. p_rgh)
|
// supporting the pressure and derived pressure fields (e.g. p_rgh)
|
||||||
pressureControl
|
pressureReference
|
||||||
(
|
(
|
||||||
const volScalarField& p,
|
const volScalarField& p,
|
||||||
const volScalarField& pRef,
|
const volScalarField& pRef,
|
||||||
@ -89,7 +75,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from the simple/pimple sub-dictionary
|
//- Construct from the simple/pimple sub-dictionary
|
||||||
pressureControl
|
pressureReference
|
||||||
(
|
(
|
||||||
const volScalarField& p,
|
const volScalarField& p,
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
@ -105,9 +91,6 @@ public:
|
|||||||
|
|
||||||
//- Return the pressure reference level
|
//- Return the pressure reference level
|
||||||
inline scalar refValue() const;
|
inline scalar refValue() const;
|
||||||
|
|
||||||
//- Limit the pressure if necessary and return true if so
|
|
||||||
bool limit(volScalarField& p) const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -117,7 +100,7 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "pressureControlI.H"
|
#include "pressureReferenceI.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,13 +25,13 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline Foam::label Foam::pressureControl::refCell() const
|
inline Foam::label Foam::pressureReference::refCell() const
|
||||||
{
|
{
|
||||||
return refCell_;
|
return refCell_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::scalar Foam::pressureControl::refValue() const
|
inline Foam::scalar Foam::pressureReference::refValue() const
|
||||||
{
|
{
|
||||||
return refValue_;
|
return refValue_;
|
||||||
}
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
fixedValueConstraint/fixedValueConstraint.C
|
fixedValueConstraint/fixedValueConstraint.C
|
||||||
fixedTemperatureConstraint/fixedTemperatureConstraint.C
|
fixedTemperatureConstraint/fixedTemperatureConstraint.C
|
||||||
limitTemperature/limitTemperature.C
|
limitTemperature/limitTemperature.C
|
||||||
|
limitPressure/limitPressure.C
|
||||||
limitVelocity/limitVelocity.C
|
limitVelocity/limitVelocity.C
|
||||||
meanVelocityForce/meanVelocityForce.C
|
meanVelocityForce/meanVelocityForce.C
|
||||||
meanVelocityForce/patchMeanVelocityForce/patchMeanVelocityForce.C
|
meanVelocityForce/patchMeanVelocityForce/patchMeanVelocityForce.C
|
||||||
|
|||||||
@ -119,7 +119,7 @@ Foam::wordList Foam::fv::fixedTemperatureConstraint::constrainedFields() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::fixedTemperatureConstraint::constrain
|
bool Foam::fv::fixedTemperatureConstraint::constrain
|
||||||
(
|
(
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
@ -151,6 +151,8 @@ void Foam::fv::fixedTemperatureConstraint::constrain
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return cells.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -149,7 +149,7 @@ public:
|
|||||||
virtual wordList constrainedFields() const;
|
virtual wordList constrainedFields() const;
|
||||||
|
|
||||||
//- Constrain energy equation to fix the temperature
|
//- Constrain energy equation to fix the temperature
|
||||||
virtual void constrain
|
virtual bool constrain
|
||||||
(
|
(
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
|
|||||||
@ -70,7 +70,7 @@ void Foam::fv::fixedValueConstraint::readCoeffs()
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::fv::fixedValueConstraint::constrainType
|
bool Foam::fv::fixedValueConstraint::constrainType
|
||||||
(
|
(
|
||||||
fvMatrix<Type>& eqn,
|
fvMatrix<Type>& eqn,
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
@ -83,6 +83,8 @@ void Foam::fv::fixedValueConstraint::constrainType
|
|||||||
set_.cells(),
|
set_.cells(),
|
||||||
List<Type>(set_.cells().size(), fieldValues_[fieldName]->value<Type>(t))
|
List<Type>(set_.cells().size(), fieldValues_[fieldName]->value<Type>(t))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
return set_.cells().size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -89,7 +89,7 @@ class fixedValueConstraint
|
|||||||
|
|
||||||
//- Set value on a field
|
//- Set value on a field
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void constrainType(fvMatrix<Type>& eqn, const word& fieldName) const;
|
bool constrainType(fvMatrix<Type>& eqn, const word& fieldName) const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
222
src/fvConstraints/limitPressure/limitPressure.C
Normal file
222
src/fvConstraints/limitPressure/limitPressure.C
Normal file
@ -0,0 +1,222 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "limitPressure.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace fv
|
||||||
|
{
|
||||||
|
defineTypeNameAndDebug(limitPressure, 0);
|
||||||
|
addToRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
fvConstraint,
|
||||||
|
limitPressure,
|
||||||
|
dictionary
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::fv::limitPressure::readCoeffs()
|
||||||
|
{
|
||||||
|
const dictionary& dict(coeffs());
|
||||||
|
|
||||||
|
if (dict.found("min") && dict.found("max"))
|
||||||
|
{
|
||||||
|
pMin_.value() = dict.lookup<scalar>("min");
|
||||||
|
limitMinP_ = true;
|
||||||
|
|
||||||
|
pMax_.value() = dict.lookup<scalar>("max");
|
||||||
|
limitMaxP_ = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const volScalarField& p = mesh().lookupObject<volScalarField>("p");
|
||||||
|
const volScalarField::Boundary& pbf = p.boundaryField();
|
||||||
|
|
||||||
|
bool pLimits = false;
|
||||||
|
scalar pMin = vGreat;
|
||||||
|
scalar pMax = -vGreat;
|
||||||
|
|
||||||
|
forAll(pbf, patchi)
|
||||||
|
{
|
||||||
|
if (pbf[patchi].fixesValue())
|
||||||
|
{
|
||||||
|
pLimits = true;
|
||||||
|
|
||||||
|
pMin = min(pMin, min(pbf[patchi]));
|
||||||
|
pMax = max(pMax, max(pbf[patchi]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dict.found("min"))
|
||||||
|
{
|
||||||
|
pMin_.value() = dict.lookup<scalar>("min");
|
||||||
|
limitMinP_ = true;
|
||||||
|
}
|
||||||
|
else if (dict.found("minFactor"))
|
||||||
|
{
|
||||||
|
if (!pLimits)
|
||||||
|
{
|
||||||
|
FatalIOErrorInFunction(dict)
|
||||||
|
<< "'minFactor' specified rather than 'min'" << nl
|
||||||
|
<< " but the corresponding reference pressure cannot"
|
||||||
|
" be evaluated from the boundary conditions." << nl
|
||||||
|
<< " Please specify 'min' rather than 'minFactor'"
|
||||||
|
<< exit(FatalIOError);
|
||||||
|
}
|
||||||
|
|
||||||
|
const scalar pMinFactor(dict.lookup<scalar>("minFactor"));
|
||||||
|
pMin_.value() = pMinFactor*pMin;
|
||||||
|
limitMinP_ = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dict.found("max"))
|
||||||
|
{
|
||||||
|
pMax_.value() = dict.lookup<scalar>("max");
|
||||||
|
limitMaxP_ = true;
|
||||||
|
}
|
||||||
|
else if (dict.found("maxFactor"))
|
||||||
|
{
|
||||||
|
if (!pLimits)
|
||||||
|
{
|
||||||
|
FatalIOErrorInFunction(dict)
|
||||||
|
<< "'maxFactor' specified rather than 'max'" << nl
|
||||||
|
<< " but the corresponding reference pressure cannot"
|
||||||
|
" be evaluated from the boundary conditions." << nl
|
||||||
|
<< " Please specify 'max' rather than 'maxFactor'"
|
||||||
|
<< exit(FatalIOError);
|
||||||
|
}
|
||||||
|
|
||||||
|
const scalar pMaxFactor(dict.lookup<scalar>("maxFactor"));
|
||||||
|
pMax_.value() = pMaxFactor*pMax;
|
||||||
|
limitMaxP_ = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (limitMinP_ || limitMaxP_)
|
||||||
|
{
|
||||||
|
if (limitMinP_)
|
||||||
|
{
|
||||||
|
Info<< " min " << pMin_.value() << nl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (limitMaxP_)
|
||||||
|
{
|
||||||
|
Info<< " max " << pMax_.value() << nl;
|
||||||
|
}
|
||||||
|
|
||||||
|
Info << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::fv::limitPressure::limitPressure
|
||||||
|
(
|
||||||
|
const word& name,
|
||||||
|
const word& modelType,
|
||||||
|
const dictionary& dict,
|
||||||
|
const fvMesh& mesh
|
||||||
|
)
|
||||||
|
:
|
||||||
|
fvConstraint(name, modelType, dict, mesh),
|
||||||
|
pMin_("pMin", dimPressure, 0),
|
||||||
|
pMax_("pMax", dimPressure, great),
|
||||||
|
limitMinP_(false),
|
||||||
|
limitMaxP_(false)
|
||||||
|
{
|
||||||
|
readCoeffs();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::wordList Foam::fv::limitPressure::constrainedFields() const
|
||||||
|
{
|
||||||
|
return wordList(1, "p");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::fv::limitPressure::constrain(volScalarField& p) const
|
||||||
|
{
|
||||||
|
bool constrained = false;
|
||||||
|
|
||||||
|
if (limitMinP_ || limitMaxP_)
|
||||||
|
{
|
||||||
|
if (limitMinP_)
|
||||||
|
{
|
||||||
|
const scalar pMin = min(p).value();
|
||||||
|
|
||||||
|
if (pMin < pMin_.value())
|
||||||
|
{
|
||||||
|
Info<< "limitPressure: p min " << pMin << endl;
|
||||||
|
p = max(p, pMin_);
|
||||||
|
constrained = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (limitMaxP_)
|
||||||
|
{
|
||||||
|
const scalar pMax = max(p).value();
|
||||||
|
|
||||||
|
if (pMax > pMax_.value())
|
||||||
|
{
|
||||||
|
Info<< "limitPressure: p max " << pMax << endl;
|
||||||
|
p = min(p, pMax_);
|
||||||
|
constrained = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
p.correctBoundaryConditions();
|
||||||
|
}
|
||||||
|
|
||||||
|
return constrained;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::fv::limitPressure::read(const dictionary& dict)
|
||||||
|
{
|
||||||
|
if (fvConstraint::read(dict))
|
||||||
|
{
|
||||||
|
readCoeffs();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
143
src/fvConstraints/limitPressure/limitPressure.H
Normal file
143
src/fvConstraints/limitPressure/limitPressure.H
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::fv::limitPressure
|
||||||
|
|
||||||
|
Description
|
||||||
|
Limits the pressure to be between minimum and maximum values.
|
||||||
|
|
||||||
|
Usage
|
||||||
|
Example usage:
|
||||||
|
\verbatim
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
min 200;
|
||||||
|
max 500;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
limitPressure.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef limitPressure_H
|
||||||
|
#define limitPressure_H
|
||||||
|
|
||||||
|
#include "fvConstraint.H"
|
||||||
|
#include "dimensionedScalar.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace fv
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class limitPressure Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class limitPressure
|
||||||
|
:
|
||||||
|
public fvConstraint
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
//- Minimum pressure limit
|
||||||
|
dimensionedScalar pMin_;
|
||||||
|
|
||||||
|
//- Maximum pressure limit
|
||||||
|
dimensionedScalar pMax_;
|
||||||
|
|
||||||
|
//- Pressure min-limited
|
||||||
|
bool limitMinP_;
|
||||||
|
|
||||||
|
//- Pressure max-limited
|
||||||
|
bool limitMaxP_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Non-virtual read
|
||||||
|
void readCoeffs();
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("limitPressure");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
limitPressure
|
||||||
|
(
|
||||||
|
const word& name,
|
||||||
|
const word& modelType,
|
||||||
|
const dictionary& dict,
|
||||||
|
const fvMesh& mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construction
|
||||||
|
limitPressure(const limitPressure&) = delete;
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~limitPressure()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return the list of fields constrained by the fvConstraint
|
||||||
|
virtual wordList constrainedFields() const;
|
||||||
|
|
||||||
|
//- Constrain the energy field
|
||||||
|
virtual bool constrain(volScalarField& he) const;
|
||||||
|
|
||||||
|
//- Read dictionary
|
||||||
|
virtual bool read(const dictionary& dict);
|
||||||
|
|
||||||
|
|
||||||
|
// Member Operators
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const limitPressure&) = delete;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace fv
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -88,7 +88,7 @@ Foam::wordList Foam::fv::limitTemperature::constrainedFields() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::limitTemperature::constrain(volScalarField& he) const
|
bool Foam::fv::limitTemperature::constrain(volScalarField& he) const
|
||||||
{
|
{
|
||||||
const basicThermo& thermo =
|
const basicThermo& thermo =
|
||||||
mesh().lookupObject<basicThermo>
|
mesh().lookupObject<basicThermo>
|
||||||
@ -137,6 +137,8 @@ void Foam::fv::limitTemperature::constrain(volScalarField& he) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return cells.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -122,7 +122,7 @@ public:
|
|||||||
virtual wordList constrainedFields() const;
|
virtual wordList constrainedFields() const;
|
||||||
|
|
||||||
//- Constrain the energy field
|
//- Constrain the energy field
|
||||||
virtual void constrain(volScalarField& he) const;
|
virtual bool constrain(volScalarField& he) const;
|
||||||
|
|
||||||
//- Update for mesh changes
|
//- Update for mesh changes
|
||||||
virtual void updateMesh(const mapPolyMesh&);
|
virtual void updateMesh(const mapPolyMesh&);
|
||||||
|
|||||||
@ -80,7 +80,7 @@ Foam::wordList Foam::fv::limitVelocity::constrainedFields() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::limitVelocity::constrain(volVectorField& U) const
|
bool Foam::fv::limitVelocity::constrain(volVectorField& U) const
|
||||||
{
|
{
|
||||||
const scalar maxSqrU = sqr(max_);
|
const scalar maxSqrU = sqr(max_);
|
||||||
|
|
||||||
@ -123,6 +123,8 @@ void Foam::fv::limitVelocity::constrain(volVectorField& U) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return cells.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -116,7 +116,7 @@ public:
|
|||||||
virtual wordList constrainedFields() const;
|
virtual wordList constrainedFields() const;
|
||||||
|
|
||||||
//- Constrain the velocity field
|
//- Constrain the velocity field
|
||||||
virtual void constrain(volVectorField& U) const;
|
virtual bool constrain(volVectorField& U) const;
|
||||||
|
|
||||||
//- Update for mesh changes
|
//- Update for mesh changes
|
||||||
virtual void updateMesh(const mapPolyMesh&);
|
virtual void updateMesh(const mapPolyMesh&);
|
||||||
|
|||||||
@ -149,7 +149,7 @@ Foam::scalar Foam::fv::meanVelocityForce::magUbarAve
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::meanVelocityForce::constrain
|
bool Foam::fv::meanVelocityForce::constrain
|
||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
@ -201,10 +201,12 @@ void Foam::fv::meanVelocityForce::constrain
|
|||||||
|
|
||||||
gradP0_ += dGradP_;
|
gradP0_ += dGradP_;
|
||||||
dGradP_ = 0;
|
dGradP_ = 0;
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::meanVelocityForce::constrain(volVectorField& U) const
|
bool Foam::fv::meanVelocityForce::constrain(volVectorField& U) const
|
||||||
{
|
{
|
||||||
const scalarField& rAU = rAPtr_();
|
const scalarField& rAU = rAPtr_();
|
||||||
|
|
||||||
@ -240,6 +242,8 @@ void Foam::fv::meanVelocityForce::constrain(volVectorField& U) const
|
|||||||
<< ", pressure gradient = " << gradP << endl;
|
<< ", pressure gradient = " << gradP << endl;
|
||||||
|
|
||||||
writeProps(gradP);
|
writeProps(gradP);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -146,14 +146,14 @@ public:
|
|||||||
virtual wordList constrainedFields() const;
|
virtual wordList constrainedFields() const;
|
||||||
|
|
||||||
//- Add the momentum source and set the 1/A coefficient
|
//- Add the momentum source and set the 1/A coefficient
|
||||||
virtual void constrain
|
virtual bool constrain
|
||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
//- Correct the pressure gradient
|
//- Correct the pressure gradient
|
||||||
virtual void constrain(volVectorField& U) const;
|
virtual bool constrain(volVectorField& U) const;
|
||||||
|
|
||||||
//- Update for mesh changes
|
//- Update for mesh changes
|
||||||
virtual void updateMesh(const mapPolyMesh&);
|
virtual void updateMesh(const mapPolyMesh&);
|
||||||
|
|||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvConstraints;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
minFactor 0.5;
|
||||||
|
maxFactor 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -52,9 +52,6 @@ PIMPLE
|
|||||||
nOuterCorrectors 3;
|
nOuterCorrectors 3;
|
||||||
nCorrectors 1;
|
nCorrectors 1;
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
|
|
||||||
pMinFactor 0.5;
|
|
||||||
pMaxFactor 2.0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
|
|||||||
@ -14,11 +14,21 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
minFactor 0.1;
|
||||||
|
maxFactor 2;
|
||||||
|
}
|
||||||
|
|
||||||
limitT
|
limitT
|
||||||
{
|
{
|
||||||
type limitTemperature;
|
type limitTemperature;
|
||||||
|
|
||||||
min 101;
|
min 101;
|
||||||
max 1000;
|
max 1000;
|
||||||
|
|
||||||
selectionMode all;
|
selectionMode all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -55,8 +55,6 @@ SIMPLE
|
|||||||
}
|
}
|
||||||
|
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
pMinFactor 0.1;
|
|
||||||
pMaxFactor 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PIMPLE
|
PIMPLE
|
||||||
@ -64,8 +62,6 @@ PIMPLE
|
|||||||
nCorrectors 2;
|
nCorrectors 2;
|
||||||
nNonOrthogonalCorrectors 1;
|
nNonOrthogonalCorrectors 1;
|
||||||
nOuterCorrectors 1;
|
nOuterCorrectors 1;
|
||||||
pMinFactor 0.1;
|
|
||||||
pMaxFactor 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
|
|||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvConstraints;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
minFactor 0.9;
|
||||||
|
maxFactor 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -56,9 +56,6 @@ PIMPLE
|
|||||||
consistent yes;
|
consistent yes;
|
||||||
simpleRho yes;
|
simpleRho yes;
|
||||||
|
|
||||||
pMaxFactor 1.5;
|
|
||||||
pMinFactor 0.9;
|
|
||||||
|
|
||||||
outerCorrectorResidualControl
|
outerCorrectorResidualControl
|
||||||
{
|
{
|
||||||
"(U|k|epsilon)"
|
"(U|k|epsilon)"
|
||||||
|
|||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvConstraints;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
minFactor 0.9;
|
||||||
|
maxFactor 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -56,9 +56,6 @@ PIMPLE
|
|||||||
nCorrectors 1;
|
nCorrectors 1;
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
|
|
||||||
pMaxFactor 1.5;
|
|
||||||
pMinFactor 0.9;
|
|
||||||
|
|
||||||
maxCo 0.2;
|
maxCo 0.2;
|
||||||
rDeltaTSmoothingCoeff 0.1;
|
rDeltaTSmoothingCoeff 0.1;
|
||||||
rDeltaTDampingCoeff 1;
|
rDeltaTDampingCoeff 1;
|
||||||
|
|||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvConstraints;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
minFactor 0.8;
|
||||||
|
maxFactor 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -63,9 +63,6 @@ PIMPLE
|
|||||||
nOuterCorrectors 3;
|
nOuterCorrectors 3;
|
||||||
nCorrectors 1;
|
nCorrectors 1;
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
|
|
||||||
pMaxFactor 1.2;
|
|
||||||
pMinFactor 0.8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
|
|||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvConstraints;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
min 0.8e5;
|
||||||
|
max 1.2e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -59,9 +59,6 @@ PIMPLE
|
|||||||
nOuterCorrectors 1;
|
nOuterCorrectors 1;
|
||||||
nCorrectors 2;
|
nCorrectors 2;
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
|
|
||||||
pMax 1.2e5;
|
|
||||||
pMin 0.8e5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvConstraints;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
min 0.8e5;
|
||||||
|
max 1.2e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -88,9 +88,6 @@ PIMPLE
|
|||||||
nCorrectors 2;
|
nCorrectors 2;
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
momentumPredictor yes;
|
momentumPredictor yes;
|
||||||
|
|
||||||
pMax 1.2e5;
|
|
||||||
pMin 0.8e5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
|
|||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvConstraints;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
minFactor 0.1;
|
||||||
|
maxFactor 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -45,8 +45,6 @@ PIMPLE
|
|||||||
{
|
{
|
||||||
nCorrectors 3;
|
nCorrectors 3;
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
pMinFactor 0.1;
|
|
||||||
pMaxFactor 1.5;
|
|
||||||
|
|
||||||
transonic no;
|
transonic no;
|
||||||
consistent no;
|
consistent no;
|
||||||
|
|||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvConstraints;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
minFactor 0.5;
|
||||||
|
maxFactor 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -52,9 +52,6 @@ PIMPLE
|
|||||||
nOuterCorrectors 3;
|
nOuterCorrectors 3;
|
||||||
nCorrectors 1;
|
nCorrectors 1;
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
|
|
||||||
pMinFactor 0.5;
|
|
||||||
pMaxFactor 2.0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
|
|||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvConstraints;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
minFactor 0.5;
|
||||||
|
maxFactor 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -54,8 +54,6 @@ solvers
|
|||||||
SIMPLE
|
SIMPLE
|
||||||
{
|
{
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
pMinFactor 0.5;
|
|
||||||
pMaxFactor 1.5;
|
|
||||||
|
|
||||||
residualControl
|
residualControl
|
||||||
{
|
{
|
||||||
|
|||||||
@ -15,6 +15,14 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
minFactor 0.5;
|
||||||
|
maxFactor 2;
|
||||||
|
}
|
||||||
|
|
||||||
source1
|
source1
|
||||||
{
|
{
|
||||||
type fixedTemperatureConstraint;
|
type fixedTemperatureConstraint;
|
||||||
|
|||||||
@ -48,8 +48,6 @@ SIMPLE
|
|||||||
{
|
{
|
||||||
nUCorrectors 2;
|
nUCorrectors 2;
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
pMinFactor 0.5;
|
|
||||||
pMaxFactor 2.0;
|
|
||||||
|
|
||||||
residualControl
|
residualControl
|
||||||
{
|
{
|
||||||
|
|||||||
@ -14,6 +14,14 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
minFactor 0.1;
|
||||||
|
maxFactor 2;
|
||||||
|
}
|
||||||
|
|
||||||
limitT
|
limitT
|
||||||
{
|
{
|
||||||
type limitTemperature;
|
type limitTemperature;
|
||||||
@ -22,4 +30,4 @@ limitT
|
|||||||
selectionMode all;
|
selectionMode all;
|
||||||
}
|
}
|
||||||
|
|
||||||
//************************************************************************** //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -43,8 +43,6 @@ SIMPLE
|
|||||||
}
|
}
|
||||||
|
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
pMinFactor 0.1;
|
|
||||||
pMaxFactor 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
|
|||||||
@ -15,6 +15,14 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
minFactor 0.4;
|
||||||
|
maxFactor 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
fixedTemperature
|
fixedTemperature
|
||||||
{
|
{
|
||||||
type fixedTemperatureConstraint;
|
type fixedTemperatureConstraint;
|
||||||
|
|||||||
@ -54,8 +54,6 @@ solvers
|
|||||||
SIMPLE
|
SIMPLE
|
||||||
{
|
{
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
pMinFactor 0.4;
|
|
||||||
pMaxFactor 1.5;
|
|
||||||
|
|
||||||
residualControl
|
residualControl
|
||||||
{
|
{
|
||||||
|
|||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvConstraints;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
minFactor 0.1;
|
||||||
|
maxFactor 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -39,8 +39,6 @@ solvers
|
|||||||
SIMPLE
|
SIMPLE
|
||||||
{
|
{
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
pMinFactor 0.1;
|
|
||||||
pMaxFactor 2;
|
|
||||||
transonic yes;
|
transonic yes;
|
||||||
consistent yes;
|
consistent yes;
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvConstraints;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
minFactor 0.1;
|
||||||
|
maxFactor 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -39,8 +39,6 @@ solvers
|
|||||||
SIMPLE
|
SIMPLE
|
||||||
{
|
{
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
pMinFactor 0.1;
|
|
||||||
pMaxFactor 1.5;
|
|
||||||
|
|
||||||
transonic no;
|
transonic no;
|
||||||
consistent no;
|
consistent no;
|
||||||
|
|||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvConstraints;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
minFactor 0.9;
|
||||||
|
maxFactor 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -90,9 +90,6 @@ PIMPLE
|
|||||||
nCorrectors 3;
|
nCorrectors 3;
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
momentumPredictor yes;
|
momentumPredictor yes;
|
||||||
|
|
||||||
pMaxFactor 1.5;
|
|
||||||
pMinFactor 0.9;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
|
|||||||
@ -0,0 +1,25 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvConstraints;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
minFactor 0.9;
|
||||||
|
maxFactor 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -69,9 +69,6 @@ PIMPLE
|
|||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
momentumPredictor yes;
|
momentumPredictor yes;
|
||||||
|
|
||||||
pMaxFactor 1.5;
|
|
||||||
pMinFactor 0.9;
|
|
||||||
|
|
||||||
maxCo 2.5;
|
maxCo 2.5;
|
||||||
rDeltaTSmoothingCoeff 0.5;
|
rDeltaTSmoothingCoeff 0.5;
|
||||||
alphaTemp 1;
|
alphaTemp 1;
|
||||||
|
|||||||
@ -0,0 +1,24 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvConstraints;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
min 1e4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -70,8 +70,6 @@ PIMPLE
|
|||||||
nOuterCorrectors 3;
|
nOuterCorrectors 3;
|
||||||
nCorrectors 1;
|
nCorrectors 1;
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
|
|
||||||
pMin 1e4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
|
|||||||
@ -0,0 +1,24 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvConstraints;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
min 1e4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -76,8 +76,6 @@ PIMPLE
|
|||||||
nEnergyCorrectors 1;
|
nEnergyCorrectors 1;
|
||||||
|
|
||||||
faceMomentum yes;
|
faceMomentum yes;
|
||||||
|
|
||||||
pMin 1e4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
|
|||||||
@ -0,0 +1,24 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvConstraints;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
min 1e4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -92,7 +92,6 @@ PIMPLE
|
|||||||
|
|
||||||
faceMomentum yes;
|
faceMomentum yes;
|
||||||
|
|
||||||
pMin 1e4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
|
|||||||
@ -0,0 +1,24 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvConstraints;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
min 1e4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -71,7 +71,6 @@ PIMPLE
|
|||||||
nCorrectors 1;
|
nCorrectors 1;
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
|
|
||||||
pMin 1e4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
|
|||||||
@ -0,0 +1,24 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvConstraints;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
min 1e4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -81,7 +81,6 @@ PIMPLE
|
|||||||
nCorrectors 1;
|
nCorrectors 1;
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
|
|
||||||
pMin 1e4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
|
|||||||
@ -0,0 +1,24 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Version: dev
|
||||||
|
\\/ M anipulation |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvConstraints;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
limitp
|
||||||
|
{
|
||||||
|
type limitPressure;
|
||||||
|
|
||||||
|
min 1e4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user