mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Integrated Foundation code to commit 104aac5
This commit is contained in:
@ -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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#!/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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
163
applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/DPMDyMFoam.C
Normal file
163
applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/DPMDyMFoam.C
Normal file
@ -0,0 +1,163 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,41 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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"
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,3 @@
|
||||
MPPICDyMFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/MPPICDyMFoam
|
||||
@ -0,0 +1,42 @@
|
||||
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
|
||||
@ -0,0 +1,3 @@
|
||||
DPMDyMFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/DPMDyMFoam
|
||||
@ -0,0 +1,41 @@
|
||||
EXE_INC = \
|
||||
-I.. \
|
||||
-I../DPMTurbulenceModels/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)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-llagrangian \
|
||||
-llagrangianIntermediate \
|
||||
-llagrangianTurbulence \
|
||||
-lspecie \
|
||||
-lradiationModels \
|
||||
-lincompressibleTransportModels \
|
||||
-lturbulenceModels \
|
||||
-lincompressibleTurbulenceModels \
|
||||
-lDPMTurbulenceModels \
|
||||
-lregionModels \
|
||||
-lsurfaceFilmModels \
|
||||
-lsampling \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lmeshTools \
|
||||
-ldynamicFvMesh \
|
||||
-ltopoChangerFvMesh \
|
||||
-ldynamicMesh
|
||||
@ -0,0 +1,11 @@
|
||||
CorrectPhi
|
||||
(
|
||||
Uc,
|
||||
phic,
|
||||
p,
|
||||
dimensionedScalar("rAUf", dimTime, 1),
|
||||
geometricZeroField(),
|
||||
pimple
|
||||
);
|
||||
|
||||
#include "continuityErrs.H"
|
||||
@ -0,0 +1,12 @@
|
||||
#include "createControl.H"
|
||||
#include "createTimeControls.H"
|
||||
|
||||
bool correctPhi
|
||||
(
|
||||
pimple.dict().lookupOrDefault("correctPhi", false)
|
||||
);
|
||||
|
||||
bool checkMeshCourantNo
|
||||
(
|
||||
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
|
||||
);
|
||||
@ -0,0 +1,49 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Global
|
||||
createUcf
|
||||
|
||||
Description
|
||||
Creates and initialises the velocity velocity field Ucf.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "Reading/calculating continuous phase face velocity Ucf\n" << endl;
|
||||
|
||||
surfaceVectorField Ucf
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Ucf",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
fvc::interpolate(Uc)
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
62
applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/pEqn.H
Normal file
62
applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/pEqn.H
Normal file
@ -0,0 +1,62 @@
|
||||
{
|
||||
volVectorField HbyA("HbyA", Uc);
|
||||
HbyA = rAUc*UcEqn.H();
|
||||
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
fvc::flux(HbyA)
|
||||
+ alphacf*rAUcf*fvc::ddtCorr(Uc, Ucf)
|
||||
+ phicForces
|
||||
)
|
||||
);
|
||||
|
||||
if (p.needReference())
|
||||
{
|
||||
fvc::makeRelative(phiHbyA, Uc);
|
||||
adjustPhi(phiHbyA, Uc, p);
|
||||
fvc::makeAbsolute(phiHbyA, Uc);
|
||||
}
|
||||
|
||||
// Update the pressure BCs to ensure flux consistency
|
||||
constrainPressure(p, Uc, phiHbyA, rAUcf);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian(alphacf*rAUcf, p)
|
||||
==
|
||||
fvc::ddt(alphac) + fvc::div(alphacf*phiHbyA)
|
||||
);
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
|
||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phic = phiHbyA - pEqn.flux()/alphacf;
|
||||
|
||||
p.relax();
|
||||
|
||||
Uc = HbyA
|
||||
+ rAUc
|
||||
*fvc::reconstruct((phicForces - pEqn.flux()/alphacf)/rAUcf);
|
||||
Uc.correctBoundaryConditions();
|
||||
|
||||
{
|
||||
Ucf = fvc::interpolate(Uc);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
Ucf += n*(phic/mesh.magSf() - (n & Ucf));
|
||||
}
|
||||
|
||||
// Make the fluxes relative to the mesh motion
|
||||
fvc::makeRelative(phic, Uc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#include "continuityErrs.H"
|
||||
@ -0,0 +1,5 @@
|
||||
#include "readTimeControls.H"
|
||||
|
||||
correctPhi = pimple.dict().lookupOrDefault("correctPhi", false);
|
||||
|
||||
checkMeshCourantNo = pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
|
||||
@ -21,7 +21,7 @@
|
||||
+ Qdot
|
||||
+ coalParcels.Sh(he)
|
||||
+ limestoneParcels.Sh(he)
|
||||
+ radiation->Sh(thermo)
|
||||
+ radiation->Sh(thermo, he)
|
||||
+ fvOptions(rho, he)
|
||||
);
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
rho*(U&g)
|
||||
+ parcels.Sh(he)
|
||||
+ surfaceFilm.Sh()
|
||||
+ radiation->Sh(thermo)
|
||||
+ radiation->Sh(thermo, he)
|
||||
+ Qdot
|
||||
+ fvOptions(rho, he)
|
||||
);
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
==
|
||||
rho*(U&g)
|
||||
+ parcels.Sh(he)
|
||||
+ radiation->Sh(thermo)
|
||||
+ radiation->Sh(thermo, he)
|
||||
+ Qdot
|
||||
+ fvOptions(rho, he)
|
||||
);
|
||||
@ -35,6 +35,6 @@
|
||||
thermo.correct();
|
||||
radiation->correct();
|
||||
|
||||
Info<< "T gas min/max = " << min(T).value() << ", "
|
||||
Info<< "T gas min/max " << min(T).value() << ", "
|
||||
<< max(T).value() << endl;
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
==
|
||||
rho*(U&g)
|
||||
+ parcels.Sh(he)
|
||||
+ radiation->Sh(thermo)
|
||||
+ radiation->Sh(thermo, he)
|
||||
+ Qdot
|
||||
+ fvOptions(rho, he)
|
||||
);
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
wclean libso twoPhaseMixtureThermo
|
||||
wclean libso surfaceTensionModels
|
||||
wclean
|
||||
wclean compressibleInterDyMFoam
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
||||
|
||||
wmake $targetType twoPhaseMixtureThermo
|
||||
wmake $targetType surfaceTensionModels
|
||||
|
||||
wmake $targetType
|
||||
wmake $targetType compressibleInterDyMFoam
|
||||
|
||||
@ -13,6 +13,7 @@ EXE_INC = \
|
||||
|
||||
EXE_LIBS = \
|
||||
-ltwoPhaseMixtureThermo \
|
||||
-ltwoPhaseSurfaceTension \
|
||||
-lcompressibleTransportModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
|
||||
@ -16,6 +16,7 @@ EXE_INC = \
|
||||
|
||||
EXE_LIBS = \
|
||||
-ltwoPhaseMixtureThermo \
|
||||
-ltwoPhaseSurfaceTension \
|
||||
-lcompressibleTransportModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
liquidProperties/liquidPropertiesSurfaceTension.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libtwoPhaseSurfaceTension
|
||||
@ -0,0 +1,15 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-linterfaceProperties \
|
||||
-lcompressibleTransportModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lthermophysicalProperties \
|
||||
-lfiniteVolume
|
||||
@ -0,0 +1,155 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "liquidPropertiesSurfaceTension.H"
|
||||
#include "liquidThermo.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace surfaceTensionModels
|
||||
{
|
||||
defineTypeNameAndDebug(liquidProperties, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
surfaceTensionModel,
|
||||
liquidProperties,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::surfaceTensionModels::liquidProperties::liquidProperties
|
||||
(
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
surfaceTensionModel(mesh),
|
||||
phaseName_(dict.lookup("phase"))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::surfaceTensionModels::liquidProperties::~liquidProperties()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::surfaceTensionModels::liquidProperties::sigma() const
|
||||
{
|
||||
const heRhoThermopureMixtureliquidProperties& thermo =
|
||||
mesh_.lookupObject<heRhoThermopureMixtureliquidProperties>
|
||||
(
|
||||
IOobject::groupName(basicThermo::dictName, phaseName_)
|
||||
);
|
||||
|
||||
const Foam::liquidProperties& liquid = thermo.mixture().properties();
|
||||
|
||||
tmp<volScalarField> tsigma
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"sigma",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh_,
|
||||
dimSigma
|
||||
)
|
||||
);
|
||||
volScalarField& sigma = tsigma.ref();
|
||||
|
||||
const volScalarField& T = thermo.T();
|
||||
const volScalarField& p = thermo.p();
|
||||
|
||||
volScalarField::Internal& sigmai = sigma;
|
||||
const volScalarField::Internal& pi = p;
|
||||
const volScalarField::Internal& Ti = T;
|
||||
|
||||
forAll(sigmai, celli)
|
||||
{
|
||||
sigmai[celli] = liquid.sigma(pi[celli], Ti[celli]);
|
||||
}
|
||||
|
||||
volScalarField::Boundary& sigmaBf = sigma.boundaryFieldRef();
|
||||
const volScalarField::Boundary& pBf = p.boundaryField();
|
||||
const volScalarField::Boundary& TBf = T.boundaryField();
|
||||
|
||||
forAll(sigmaBf, patchi)
|
||||
{
|
||||
scalarField& sigmaPf = sigmaBf[patchi];
|
||||
const scalarField& pPf = pBf[patchi];
|
||||
const scalarField& TPf = TBf[patchi];
|
||||
|
||||
forAll(sigmaPf, facei)
|
||||
{
|
||||
sigmaPf[facei] = liquid.sigma(pPf[facei], TPf[facei]);
|
||||
}
|
||||
}
|
||||
|
||||
return tsigma;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::surfaceTensionModels::liquidProperties::read
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::surfaceTensionModels::liquidProperties::writeData
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
if (surfaceTensionModel::writeData(os))
|
||||
{
|
||||
return os.good();
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,123 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::surfaceTensionModels::liquidProperties
|
||||
|
||||
Description
|
||||
Temperature-dependent surface tension model in which the surface tension
|
||||
function provided by the phase Foam::liquidProperties class is used.
|
||||
|
||||
Usage
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
phase | Phase name | yes |
|
||||
\endtable
|
||||
|
||||
Example of the surface tension specification:
|
||||
\verbatim
|
||||
sigma
|
||||
{
|
||||
type liquidProperties;
|
||||
phase water;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
See also
|
||||
Foam::surfaceTensionModel
|
||||
|
||||
SourceFiles
|
||||
liquidPropertiesSurfaceTension.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef liquidPropertiesSurfaceTension_H
|
||||
#define liquidPropertiesSurfaceTension_H
|
||||
|
||||
#include "surfaceTensionModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
namespace surfaceTensionModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class liquidProperties Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class liquidProperties
|
||||
:
|
||||
public surfaceTensionModel
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Name of the liquid phase
|
||||
word phaseName_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("liquidProperties");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from dictionary and mesh
|
||||
liquidProperties
|
||||
(
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~liquidProperties();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Surface tension coefficient
|
||||
virtual tmp<volScalarField> sigma() const;
|
||||
|
||||
//- Update surface tension coefficient from given dictionary
|
||||
virtual bool read(const dictionary& dict);
|
||||
|
||||
//- Write in dictionary format
|
||||
virtual bool writeData(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceTensionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -360,4 +360,17 @@ Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureThermo::alphaEff
|
||||
}
|
||||
|
||||
|
||||
bool Foam::twoPhaseMixtureThermo::read()
|
||||
{
|
||||
if (psiThermo::read())
|
||||
{
|
||||
return interfaceProperties::read();
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -285,6 +285,12 @@ public:
|
||||
const scalarField& alphat,
|
||||
const label patchi
|
||||
) const;
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
//- Read base transportProperties dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -56,7 +56,7 @@ Foam::mixtureViscosityModels::plastic::plastic
|
||||
)
|
||||
:
|
||||
mixtureViscosityModel(name, viscosityProperties, U, phi),
|
||||
plasticCoeffs_(viscosityProperties.subDict(modelName + "Coeffs")),
|
||||
plasticCoeffs_(viscosityProperties.optionalSubDict(modelName + "Coeffs")),
|
||||
plasticViscosityCoeff_
|
||||
(
|
||||
"coeff",
|
||||
@ -117,7 +117,7 @@ bool Foam::mixtureViscosityModels::plastic::read
|
||||
{
|
||||
mixtureViscosityModel::read(viscosityProperties);
|
||||
|
||||
plasticCoeffs_ = viscosityProperties.subDict(typeName + "Coeffs");
|
||||
plasticCoeffs_ = viscosityProperties.optionalSubDict(typeName + "Coeffs");
|
||||
|
||||
plasticCoeffs_.lookup("k") >> plasticViscosityCoeff_;
|
||||
plasticCoeffs_.lookup("n") >> plasticViscosityExponent_;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -126,7 +126,7 @@ Foam::autoPtr<Foam::relativeVelocityModel> Foam::relativeVelocityModel::New
|
||||
(
|
||||
cstrIter()
|
||||
(
|
||||
dict.subDict(modelType + "Coeffs"),
|
||||
dict.optionalSubDict(modelType + "Coeffs"),
|
||||
mixture
|
||||
)
|
||||
);
|
||||
|
||||
@ -40,7 +40,7 @@ const dimensionedScalar& rho1 = mixture.rho1();
|
||||
const dimensionedScalar& rho2 = mixture.rho2();
|
||||
const dimensionedScalar& rho3 = mixture.rho3();
|
||||
|
||||
dimensionedScalar D23(mixture.lookup("D23"));
|
||||
dimensionedScalar D23("D23", dimViscosity, mixture);
|
||||
|
||||
// Need to store rho for ddt(rho, U)
|
||||
volScalarField rho
|
||||
|
||||
@ -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
|
||||
@ -168,8 +168,8 @@ Foam::threePhaseInterfaceProperties::threePhaseInterfaceProperties
|
||||
).lookup("cAlpha")
|
||||
)
|
||||
),
|
||||
sigma12_(mixture.lookup("sigma12")),
|
||||
sigma13_(mixture.lookup("sigma13")),
|
||||
sigma12_("sigma12", dimensionSet(1, 0, -2, 0, 0), mixture),
|
||||
sigma13_("sigma13", dimensionSet(1, 0, -2, 0, 0), mixture),
|
||||
|
||||
deltaN_
|
||||
(
|
||||
|
||||
@ -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
|
||||
@ -47,10 +47,10 @@ Foam::phaseChangeTwoPhaseMixtures::Kunz::Kunz
|
||||
:
|
||||
phaseChangeTwoPhaseMixture(typeName, U, phi),
|
||||
|
||||
UInf_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("UInf")),
|
||||
tInf_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("tInf")),
|
||||
Cc_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("Cc")),
|
||||
Cv_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("Cv")),
|
||||
UInf_("UInf", dimVelocity, phaseChangeTwoPhaseMixtureCoeffs_),
|
||||
tInf_("tInf", dimTime, phaseChangeTwoPhaseMixtureCoeffs_),
|
||||
Cc_("Cc", dimless, phaseChangeTwoPhaseMixtureCoeffs_),
|
||||
Cv_("Cv", dimless, phaseChangeTwoPhaseMixtureCoeffs_),
|
||||
|
||||
p0_("0", pSat().dimensions(), 0.0),
|
||||
|
||||
@ -102,7 +102,7 @@ bool Foam::phaseChangeTwoPhaseMixtures::Kunz::read()
|
||||
{
|
||||
if (phaseChangeTwoPhaseMixture::read())
|
||||
{
|
||||
phaseChangeTwoPhaseMixtureCoeffs_ = subDict(type() + "Coeffs");
|
||||
phaseChangeTwoPhaseMixtureCoeffs_ = optionalSubDict(type() + "Coeffs");
|
||||
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.lookup("UInf") >> UInf_;
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.lookup("tInf") >> tInf_;
|
||||
|
||||
@ -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
|
||||
@ -47,10 +47,10 @@ Foam::phaseChangeTwoPhaseMixtures::Merkle::Merkle
|
||||
:
|
||||
phaseChangeTwoPhaseMixture(typeName, U, phi),
|
||||
|
||||
UInf_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("UInf")),
|
||||
tInf_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("tInf")),
|
||||
Cc_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("Cc")),
|
||||
Cv_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("Cv")),
|
||||
UInf_("UInf", dimVelocity, phaseChangeTwoPhaseMixtureCoeffs_),
|
||||
tInf_("tInf", dimTime, phaseChangeTwoPhaseMixtureCoeffs_),
|
||||
Cc_("Cc", dimless, phaseChangeTwoPhaseMixtureCoeffs_),
|
||||
Cv_("Cv", dimless, phaseChangeTwoPhaseMixtureCoeffs_),
|
||||
|
||||
p0_("0", pSat().dimensions(), 0.0),
|
||||
|
||||
@ -97,7 +97,7 @@ bool Foam::phaseChangeTwoPhaseMixtures::Merkle::read()
|
||||
{
|
||||
if (phaseChangeTwoPhaseMixture::read())
|
||||
{
|
||||
phaseChangeTwoPhaseMixtureCoeffs_ = subDict(type() + "Coeffs");
|
||||
phaseChangeTwoPhaseMixtureCoeffs_ = optionalSubDict(type() + "Coeffs");
|
||||
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.lookup("UInf") >> UInf_;
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.lookup("tInf") >> tInf_;
|
||||
|
||||
@ -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
|
||||
@ -54,10 +54,10 @@ Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::SchnerrSauer
|
||||
:
|
||||
phaseChangeTwoPhaseMixture(typeName, U, phi),
|
||||
|
||||
n_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("n")),
|
||||
dNuc_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("dNuc")),
|
||||
Cc_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("Cc")),
|
||||
Cv_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("Cv")),
|
||||
n_("n", dimless/dimVolume, phaseChangeTwoPhaseMixtureCoeffs_),
|
||||
dNuc_("dNuc", dimLength, phaseChangeTwoPhaseMixtureCoeffs_),
|
||||
Cc_("Cc", dimless, phaseChangeTwoPhaseMixtureCoeffs_),
|
||||
Cv_("Cv", dimless, phaseChangeTwoPhaseMixtureCoeffs_),
|
||||
|
||||
p0_("0", pSat().dimensions(), 0.0)
|
||||
{
|
||||
@ -151,7 +151,7 @@ bool Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::read()
|
||||
{
|
||||
if (phaseChangeTwoPhaseMixture::read())
|
||||
{
|
||||
phaseChangeTwoPhaseMixtureCoeffs_ = subDict(type() + "Coeffs");
|
||||
phaseChangeTwoPhaseMixtureCoeffs_ = optionalSubDict(type() + "Coeffs");
|
||||
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.lookup("n") >> n_;
|
||||
phaseChangeTwoPhaseMixtureCoeffs_.lookup("dNuc") >> dNuc_;
|
||||
|
||||
@ -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
|
||||
@ -43,7 +43,7 @@ Foam::phaseChangeTwoPhaseMixture::phaseChangeTwoPhaseMixture
|
||||
)
|
||||
:
|
||||
incompressibleTwoPhaseMixture(U, phi),
|
||||
phaseChangeTwoPhaseMixtureCoeffs_(subDict(type + "Coeffs")),
|
||||
phaseChangeTwoPhaseMixtureCoeffs_(optionalSubDict(type + "Coeffs")),
|
||||
pSat_("pSat", dimPressure, lookup("pSat"))
|
||||
{}
|
||||
|
||||
@ -77,7 +77,7 @@ bool Foam::phaseChangeTwoPhaseMixture::read()
|
||||
{
|
||||
if (incompressibleTwoPhaseMixture::read())
|
||||
{
|
||||
phaseChangeTwoPhaseMixtureCoeffs_ = subDict(type() + "Coeffs");
|
||||
phaseChangeTwoPhaseMixtureCoeffs_ = optionalSubDict(type() + "Coeffs");
|
||||
lookup("pSat") >> pSat_;
|
||||
|
||||
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
|
||||
@ -56,7 +56,11 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict.subDict(diameterModelType + "Coeffs"), phase);
|
||||
return cstrIter()
|
||||
(
|
||||
dict.optionalSubDict(diameterModelType + "Coeffs"),
|
||||
phase
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
@ -61,7 +61,7 @@ void Foam::diameterModel::correct()
|
||||
|
||||
bool Foam::diameterModel::read(const dictionary& phaseProperties)
|
||||
{
|
||||
diameterProperties_ = phaseProperties.subDict(type() + "Coeffs");
|
||||
diameterProperties_ = phaseProperties.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
|
||||
@ -56,7 +56,11 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict.subDict(diameterModelType + "Coeffs"), phase);
|
||||
return cstrIter()
|
||||
(
|
||||
dict.optionalSubDict(diameterModelType + "Coeffs"),
|
||||
phase
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -253,6 +253,14 @@ makeReactionMixtureThermo
|
||||
constRefRhoConstHThermoPhysics
|
||||
);
|
||||
|
||||
makeReactionMixtureThermo
|
||||
(
|
||||
rhoThermo,
|
||||
rhoReactionThermo,
|
||||
heRhoThermo,
|
||||
multiComponentMixture,
|
||||
constRefFluidHThermoPhysics
|
||||
);
|
||||
|
||||
makeReactionMixtureThermo
|
||||
(
|
||||
|
||||
@ -86,7 +86,8 @@ alphatWallBoilingWallFunctionFvPatchScalarField
|
||||
relax_(0.5),
|
||||
AbyV_(p.size(), 0),
|
||||
alphatConv_(p.size(), 0),
|
||||
dDep_(p.size(), 0),
|
||||
dDep_(p.size(), 1e-5),
|
||||
qq_(p.size(), 0),
|
||||
partitioningModel_(nullptr),
|
||||
nucleationSiteModel_(nullptr),
|
||||
departureDiamModel_(nullptr),
|
||||
@ -114,7 +115,8 @@ alphatWallBoilingWallFunctionFvPatchScalarField
|
||||
relax_(dict.lookupOrDefault<scalar>("relax", 0.5)),
|
||||
AbyV_(p.size(), 0),
|
||||
alphatConv_(p.size(), 0),
|
||||
dDep_(p.size(), 0),
|
||||
dDep_(p.size(), 1e-5),
|
||||
qq_(p.size(), 0),
|
||||
partitioningModel_(nullptr),
|
||||
nucleationSiteModel_(nullptr),
|
||||
departureDiamModel_(nullptr),
|
||||
@ -165,6 +167,11 @@ alphatWallBoilingWallFunctionFvPatchScalarField
|
||||
dDep_ = scalarField("dDep", dict, p.size());
|
||||
}
|
||||
|
||||
if (dict.found("qQuenching"))
|
||||
{
|
||||
qq_ = scalarField("qQuenching", dict, p.size());
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -203,6 +210,7 @@ alphatWallBoilingWallFunctionFvPatchScalarField
|
||||
AbyV_(psf.AbyV_),
|
||||
alphatConv_(psf.alphatConv_, mapper),
|
||||
dDep_(psf.dDep_, mapper),
|
||||
qq_(psf.qq_, mapper),
|
||||
partitioningModel_(psf.partitioningModel_),
|
||||
nucleationSiteModel_(psf.nucleationSiteModel_),
|
||||
departureDiamModel_(psf.departureDiamModel_),
|
||||
@ -221,6 +229,7 @@ alphatWallBoilingWallFunctionFvPatchScalarField
|
||||
AbyV_(psf.AbyV_),
|
||||
alphatConv_(psf.alphatConv_),
|
||||
dDep_(psf.dDep_),
|
||||
qq_(psf.qq_),
|
||||
partitioningModel_(psf.partitioningModel_),
|
||||
nucleationSiteModel_(psf.nucleationSiteModel_),
|
||||
departureDiamModel_(psf.departureDiamModel_),
|
||||
@ -240,6 +249,7 @@ alphatWallBoilingWallFunctionFvPatchScalarField
|
||||
AbyV_(psf.AbyV_),
|
||||
alphatConv_(psf.alphatConv_),
|
||||
dDep_(psf.dDep_),
|
||||
qq_(psf.qq_),
|
||||
partitioningModel_(psf.partitioningModel_),
|
||||
nucleationSiteModel_(psf.nucleationSiteModel_),
|
||||
departureDiamModel_(psf.departureDiamModel_),
|
||||
@ -436,14 +446,7 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
|
||||
const scalarField Tplus(Prt_*(log(E_*yPlus)/kappa_ + P));
|
||||
scalarField Tl(Tw - (Tplus_y250/Tplus)*(Tw - Tc));
|
||||
Tl = max(Tc - 40, min(Tc, Tl));
|
||||
const scalarField Tsub(max(Tsatw - Tl, scalar(0)));
|
||||
|
||||
// Wall heat flux partitioning
|
||||
const scalarField fLiquid
|
||||
(
|
||||
partitioningModel_->fLiquid(liquidw)
|
||||
);
|
||||
Tl = max(Tc - 40, Tl);
|
||||
|
||||
// Nucleation site density:
|
||||
const scalarField N
|
||||
@ -453,7 +456,9 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
liquid,
|
||||
vapor,
|
||||
patchi,
|
||||
Tsatw
|
||||
Tl,
|
||||
Tsatw,
|
||||
L
|
||||
)
|
||||
);
|
||||
|
||||
@ -463,7 +468,9 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
liquid,
|
||||
vapor,
|
||||
patchi,
|
||||
Tsub
|
||||
Tl,
|
||||
Tsatw,
|
||||
L
|
||||
);
|
||||
|
||||
// Bubble departure frequency:
|
||||
@ -481,19 +488,24 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
// Area fractions:
|
||||
|
||||
// Del Valle & Kenning (1985)
|
||||
const scalarField Ja(rhoLiquidw*Cpw*Tsub/(rhoVaporw*L));
|
||||
const scalarField Al(fLiquid*4.8*exp(-Ja/80));
|
||||
const scalarField Ja
|
||||
(
|
||||
rhoLiquidw*Cpw*(Tsatw - Tl)/(rhoVaporw*L)
|
||||
);
|
||||
const scalarField Al
|
||||
(
|
||||
fLiquid*4.8*exp( min(-Ja/80,log(VGREAT)))
|
||||
);
|
||||
|
||||
const scalarField A2(min(pi*sqr(dDep_)*N*Al/4, scalar(1)));
|
||||
const scalarField A1(max(1 - A2, scalar(1e-4)));
|
||||
const scalarField A2E(min(pi*sqr(dDep_)*N*Al/4, scalar(5)));
|
||||
|
||||
// Wall evaporation heat flux [kg/s3 = J/m2s]
|
||||
const scalarField Qe((1.0/6.0)*A2E*dDep_*rhoVaporw*fDep*L);
|
||||
|
||||
// Volumetric mass source in the near wall cell due to the
|
||||
// wall boiling
|
||||
dmdt_ = (1 - relax_)*dmdt_ + relax_*Qe*AbyV_/L;
|
||||
dmdt_ =
|
||||
(1 - relax_)*dmdt_
|
||||
+ relax_*(1.0/6.0)*A2E*dDep_*rhoVaporw*fDep*AbyV_;
|
||||
|
||||
// Volumetric source in the near wall cell due to the wall
|
||||
// boiling
|
||||
@ -506,7 +518,7 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
);
|
||||
|
||||
// Quenching heat flux
|
||||
const scalarField Qq(A2*hQ*max(Tw - Tl, scalar(0)));
|
||||
qq_ = (A2*hQ*max(Tw - Tl, scalar(0)));
|
||||
|
||||
// Effective thermal diffusivity that corresponds to the
|
||||
// calculated convective, quenching and evaporative heat fluxes
|
||||
@ -515,7 +527,7 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
(
|
||||
(
|
||||
A1*alphatConv_
|
||||
+ (Qq + Qe)/max(hew.snGrad(), scalar(1e-16))
|
||||
+ (qq_ + qe())/max(hew.snGrad(), scalar(1e-16))
|
||||
)
|
||||
/max(liquidw, scalar(1e-8))
|
||||
);
|
||||
@ -538,12 +550,12 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
|
||||
if (debug)
|
||||
{
|
||||
const scalarField Qc
|
||||
const scalarField qc
|
||||
(
|
||||
fLiquid*A1*(alphatConv_ + alphaw)*hew.snGrad()
|
||||
);
|
||||
|
||||
const scalarField QEff
|
||||
const scalarField qEff
|
||||
(
|
||||
liquidw*(*this + alphaw)*hew.snGrad()
|
||||
);
|
||||
@ -562,13 +574,13 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
<< gMax(A2E) << endl;
|
||||
Info<< " dmdtW: " << gMin(dmdt_) << " - "
|
||||
<< gMax(dmdt_) << endl;
|
||||
Info<< " Qc: " << gMin(Qc) << " - " << gMax(Qc) << endl;
|
||||
Info<< " Qq: " << gMin(fLiquid*Qq) << " - "
|
||||
<< gMax(fLiquid*Qq) << endl;
|
||||
Info<< " Qe: " << gMin(fLiquid*Qe) << " - "
|
||||
<< gMax(fLiquid*Qe) << endl;
|
||||
Info<< " QEff: " << gMin(QEff) << " - "
|
||||
<< gMax(QEff) << endl;
|
||||
Info<< " qc: " << gMin(qc) << " - " << gMax(qc) << endl;
|
||||
Info<< " qq: " << gMin(fLiquid*qq()) << " - "
|
||||
<< gMax(fLiquid*qq()) << endl;
|
||||
Info<< " qe: " << gMin(fLiquid*qe()) << " - "
|
||||
<< gMax(fLiquid*qe()) << endl;
|
||||
Info<< " qEff: " << gMin(qEff) << " - "
|
||||
<< gMax(qEff) << endl;
|
||||
Info<< " alphat: " << gMin(*this) << " - "
|
||||
<< gMax(*this) << endl;
|
||||
Info<< " alphatConv: " << gMin(alphatConv_)
|
||||
@ -636,6 +648,7 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||
|
||||
dmdt_.writeEntry("dmdt", os);
|
||||
dDep_.writeEntry("dDep", os);
|
||||
qq_.writeEntry("qQuenching", os);
|
||||
alphatConv_.writeEntry("alphatConv", os);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
@ -181,6 +181,9 @@ private:
|
||||
//- Departure diameter field
|
||||
scalarField dDep_;
|
||||
|
||||
//- Quenching surface heat flux
|
||||
scalarField qq_;
|
||||
|
||||
//- Run-time selected heat flux partitioning model
|
||||
autoPtr<wallBoilingModels::partitioningModel>
|
||||
partitioningModel_;
|
||||
@ -275,6 +278,17 @@ public:
|
||||
return dDep_;
|
||||
}
|
||||
|
||||
//- Return the quenching surface heat flux [W/m2]
|
||||
const scalarField& qq() const
|
||||
{
|
||||
return qq_;
|
||||
}
|
||||
|
||||
//- Return the evaporation surface heat flux [W/m2]
|
||||
tmp<scalarField> qe() const
|
||||
{
|
||||
return mDotL_/AbyV_;
|
||||
}
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -80,7 +80,9 @@ KocamustafaogullariIshii::dDeparture
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tsub
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const
|
||||
{
|
||||
// Gravitational acceleration
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -92,7 +92,9 @@ public:
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tsub
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const;
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -54,7 +54,10 @@ TolubinskiKostanchuk::TolubinskiKostanchuk
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
departureDiameterModel()
|
||||
departureDiameterModel(),
|
||||
dRef_(dict.lookupOrDefault<scalar>("dRef", 6e-4)),
|
||||
dMax_(dict.lookupOrDefault<scalar>("dMax", 0.0014)),
|
||||
dMin_(dict.lookupOrDefault<scalar>("dMin", 1e-6))
|
||||
{}
|
||||
|
||||
|
||||
@ -74,10 +77,22 @@ TolubinskiKostanchuk::dDeparture
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tsub
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const
|
||||
{
|
||||
return max(min(0.0006*exp(-Tsub/45), scalar(0.0014)), scalar(1e-6));
|
||||
return max(min(dRef_*exp(-(Tsatw-Tl)/45), dMax_), dMin_);
|
||||
}
|
||||
|
||||
|
||||
void Foam::wallBoilingModels::departureDiameterModels::
|
||||
TolubinskiKostanchuk::write(Ostream& os) const
|
||||
{
|
||||
departureDiameterModel::write(os);
|
||||
os.writeKeyword("dRef") << dRef_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("dMax") << dMax_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("dMin") << dMin_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -63,6 +63,17 @@ class TolubinskiKostanchuk
|
||||
public departureDiameterModel
|
||||
{
|
||||
|
||||
// Private data:
|
||||
|
||||
//- Coefficient of the temperature term
|
||||
scalar dRef_;
|
||||
|
||||
//- Maximum diameter
|
||||
scalar dMax_;
|
||||
|
||||
//- Minimum diameter
|
||||
scalar dMin_;
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
@ -87,8 +98,12 @@ public:
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tsub
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const;
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -107,7 +107,9 @@ public:
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const scalarField& Tsub
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const = 0;
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -53,7 +53,8 @@ Foam::wallBoilingModels::nucleationSiteModels::LemmertChawla::LemmertChawla
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
nucleationSiteModel()
|
||||
nucleationSiteModel(),
|
||||
Cn_(dict.lookupOrDefault<scalar>("Cn", 1))
|
||||
{}
|
||||
|
||||
|
||||
@ -71,13 +72,15 @@ Foam::wallBoilingModels::nucleationSiteModels::LemmertChawla::N
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const fvPatchScalarField& Tsatw
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const
|
||||
{
|
||||
const fvPatchScalarField& Tw =
|
||||
liquid.thermo().T().boundaryField()[patchi];
|
||||
|
||||
return 0.8*9.922e5*pow(max((Tw - Tsatw)/10, scalar(0)), 1.805);
|
||||
return Cn_*9.922e5*pow(max((Tw - Tsatw)/10, scalar(0)), 1.805);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -68,6 +68,11 @@ class LemmertChawla
|
||||
public nucleationSiteModel
|
||||
{
|
||||
|
||||
// Private data:
|
||||
|
||||
//- Coefficient for nucleation site density
|
||||
scalar Cn_;
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
@ -91,7 +96,9 @@ public:
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const fvPatchScalarField& Tsatw
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -107,7 +107,9 @@ public:
|
||||
const phaseModel& liquid,
|
||||
const phaseModel& vapor,
|
||||
const label patchi,
|
||||
const fvPatchScalarField& Tsatw
|
||||
const scalarField& Tl,
|
||||
const scalarField& Tsatw,
|
||||
const scalarField& L
|
||||
) const = 0;
|
||||
|
||||
virtual void write(Ostream& os) const;
|
||||
|
||||
@ -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
|
||||
@ -56,7 +56,7 @@ Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::HrenyaSinclair
|
||||
)
|
||||
:
|
||||
conductivityModel(dict),
|
||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
||||
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
|
||||
L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_)
|
||||
{}
|
||||
|
||||
@ -103,7 +103,7 @@ Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::kappa
|
||||
|
||||
bool Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::read()
|
||||
{
|
||||
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
|
||||
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
|
||||
|
||||
L_.readIfPresent(coeffDict_);
|
||||
|
||||
|
||||
@ -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
|
||||
@ -57,7 +57,7 @@ JohnsonJackson
|
||||
)
|
||||
:
|
||||
frictionalStressModel(dict),
|
||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
||||
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
|
||||
Fr_("Fr", dimensionSet(1, -1, -2, 0, 0), coeffDict_),
|
||||
eta_("eta", dimless, coeffDict_),
|
||||
p_("p", dimless, coeffDict_),
|
||||
@ -130,7 +130,7 @@ Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::nu
|
||||
|
||||
bool Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::read()
|
||||
{
|
||||
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
|
||||
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
|
||||
|
||||
Fr_.read(coeffDict_);
|
||||
eta_.read(coeffDict_);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -57,7 +57,7 @@ JohnsonJacksonSchaeffer::JohnsonJacksonSchaeffer
|
||||
)
|
||||
:
|
||||
frictionalStressModel(dict),
|
||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
||||
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
|
||||
Fr_("Fr", dimensionSet(1, -1, -2, 0, 0), coeffDict_),
|
||||
eta_("eta", dimless, coeffDict_),
|
||||
p_("p", dimless, coeffDict_),
|
||||
@ -190,7 +190,7 @@ JohnsonJacksonSchaeffer::nu
|
||||
bool Foam::kineticTheoryModels::frictionalStressModels::
|
||||
JohnsonJacksonSchaeffer::read()
|
||||
{
|
||||
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
|
||||
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
|
||||
|
||||
Fr_.read(coeffDict_);
|
||||
eta_.read(coeffDict_);
|
||||
|
||||
@ -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
|
||||
@ -55,7 +55,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::Schaeffer
|
||||
)
|
||||
:
|
||||
frictionalStressModel(dict),
|
||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
||||
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
|
||||
phi_("phi", dimless, coeffDict_)
|
||||
{
|
||||
phi_ *= constant::mathematical::pi/180.0;
|
||||
@ -178,7 +178,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu
|
||||
|
||||
bool Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::read()
|
||||
{
|
||||
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
|
||||
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
|
||||
|
||||
phi_.read(coeffDict_);
|
||||
phi_ *= constant::mathematical::pi/180.0;
|
||||
|
||||
@ -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
|
||||
@ -56,7 +56,7 @@ Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::HrenyaSinclair
|
||||
)
|
||||
:
|
||||
viscosityModel(dict),
|
||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
||||
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
|
||||
L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_)
|
||||
{}
|
||||
|
||||
@ -100,7 +100,7 @@ Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::nu
|
||||
|
||||
bool Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::read()
|
||||
{
|
||||
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
|
||||
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
|
||||
|
||||
L_.readIfPresent(coeffDict_);
|
||||
|
||||
|
||||
@ -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
|
||||
@ -56,7 +56,7 @@ Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::HrenyaSinclair
|
||||
)
|
||||
:
|
||||
conductivityModel(dict),
|
||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
||||
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
|
||||
L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_)
|
||||
{}
|
||||
|
||||
@ -103,7 +103,7 @@ Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::kappa
|
||||
|
||||
bool Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::read()
|
||||
{
|
||||
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
|
||||
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
|
||||
|
||||
L_.readIfPresent(coeffDict_);
|
||||
|
||||
|
||||
@ -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
|
||||
@ -57,7 +57,7 @@ JohnsonJackson
|
||||
)
|
||||
:
|
||||
frictionalStressModel(dict),
|
||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
||||
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
|
||||
Fr_("Fr", dimensionSet(1, -1, -2, 0, 0), coeffDict_),
|
||||
eta_("eta", dimless, coeffDict_),
|
||||
p_("p", dimless, coeffDict_),
|
||||
@ -130,7 +130,7 @@ Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::nu
|
||||
|
||||
bool Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::read()
|
||||
{
|
||||
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
|
||||
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
|
||||
|
||||
Fr_.read(coeffDict_);
|
||||
eta_.read(coeffDict_);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -57,7 +57,7 @@ JohnsonJacksonSchaeffer::JohnsonJacksonSchaeffer
|
||||
)
|
||||
:
|
||||
frictionalStressModel(dict),
|
||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
||||
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
|
||||
Fr_("Fr", dimensionSet(1, -1, -2, 0, 0), coeffDict_),
|
||||
eta_("eta", dimless, coeffDict_),
|
||||
p_("p", dimless, coeffDict_),
|
||||
@ -190,7 +190,7 @@ JohnsonJacksonSchaeffer::nu
|
||||
bool Foam::kineticTheoryModels::frictionalStressModels::
|
||||
JohnsonJacksonSchaeffer::read()
|
||||
{
|
||||
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
|
||||
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
|
||||
|
||||
Fr_.read(coeffDict_);
|
||||
eta_.read(coeffDict_);
|
||||
|
||||
@ -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
|
||||
@ -55,7 +55,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::Schaeffer
|
||||
)
|
||||
:
|
||||
frictionalStressModel(dict),
|
||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
||||
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
|
||||
phi_("phi", dimless, coeffDict_)
|
||||
{
|
||||
phi_ *= constant::mathematical::pi/180.0;
|
||||
@ -178,7 +178,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu
|
||||
|
||||
bool Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::read()
|
||||
{
|
||||
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
|
||||
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
|
||||
|
||||
phi_.read(coeffDict_);
|
||||
phi_ *= constant::mathematical::pi/180.0;
|
||||
|
||||
@ -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
|
||||
@ -56,7 +56,7 @@ Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::HrenyaSinclair
|
||||
)
|
||||
:
|
||||
viscosityModel(dict),
|
||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
||||
coeffDict_(dict.optionalSubDict(typeName + "Coeffs")),
|
||||
L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict_)
|
||||
{}
|
||||
|
||||
@ -100,7 +100,7 @@ Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::nu
|
||||
|
||||
bool Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::read()
|
||||
{
|
||||
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
|
||||
coeffDict_ <<= dict_.optionalSubDict(typeName + "Coeffs");
|
||||
|
||||
L_.readIfPresent(coeffDict_);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -61,7 +61,7 @@ void Foam::diameterModel::correct()
|
||||
|
||||
bool Foam::diameterModel::read(const dictionary& phaseProperties)
|
||||
{
|
||||
diameterProperties_ = phaseProperties.subDict(type() + "Coeffs");
|
||||
diameterProperties_ = phaseProperties.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
|
||||
@ -56,7 +56,11 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return cstrIter()(dict.subDict(diameterModelType + "Coeffs"), phase);
|
||||
return cstrIter()
|
||||
(
|
||||
dict.optionalSubDict(diameterModelType + "Coeffs"),
|
||||
phase
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/edgeMesh/lnInclude
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-ledgeMesh
|
||||
-lmeshTools
|
||||
|
||||
@ -19,7 +19,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
|
||||
-I$(LIB_SRC)/edgeMesh/lnInclude \
|
||||
-I$(LIB_SRC)/mesh/snappyHexMesh/lnInclude \
|
||||
-I../conformalVoronoiMesh/lnInclude
|
||||
|
||||
@ -30,7 +29,6 @@ EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
-ldecompositionMethods \
|
||||
-L$(FOAM_LIBBIN)/dummy -lscotchDecomp -lptscotchDecomp \
|
||||
-ledgeMesh \
|
||||
-ltriSurface \
|
||||
-ldynamicMesh \
|
||||
-lsampling \
|
||||
|
||||
@ -17,7 +17,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
|
||||
-I$(LIB_SRC)/parallel/decompose/decompose/lnInclude \
|
||||
-I$(LIB_SRC)/edgeMesh/lnInclude \
|
||||
-I$(LIB_SRC)/fileFormats/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/surfMesh/lnInclude \
|
||||
@ -30,7 +29,6 @@ LIB_LIBS = \
|
||||
${CGAL_LIBS} \
|
||||
-lmeshTools \
|
||||
-ldecompose \
|
||||
-ledgeMesh \
|
||||
-lfileFormats \
|
||||
-ltriSurface \
|
||||
-ldynamicMesh \
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -58,7 +58,7 @@ Foam::cellSizeFunction::cellSizeFunction
|
||||
defaultCellSize
|
||||
)
|
||||
),
|
||||
coeffsDict_(subDict(type + "Coeffs")),
|
||||
coeffsDict_(optionalSubDict(type + "Coeffs")),
|
||||
defaultCellSize_(defaultCellSize),
|
||||
regionIndices_(regionIndices),
|
||||
sideMode_(),
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -107,7 +107,7 @@ Foam::automatic::automatic
|
||||
surface,
|
||||
defaultCellSize
|
||||
),
|
||||
coeffsDict_(cellSizeCalcTypeDict.subDict(typeName + "Coeffs")),
|
||||
coeffsDict_(cellSizeCalcTypeDict.optionalSubDict(typeName + "Coeffs")),
|
||||
surfaceName_(surface.searchableSurface::name()),
|
||||
readCurvature_(Switch(coeffsDict_.lookup("curvature"))),
|
||||
curvatureFile_(coeffsDict_.lookup("curvatureFile")),
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -58,10 +58,13 @@ Foam::fieldFromFile::fieldFromFile
|
||||
surface,
|
||||
defaultCellSize
|
||||
),
|
||||
coeffsDict_(cellSizeCalcTypeDict.subDict(typeName + "Coeffs")),
|
||||
coeffsDict_(cellSizeCalcTypeDict.optionalSubDict(typeName + "Coeffs")),
|
||||
fileName_
|
||||
(
|
||||
cellSizeCalcTypeDict.subDict(typeName + "Coeffs").lookup("fieldFile")
|
||||
cellSizeCalcTypeDict.optionalSubDict
|
||||
(
|
||||
typeName + "Coeffs"
|
||||
).lookup("fieldFile")
|
||||
),
|
||||
cellSizeMultipleCoeff_
|
||||
(
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -46,7 +46,7 @@ Foam::surfaceCellSizeFunction::surfaceCellSizeFunction
|
||||
:
|
||||
dictionary(surfaceCellSizeFunctionDict),
|
||||
surface_(surface),
|
||||
coeffsDict_(subDict(type + "Coeffs")),
|
||||
coeffsDict_(optionalSubDict(type + "Coeffs")),
|
||||
defaultCellSize_(defaultCellSize),
|
||||
refinementFactor_
|
||||
(
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -46,7 +46,7 @@ faceAreaWeightModel::faceAreaWeightModel
|
||||
)
|
||||
:
|
||||
dictionary(relaxationDict),
|
||||
coeffDict_(subDict(type + "Coeffs"))
|
||||
coeffDict_(optionalSubDict(type + "Coeffs"))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -56,7 +56,7 @@ initialPointsMethod::initialPointsMethod
|
||||
geometryToConformTo_(geometryToConformTo),
|
||||
cellShapeControls_(cellShapeControls),
|
||||
decomposition_(decomposition),
|
||||
detailsDict_(subDict(type + "Coeffs")),
|
||||
detailsDict_(optionalSubDict(type + "Coeffs")),
|
||||
minimumSurfaceDistanceCoeffSqr_
|
||||
(
|
||||
sqr
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -48,7 +48,7 @@ relaxationModel::relaxationModel
|
||||
:
|
||||
dictionary(relaxationDict),
|
||||
runTime_(runTime),
|
||||
coeffDict_(subDict(type + "Coeffs"))
|
||||
coeffDict_(optionalSubDict(type + "Coeffs"))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -17,7 +17,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
|
||||
-I$(LIB_SRC)/edgeMesh/lnInclude \
|
||||
-I$(LIB_SRC)/fileFormats/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||
@ -32,7 +31,6 @@ EXE_LIBS = \
|
||||
-ldecompositionMethods \
|
||||
-ldecompose \
|
||||
-L$(FOAM_LIBBIN)/dummy -lptscotchDecomp -lscotchDecomp \
|
||||
-ledgeMesh \
|
||||
-lfileFormats \
|
||||
-ltriSurface \
|
||||
-ldynamicMesh \
|
||||
|
||||
@ -10,7 +10,6 @@ EXE_INC = \
|
||||
-I../conformalVoronoiMesh/lnInclude \
|
||||
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
|
||||
-I$(LIB_SRC)/parallel/decompose/decompose/lnInclude \
|
||||
-I$(LIB_SRC)/edgeMesh/lnInclude \
|
||||
-I$(LIB_SRC)/mesh/snappyHexMesh/lnInclude \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
@ -25,7 +24,6 @@ EXE_LIBS = \
|
||||
-lconformalVoronoiMesh \
|
||||
-ldecompositionMethods /* -L$(FOAM_LIBBIN)/dummy -lscotchDecomp */ \
|
||||
-ldecompose \
|
||||
-ledgeMesh \
|
||||
-ltriSurface \
|
||||
-lmeshTools \
|
||||
-lfileFormats \
|
||||
|
||||
@ -8,7 +8,6 @@ EXE_INC = \
|
||||
/* -IMarchingCubes */ \
|
||||
-I$(FASTDUALOCTREE_SRC_PATH) \
|
||||
-I../conformalVoronoiMesh/lnInclude \
|
||||
-I$(LIB_SRC)/edgeMesh/lnInclude \
|
||||
-I$(LIB_SRC)/mesh/snappyHexMesh/lnInclude \
|
||||
-I$(LIB_SRC)/fileFormats/lnInclude \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||
@ -20,7 +19,6 @@ EXE_LIBS = \
|
||||
-lGL \
|
||||
-lconformalVoronoiMesh \
|
||||
-ldecompositionMethods -L$(FOAM_LIBBIN)/dummy -lscotchDecomp \
|
||||
-ledgeMesh \
|
||||
-lfileFormats \
|
||||
-ltriSurface \
|
||||
-lmeshTools \
|
||||
|
||||
@ -15,7 +15,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/surfMesh/lnInclude \
|
||||
-I$(LIB_SRC)/edgeMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
@ -31,7 +30,6 @@ EXE_LIBS = \
|
||||
-lconformalVoronoiMesh \
|
||||
-lmeshTools \
|
||||
-lsurfMesh \
|
||||
-ledgeMesh \
|
||||
-ltriSurface \
|
||||
-ldynamicMesh \
|
||||
-ldecompositionMethods \
|
||||
|
||||
@ -7,7 +7,6 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||
-I$(LIB_SRC)/surfMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/edgeMesh/lnInclude \
|
||||
-I$(LIB_SRC)/parallel/decompose/decompose/lnInclude \
|
||||
-I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
@ -144,7 +144,7 @@ autoPtr<refinementSurfaces> createRefinementSurfaces
|
||||
const word scsFuncName =
|
||||
shapeDict.lookup("surfaceCellSizeFunction");
|
||||
const dictionary& scsDict =
|
||||
shapeDict.subDict(scsFuncName + "Coeffs");
|
||||
shapeDict.optionalSubDict(scsFuncName + "Coeffs");
|
||||
|
||||
const scalar surfaceCellSize =
|
||||
readScalar(scsDict.lookup("surfaceCellSizeCoeff"));
|
||||
|
||||
@ -28,7 +28,6 @@ EXE_LIBS = \
|
||||
-lDSMC \
|
||||
-ldynamicFvMesh \
|
||||
-ldynamicMesh \
|
||||
-ledgeMesh \
|
||||
-lengine \
|
||||
-lextrudeModel \
|
||||
-lfieldFunctionObjects \
|
||||
|
||||
@ -22,9 +22,9 @@
|
||||
|
||||
cachedRandom rndGen(label(0), -1);
|
||||
|
||||
autoPtr<distributionModels::distributionModel> p
|
||||
autoPtr<distributionModel> p
|
||||
(
|
||||
distributionModels::distributionModel::New
|
||||
distributionModel::New
|
||||
(
|
||||
pdfDictionary,
|
||||
rndGen
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -49,7 +49,7 @@ Foam::tabulatedWallFunctions::tabulatedWallFunction::tabulatedWallFunction
|
||||
:
|
||||
dict_(dict),
|
||||
mesh_(mesh),
|
||||
coeffDict_(dict.subDict(name + "Coeffs")),
|
||||
coeffDict_(dict.optionalSubDict(name + "Coeffs")),
|
||||
invertedTableName_(dict.lookup("invertedTableName")),
|
||||
invertedTable_(invertedTableName_, mesh_, dict, true)
|
||||
{}
|
||||
|
||||
@ -17,12 +17,10 @@ EXE_INC = \
|
||||
$(COMP_FLAGS) \
|
||||
-I$(FOAM_SRC)/surfMesh/lnInclude \
|
||||
-I$(FOAM_SRC)/triSurface/lnInclude \
|
||||
-I$(LIB_SRC)/edgeMesh/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lsurfMesh \
|
||||
-ltriSurface \
|
||||
-ledgeMesh \
|
||||
-lmeshTools \
|
||||
$(LINK_FLAGS)
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/edgeMesh/lnInclude
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
-ledgeMesh
|
||||
-lmeshTools
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/edgeMesh/lnInclude \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude \
|
||||
-I$(LIB_SRC)/surfMesh/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
-ledgeMesh \
|
||||
-ltriSurface \
|
||||
-lsampling
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/surfMesh/lnInclude \
|
||||
-I$(LIB_SRC)/edgeMesh/lnInclude
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-ledgeMesh \
|
||||
-lsurfMesh
|
||||
-lsurfMesh \
|
||||
-lmeshTools
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
# \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -62,9 +62,12 @@ esac
|
||||
[ -d "$1" ] && usage "$1 directory already exists, aborting..."
|
||||
|
||||
NAME=$1
|
||||
YEAR=$(date +%Y)
|
||||
|
||||
echo "Creating application code directory $NAME" && mkdir $NAME
|
||||
sed "s#NAME#${NAME}#g" ${DIR}/app.C > $NAME/$NAME.C
|
||||
sed -e "s#NAME#${NAME}#g" \
|
||||
-e "s#YEAR#${YEAR}#g" \
|
||||
${DIR}/app.C > $NAME/$NAME.C
|
||||
|
||||
echo "Creating Make subdirectory" && mkdir $NAME/Make
|
||||
sed "s#NAME#${NAME}#g" ${DIR}/Make/files > $NAME/Make/files
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||
# \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -134,6 +134,7 @@ FVPATCHF=fvPatch$(cap $FIELD)
|
||||
CLASS=$NAME$(cap $FVPATCHF)
|
||||
PARENT=$BASE$(cap $FVPATCHF)
|
||||
CONSTRUCT=$(echo $CLASS | sed 's/<Type>//g')
|
||||
YEAR=$(date +%Y)
|
||||
|
||||
# Create some example values for the Description
|
||||
n=0
|
||||
@ -155,6 +156,7 @@ do
|
||||
-e "s#NAME#${NAME}#g" \
|
||||
-e "s#BASE#${BASE}#g" \
|
||||
-e "s#CONSTRUCT#${CONSTRUCT}#g" \
|
||||
-e "s#YEAR#${YEAR}#g" \
|
||||
-e "s#CLASS#${CLASS}#g" \
|
||||
-e "s#FIELD#${FIELD}#g" \
|
||||
-e "s#FVPATCHF#${FVPATCHF}#g" \
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
# \\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -66,12 +66,15 @@ esac
|
||||
[ -d "$1" ] && usage "$1 directory already exists, aborting..."
|
||||
|
||||
NAME=$1
|
||||
YEAR=$(date +%Y)
|
||||
|
||||
echo "Creating function object code directory $NAME" && mkdir $NAME
|
||||
for F in $(ls ${DIR}/*.*)
|
||||
do
|
||||
FILE=$(basename $F | sed "s#FUNCTIONOBJECT#${NAME}#g")
|
||||
sed "s#FUNCTIONOBJECT#${NAME}#g" ${F} > ${NAME}/${FILE}
|
||||
sed -e "s#FUNCTIONOBJECT#${NAME}#g" \
|
||||
-e "s#YEAR#${YEAR}#g" \
|
||||
${F} > ${NAME}/${FILE}
|
||||
done
|
||||
|
||||
echo "Creating Make subdirectory" && mkdir $NAME/Make
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user