mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into cvm
Conflicts: src/mesh/Allwmake
This commit is contained in:
63
src/Allwmake
63
src/Allwmake
@ -1,6 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
|
makeOption=libso
|
||||||
|
[ $# -ge 1 ] && makeOption=$1
|
||||||
|
|
||||||
wmakeCheckPwd "$WM_PROJECT_DIR/src" || {
|
wmakeCheckPwd "$WM_PROJECT_DIR/src" || {
|
||||||
echo "Error: Current directory is not \$WM_PROJECT_DIR/src"
|
echo "Error: Current directory is not \$WM_PROJECT_DIR/src"
|
||||||
echo " The environment variables are inconsistent with the installation."
|
echo " The environment variables are inconsistent with the installation."
|
||||||
@ -21,53 +24,53 @@ wmakePrintBuild -check || /bin/rm -f OpenFOAM/Make/$WM_OPTIONS/global.? 2>/dev/n
|
|||||||
|
|
||||||
wmakeLnInclude OpenFOAM
|
wmakeLnInclude OpenFOAM
|
||||||
wmakeLnInclude OSspecific/$WM_OSTYPE
|
wmakeLnInclude OSspecific/$WM_OSTYPE
|
||||||
Pstream/Allwmake
|
Pstream/Allwmake $*
|
||||||
|
|
||||||
OSspecific/$WM_OSTYPE/Allwmake
|
OSspecific/$WM_OSTYPE/Allwmake
|
||||||
wmake libso OpenFOAM
|
wmake $makeOption OpenFOAM
|
||||||
|
|
||||||
wmake libso fileFormats
|
wmake $makeOption fileFormats
|
||||||
wmake libso triSurface
|
wmake $makeOption triSurface
|
||||||
wmake libso meshTools
|
wmake $makeOption meshTools
|
||||||
wmake libso edgeMesh
|
wmake $makeOption edgeMesh
|
||||||
wmake libso surfMesh
|
wmake $makeOption surfMesh
|
||||||
|
|
||||||
# Decomposition methods needed by dummyThirdParty
|
# Decomposition methods needed by dummyThirdParty
|
||||||
parallel/decompose/AllwmakeLnInclude
|
parallel/decompose/AllwmakeLnInclude
|
||||||
# dummyThirdParty (dummy metisDecomp, scotchDecomp etc) needed by e.g. meshTools
|
# dummyThirdParty (dummy metisDecomp, scotchDecomp etc) needed by e.g. meshTools
|
||||||
dummyThirdParty/Allwmake
|
dummyThirdParty/Allwmake $*
|
||||||
|
|
||||||
wmake libso lagrangian/basic
|
wmake $makeOption lagrangian/basic
|
||||||
wmake libso finiteVolume
|
wmake $makeOption finiteVolume
|
||||||
wmake libso genericPatchFields
|
wmake $makeOption genericPatchFields
|
||||||
|
|
||||||
# Build the proper scotchDecomp, metisDecomp etc.
|
# Build the proper scotchDecomp, metisDecomp etc.
|
||||||
parallel/Allwmake
|
parallel/Allwmake $*
|
||||||
|
|
||||||
wmake libso conversion
|
wmake $makeOption conversion
|
||||||
|
|
||||||
wmake libso sampling
|
wmake $makeOption sampling
|
||||||
|
|
||||||
wmake libso dynamicMesh
|
wmake $makeOption dynamicMesh
|
||||||
wmake libso dynamicFvMesh
|
wmake $makeOption dynamicFvMesh
|
||||||
wmake libso topoChangerFvMesh
|
wmake $makeOption topoChangerFvMesh
|
||||||
|
|
||||||
wmake libso ODE
|
wmake $makeOption ODE
|
||||||
wmake libso randomProcesses
|
wmake $makeOption randomProcesses
|
||||||
|
|
||||||
thermophysicalModels/Allwmake
|
thermophysicalModels/Allwmake $*
|
||||||
transportModels/Allwmake
|
transportModels/Allwmake $*
|
||||||
turbulenceModels/Allwmake
|
turbulenceModels/Allwmake $*
|
||||||
wmake libso surfaceFilmModels
|
wmake $makeOption surfaceFilmModels
|
||||||
lagrangian/Allwmake
|
lagrangian/Allwmake $*
|
||||||
postProcessing/Allwmake
|
postProcessing/Allwmake $*
|
||||||
mesh/Allwmake
|
mesh/Allwmake $*
|
||||||
|
|
||||||
wmake libso errorEstimation
|
wmake $makeOption errorEstimation
|
||||||
|
|
||||||
fvAgglomerationMethods/Allwmake
|
fvAgglomerationMethods/Allwmake $*
|
||||||
|
|
||||||
wmake libso fvMotionSolver
|
wmake $makeOption fvMotionSolver
|
||||||
wmake libso engine
|
wmake $makeOption engine
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,7 +24,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "PstreamReduceOps.H"
|
#include "Pstream.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -222,7 +222,7 @@ void Foam::mapDistribute::printLayout(Ostream& os) const
|
|||||||
localSize = maxIndex[Pstream::myProcNo()]+1;
|
localSize = maxIndex[Pstream::myProcNo()]+1;
|
||||||
}
|
}
|
||||||
|
|
||||||
os << "Layout:" << endl
|
os << "Layout: (constructSize:" << constructSize_ << ")" << endl
|
||||||
<< "local (processor " << Pstream::myProcNo() << "):" << endl
|
<< "local (processor " << Pstream::myProcNo() << "):" << endl
|
||||||
<< " start : 0" << endl
|
<< " start : 0" << endl
|
||||||
<< " size : " << localSize << endl;
|
<< " size : " << localSize << endl;
|
||||||
|
|||||||
@ -966,8 +966,6 @@ void Foam::mapDistribute::reverseDistribute
|
|||||||
const bool dummyTransform
|
const bool dummyTransform
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
fld.setSize(constructSize);
|
|
||||||
|
|
||||||
if (dummyTransform)
|
if (dummyTransform)
|
||||||
{
|
{
|
||||||
applyDummyInverseTransforms(fld);
|
applyDummyInverseTransforms(fld);
|
||||||
@ -1024,8 +1022,6 @@ void Foam::mapDistribute::reverseDistribute
|
|||||||
const bool dummyTransform
|
const bool dummyTransform
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
fld.setSize(constructSize);
|
|
||||||
|
|
||||||
if (dummyTransform)
|
if (dummyTransform)
|
||||||
{
|
{
|
||||||
applyDummyInverseTransforms(fld);
|
applyDummyInverseTransforms(fld);
|
||||||
|
|||||||
@ -2,7 +2,10 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
wmake libso dummy
|
makeOption=libso
|
||||||
|
[ $# -ge 1 ] && makeOption=$1
|
||||||
|
|
||||||
|
wmake $makeOption dummy
|
||||||
|
|
||||||
case "$WM_MPLIB" in
|
case "$WM_MPLIB" in
|
||||||
*MPI*)
|
*MPI*)
|
||||||
@ -11,11 +14,11 @@ case "$WM_MPLIB" in
|
|||||||
echo "Note: ignore spurious warnings about missing mpicxx.h headers"
|
echo "Note: ignore spurious warnings about missing mpicxx.h headers"
|
||||||
set -x
|
set -x
|
||||||
# force compilation into qualified directory
|
# force compilation into qualified directory
|
||||||
WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB wmake libso mpi
|
WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB wmake $makeOption mpi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
#GAMMA)
|
#GAMMA)
|
||||||
# wmake libso gamma
|
# wmake $makeOption gamma
|
||||||
# ;;
|
# ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,9 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
wmake libso
|
makeOption=libso
|
||||||
|
[ $# -ge 1 ] && makeOption=$1
|
||||||
|
|
||||||
|
wmake $makeOption
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
11
src/dummyThirdParty/Allwmake
vendored
11
src/dummyThirdParty/Allwmake
vendored
@ -2,10 +2,13 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
wmake libso scotchDecomp
|
makeOption=libso
|
||||||
wmake libso ptscotchDecomp
|
[ $# -ge 1 ] && makeOption=$1
|
||||||
wmake libso metisDecomp
|
|
||||||
wmake libso MGridGen
|
wmake $makeOption scotchDecomp
|
||||||
|
wmake $makeOption ptscotchDecomp
|
||||||
|
wmake $makeOption metisDecomp
|
||||||
|
wmake $makeOption MGridGen
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -120,7 +120,7 @@ void volPointInterpolation::pushUntransformedData
|
|||||||
const labelList& slavePoints = slaves[i];
|
const labelList& slavePoints = slaves[i];
|
||||||
|
|
||||||
// Copy master data to slave slots
|
// Copy master data to slave slots
|
||||||
forAll(slaves, j)
|
forAll(slavePoints, j)
|
||||||
{
|
{
|
||||||
elems[slavePoints[j]] = elems[i];
|
elems[slavePoints[j]] = elems[i];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,9 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
wmake libso MGridGenGamgAgglomeration
|
makeOption=libso
|
||||||
|
[ $# -ge 1 ] && makeOption=$1
|
||||||
|
|
||||||
|
wmake $makeOption MGridGenGamgAgglomeration
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -2,13 +2,16 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
wmake libso basic
|
makeOption=libso
|
||||||
wmake libso solidParticle
|
[ $# -ge 1 ] && makeOption=$1
|
||||||
wmake libso intermediate
|
|
||||||
wmake libso dieselSpray
|
|
||||||
wmake libso dsmc
|
|
||||||
wmake libso coalCombustion
|
|
||||||
|
|
||||||
molecularDynamics/Allwmake
|
wmake $makeOption basic
|
||||||
|
wmake $makeOption solidParticle
|
||||||
|
wmake $makeOption intermediate
|
||||||
|
wmake $makeOption dieselSpray
|
||||||
|
wmake $makeOption dsmc
|
||||||
|
wmake $makeOption coalCombustion
|
||||||
|
|
||||||
|
molecularDynamics/Allwmake $*
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -74,7 +74,7 @@ Foam::KinematicCloud<ParcelType>::cloudSolution::cloudSolution
|
|||||||
coupled_(false),
|
coupled_(false),
|
||||||
cellValueSourceCorrection_(false),
|
cellValueSourceCorrection_(false),
|
||||||
maxTrackTime_(0.0),
|
maxTrackTime_(0.0),
|
||||||
resetSourcesOnStartup_(false)
|
resetSourcesOnStartup_(true)
|
||||||
{
|
{
|
||||||
if (active_)
|
if (active_)
|
||||||
{
|
{
|
||||||
@ -188,6 +188,84 @@ bool Foam::KinematicCloud<ParcelType>::cloudSolution::output() const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
void Foam::KinematicCloud<ParcelType>::setModels()
|
||||||
|
{
|
||||||
|
collisionModel_.reset
|
||||||
|
(
|
||||||
|
CollisionModel<KinematicCloud<ParcelType> >::New
|
||||||
|
(
|
||||||
|
subModelProperties_,
|
||||||
|
*this
|
||||||
|
).ptr()
|
||||||
|
);
|
||||||
|
|
||||||
|
dispersionModel_.reset
|
||||||
|
(
|
||||||
|
DispersionModel<KinematicCloud<ParcelType> >::New
|
||||||
|
(
|
||||||
|
subModelProperties_,
|
||||||
|
*this
|
||||||
|
).ptr()
|
||||||
|
);
|
||||||
|
|
||||||
|
dragModel_.reset
|
||||||
|
(
|
||||||
|
DragModel<KinematicCloud<ParcelType> >::New
|
||||||
|
(
|
||||||
|
subModelProperties_,
|
||||||
|
*this
|
||||||
|
).ptr()
|
||||||
|
);
|
||||||
|
|
||||||
|
injectionModel_.reset
|
||||||
|
(
|
||||||
|
InjectionModel<KinematicCloud<ParcelType> >::New
|
||||||
|
(
|
||||||
|
subModelProperties_,
|
||||||
|
*this
|
||||||
|
).ptr()
|
||||||
|
);
|
||||||
|
|
||||||
|
patchInteractionModel_.reset
|
||||||
|
(
|
||||||
|
PatchInteractionModel<KinematicCloud<ParcelType> >::New
|
||||||
|
(
|
||||||
|
subModelProperties_,
|
||||||
|
*this
|
||||||
|
).ptr()
|
||||||
|
);
|
||||||
|
|
||||||
|
postProcessingModel_.reset
|
||||||
|
(
|
||||||
|
PostProcessingModel<KinematicCloud<ParcelType> >::New
|
||||||
|
(
|
||||||
|
subModelProperties_,
|
||||||
|
*this
|
||||||
|
).ptr()
|
||||||
|
);
|
||||||
|
|
||||||
|
surfaceFilmModel_.reset
|
||||||
|
(
|
||||||
|
SurfaceFilmModel<KinematicCloud<ParcelType> >::New
|
||||||
|
(
|
||||||
|
subModelProperties_,
|
||||||
|
*this,
|
||||||
|
g_
|
||||||
|
).ptr()
|
||||||
|
);
|
||||||
|
|
||||||
|
UIntegrator_.reset
|
||||||
|
(
|
||||||
|
vectorIntegrationScheme::New
|
||||||
|
(
|
||||||
|
"U",
|
||||||
|
solution_.integrationSchemes()
|
||||||
|
).ptr()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::KinematicCloud<ParcelType>::solve
|
void Foam::KinematicCloud<ParcelType>::solve
|
||||||
(
|
(
|
||||||
@ -450,8 +528,8 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
solution_(mesh_, particleProperties_.subDict("solution")),
|
solution_(mesh_, particleProperties_.subDict("solution")),
|
||||||
constProps_(particleProperties_),
|
constProps_(particleProperties_, solution_.active()),
|
||||||
subModelProperties_(particleProperties_.subDict("subModels")),
|
subModelProperties_(particleProperties_.subOrEmptyDict("subModels")),
|
||||||
rndGen_
|
rndGen_
|
||||||
(
|
(
|
||||||
label(0),
|
label(0),
|
||||||
@ -462,72 +540,15 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
|||||||
U_(U),
|
U_(U),
|
||||||
mu_(mu),
|
mu_(mu),
|
||||||
g_(g),
|
g_(g),
|
||||||
forces_(mesh_, particleProperties_, g_.value()),
|
forces_(mesh_, particleProperties_, g_.value(), solution_.active()),
|
||||||
collisionModel_
|
collisionModel_(NULL),
|
||||||
(
|
dispersionModel_(NULL),
|
||||||
CollisionModel<KinematicCloud<ParcelType> >::New
|
dragModel_(NULL),
|
||||||
(
|
injectionModel_(NULL),
|
||||||
subModelProperties_,
|
patchInteractionModel_(NULL),
|
||||||
*this
|
postProcessingModel_(NULL),
|
||||||
)
|
surfaceFilmModel_(NULL),
|
||||||
),
|
UIntegrator_(NULL),
|
||||||
dispersionModel_
|
|
||||||
(
|
|
||||||
DispersionModel<KinematicCloud<ParcelType> >::New
|
|
||||||
(
|
|
||||||
subModelProperties_,
|
|
||||||
*this
|
|
||||||
)
|
|
||||||
),
|
|
||||||
dragModel_
|
|
||||||
(
|
|
||||||
DragModel<KinematicCloud<ParcelType> >::New
|
|
||||||
(
|
|
||||||
subModelProperties_,
|
|
||||||
*this
|
|
||||||
)
|
|
||||||
),
|
|
||||||
injectionModel_
|
|
||||||
(
|
|
||||||
InjectionModel<KinematicCloud<ParcelType> >::New
|
|
||||||
(
|
|
||||||
subModelProperties_,
|
|
||||||
*this
|
|
||||||
)
|
|
||||||
),
|
|
||||||
patchInteractionModel_
|
|
||||||
(
|
|
||||||
PatchInteractionModel<KinematicCloud<ParcelType> >::New
|
|
||||||
(
|
|
||||||
subModelProperties_,
|
|
||||||
*this
|
|
||||||
)
|
|
||||||
),
|
|
||||||
postProcessingModel_
|
|
||||||
(
|
|
||||||
PostProcessingModel<KinematicCloud<ParcelType> >::New
|
|
||||||
(
|
|
||||||
subModelProperties_,
|
|
||||||
*this
|
|
||||||
)
|
|
||||||
),
|
|
||||||
surfaceFilmModel_
|
|
||||||
(
|
|
||||||
SurfaceFilmModel<KinematicCloud<ParcelType> >::New
|
|
||||||
(
|
|
||||||
subModelProperties_,
|
|
||||||
*this,
|
|
||||||
g
|
|
||||||
)
|
|
||||||
),
|
|
||||||
UIntegrator_
|
|
||||||
(
|
|
||||||
vectorIntegrationScheme::New
|
|
||||||
(
|
|
||||||
"U",
|
|
||||||
solution_.integrationSchemes()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
UTrans_
|
UTrans_
|
||||||
(
|
(
|
||||||
new DimensionedField<vector, volMesh>
|
new DimensionedField<vector, volMesh>
|
||||||
@ -561,6 +582,11 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
if (solution_.active())
|
||||||
|
{
|
||||||
|
setModels();
|
||||||
|
}
|
||||||
|
|
||||||
if (readFields)
|
if (readFields)
|
||||||
{
|
{
|
||||||
ParcelType::readFields(*this);
|
ParcelType::readFields(*this);
|
||||||
|
|||||||
@ -364,6 +364,12 @@ protected:
|
|||||||
autoPtr<DimensionedField<scalar, volMesh> > UCoeff_;
|
autoPtr<DimensionedField<scalar, volMesh> > UCoeff_;
|
||||||
|
|
||||||
|
|
||||||
|
// Initialisation
|
||||||
|
|
||||||
|
//- Set cloud sub-models
|
||||||
|
void setModels();
|
||||||
|
|
||||||
|
|
||||||
// Cloud evolution functions
|
// Cloud evolution functions
|
||||||
|
|
||||||
//- Solve the cloud - calls all evolution functions
|
//- Solve the cloud - calls all evolution functions
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -30,6 +30,29 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
void Foam::ReactingCloud<ParcelType>::setModels()
|
||||||
|
{
|
||||||
|
compositionModel_.reset
|
||||||
|
(
|
||||||
|
CompositionModel<ReactingCloud<ParcelType> >::New
|
||||||
|
(
|
||||||
|
this->subModelProperties(),
|
||||||
|
*this
|
||||||
|
).ptr()
|
||||||
|
);
|
||||||
|
|
||||||
|
phaseChangeModel_.reset
|
||||||
|
(
|
||||||
|
PhaseChangeModel<ReactingCloud<ParcelType> >::New
|
||||||
|
(
|
||||||
|
this->subModelProperties(),
|
||||||
|
*this
|
||||||
|
).ptr()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::ReactingCloud<ParcelType>::checkSuppliedComposition
|
void Foam::ReactingCloud<ParcelType>::checkSuppliedComposition
|
||||||
(
|
(
|
||||||
@ -85,26 +108,17 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
|
|||||||
ThermoCloud<ParcelType>(cloudName, rho, U, g, thermo, false),
|
ThermoCloud<ParcelType>(cloudName, rho, U, g, thermo, false),
|
||||||
reactingCloud(),
|
reactingCloud(),
|
||||||
cloudCopyPtr_(NULL),
|
cloudCopyPtr_(NULL),
|
||||||
constProps_(this->particleProperties()),
|
constProps_(this->particleProperties(), this->solution().active()),
|
||||||
compositionModel_
|
compositionModel_(NULL),
|
||||||
(
|
phaseChangeModel_(NULL),
|
||||||
CompositionModel<ReactingCloud<ParcelType> >::New
|
|
||||||
(
|
|
||||||
this->subModelProperties(),
|
|
||||||
*this
|
|
||||||
)
|
|
||||||
),
|
|
||||||
phaseChangeModel_
|
|
||||||
(
|
|
||||||
PhaseChangeModel<ReactingCloud<ParcelType> >::New
|
|
||||||
(
|
|
||||||
this->subModelProperties(),
|
|
||||||
*this
|
|
||||||
)
|
|
||||||
),
|
|
||||||
rhoTrans_(thermo.carrier().species().size()),
|
rhoTrans_(thermo.carrier().species().size()),
|
||||||
dMassPhaseChange_(0.0)
|
dMassPhaseChange_(0.0)
|
||||||
{
|
{
|
||||||
|
if (this->solution().active())
|
||||||
|
{
|
||||||
|
setModels();
|
||||||
|
}
|
||||||
|
|
||||||
// Set storage for mass source fields and initialise to zero
|
// Set storage for mass source fields and initialise to zero
|
||||||
forAll(rhoTrans_, i)
|
forAll(rhoTrans_, i)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -128,6 +128,12 @@ protected:
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Initialisation
|
||||||
|
|
||||||
|
//- Set cloud sub-models
|
||||||
|
void setModels();
|
||||||
|
|
||||||
|
|
||||||
// Cloud evolution functions
|
// Cloud evolution functions
|
||||||
|
|
||||||
//- Reset state of cloud
|
//- Reset state of cloud
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -30,6 +30,29 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
void Foam::ReactingMultiphaseCloud<ParcelType>::setModels()
|
||||||
|
{
|
||||||
|
devolatilisationModel_.reset
|
||||||
|
(
|
||||||
|
DevolatilisationModel<ReactingMultiphaseCloud<ParcelType> >::New
|
||||||
|
(
|
||||||
|
this->subModelProperties(),
|
||||||
|
*this
|
||||||
|
).ptr()
|
||||||
|
);
|
||||||
|
|
||||||
|
surfaceReactionModel_.reset
|
||||||
|
(
|
||||||
|
SurfaceReactionModel<ReactingMultiphaseCloud<ParcelType> >::New
|
||||||
|
(
|
||||||
|
this->subModelProperties(),
|
||||||
|
*this
|
||||||
|
).ptr()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::ReactingMultiphaseCloud<ParcelType>::cloudReset
|
void Foam::ReactingMultiphaseCloud<ParcelType>::cloudReset
|
||||||
(
|
(
|
||||||
@ -62,26 +85,17 @@ Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
|||||||
ReactingCloud<ParcelType>(cloudName, rho, U, g, thermo, false),
|
ReactingCloud<ParcelType>(cloudName, rho, U, g, thermo, false),
|
||||||
reactingMultiphaseCloud(),
|
reactingMultiphaseCloud(),
|
||||||
cloudCopyPtr_(NULL),
|
cloudCopyPtr_(NULL),
|
||||||
constProps_(this->particleProperties()),
|
constProps_(this->particleProperties(), this->solution().active()),
|
||||||
devolatilisationModel_
|
devolatilisationModel_(NULL),
|
||||||
(
|
surfaceReactionModel_(NULL),
|
||||||
DevolatilisationModel<ReactingMultiphaseCloud<ParcelType> >::New
|
|
||||||
(
|
|
||||||
this->subModelProperties(),
|
|
||||||
*this
|
|
||||||
)
|
|
||||||
),
|
|
||||||
surfaceReactionModel_
|
|
||||||
(
|
|
||||||
SurfaceReactionModel<ReactingMultiphaseCloud<ParcelType> >::New
|
|
||||||
(
|
|
||||||
this->subModelProperties(),
|
|
||||||
*this
|
|
||||||
)
|
|
||||||
),
|
|
||||||
dMassDevolatilisation_(0.0),
|
dMassDevolatilisation_(0.0),
|
||||||
dMassSurfaceReaction_(0.0)
|
dMassSurfaceReaction_(0.0)
|
||||||
{
|
{
|
||||||
|
if (this->solution().active())
|
||||||
|
{
|
||||||
|
setModels();
|
||||||
|
}
|
||||||
|
|
||||||
if (readFields)
|
if (readFields)
|
||||||
{
|
{
|
||||||
ParcelType::readFields(*this);
|
ParcelType::readFields(*this);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -119,6 +119,12 @@ protected:
|
|||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
|
// Initialisation
|
||||||
|
|
||||||
|
//- Set cloud sub-models
|
||||||
|
void setModels();
|
||||||
|
|
||||||
|
|
||||||
// Cloud evolution functions
|
// Cloud evolution functions
|
||||||
|
|
||||||
//- Reset state of cloud
|
//- Reset state of cloud
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -30,6 +30,31 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class ParcelType>
|
||||||
|
void Foam::ThermoCloud<ParcelType>::setModels()
|
||||||
|
{
|
||||||
|
heatTransferModel_.reset
|
||||||
|
(
|
||||||
|
HeatTransferModel<ThermoCloud<ParcelType> >::New
|
||||||
|
(
|
||||||
|
this->subModelProperties(),
|
||||||
|
*this
|
||||||
|
).ptr()
|
||||||
|
);
|
||||||
|
|
||||||
|
TIntegrator_.reset
|
||||||
|
(
|
||||||
|
scalarIntegrationScheme::New
|
||||||
|
(
|
||||||
|
"T",
|
||||||
|
this->solution().integrationSchemes()
|
||||||
|
).ptr()
|
||||||
|
);
|
||||||
|
|
||||||
|
this->subModelProperties().lookup("radiation") >> radiation_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::ThermoCloud<ParcelType>::cloudReset(ThermoCloud<ParcelType>& c)
|
void Foam::ThermoCloud<ParcelType>::cloudReset(ThermoCloud<ParcelType>& c)
|
||||||
{
|
{
|
||||||
@ -66,27 +91,13 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
|
|||||||
),
|
),
|
||||||
thermoCloud(),
|
thermoCloud(),
|
||||||
cloudCopyPtr_(NULL),
|
cloudCopyPtr_(NULL),
|
||||||
constProps_(this->particleProperties()),
|
constProps_(this->particleProperties(), this->solution().active()),
|
||||||
thermo_(thermo),
|
thermo_(thermo),
|
||||||
T_(thermo.thermo().T()),
|
T_(thermo.thermo().T()),
|
||||||
p_(thermo.thermo().p()),
|
p_(thermo.thermo().p()),
|
||||||
heatTransferModel_
|
heatTransferModel_(NULL),
|
||||||
(
|
TIntegrator_(NULL),
|
||||||
HeatTransferModel<ThermoCloud<ParcelType> >::New
|
radiation_(false),
|
||||||
(
|
|
||||||
this->subModelProperties(),
|
|
||||||
*this
|
|
||||||
)
|
|
||||||
),
|
|
||||||
TIntegrator_
|
|
||||||
(
|
|
||||||
scalarIntegrationScheme::New
|
|
||||||
(
|
|
||||||
"T",
|
|
||||||
this->solution().integrationSchemes()
|
|
||||||
)
|
|
||||||
),
|
|
||||||
radiation_(this->subModelProperties().lookup("radiation")),
|
|
||||||
hsTrans_
|
hsTrans_
|
||||||
(
|
(
|
||||||
new DimensionedField<scalar, volMesh>
|
new DimensionedField<scalar, volMesh>
|
||||||
@ -121,6 +132,11 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
|
|||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
if (this->solution().active())
|
||||||
|
{
|
||||||
|
setModels();
|
||||||
|
}
|
||||||
|
|
||||||
if (readFields)
|
if (readFields)
|
||||||
{
|
{
|
||||||
ParcelType::readFields(*this);
|
ParcelType::readFields(*this);
|
||||||
@ -143,7 +159,7 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
|
|||||||
KinematicCloud<ParcelType>(c, name),
|
KinematicCloud<ParcelType>(c, name),
|
||||||
thermoCloud(),
|
thermoCloud(),
|
||||||
cloudCopyPtr_(NULL),
|
cloudCopyPtr_(NULL),
|
||||||
constProps_(c.particleProperties_),
|
constProps_(c.constProps_),
|
||||||
thermo_(c.thermo_),
|
thermo_(c.thermo_),
|
||||||
T_(c.T()),
|
T_(c.T()),
|
||||||
p_(c.p()),
|
p_(c.p()),
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -128,6 +128,12 @@ protected:
|
|||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
|
// Initialisation
|
||||||
|
|
||||||
|
//- Set cloud sub-models
|
||||||
|
void setModels();
|
||||||
|
|
||||||
|
|
||||||
// Cloud evolution functions
|
// Cloud evolution functions
|
||||||
|
|
||||||
//- Reset state of cloud
|
//- Reset state of cloud
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -98,22 +98,22 @@ public:
|
|||||||
|
|
||||||
//- Parcel type id - used for post-processing to flag the type
|
//- Parcel type id - used for post-processing to flag the type
|
||||||
// of parcels issued by this cloud
|
// of parcels issued by this cloud
|
||||||
const label parcelTypeId_;
|
label parcelTypeId_;
|
||||||
|
|
||||||
//- Minimum density [kg/m3]
|
//- Minimum density [kg/m3]
|
||||||
const scalar rhoMin_;
|
scalar rhoMin_;
|
||||||
|
|
||||||
//- Particle density [kg/m3] (constant)
|
//- Particle density [kg/m3] (constant)
|
||||||
const scalar rho0_;
|
scalar rho0_;
|
||||||
|
|
||||||
//- Minimum particle mass [kg]
|
//- Minimum particle mass [kg]
|
||||||
const scalar minParticleMass_;
|
scalar minParticleMass_;
|
||||||
|
|
||||||
//- Young's modulus [N/m2]
|
//- Young's modulus [N/m2]
|
||||||
const scalar youngsModulus_;
|
scalar youngsModulus_;
|
||||||
|
|
||||||
//- Poisson's ratio
|
//- Poisson's ratio
|
||||||
const scalar poissonsRatio_;
|
scalar poissonsRatio_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -127,7 +127,11 @@ public:
|
|||||||
constantProperties(const constantProperties& cp);
|
constantProperties(const constantProperties& cp);
|
||||||
|
|
||||||
//- Constructor from dictionary
|
//- Constructor from dictionary
|
||||||
constantProperties(const dictionary& parentDict);
|
constantProperties
|
||||||
|
(
|
||||||
|
const dictionary& parentDict,
|
||||||
|
const bool readFields = true
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -62,17 +62,28 @@ inline Foam::KinematicParcel<ParcelType>::constantProperties::constantProperties
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::KinematicParcel<ParcelType>::constantProperties::constantProperties
|
inline Foam::KinematicParcel<ParcelType>::constantProperties::constantProperties
|
||||||
(
|
(
|
||||||
const dictionary& parentDict
|
const dictionary& parentDict,
|
||||||
|
const bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
dict_(parentDict.subDict("constantProperties")),
|
dict_(parentDict.subOrEmptyDict("constantProperties")),
|
||||||
parcelTypeId_(readLabel(dict_.lookup("parcelTypeId"))),
|
parcelTypeId_(-1),
|
||||||
rhoMin_(readScalar(dict_.lookup("rhoMin"))),
|
rhoMin_(0.0),
|
||||||
rho0_(readScalar(dict_.lookup("rho0"))),
|
rho0_(0.0),
|
||||||
minParticleMass_(readScalar(dict_.lookup("minParticleMass"))),
|
minParticleMass_(0.0),
|
||||||
youngsModulus_(readScalar(dict_.lookup("youngsModulus"))),
|
youngsModulus_(0.0),
|
||||||
poissonsRatio_(readScalar(dict_.lookup("poissonsRatio")))
|
poissonsRatio_(0.0)
|
||||||
{}
|
{
|
||||||
|
if (readFields)
|
||||||
|
{
|
||||||
|
dict_.lookup("parcelTypeId") >> parcelTypeId_;
|
||||||
|
dict_.lookup("rhoMin") >> rhoMin_;
|
||||||
|
dict_.lookup("rho0") >> rho0_;
|
||||||
|
dict_.lookup("minParticleMass") >> minParticleMass_;
|
||||||
|
dict_.lookup("youngsModulus") >> youngsModulus_;
|
||||||
|
dict_.lookup("poissonsRatio") >> poissonsRatio_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -82,7 +82,7 @@ public:
|
|||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Latent heat of devolatilisation [J/kg]
|
//- Latent heat of devolatilisation [J/kg]
|
||||||
const scalar LDevol_;
|
scalar LDevol_;
|
||||||
|
|
||||||
//- Fraction of enthalpy retained by parcel due to surface
|
//- Fraction of enthalpy retained by parcel due to surface
|
||||||
// reactions
|
// reactions
|
||||||
@ -100,7 +100,11 @@ public:
|
|||||||
constantProperties(const constantProperties& cp);
|
constantProperties(const constantProperties& cp);
|
||||||
|
|
||||||
//- Constructor from dictionary
|
//- Constructor from dictionary
|
||||||
constantProperties(const dictionary& parentDict);
|
constantProperties
|
||||||
|
(
|
||||||
|
const dictionary& parentDict,
|
||||||
|
const bool readFields = true
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -54,24 +54,31 @@ template<class ParcelType>
|
|||||||
inline Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::
|
inline Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::
|
||||||
constantProperties
|
constantProperties
|
||||||
(
|
(
|
||||||
const dictionary& parentDict
|
const dictionary& parentDict,
|
||||||
|
const bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ReactingParcel<ParcelType>::constantProperties(parentDict),
|
ReactingParcel<ParcelType>::constantProperties(parentDict, readFields),
|
||||||
LDevol_(readScalar(this->dict().lookup("LDevol"))),
|
LDevol_(0.0),
|
||||||
hRetentionCoeff_(readScalar(this->dict().lookup("hRetentionCoeff")))
|
hRetentionCoeff_(0.0)
|
||||||
{
|
{
|
||||||
if ((hRetentionCoeff_ < 0) || (hRetentionCoeff_ > 1))
|
if (readFields)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
this->dict().lookup("LDevol") >> LDevol_;
|
||||||
(
|
this->dict().lookup("hRetentionCoeff") >> hRetentionCoeff_;
|
||||||
"ReactingMultiphaseParcel<ParcelType>::constantProperties::"
|
|
||||||
"constantProperties"
|
|
||||||
) << "hRetentionCoeff must be in the range 0 to 1" << nl
|
|
||||||
<< exit(FatalError) << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
hRetentionCoeff_ = max(1e-06, hRetentionCoeff_);
|
if ((hRetentionCoeff_ < 0) || (hRetentionCoeff_ > 1))
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"ReactingMultiphaseParcel<ParcelType>::constantProperties::"
|
||||||
|
"constantProperties"
|
||||||
|
) << "hRetentionCoeff must be in the range 0 to 1" << nl
|
||||||
|
<< exit(FatalError) << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
hRetentionCoeff_ = max(1e-06, hRetentionCoeff_);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -77,16 +77,16 @@ public:
|
|||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Minimum pressure [Pa]
|
//- Minimum pressure [Pa]
|
||||||
const scalar pMin_;
|
scalar pMin_;
|
||||||
|
|
||||||
//- Constant volume flag - e.g. during mass transfer
|
//- Constant volume flag - e.g. during mass transfer
|
||||||
Switch constantVolume_;
|
Switch constantVolume_;
|
||||||
|
|
||||||
//- Vaporisation temperature [K]
|
//- Vaporisation temperature [K]
|
||||||
const scalar Tvap_;
|
scalar Tvap_;
|
||||||
|
|
||||||
//- Boiling point [K]
|
//- Boiling point [K]
|
||||||
const scalar Tbp_;
|
scalar Tbp_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -100,7 +100,11 @@ public:
|
|||||||
constantProperties(const constantProperties& cp);
|
constantProperties(const constantProperties& cp);
|
||||||
|
|
||||||
//- Constructor from dictionary
|
//- Constructor from dictionary
|
||||||
constantProperties(const dictionary& parentDict);
|
constantProperties
|
||||||
|
(
|
||||||
|
const dictionary& parentDict,
|
||||||
|
const bool readFields = true
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -54,15 +54,24 @@ inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties
|
inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties
|
||||||
(
|
(
|
||||||
const dictionary& parentDict
|
const dictionary& parentDict,
|
||||||
|
const bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ThermoParcel<ParcelType>::constantProperties(parentDict),
|
ThermoParcel<ParcelType>::constantProperties(parentDict, readFields),
|
||||||
pMin_(readScalar(this->dict().lookup("pMin"))),
|
pMin_(0.0),
|
||||||
constantVolume_(this->dict().lookup("constantVolume")),
|
constantVolume_(false),
|
||||||
Tvap_(readScalar(this->dict().lookup("Tvap"))),
|
Tvap_(0.0),
|
||||||
Tbp_(readScalar(this->dict().lookup("Tbp")))
|
Tbp_(0.0)
|
||||||
{}
|
{
|
||||||
|
if (readFields)
|
||||||
|
{
|
||||||
|
this->dict().lookup("pMin") >> pMin_;
|
||||||
|
this->dict().lookup("constantVolume") >> constantVolume_;
|
||||||
|
this->dict().lookup("Tvap") >> Tvap_;
|
||||||
|
this->dict().lookup("Tbp") >> Tbp_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
|
|||||||
@ -77,22 +77,22 @@ public:
|
|||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Particle initial temperature [K]
|
//- Particle initial temperature [K]
|
||||||
const scalar T0_;
|
scalar T0_;
|
||||||
|
|
||||||
//- Minimum temperature [K]
|
//- Minimum temperature [K]
|
||||||
const scalar TMin_;
|
scalar TMin_;
|
||||||
|
|
||||||
//- Particle specific heat capacity [J/(kg.K)]
|
//- Particle specific heat capacity [J/(kg.K)]
|
||||||
const scalar Cp0_;
|
scalar Cp0_;
|
||||||
|
|
||||||
//- Particle emissivity [] (radiation)
|
//- Particle emissivity [] (radiation)
|
||||||
const scalar epsilon0_;
|
scalar epsilon0_;
|
||||||
|
|
||||||
//- Particle scattering factor [] (radiation)
|
//- Particle scattering factor [] (radiation)
|
||||||
const scalar f0_;
|
scalar f0_;
|
||||||
|
|
||||||
//- Default carrier Prandtl number []
|
//- Default carrier Prandtl number []
|
||||||
const scalar Pr_;
|
scalar Pr_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -106,7 +106,11 @@ public:
|
|||||||
constantProperties(const constantProperties& cp);
|
constantProperties(const constantProperties& cp);
|
||||||
|
|
||||||
//- Constructor from dictionary
|
//- Constructor from dictionary
|
||||||
constantProperties(const dictionary& parentDict);
|
constantProperties
|
||||||
|
(
|
||||||
|
const dictionary& parentDict,
|
||||||
|
const bool readFields = true
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
// Member functions
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -57,17 +57,28 @@ inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties
|
inline Foam::ThermoParcel<ParcelType>::constantProperties::constantProperties
|
||||||
(
|
(
|
||||||
const dictionary& parentDict
|
const dictionary& parentDict,
|
||||||
|
const bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
KinematicParcel<ParcelType>::constantProperties(parentDict),
|
KinematicParcel<ParcelType>::constantProperties(parentDict, readFields),
|
||||||
T0_(readScalar(this->dict().lookup("T0"))),
|
T0_(0.0),
|
||||||
TMin_(readScalar(this->dict().lookup("TMin"))),
|
TMin_(0.0),
|
||||||
Cp0_(readScalar(this->dict().lookup("Cp0"))),
|
Cp0_(0.0),
|
||||||
epsilon0_(readScalar(this->dict().lookup("epsilon0"))),
|
epsilon0_(0.0),
|
||||||
f0_(readScalar(this->dict().lookup("f0"))),
|
f0_(0.0),
|
||||||
Pr_(readScalar(this->dict().lookup("Pr")))
|
Pr_(0.0)
|
||||||
{}
|
{
|
||||||
|
if (readFields)
|
||||||
|
{
|
||||||
|
this->dict().lookup("T0") >> T0_;
|
||||||
|
this->dict().lookup("TMin") >> TMin_;
|
||||||
|
this->dict().lookup("Cp0") >> Cp0_;
|
||||||
|
this->dict().lookup("epsilon0") >> epsilon0_;
|
||||||
|
this->dict().lookup("f0") >> f0_;
|
||||||
|
this->dict().lookup("Pr") >> Pr_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -74,32 +74,41 @@ Foam::particleForces::particleForces
|
|||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const vector& g
|
const vector& g,
|
||||||
|
const bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
mesh_(mesh),
|
mesh_(mesh),
|
||||||
dict_(dict.subDict("particleForces")),
|
dict_(dict.subOrEmptyDict("particleForces")),
|
||||||
g_(g),
|
g_(g),
|
||||||
gradUPtr_(NULL),
|
gradUPtr_(NULL),
|
||||||
HdotGradHInterPtr_(NULL),
|
HdotGradHInterPtr_(NULL),
|
||||||
gravity_(dict_.lookup("gravity")),
|
gravity_(false),
|
||||||
virtualMass_(dict_.lookup("virtualMass")),
|
virtualMass_(false),
|
||||||
Cvm_(0.0),
|
Cvm_(0.0),
|
||||||
pressureGradient_(dict_.lookup("pressureGradient")),
|
pressureGradient_(false),
|
||||||
paramagnetic_(dict_.lookup("paramagnetic")),
|
paramagnetic_(false),
|
||||||
magneticSusceptibility_(0.0),
|
magneticSusceptibility_(0.0),
|
||||||
refFrame_(rfInertial),
|
refFrame_(rfInertial),
|
||||||
UName_(dict_.lookupOrDefault<word>("UName", "U")),
|
UName_(dict_.lookupOrDefault<word>("UName", "U")),
|
||||||
HdotGradHName_(dict_.lookupOrDefault<word>("HdotGradHName", "HdotGradH"))
|
HdotGradHName_(dict_.lookupOrDefault<word>("HdotGradHName", "HdotGradH"))
|
||||||
{
|
{
|
||||||
if (virtualMass_)
|
if (readFields)
|
||||||
{
|
{
|
||||||
dict_.lookup("Cvm") >> Cvm_;
|
dict_.lookup("gravity") >> gravity_;
|
||||||
}
|
dict_.lookup("virtualMass") >> virtualMass_;
|
||||||
|
dict_.lookup("pressureGradient") >> pressureGradient_;
|
||||||
|
dict_.lookup("paramagnetic") >> paramagnetic_;
|
||||||
|
|
||||||
if (paramagnetic_)
|
if (virtualMass_)
|
||||||
{
|
{
|
||||||
dict_.lookup("magneticSusceptibility") >> magneticSusceptibility_;
|
dict_.lookup("Cvm") >> Cvm_;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (paramagnetic_)
|
||||||
|
{
|
||||||
|
dict_.lookup("magneticSusceptibility") >> magneticSusceptibility_;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dict_.found("referenceFrame"))
|
if (dict_.found("referenceFrame"))
|
||||||
@ -116,9 +125,10 @@ Foam::particleForces::particleForces
|
|||||||
(
|
(
|
||||||
"Foam::particleForces::particleForces"
|
"Foam::particleForces::particleForces"
|
||||||
"("
|
"("
|
||||||
"const fvMesh& mesh,"
|
"const fvMesh&, "
|
||||||
"const dictionary& dict,"
|
"const dictionary&, "
|
||||||
"const vector& g"
|
"const vector&, "
|
||||||
|
"const bool"
|
||||||
")"
|
")"
|
||||||
)
|
)
|
||||||
<< "Unknown referenceFrame, options are inertial and SRF."
|
<< "Unknown referenceFrame, options are inertial and SRF."
|
||||||
@ -235,10 +245,8 @@ void Foam::particleForces::cacheFields
|
|||||||
|
|
||||||
if (paramagnetic_)
|
if (paramagnetic_)
|
||||||
{
|
{
|
||||||
const volVectorField& HdotGradH = mesh_.lookupObject<volVectorField>
|
const volVectorField& HdotGradH =
|
||||||
(
|
mesh_.lookupObject<volVectorField>(HdotGradHName_);
|
||||||
HdotGradHName_
|
|
||||||
);
|
|
||||||
|
|
||||||
HdotGradHInterPtr_ = interpolation<vector>::New
|
HdotGradHInterPtr_ = interpolation<vector>::New
|
||||||
(
|
(
|
||||||
@ -329,7 +337,7 @@ Foam::vector Foam::particleForces::calcNonCoupled
|
|||||||
// *magneticSusceptibility_/(magneticSusceptibility_ + 3)
|
// *magneticSusceptibility_/(magneticSusceptibility_ + 3)
|
||||||
// *HdotGradH[cellI];
|
// *HdotGradH[cellI];
|
||||||
|
|
||||||
// which is divided by mass ((4/3)*pi*r^3*rho) to produce
|
// which is divided by mass (pi*d^3*rho/6) to produce
|
||||||
// acceleration
|
// acceleration
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -134,7 +134,8 @@ public:
|
|||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
const vector& g
|
const vector& g,
|
||||||
|
const bool readFields = true
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct copy
|
//- Construct copy
|
||||||
|
|||||||
@ -2,8 +2,11 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
wmake libso potential
|
makeOption=libso
|
||||||
wmake libso molecularMeasurements
|
[ $# -ge 1 ] && makeOption=$1
|
||||||
wmake libso molecule
|
|
||||||
|
wmake $makeOption potential
|
||||||
|
wmake $makeOption molecularMeasurements
|
||||||
|
wmake $makeOption molecule
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -2,8 +2,11 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
wmake libso autoMesh
|
makeOption=libso
|
||||||
wmake libso blockMesh
|
[ $# -ge 1 ] && makeOption=$1
|
||||||
wmake libso conformalVoronoiMesh
|
|
||||||
|
wmake $makeOption autoMesh
|
||||||
|
wmake $makeOption blockMesh
|
||||||
|
wmake $makeOption conformalVoronoiMesh
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -2,9 +2,12 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
decompose/Allwmake
|
makeOption=libso
|
||||||
reconstruct/Allwmake
|
[ $# -ge 1 ] && makeOption=$1
|
||||||
wmake libso distributed
|
|
||||||
|
decompose/Allwmake $*
|
||||||
|
reconstruct/Allwmake $*
|
||||||
|
wmake $makeOption distributed
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
|
makeOption=libso
|
||||||
|
[ $# -ge 1 ] && makeOption=$1
|
||||||
|
|
||||||
# get SCOTCH_VERSION, SCOTCH_ARCH_PATH
|
# get SCOTCH_VERSION, SCOTCH_ARCH_PATH
|
||||||
settings=`$WM_PROJECT_DIR/bin/foamEtcFile apps/scotch/bashrc`
|
settings=`$WM_PROJECT_DIR/bin/foamEtcFile apps/scotch/bashrc`
|
||||||
if [ -f "$settings" ]
|
if [ -f "$settings" ]
|
||||||
@ -16,17 +19,17 @@ set -x
|
|||||||
|
|
||||||
wmakeLnInclude decompositionMethods
|
wmakeLnInclude decompositionMethods
|
||||||
|
|
||||||
wmake libso scotchDecomp
|
wmake $makeOption scotchDecomp
|
||||||
|
|
||||||
if [ -d "$FOAM_LIBBIN/$FOAM_MPI" ]
|
if [ -d "$FOAM_LIBBIN/$FOAM_MPI" ]
|
||||||
then
|
then
|
||||||
(
|
(
|
||||||
WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB
|
WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB
|
||||||
wmake libso ptscotchDecomp
|
wmake $makeOption ptscotchDecomp
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wmake libso decompositionMethods
|
wmake $makeOption decompositionMethods
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -2,7 +2,10 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
wmake libso reconstruct
|
makeOption=libso
|
||||||
|
[ $# -ge 1 ] && makeOption=$1
|
||||||
|
|
||||||
|
wmake $makeOption reconstruct
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -2,9 +2,12 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
wmake libo postCalc
|
makeOption=libso
|
||||||
wmake libso foamCalcFunctions
|
[ $# -ge 1 ] && makeOption=$1
|
||||||
|
|
||||||
functionObjects/Allwmake
|
wmake libo postCalc
|
||||||
|
wmake $makeOption foamCalcFunctions
|
||||||
|
|
||||||
|
functionObjects/Allwmake $*
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -2,11 +2,14 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
wmake libso field
|
makeOption=libso
|
||||||
wmake libso forces
|
[ $# -ge 1 ] && makeOption=$1
|
||||||
wmake libso IO
|
|
||||||
wmake libso utilities
|
wmake $makeOption field
|
||||||
wmake libso jobControl
|
wmake $makeOption forces
|
||||||
wmake libso systemCall
|
wmake $makeOption IO
|
||||||
|
wmake $makeOption utilities
|
||||||
|
wmake $makeOption jobControl
|
||||||
|
wmake $makeOption systemCall
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -76,6 +76,63 @@ namespace Foam
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
const Foam::indexedOctree<Foam::treeDataFace>&
|
||||||
|
Foam::sampledTriSurfaceMesh::nonCoupledboundaryTree() const
|
||||||
|
{
|
||||||
|
// Variant of meshSearch::boundaryTree() that only does non-coupled
|
||||||
|
// boundary faces.
|
||||||
|
|
||||||
|
if (!boundaryTreePtr_.valid())
|
||||||
|
{
|
||||||
|
// all non-coupled boundary faces (not just walls)
|
||||||
|
const polyBoundaryMesh& patches = mesh().boundaryMesh();
|
||||||
|
|
||||||
|
labelList bndFaces(mesh().nFaces()-mesh().nInternalFaces());
|
||||||
|
label bndI = 0;
|
||||||
|
forAll(patches, patchI)
|
||||||
|
{
|
||||||
|
const polyPatch& pp = patches[patchI];
|
||||||
|
if (!pp.coupled())
|
||||||
|
{
|
||||||
|
forAll(pp, i)
|
||||||
|
{
|
||||||
|
bndFaces[bndI++] = pp.start()+i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bndFaces.setSize(bndI);
|
||||||
|
|
||||||
|
|
||||||
|
treeBoundBox overallBb(mesh().points());
|
||||||
|
Random rndGen(123456);
|
||||||
|
overallBb = overallBb.extend(rndGen, 1E-4);
|
||||||
|
overallBb.min() -= point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);
|
||||||
|
overallBb.max() += point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);
|
||||||
|
|
||||||
|
boundaryTreePtr_.reset
|
||||||
|
(
|
||||||
|
new indexedOctree<treeDataFace>
|
||||||
|
(
|
||||||
|
treeDataFace // all information needed to search faces
|
||||||
|
(
|
||||||
|
false, // do not cache bb
|
||||||
|
mesh(),
|
||||||
|
bndFaces // boundary faces only
|
||||||
|
),
|
||||||
|
overallBb, // overall search domain
|
||||||
|
8, // maxLevel
|
||||||
|
10, // leafsize
|
||||||
|
3.0 // duplicity
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return boundaryTreePtr_();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::sampledTriSurfaceMesh::sampledTriSurfaceMesh
|
Foam::sampledTriSurfaceMesh::sampledTriSurfaceMesh
|
||||||
@ -159,6 +216,8 @@ bool Foam::sampledTriSurfaceMesh::expire()
|
|||||||
|
|
||||||
sampledSurface::clearGeom();
|
sampledSurface::clearGeom();
|
||||||
MeshStorage::clear();
|
MeshStorage::clear();
|
||||||
|
|
||||||
|
boundaryTreePtr_.clear();
|
||||||
sampleElements_.clear();
|
sampleElements_.clear();
|
||||||
samplePoints_.clear();
|
samplePoints_.clear();
|
||||||
|
|
||||||
@ -224,7 +283,10 @@ bool Foam::sampledTriSurfaceMesh::update()
|
|||||||
{
|
{
|
||||||
// Search for nearest boundaryFace
|
// Search for nearest boundaryFace
|
||||||
|
|
||||||
const indexedOctree<treeDataFace>& bTree = meshSearcher.boundaryTree();
|
////- Search on all (including coupled) boundary faces
|
||||||
|
//const indexedOctree<treeDataFace>& bTree = meshSearcher.boundaryTree()
|
||||||
|
//- Search on all non-coupled boundary faces
|
||||||
|
const indexedOctree<treeDataFace>& bTree = nonCoupledboundaryTree();
|
||||||
|
|
||||||
forAll(fc, triI)
|
forAll(fc, triI)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -28,12 +28,31 @@ Description
|
|||||||
A sampledSurface from a triSurfaceMesh. It samples on the points/triangles
|
A sampledSurface from a triSurfaceMesh. It samples on the points/triangles
|
||||||
of the triSurface.
|
of the triSurface.
|
||||||
|
|
||||||
It samples using the cell nearest to the triangle centre so does
|
- it either samples cells or (non-coupled) boundary faces
|
||||||
not check the cell the centre is actually in ...
|
|
||||||
|
|
||||||
In parallel every processor just operates on the part of the surface
|
- 4 different modes:
|
||||||
where the face centres are inside the mesh. It is then up to the
|
- source=cells, interpolate=false:
|
||||||
caller to stitch the partial surfaces together.
|
finds per triangle centre the nearest cell centre and uses its value
|
||||||
|
- source=cells, interpolate=true
|
||||||
|
finds per triangle centre the nearest cell centre.
|
||||||
|
Per surface point checks if this nearest cell is the one containing
|
||||||
|
point; otherwise projects the point onto the nearest point on
|
||||||
|
the boundary of the cell (to make sure interpolateCellPoint
|
||||||
|
gets a valid location)
|
||||||
|
|
||||||
|
- source=boundaryFaces, interpolate=false:
|
||||||
|
finds per triangle centre the nearest point on the boundary
|
||||||
|
(uncoupled faces only) and uses the value (or 0 if the nearest
|
||||||
|
is on an empty boundary)
|
||||||
|
- source=boundaryFaces, interpolate=true:
|
||||||
|
finds per triangle centre the nearest point on the boundary
|
||||||
|
(uncoupled faces only).
|
||||||
|
Per surface point projects the point onto this boundary face
|
||||||
|
(to make sure interpolateCellPoint gets a valid location)
|
||||||
|
|
||||||
|
- since it finds a nearest per triangle each triangle is guaranteed
|
||||||
|
to be on one processor only. So after stitching (by sampledSurfaces)
|
||||||
|
the original surface should be complete.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
sampledTriSurfaceMesh.C
|
sampledTriSurfaceMesh.C
|
||||||
@ -52,6 +71,8 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
class treeDataFace;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class sampledTriSurfaceMesh Declaration
|
Class sampledTriSurfaceMesh Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -88,6 +109,9 @@ private:
|
|||||||
//- Track if the surface needs an update
|
//- Track if the surface needs an update
|
||||||
mutable bool needsUpdate_;
|
mutable bool needsUpdate_;
|
||||||
|
|
||||||
|
//- Search tree for all non-coupled boundary faces
|
||||||
|
mutable autoPtr<indexedOctree<treeDataFace> > boundaryTreePtr_;
|
||||||
|
|
||||||
//- From local surface triangle to mesh cell/face.
|
//- From local surface triangle to mesh cell/face.
|
||||||
labelList sampleElements_;
|
labelList sampleElements_;
|
||||||
|
|
||||||
@ -97,6 +121,9 @@ private:
|
|||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Get tree of all non-coupled boundary faces
|
||||||
|
const indexedOctree<treeDataFace>& nonCoupledboundaryTree() const;
|
||||||
|
|
||||||
//- sample field on faces
|
//- sample field on faces
|
||||||
template <class Type>
|
template <class Type>
|
||||||
tmp<Field<Type> > sampleField
|
tmp<Field<Type> > sampleField
|
||||||
|
|||||||
@ -2,27 +2,30 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
wmake libso specie
|
makeOption=libso
|
||||||
wmake libso solid
|
[ $# -ge 1 ] && makeOption=$1
|
||||||
wmake libso thermophysicalFunctions
|
|
||||||
wmake libso liquids
|
|
||||||
wmake libso liquidMixture
|
|
||||||
wmake libso pointSolids
|
|
||||||
wmake libso pointSolidMixture
|
|
||||||
|
|
||||||
wmake libso basic
|
wmake $makeOption specie
|
||||||
wmake libso reactionThermo
|
wmake $makeOption solid
|
||||||
wmake libso laminarFlameSpeed
|
wmake $makeOption thermophysicalFunctions
|
||||||
wmake libso chemistryModel
|
wmake $makeOption liquids
|
||||||
wmake libso pdfs
|
wmake $makeOption liquidMixture
|
||||||
wmake libso radiation
|
wmake $makeOption pointSolids
|
||||||
wmake libso barotropicCompressibilityModel
|
wmake $makeOption pointSolidMixture
|
||||||
wmake libso thermalPorousZone
|
|
||||||
|
|
||||||
wmake libso SLGThermo
|
wmake $makeOption basic
|
||||||
|
wmake $makeOption reactionThermo
|
||||||
|
wmake $makeOption laminarFlameSpeed
|
||||||
|
wmake $makeOption chemistryModel
|
||||||
|
wmake $makeOption pdfs
|
||||||
|
wmake $makeOption radiation
|
||||||
|
wmake $makeOption barotropicCompressibilityModel
|
||||||
|
wmake $makeOption thermalPorousZone
|
||||||
|
|
||||||
|
wmake $makeOption SLGThermo
|
||||||
|
|
||||||
# Should be combined with solids&solidMixture
|
# Should be combined with solids&solidMixture
|
||||||
wmake libso basicSolidThermo
|
wmake $makeOption basicSolidThermo
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -2,9 +2,12 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
wmake libso incompressible
|
makeOption=libso
|
||||||
wmake libso interfaceProperties
|
[ $# -ge 1 ] && makeOption=$1
|
||||||
wmake libso twoPhaseInterfaceProperties
|
|
||||||
# wmake libso compressible
|
wmake $makeOption incompressible
|
||||||
|
wmake $makeOption interfaceProperties
|
||||||
|
wmake $makeOption twoPhaseInterfaceProperties
|
||||||
|
# wmake $makeOption compressible
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -146,7 +146,7 @@ public:
|
|||||||
return nu_;
|
return nu_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the face-interpolated dynamic laminar viscosity
|
//- Return the face-interpolated kinematic laminar viscosity
|
||||||
tmp<surfaceScalarField> nuf() const;
|
tmp<surfaceScalarField> nuf() const;
|
||||||
|
|
||||||
//- Correct the laminar viscosity
|
//- Correct the laminar viscosity
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
LES/Allwmake
|
LES/Allwmake $*
|
||||||
incompressible/Allwmake
|
incompressible/Allwmake $*
|
||||||
compressible/Allwmake
|
compressible/Allwmake $*
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -2,9 +2,12 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
makeOption=libso
|
||||||
|
[ $# -ge 1 ] && makeOption=$1
|
||||||
|
|
||||||
wmakeLnInclude ../incompressible/LES
|
wmakeLnInclude ../incompressible/LES
|
||||||
|
|
||||||
wmake libso LESfilters
|
wmake $makeOption LESfilters
|
||||||
wmake libso LESdeltas
|
wmake $makeOption LESdeltas
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -2,8 +2,11 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
wmake libso turbulenceModel
|
makeOption=libso
|
||||||
wmake libso RAS
|
[ $# -ge 1 ] && makeOption=$1
|
||||||
wmake libso LES
|
|
||||||
|
wmake $makeOption turbulenceModel
|
||||||
|
wmake $makeOption RAS
|
||||||
|
wmake $makeOption LES
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -2,8 +2,11 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
wmake libso turbulenceModel
|
makeOption=libso
|
||||||
wmake libso RAS
|
[ $# -ge 1 ] && makeOption=$1
|
||||||
wmake libso LES
|
|
||||||
|
wmake $makeOption turbulenceModel
|
||||||
|
wmake $makeOption RAS
|
||||||
|
wmake $makeOption LES
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -11,5 +11,5 @@ mv log.setSet log.wallFilmRegion.setSet
|
|||||||
runApplication setsToZones -noFlipMap
|
runApplication setsToZones -noFlipMap
|
||||||
mv log.setsToZones log.setsToZones.primaryRegion
|
mv log.setsToZones log.setsToZones.primaryRegion
|
||||||
|
|
||||||
runApplication extrudeToRegionMesh wallFilmRegion '(wallFilmFaces)' 0.01 -overwrite
|
runApplication extrudeToRegionMesh -overwrite
|
||||||
|
|
||||||
|
|||||||
@ -18,70 +18,6 @@ FoamFile
|
|||||||
solution
|
solution
|
||||||
{
|
{
|
||||||
active false;
|
active false;
|
||||||
|
|
||||||
integrationSchemes
|
|
||||||
{
|
|
||||||
U Euler;
|
|
||||||
T Analytical;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
constantProperties
|
|
||||||
{
|
|
||||||
parcelTypeId 1;
|
|
||||||
|
|
||||||
rhoMin 1e-15;
|
|
||||||
TMin 200;
|
|
||||||
pMin 1000;
|
|
||||||
minParticleMass 1e-15;
|
|
||||||
|
|
||||||
rho0 1000;
|
|
||||||
T0 300;
|
|
||||||
Cp0 4187;
|
|
||||||
|
|
||||||
epsilon0 1;
|
|
||||||
f0 0.5;
|
|
||||||
|
|
||||||
Pr 0.7;
|
|
||||||
Tvap 273;
|
|
||||||
Tbp 373;
|
|
||||||
youngsModulus 0;
|
|
||||||
poissonsRatio 0;
|
|
||||||
|
|
||||||
constantVolume false;
|
|
||||||
}
|
|
||||||
|
|
||||||
particleForces
|
|
||||||
{
|
|
||||||
gravity on;
|
|
||||||
virtualMass off;
|
|
||||||
pressureGradient off;
|
|
||||||
paramagnetic off;
|
|
||||||
}
|
|
||||||
|
|
||||||
subModels
|
|
||||||
{
|
|
||||||
InjectionModel none;
|
|
||||||
|
|
||||||
DragModel none;
|
|
||||||
|
|
||||||
DispersionModel none;
|
|
||||||
|
|
||||||
PatchInteractionModel none;
|
|
||||||
|
|
||||||
CollisionModel none;
|
|
||||||
|
|
||||||
HeatTransferModel none;
|
|
||||||
|
|
||||||
CompositionModel none;
|
|
||||||
|
|
||||||
PhaseChangeModel none;
|
|
||||||
|
|
||||||
PostProcessingModel none;
|
|
||||||
|
|
||||||
SurfaceFilmModel none;
|
|
||||||
|
|
||||||
radiation off;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,37 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object extrudeToRegionMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
region wallFilmRegion;
|
||||||
|
|
||||||
|
faceZones (wallFilmFaces);
|
||||||
|
|
||||||
|
adaptMesh true;
|
||||||
|
|
||||||
|
oneD false;
|
||||||
|
|
||||||
|
extrudeModel linearNormal;
|
||||||
|
|
||||||
|
nLayers 1;
|
||||||
|
|
||||||
|
expansionRatio 1;
|
||||||
|
|
||||||
|
linearNormalCoeffs
|
||||||
|
{
|
||||||
|
thickness 0.01;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -6,7 +6,7 @@ runApplication blockMesh
|
|||||||
runApplication setSet -batch wallFilmRegion.setSet
|
runApplication setSet -batch wallFilmRegion.setSet
|
||||||
mv log.setSet log.wallFilmRegion.setSet
|
mv log.setSet log.wallFilmRegion.setSet
|
||||||
|
|
||||||
runApplication extrudeToRegionMesh wallFilmRegion '(wallFilmFaces)' 0.01 -overwrite
|
runApplication extrudeToRegionMesh -overwrite
|
||||||
|
|
||||||
runApplication setSet -region wallFilmRegion -batch createWallFilmRegionPatches.setSet
|
runApplication setSet -region wallFilmRegion -batch createWallFilmRegionPatches.setSet
|
||||||
mv log.setSet log.createWallFilmRegionPatches.setSet
|
mv log.setSet log.createWallFilmRegionPatches.setSet
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: dev |
|
| \\ / O peration | Version: dev |
|
||||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
@ -18,70 +18,6 @@ FoamFile
|
|||||||
solution
|
solution
|
||||||
{
|
{
|
||||||
active false;
|
active false;
|
||||||
|
|
||||||
integrationSchemes
|
|
||||||
{
|
|
||||||
U Euler;
|
|
||||||
T Analytical;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
constantProperties
|
|
||||||
{
|
|
||||||
parcelTypeId 1;
|
|
||||||
|
|
||||||
rhoMin 1e-15;
|
|
||||||
TMin 200;
|
|
||||||
pMin 1000;
|
|
||||||
minParticleMass 1e-15;
|
|
||||||
|
|
||||||
rho0 1000;
|
|
||||||
T0 300;
|
|
||||||
Cp0 4187;
|
|
||||||
|
|
||||||
youngsModulus 1e9;
|
|
||||||
poissonsRatio 0.35;
|
|
||||||
|
|
||||||
epsilon0 1;
|
|
||||||
f0 0.5;
|
|
||||||
Pr 0.7;
|
|
||||||
Tvap 273;
|
|
||||||
Tbp 373;
|
|
||||||
|
|
||||||
constantVolume false;
|
|
||||||
}
|
|
||||||
|
|
||||||
particleForces
|
|
||||||
{
|
|
||||||
gravity on;
|
|
||||||
virtualMass off;
|
|
||||||
pressureGradient off;
|
|
||||||
paramagnetic off;
|
|
||||||
}
|
|
||||||
|
|
||||||
subModels
|
|
||||||
{
|
|
||||||
InjectionModel none;
|
|
||||||
|
|
||||||
DragModel none;
|
|
||||||
|
|
||||||
DispersionModel none;
|
|
||||||
|
|
||||||
PatchInteractionModel none;
|
|
||||||
|
|
||||||
HeatTransferModel none;
|
|
||||||
|
|
||||||
CompositionModel none;
|
|
||||||
|
|
||||||
PhaseChangeModel none;
|
|
||||||
|
|
||||||
PostProcessingModel none;
|
|
||||||
|
|
||||||
CollisionModel none;
|
|
||||||
|
|
||||||
SurfaceFilmModel none;
|
|
||||||
|
|
||||||
radiation off;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,37 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object extrudeToRegionMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
region wallFilmRegion;
|
||||||
|
|
||||||
|
faceZones (wallFilmFaces);
|
||||||
|
|
||||||
|
adaptMesh true;
|
||||||
|
|
||||||
|
oneD false;
|
||||||
|
|
||||||
|
extrudeModel linearNormal;
|
||||||
|
|
||||||
|
nLayers 1;
|
||||||
|
|
||||||
|
expansionRatio 1;
|
||||||
|
|
||||||
|
linearNormalCoeffs
|
||||||
|
{
|
||||||
|
thickness 0.01;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
Reference in New Issue
Block a user