mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Removed MRFSimpleFoam - can now use simpleFoam + basicSource
This commit is contained in:
@ -1,85 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2011 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
|
|
||||||
MRFSimpleFoam
|
|
||||||
|
|
||||||
Description
|
|
||||||
Steady-state solver for incompressible, turbulent flow of non-Newtonian
|
|
||||||
fluids with MRF regions.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "fvCFD.H"
|
|
||||||
#include "singlePhaseTransportModel.H"
|
|
||||||
#include "RASModel.H"
|
|
||||||
#include "IOMRFZoneList.H"
|
|
||||||
#include "simpleControl.H"
|
|
||||||
#include "IObasicSourceList.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
#include "setRootCase.H"
|
|
||||||
|
|
||||||
#include "createTime.H"
|
|
||||||
#include "createMesh.H"
|
|
||||||
#include "createFields.H"
|
|
||||||
#include "initContinuityErrs.H"
|
|
||||||
|
|
||||||
IOMRFZoneList mrfZones(mesh);
|
|
||||||
mrfZones.correctBoundaryVelocity(U);
|
|
||||||
|
|
||||||
simpleControl simple(mesh);
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
|
||||||
|
|
||||||
while (simple.loop())
|
|
||||||
{
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
|
||||||
|
|
||||||
// --- Pressure-velocity SIMPLE corrector
|
|
||||||
{
|
|
||||||
#include "UEqn.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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
MRFSimpleFoam.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/MRFSimpleFoam
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
EXE_INC = \
|
|
||||||
-I.. \
|
|
||||||
-I$(LIB_SRC)/turbulenceModels \
|
|
||||||
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
|
|
||||||
-I$(LIB_SRC)/transportModels \
|
|
||||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
|
||||||
-I$(LIB_SRC)/fieldSources/lnInclude \
|
|
||||||
-I$(LIB_SRC)/sampling/lnInclude
|
|
||||||
|
|
||||||
|
|
||||||
EXE_LIBS = \
|
|
||||||
-lincompressibleRASModels \
|
|
||||||
-lincompressibleTransportModels \
|
|
||||||
-lfiniteVolume \
|
|
||||||
-lmeshTools \
|
|
||||||
-lfieldSources \
|
|
||||||
-lsampling
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
// Momentum predictor
|
|
||||||
|
|
||||||
tmp<fvVectorMatrix> UEqn
|
|
||||||
(
|
|
||||||
fvm::div(phi, U)
|
|
||||||
+ turbulence->divDevReff(U)
|
|
||||||
==
|
|
||||||
sources(U)
|
|
||||||
);
|
|
||||||
|
|
||||||
mrfZones.addCoriolis(UEqn());
|
|
||||||
|
|
||||||
UEqn().relax();
|
|
||||||
|
|
||||||
sources.constrain(UEqn());
|
|
||||||
|
|
||||||
solve(UEqn() == -fvc::grad(p));
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
{
|
|
||||||
volScalarField rAU(1.0/UEqn().A());
|
|
||||||
volVectorField HbyA("HbyA", U);
|
|
||||||
HbyA = rAU*UEqn().H();
|
|
||||||
UEqn.clear();
|
|
||||||
|
|
||||||
surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf());
|
|
||||||
adjustPhi(phiHbyA, U, p);
|
|
||||||
mrfZones.relativeFlux(phiHbyA);
|
|
||||||
adjustPhi(phiHbyA, U, p);
|
|
||||||
|
|
||||||
// Non-orthogonal pressure corrector loop
|
|
||||||
while (simple.correctNonOrthogonal())
|
|
||||||
{
|
|
||||||
fvScalarMatrix pEqn
|
|
||||||
(
|
|
||||||
fvm::laplacian(rAU, p) == fvc::div(phiHbyA)
|
|
||||||
);
|
|
||||||
|
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
|
||||||
pEqn.solve();
|
|
||||||
|
|
||||||
if (simple.finalNonOrthogonalIter())
|
|
||||||
{
|
|
||||||
phi = phiHbyA - pEqn.flux();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "continuityErrs.H"
|
|
||||||
|
|
||||||
// Explicitly relax pressure for momentum corrector
|
|
||||||
p.relax();
|
|
||||||
|
|
||||||
// Momentum corrector
|
|
||||||
U = HbyA - rAU*fvc::grad(p);
|
|
||||||
U.correctBoundaryConditions();
|
|
||||||
sources.correct(U);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user