Rationalized the LTS solvers
This commit is contained in:
@ -53,9 +53,7 @@ int main(int argc, char *argv[])
|
||||
#include "createMRF.H"
|
||||
#include "createFvOptions.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setInitialrDeltaT.H"
|
||||
#include "createRDeltaT.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -63,8 +61,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readTimeControls.H"
|
||||
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
@ -76,6 +72,11 @@ int main(int argc, char *argv[])
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
while (pimple.loop())
|
||||
{
|
||||
if (pimple.turbCorr())
|
||||
{
|
||||
turbulence->correct();
|
||||
}
|
||||
|
||||
#include "UEqn.H"
|
||||
#include "YEqn.H"
|
||||
#include "EEqn.H"
|
||||
@ -85,11 +86,6 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
if (pimple.turbCorr())
|
||||
{
|
||||
turbulence->correct();
|
||||
}
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
@ -1,48 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 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/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// Maximum flow Courant number
|
||||
scalar maxCo(readScalar(pimple.dict().lookup("maxCo")));
|
||||
|
||||
// Maximum time scale
|
||||
scalar maxDeltaT(pimple.dict().lookupOrDefault<scalar>("maxDeltaT", GREAT));
|
||||
|
||||
// Smoothing parameter (0-1) when smoothing iterations > 0
|
||||
scalar rDeltaTSmoothingCoeff
|
||||
(
|
||||
pimple.dict().lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 1)
|
||||
);
|
||||
|
||||
// Damping coefficient (1-0)
|
||||
scalar rDeltaTDampingCoeff
|
||||
(
|
||||
pimple.dict().lookupOrDefault<scalar>("rDeltaTDampingCoeff", 1)
|
||||
);
|
||||
|
||||
// Maximum change in cell temperature per iteration (relative to previous value)
|
||||
scalar alphaTemp(pimple.dict().lookupOrDefault("alphaTemp", 0.05));
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,6 +24,31 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
{
|
||||
const dictionary& pimpleDict = pimple.dict();
|
||||
|
||||
// Maximum flow Courant number
|
||||
scalar maxCo(readScalar(pimpleDict.lookup("maxCo")));
|
||||
|
||||
// Maximum time scale
|
||||
scalar maxDeltaT(pimpleDict.lookupOrDefault<scalar>("maxDeltaT", GREAT));
|
||||
|
||||
// Smoothing parameter (0-1) when smoothing iterations > 0
|
||||
scalar rDeltaTSmoothingCoeff
|
||||
(
|
||||
pimpleDict.lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.1)
|
||||
);
|
||||
|
||||
// Damping coefficient (1-0)
|
||||
scalar rDeltaTDampingCoeff
|
||||
(
|
||||
pimpleDict.lookupOrDefault<scalar>("rDeltaTDampingCoeff", 1)
|
||||
);
|
||||
|
||||
// Maximum change in cell temperature per iteration
|
||||
// (relative to previous value)
|
||||
scalar alphaTemp(pimpleDict.lookupOrDefault("alphaTemp", 0.05));
|
||||
|
||||
|
||||
Info<< "Time scales min/max:" << endl;
|
||||
|
||||
// Cache old reciprocal time scale field
|
||||
@ -94,4 +119,5 @@ License
|
||||
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user