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:
@ -20,13 +20,13 @@ $(KINEMATICMODELS)/force/contactAngleForces/temperatureDependent/temperatureDepe
|
|||||||
$(KINEMATICMODELS)/force/contactAngleForces/perturbedTemperatureDependent/perturbedTemperatureDependentContactAngleForce.C
|
$(KINEMATICMODELS)/force/contactAngleForces/perturbedTemperatureDependent/perturbedTemperatureDependentContactAngleForce.C
|
||||||
$(KINEMATICMODELS)/force/thermocapillaryForce/thermocapillaryForce.C
|
$(KINEMATICMODELS)/force/thermocapillaryForce/thermocapillaryForce.C
|
||||||
|
|
||||||
$(KINEMATICMODELS)/injectionModel/injectionModel/injectionModel.C
|
$(KINEMATICMODELS)/ejectionModel/ejectionModel/ejectionModel.C
|
||||||
$(KINEMATICMODELS)/injectionModel/injectionModel/injectionModelNew.C
|
$(KINEMATICMODELS)/ejectionModel/ejectionModel/ejectionModelNew.C
|
||||||
$(KINEMATICMODELS)/injectionModel/injectionModelList/injectionModelList.C
|
$(KINEMATICMODELS)/ejectionModel/ejectionModelList/ejectionModelList.C
|
||||||
$(KINEMATICMODELS)/injectionModel/drippingInjection/drippingInjection.C
|
$(KINEMATICMODELS)/ejectionModel/drippingEjection/drippingEjection.C
|
||||||
$(KINEMATICMODELS)/injectionModel/BrunDrippingInjection/BrunDrippingInjection.C
|
$(KINEMATICMODELS)/ejectionModel/BrunDrippingEjection/BrunDrippingEjection.C
|
||||||
$(KINEMATICMODELS)/injectionModel/patchInjection/patchInjection.C
|
$(KINEMATICMODELS)/ejectionModel/patchEjection/patchEjection.C
|
||||||
$(KINEMATICMODELS)/injectionModel/curvatureSeparation/curvatureSeparation.C
|
$(KINEMATICMODELS)/ejectionModel/curvatureSeparation/curvatureSeparation.C
|
||||||
|
|
||||||
$(KINEMATICMODELS)/transferModels/transferModel/transferModel.C
|
$(KINEMATICMODELS)/transferModels/transferModel/transferModel.C
|
||||||
$(KINEMATICMODELS)/transferModels/transferModel/transferModelNew.C
|
$(KINEMATICMODELS)/transferModels/transferModel/transferModelNew.C
|
||||||
|
|||||||
@ -206,8 +206,8 @@ void kinematicSingleLayer::updateSubmodels()
|
|||||||
{
|
{
|
||||||
DebugInFunction << endl;
|
DebugInFunction << endl;
|
||||||
|
|
||||||
// Update injection model - mass returned is mass available for injection
|
// Update ejection model - mass returned is mass available for ejection
|
||||||
injection_.correct(availableMass_, cloudMassTrans_, cloudDiameterTrans_);
|
ejection_.correct(availableMass_, cloudMassTrans_, cloudDiameterTrans_);
|
||||||
|
|
||||||
// Update transfer model - mass returned is mass available for transfer
|
// Update transfer model - mass returned is mass available for transfer
|
||||||
transfer_.correct(availableMass_, cloudMassTrans_);
|
transfer_.correct(availableMass_, cloudMassTrans_);
|
||||||
@ -832,7 +832,7 @@ kinematicSingleLayer::kinematicSingleLayer
|
|||||||
|
|
||||||
availableMass_(regionMesh().nCells(), 0),
|
availableMass_(regionMesh().nCells(), 0),
|
||||||
|
|
||||||
injection_(*this, coeffs_),
|
ejection_(*this, coeffs_),
|
||||||
|
|
||||||
transfer_(*this, coeffs_),
|
transfer_(*this, coeffs_),
|
||||||
|
|
||||||
@ -1017,7 +1017,7 @@ void kinematicSingleLayer::info()
|
|||||||
<< indent << "coverage = "
|
<< indent << "coverage = "
|
||||||
<< gSum(coverage_.primitiveField()*magSf())/gSum(magSf()) << nl;
|
<< gSum(coverage_.primitiveField()*magSf())/gSum(magSf()) << nl;
|
||||||
|
|
||||||
injection_.info(Info);
|
ejection_.info(Info);
|
||||||
transfer_.info(Info);
|
transfer_.info(Info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -42,7 +42,7 @@ SourceFiles
|
|||||||
#include "fvMatrices.H"
|
#include "fvMatrices.H"
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
|
|
||||||
#include "injectionModelList.H"
|
#include "ejectionModelList.H"
|
||||||
#include "transferModelList.H"
|
#include "transferModelList.H"
|
||||||
#include "forceList.H"
|
#include "forceList.H"
|
||||||
#include "filmMomentumTransportModel.H"
|
#include "filmMomentumTransportModel.H"
|
||||||
@ -195,8 +195,8 @@ protected:
|
|||||||
//- Available mass for transfer via sub-models
|
//- Available mass for transfer via sub-models
|
||||||
scalarField availableMass_;
|
scalarField availableMass_;
|
||||||
|
|
||||||
//- Cloud injection
|
//- Cloud ejection
|
||||||
injectionModelList injection_;
|
ejectionModelList ejection_;
|
||||||
|
|
||||||
//- Transfer with the continuous phase
|
//- Transfer with the continuous phase
|
||||||
transferModelList transfer_;
|
transferModelList transfer_;
|
||||||
@ -449,8 +449,8 @@ public:
|
|||||||
//- Film thermo
|
//- Film thermo
|
||||||
inline const thermoModel& thermo() const;
|
inline const thermoModel& thermo() const;
|
||||||
|
|
||||||
//- Injection
|
//- Ejection
|
||||||
inline injectionModelList& injection();
|
inline ejectionModelList& ejection();
|
||||||
|
|
||||||
//- Transfer
|
//- Transfer
|
||||||
inline transferModelList& transfer();
|
inline transferModelList& transfer();
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -201,9 +201,9 @@ inline const thermoModel& kinematicSingleLayer::thermo() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline injectionModelList& kinematicSingleLayer::injection()
|
inline ejectionModelList& kinematicSingleLayer::ejection()
|
||||||
{
|
{
|
||||||
return injection_;
|
return ejection_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "BrunDrippingInjection.H"
|
#include "BrunDrippingEjection.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "kinematicSingleLayer.H"
|
#include "kinematicSingleLayer.H"
|
||||||
|
|
||||||
@ -38,18 +38,18 @@ namespace surfaceFilmModels
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
defineTypeNameAndDebug(BrunDrippingInjection, 0);
|
defineTypeNameAndDebug(BrunDrippingEjection, 0);
|
||||||
addToRunTimeSelectionTable(injectionModel, BrunDrippingInjection, dictionary);
|
addToRunTimeSelectionTable(ejectionModel, BrunDrippingEjection, dictionary);
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
BrunDrippingInjection::BrunDrippingInjection
|
BrunDrippingEjection::BrunDrippingEjection
|
||||||
(
|
(
|
||||||
surfaceFilmRegionModel& film,
|
surfaceFilmRegionModel& film,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
injectionModel(type(), film, dict),
|
ejectionModel(type(), film, dict),
|
||||||
ubarStar_(coeffDict_.lookupOrDefault("ubarStar", 1.62208)),
|
ubarStar_(coeffDict_.lookupOrDefault("ubarStar", 1.62208)),
|
||||||
dCoeff_(coeffDict_.lookupOrDefault("dCoeff", 3.3)),
|
dCoeff_(coeffDict_.lookupOrDefault("dCoeff", 3.3)),
|
||||||
deltaStable_(coeffDict_.lookupOrDefault("deltaStable", scalar(0))),
|
deltaStable_(coeffDict_.lookupOrDefault("deltaStable", scalar(0))),
|
||||||
@ -59,17 +59,17 @@ BrunDrippingInjection::BrunDrippingInjection
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
BrunDrippingInjection::~BrunDrippingInjection()
|
BrunDrippingEjection::~BrunDrippingEjection()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void BrunDrippingInjection::correct
|
void BrunDrippingEjection::correct
|
||||||
(
|
(
|
||||||
scalarField& availableMass,
|
scalarField& availableMass,
|
||||||
scalarField& massToInject,
|
scalarField& massToEject,
|
||||||
scalarField& diameterToInject
|
scalarField& diameterToEject
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const kinematicSingleLayer& film =
|
const kinematicSingleLayer& film =
|
||||||
@ -112,11 +112,11 @@ void BrunDrippingInjection::correct
|
|||||||
const scalar diam = dCoeff_*lc;
|
const scalar diam = dCoeff_*lc;
|
||||||
diameter_[celli] = diam;
|
diameter_[celli] = diam;
|
||||||
|
|
||||||
massToInject[celli] += massDrip;
|
massToEject[celli] += massDrip;
|
||||||
availableMass[celli] -= massDrip;
|
availableMass[celli] -= massDrip;
|
||||||
|
|
||||||
diameterToInject[celli] = diam;
|
diameterToEject[celli] = diam;
|
||||||
addToInjectedMass(massDrip);
|
addToEjectedMass(massDrip);
|
||||||
|
|
||||||
dripping = true;
|
dripping = true;
|
||||||
}
|
}
|
||||||
@ -125,12 +125,12 @@ void BrunDrippingInjection::correct
|
|||||||
|
|
||||||
if (!dripping)
|
if (!dripping)
|
||||||
{
|
{
|
||||||
diameterToInject[celli] = 0;
|
diameterToEject[celli] = 0;
|
||||||
massToInject[celli] = 0;
|
massToEject[celli] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
injectionModel::correct();
|
ejectionModel::correct();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::regionModels::surfaceFilmModels::BrunDrippingInjection
|
Foam::regionModels::surfaceFilmModels::BrunDrippingEjection
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Film Dripping mass transfer model.
|
Film Dripping mass transfer model.
|
||||||
@ -50,14 +50,14 @@ Description
|
|||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
BrunDrippingInjection.C
|
BrunDrippingEjection.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef BrunDrippingInjection_H
|
#ifndef BrunDrippingEjection_H
|
||||||
#define BrunDrippingInjection_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:
|
protected:
|
||||||
|
|
||||||
@ -94,31 +94,31 @@ protected:
|
|||||||
// exceeds this threshold value
|
// exceeds this threshold value
|
||||||
scalar deltaStable_;
|
scalar deltaStable_;
|
||||||
|
|
||||||
//- Diameters of particles to inject into the dripping
|
//- Diameters of particles to eject into the dripping
|
||||||
scalarList diameter_;
|
scalarList diameter_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("BrunDrippingInjection");
|
TypeName("BrunDrippingEjection");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from surface film model
|
//- Construct from surface film model
|
||||||
BrunDrippingInjection
|
BrunDrippingEjection
|
||||||
(
|
(
|
||||||
surfaceFilmRegionModel& film,
|
surfaceFilmRegionModel& film,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Disallow default bitwise copy construction
|
//- Disallow default bitwise copy construction
|
||||||
BrunDrippingInjection(const BrunDrippingInjection&) = delete;
|
BrunDrippingEjection(const BrunDrippingEjection&) = delete;
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~BrunDrippingInjection();
|
virtual ~BrunDrippingEjection();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -127,15 +127,15 @@ public:
|
|||||||
virtual void correct
|
virtual void correct
|
||||||
(
|
(
|
||||||
scalarField& availableMass,
|
scalarField& availableMass,
|
||||||
scalarField& massToInject,
|
scalarField& massToEject,
|
||||||
scalarField& diameterToInject
|
scalarField& diameterToEject
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const BrunDrippingInjection&) = delete;
|
void operator=(const BrunDrippingEjection&) = delete;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -42,7 +42,7 @@ namespace surfaceFilmModels
|
|||||||
defineTypeNameAndDebug(curvatureSeparation, 0);
|
defineTypeNameAndDebug(curvatureSeparation, 0);
|
||||||
addToRunTimeSelectionTable
|
addToRunTimeSelectionTable
|
||||||
(
|
(
|
||||||
injectionModel,
|
ejectionModel,
|
||||||
curvatureSeparation,
|
curvatureSeparation,
|
||||||
dictionary
|
dictionary
|
||||||
);
|
);
|
||||||
@ -175,7 +175,7 @@ curvatureSeparation::curvatureSeparation
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
injectionModel(type(), film, dict),
|
ejectionModel(type(), film, dict),
|
||||||
gradNHat_(fvc::grad(film.nHat())),
|
gradNHat_(fvc::grad(film.nHat())),
|
||||||
deltaByR1Min_
|
deltaByR1Min_
|
||||||
(
|
(
|
||||||
@ -237,8 +237,8 @@ curvatureSeparation::~curvatureSeparation()
|
|||||||
void curvatureSeparation::correct
|
void curvatureSeparation::correct
|
||||||
(
|
(
|
||||||
scalarField& availableMass,
|
scalarField& availableMass,
|
||||||
scalarField& massToInject,
|
scalarField& massToEject,
|
||||||
scalarField& diameterToInject
|
scalarField& diameterToEject
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const kinematicSingleLayer& film =
|
const kinematicSingleLayer& film =
|
||||||
@ -286,12 +286,12 @@ void curvatureSeparation::correct
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inject all available mass
|
// Eject all available mass
|
||||||
massToInject = separated*availableMass;
|
massToEject = separated*availableMass;
|
||||||
diameterToInject = separated*delta;
|
diameterToEject = separated*delta;
|
||||||
availableMass -= separated*availableMass;
|
availableMass -= separated*availableMass;
|
||||||
|
|
||||||
addToInjectedMass(sum(separated*availableMass));
|
addToEjectedMass(sum(separated*availableMass));
|
||||||
|
|
||||||
if (debug && mesh.time().writeTime())
|
if (debug && mesh.time().writeTime())
|
||||||
{
|
{
|
||||||
@ -313,7 +313,7 @@ void curvatureSeparation::correct
|
|||||||
volFnet.write();
|
volFnet.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
injectionModel::correct();
|
ejectionModel::correct();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -48,7 +48,7 @@ SourceFiles
|
|||||||
#ifndef curvatureSeparation_H
|
#ifndef curvatureSeparation_H
|
||||||
#define curvatureSeparation_H
|
#define curvatureSeparation_H
|
||||||
|
|
||||||
#include "injectionModel.H"
|
#include "ejectionModel.H"
|
||||||
#include "surfaceFields.H"
|
#include "surfaceFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -66,7 +66,7 @@ namespace surfaceFilmModels
|
|||||||
|
|
||||||
class curvatureSeparation
|
class curvatureSeparation
|
||||||
:
|
:
|
||||||
public injectionModel
|
public ejectionModel
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@ -134,8 +134,8 @@ public:
|
|||||||
virtual void correct
|
virtual void correct
|
||||||
(
|
(
|
||||||
scalarField& availableMass,
|
scalarField& availableMass,
|
||||||
scalarField& massToInject,
|
scalarField& massToEject,
|
||||||
scalarField& diameterToInject
|
scalarField& diameterToEject
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "drippingInjection.H"
|
#include "drippingEjection.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
@ -43,18 +43,18 @@ namespace surfaceFilmModels
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
defineTypeNameAndDebug(drippingInjection, 0);
|
defineTypeNameAndDebug(drippingEjection, 0);
|
||||||
addToRunTimeSelectionTable(injectionModel, drippingInjection, dictionary);
|
addToRunTimeSelectionTable(ejectionModel, drippingEjection, dictionary);
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
drippingInjection::drippingInjection
|
drippingEjection::drippingEjection
|
||||||
(
|
(
|
||||||
surfaceFilmRegionModel& film,
|
surfaceFilmRegionModel& film,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
injectionModel(type(), film, dict),
|
ejectionModel(type(), film, dict),
|
||||||
deltaStable_(coeffDict_.lookup<scalar>("deltaStable")),
|
deltaStable_(coeffDict_.lookup<scalar>("deltaStable")),
|
||||||
particlesPerParcel_(coeffDict_.lookup<scalar>("particlesPerParcel")),
|
particlesPerParcel_(coeffDict_.lookup<scalar>("particlesPerParcel")),
|
||||||
rndGen_(label(0)),
|
rndGen_(label(0)),
|
||||||
@ -72,17 +72,17 @@ drippingInjection::drippingInjection
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
drippingInjection::~drippingInjection()
|
drippingEjection::~drippingEjection()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void drippingInjection::correct
|
void drippingEjection::correct
|
||||||
(
|
(
|
||||||
scalarField& availableMass,
|
scalarField& availableMass,
|
||||||
scalarField& massToInject,
|
scalarField& massToEject,
|
||||||
scalarField& diameterToInject
|
scalarField& diameterToEject
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const kinematicSingleLayer& film =
|
const kinematicSingleLayer& film =
|
||||||
@ -127,33 +127,33 @@ void drippingInjection::correct
|
|||||||
|
|
||||||
if (massDrip[celli] > minMass)
|
if (massDrip[celli] > minMass)
|
||||||
{
|
{
|
||||||
// All drip mass can be injected
|
// All drip mass can be ejected
|
||||||
massToInject[celli] += massDrip[celli];
|
massToEject[celli] += massDrip[celli];
|
||||||
availableMass[celli] -= massDrip[celli];
|
availableMass[celli] -= massDrip[celli];
|
||||||
|
|
||||||
// Set particle diameter
|
// Set particle diameter
|
||||||
diameterToInject[celli] = diam;
|
diameterToEject[celli] = diam;
|
||||||
|
|
||||||
// Retrieve new particle diameter sample
|
// Retrieve new particle diameter sample
|
||||||
diam = parcelDistribution_->sample();
|
diam = parcelDistribution_->sample();
|
||||||
|
|
||||||
addToInjectedMass(massDrip[celli]);
|
addToEjectedMass(massDrip[celli]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Particle mass below minimum threshold - cannot be injected
|
// Particle mass below minimum threshold - cannot be ejected
|
||||||
massToInject[celli] = 0.0;
|
massToEject[celli] = 0.0;
|
||||||
diameterToInject[celli] = 0.0;
|
diameterToEject[celli] = 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
massToInject[celli] = 0.0;
|
massToEject[celli] = 0.0;
|
||||||
diameterToInject[celli] = 0.0;
|
diameterToEject[celli] = 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
injectionModel::correct();
|
ejectionModel::correct();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::regionModels::surfaceFilmModels::drippingInjection
|
Foam::regionModels::surfaceFilmModels::drippingEjection
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Film Dripping mass transfer model.
|
Film Dripping mass transfer model.
|
||||||
@ -33,14 +33,14 @@ Description
|
|||||||
New parcel diameters are sampled from a PDF.
|
New parcel diameters are sampled from a PDF.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
drippingInjection.C
|
drippingEjection.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef drippingInjection_H
|
#ifndef drippingEjection_H
|
||||||
#define drippingInjection_H
|
#define drippingEjection_H
|
||||||
|
|
||||||
#include "injectionModel.H"
|
#include "ejectionModel.H"
|
||||||
#include "distributionModel.H"
|
#include "distributionModel.H"
|
||||||
#include "Random.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:
|
protected:
|
||||||
|
|
||||||
@ -79,31 +79,31 @@ protected:
|
|||||||
const autoPtr<distributionModel>
|
const autoPtr<distributionModel>
|
||||||
parcelDistribution_;
|
parcelDistribution_;
|
||||||
|
|
||||||
//- Diameters of particles to inject into the dripping
|
//- Diameters of particles to eject into the dripping
|
||||||
scalarList diameter_;
|
scalarList diameter_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("drippingInjection");
|
TypeName("drippingEjection");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from surface film model
|
//- Construct from surface film model
|
||||||
drippingInjection
|
drippingEjection
|
||||||
(
|
(
|
||||||
surfaceFilmRegionModel& film,
|
surfaceFilmRegionModel& film,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Disallow default bitwise copy construction
|
//- Disallow default bitwise copy construction
|
||||||
drippingInjection(const drippingInjection&) = delete;
|
drippingEjection(const drippingEjection&) = delete;
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~drippingInjection();
|
virtual ~drippingEjection();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -114,15 +114,15 @@ public:
|
|||||||
virtual void correct
|
virtual void correct
|
||||||
(
|
(
|
||||||
scalarField& availableMass,
|
scalarField& availableMass,
|
||||||
scalarField& massToInject,
|
scalarField& massToEject,
|
||||||
scalarField& diameterToInject
|
scalarField& diameterToEject
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const drippingInjection&) = delete;
|
void operator=(const drippingEjection&) = delete;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "injectionModel.H"
|
#include "ejectionModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -36,27 +36,27 @@ namespace surfaceFilmModels
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
defineTypeNameAndDebug(injectionModel, 0);
|
defineTypeNameAndDebug(ejectionModel, 0);
|
||||||
defineRunTimeSelectionTable(injectionModel, dictionary);
|
defineRunTimeSelectionTable(ejectionModel, dictionary);
|
||||||
|
|
||||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void injectionModel::addToInjectedMass(const scalar dMass)
|
void ejectionModel::addToEjectedMass(const scalar dMass)
|
||||||
{
|
{
|
||||||
injectedMass_ += dMass;
|
ejectedMass_ += dMass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
injectionModel::injectionModel(surfaceFilmRegionModel& film)
|
ejectionModel::ejectionModel(surfaceFilmRegionModel& film)
|
||||||
:
|
:
|
||||||
filmSubModelBase(film),
|
filmSubModelBase(film),
|
||||||
injectedMass_(0.0)
|
ejectedMass_(0.0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
injectionModel::injectionModel
|
ejectionModel::ejectionModel
|
||||||
(
|
(
|
||||||
const word& modelType,
|
const word& modelType,
|
||||||
surfaceFilmRegionModel& film,
|
surfaceFilmRegionModel& film,
|
||||||
@ -64,34 +64,34 @@ injectionModel::injectionModel
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
filmSubModelBase(film, dict, typeName, modelType),
|
filmSubModelBase(film, dict, typeName, modelType),
|
||||||
injectedMass_(0.0)
|
ejectedMass_(0.0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
injectionModel::~injectionModel()
|
ejectionModel::~ejectionModel()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void injectionModel::correct()
|
void ejectionModel::correct()
|
||||||
{
|
{
|
||||||
if (writeTime())
|
if (writeTime())
|
||||||
{
|
{
|
||||||
scalar injectedMass0 = getModelProperty<scalar>("injectedMass");
|
scalar ejectedMass0 = getModelProperty<scalar>("ejectedMass");
|
||||||
injectedMass0 += returnReduce(injectedMass_, sumOp<scalar>());
|
ejectedMass0 += returnReduce(ejectedMass_, sumOp<scalar>());
|
||||||
setModelProperty<scalar>("injectedMass", injectedMass0);
|
setModelProperty<scalar>("ejectedMass", ejectedMass0);
|
||||||
injectedMass_ = 0.0;
|
ejectedMass_ = 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
scalar injectionModel::injectedMassTotal() const
|
scalar ejectionModel::ejectedMassTotal() const
|
||||||
{
|
{
|
||||||
scalar injectedMass0 = getModelProperty<scalar>("injectedMass");
|
scalar ejectedMass0 = getModelProperty<scalar>("ejectedMass");
|
||||||
return injectedMass0 + returnReduce(injectedMass_, sumOp<scalar>());
|
return ejectedMass0 + returnReduce(ejectedMass_, sumOp<scalar>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,20 +22,20 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::regionModels::surfaceFilmModels::injectionModel
|
Foam::regionModels::surfaceFilmModels::ejectionModel
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Base class for film injection models, handling mass transfer from the
|
Base class for film ejection models, handling mass transfer from the
|
||||||
film.
|
film.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
injectionModel.C
|
ejectionModel.C
|
||||||
injectionModelNew.C
|
ejectionModelNew.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef injectionModel_H
|
#ifndef ejectionModel_H
|
||||||
#define injectionModel_H
|
#define ejectionModel_H
|
||||||
|
|
||||||
#include "filmSubModelBase.H"
|
#include "filmSubModelBase.H"
|
||||||
#include "runTimeSelectionTables.H"
|
#include "runTimeSelectionTables.H"
|
||||||
@ -51,25 +51,25 @@ namespace surfaceFilmModels
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class injectionModel Declaration
|
Class ejectionModel Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class injectionModel
|
class ejectionModel
|
||||||
:
|
:
|
||||||
public filmSubModelBase
|
public filmSubModelBase
|
||||||
{
|
{
|
||||||
// Private Data
|
// Private Data
|
||||||
|
|
||||||
//- Injected mass
|
//- Ejected mass
|
||||||
scalar injectedMass_;
|
scalar ejectedMass_;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
//- Add to injected mass
|
//- Add to ejected mass
|
||||||
void addToInjectedMass(const scalar dMass);
|
void addToEjectedMass(const scalar dMass);
|
||||||
|
|
||||||
//- Correct
|
//- Correct
|
||||||
void correct();
|
void correct();
|
||||||
@ -78,7 +78,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("injectionModel");
|
TypeName("ejectionModel");
|
||||||
|
|
||||||
|
|
||||||
// Declare runtime constructor selection table
|
// Declare runtime constructor selection table
|
||||||
@ -86,7 +86,7 @@ public:
|
|||||||
declareRunTimeSelectionTable
|
declareRunTimeSelectionTable
|
||||||
(
|
(
|
||||||
autoPtr,
|
autoPtr,
|
||||||
injectionModel,
|
ejectionModel,
|
||||||
dictionary,
|
dictionary,
|
||||||
(
|
(
|
||||||
surfaceFilmRegionModel& film,
|
surfaceFilmRegionModel& film,
|
||||||
@ -99,10 +99,10 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct null
|
//- Construct null
|
||||||
injectionModel(surfaceFilmRegionModel& film);
|
ejectionModel(surfaceFilmRegionModel& film);
|
||||||
|
|
||||||
//- Construct from type name, dictionary and surface film model
|
//- Construct from type name, dictionary and surface film model
|
||||||
injectionModel
|
ejectionModel
|
||||||
(
|
(
|
||||||
const word& modelType,
|
const word& modelType,
|
||||||
surfaceFilmRegionModel& film,
|
surfaceFilmRegionModel& film,
|
||||||
@ -110,13 +110,13 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Disallow default bitwise copy construction
|
//- Disallow default bitwise copy construction
|
||||||
injectionModel(const injectionModel&) = delete;
|
ejectionModel(const ejectionModel&) = delete;
|
||||||
|
|
||||||
|
|
||||||
// Selectors
|
// Selectors
|
||||||
|
|
||||||
//- Return a reference to the selected injection model
|
//- Return a reference to the selected ejection model
|
||||||
static autoPtr<injectionModel> New
|
static autoPtr<ejectionModel> New
|
||||||
(
|
(
|
||||||
surfaceFilmRegionModel& film,
|
surfaceFilmRegionModel& film,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
@ -125,7 +125,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~injectionModel();
|
virtual ~ejectionModel();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -134,23 +134,23 @@ public:
|
|||||||
virtual void correct
|
virtual void correct
|
||||||
(
|
(
|
||||||
scalarField& availableMass,
|
scalarField& availableMass,
|
||||||
scalarField& massToInject,
|
scalarField& massToEject,
|
||||||
scalarField& diameterToInject
|
scalarField& diameterToEject
|
||||||
) = 0;
|
) = 0;
|
||||||
|
|
||||||
//- Return the total mass injected
|
//- Return the total mass ejected
|
||||||
virtual scalar injectedMassTotal() const;
|
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
|
// scalarField provided
|
||||||
virtual void patchInjectedMassTotals(scalarField& patchMasses) const
|
virtual void patchEjectedMassTotals(scalarField& patchMasses) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const injectionModel&) = delete;
|
void operator=(const ejectionModel&) = delete;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "injectionModel.H"
|
#include "ejectionModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ namespace surfaceFilmModels
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
autoPtr<injectionModel> injectionModel::New
|
autoPtr<ejectionModel> ejectionModel::New
|
||||||
(
|
(
|
||||||
surfaceFilmRegionModel& model,
|
surfaceFilmRegionModel& model,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
@ -51,13 +51,13 @@ autoPtr<injectionModel> injectionModel::New
|
|||||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown injectionModel type " << modelType
|
<< "Unknown ejectionModel type " << modelType
|
||||||
<< nl << nl << "Valid injectionModel types are:" << nl
|
<< nl << nl << "Valid ejectionModel types are:" << nl
|
||||||
<< dictionaryConstructorTablePtr_->toc()
|
<< dictionaryConstructorTablePtr_->toc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<injectionModel>(cstrIter()(model, dict));
|
return autoPtr<ejectionModel>(cstrIter()(model, dict));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "injectionModelList.H"
|
#include "ejectionModelList.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -36,62 +36,62 @@ namespace surfaceFilmModels
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
injectionModelList::injectionModelList(surfaceFilmRegionModel& film)
|
ejectionModelList::ejectionModelList(surfaceFilmRegionModel& film)
|
||||||
:
|
:
|
||||||
PtrList<injectionModel>(),
|
PtrList<ejectionModel>(),
|
||||||
filmSubModelBase(film)
|
filmSubModelBase(film)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
injectionModelList::injectionModelList
|
ejectionModelList::ejectionModelList
|
||||||
(
|
(
|
||||||
surfaceFilmRegionModel& film,
|
surfaceFilmRegionModel& film,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
PtrList<injectionModel>(),
|
PtrList<ejectionModel>(),
|
||||||
filmSubModelBase
|
filmSubModelBase
|
||||||
(
|
(
|
||||||
"injectionModelList",
|
"ejectionModelList",
|
||||||
film,
|
film,
|
||||||
dict,
|
dict,
|
||||||
"injectionModelList",
|
"ejectionModelList",
|
||||||
"injectionModelList"
|
"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"));
|
const dictionary& ejectionDict(dict.subDict("ejection"));
|
||||||
this->setSize(injectionDict.size());
|
this->setSize(ejectionDict.size());
|
||||||
|
|
||||||
label i = 0;
|
label i = 0;
|
||||||
forAllConstIter(dictionary, injectionDict, iter)
|
forAllConstIter(dictionary, ejectionDict, iter)
|
||||||
{
|
{
|
||||||
set
|
set
|
||||||
(
|
(
|
||||||
i++,
|
i++,
|
||||||
injectionModel::New
|
ejectionModel::New
|
||||||
(
|
(
|
||||||
film,
|
film,
|
||||||
injectionDict.isDict(iter().keyword())
|
ejectionDict.isDict(iter().keyword())
|
||||||
? injectionDict.subDict(iter().keyword())
|
? ejectionDict.subDict(iter().keyword())
|
||||||
: dictionary::null,
|
: dictionary::null,
|
||||||
iter().keyword()
|
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());
|
this->setSize(models.size());
|
||||||
|
|
||||||
forAll(models, i)
|
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 * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
injectionModelList::~injectionModelList()
|
ejectionModelList::~ejectionModelList()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void injectionModelList::correct
|
void ejectionModelList::correct
|
||||||
(
|
(
|
||||||
scalarField& availableMass,
|
scalarField& availableMass,
|
||||||
volScalarField& massToInject,
|
volScalarField& massToEject,
|
||||||
volScalarField& diameterToInject
|
volScalarField& diameterToEject
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Correct models that accumulate mass and diameter transfers
|
// Correct models that accumulate mass and diameter transfers
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
{
|
{
|
||||||
injectionModel& im = operator[](i);
|
ejectionModel& im = operator[](i);
|
||||||
im.correct(availableMass, massToInject, diameterToInject);
|
im.correct(availableMass, massToEject, diameterToEject);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Push values to boundaries ready for transfer to the primary region
|
// Push values to boundaries ready for transfer to the primary region
|
||||||
massToInject.correctBoundaryConditions();
|
massToEject.correctBoundaryConditions();
|
||||||
diameterToInject.correctBoundaryConditions();
|
diameterToEject.correctBoundaryConditions();
|
||||||
|
|
||||||
const labelList& patchIDs = film().intCoupledPatchIDs();
|
const labelList& patchIDs = film().intCoupledPatchIDs();
|
||||||
|
|
||||||
forAll(patchIDs, i)
|
forAll(patchIDs, i)
|
||||||
{
|
{
|
||||||
label patchi = patchIDs[i];
|
label patchi = patchIDs[i];
|
||||||
massInjected_[i] =
|
massEjected_[i] =
|
||||||
massInjected_[i] + sum(massToInject.boundaryField()[patchi]);
|
massEjected_[i] + sum(massToEject.boundaryField()[patchi]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void injectionModelList::info(Ostream& os)
|
void ejectionModelList::info(Ostream& os)
|
||||||
{
|
{
|
||||||
const polyBoundaryMesh& pbm = film().regionMesh().boundaryMesh();
|
const polyBoundaryMesh& pbm = film().regionMesh().boundaryMesh();
|
||||||
|
|
||||||
scalar injectedMass = 0;
|
scalar ejectedMass = 0;
|
||||||
scalarField patchInjectedMasses
|
scalarField patchEjectedMasses
|
||||||
(
|
(
|
||||||
pbm.size() - film().regionMesh().globalData().processorPatches().size(),
|
pbm.size() - film().regionMesh().globalData().processorPatches().size(),
|
||||||
0
|
0
|
||||||
@ -152,26 +152,26 @@ void injectionModelList::info(Ostream& os)
|
|||||||
|
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
{
|
{
|
||||||
const injectionModel& im = operator[](i);
|
const ejectionModel& im = operator[](i);
|
||||||
injectedMass += im.injectedMassTotal();
|
ejectedMass += im.ejectedMassTotal();
|
||||||
im.patchInjectedMassTotals(patchInjectedMasses);
|
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()
|
os << indent << indent << "from patch " << pbm[patchi].name()
|
||||||
<< " = " << patchInjectedMasses[patchi] << nl;
|
<< " = " << patchEjectedMasses[patchi] << nl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
scalarField mass0(massInjected_.size(), 0);
|
scalarField mass0(massEjected_.size(), 0);
|
||||||
this->getBaseProperty("massInjected", mass0);
|
this->getBaseProperty("massEjected", mass0);
|
||||||
|
|
||||||
scalarField mass(massInjected_);
|
scalarField mass(massEjected_);
|
||||||
Pstream::listCombineGather(mass, plusEqOp<scalar>());
|
Pstream::listCombineGather(mass, plusEqOp<scalar>());
|
||||||
mass += mass0;
|
mass += mass0;
|
||||||
|
|
||||||
@ -186,8 +186,8 @@ void injectionModelList::info(Ostream& os)
|
|||||||
|
|
||||||
if (film().time().writeTime())
|
if (film().time().writeTime())
|
||||||
{
|
{
|
||||||
setBaseProperty("massInjected", mass);
|
setBaseProperty("massEjected", mass);
|
||||||
massInjected_ = 0.0;
|
massEjected_ = 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,21 +22,21 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::regionModels::surfaceFilmModels::injectionModelList
|
Foam::regionModels::surfaceFilmModels::ejectionModelList
|
||||||
|
|
||||||
Description
|
Description
|
||||||
List container for film injection models
|
List container for film ejection models
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
injectionModelList.C
|
ejectionModelList.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef injectionModelList_H
|
#ifndef ejectionModelList_H
|
||||||
#define injectionModelList_H
|
#define ejectionModelList_H
|
||||||
|
|
||||||
#include "PtrList.H"
|
#include "PtrList.H"
|
||||||
#include "injectionModel.H"
|
#include "ejectionModel.H"
|
||||||
#include "filmSubModelBase.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
|
public filmSubModelBase
|
||||||
{
|
{
|
||||||
// Private Data
|
// Private Data
|
||||||
|
|
||||||
//- List of mass injected per patch
|
//- List of mass ejected per patch
|
||||||
scalarField massInjected_;
|
scalarField massEjected_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -68,21 +68,21 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct null
|
//- Construct null
|
||||||
injectionModelList(surfaceFilmRegionModel& film);
|
ejectionModelList(surfaceFilmRegionModel& film);
|
||||||
|
|
||||||
//- Construct from type name, dictionary and surface film model
|
//- Construct from type name, dictionary and surface film model
|
||||||
injectionModelList
|
ejectionModelList
|
||||||
(
|
(
|
||||||
surfaceFilmRegionModel& film,
|
surfaceFilmRegionModel& film,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Disallow default bitwise copy construction
|
//- Disallow default bitwise copy construction
|
||||||
injectionModelList(const injectionModelList&) = delete;
|
ejectionModelList(const ejectionModelList&) = delete;
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~injectionModelList();
|
virtual ~ejectionModelList();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -93,8 +93,8 @@ public:
|
|||||||
virtual void correct
|
virtual void correct
|
||||||
(
|
(
|
||||||
scalarField& availableMass,
|
scalarField& availableMass,
|
||||||
volScalarField& massToInject,
|
volScalarField& massToEject,
|
||||||
volScalarField& diameterToInject
|
volScalarField& diameterToEject
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ public:
|
|||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const injectionModelList&) = delete;
|
void operator=(const ejectionModelList&) = delete;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,7 +23,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "patchInjection.H"
|
#include "patchEjection.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -37,18 +37,18 @@ namespace surfaceFilmModels
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
defineTypeNameAndDebug(patchInjection, 0);
|
defineTypeNameAndDebug(patchEjection, 0);
|
||||||
addToRunTimeSelectionTable(injectionModel, patchInjection, dictionary);
|
addToRunTimeSelectionTable(ejectionModel, patchEjection, dictionary);
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
patchInjection::patchInjection
|
patchEjection::patchEjection
|
||||||
(
|
(
|
||||||
surfaceFilmRegionModel& film,
|
surfaceFilmRegionModel& film,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
injectionModel(type(), film, dict),
|
ejectionModel(type(), film, dict),
|
||||||
deltaStable_(coeffDict_.lookupOrDefault<scalar>("deltaStable", 0.0))
|
deltaStable_(coeffDict_.lookupOrDefault<scalar>("deltaStable", 0.0))
|
||||||
{
|
{
|
||||||
const polyBoundaryMesh& pbm = film.regionMesh().boundaryMesh();
|
const polyBoundaryMesh& pbm = film.regionMesh().boundaryMesh();
|
||||||
@ -72,7 +72,7 @@ patchInjection::patchInjection
|
|||||||
Info<< " " << pbm[patchi].name() << endl;
|
Info<< " " << pbm[patchi].name() << endl;
|
||||||
}
|
}
|
||||||
patchIDs_.setSize(pidi);
|
patchIDs_.setSize(pidi);
|
||||||
patchInjectedMasses_.setSize(pidi, 0);
|
patchEjectedMasses_.setSize(pidi, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -83,7 +83,7 @@ patchInjection::patchInjection
|
|||||||
patchIDs_[patchi] = patchi;
|
patchIDs_[patchi] = patchi;
|
||||||
}
|
}
|
||||||
|
|
||||||
patchInjectedMasses_.setSize(patchIDs_.size(), 0);
|
patchEjectedMasses_.setSize(patchIDs_.size(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!patchIDs_.size())
|
if (!patchIDs_.size())
|
||||||
@ -97,17 +97,17 @@ patchInjection::patchInjection
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
patchInjection::~patchInjection()
|
patchEjection::~patchEjection()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void patchInjection::correct
|
void patchEjection::correct
|
||||||
(
|
(
|
||||||
scalarField& availableMass,
|
scalarField& availableMass,
|
||||||
scalarField& massToInject,
|
scalarField& massToEject,
|
||||||
scalarField& diameterToInject
|
scalarField& diameterToEject
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Do not correct if no patches selected
|
// Do not correct if no patches selected
|
||||||
@ -134,65 +134,65 @@ void patchInjection::correct
|
|||||||
|
|
||||||
scalar ddelta = max(0.0, delta[celli] - deltaStable_);
|
scalar ddelta = max(0.0, delta[celli] - deltaStable_);
|
||||||
scalar dMass = ddelta*rho[celli]*magSf[celli];
|
scalar dMass = ddelta*rho[celli]*magSf[celli];
|
||||||
massToInject[celli] += dMass;
|
massToEject[celli] += dMass;
|
||||||
availableMass[celli] -= dMass;
|
availableMass[celli] -= dMass;
|
||||||
dMassPatch += dMass;
|
dMassPatch += dMass;
|
||||||
}
|
}
|
||||||
|
|
||||||
patchInjectedMasses_[pidi] += dMassPatch;
|
patchEjectedMasses_[pidi] += dMassPatch;
|
||||||
addToInjectedMass(dMassPatch);
|
addToEjectedMass(dMassPatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
injectionModel::correct();
|
ejectionModel::correct();
|
||||||
|
|
||||||
if (writeTime())
|
if (writeTime())
|
||||||
{
|
{
|
||||||
scalarField patchInjectedMasses0
|
scalarField patchEjectedMasses0
|
||||||
(
|
(
|
||||||
getModelProperty<scalarField>
|
getModelProperty<scalarField>
|
||||||
(
|
(
|
||||||
"patchInjectedMasses",
|
"patchEjectedMasses",
|
||||||
scalarField(patchInjectedMasses_.size(), 0)
|
scalarField(patchEjectedMasses_.size(), 0)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
scalarField patchInjectedMassTotals(patchInjectedMasses_);
|
scalarField patchEjectedMassTotals(patchEjectedMasses_);
|
||||||
Pstream::listCombineGather(patchInjectedMassTotals, plusEqOp<scalar>());
|
Pstream::listCombineGather(patchEjectedMassTotals, plusEqOp<scalar>());
|
||||||
patchInjectedMasses0 += patchInjectedMassTotals;
|
patchEjectedMasses0 += patchEjectedMassTotals;
|
||||||
|
|
||||||
setModelProperty<scalarField>
|
setModelProperty<scalarField>
|
||||||
(
|
(
|
||||||
"patchInjectedMasses",
|
"patchEjectedMasses",
|
||||||
patchInjectedMasses0
|
patchEjectedMasses0
|
||||||
);
|
);
|
||||||
|
|
||||||
patchInjectedMasses_ = 0;
|
patchEjectedMasses_ = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void patchInjection::patchInjectedMassTotals(scalarField& patchMasses) const
|
void patchEjection::patchEjectedMassTotals(scalarField& patchMasses) const
|
||||||
{
|
{
|
||||||
// Do not correct if no patches selected
|
// Do not correct if no patches selected
|
||||||
if (!patchIDs_.size()) return;
|
if (!patchIDs_.size()) return;
|
||||||
|
|
||||||
scalarField patchInjectedMasses
|
scalarField patchEjectedMasses
|
||||||
(
|
(
|
||||||
getModelProperty<scalarField>
|
getModelProperty<scalarField>
|
||||||
(
|
(
|
||||||
"patchInjectedMasses",
|
"patchEjectedMasses",
|
||||||
scalarField(patchInjectedMasses_.size(), 0)
|
scalarField(patchEjectedMasses_.size(), 0)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
scalarField patchInjectedMassTotals(patchInjectedMasses_);
|
scalarField patchEjectedMassTotals(patchEjectedMasses_);
|
||||||
Pstream::listCombineGather(patchInjectedMassTotals, plusEqOp<scalar>());
|
Pstream::listCombineGather(patchEjectedMassTotals, plusEqOp<scalar>());
|
||||||
|
|
||||||
forAll(patchIDs_, pidi)
|
forAll(patchIDs_, pidi)
|
||||||
{
|
{
|
||||||
label patchi = patchIDs_[pidi];
|
label patchi = patchIDs_[pidi];
|
||||||
patchMasses[patchi] +=
|
patchMasses[patchi] +=
|
||||||
patchInjectedMasses[pidi] + patchInjectedMassTotals[pidi];
|
patchEjectedMasses[pidi] + patchEjectedMassTotals[pidi];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,21 +22,21 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::regionModels::surfaceFilmModels::patchInjection
|
Foam::regionModels::surfaceFilmModels::patchEjection
|
||||||
|
|
||||||
Description
|
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.
|
patches.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
patchInjection.C
|
patchEjection.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef patchInjection_H
|
#ifndef patchEjection_H
|
||||||
#define patchInjection_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:
|
protected:
|
||||||
|
|
||||||
@ -64,27 +64,27 @@ protected:
|
|||||||
//- List of patch IDs at which the film is removed
|
//- List of patch IDs at which the film is removed
|
||||||
labelList patchIDs_;
|
labelList patchIDs_;
|
||||||
|
|
||||||
//- Injected mass for each patch at which the film is removed
|
//- Ejected mass for each patch at which the film is removed
|
||||||
scalarField patchInjectedMasses_;
|
scalarField patchEjectedMasses_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("patchInjection");
|
TypeName("patchEjection");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from surface film model
|
//- Construct from surface film model
|
||||||
patchInjection(surfaceFilmRegionModel& film, const dictionary& dict);
|
patchEjection(surfaceFilmRegionModel& film, const dictionary& dict);
|
||||||
|
|
||||||
//- Disallow default bitwise copy construction
|
//- Disallow default bitwise copy construction
|
||||||
patchInjection(const patchInjection&) = delete;
|
patchEjection(const patchEjection&) = delete;
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~patchInjection();
|
virtual ~patchEjection();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -93,13 +93,13 @@ public:
|
|||||||
virtual void correct
|
virtual void correct
|
||||||
(
|
(
|
||||||
scalarField& availableMass,
|
scalarField& availableMass,
|
||||||
scalarField& massToInject,
|
scalarField& massToEject,
|
||||||
scalarField& diameterToInject
|
scalarField& diameterToEject
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Accumulate the total mass injected for the patches into the
|
//- Accumulate the total mass ejected for the patches into the
|
||||||
// scalarField provided
|
// scalarField provided
|
||||||
virtual void patchInjectedMassTotals
|
virtual void patchEjectedMassTotals
|
||||||
(
|
(
|
||||||
scalarField& patchMasses
|
scalarField& patchMasses
|
||||||
) const;
|
) const;
|
||||||
@ -108,7 +108,7 @@ public:
|
|||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
//- Disallow default bitwise assignment
|
||||||
void operator=(const patchInjection&) = delete;
|
void operator=(const patchEjection&) = delete;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -97,7 +97,7 @@ public:
|
|||||||
|
|
||||||
// Selectors
|
// Selectors
|
||||||
|
|
||||||
//- Return a reference to the selected injection model
|
//- Return a reference to the selected ejection model
|
||||||
static autoPtr<momentumTransportModel> New
|
static autoPtr<momentumTransportModel> New
|
||||||
(
|
(
|
||||||
surfaceFilmRegionModel& film,
|
surfaceFilmRegionModel& film,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -115,7 +115,7 @@ public:
|
|||||||
|
|
||||||
// Selectors
|
// Selectors
|
||||||
|
|
||||||
//- Return a reference to the selected injection model
|
//- Return a reference to the selected ejection model
|
||||||
static autoPtr<transferModel> New
|
static autoPtr<transferModel> New
|
||||||
(
|
(
|
||||||
surfaceFilmRegionModel& film,
|
surfaceFilmRegionModel& film,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -229,8 +229,8 @@ void thermoSingleLayer::updateSubmodels()
|
|||||||
// Update radiation
|
// Update radiation
|
||||||
radiation_->correct();
|
radiation_->correct();
|
||||||
|
|
||||||
// Update injection model - mass returned is mass available for injection
|
// Update ejection model - mass returned is mass available for ejection
|
||||||
injection_.correct(availableMass_, cloudMassTrans_, cloudDiameterTrans_);
|
ejection_.correct(availableMass_, cloudMassTrans_, cloudDiameterTrans_);
|
||||||
|
|
||||||
phaseChange_->correct
|
phaseChange_->correct
|
||||||
(
|
(
|
||||||
|
|||||||
@ -65,7 +65,7 @@ forces
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
injection
|
ejection
|
||||||
{
|
{
|
||||||
curvatureSeparation
|
curvatureSeparation
|
||||||
{
|
{
|
||||||
@ -75,7 +75,7 @@ injection
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
drippingInjection
|
drippingEjection
|
||||||
{
|
{
|
||||||
cloudName reactingCloud1;
|
cloudName reactingCloud1;
|
||||||
deltaStable 0;
|
deltaStable 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user