surfaceFilmModels::perturbedTemperatureDependentContactAngleForce: New contact angle model
Combining a Function1 temperature dependency with a distributionModel stochastic perturbation.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -109,7 +109,7 @@ Foam::solverPerformance Foam::fvMatrix<Foam::scalar>::fvSolver::solve
|
||||
scalarField totalSource(fvMat_.source());
|
||||
fvMat_.addBoundarySource(totalSource, false);
|
||||
|
||||
// assign new solver controls
|
||||
// Assign new solver controls
|
||||
solver_->read(solverControls);
|
||||
|
||||
solverPerformance solverPerf = solver_->solve
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -29,17 +29,14 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace distributionModels
|
||||
{
|
||||
defineTypeNameAndDebug(distributionModel, 0);
|
||||
defineRunTimeSelectionTable(distributionModel, dictionary);
|
||||
}
|
||||
defineTypeNameAndDebug(distributionModel, 0);
|
||||
defineRunTimeSelectionTable(distributionModel, dictionary);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||
|
||||
void Foam::distributionModels::distributionModel::check() const
|
||||
void Foam::distributionModel::check() const
|
||||
{
|
||||
if (minValue() < 0)
|
||||
{
|
||||
@ -62,7 +59,7 @@ void Foam::distributionModels::distributionModel::check() const
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::distributionModels::distributionModel::distributionModel
|
||||
Foam::distributionModel::distributionModel
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& dict,
|
||||
@ -74,7 +71,7 @@ Foam::distributionModels::distributionModel::distributionModel
|
||||
{}
|
||||
|
||||
|
||||
Foam::distributionModels::distributionModel::distributionModel
|
||||
Foam::distributionModel::distributionModel
|
||||
(
|
||||
const distributionModel& p
|
||||
)
|
||||
@ -86,7 +83,7 @@ Foam::distributionModels::distributionModel::distributionModel
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::distributionModels::distributionModel::~distributionModel()
|
||||
Foam::distributionModel::~distributionModel()
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -61,8 +61,6 @@ SourceFiles
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace distributionModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class distributionModel Declaration
|
||||
@ -155,7 +153,6 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace distributionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -27,8 +27,7 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::distributionModels::distributionModel>
|
||||
Foam::distributionModels::distributionModel::New
|
||||
Foam::autoPtr<Foam::distributionModel> Foam::distributionModel::New
|
||||
(
|
||||
const dictionary& dict,
|
||||
cachedRandom& rndGen
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -179,7 +179,7 @@ Foam::CellZoneInjection<CloudType>::CellZoneInjection
|
||||
U0_(this->coeffDict().lookup("U0")),
|
||||
sizeDistribution_
|
||||
(
|
||||
distributionModels::distributionModel::New
|
||||
distributionModel::New
|
||||
(
|
||||
this->coeffDict().subDict("sizeDistribution"), owner.rndGen()
|
||||
)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -89,7 +89,7 @@ class CellZoneInjection
|
||||
const vector U0_;
|
||||
|
||||
//- Parcel size distribution model
|
||||
const autoPtr<distributionModels::distributionModel> sizeDistribution_;
|
||||
const autoPtr<distributionModel> sizeDistribution_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -88,7 +88,7 @@ Foam::ConeInjection<CloudType>::ConeInjection
|
||||
),
|
||||
sizeDistribution_
|
||||
(
|
||||
distributionModels::distributionModel::New
|
||||
distributionModel::New
|
||||
(
|
||||
this->coeffDict().subDict("sizeDistribution"), owner.rndGen()
|
||||
)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -97,7 +97,7 @@ class ConeInjection
|
||||
const TimeFunction1<scalar> thetaOuter_;
|
||||
|
||||
//- Parcel size distribution model
|
||||
const autoPtr<distributionModels::distributionModel> sizeDistribution_;
|
||||
const autoPtr<distributionModel> sizeDistribution_;
|
||||
|
||||
//- Number of parcels per injector already injected
|
||||
mutable label nInjected_;
|
||||
|
||||
@ -146,7 +146,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
|
||||
),
|
||||
sizeDistribution_
|
||||
(
|
||||
distributionModels::distributionModel::New
|
||||
distributionModel::New
|
||||
(
|
||||
this->coeffDict().subDict("sizeDistribution"),
|
||||
owner.rndGen()
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -149,7 +149,7 @@ private:
|
||||
const TimeFunction1<scalar> thetaOuter_;
|
||||
|
||||
//- Parcel size PDF model
|
||||
const autoPtr<distributionModels::distributionModel> sizeDistribution_;
|
||||
const autoPtr<distributionModel> sizeDistribution_;
|
||||
|
||||
|
||||
// Tangential vectors to the direction vector
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -79,7 +79,7 @@ Foam::FieldActivatedInjection<CloudType>::FieldActivatedInjection
|
||||
diameters_(positions_.size()),
|
||||
sizeDistribution_
|
||||
(
|
||||
distributionModels::distributionModel::New
|
||||
distributionModel::New
|
||||
(
|
||||
this->coeffDict().subDict("sizeDistribution"),
|
||||
owner.rndGen()
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -111,7 +111,7 @@ class FieldActivatedInjection
|
||||
scalarList diameters_;
|
||||
|
||||
//- Parcel size distribution model
|
||||
const autoPtr<distributionModels::distributionModel>
|
||||
const autoPtr<distributionModel>
|
||||
sizeDistribution_;
|
||||
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ Foam::InflationInjection<CloudType>::InflationInjection
|
||||
dSeed_(SMALL),
|
||||
sizeDistribution_
|
||||
(
|
||||
distributionModels::distributionModel::New
|
||||
distributionModel::New
|
||||
(
|
||||
this->coeffDict().subDict("sizeDistribution"),
|
||||
owner.rndGen()
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -108,7 +108,7 @@ class InflationInjection
|
||||
scalar dSeed_;
|
||||
|
||||
//- Parcel size distribution model
|
||||
const autoPtr<distributionModels::distributionModel> sizeDistribution_;
|
||||
const autoPtr<distributionModel> sizeDistribution_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -59,7 +59,7 @@ Foam::ManualInjection<CloudType>::ManualInjection
|
||||
U0_(this->coeffDict().lookup("U0")),
|
||||
sizeDistribution_
|
||||
(
|
||||
distributionModels::distributionModel::New
|
||||
distributionModel::New
|
||||
(
|
||||
this->coeffDict().subDict("sizeDistribution"),
|
||||
owner.rndGen()
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -86,7 +86,7 @@ class ManualInjection
|
||||
const vector U0_;
|
||||
|
||||
//- Parcel size distribution model
|
||||
const autoPtr<distributionModels::distributionModel> sizeDistribution_;
|
||||
const autoPtr<distributionModel> sizeDistribution_;
|
||||
|
||||
//- Flag to suppress errors if particle injection site is out-of-bounds
|
||||
Switch ignoreOutOfBounds_;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -59,7 +59,7 @@ Foam::PatchFlowRateInjection<CloudType>::PatchFlowRateInjection
|
||||
),
|
||||
sizeDistribution_
|
||||
(
|
||||
distributionModels::distributionModel::New
|
||||
distributionModel::New
|
||||
(
|
||||
this->coeffDict().subDict("sizeDistribution"),
|
||||
owner.rndGen()
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -86,7 +86,7 @@ class PatchFlowRateInjection
|
||||
const scalar parcelConcentration_;
|
||||
|
||||
//- Parcel size distribution model
|
||||
const autoPtr<distributionModels::distributionModel> sizeDistribution_;
|
||||
const autoPtr<distributionModel> sizeDistribution_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -56,7 +56,7 @@ Foam::PatchInjection<CloudType>::PatchInjection
|
||||
),
|
||||
sizeDistribution_
|
||||
(
|
||||
distributionModels::distributionModel::New
|
||||
distributionModel::New
|
||||
(
|
||||
this->coeffDict().subDict("sizeDistribution"),
|
||||
owner.rndGen()
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -84,7 +84,7 @@ class PatchInjection
|
||||
const TimeFunction1<scalar> flowRateProfile_;
|
||||
|
||||
//- Parcel size distribution model
|
||||
const autoPtr<distributionModels::distributionModel> sizeDistribution_;
|
||||
const autoPtr<distributionModel> sizeDistribution_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -16,6 +16,7 @@ $(KINEMATICMODELS)/force/forceList/forceList.C
|
||||
$(KINEMATICMODELS)/force/contactAngleForces/contactAngleForce/contactAngleForce.C
|
||||
$(KINEMATICMODELS)/force/contactAngleForces/distribution/distributionContactAngleForce.C
|
||||
$(KINEMATICMODELS)/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.C
|
||||
$(KINEMATICMODELS)/force/contactAngleForces/perturbedTemperatureDependent/perturbedTemperatureDependentContactAngleForce.C
|
||||
$(KINEMATICMODELS)/force/thermocapillaryForce/thermocapillaryForce.C
|
||||
|
||||
$(KINEMATICMODELS)/injectionModel/injectionModel/injectionModel.C
|
||||
|
||||
@ -53,7 +53,7 @@ distributionContactAngleForce::distributionContactAngleForce
|
||||
rndGen_(label(0), -1),
|
||||
distribution_
|
||||
(
|
||||
distributionModels::distributionModel::New
|
||||
distributionModel::New
|
||||
(
|
||||
coeffDict_.subDict("distribution"),
|
||||
rndGen_
|
||||
|
||||
@ -29,7 +29,7 @@ Description
|
||||
|
||||
See also
|
||||
Foam::regionModels::surfaceFilmModels::contactAngleForce
|
||||
Foam::distributionModels::distributionModel
|
||||
Foam::distributionModel
|
||||
|
||||
SourceFiles
|
||||
distributionContactAngleForce.C
|
||||
@ -53,7 +53,7 @@ namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class distributionContactAngleForce Declaration
|
||||
Class distributionContactAngleForce Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class distributionContactAngleForce
|
||||
@ -66,7 +66,7 @@ class distributionContactAngleForce
|
||||
cachedRandom rndGen_;
|
||||
|
||||
//- Parcel size PDF model
|
||||
const autoPtr<distributionModels::distributionModel> distribution_;
|
||||
const autoPtr<distributionModel> distribution_;
|
||||
|
||||
|
||||
// Private member functions
|
||||
|
||||
@ -0,0 +1,139 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "perturbedTemperatureDependentContactAngleForce.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(perturbedTemperatureDependentContactAngleForce, 0);
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
force,
|
||||
perturbedTemperatureDependentContactAngleForce,
|
||||
dictionary
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
perturbedTemperatureDependentContactAngleForce::
|
||||
perturbedTemperatureDependentContactAngleForce
|
||||
(
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
contactAngleForce(typeName, film, dict),
|
||||
thetaPtr_(Function1<scalar>::New("theta", coeffDict_)),
|
||||
rndGen_(label(0), -1),
|
||||
distribution_
|
||||
(
|
||||
distributionModel::New
|
||||
(
|
||||
coeffDict_.subDict("distribution"),
|
||||
rndGen_
|
||||
)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
perturbedTemperatureDependentContactAngleForce::
|
||||
~perturbedTemperatureDependentContactAngleForce()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
tmp<volScalarField>
|
||||
perturbedTemperatureDependentContactAngleForce::theta() const
|
||||
{
|
||||
tmp<volScalarField> ttheta
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
typeName + ":theta",
|
||||
filmModel_.time().timeName(),
|
||||
filmModel_.regionMesh()
|
||||
),
|
||||
filmModel_.regionMesh(),
|
||||
dimensionedScalar("0", dimless, 0)
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& theta = ttheta.ref();
|
||||
volScalarField::Internal& thetai = theta.ref();
|
||||
|
||||
const volScalarField& T = filmModel_.T();
|
||||
|
||||
// Initialize with the function of temperature
|
||||
thetai.field() = thetaPtr_->value(T());
|
||||
|
||||
// Add the stochastic perturbation
|
||||
forAll(thetai, celli)
|
||||
{
|
||||
thetai[celli] += distribution_->sample();
|
||||
}
|
||||
|
||||
forAll(theta.boundaryField(), patchi)
|
||||
{
|
||||
if (!filmModel_.isCoupledPatch(patchi))
|
||||
{
|
||||
fvPatchField<scalar>& thetaf = theta.boundaryFieldRef()[patchi];
|
||||
|
||||
// Initialize with the function of temperature
|
||||
thetaf = thetaPtr_->value(T.boundaryField()[patchi]);
|
||||
|
||||
// Add the stochastic perturbation
|
||||
forAll(thetaf, facei)
|
||||
{
|
||||
thetaf[facei] += distribution_->sample();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ttheta;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,134 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::regionModels::surfaceFilmModels::
|
||||
perturbedTemperatureDependentContactAngleForce
|
||||
|
||||
Description
|
||||
Temperature dependent contact angle force with a stochastic perturbation
|
||||
|
||||
The contact angle in degrees is specified as a Foam::Function1 type, to
|
||||
enable the use of, e.g. contant, polynomial, table values and the
|
||||
stochastic perturbation obtained from a
|
||||
Foam::distributionModels::distributionModel
|
||||
|
||||
See also
|
||||
Foam::regionModels::surfaceFilmModels::contactAngleForce
|
||||
Foam::regionModels::surfaceFilmModels::temperatureDependentContactAngleForce
|
||||
Foam::regionModels::surfaceFilmModels::distributionContactAngleForce
|
||||
Foam::Function1Types
|
||||
Foam::distributionModel
|
||||
|
||||
SourceFiles
|
||||
perturbedTemperatureDependentContactAngleForce.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef perturbedTemperatureDependentContactAngleForce_H
|
||||
#define perturbedTemperatureDependentContactAngleForce_H
|
||||
|
||||
#include "contactAngleForce.H"
|
||||
#include "Function1.H"
|
||||
#include "distributionModel.H"
|
||||
#include "cachedRandom.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class perturbedTemperatureDependentContactAngleForce Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class perturbedTemperatureDependentContactAngleForce
|
||||
:
|
||||
public contactAngleForce
|
||||
{
|
||||
// Private Data
|
||||
|
||||
//- Contact angle function
|
||||
autoPtr<Function1<scalar>> thetaPtr_;
|
||||
|
||||
//- Random number generator
|
||||
cachedRandom rndGen_;
|
||||
|
||||
//- Parcel size PDF model
|
||||
const autoPtr<distributionModel> distribution_;
|
||||
|
||||
|
||||
// Private member functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
perturbedTemperatureDependentContactAngleForce
|
||||
(
|
||||
const perturbedTemperatureDependentContactAngleForce&
|
||||
);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const perturbedTemperatureDependentContactAngleForce&);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
//- Return the contact angle field
|
||||
virtual tmp<volScalarField> theta() const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("perturbedTemperatureDependentContactAngle");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from surface film model
|
||||
perturbedTemperatureDependentContactAngleForce
|
||||
(
|
||||
surfaceFilmModel& film,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~perturbedTemperatureDependentContactAngleForce();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -27,7 +27,7 @@ Class
|
||||
Description
|
||||
Temperature dependent contact angle force
|
||||
|
||||
The contact angle in degrees is specified as a \c Function1 type, to
|
||||
The contact angle in degrees is specified as a Foam::Function1 type, to
|
||||
enable the use of, e.g. contant, polynomial, table values.
|
||||
|
||||
See also
|
||||
@ -55,7 +55,7 @@ namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class temperatureDependentContactAngleForce Declaration
|
||||
Class temperatureDependentContactAngleForce Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class temperatureDependentContactAngleForce
|
||||
|
||||
@ -60,7 +60,7 @@ drippingInjection::drippingInjection
|
||||
rndGen_(label(0), -1),
|
||||
parcelDistribution_
|
||||
(
|
||||
distributionModels::distributionModel::New
|
||||
distributionModel::New
|
||||
(
|
||||
coeffDict_.subDict("parcelDistribution"),
|
||||
rndGen_
|
||||
|
||||
@ -87,7 +87,7 @@ protected:
|
||||
cachedRandom rndGen_;
|
||||
|
||||
//- Parcel size PDF model
|
||||
const autoPtr<distributionModels::distributionModel>
|
||||
const autoPtr<distributionModel>
|
||||
parcelDistribution_;
|
||||
|
||||
//- Diameters of particles to inject into the dripping
|
||||
|
||||
Reference in New Issue
Block a user