mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/repositories/OpenFOAM-dev
This commit is contained in:
@ -2,10 +2,12 @@
|
|||||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||||
{
|
{
|
||||||
fvScalarMatrix hEqn
|
fvScalarMatrix hEqn
|
||||||
|
(
|
||||||
(
|
(
|
||||||
thermo.isotropic()
|
thermo.isotropic()
|
||||||
? -fvm::laplacian(betav*thermo.alpha(), h, "laplacian(alpha,h)")
|
? -fvm::laplacian(betav*thermo.alpha(), h, "laplacian(alpha,h)")
|
||||||
: -fvm::laplacian(betav*tAnialpha(), h, "laplacian(alpha,h)")
|
: -fvm::laplacian(betav*tAnialpha(), h, "laplacian(alpha,h)")
|
||||||
|
)
|
||||||
==
|
==
|
||||||
fvOptions(rho, h)
|
fvOptions(rho, h)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -11,10 +11,10 @@
|
|||||||
Info<< "*** Reading solid mesh thermophysical properties for region "
|
Info<< "*** Reading solid mesh thermophysical properties for region "
|
||||||
<< solidRegions[i].name() << nl << endl;
|
<< solidRegions[i].name() << nl << endl;
|
||||||
|
|
||||||
Info<< " Adding to thermos\n" << endl;
|
Info<< " Adding to thermo models\n" << endl;
|
||||||
thermos.set(i, solidThermo::New(solidRegions[i]));
|
thermos.set(i, solidThermo::New(solidRegions[i]));
|
||||||
|
|
||||||
Info<< " Adding to radiations\n" << endl;
|
Info<< " Adding to radiation models\n" << endl;
|
||||||
radiations.set(i, radiation::radiationModel::New(thermos[i].T()));
|
radiations.set(i, radiation::radiationModel::New(thermos[i].T()));
|
||||||
|
|
||||||
Info<< " Adding fvOptions\n" << endl;
|
Info<< " Adding fvOptions\n" << endl;
|
||||||
|
|||||||
@ -3,7 +3,10 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/turbulenceModels \
|
-I$(LIB_SRC)/turbulenceModels \
|
||||||
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
|
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
|
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||||
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
|
-I$(LIB_SRC)/sampling/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
@ -14,4 +17,7 @@ EXE_LIBS = \
|
|||||||
-lcompressibleRASModels \
|
-lcompressibleRASModels \
|
||||||
-lcompressibleLESModels \
|
-lcompressibleLESModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
|
-lfvOptions \
|
||||||
|
-lmeshTools \
|
||||||
|
-lsampling \
|
||||||
-lgenericPatchFields
|
-lgenericPatchFields
|
||||||
|
|||||||
@ -42,6 +42,7 @@ Description
|
|||||||
#include "surfaceFields.H"
|
#include "surfaceFields.H"
|
||||||
#include "pointFields.H"
|
#include "pointFields.H"
|
||||||
#include "ReadFields.H"
|
#include "ReadFields.H"
|
||||||
|
#include "fvIOoptionList.H"
|
||||||
|
|
||||||
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
||||||
|
|
||||||
@ -167,6 +168,8 @@ void calc
|
|||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#include "createFvOptions.H"
|
||||||
|
|
||||||
if (phi.dimensions() == dimVolume/dimTime)
|
if (phi.dimensions() == dimVolume/dimTime)
|
||||||
{
|
{
|
||||||
IOobject RASPropertiesHeader
|
IOobject RASPropertiesHeader
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -31,7 +31,7 @@ template<class Type>
|
|||||||
Foam::Table<Type>::Table(const word& entryName, const dictionary& dict)
|
Foam::Table<Type>::Table(const word& entryName, const dictionary& dict)
|
||||||
:
|
:
|
||||||
DataEntry<Type>(entryName),
|
DataEntry<Type>(entryName),
|
||||||
TableBase<Type>(entryName, dictionary::null)
|
TableBase<Type>(entryName, dict)
|
||||||
{
|
{
|
||||||
Istream& is(dict.lookup(entryName));
|
Istream& is(dict.lookup(entryName));
|
||||||
word entryType(is);
|
word entryType(is);
|
||||||
|
|||||||
@ -113,7 +113,7 @@ void Foam::CloudFunctionObject<CloudType>::postEvolve()
|
|||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::CloudFunctionObject<CloudType>::postMove
|
void Foam::CloudFunctionObject<CloudType>::postMove
|
||||||
(
|
(
|
||||||
const typename CloudType::parcelType&,
|
typename CloudType::parcelType&,
|
||||||
const label,
|
const label,
|
||||||
const scalar,
|
const scalar,
|
||||||
const point&,
|
const point&,
|
||||||
|
|||||||
@ -144,7 +144,7 @@ public:
|
|||||||
//- Post-move hook
|
//- Post-move hook
|
||||||
virtual void postMove
|
virtual void postMove
|
||||||
(
|
(
|
||||||
const typename CloudType::parcelType& p,
|
typename CloudType::parcelType& p,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const scalar dt,
|
const scalar dt,
|
||||||
const point& position0,
|
const point& position0,
|
||||||
|
|||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -136,7 +136,7 @@ void Foam::CloudFunctionObjectList<CloudType>::postEvolve()
|
|||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::CloudFunctionObjectList<CloudType>::postMove
|
void Foam::CloudFunctionObjectList<CloudType>::postMove
|
||||||
(
|
(
|
||||||
const typename CloudType::parcelType& p,
|
typename CloudType::parcelType& p,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const scalar dt,
|
const scalar dt,
|
||||||
const point& position0,
|
const point& position0,
|
||||||
|
|||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -112,7 +112,7 @@ public:
|
|||||||
//- Post-move hook
|
//- Post-move hook
|
||||||
virtual void postMove
|
virtual void postMove
|
||||||
(
|
(
|
||||||
const typename CloudType::parcelType& p,
|
typename CloudType::parcelType& p,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const scalar dt,
|
const scalar dt,
|
||||||
const point& position0,
|
const point& position0,
|
||||||
|
|||||||
@ -106,11 +106,13 @@ void Foam::ParticleCollector<CloudType>::makeLogFile
|
|||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::ParticleCollector<CloudType>::initPolygons()
|
void Foam::ParticleCollector<CloudType>::initPolygons
|
||||||
|
(
|
||||||
|
const List<Field<point> >& polygons
|
||||||
|
)
|
||||||
{
|
{
|
||||||
mode_ = mtPolygon;
|
mode_ = mtPolygon;
|
||||||
|
|
||||||
List<Field<point> > polygons(this->coeffDict().lookup("polygons"));
|
|
||||||
label nPoints = 0;
|
label nPoints = 0;
|
||||||
forAll(polygons, polyI)
|
forAll(polygons, polyI)
|
||||||
{
|
{
|
||||||
@ -168,7 +170,7 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles()
|
|||||||
if (nSector_ > 1)
|
if (nSector_ > 1)
|
||||||
{
|
{
|
||||||
refDir = this->coeffDict().lookup("refDir");
|
refDir = this->coeffDict().lookup("refDir");
|
||||||
refDir -= normal_*(normal_ & refDir);
|
refDir -= normal_[0]*(normal_[0] & refDir);
|
||||||
refDir /= mag(refDir);
|
refDir /= mag(refDir);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -184,7 +186,7 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles()
|
|||||||
{
|
{
|
||||||
vector v = rnd.vector01();
|
vector v = rnd.vector01();
|
||||||
|
|
||||||
tangent = v - (v & normal_)*normal_;
|
tangent = v - (v & normal_[0])*normal_[0];
|
||||||
magTangent = mag(tangent);
|
magTangent = mag(tangent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -209,7 +211,7 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles()
|
|||||||
faces_.setSize(nFace);
|
faces_.setSize(nFace);
|
||||||
area_.setSize(nFace);
|
area_.setSize(nFace);
|
||||||
|
|
||||||
coordSys_ = cylindricalCS("coordSys", origin, normal_, refDir, false);
|
coordSys_ = cylindricalCS("coordSys", origin, normal_[0], refDir, false);
|
||||||
|
|
||||||
List<label> ptIDs(identity(nPointPerRadius));
|
List<label> ptIDs(identity(nPointPerRadius));
|
||||||
|
|
||||||
@ -301,8 +303,8 @@ void Foam::ParticleCollector<CloudType>::collectParcelPolygon
|
|||||||
|
|
||||||
const point& pf = points_[facePoint0];
|
const point& pf = points_[facePoint0];
|
||||||
|
|
||||||
const scalar d1 = normal_ & (p1 - pf);
|
const scalar d1 = normal_[faceI] & (p1 - pf);
|
||||||
const scalar d2 = normal_ & (p2 - pf);
|
const scalar d2 = normal_[faceI] & (p2 - pf);
|
||||||
|
|
||||||
if (sign(d1) == sign(d2))
|
if (sign(d1) == sign(d2))
|
||||||
{
|
{
|
||||||
@ -344,8 +346,8 @@ void Foam::ParticleCollector<CloudType>::collectParcelConcentricCircles
|
|||||||
{
|
{
|
||||||
label secI = -1;
|
label secI = -1;
|
||||||
|
|
||||||
const scalar d1 = normal_ & (p1 - coordSys_.origin());
|
const scalar d1 = normal_[0] & (p1 - coordSys_.origin());
|
||||||
const scalar d2 = normal_ & (p2 - coordSys_.origin());
|
const scalar d2 = normal_[0] & (p2 - coordSys_.origin());
|
||||||
|
|
||||||
if (sign(d1) == sign(d2))
|
if (sign(d1) == sign(d2))
|
||||||
{
|
{
|
||||||
@ -526,7 +528,7 @@ Foam::ParticleCollector<CloudType>::ParticleCollector
|
|||||||
nSector_(0),
|
nSector_(0),
|
||||||
radius_(),
|
radius_(),
|
||||||
coordSys_(false),
|
coordSys_(false),
|
||||||
normal_(this->coeffDict().lookup("normal")),
|
normal_(),
|
||||||
negateParcelsOppositeNormal_
|
negateParcelsOppositeNormal_
|
||||||
(
|
(
|
||||||
readBool(this->coeffDict().lookup("negateParcelsOppositeNormal"))
|
readBool(this->coeffDict().lookup("negateParcelsOppositeNormal"))
|
||||||
@ -547,10 +549,37 @@ Foam::ParticleCollector<CloudType>::ParticleCollector
|
|||||||
word mode(this->coeffDict().lookup("mode"));
|
word mode(this->coeffDict().lookup("mode"));
|
||||||
if (mode == "polygon")
|
if (mode == "polygon")
|
||||||
{
|
{
|
||||||
initPolygons();
|
List<Field<point> > polygons(this->coeffDict().lookup("polygons"));
|
||||||
|
|
||||||
|
initPolygons(polygons);
|
||||||
|
|
||||||
|
vector n0(this->coeffDict().lookup("normal"));
|
||||||
|
normal_ = vectorField(faces_.size(), n0);
|
||||||
|
}
|
||||||
|
else if (mode == "polygonWithNormal")
|
||||||
|
{
|
||||||
|
List<Tuple2<Field<point>, vector> > polygonAndNormal
|
||||||
|
(
|
||||||
|
this->coeffDict().lookup("polygons")
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Field<point> > polygons(polygonAndNormal.size());
|
||||||
|
normal_.setSize(polygonAndNormal.size());
|
||||||
|
|
||||||
|
forAll(polygons, polyI)
|
||||||
|
{
|
||||||
|
polygons[polyI] = polygonAndNormal[polyI].first();
|
||||||
|
normal_[polyI] = polygonAndNormal[polyI].second();
|
||||||
|
normal_[polyI] /= mag(normal_[polyI]) + ROOTVSMALL;
|
||||||
|
}
|
||||||
|
|
||||||
|
initPolygons(polygons);
|
||||||
}
|
}
|
||||||
else if (mode == "concentricCircle")
|
else if (mode == "concentricCircle")
|
||||||
{
|
{
|
||||||
|
vector n0(this->coeffDict().lookup("normal"));
|
||||||
|
normal_ = vectorField(1, n0);
|
||||||
|
|
||||||
initConcentricCircles();
|
initConcentricCircles();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -560,12 +589,14 @@ Foam::ParticleCollector<CloudType>::ParticleCollector
|
|||||||
"Foam::ParticleCollector<CloudType>::ParticleCollector"
|
"Foam::ParticleCollector<CloudType>::ParticleCollector"
|
||||||
"("
|
"("
|
||||||
"const dictionary&,"
|
"const dictionary&,"
|
||||||
"CloudType&"
|
"CloudType&, "
|
||||||
|
"const word&"
|
||||||
")",
|
")",
|
||||||
this->coeffDict()
|
this->coeffDict()
|
||||||
)
|
)
|
||||||
<< "Unknown mode " << mode << ". Available options are "
|
<< "Unknown mode " << mode << ". Available options are "
|
||||||
<< "polygon and concentricCircle" << exit(FatalIOError);
|
<< "polygon, polygonWithNormal and concentricCircle"
|
||||||
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
|
|
||||||
mass_.setSize(faces_.size(), 0.0);
|
mass_.setSize(faces_.size(), 0.0);
|
||||||
@ -619,7 +650,7 @@ Foam::ParticleCollector<CloudType>::~ParticleCollector()
|
|||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::ParticleCollector<CloudType>::postMove
|
void Foam::ParticleCollector<CloudType>::postMove
|
||||||
(
|
(
|
||||||
const parcelType& p,
|
parcelType& p,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const scalar dt,
|
const scalar dt,
|
||||||
const point& position0,
|
const point& position0,
|
||||||
@ -663,7 +694,7 @@ void Foam::ParticleCollector<CloudType>::postMove
|
|||||||
{
|
{
|
||||||
vector Uhat = p.U();
|
vector Uhat = p.U();
|
||||||
Uhat /= mag(Uhat) + ROOTVSMALL;
|
Uhat /= mag(Uhat) + ROOTVSMALL;
|
||||||
if ((Uhat & normal_) < 0)
|
if ((Uhat & normal_[faceI]) < 0)
|
||||||
{
|
{
|
||||||
m *= -1.0;
|
m *= -1.0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -164,8 +164,8 @@ private:
|
|||||||
//- Face areas
|
//- Face areas
|
||||||
Field<scalar> area_;
|
Field<scalar> area_;
|
||||||
|
|
||||||
//- Polygon normal vector
|
//- Polygon normal vector per face
|
||||||
vector normal_;
|
Field<vector> normal_;
|
||||||
|
|
||||||
//- Remove mass of parcel travelling in opposite direction to normal_
|
//- Remove mass of parcel travelling in opposite direction to normal_
|
||||||
bool negateParcelsOppositeNormal_;
|
bool negateParcelsOppositeNormal_;
|
||||||
@ -212,7 +212,7 @@ private:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Initialise polygon collectors
|
//- Initialise polygon collectors
|
||||||
void initPolygons();
|
void initPolygons(const List<Field<point> >& polygons);
|
||||||
|
|
||||||
//- Initialise concentric circle collectors
|
//- Initialise concentric circle collectors
|
||||||
void initConcentricCircles();
|
void initConcentricCircles();
|
||||||
@ -286,7 +286,7 @@ public:
|
|||||||
//- Post-move hook
|
//- Post-move hook
|
||||||
virtual void postMove
|
virtual void postMove
|
||||||
(
|
(
|
||||||
const parcelType& p,
|
parcelType& p,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const scalar dt,
|
const scalar dt,
|
||||||
const point& position0,
|
const point& position0,
|
||||||
|
|||||||
@ -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) 2012-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -106,6 +106,7 @@ void Foam::ParticleTrap<CloudType>::postMove
|
|||||||
parcelType& p,
|
parcelType& p,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const scalar,
|
const scalar,
|
||||||
|
const point&,
|
||||||
bool&
|
bool&
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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) 2012-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -132,6 +132,7 @@ public:
|
|||||||
typename CloudType::parcelType& p,
|
typename CloudType::parcelType& p,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const scalar dt,
|
const scalar dt,
|
||||||
|
const point& position0,
|
||||||
bool& keepParticle
|
bool& keepParticle
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -124,9 +124,10 @@ void Foam::VoidFraction<CloudType>::postEvolve()
|
|||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::VoidFraction<CloudType>::postMove
|
void Foam::VoidFraction<CloudType>::postMove
|
||||||
(
|
(
|
||||||
const parcelType& p,
|
parcelType& p,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const scalar dt,
|
const scalar dt,
|
||||||
|
const point&,
|
||||||
bool&
|
bool&
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -118,9 +118,10 @@ public:
|
|||||||
//- Post-move hook
|
//- Post-move hook
|
||||||
virtual void postMove
|
virtual void postMove
|
||||||
(
|
(
|
||||||
const parcelType& p,
|
parcelType& p,
|
||||||
const label cellI,
|
const label cellI,
|
||||||
const scalar dt,
|
const scalar dt,
|
||||||
|
const point& position0,
|
||||||
bool& keepParticle
|
bool& keepParticle
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -4,6 +4,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
||||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||||
|
-I$(LIB_SRC)/lagrangian/turbulence/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
|
||||||
|
|||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -29,7 +29,9 @@ License
|
|||||||
|
|
||||||
// Kinematic
|
// Kinematic
|
||||||
#include "makeThermoParcelForces.H" // thermo variant
|
#include "makeThermoParcelForces.H" // thermo variant
|
||||||
|
#include "makeThermoParcelTurbulenceForces.H" // add turbulence variant
|
||||||
#include "makeParcelDispersionModels.H"
|
#include "makeParcelDispersionModels.H"
|
||||||
|
#include "makeParcelTurbulenceDispersionModels.H" // add turbulence variant
|
||||||
#include "makeSprayParcelInjectionModels.H" // Spray variant
|
#include "makeSprayParcelInjectionModels.H" // Spray variant
|
||||||
#include "makeParcelPatchInteractionModels.H"
|
#include "makeParcelPatchInteractionModels.H"
|
||||||
#include "makeSprayParcelStochasticCollisionModels.H" // Spray variant
|
#include "makeSprayParcelStochasticCollisionModels.H" // Spray variant
|
||||||
@ -54,7 +56,9 @@ namespace Foam
|
|||||||
|
|
||||||
// Kinematic sub-models
|
// Kinematic sub-models
|
||||||
makeThermoParcelForces(basicSprayCloud);
|
makeThermoParcelForces(basicSprayCloud);
|
||||||
|
makeThermoParcelTurbulenceForces(basicSprayCloud);
|
||||||
makeParcelDispersionModels(basicSprayCloud);
|
makeParcelDispersionModels(basicSprayCloud);
|
||||||
|
makeParcelTurbulenceDispersionModels(basicSprayCloud);
|
||||||
makeSprayParcelInjectionModels(basicSprayCloud);
|
makeSprayParcelInjectionModels(basicSprayCloud);
|
||||||
makeParcelPatchInteractionModels(basicSprayCloud);
|
makeParcelPatchInteractionModels(basicSprayCloud);
|
||||||
makeSprayParcelStochasticCollisionModels(basicSprayCloud);
|
makeSprayParcelStochasticCollisionModels(basicSprayCloud);
|
||||||
|
|||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,33 +24,13 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "basicKinematicCollidingCloud.H"
|
#include "basicKinematicCollidingCloud.H"
|
||||||
|
#include "makeParcelTurbulenceDispersionModels.H"
|
||||||
#include "makeParcelCloudFunctionObjects.H"
|
|
||||||
|
|
||||||
#include "GradientDispersionRAS.H"
|
|
||||||
#include "StochasticDispersionRAS.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
typedef basicKinematicCollidingCloud::kinematicCloudType
|
makeParcelTurbulenceDispersionModels(basicKinematicCollidingCloud);
|
||||||
kinematicCloudType_K;
|
|
||||||
defineNamedTemplateTypeNameAndDebug
|
|
||||||
(
|
|
||||||
DispersionRASModel<kinematicCloudType_K>,
|
|
||||||
0
|
|
||||||
);
|
|
||||||
makeDispersionModelType
|
|
||||||
(
|
|
||||||
GradientDispersionRAS,
|
|
||||||
basicKinematicCollidingCloud
|
|
||||||
);
|
|
||||||
makeDispersionModelType
|
|
||||||
(
|
|
||||||
StochasticDispersionRAS,
|
|
||||||
basicKinematicCollidingCloud
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,24 +24,13 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "basicKinematicCloud.H"
|
#include "basicKinematicCloud.H"
|
||||||
|
#include "makeParcelTurbulenceDispersionModels.H"
|
||||||
#include "makeParcelCloudFunctionObjects.H"
|
|
||||||
|
|
||||||
#include "GradientDispersionRAS.H"
|
|
||||||
#include "StochasticDispersionRAS.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
typedef basicKinematicCloud::kinematicCloudType kinematicCloudType_K;
|
makeParcelTurbulenceDispersionModels(basicKinematicCloud);
|
||||||
defineNamedTemplateTypeNameAndDebug
|
|
||||||
(
|
|
||||||
DispersionRASModel<kinematicCloudType_K>,
|
|
||||||
0
|
|
||||||
);
|
|
||||||
makeDispersionModelType(GradientDispersionRAS, basicKinematicCloud);
|
|
||||||
makeDispersionModelType(StochasticDispersionRAS, basicKinematicCloud);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,40 +25,15 @@ License
|
|||||||
|
|
||||||
#include "basicReactingMultiphaseCloud.H"
|
#include "basicReactingMultiphaseCloud.H"
|
||||||
|
|
||||||
#include "makeParcelCloudFunctionObjects.H"
|
#include "makeParcelTurbulenceDispersionModels.H"
|
||||||
|
#include "makeThermoParcelTurbulenceForces.H"
|
||||||
#include "GradientDispersionRAS.H"
|
|
||||||
#include "StochasticDispersionRAS.H"
|
|
||||||
|
|
||||||
#include "BrownianMotionForce.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
typedef basicReactingMultiphaseCloud::kinematicCloudType
|
makeThermoParcelTurbulenceForces(basicReactingMultiphaseCloud);
|
||||||
kinematicCloudType_K;
|
makeParcelTurbulenceDispersionModels(basicReactingMultiphaseCloud);
|
||||||
defineNamedTemplateTypeNameAndDebug
|
|
||||||
(
|
|
||||||
DispersionRASModel<kinematicCloudType_K>,
|
|
||||||
0
|
|
||||||
);
|
|
||||||
makeDispersionModelType
|
|
||||||
(
|
|
||||||
GradientDispersionRAS,
|
|
||||||
basicReactingMultiphaseCloud
|
|
||||||
);
|
|
||||||
makeDispersionModelType
|
|
||||||
(
|
|
||||||
StochasticDispersionRAS,
|
|
||||||
basicReactingMultiphaseCloud
|
|
||||||
);
|
|
||||||
|
|
||||||
makeParticleForceModelType
|
|
||||||
(
|
|
||||||
BrownianMotionForce,
|
|
||||||
basicReactingMultiphaseCloud
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,27 +25,15 @@ License
|
|||||||
|
|
||||||
#include "basicReactingCloud.H"
|
#include "basicReactingCloud.H"
|
||||||
|
|
||||||
#include "makeParcelCloudFunctionObjects.H"
|
#include "makeParcelTurbulenceDispersionModels.H"
|
||||||
|
#include "makeThermoParcelTurbulenceForces.H"
|
||||||
#include "GradientDispersionRAS.H"
|
|
||||||
#include "StochasticDispersionRAS.H"
|
|
||||||
|
|
||||||
#include "BrownianMotionForce.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
typedef basicReactingCloud::kinematicCloudType kinematicCloudType_K;
|
makeThermoParcelTurbulenceForces(basicReactingCloud);
|
||||||
defineNamedTemplateTypeNameAndDebug
|
makeParcelTurbulenceDispersionModels(basicReactingCloud);
|
||||||
(
|
|
||||||
DispersionRASModel<kinematicCloudType_K>,
|
|
||||||
0
|
|
||||||
);
|
|
||||||
makeDispersionModelType(GradientDispersionRAS, basicReactingCloud);
|
|
||||||
makeDispersionModelType(StochasticDispersionRAS, basicReactingCloud);
|
|
||||||
|
|
||||||
makeParticleForceModelType(BrownianMotionForce, basicReactingCloud);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,27 +25,15 @@ License
|
|||||||
|
|
||||||
#include "basicThermoCloud.H"
|
#include "basicThermoCloud.H"
|
||||||
|
|
||||||
#include "makeParcelCloudFunctionObjects.H"
|
#include "makeParcelTurbulenceDispersionModels.H"
|
||||||
|
#include "makeThermoParcelTurbulenceForces.H"
|
||||||
#include "GradientDispersionRAS.H"
|
|
||||||
#include "StochasticDispersionRAS.H"
|
|
||||||
|
|
||||||
#include "BrownianMotionForce.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
typedef basicThermoCloud::kinematicCloudType kinematicCloudType_K;
|
makeThermoParcelTurbulenceForces(basicThermoCloud);
|
||||||
defineNamedTemplateTypeNameAndDebug
|
makeParcelTurbulenceDispersionModels(basicThermoCloud);
|
||||||
(
|
|
||||||
DispersionRASModel<kinematicCloudType_K>,
|
|
||||||
0
|
|
||||||
);
|
|
||||||
makeDispersionModelType(GradientDispersionRAS, basicThermoCloud);
|
|
||||||
makeDispersionModelType(StochasticDispersionRAS, basicThermoCloud);
|
|
||||||
|
|
||||||
makeParticleForceModelType(BrownianMotionForce, basicThermoCloud);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,8 +23,8 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef makeParcelDispersionModels_h
|
#ifndef makeParcelTurbulenceDispersionModels_h
|
||||||
#define makeParcelDispersionModels_h
|
#define makeParcelTurbulenceDispersionModels_h
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#define makeParcelDispersionModels(CloudType) \
|
#define makeParcelTurbulenceDispersionModels(CloudType) \
|
||||||
\
|
\
|
||||||
typedef CloudType::kinematicCloudType kinematicCloudType; \
|
typedef CloudType::kinematicCloudType kinematicCloudType; \
|
||||||
defineNamedTemplateTypeNameAndDebug \
|
defineNamedTemplateTypeNameAndDebug \
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2014 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/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef makeThermoParcelTurbulenceForces_h
|
||||||
|
#define makeThermoParcelTurbulenceForces_h
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#include "BrownianMotionForce.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#define makeThermoParcelTurbulenceForces(CloudType) \
|
||||||
|
\
|
||||||
|
makeParticleForceModelType(BrownianMotionForce, CloudType);
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -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) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,6 +25,7 @@ License
|
|||||||
|
|
||||||
#include "GradientDispersionRAS.H"
|
#include "GradientDispersionRAS.H"
|
||||||
#include "demandDrivenData.H"
|
#include "demandDrivenData.H"
|
||||||
|
#include "fvcGrad.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -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) 2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -310,6 +310,8 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::calculate
|
|||||||
{
|
{
|
||||||
label srcFaceI = findMappedSrcFace(tgtFaceI, tgtAddr);
|
label srcFaceI = findMappedSrcFace(tgtFaceI, tgtAddr);
|
||||||
|
|
||||||
|
if (srcFaceI >= 0)
|
||||||
|
{
|
||||||
// note - reversed search from src->tgt to tgt->src
|
// note - reversed search from src->tgt to tgt->src
|
||||||
findNearestFace
|
findNearestFace
|
||||||
(
|
(
|
||||||
@ -322,6 +324,7 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::calculate
|
|||||||
tgtAddr[tgtFaceI].append(srcFaceI);
|
tgtAddr[tgtFaceI].append(srcFaceI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// transfer data to persistent storage
|
// transfer data to persistent storage
|
||||||
|
|||||||
@ -912,6 +912,14 @@ void Foam::forces::calcForcesMoment()
|
|||||||
const HashTable<const porosityModel*> models =
|
const HashTable<const porosityModel*> models =
|
||||||
obr_.lookupClass<porosityModel>();
|
obr_.lookupClass<porosityModel>();
|
||||||
|
|
||||||
|
if (models.empty())
|
||||||
|
{
|
||||||
|
WarningIn("void Foam::forces::calcForcesMoment()")
|
||||||
|
<< "Porosity effects requested, but no porosity models found "
|
||||||
|
<< "in the database"
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
forAllConstIter(HashTable<const porosityModel*>, models, iter)
|
forAllConstIter(HashTable<const porosityModel*>, models, iter)
|
||||||
{
|
{
|
||||||
const porosityModel& pm = *iter();
|
const porosityModel& pm = *iter();
|
||||||
|
|||||||
@ -26,6 +26,7 @@ License
|
|||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "directFvPatchFieldMapper.H"
|
#include "directFvPatchFieldMapper.H"
|
||||||
|
#include "calculatedFvPatchField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -381,30 +382,21 @@ Foam::meshToMesh::mapSrcToTgt
|
|||||||
|
|
||||||
const fvMesh& tgtMesh = static_cast<const fvMesh&>(tgtRegion_);
|
const fvMesh& tgtMesh = static_cast<const fvMesh&>(tgtRegion_);
|
||||||
|
|
||||||
const typename fieldType::GeometricBoundaryField& bfld =
|
const fvBoundaryMesh& tgtBm = tgtMesh.boundary();
|
||||||
|
const typename fieldType::GeometricBoundaryField& srcBfld =
|
||||||
field.boundaryField();
|
field.boundaryField();
|
||||||
|
|
||||||
PtrList<fvPatchField<Type> > patchFields(bfld.size());
|
wordList patchTypes(tgtBm.size(), calculatedFvPatchField<Type>::typeName);
|
||||||
|
|
||||||
// constuct tgt boundary patch types as copy of field boundary types
|
// constuct tgt boundary patch types as copy of 'field' boundary types
|
||||||
// note: this will provide place holders for fields with additional
|
// note: this will provide place holders for fields with additional
|
||||||
// entries, but these values will need to be reset
|
// entries, but these values will need to be reset
|
||||||
forAll(bfld, patchI)
|
forAll(tgtPatchID_, i)
|
||||||
{
|
{
|
||||||
patchFields.set
|
label srcPatchI = srcPatchID_[i];
|
||||||
(
|
label tgtPatchI = tgtPatchID_[i];
|
||||||
patchI,
|
|
||||||
fvPatchField<Type>::New
|
patchTypes[tgtPatchI] = srcBfld[srcPatchI].type();
|
||||||
(
|
|
||||||
bfld[patchI],
|
|
||||||
tgtMesh.boundary()[patchI],
|
|
||||||
DimensionedField<Type, volMesh>::null(),
|
|
||||||
directFvPatchFieldMapper
|
|
||||||
(
|
|
||||||
labelList(tgtMesh.boundary()[patchI].size(), -1)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp<fieldType> tresult
|
tmp<fieldType> tresult
|
||||||
@ -420,9 +412,8 @@ Foam::meshToMesh::mapSrcToTgt
|
|||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
tgtMesh,
|
tgtMesh,
|
||||||
field.dimensions(),
|
dimensioned<Type>("0", field.dimensions(), pTraits<Type>::zero),
|
||||||
Field<Type>(tgtMesh.nCells(), pTraits<Type>::zero),
|
patchTypes
|
||||||
patchFields
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -517,30 +508,21 @@ Foam::meshToMesh::mapTgtToSrc
|
|||||||
|
|
||||||
const fvMesh& srcMesh = static_cast<const fvMesh&>(srcRegion_);
|
const fvMesh& srcMesh = static_cast<const fvMesh&>(srcRegion_);
|
||||||
|
|
||||||
const typename fieldType::GeometricBoundaryField& bfld =
|
const fvBoundaryMesh& srcBm = srcMesh.boundary();
|
||||||
|
const typename fieldType::GeometricBoundaryField& tgtBfld =
|
||||||
field.boundaryField();
|
field.boundaryField();
|
||||||
|
|
||||||
PtrList<fvPatchField<Type> > patchFields(bfld.size());
|
wordList patchTypes(srcBm.size(), calculatedFvPatchField<Type>::typeName);
|
||||||
|
|
||||||
// constuct src boundary patch types as copy of field boundary types
|
// constuct src boundary patch types as copy of 'field' boundary types
|
||||||
// note: this will provide place holders for fields with additional
|
// note: this will provide place holders for fields with additional
|
||||||
// entries, but these values will need to be reset
|
// entries, but these values will need to be reset
|
||||||
forAll(bfld, patchI)
|
forAll(srcPatchID_, i)
|
||||||
{
|
{
|
||||||
patchFields.set
|
label srcPatchI = srcPatchID_[i];
|
||||||
(
|
label tgtPatchI = tgtPatchID_[i];
|
||||||
patchI,
|
|
||||||
fvPatchField<Type>::New
|
patchTypes[srcPatchI] = tgtBfld[tgtPatchI].type();
|
||||||
(
|
|
||||||
bfld[patchI],
|
|
||||||
srcMesh.boundary()[patchI],
|
|
||||||
DimensionedField<Type, volMesh>::null(),
|
|
||||||
directFvPatchFieldMapper
|
|
||||||
(
|
|
||||||
labelList(srcMesh.boundary()[patchI].size(), -1)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp<fieldType> tresult
|
tmp<fieldType> tresult
|
||||||
@ -556,9 +538,8 @@ Foam::meshToMesh::mapTgtToSrc
|
|||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
srcMesh,
|
srcMesh,
|
||||||
field.dimensions(),
|
dimensioned<Type>("0", field.dimensions(), pTraits<Type>::zero),
|
||||||
Field<Type>(srcMesh.nCells(), pTraits<Type>::zero),
|
patchTypes
|
||||||
patchFields
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -275,7 +275,7 @@ addLayersControls
|
|||||||
{
|
{
|
||||||
nSurfaceLayers 3;
|
nSurfaceLayers 3;
|
||||||
}
|
}
|
||||||
"igloo_.*"
|
igloo
|
||||||
{
|
{
|
||||||
nSurfaceLayers 1;
|
nSurfaceLayers 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user