Merge branch 'master' of /home/dm4/OpenFOAM/repositories/OpenFOAM-dev

This commit is contained in:
william
2014-02-19 10:21:12 +00:00
29 changed files with 207 additions and 199 deletions

View File

@ -2,10 +2,12 @@
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix hEqn
(
(
thermo.isotropic()
? -fvm::laplacian(betav*thermo.alpha(), h, "laplacian(alpha,h)")
: -fvm::laplacian(betav*tAnialpha(), h, "laplacian(alpha,h)")
)
==
fvOptions(rho, h)
);

View File

@ -11,10 +11,10 @@
Info<< "*** Reading solid mesh thermophysical properties for region "
<< 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]));
Info<< " Adding to radiations\n" << endl;
Info<< " Adding to radiation models\n" << endl;
radiations.set(i, radiation::radiationModel::New(thermos[i].T()));
Info<< " Adding fvOptions\n" << endl;

View File

@ -3,7 +3,10 @@ EXE_INC = \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/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 = \
-lincompressibleTransportModels \
@ -14,4 +17,7 @@ EXE_LIBS = \
-lcompressibleRASModels \
-lcompressibleLESModels \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-lsampling \
-lgenericPatchFields

View File

@ -42,6 +42,7 @@ Description
#include "surfaceFields.H"
#include "pointFields.H"
#include "ReadFields.H"
#include "fvIOoptionList.H"
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
@ -167,6 +168,8 @@ void calc
mesh
);
#include "createFvOptions.H"
if (phi.dimensions() == dimVolume/dimTime)
{
IOobject RASPropertiesHeader

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -31,7 +31,7 @@ template<class Type>
Foam::Table<Type>::Table(const word& entryName, const dictionary& dict)
:
DataEntry<Type>(entryName),
TableBase<Type>(entryName, dictionary::null)
TableBase<Type>(entryName, dict)
{
Istream& is(dict.lookup(entryName));
word entryType(is);

View File

@ -113,7 +113,7 @@ void Foam::CloudFunctionObject<CloudType>::postEvolve()
template<class CloudType>
void Foam::CloudFunctionObject<CloudType>::postMove
(
const typename CloudType::parcelType&,
typename CloudType::parcelType&,
const label,
const scalar,
const point&,

View File

@ -144,7 +144,7 @@ public:
//- Post-move hook
virtual void postMove
(
const typename CloudType::parcelType& p,
typename CloudType::parcelType& p,
const label cellI,
const scalar dt,
const point& position0,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -136,7 +136,7 @@ void Foam::CloudFunctionObjectList<CloudType>::postEvolve()
template<class CloudType>
void Foam::CloudFunctionObjectList<CloudType>::postMove
(
const typename CloudType::parcelType& p,
typename CloudType::parcelType& p,
const label cellI,
const scalar dt,
const point& position0,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -112,7 +112,7 @@ public:
//- Post-move hook
virtual void postMove
(
const typename CloudType::parcelType& p,
typename CloudType::parcelType& p,
const label cellI,
const scalar dt,
const point& position0,

View File

@ -106,11 +106,13 @@ void Foam::ParticleCollector<CloudType>::makeLogFile
template<class CloudType>
void Foam::ParticleCollector<CloudType>::initPolygons()
void Foam::ParticleCollector<CloudType>::initPolygons
(
const List<Field<point> >& polygons
)
{
mode_ = mtPolygon;
List<Field<point> > polygons(this->coeffDict().lookup("polygons"));
label nPoints = 0;
forAll(polygons, polyI)
{
@ -168,7 +170,7 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles()
if (nSector_ > 1)
{
refDir = this->coeffDict().lookup("refDir");
refDir -= normal_*(normal_ & refDir);
refDir -= normal_[0]*(normal_[0] & refDir);
refDir /= mag(refDir);
}
else
@ -184,7 +186,7 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles()
{
vector v = rnd.vector01();
tangent = v - (v & normal_)*normal_;
tangent = v - (v & normal_[0])*normal_[0];
magTangent = mag(tangent);
}
@ -209,7 +211,7 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles()
faces_.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));
@ -301,8 +303,8 @@ void Foam::ParticleCollector<CloudType>::collectParcelPolygon
const point& pf = points_[facePoint0];
const scalar d1 = normal_ & (p1 - pf);
const scalar d2 = normal_ & (p2 - pf);
const scalar d1 = normal_[faceI] & (p1 - pf);
const scalar d2 = normal_[faceI] & (p2 - pf);
if (sign(d1) == sign(d2))
{
@ -344,8 +346,8 @@ void Foam::ParticleCollector<CloudType>::collectParcelConcentricCircles
{
label secI = -1;
const scalar d1 = normal_ & (p1 - coordSys_.origin());
const scalar d2 = normal_ & (p2 - coordSys_.origin());
const scalar d1 = normal_[0] & (p1 - coordSys_.origin());
const scalar d2 = normal_[0] & (p2 - coordSys_.origin());
if (sign(d1) == sign(d2))
{
@ -526,7 +528,7 @@ Foam::ParticleCollector<CloudType>::ParticleCollector
nSector_(0),
radius_(),
coordSys_(false),
normal_(this->coeffDict().lookup("normal")),
normal_(),
negateParcelsOppositeNormal_
(
readBool(this->coeffDict().lookup("negateParcelsOppositeNormal"))
@ -547,10 +549,37 @@ Foam::ParticleCollector<CloudType>::ParticleCollector
word mode(this->coeffDict().lookup("mode"));
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")
{
vector n0(this->coeffDict().lookup("normal"));
normal_ = vectorField(1, n0);
initConcentricCircles();
}
else
@ -560,12 +589,14 @@ Foam::ParticleCollector<CloudType>::ParticleCollector
"Foam::ParticleCollector<CloudType>::ParticleCollector"
"("
"const dictionary&,"
"CloudType&"
"CloudType&, "
"const word&"
")",
this->coeffDict()
)
<< "Unknown mode " << mode << ". Available options are "
<< "polygon and concentricCircle" << exit(FatalIOError);
<< "polygon, polygonWithNormal and concentricCircle"
<< exit(FatalIOError);
}
mass_.setSize(faces_.size(), 0.0);
@ -619,7 +650,7 @@ Foam::ParticleCollector<CloudType>::~ParticleCollector()
template<class CloudType>
void Foam::ParticleCollector<CloudType>::postMove
(
const parcelType& p,
parcelType& p,
const label cellI,
const scalar dt,
const point& position0,
@ -663,7 +694,7 @@ void Foam::ParticleCollector<CloudType>::postMove
{
vector Uhat = p.U();
Uhat /= mag(Uhat) + ROOTVSMALL;
if ((Uhat & normal_) < 0)
if ((Uhat & normal_[faceI]) < 0)
{
m *= -1.0;
}

View File

@ -164,8 +164,8 @@ private:
//- Face areas
Field<scalar> area_;
//- Polygon normal vector
vector normal_;
//- Polygon normal vector per face
Field<vector> normal_;
//- Remove mass of parcel travelling in opposite direction to normal_
bool negateParcelsOppositeNormal_;
@ -212,7 +212,7 @@ private:
);
//- Initialise polygon collectors
void initPolygons();
void initPolygons(const List<Field<point> >& polygons);
//- Initialise concentric circle collectors
void initConcentricCircles();
@ -286,7 +286,7 @@ public:
//- Post-move hook
virtual void postMove
(
const parcelType& p,
parcelType& p,
const label cellI,
const scalar dt,
const point& position0,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -106,6 +106,7 @@ void Foam::ParticleTrap<CloudType>::postMove
parcelType& p,
const label cellI,
const scalar,
const point&,
bool&
)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -132,6 +132,7 @@ public:
typename CloudType::parcelType& p,
const label cellI,
const scalar dt,
const point& position0,
bool& keepParticle
);
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -124,9 +124,10 @@ void Foam::VoidFraction<CloudType>::postEvolve()
template<class CloudType>
void Foam::VoidFraction<CloudType>::postMove
(
const parcelType& p,
parcelType& p,
const label cellI,
const scalar dt,
const point&,
bool&
)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -118,9 +118,10 @@ public:
//- Post-move hook
virtual void postMove
(
const parcelType& p,
parcelType& p,
const label cellI,
const scalar dt,
const point& position0,
bool& keepParticle
);
};

View File

@ -4,6 +4,7 @@ EXE_INC = \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
-I$(LIB_SRC)/lagrangian/turbulence/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,7 +29,9 @@ License
// Kinematic
#include "makeThermoParcelForces.H" // thermo variant
#include "makeThermoParcelTurbulenceForces.H" // add turbulence variant
#include "makeParcelDispersionModels.H"
#include "makeParcelTurbulenceDispersionModels.H" // add turbulence variant
#include "makeSprayParcelInjectionModels.H" // Spray variant
#include "makeParcelPatchInteractionModels.H"
#include "makeSprayParcelStochasticCollisionModels.H" // Spray variant
@ -54,7 +56,9 @@ namespace Foam
// Kinematic sub-models
makeThermoParcelForces(basicSprayCloud);
makeThermoParcelTurbulenceForces(basicSprayCloud);
makeParcelDispersionModels(basicSprayCloud);
makeParcelTurbulenceDispersionModels(basicSprayCloud);
makeSprayParcelInjectionModels(basicSprayCloud);
makeParcelPatchInteractionModels(basicSprayCloud);
makeSprayParcelStochasticCollisionModels(basicSprayCloud);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -24,33 +24,13 @@ License
\*---------------------------------------------------------------------------*/
#include "basicKinematicCollidingCloud.H"
#include "makeParcelCloudFunctionObjects.H"
#include "GradientDispersionRAS.H"
#include "StochasticDispersionRAS.H"
#include "makeParcelTurbulenceDispersionModels.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef basicKinematicCollidingCloud::kinematicCloudType
kinematicCloudType_K;
defineNamedTemplateTypeNameAndDebug
(
DispersionRASModel<kinematicCloudType_K>,
0
);
makeDispersionModelType
(
GradientDispersionRAS,
basicKinematicCollidingCloud
);
makeDispersionModelType
(
StochasticDispersionRAS,
basicKinematicCollidingCloud
);
makeParcelTurbulenceDispersionModels(basicKinematicCollidingCloud);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -24,24 +24,13 @@ License
\*---------------------------------------------------------------------------*/
#include "basicKinematicCloud.H"
#include "makeParcelCloudFunctionObjects.H"
#include "GradientDispersionRAS.H"
#include "StochasticDispersionRAS.H"
#include "makeParcelTurbulenceDispersionModels.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef basicKinematicCloud::kinematicCloudType kinematicCloudType_K;
defineNamedTemplateTypeNameAndDebug
(
DispersionRASModel<kinematicCloudType_K>,
0
);
makeDispersionModelType(GradientDispersionRAS, basicKinematicCloud);
makeDispersionModelType(StochasticDispersionRAS, basicKinematicCloud);
makeParcelTurbulenceDispersionModels(basicKinematicCloud);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,40 +25,15 @@ License
#include "basicReactingMultiphaseCloud.H"
#include "makeParcelCloudFunctionObjects.H"
#include "GradientDispersionRAS.H"
#include "StochasticDispersionRAS.H"
#include "BrownianMotionForce.H"
#include "makeParcelTurbulenceDispersionModels.H"
#include "makeThermoParcelTurbulenceForces.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef basicReactingMultiphaseCloud::kinematicCloudType
kinematicCloudType_K;
defineNamedTemplateTypeNameAndDebug
(
DispersionRASModel<kinematicCloudType_K>,
0
);
makeDispersionModelType
(
GradientDispersionRAS,
basicReactingMultiphaseCloud
);
makeDispersionModelType
(
StochasticDispersionRAS,
basicReactingMultiphaseCloud
);
makeParticleForceModelType
(
BrownianMotionForce,
basicReactingMultiphaseCloud
);
makeThermoParcelTurbulenceForces(basicReactingMultiphaseCloud);
makeParcelTurbulenceDispersionModels(basicReactingMultiphaseCloud);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,27 +25,15 @@ License
#include "basicReactingCloud.H"
#include "makeParcelCloudFunctionObjects.H"
#include "GradientDispersionRAS.H"
#include "StochasticDispersionRAS.H"
#include "BrownianMotionForce.H"
#include "makeParcelTurbulenceDispersionModels.H"
#include "makeThermoParcelTurbulenceForces.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef basicReactingCloud::kinematicCloudType kinematicCloudType_K;
defineNamedTemplateTypeNameAndDebug
(
DispersionRASModel<kinematicCloudType_K>,
0
);
makeDispersionModelType(GradientDispersionRAS, basicReactingCloud);
makeDispersionModelType(StochasticDispersionRAS, basicReactingCloud);
makeParticleForceModelType(BrownianMotionForce, basicReactingCloud);
makeThermoParcelTurbulenceForces(basicReactingCloud);
makeParcelTurbulenceDispersionModels(basicReactingCloud);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,27 +25,15 @@ License
#include "basicThermoCloud.H"
#include "makeParcelCloudFunctionObjects.H"
#include "GradientDispersionRAS.H"
#include "StochasticDispersionRAS.H"
#include "BrownianMotionForce.H"
#include "makeParcelTurbulenceDispersionModels.H"
#include "makeThermoParcelTurbulenceForces.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef basicThermoCloud::kinematicCloudType kinematicCloudType_K;
defineNamedTemplateTypeNameAndDebug
(
DispersionRASModel<kinematicCloudType_K>,
0
);
makeDispersionModelType(GradientDispersionRAS, basicThermoCloud);
makeDispersionModelType(StochasticDispersionRAS, basicThermoCloud);
makeParticleForceModelType(BrownianMotionForce, basicThermoCloud);
makeThermoParcelTurbulenceForces(basicThermoCloud);
makeParcelTurbulenceDispersionModels(basicThermoCloud);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -23,8 +23,8 @@ License
\*---------------------------------------------------------------------------*/
#ifndef makeParcelDispersionModels_h
#define makeParcelDispersionModels_h
#ifndef makeParcelTurbulenceDispersionModels_h
#define makeParcelTurbulenceDispersionModels_h
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -33,7 +33,7 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeParcelDispersionModels(CloudType) \
#define makeParcelTurbulenceDispersionModels(CloudType) \
\
typedef CloudType::kinematicCloudType kinematicCloudType; \
defineNamedTemplateTypeNameAndDebug \

View File

@ -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
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,6 +25,7 @@ License
#include "GradientDispersionRAS.H"
#include "demandDrivenData.H"
#include "fvcGrad.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -310,6 +310,8 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::calculate
{
label srcFaceI = findMappedSrcFace(tgtFaceI, tgtAddr);
if (srcFaceI >= 0)
{
// note - reversed search from src->tgt to tgt->src
findNearestFace
(
@ -322,6 +324,7 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::calculate
tgtAddr[tgtFaceI].append(srcFaceI);
}
}
}
// transfer data to persistent storage

View File

@ -912,6 +912,14 @@ void Foam::forces::calcForcesMoment()
const HashTable<const porosityModel*> models =
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)
{
const porosityModel& pm = *iter();

View File

@ -26,6 +26,7 @@ License
#include "fvMesh.H"
#include "volFields.H"
#include "directFvPatchFieldMapper.H"
#include "calculatedFvPatchField.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -381,30 +382,21 @@ Foam::meshToMesh::mapSrcToTgt
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();
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
// entries, but these values will need to be reset
forAll(bfld, patchI)
forAll(tgtPatchID_, i)
{
patchFields.set
(
patchI,
fvPatchField<Type>::New
(
bfld[patchI],
tgtMesh.boundary()[patchI],
DimensionedField<Type, volMesh>::null(),
directFvPatchFieldMapper
(
labelList(tgtMesh.boundary()[patchI].size(), -1)
)
)
);
label srcPatchI = srcPatchID_[i];
label tgtPatchI = tgtPatchID_[i];
patchTypes[tgtPatchI] = srcBfld[srcPatchI].type();
}
tmp<fieldType> tresult
@ -420,9 +412,8 @@ Foam::meshToMesh::mapSrcToTgt
IOobject::NO_WRITE
),
tgtMesh,
field.dimensions(),
Field<Type>(tgtMesh.nCells(), pTraits<Type>::zero),
patchFields
dimensioned<Type>("0", field.dimensions(), pTraits<Type>::zero),
patchTypes
)
);
@ -517,30 +508,21 @@ Foam::meshToMesh::mapTgtToSrc
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();
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
// entries, but these values will need to be reset
forAll(bfld, patchI)
forAll(srcPatchID_, i)
{
patchFields.set
(
patchI,
fvPatchField<Type>::New
(
bfld[patchI],
srcMesh.boundary()[patchI],
DimensionedField<Type, volMesh>::null(),
directFvPatchFieldMapper
(
labelList(srcMesh.boundary()[patchI].size(), -1)
)
)
);
label srcPatchI = srcPatchID_[i];
label tgtPatchI = tgtPatchID_[i];
patchTypes[srcPatchI] = tgtBfld[tgtPatchI].type();
}
tmp<fieldType> tresult
@ -556,9 +538,8 @@ Foam::meshToMesh::mapTgtToSrc
IOobject::NO_WRITE
),
srcMesh,
field.dimensions(),
Field<Type>(srcMesh.nCells(), pTraits<Type>::zero),
patchFields
dimensioned<Type>("0", field.dimensions(), pTraits<Type>::zero),
patchTypes
)
);

View File

@ -275,7 +275,7 @@ addLayersControls
{
nSurfaceLayers 3;
}
"igloo_.*"
igloo
{
nSurfaceLayers 1;
}