mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
rhoSimpleFoam: Added "consistent" option to replace rhoSimplecFoam
See tutorials/compressible/rhoSimpleFoam/squareBend
SIMPLE
{
nNonOrthogonalCorrectors 0;
rhoMin 0.1;
rhoMax 1.0;
transonic yes;
consistent yes;
residualControl
{
p 1e-3;
U 1e-4;
e 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
relaxationFactors
{
fields
{
p 1;
rho 1;
}
equations
{
p 1;
U 0.9;
e 0.9;
k 0.9;
epsilon 0.9;
}
}
This commit is contained in:
@ -60,9 +60,15 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
// Pressure-velocity SIMPLE corrector
|
// Pressure-velocity SIMPLE corrector
|
||||||
|
#include "UEqn.H"
|
||||||
|
#include "EEqn.H"
|
||||||
|
|
||||||
|
if (simple.consistent())
|
||||||
|
{
|
||||||
|
#include "pcEqn.H"
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
#include "UEqn.H"
|
|
||||||
#include "EEqn.H"
|
|
||||||
#include "pEqn.H"
|
#include "pEqn.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
rhoSimplecFoam.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/rhoSimplecFoam
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
EXE_INC = \
|
|
||||||
-I.. \
|
|
||||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
|
||||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
|
||||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
|
||||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
|
||||||
-I$(LIB_SRC)/sampling/lnInclude \
|
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
|
||||||
-I$(LIB_SRC)/fvOptions/lnInclude
|
|
||||||
|
|
||||||
EXE_LIBS = \
|
|
||||||
-lcompressibleTransportModels \
|
|
||||||
-lfluidThermophysicalModels \
|
|
||||||
-lspecie \
|
|
||||||
-lturbulenceModels \
|
|
||||||
-lcompressibleTurbulenceModels \
|
|
||||||
-lfiniteVolume \
|
|
||||||
-lsampling \
|
|
||||||
-lmeshTools \
|
|
||||||
-lfvOptions
|
|
||||||
@ -1,86 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011-2015 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/>.
|
|
||||||
|
|
||||||
Application
|
|
||||||
rhoSimplecFoam
|
|
||||||
|
|
||||||
Description
|
|
||||||
Steady-state SIMPLEC solver for laminar or turbulent RANS flow of
|
|
||||||
compressible fluids.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "fvCFD.H"
|
|
||||||
#include "psiThermo.H"
|
|
||||||
#include "turbulentFluidThermoModel.H"
|
|
||||||
#include "mixedFvPatchFields.H"
|
|
||||||
#include "bound.H"
|
|
||||||
#include "simpleControl.H"
|
|
||||||
#include "fvIOoptionList.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
#include "setRootCase.H"
|
|
||||||
#include "createTime.H"
|
|
||||||
#include "createMesh.H"
|
|
||||||
|
|
||||||
simpleControl simple(mesh);
|
|
||||||
|
|
||||||
#include "createFields.H"
|
|
||||||
#include "createMRF.H"
|
|
||||||
#include "createFvOptions.H"
|
|
||||||
#include "initContinuityErrs.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
|
||||||
|
|
||||||
while (simple.loop())
|
|
||||||
{
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
|
||||||
|
|
||||||
// Velocity-pressure-enthalpy SIMPLEC corrector
|
|
||||||
{
|
|
||||||
#include "UEqn.H"
|
|
||||||
#include "EEqn.H"
|
|
||||||
#include "pEqn.H"
|
|
||||||
}
|
|
||||||
|
|
||||||
turbulence->correct();
|
|
||||||
|
|
||||||
runTime.write();
|
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
|
||||||
<< nl << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class polyBoundaryMesh;
|
||||||
|
location "constant/polyMesh";
|
||||||
|
object boundary;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
3
|
||||||
|
(
|
||||||
|
Default_Boundary_Region
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
inGroups 1(wall);
|
||||||
|
nFaces 22400;
|
||||||
|
startFace 324400;
|
||||||
|
}
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
nFaces 400;
|
||||||
|
startFace 346800;
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
nFaces 400;
|
||||||
|
startFace 347200;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -54,6 +54,7 @@ SIMPLE
|
|||||||
rhoMin 0.1;
|
rhoMin 0.1;
|
||||||
rhoMax 1.0;
|
rhoMax 1.0;
|
||||||
transonic yes;
|
transonic yes;
|
||||||
|
consistent yes;
|
||||||
|
|
||||||
residualControl
|
residualControl
|
||||||
{
|
{
|
||||||
Reference in New Issue
Block a user