surfaceFilmModels: Renamed injection -> ejection

The injection models do not inject parcels into the film they specifically eject
parcels from the film and the name "injection" is very confusing and misleading
hence the logical rename injection -> ejection.
This commit is contained in:
Henry Weller
2021-02-09 11:49:39 +00:00
parent e36a9475f9
commit a1e7357823
21 changed files with 285 additions and 285 deletions

View File

@ -20,13 +20,13 @@ $(KINEMATICMODELS)/force/contactAngleForces/temperatureDependent/temperatureDepe
$(KINEMATICMODELS)/force/contactAngleForces/perturbedTemperatureDependent/perturbedTemperatureDependentContactAngleForce.C
$(KINEMATICMODELS)/force/thermocapillaryForce/thermocapillaryForce.C
$(KINEMATICMODELS)/injectionModel/injectionModel/injectionModel.C
$(KINEMATICMODELS)/injectionModel/injectionModel/injectionModelNew.C
$(KINEMATICMODELS)/injectionModel/injectionModelList/injectionModelList.C
$(KINEMATICMODELS)/injectionModel/drippingInjection/drippingInjection.C
$(KINEMATICMODELS)/injectionModel/BrunDrippingInjection/BrunDrippingInjection.C
$(KINEMATICMODELS)/injectionModel/patchInjection/patchInjection.C
$(KINEMATICMODELS)/injectionModel/curvatureSeparation/curvatureSeparation.C
$(KINEMATICMODELS)/ejectionModel/ejectionModel/ejectionModel.C
$(KINEMATICMODELS)/ejectionModel/ejectionModel/ejectionModelNew.C
$(KINEMATICMODELS)/ejectionModel/ejectionModelList/ejectionModelList.C
$(KINEMATICMODELS)/ejectionModel/drippingEjection/drippingEjection.C
$(KINEMATICMODELS)/ejectionModel/BrunDrippingEjection/BrunDrippingEjection.C
$(KINEMATICMODELS)/ejectionModel/patchEjection/patchEjection.C
$(KINEMATICMODELS)/ejectionModel/curvatureSeparation/curvatureSeparation.C
$(KINEMATICMODELS)/transferModels/transferModel/transferModel.C
$(KINEMATICMODELS)/transferModels/transferModel/transferModelNew.C

View File

@ -206,8 +206,8 @@ void kinematicSingleLayer::updateSubmodels()
{
DebugInFunction << endl;
// Update injection model - mass returned is mass available for injection
injection_.correct(availableMass_, cloudMassTrans_, cloudDiameterTrans_);
// Update ejection model - mass returned is mass available for ejection
ejection_.correct(availableMass_, cloudMassTrans_, cloudDiameterTrans_);
// Update transfer model - mass returned is mass available for transfer
transfer_.correct(availableMass_, cloudMassTrans_);
@ -832,7 +832,7 @@ kinematicSingleLayer::kinematicSingleLayer
availableMass_(regionMesh().nCells(), 0),
injection_(*this, coeffs_),
ejection_(*this, coeffs_),
transfer_(*this, coeffs_),
@ -1017,7 +1017,7 @@ void kinematicSingleLayer::info()
<< indent << "coverage = "
<< gSum(coverage_.primitiveField()*magSf())/gSum(magSf()) << nl;
injection_.info(Info);
ejection_.info(Info);
transfer_.info(Info);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -42,7 +42,7 @@ SourceFiles
#include "fvMatrices.H"
#include "pimpleControl.H"
#include "injectionModelList.H"
#include "ejectionModelList.H"
#include "transferModelList.H"
#include "forceList.H"
#include "filmMomentumTransportModel.H"
@ -195,8 +195,8 @@ protected:
//- Available mass for transfer via sub-models
scalarField availableMass_;
//- Cloud injection
injectionModelList injection_;
//- Cloud ejection
ejectionModelList ejection_;
//- Transfer with the continuous phase
transferModelList transfer_;
@ -449,8 +449,8 @@ public:
//- Film thermo
inline const thermoModel& thermo() const;
//- Injection
inline injectionModelList& injection();
//- Ejection
inline ejectionModelList& ejection();
//- Transfer
inline transferModelList& transfer();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -201,9 +201,9 @@ inline const thermoModel& kinematicSingleLayer::thermo() const
}
inline injectionModelList& kinematicSingleLayer::injection()
inline ejectionModelList& kinematicSingleLayer::ejection()
{
return injection_;
return ejection_;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/
#include "BrunDrippingInjection.H"
#include "BrunDrippingEjection.H"
#include "addToRunTimeSelectionTable.H"
#include "kinematicSingleLayer.H"
@ -38,18 +38,18 @@ namespace surfaceFilmModels
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(BrunDrippingInjection, 0);
addToRunTimeSelectionTable(injectionModel, BrunDrippingInjection, dictionary);
defineTypeNameAndDebug(BrunDrippingEjection, 0);
addToRunTimeSelectionTable(ejectionModel, BrunDrippingEjection, dictionary);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
BrunDrippingInjection::BrunDrippingInjection
BrunDrippingEjection::BrunDrippingEjection
(
surfaceFilmRegionModel& film,
const dictionary& dict
)
:
injectionModel(type(), film, dict),
ejectionModel(type(), film, dict),
ubarStar_(coeffDict_.lookupOrDefault("ubarStar", 1.62208)),
dCoeff_(coeffDict_.lookupOrDefault("dCoeff", 3.3)),
deltaStable_(coeffDict_.lookupOrDefault("deltaStable", scalar(0))),
@ -59,17 +59,17 @@ BrunDrippingInjection::BrunDrippingInjection
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
BrunDrippingInjection::~BrunDrippingInjection()
BrunDrippingEjection::~BrunDrippingEjection()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void BrunDrippingInjection::correct
void BrunDrippingEjection::correct
(
scalarField& availableMass,
scalarField& massToInject,
scalarField& diameterToInject
scalarField& massToEject,
scalarField& diameterToEject
)
{
const kinematicSingleLayer& film =
@ -112,11 +112,11 @@ void BrunDrippingInjection::correct
const scalar diam = dCoeff_*lc;
diameter_[celli] = diam;
massToInject[celli] += massDrip;
massToEject[celli] += massDrip;
availableMass[celli] -= massDrip;
diameterToInject[celli] = diam;
addToInjectedMass(massDrip);
diameterToEject[celli] = diam;
addToEjectedMass(massDrip);
dripping = true;
}
@ -125,12 +125,12 @@ void BrunDrippingInjection::correct
if (!dripping)
{
diameterToInject[celli] = 0;
massToInject[celli] = 0;
diameterToEject[celli] = 0;
massToEject[celli] = 0;
}
}
injectionModel::correct();
ejectionModel::correct();
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::regionModels::surfaceFilmModels::BrunDrippingInjection
Foam::regionModels::surfaceFilmModels::BrunDrippingEjection
Description
Film Dripping mass transfer model.
@ -50,14 +50,14 @@ Description
\endverbatim
SourceFiles
BrunDrippingInjection.C
BrunDrippingEjection.C
\*---------------------------------------------------------------------------*/
#ifndef BrunDrippingInjection_H
#define BrunDrippingInjection_H
#ifndef BrunDrippingEjection_H
#define BrunDrippingEjection_H
#include "injectionModel.H"
#include "ejectionModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -69,12 +69,12 @@ namespace surfaceFilmModels
{
/*---------------------------------------------------------------------------*\
Class BrunDrippingInjection Declaration
Class BrunDrippingEjection Declaration
\*---------------------------------------------------------------------------*/
class BrunDrippingInjection
class BrunDrippingEjection
:
public injectionModel
public ejectionModel
{
protected:
@ -94,31 +94,31 @@ protected:
// exceeds this threshold value
scalar deltaStable_;
//- Diameters of particles to inject into the dripping
//- Diameters of particles to eject into the dripping
scalarList diameter_;
public:
//- Runtime type information
TypeName("BrunDrippingInjection");
TypeName("BrunDrippingEjection");
// Constructors
//- Construct from surface film model
BrunDrippingInjection
BrunDrippingEjection
(
surfaceFilmRegionModel& film,
const dictionary& dict
);
//- Disallow default bitwise copy construction
BrunDrippingInjection(const BrunDrippingInjection&) = delete;
BrunDrippingEjection(const BrunDrippingEjection&) = delete;
//- Destructor
virtual ~BrunDrippingInjection();
virtual ~BrunDrippingEjection();
// Member Functions
@ -127,15 +127,15 @@ public:
virtual void correct
(
scalarField& availableMass,
scalarField& massToInject,
scalarField& diameterToInject
scalarField& massToEject,
scalarField& diameterToEject
);
// Member Operators
//- Disallow default bitwise assignment
void operator=(const BrunDrippingInjection&) = delete;
void operator=(const BrunDrippingEjection&) = delete;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -42,7 +42,7 @@ namespace surfaceFilmModels
defineTypeNameAndDebug(curvatureSeparation, 0);
addToRunTimeSelectionTable
(
injectionModel,
ejectionModel,
curvatureSeparation,
dictionary
);
@ -175,7 +175,7 @@ curvatureSeparation::curvatureSeparation
const dictionary& dict
)
:
injectionModel(type(), film, dict),
ejectionModel(type(), film, dict),
gradNHat_(fvc::grad(film.nHat())),
deltaByR1Min_
(
@ -237,8 +237,8 @@ curvatureSeparation::~curvatureSeparation()
void curvatureSeparation::correct
(
scalarField& availableMass,
scalarField& massToInject,
scalarField& diameterToInject
scalarField& massToEject,
scalarField& diameterToEject
)
{
const kinematicSingleLayer& film =
@ -286,12 +286,12 @@ void curvatureSeparation::correct
}
}
// Inject all available mass
massToInject = separated*availableMass;
diameterToInject = separated*delta;
// Eject all available mass
massToEject = separated*availableMass;
diameterToEject = separated*delta;
availableMass -= separated*availableMass;
addToInjectedMass(sum(separated*availableMass));
addToEjectedMass(sum(separated*availableMass));
if (debug && mesh.time().writeTime())
{
@ -313,7 +313,7 @@ void curvatureSeparation::correct
volFnet.write();
}
injectionModel::correct();
ejectionModel::correct();
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,7 +48,7 @@ SourceFiles
#ifndef curvatureSeparation_H
#define curvatureSeparation_H
#include "injectionModel.H"
#include "ejectionModel.H"
#include "surfaceFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -66,7 +66,7 @@ namespace surfaceFilmModels
class curvatureSeparation
:
public injectionModel
public ejectionModel
{
protected:
@ -134,8 +134,8 @@ public:
virtual void correct
(
scalarField& availableMass,
scalarField& massToInject,
scalarField& diameterToInject
scalarField& massToEject,
scalarField& diameterToEject
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/
#include "drippingInjection.H"
#include "drippingEjection.H"
#include "addToRunTimeSelectionTable.H"
#include "fvMesh.H"
#include "Time.H"
@ -43,18 +43,18 @@ namespace surfaceFilmModels
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(drippingInjection, 0);
addToRunTimeSelectionTable(injectionModel, drippingInjection, dictionary);
defineTypeNameAndDebug(drippingEjection, 0);
addToRunTimeSelectionTable(ejectionModel, drippingEjection, dictionary);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
drippingInjection::drippingInjection
drippingEjection::drippingEjection
(
surfaceFilmRegionModel& film,
const dictionary& dict
)
:
injectionModel(type(), film, dict),
ejectionModel(type(), film, dict),
deltaStable_(coeffDict_.lookup<scalar>("deltaStable")),
particlesPerParcel_(coeffDict_.lookup<scalar>("particlesPerParcel")),
rndGen_(label(0)),
@ -72,17 +72,17 @@ drippingInjection::drippingInjection
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
drippingInjection::~drippingInjection()
drippingEjection::~drippingEjection()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void drippingInjection::correct
void drippingEjection::correct
(
scalarField& availableMass,
scalarField& massToInject,
scalarField& diameterToInject
scalarField& massToEject,
scalarField& diameterToEject
)
{
const kinematicSingleLayer& film =
@ -127,33 +127,33 @@ void drippingInjection::correct
if (massDrip[celli] > minMass)
{
// All drip mass can be injected
massToInject[celli] += massDrip[celli];
// All drip mass can be ejected
massToEject[celli] += massDrip[celli];
availableMass[celli] -= massDrip[celli];
// Set particle diameter
diameterToInject[celli] = diam;
diameterToEject[celli] = diam;
// Retrieve new particle diameter sample
diam = parcelDistribution_->sample();
addToInjectedMass(massDrip[celli]);
addToEjectedMass(massDrip[celli]);
}
else
{
// Particle mass below minimum threshold - cannot be injected
massToInject[celli] = 0.0;
diameterToInject[celli] = 0.0;
// Particle mass below minimum threshold - cannot be ejected
massToEject[celli] = 0.0;
diameterToEject[celli] = 0.0;
}
}
else
{
massToInject[celli] = 0.0;
diameterToInject[celli] = 0.0;
massToEject[celli] = 0.0;
diameterToEject[celli] = 0.0;
}
}
injectionModel::correct();
ejectionModel::correct();
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::regionModels::surfaceFilmModels::drippingInjection
Foam::regionModels::surfaceFilmModels::drippingEjection
Description
Film Dripping mass transfer model.
@ -33,14 +33,14 @@ Description
New parcel diameters are sampled from a PDF.
SourceFiles
drippingInjection.C
drippingEjection.C
\*---------------------------------------------------------------------------*/
#ifndef drippingInjection_H
#define drippingInjection_H
#ifndef drippingEjection_H
#define drippingEjection_H
#include "injectionModel.H"
#include "ejectionModel.H"
#include "distributionModel.H"
#include "Random.H"
@ -54,12 +54,12 @@ namespace surfaceFilmModels
{
/*---------------------------------------------------------------------------*\
Class drippingInjection Declaration
Class drippingEjection Declaration
\*---------------------------------------------------------------------------*/
class drippingInjection
class drippingEjection
:
public injectionModel
public ejectionModel
{
protected:
@ -79,31 +79,31 @@ protected:
const autoPtr<distributionModel>
parcelDistribution_;
//- Diameters of particles to inject into the dripping
//- Diameters of particles to eject into the dripping
scalarList diameter_;
public:
//- Runtime type information
TypeName("drippingInjection");
TypeName("drippingEjection");
// Constructors
//- Construct from surface film model
drippingInjection
drippingEjection
(
surfaceFilmRegionModel& film,
const dictionary& dict
);
//- Disallow default bitwise copy construction
drippingInjection(const drippingInjection&) = delete;
drippingEjection(const drippingEjection&) = delete;
//- Destructor
virtual ~drippingInjection();
virtual ~drippingEjection();
// Member Functions
@ -114,15 +114,15 @@ public:
virtual void correct
(
scalarField& availableMass,
scalarField& massToInject,
scalarField& diameterToInject
scalarField& massToEject,
scalarField& diameterToEject
);
// Member Operators
//- Disallow default bitwise assignment
void operator=(const drippingInjection&) = delete;
void operator=(const drippingEjection&) = delete;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/
#include "injectionModel.H"
#include "ejectionModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -36,27 +36,27 @@ namespace surfaceFilmModels
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(injectionModel, 0);
defineRunTimeSelectionTable(injectionModel, dictionary);
defineTypeNameAndDebug(ejectionModel, 0);
defineRunTimeSelectionTable(ejectionModel, dictionary);
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void injectionModel::addToInjectedMass(const scalar dMass)
void ejectionModel::addToEjectedMass(const scalar dMass)
{
injectedMass_ += dMass;
ejectedMass_ += dMass;
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
injectionModel::injectionModel(surfaceFilmRegionModel& film)
ejectionModel::ejectionModel(surfaceFilmRegionModel& film)
:
filmSubModelBase(film),
injectedMass_(0.0)
ejectedMass_(0.0)
{}
injectionModel::injectionModel
ejectionModel::ejectionModel
(
const word& modelType,
surfaceFilmRegionModel& film,
@ -64,34 +64,34 @@ injectionModel::injectionModel
)
:
filmSubModelBase(film, dict, typeName, modelType),
injectedMass_(0.0)
ejectedMass_(0.0)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
injectionModel::~injectionModel()
ejectionModel::~ejectionModel()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void injectionModel::correct()
void ejectionModel::correct()
{
if (writeTime())
{
scalar injectedMass0 = getModelProperty<scalar>("injectedMass");
injectedMass0 += returnReduce(injectedMass_, sumOp<scalar>());
setModelProperty<scalar>("injectedMass", injectedMass0);
injectedMass_ = 0.0;
scalar ejectedMass0 = getModelProperty<scalar>("ejectedMass");
ejectedMass0 += returnReduce(ejectedMass_, sumOp<scalar>());
setModelProperty<scalar>("ejectedMass", ejectedMass0);
ejectedMass_ = 0.0;
}
}
scalar injectionModel::injectedMassTotal() const
scalar ejectionModel::ejectedMassTotal() const
{
scalar injectedMass0 = getModelProperty<scalar>("injectedMass");
return injectedMass0 + returnReduce(injectedMass_, sumOp<scalar>());
scalar ejectedMass0 = getModelProperty<scalar>("ejectedMass");
return ejectedMass0 + returnReduce(ejectedMass_, sumOp<scalar>());
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -22,20 +22,20 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::regionModels::surfaceFilmModels::injectionModel
Foam::regionModels::surfaceFilmModels::ejectionModel
Description
Base class for film injection models, handling mass transfer from the
Base class for film ejection models, handling mass transfer from the
film.
SourceFiles
injectionModel.C
injectionModelNew.C
ejectionModel.C
ejectionModelNew.C
\*---------------------------------------------------------------------------*/
#ifndef injectionModel_H
#define injectionModel_H
#ifndef ejectionModel_H
#define ejectionModel_H
#include "filmSubModelBase.H"
#include "runTimeSelectionTables.H"
@ -51,25 +51,25 @@ namespace surfaceFilmModels
{
/*---------------------------------------------------------------------------*\
Class injectionModel Declaration
Class ejectionModel Declaration
\*---------------------------------------------------------------------------*/
class injectionModel
class ejectionModel
:
public filmSubModelBase
{
// Private Data
//- Injected mass
scalar injectedMass_;
//- Ejected mass
scalar ejectedMass_;
protected:
// Protected Member Functions
//- Add to injected mass
void addToInjectedMass(const scalar dMass);
//- Add to ejected mass
void addToEjectedMass(const scalar dMass);
//- Correct
void correct();
@ -78,7 +78,7 @@ protected:
public:
//- Runtime type information
TypeName("injectionModel");
TypeName("ejectionModel");
// Declare runtime constructor selection table
@ -86,7 +86,7 @@ public:
declareRunTimeSelectionTable
(
autoPtr,
injectionModel,
ejectionModel,
dictionary,
(
surfaceFilmRegionModel& film,
@ -99,10 +99,10 @@ public:
// Constructors
//- Construct null
injectionModel(surfaceFilmRegionModel& film);
ejectionModel(surfaceFilmRegionModel& film);
//- Construct from type name, dictionary and surface film model
injectionModel
ejectionModel
(
const word& modelType,
surfaceFilmRegionModel& film,
@ -110,13 +110,13 @@ public:
);
//- Disallow default bitwise copy construction
injectionModel(const injectionModel&) = delete;
ejectionModel(const ejectionModel&) = delete;
// Selectors
//- Return a reference to the selected injection model
static autoPtr<injectionModel> New
//- Return a reference to the selected ejection model
static autoPtr<ejectionModel> New
(
surfaceFilmRegionModel& film,
const dictionary& dict,
@ -125,7 +125,7 @@ public:
//- Destructor
virtual ~injectionModel();
virtual ~ejectionModel();
// Member Functions
@ -134,23 +134,23 @@ public:
virtual void correct
(
scalarField& availableMass,
scalarField& massToInject,
scalarField& diameterToInject
scalarField& massToEject,
scalarField& diameterToEject
) = 0;
//- Return the total mass injected
virtual scalar injectedMassTotal() const;
//- Return the total mass ejected
virtual scalar ejectedMassTotal() const;
//- Accumulate the total mass injected for the patches into the
//- Accumulate the total mass ejected for the patches into the
// scalarField provided
virtual void patchInjectedMassTotals(scalarField& patchMasses) const
virtual void patchEjectedMassTotals(scalarField& patchMasses) const
{}
// Member Operators
//- Disallow default bitwise assignment
void operator=(const injectionModel&) = delete;
void operator=(const ejectionModel&) = delete;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/
#include "injectionModel.H"
#include "ejectionModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -36,7 +36,7 @@ namespace surfaceFilmModels
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
autoPtr<injectionModel> injectionModel::New
autoPtr<ejectionModel> ejectionModel::New
(
surfaceFilmRegionModel& model,
const dictionary& dict,
@ -51,13 +51,13 @@ autoPtr<injectionModel> injectionModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorInFunction
<< "Unknown injectionModel type " << modelType
<< nl << nl << "Valid injectionModel types are:" << nl
<< "Unknown ejectionModel type " << modelType
<< nl << nl << "Valid ejectionModel types are:" << nl
<< dictionaryConstructorTablePtr_->toc()
<< exit(FatalError);
}
return autoPtr<injectionModel>(cstrIter()(model, dict));
return autoPtr<ejectionModel>(cstrIter()(model, dict));
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/
#include "injectionModelList.H"
#include "ejectionModelList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -36,62 +36,62 @@ namespace surfaceFilmModels
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
injectionModelList::injectionModelList(surfaceFilmRegionModel& film)
ejectionModelList::ejectionModelList(surfaceFilmRegionModel& film)
:
PtrList<injectionModel>(),
PtrList<ejectionModel>(),
filmSubModelBase(film)
{}
injectionModelList::injectionModelList
ejectionModelList::ejectionModelList
(
surfaceFilmRegionModel& film,
const dictionary& dict
)
:
PtrList<injectionModel>(),
PtrList<ejectionModel>(),
filmSubModelBase
(
"injectionModelList",
"ejectionModelList",
film,
dict,
"injectionModelList",
"injectionModelList"
"ejectionModelList",
"ejectionModelList"
),
massInjected_(film.intCoupledPatchIDs().size(), 0.0)
massEjected_(film.intCoupledPatchIDs().size(), 0.0)
{
Info<< " Selecting film injection" << endl;
Info<< " Selecting film ejection" << endl;
if (dict.isDict("injection"))
if (dict.isDict("ejection"))
{
const dictionary& injectionDict(dict.subDict("injection"));
this->setSize(injectionDict.size());
const dictionary& ejectionDict(dict.subDict("ejection"));
this->setSize(ejectionDict.size());
label i = 0;
forAllConstIter(dictionary, injectionDict, iter)
forAllConstIter(dictionary, ejectionDict, iter)
{
set
(
i++,
injectionModel::New
ejectionModel::New
(
film,
injectionDict.isDict(iter().keyword())
? injectionDict.subDict(iter().keyword())
ejectionDict.isDict(iter().keyword())
? ejectionDict.subDict(iter().keyword())
: dictionary::null,
iter().keyword()
)
);
}
}
else if (dict.found("injectionModels"))
else if (dict.found("ejectionModels"))
{
const wordList models(dict.lookup("injectionModels"));
const wordList models(dict.lookup("ejectionModels"));
this->setSize(models.size());
forAll(models, i)
{
set(i, injectionModel::New(film, dict, models[i]));
set(i, ejectionModel::New(film, dict, models[i]));
}
}
@ -104,47 +104,47 @@ injectionModelList::injectionModelList
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
injectionModelList::~injectionModelList()
ejectionModelList::~ejectionModelList()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void injectionModelList::correct
void ejectionModelList::correct
(
scalarField& availableMass,
volScalarField& massToInject,
volScalarField& diameterToInject
volScalarField& massToEject,
volScalarField& diameterToEject
)
{
// Correct models that accumulate mass and diameter transfers
forAll(*this, i)
{
injectionModel& im = operator[](i);
im.correct(availableMass, massToInject, diameterToInject);
ejectionModel& im = operator[](i);
im.correct(availableMass, massToEject, diameterToEject);
}
// Push values to boundaries ready for transfer to the primary region
massToInject.correctBoundaryConditions();
diameterToInject.correctBoundaryConditions();
massToEject.correctBoundaryConditions();
diameterToEject.correctBoundaryConditions();
const labelList& patchIDs = film().intCoupledPatchIDs();
forAll(patchIDs, i)
{
label patchi = patchIDs[i];
massInjected_[i] =
massInjected_[i] + sum(massToInject.boundaryField()[patchi]);
massEjected_[i] =
massEjected_[i] + sum(massToEject.boundaryField()[patchi]);
}
}
void injectionModelList::info(Ostream& os)
void ejectionModelList::info(Ostream& os)
{
const polyBoundaryMesh& pbm = film().regionMesh().boundaryMesh();
scalar injectedMass = 0;
scalarField patchInjectedMasses
scalar ejectedMass = 0;
scalarField patchEjectedMasses
(
pbm.size() - film().regionMesh().globalData().processorPatches().size(),
0
@ -152,26 +152,26 @@ void injectionModelList::info(Ostream& os)
forAll(*this, i)
{
const injectionModel& im = operator[](i);
injectedMass += im.injectedMassTotal();
im.patchInjectedMassTotals(patchInjectedMasses);
const ejectionModel& im = operator[](i);
ejectedMass += im.ejectedMassTotal();
im.patchEjectedMassTotals(patchEjectedMasses);
}
os << indent << "injected mass = " << injectedMass << nl;
os << indent << "ejected mass = " << ejectedMass << nl;
forAll(patchInjectedMasses, patchi)
forAll(patchEjectedMasses, patchi)
{
if (mag(patchInjectedMasses[patchi]) > vSmall)
if (mag(patchEjectedMasses[patchi]) > vSmall)
{
os << indent << indent << "from patch " << pbm[patchi].name()
<< " = " << patchInjectedMasses[patchi] << nl;
<< " = " << patchEjectedMasses[patchi] << nl;
}
}
scalarField mass0(massInjected_.size(), 0);
this->getBaseProperty("massInjected", mass0);
scalarField mass0(massEjected_.size(), 0);
this->getBaseProperty("massEjected", mass0);
scalarField mass(massInjected_);
scalarField mass(massEjected_);
Pstream::listCombineGather(mass, plusEqOp<scalar>());
mass += mass0;
@ -186,8 +186,8 @@ void injectionModelList::info(Ostream& os)
if (film().time().writeTime())
{
setBaseProperty("massInjected", mass);
massInjected_ = 0.0;
setBaseProperty("massEjected", mass);
massEjected_ = 0.0;
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -22,21 +22,21 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::regionModels::surfaceFilmModels::injectionModelList
Foam::regionModels::surfaceFilmModels::ejectionModelList
Description
List container for film injection models
List container for film ejection models
SourceFiles
injectionModelList.C
ejectionModelList.C
\*---------------------------------------------------------------------------*/
#ifndef injectionModelList_H
#define injectionModelList_H
#ifndef ejectionModelList_H
#define ejectionModelList_H
#include "PtrList.H"
#include "injectionModel.H"
#include "ejectionModel.H"
#include "filmSubModelBase.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -49,18 +49,18 @@ namespace surfaceFilmModels
{
/*---------------------------------------------------------------------------*\
Class injectionModelList Declaration
Class ejectionModelList Declaration
\*---------------------------------------------------------------------------*/
class injectionModelList
class ejectionModelList
:
public PtrList<injectionModel>,
public PtrList<ejectionModel>,
public filmSubModelBase
{
// Private Data
//- List of mass injected per patch
scalarField massInjected_;
//- List of mass ejected per patch
scalarField massEjected_;
public:
@ -68,21 +68,21 @@ public:
// Constructors
//- Construct null
injectionModelList(surfaceFilmRegionModel& film);
ejectionModelList(surfaceFilmRegionModel& film);
//- Construct from type name, dictionary and surface film model
injectionModelList
ejectionModelList
(
surfaceFilmRegionModel& film,
const dictionary& dict
);
//- Disallow default bitwise copy construction
injectionModelList(const injectionModelList&) = delete;
ejectionModelList(const ejectionModelList&) = delete;
//- Destructor
virtual ~injectionModelList();
virtual ~ejectionModelList();
// Member Functions
@ -93,8 +93,8 @@ public:
virtual void correct
(
scalarField& availableMass,
volScalarField& massToInject,
volScalarField& diameterToInject
volScalarField& massToEject,
volScalarField& diameterToEject
);
@ -107,7 +107,7 @@ public:
// Member Operators
//- Disallow default bitwise assignment
void operator=(const injectionModelList&) = delete;
void operator=(const ejectionModelList&) = delete;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/
#include "patchInjection.H"
#include "patchEjection.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -37,18 +37,18 @@ namespace surfaceFilmModels
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(patchInjection, 0);
addToRunTimeSelectionTable(injectionModel, patchInjection, dictionary);
defineTypeNameAndDebug(patchEjection, 0);
addToRunTimeSelectionTable(ejectionModel, patchEjection, dictionary);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
patchInjection::patchInjection
patchEjection::patchEjection
(
surfaceFilmRegionModel& film,
const dictionary& dict
)
:
injectionModel(type(), film, dict),
ejectionModel(type(), film, dict),
deltaStable_(coeffDict_.lookupOrDefault<scalar>("deltaStable", 0.0))
{
const polyBoundaryMesh& pbm = film.regionMesh().boundaryMesh();
@ -72,7 +72,7 @@ patchInjection::patchInjection
Info<< " " << pbm[patchi].name() << endl;
}
patchIDs_.setSize(pidi);
patchInjectedMasses_.setSize(pidi, 0);
patchEjectedMasses_.setSize(pidi, 0);
}
else
{
@ -83,7 +83,7 @@ patchInjection::patchInjection
patchIDs_[patchi] = patchi;
}
patchInjectedMasses_.setSize(patchIDs_.size(), 0);
patchEjectedMasses_.setSize(patchIDs_.size(), 0);
}
if (!patchIDs_.size())
@ -97,17 +97,17 @@ patchInjection::patchInjection
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
patchInjection::~patchInjection()
patchEjection::~patchEjection()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void patchInjection::correct
void patchEjection::correct
(
scalarField& availableMass,
scalarField& massToInject,
scalarField& diameterToInject
scalarField& massToEject,
scalarField& diameterToEject
)
{
// Do not correct if no patches selected
@ -134,65 +134,65 @@ void patchInjection::correct
scalar ddelta = max(0.0, delta[celli] - deltaStable_);
scalar dMass = ddelta*rho[celli]*magSf[celli];
massToInject[celli] += dMass;
massToEject[celli] += dMass;
availableMass[celli] -= dMass;
dMassPatch += dMass;
}
patchInjectedMasses_[pidi] += dMassPatch;
addToInjectedMass(dMassPatch);
patchEjectedMasses_[pidi] += dMassPatch;
addToEjectedMass(dMassPatch);
}
injectionModel::correct();
ejectionModel::correct();
if (writeTime())
{
scalarField patchInjectedMasses0
scalarField patchEjectedMasses0
(
getModelProperty<scalarField>
(
"patchInjectedMasses",
scalarField(patchInjectedMasses_.size(), 0)
"patchEjectedMasses",
scalarField(patchEjectedMasses_.size(), 0)
)
);
scalarField patchInjectedMassTotals(patchInjectedMasses_);
Pstream::listCombineGather(patchInjectedMassTotals, plusEqOp<scalar>());
patchInjectedMasses0 += patchInjectedMassTotals;
scalarField patchEjectedMassTotals(patchEjectedMasses_);
Pstream::listCombineGather(patchEjectedMassTotals, plusEqOp<scalar>());
patchEjectedMasses0 += patchEjectedMassTotals;
setModelProperty<scalarField>
(
"patchInjectedMasses",
patchInjectedMasses0
"patchEjectedMasses",
patchEjectedMasses0
);
patchInjectedMasses_ = 0;
patchEjectedMasses_ = 0;
}
}
void patchInjection::patchInjectedMassTotals(scalarField& patchMasses) const
void patchEjection::patchEjectedMassTotals(scalarField& patchMasses) const
{
// Do not correct if no patches selected
if (!patchIDs_.size()) return;
scalarField patchInjectedMasses
scalarField patchEjectedMasses
(
getModelProperty<scalarField>
(
"patchInjectedMasses",
scalarField(patchInjectedMasses_.size(), 0)
"patchEjectedMasses",
scalarField(patchEjectedMasses_.size(), 0)
)
);
scalarField patchInjectedMassTotals(patchInjectedMasses_);
Pstream::listCombineGather(patchInjectedMassTotals, plusEqOp<scalar>());
scalarField patchEjectedMassTotals(patchEjectedMasses_);
Pstream::listCombineGather(patchEjectedMassTotals, plusEqOp<scalar>());
forAll(patchIDs_, pidi)
{
label patchi = patchIDs_[pidi];
patchMasses[patchi] +=
patchInjectedMasses[pidi] + patchInjectedMassTotals[pidi];
patchEjectedMasses[pidi] + patchEjectedMassTotals[pidi];
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -22,21 +22,21 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::regionModels::surfaceFilmModels::patchInjection
Foam::regionModels::surfaceFilmModels::patchEjection
Description
Remove and inject the mass in the film as it passes over the selected
Remove and eject the mass in the film as it passes over the selected
patches.
SourceFiles
patchInjection.C
patchEjection.C
\*---------------------------------------------------------------------------*/
#ifndef patchInjection_H
#define patchInjection_H
#ifndef patchEjection_H
#define patchEjection_H
#include "injectionModel.H"
#include "ejectionModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -48,12 +48,12 @@ namespace surfaceFilmModels
{
/*---------------------------------------------------------------------------*\
Class patchInjection Declaration
Class patchEjection Declaration
\*---------------------------------------------------------------------------*/
class patchInjection
class patchEjection
:
public injectionModel
public ejectionModel
{
protected:
@ -64,27 +64,27 @@ protected:
//- List of patch IDs at which the film is removed
labelList patchIDs_;
//- Injected mass for each patch at which the film is removed
scalarField patchInjectedMasses_;
//- Ejected mass for each patch at which the film is removed
scalarField patchEjectedMasses_;
public:
//- Runtime type information
TypeName("patchInjection");
TypeName("patchEjection");
// Constructors
//- Construct from surface film model
patchInjection(surfaceFilmRegionModel& film, const dictionary& dict);
patchEjection(surfaceFilmRegionModel& film, const dictionary& dict);
//- Disallow default bitwise copy construction
patchInjection(const patchInjection&) = delete;
patchEjection(const patchEjection&) = delete;
//- Destructor
virtual ~patchInjection();
virtual ~patchEjection();
// Member Functions
@ -93,13 +93,13 @@ public:
virtual void correct
(
scalarField& availableMass,
scalarField& massToInject,
scalarField& diameterToInject
scalarField& massToEject,
scalarField& diameterToEject
);
//- Accumulate the total mass injected for the patches into the
//- Accumulate the total mass ejected for the patches into the
// scalarField provided
virtual void patchInjectedMassTotals
virtual void patchEjectedMassTotals
(
scalarField& patchMasses
) const;
@ -108,7 +108,7 @@ public:
// Member Operators
//- Disallow default bitwise assignment
void operator=(const patchInjection&) = delete;
void operator=(const patchEjection&) = delete;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -97,7 +97,7 @@ public:
// Selectors
//- Return a reference to the selected injection model
//- Return a reference to the selected ejection model
static autoPtr<momentumTransportModel> New
(
surfaceFilmRegionModel& film,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -115,7 +115,7 @@ public:
// Selectors
//- Return a reference to the selected injection model
//- Return a reference to the selected ejection model
static autoPtr<transferModel> New
(
surfaceFilmRegionModel& film,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -229,8 +229,8 @@ void thermoSingleLayer::updateSubmodels()
// Update radiation
radiation_->correct();
// Update injection model - mass returned is mass available for injection
injection_.correct(availableMass_, cloudMassTrans_, cloudDiameterTrans_);
// Update ejection model - mass returned is mass available for ejection
ejection_.correct(availableMass_, cloudMassTrans_, cloudDiameterTrans_);
phaseChange_->correct
(

View File

@ -65,7 +65,7 @@ forces
}
}
injection
ejection
{
curvatureSeparation
{
@ -75,7 +75,7 @@ injection
);
}
drippingInjection
drippingEjection
{
cloudName reactingCloud1;
deltaStable 0;