Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
Mark Olesen
2018-03-07 18:08:07 +01:00
20 changed files with 119 additions and 36 deletions

View File

@ -114,7 +114,7 @@ volScalarField Qdot
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("Qdot", dimEnergy/dimTime, 0.0)
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
);
#include "createMRF.H"

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2017-2018 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -37,12 +37,12 @@ Description
The switch nonDimensional can be used for a non-dimensional table. It needs
inputs rpm and dm of the fan. It should be used with uniformJump true.
The nonDimensional flux for the table is calculate as :
The nonDimensional U for the table is calculate as :
phi = 4.0*mDot/(rho*sqr(PI)*dm^3*omega)
phi = 120*Un/(PI^3*dm*rpm)
where:
dm is the mean diameter.
omega is rad/sec.
rpm is the RPM of the fan.
The nonDimensinal pressure :

View File

@ -80,7 +80,7 @@ Foam::isoAdvection::isoAdvection
// Tolerances and solution controls
nAlphaBounds_(dict_.lookupOrDefault<label>("nAlphaBounds", 3)),
vof2IsoTol_(dict_.lookupOrDefault<scalar>("vof2IsoTol", 1e-8)),
isoFaceTol_(dict_.lookupOrDefault<scalar>("isoFaceTol", 1e-8)),
surfCellTol_(dict_.lookupOrDefault<scalar>("surfCellTol", 1e-8)),
gradAlphaBasedNormal_
(
@ -249,7 +249,7 @@ void Foam::isoAdvection::timeIntegratedFlux()
(
celli,
alpha1In_[celli],
vof2IsoTol_,
isoFaceTol_,
maxIter
);

View File

@ -119,7 +119,7 @@ class isoAdvection
label nAlphaBounds_;
//- Tolerance for search of isoFace giving specified VOF value
scalar vof2IsoTol_;
scalar isoFaceTol_;
//- Tolerance for marking of surface cells:
// Those with surfCellTol_ < alpha1 < 1 - surfCellTol_

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -275,6 +275,7 @@ Foam::InjectionModel<CloudType>::InjectionModel(CloudType& owner)
nParticleFixed_(0.0),
time0_(0.0),
timeStep0_(this->template getModelProperty<scalar>("timeStep0")),
minParticlesPerParcel_(1),
delayedVolume_(0.0),
injectorID_(-1)
{}
@ -304,6 +305,11 @@ Foam::InjectionModel<CloudType>::InjectionModel
nParticleFixed_(0.0),
time0_(owner.db().time().value()),
timeStep0_(this->template getModelProperty<scalar>("timeStep0")),
minParticlesPerParcel_
(
this->coeffDict().template
lookupOrDefault<scalar>("minParticlesPerParcel", 1)
),
delayedVolume_(0.0),
injectorID_(this->coeffDict().lookupOrDefault("injectorID", -1))
{
@ -382,6 +388,7 @@ Foam::InjectionModel<CloudType>::InjectionModel
nParticleFixed_(im.nParticleFixed_),
time0_(im.time0_),
timeStep0_(im.timeStep0_),
minParticlesPerParcel_(im.minParticlesPerParcel_),
delayedVolume_(im.delayedVolume_),
injectorID_(im.injectorID_)
{}
@ -517,7 +524,7 @@ void Foam::InjectionModel<CloudType>::inject
pPtr->rho()
);
if (pPtr->nParticle() >= 1.0)
if (pPtr->nParticle() >= minParticlesPerParcel_)
{
parcelsAdded++;
massAdded += pPtr->nParticle()*pPtr->mass();

View File

@ -81,7 +81,7 @@ public:
// Enumerations
//- Parcel basis representation options
// i.e constant number of particles OR constant mass per parcel
//- i.e constant number of particles OR constant mass per parcel
enum parcelBasis
{
pbNumber,
@ -100,7 +100,7 @@ protected:
scalar SOI_;
//- Total volume of particles introduced by this injector [m^3]
// - scaled to ensure massTotal is achieved
//- Note: scaled to ensure massTotal is achieved
scalar volumeTotal_;
//- Total mass to inject [kg]
@ -128,7 +128,7 @@ protected:
parcelBasis parcelBasis_;
//- nParticle to assign to parcels when the 'fixed' basis
// is selected
//- is selected
scalar nParticleFixed_;
//- Continuous phase time at start of injection time step [s]
@ -137,8 +137,12 @@ protected:
//- Time at start of injection time step [s]
scalar timeStep0_;
//- Minimum number of particles used to represent each parcel
//- default = 1
scalar minParticlesPerParcel_;
//- Volume that should have been injected, but would lead to
// less than 1 particle per parcel
//- less than minParticlesPerParcel_ particle per parcel
scalar delayedVolume_;
//- Optional injector ID

View File

@ -54,6 +54,8 @@ bool Foam::faceOnlySet::trackToBoundary
DynamicList<scalar>& samplingCurveDist
) const
{
const vector offset = (end_ - start_);
particle::trackingData td(particleCloud);
point trackPt = singleParticle.position();
@ -75,9 +77,10 @@ bool Foam::faceOnlySet::trackToBoundary
samplingCurveDist.append(mag(trackPt - start_));
}
if (mag(trackPt - end_) < smallDist)
if (-smallDist < ((trackPt - end_) & offset))
{
// End reached
// Projected onto sampling vector
// - done when we are near or past the end of the sampling vector
return false;
}
else if (singleParticle.onBoundaryFace())
@ -166,7 +169,6 @@ void Foam::faceOnlySet::calcSamples
// Set points and cell/face labels to empty lists
//Info<< "calcSamples : Both start_ and end_ outside domain"
// << endl;
const_cast<polyMesh&>(mesh()).moving(oldMoving);
const_cast<polyMesh&>(mesh()).moving(oldMoving);
return;

View File

@ -17,7 +17,6 @@ FoamFile
dimensions [ 0 1 -1 0 0 0 0 ];
// Re = 395, L = pi, utau = 1, nu = pi/395 = 7.9534e-3
// Ub/utau = 17.55
internalField uniform ( 17.55 0 0 );

View File

@ -52,5 +52,6 @@ maxAlphaCo 1;
maxDeltaT 1;
#includeIfPresent "sampling"
// ************************************************************************* //

View File

@ -0,0 +1,54 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object sampling;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
functions
{
sampleSets
{
type sets;
libs ("libsampling.so");
writeControl timeStep;
writeInterval 1;
setFormat vtk;
interpolationScheme cellPointFace;
fields ( alpha.water );
sets
(
gauge_1
{
type face;
axis y;
start (0.02 0.20 0.005);
end (0.02 0.25 0.005);
nPoints 100;
}
gauge_2
{
type face;
axis y;
start (0.2 0.03 0.005);
end (0.2 0.55 0.005);
nPoints 100;
}
);
}
}
// ************************************************************************* //

View File

@ -4,8 +4,10 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
-Wno-invalid-offsetof -Wno-attributes \
-Wno-unknown-pragmas
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
# Suppress some warnings (flex++, CGAL, etc)
c++LESSWARN = \
-Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds \
-fpermissive
CC = g++ -std=c++11 -m64

View File

@ -3,8 +3,10 @@ SUFFIXES += .C .cc .cpp .cxx
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \
-Wno-invalid-offsetof -Wno-attributes
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
# Suppress some warnings (flex++, CGAL, etc)
c++LESSWARN = \
-Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds \
-fpermissive
CC = g++ -std=c++11 -m64 -march=knl

View File

@ -4,8 +4,10 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
-Wno-invalid-offsetof -Wno-attributes \
-Wno-unknown-pragmas
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
# Suppress some warnings (flex++, CGAL, etc)
c++LESSWARN = \
-Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds \
-fpermissive
CC = g++ -std=c++11

View File

@ -4,8 +4,10 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
-Wno-invalid-offsetof -Wno-attributes \
-Wno-unknown-pragmas
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
# Suppress some warnings (flex++, CGAL, etc)
c++LESSWARN = \
-Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds \
-fpermissive
CC = g++ -std=c++11

View File

@ -4,8 +4,10 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
-Wno-invalid-offsetof -Wno-attributes \
-Wno-unknown-pragmas
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
# Suppress some warnings (flex++, CGAL, etc)
c++LESSWARN = \
-Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds \
-fpermissive
CC = g++ -std=c++11 -m32

View File

@ -4,8 +4,10 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
-Wno-invalid-offsetof -Wno-attributes \
-Wno-unknown-pragmas
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
# Suppress some warnings (flex++, CGAL, etc)
c++LESSWARN = \
-Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds \
-fpermissive
CC = g++ -std=c++11

View File

@ -4,8 +4,10 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
-Wno-invalid-offsetof -Wno-attributes \
-Wno-unknown-pragmas
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
# Suppress some warnings (flex++, CGAL, etc)
c++LESSWARN = \
-Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds \
-fpermissive
CC = g++ -std=c++11 -m64 -mcpu=power5+

View File

@ -4,8 +4,10 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
-Wno-invalid-offsetof -Wno-attributes \
-Wno-unknown-pragmas
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
# Suppress some warnings (flex++, CGAL, etc)
c++LESSWARN = \
-Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds \
-fpermissive
CC = g++ -std=c++11 -m64 -mcpu=power8

View File

@ -4,7 +4,7 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
-Wno-invalid-offsetof -Wno-attributes \
-Wno-unknown-pragmas
# Suppress some warnings for flex++ and CGAL
# Suppress some warnings (flex++, CGAL, etc)
c++LESSWARN =
CC = g++ -std=c++11 -m64

View File

@ -4,7 +4,7 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
-Wno-invalid-offsetof -Wno-attributes \
-Wno-unknown-pragmas
# Suppress some warnings for flex++ and CGAL
# Suppress some warnings (flex++, CGAL, etc)
c++LESSWARN =
CC = g++ -std=c++11