Commit 2cbbc7a0 authored by Andrew Heather's avatar Andrew Heather
Browse files

Integrated Foundation code to commit d2a62df7

parents 266a0d41 d2a62df7
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -79,7 +79,7 @@ Foam::PDRDragModel::~PDRDragModel()
bool Foam::PDRDragModel::read(const dictionary& PDRProperties)
{
PDRDragModelCoeffs_ = PDRProperties.subDict(type() + "Coeffs");
PDRDragModelCoeffs_ = PDRProperties.optionalSubDict(type() + "Coeffs");
PDRDragModelCoeffs_.lookup("drag") >> on_;
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -67,7 +67,7 @@ Foam::XiEqModel::~XiEqModel()
bool Foam::XiEqModel::read(const dictionary& XiEqProperties)
{
XiEqModelCoeffs_ = XiEqProperties.subDict(type() + "Coeffs");
XiEqModelCoeffs_ = XiEqProperties.optionalSubDict(type() + "Coeffs");
return true;
}
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -67,7 +67,7 @@ Foam::XiGModel::~XiGModel()
bool Foam::XiGModel::read(const dictionary& XiGProperties)
{
XiGModelCoeffs_ = XiGProperties.subDict(type() + "Coeffs");
XiGModelCoeffs_ = XiGProperties.optionalSubDict(type() + "Coeffs");
return true;
}
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -85,7 +85,7 @@ Foam::XiModel::~XiModel()
bool Foam::XiModel::read(const dictionary& XiProperties)
{
XiModelCoeffs_ = XiProperties.subDict(type() + "Coeffs");
XiModelCoeffs_ = XiProperties.optionalSubDict(type() + "Coeffs");
return true;
}
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -80,7 +80,7 @@ Foam::laminarFlameSpeedModels::SCOPE::SCOPE
dict.lookup("fuelFile")
)
)()
).subDict(typeName + "Coeffs")
).optionalSubDict(typeName + "Coeffs")
),
LFL_(readScalar(coeffsDict_.lookup("lowerFlamabilityLimit"))),
UFL_(readScalar(coeffsDict_.lookup("upperFlamabilityLimit"))),
......
......@@ -68,7 +68,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
- fvm::laplacian(turbulence->alphaEff(), he)
==
Qdot
+ radiation->Sh(thermo)
+ radiation->Sh(thermo, he)
+ parcels.Sh(he)
+ surfaceFilm.Sh()
+ fvOptions(rho, he)
......
......@@ -10,10 +10,8 @@ if (pimple.nCorrPISO() <= 1)
surfaceScalarField phiHbyA
(
"phiHbyA",
(
fvc::flux(rho*HbyA)
+ rhorAUf*fvc::ddtCorr(rho, U, phi)
)
fvc::flux(rho*HbyA)
+ rhorAUf*fvc::ddtCorr(rho, U, phi)
);
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
......
......@@ -18,7 +18,7 @@
- fvm::laplacian(turbulence->alphaEff(), he)
==
rho*(U&g)
+ radiation->Sh(thermo)
+ radiation->Sh(thermo, he)
+ fvOptions(rho, he)
);
......
......@@ -12,7 +12,7 @@
- fvm::laplacian(turbulence->alphaEff(), he)
==
rho*(U&g)
+ radiation->Sh(thermo)
+ radiation->Sh(thermo, he)
+ fvOptions(rho, he)
);
......
......@@ -12,7 +12,7 @@
- fvm::laplacian(turb.alphaEff(), he)
==
rho*(U&g)
+ rad.Sh(thermo)
+ rad.Sh(thermo, he)
+ fvOptions(rho, he)
);
......
......@@ -18,7 +18,7 @@
- fvm::laplacian(turb.alphaEff(), he)
==
rho*(U&g)
+ rad.Sh(thermo)
+ rad.Sh(thermo, he)
+ fvOptions(rho, he)
);
......
......@@ -17,7 +17,7 @@
)
- fvm::laplacian(alphaEff, he)
==
radiation->Sh(thermo)
radiation->Sh(thermo, he)
+ fvOptions(rho, he)
);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -70,7 +70,6 @@ int main(int argc, char *argv[])
{
#include "readControls.H"
#include "CourantNo.H"
#include "setDeltaT.H"
runTime++;
......
......@@ -2,7 +2,10 @@
cd ${0%/*} || exit 1 # Run from this directory
wclean libso DPMTurbulenceModels
wclean
wclean MPPICFoam
wclean DPMDyMFoam
wclean DPMDyMFoam/MPPICDyMFoam
#------------------------------------------------------------------------------
#!/bin/sh
cd ${0%/*} || exit 1
cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
......@@ -8,5 +8,7 @@ wmake $targetType DPMTurbulenceModels
wmake $targetType
wmake $targetType MPPICFoam
wmake $targetType DPMDyMFoam
wmake $targetType DPMDyMFoam/MPPICDyMFoam
#------------------------------------------------------------------------------
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 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
DPMDyMFoam
Description
Transient solver for the coupled transport of a single kinematic particle
cloud including the effect of the volume fraction of particles on the
continuous phase, with optional mesh motion and mesh topology changes.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "dynamicFvMesh.H"
#include "singlePhaseTransportModel.H"
#include "PhaseIncompressibleTurbulenceModel.H"
#include "pimpleControl.H"
#include "CorrectPhi.H"
#ifdef MPPIC
#include "basicKinematicMPPICCloud.H"
#define basicKinematicTypeCloud basicKinematicMPPICCloud
#else
#include "basicKinematicCollidingCloud.H"
#define basicKinematicTypeCloud basicKinematicCollidingCloud
#endif
int main(int argc, char *argv[])
{
argList::addOption
(
"cloudName",
"name",
"specify alternative cloud name. default is 'kinematicCloud'"
);
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "createControls.H"
#include "createFields.H"
#include "createUcf.H"
#include "initContinuityErrs.H"
Info<< "\nStarting time loop\n" << endl;
while (runTime.run())
{
#include "readControls.H"
#include "CourantNo.H"
#include "setDeltaT.H"
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
mesh.update();
// Calculate absolute flux from the mapped surface velocity
phic = mesh.Sf() & Ucf;
if (mesh.changing() && correctPhi)
{
#include "correctPhic.H"
}
// Make the flux relative to the mesh motion
fvc::makeRelative(phic, Uc);
if (mesh.changing() && checkMeshCourantNo)
{
#include "meshCourantNo.H"
}
continuousPhaseTransport.correct();
muc = rhoc*continuousPhaseTransport.nu();
Info<< "Evolving " << kinematicCloud.name() << endl;
kinematicCloud.evolve();
// Update continuous phase volume fraction field
alphac = max(1.0 - kinematicCloud.theta(), alphacMin);
alphac.correctBoundaryConditions();
alphacf = fvc::interpolate(alphac);
alphaPhic = alphacf*phic;
fvVectorMatrix cloudSU(kinematicCloud.SU(Uc));
volVectorField cloudVolSUSu
(
IOobject
(
"cloudVolSUSu",
runTime.timeName(),
mesh
),
mesh,
dimensionedVector
(
"0",
cloudSU.dimensions()/dimVolume,
Zero
),
zeroGradientFvPatchVectorField::typeName
);
cloudVolSUSu.primitiveFieldRef() = -cloudSU.source()/mesh.V();
cloudVolSUSu.correctBoundaryConditions();
cloudSU.source() = Zero;
// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
{
#include "UcEqn.H"
// --- PISO loop
while (pimple.correct())
{
#include "pEqn.H"
}
if (pimple.turbCorr())
{
continuousPhaseTurbulence->correct();
}
}
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 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
MPPICDyMFoam
Description
Transient solver for the coupled transport of a single kinematic particle
cloud including the effect of the volume fraction of particles on the
continuous phase. Multi-Phase Particle In Cell (MPPIC) modeling is used to
represent collisions without resolving particle-particle interactions,
with optional mesh motion and mesh topology changes.
\*---------------------------------------------------------------------------*/
#define MPPIC
#include "DPMDyMFoam.C"
// ************************************************************************* //
EXE_INC = \
-I.. \
-I../.. \
-I../DPMTurbulenceModels/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-llagrangian \
-llagrangianIntermediate \
-llagrangianTurbulence \
-lspecie \
-lradiationModels \
-lincompressibleTransportModels \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lDPMTurbulenceModels \
-lregionModels \
-lsurfaceFilmModels \
-lsampling \
-ldynamicFvMesh \
-ltopoChangerFvMesh \
-ldynamicMesh
DPMDyMFoam.C
EXE = $(FOAM_APPBIN)/DPMDyMFoam
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