Commit 5c3c1b2d authored by Mark Olesen's avatar Mark Olesen
Browse files

Merge remote branch 'opencfd/master' into olesenm

parents 7dee8058 57470a38
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......
......@@ -3,7 +3,7 @@ cd ${0%/*} || exit 1 # run from this directory
set -x
wmake
wmake rhoLTSPimpleFoam
wmake rhoPorousMRFPimpleFoam
wmake rhoPorousMRFLTSPimpleFoam
# ----------------------------------------------------------------- end-of-file
rhoPorousMRFLTSPimpleFoam.C
EXE = $(FOAM_APPBIN)/rhoPorousMRFLTSPimpleFoam
EXE_INC = \
-I../rhoPorousMRFPimpleFoam \
-I.. \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/finiteVolume/lnInclude
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-lbasicThermophysicalModels \
......
......@@ -22,11 +22,11 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
rhoLTSPimpleFoam
rhoLTSPorousMRFPimpleFoam
Description
Transient solver for laminar or turbulent flow of compressible fluids
for HVAC and similar applications.
with support for porous media and MRF for HVAC and similar applications.
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
pseudo-transient simulations with support for local time-stepping for
......@@ -37,6 +37,8 @@ Description
#include "fvCFD.H"
#include "basicPsiThermo.H"
#include "turbulenceModel.H"
#include "MRFZones.H"
#include "porousZones.H"
#include "fvcSmooth.H"
#include "pimpleLoop.H"
#include "bound.H"
......@@ -51,6 +53,7 @@ int main(int argc, char *argv[])
#include "readPIMPLEControls.H"
#include "setInitialrDeltaT.H"
#include "createFields.H"
#include "createZones.H"
#include "initContinuityErrs.H"
Info<< "\nStarting time loop\n" << endl;
......
......@@ -70,7 +70,9 @@
&& runTime.timeIndex() > runTime.startTimeIndex() + 1
)
{
rDeltaT = rDeltaT0*max(rDeltaT/rDeltaT0, 1.0 - rDeltaTDampingCoeff);
rDeltaT =
rDeltaT0
*max(rDeltaT/rDeltaT0, scalar(1) - rDeltaTDampingCoeff);
Info<< "Damped flow time scale min/max = "
<< gMin(1/rDeltaT.internalField())
......
......@@ -2,7 +2,8 @@
tmp<fvVectorMatrix> UEqn
(
pZones.ddt(rho, U)
//pZones.ddt(rho, U)
fvc::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
);
......
......@@ -19,7 +19,7 @@ if (transonic)
fvc::interpolate(psi)
*(
(fvc::interpolate(U) & mesh.Sf())
//+ fvc::ddtPhiCorr(rAU, rho, U, phi)
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
)
);
mrfZones.relativeFlux(fvc::interpolate(psi), phid);
......@@ -60,7 +60,7 @@ else
fvc::interpolate(rho)*
(
(fvc::interpolate(U) & mesh.Sf())
//+ fvc::ddtPhiCorr(rAU, rho, U, phi)
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
);
mrfZones.relativeFlux(fvc::interpolate(rho), phi);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......
// We do not have a top-level mesh. Construct the fvSolution for
// the runTime instead.
runTime.readOpt() = IOobject::MUST_READ_IF_MODIFIED;
fvSolution solutionDict(runTime);
const dictionary& pimple = solutionDict.subDict("PIMPLE");
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......
......@@ -96,6 +96,11 @@ int main(int argc, char *argv[])
pimpleCorr++
)
{
if (nOuterCorr != 1)
{
p.storePrevIter();
}
turbulence->correct();
#include "UEqn.H"
......
fvVectorMatrix UEqn
(
// fvm::ddt(rho, U)
pZones.ddt(rho, U)
//pZones.ddt(rho, U)
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
==
......
......@@ -59,7 +59,7 @@
}
}
Info<< "p min/max = " << min(p).value() << ", " << max(p).value() << endl;
p.relax();
// Second part of thermodynamic density update
thermo.rho() += psi*p;
......@@ -75,4 +75,6 @@
rho = min(rho, rhoMax);
#include "setPressureWork.H"
Info<< "p min/max = " << min(p).value() << ", " << max(p).value() << endl;
}
fvVectorMatrix UEqn
(
// fvm::ddt(rho, U)
pZones.ddt(rho, U)
//pZones.ddt(rho, U)
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
==
......
......@@ -11,7 +11,7 @@
scalar rDeltaTSmoothingCoeff
(
piso.lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.02)
piso.lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.1)
);
label nAlphaSpreadIter
......@@ -21,17 +21,17 @@
scalar alphaSpreadDiff
(
piso.lookupOrDefault<label>("alphaSpreadDiff", 0.2)
piso.lookupOrDefault<scalar>("alphaSpreadDiff", 0.2)
);
scalar alphaSpreadMax
(
piso.lookupOrDefault<label>("alphaSpreadMax", 0.99)
piso.lookupOrDefault<scalar>("alphaSpreadMax", 0.99)
);
scalar alphaSpreadMin
(
piso.lookupOrDefault<label>("alphaSpreadMin", 0.01)
piso.lookupOrDefault<scalar>("alphaSpreadMin", 0.01)
);
label nAlphaSweepIter
......@@ -63,11 +63,14 @@
{
// Further limit the reciprocal time-step
// in the vicinity of the interface
volScalarField alpha1Bar = fvc::average(alpha1);
rDeltaT.dimensionedInternalField() = max
(
rDeltaT.dimensionedInternalField(),
pos(alpha1.dimensionedInternalField() - 0.01)
*pos(0.99 - alpha1.dimensionedInternalField())
pos(alpha1Bar.dimensionedInternalField() - alphaSpreadMin)
*pos(alphaSpreadMax - alpha1Bar.dimensionedInternalField())
*fvc::surfaceSum(mag(phi))().dimensionedInternalField()
/((2*maxAlphaCo)*mesh.V())
);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment