From 054eec50ea70736a7c046d259f59cdb90c59c5b7 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Mon, 27 Mar 2017 20:03:28 +0100 Subject: [PATCH] surfaceFilmModels::contactAngleForce: Added temperatureDependentContactAngleForce Created a base-class from contactAngleForce from which the distributionContactAngleForce (for backward compatibility) and the new temperatureDependentContactAngleForce are derived: Description Temperature dependent contact angle force The contact angle in degrees is specified as a \c Function1 type, to enable the use of, e.g. contant, polynomial, table values. See also Foam::regionModels::surfaceFilmModels::contactAngleForce Foam::Function1Types SourceFiles temperatureDependentContactAngleForce.C --- ...allBoilingWallFunctionFvPatchScalarField.H | 2 +- .../regionModel/regionModel/regionModel.C | 27 +--- .../regionModel/regionModel/regionModel.H | 5 +- src/regionModels/surfaceFilmModels/Make/files | 4 +- .../contactAngleForce/contactAngleForce.C | 28 ++-- .../contactAngleForce/contactAngleForce.H | 27 ++-- .../distributionContactAngleForce.C | 120 ++++++++++++++++++ .../distributionContactAngleForce.H | 118 +++++++++++++++++ .../temperatureDependentContactAngleForce.C | 111 ++++++++++++++++ .../temperatureDependentContactAngleForce.H | 120 ++++++++++++++++++ ...ndentAlphaContactAngleFvPatchScalarField.H | 4 +- 11 files changed, 499 insertions(+), 67 deletions(-) rename src/regionModels/surfaceFilmModels/submodels/kinematic/force/{ => contactAngleForces}/contactAngleForce/contactAngleForce.C (90%) rename src/regionModels/surfaceFilmModels/submodels/kinematic/force/{ => contactAngleForces}/contactAngleForce/contactAngleForce.H (86%) create mode 100644 src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/distribution/distributionContactAngleForce.C create mode 100644 src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/distribution/distributionContactAngleForce.H create mode 100644 src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.C create mode 100644 src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.H diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H index 2e5303b8eb..701a3f911f 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H @@ -115,7 +115,7 @@ Usage value uniform 0.01; \endverbatim -SeeAlso +See also Foam::alphatPhaseChangeJayatillekeWallFunctionFvPatchField SourceFiles diff --git a/src/regionModels/regionModel/regionModel/regionModel.C b/src/regionModels/regionModel/regionModel/regionModel.C index 76b37cca81..90397edfaf 100644 --- a/src/regionModels/regionModel/regionModel/regionModel.C +++ b/src/regionModels/regionModel/regionModel/regionModel.C @@ -63,31 +63,6 @@ void Foam::regionModels::regionModel::constructMeshObjects() } -void Foam::regionModels::regionModel::constructMeshObjects -( - const dictionary& dict -) -{ - // construct region mesh - if (!time_.foundObject(regionName_)) - { - regionMeshPtr_.reset - ( - new fvMesh - ( - IOobject - ( - regionName_, - time_.timeName(), - time_, - IOobject::MUST_READ - ) - ) - ); - } -} - - void Foam::regionModels::regionModel::initialise() { if (debug) @@ -485,7 +460,7 @@ Foam::regionModels::regionModel::regionModel { if (active_) { - constructMeshObjects(dict); + constructMeshObjects(); initialise(); if (readFields) diff --git a/src/regionModels/regionModel/regionModel/regionModel.H b/src/regionModels/regionModel/regionModel/regionModel.H index d0cfcc65d3..9fc179d082 100644 --- a/src/regionModels/regionModel/regionModel/regionModel.H +++ b/src/regionModels/regionModel/regionModel/regionModel.H @@ -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 @@ -73,9 +73,6 @@ private: //- Construct region mesh and fields void constructMeshObjects(); - //- Construct region mesh and dictionary - void constructMeshObjects(const dictionary& dict); - //- Initialise the region void initialise(); diff --git a/src/regionModels/surfaceFilmModels/Make/files b/src/regionModels/surfaceFilmModels/Make/files index e17e76bbf7..236a1c2d95 100644 --- a/src/regionModels/surfaceFilmModels/Make/files +++ b/src/regionModels/surfaceFilmModels/Make/files @@ -13,7 +13,9 @@ KINEMATICMODELS=submodels/kinematic $(KINEMATICMODELS)/force/force/force.C $(KINEMATICMODELS)/force/force/forceNew.C $(KINEMATICMODELS)/force/forceList/forceList.C -$(KINEMATICMODELS)/force/contactAngleForce/contactAngleForce.C +$(KINEMATICMODELS)/force/contactAngleForces/contactAngleForce/contactAngleForce.C +$(KINEMATICMODELS)/force/contactAngleForces/distribution/distributionContactAngleForce.C +$(KINEMATICMODELS)/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.C $(KINEMATICMODELS)/force/thermocapillaryForce/thermocapillaryForce.C $(KINEMATICMODELS)/injectionModel/injectionModel/injectionModel.C diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C similarity index 90% rename from src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.C rename to src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C index 9e6c790540..2271fde826 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C @@ -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 @@ -42,7 +42,6 @@ namespace surfaceFilmModels // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(contactAngleForce, 0); -addToRunTimeSelectionTable(force, contactAngleForce, dictionary); // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // @@ -93,21 +92,13 @@ void contactAngleForce::initialise() contactAngleForce::contactAngleForce ( + const word& typeName, surfaceFilmModel& owner, const dictionary& dict ) : force(typeName, owner, dict), Ccf_(readScalar(coeffDict_.lookup("Ccf"))), - rndGen_(label(0), -1), - distribution_ - ( - distributionModels::distributionModel::New - ( - coeffDict_.subDict("contactAngleDistribution"), - rndGen_ - ) - ), mask_ ( IOobject @@ -163,7 +154,10 @@ tmp contactAngleForce::correct(volVectorField& U) const volScalarField& alpha = owner_.alpha(); const volScalarField& sigma = owner_.sigma(); - volVectorField gradAlpha(fvc::grad(alpha)); + const tmp ttheta = theta(); + const volScalarField& theta = ttheta(); + + const volVectorField gradAlpha(fvc::grad(alpha)); forAll(nbr, facei) { @@ -185,14 +179,14 @@ tmp contactAngleForce::correct(volVectorField& U) const scalar invDx = owner_.regionMesh().deltaCoeffs()[facei]; const vector n = gradAlpha[celli]/(mag(gradAlpha[celli]) + ROOTVSMALL); - scalar theta = cos(degToRad(distribution_->sample())); - force[celli] += Ccf_*n*sigma[celli]*(1.0 - theta)/invDx; + const scalar cosTheta = cos(degToRad(theta[celli])); + force[celli] += Ccf_*n*sigma[celli]*(1 - cosTheta)/invDx; } } forAll(alpha.boundaryField(), patchi) { - if (!owner().isCoupledPatch(patchi)) + if (!owner_.isCoupledPatch(patchi)) { const fvPatchField& alphaf = alpha.boundaryField()[patchi]; const fvPatchField& maskf = mask_.boundaryField()[patchi]; @@ -210,9 +204,9 @@ tmp contactAngleForce::correct(volVectorField& U) const vector n = gradAlpha[cellO] /(mag(gradAlpha[cellO]) + ROOTVSMALL); - scalar theta = cos(degToRad(distribution_->sample())); + const scalar cosTheta = cos(degToRad(theta[cellO])); force[cellO] += - Ccf_*n*sigma[cellO]*(1.0 - theta)/invDx[facei]; + Ccf_*n*sigma[cellO]*(1 - cosTheta)/invDx[facei]; } } } diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.H b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.H similarity index 86% rename from src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.H rename to src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.H index 577c861bbf..4d1801dc00 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.H +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,7 @@ Class Foam::contactAngleForce Description - Film contact angle force + Base-class for film contact angle force models. The effect of the contact angle force can be ignored over a specified distance from patches. @@ -39,8 +39,6 @@ SourceFiles #define contactAngleForce_H #include "force.H" -#include "distributionModel.H" -#include "cachedRandom.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -59,19 +57,11 @@ class contactAngleForce : public force { -private: - // Private Data //- Coefficient applied to the contact angle force scalar Ccf_; - //- Random number generator - cachedRandom rndGen_; - - //- Parcel size PDF model - const autoPtr distribution_; - //- Mask over which force is applied volScalarField mask_; @@ -88,6 +78,12 @@ private: void operator=(const contactAngleForce&); +protected: + + //- Return the contact angle field + virtual tmp theta() const = 0; + + public: //- Runtime type information @@ -99,6 +95,7 @@ public: //- Construct from surface film model contactAngleForce ( + const word& typeName, surfaceFilmModel& owner, const dictionary& dict ); @@ -110,10 +107,8 @@ public: // Member Functions - // Evolution - - //- Correct - virtual tmp correct(volVectorField& U); + //- Correct + virtual tmp correct(volVectorField& U); }; diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/distribution/distributionContactAngleForce.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/distribution/distributionContactAngleForce.C new file mode 100644 index 0000000000..c245bb2384 --- /dev/null +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/distribution/distributionContactAngleForce.C @@ -0,0 +1,120 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +\*---------------------------------------------------------------------------*/ + +#include "distributionContactAngleForce.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace regionModels +{ +namespace surfaceFilmModels +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTypeNameAndDebug(distributionContactAngleForce, 0); +addToRunTimeSelectionTable(force, distributionContactAngleForce, dictionary); + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +distributionContactAngleForce::distributionContactAngleForce +( + surfaceFilmModel& owner, + const dictionary& dict +) +: + contactAngleForce(typeName, owner, dict), + rndGen_(label(0), -1), + distribution_ + ( + distributionModels::distributionModel::New + ( + coeffDict_.subDict("distribution"), + rndGen_ + ) + ) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +distributionContactAngleForce::~distributionContactAngleForce() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +tmp distributionContactAngleForce::theta() const +{ + tmp ttheta + ( + new volScalarField + ( + IOobject + ( + typeName + ":theta", + owner_.time().timeName(), + owner_.regionMesh() + ), + owner_.regionMesh(), + dimensionedScalar("0", dimless, 0) + ) + ); + + volScalarField& theta = ttheta.ref(); + volScalarField::Internal& thetai = theta.ref(); + + forAll(thetai, celli) + { + thetai[celli] = distribution_->sample(); + } + + forAll(theta.boundaryField(), patchi) + { + if (!owner_.isCoupledPatch(patchi)) + { + fvPatchField& thetaf = theta.boundaryFieldRef()[patchi]; + + forAll(thetaf, facei) + { + thetaf[facei] = distribution_->sample(); + } + } + } + + return ttheta; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace surfaceFilmModels +} // End namespace regionModels +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/distribution/distributionContactAngleForce.H b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/distribution/distributionContactAngleForce.H new file mode 100644 index 0000000000..9156395ada --- /dev/null +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/distribution/distributionContactAngleForce.H @@ -0,0 +1,118 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +Class + Foam::distributionContactAngleForce + +Description + PDF distribution based film contact angle force + +See also + Foam::regionModels::surfaceFilmModels::contactAngleForce + Foam::distributionModels::distributionModel + +SourceFiles + distributionContactAngleForce.C + +\*---------------------------------------------------------------------------*/ + +#ifndef distributionContactAngleForce_H +#define distributionContactAngleForce_H + +#include "contactAngleForce.H" +#include "distributionModel.H" +#include "cachedRandom.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace regionModels +{ +namespace surfaceFilmModels +{ + +/*---------------------------------------------------------------------------*\ + Class distributionContactAngleForce Declaration +\*---------------------------------------------------------------------------*/ + +class distributionContactAngleForce +: + public contactAngleForce +{ + // Private Data + + //- Random number generator + cachedRandom rndGen_; + + //- Parcel size PDF model + const autoPtr distribution_; + + + // Private member functions + + //- Disallow default bitwise copy construct + distributionContactAngleForce(const distributionContactAngleForce&); + + //- Disallow default bitwise assignment + void operator=(const distributionContactAngleForce&); + + +protected: + + //- Return the contact angle field + virtual tmp theta() const; + + +public: + + //- Runtime type information + TypeName("distributionContactAngle"); + + + // Constructors + + //- Construct from surface film model + distributionContactAngleForce + ( + surfaceFilmModel& owner, + const dictionary& dict + ); + + + //- Destructor + virtual ~distributionContactAngleForce(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace surfaceFilmModels +} // End namespace regionModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.C new file mode 100644 index 0000000000..9164fd64d5 --- /dev/null +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.C @@ -0,0 +1,111 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +\*---------------------------------------------------------------------------*/ + +#include "temperatureDependentContactAngleForce.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace regionModels +{ +namespace surfaceFilmModels +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTypeNameAndDebug(temperatureDependentContactAngleForce, 0); +addToRunTimeSelectionTable +( + force, + temperatureDependentContactAngleForce, + dictionary +); + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +temperatureDependentContactAngleForce::temperatureDependentContactAngleForce +( + surfaceFilmModel& owner, + const dictionary& dict +) +: + contactAngleForce(typeName, owner, dict), + thetaPtr_(Function1::New("theta", coeffDict_)) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +temperatureDependentContactAngleForce::~temperatureDependentContactAngleForce() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +tmp temperatureDependentContactAngleForce::theta() const +{ + tmp ttheta + ( + new volScalarField + ( + IOobject + ( + typeName + ":theta", + owner_.time().timeName(), + owner_.regionMesh() + ), + owner_.regionMesh(), + dimensionedScalar("0", dimless, 0) + ) + ); + + volScalarField& theta = ttheta.ref(); + + const volScalarField& T = owner_.T(); + + theta.ref().field() = thetaPtr_->value(T()); + + forAll(theta.boundaryField(), patchi) + { + if (!owner_.isCoupledPatch(patchi)) + { + theta.boundaryFieldRef()[patchi] = + thetaPtr_->value(T.boundaryField()[patchi]); + } + } + + return ttheta; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace surfaceFilmModels +} // End namespace regionModels +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.H b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.H new file mode 100644 index 0000000000..581584bc36 --- /dev/null +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.H @@ -0,0 +1,120 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +Class + Foam::temperatureDependentContactAngleForce + +Description + Temperature dependent contact angle force + + The contact angle in degrees is specified as a \c Function1 type, to + enable the use of, e.g. contant, polynomial, table values. + +See also + Foam::regionModels::surfaceFilmModels::contactAngleForce + Foam::Function1Types + +SourceFiles + temperatureDependentContactAngleForce.C + +\*---------------------------------------------------------------------------*/ + +#ifndef temperatureDependentContactAngleForce_H +#define temperatureDependentContactAngleForce_H + +#include "contactAngleForce.H" +#include "Function1.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace regionModels +{ +namespace surfaceFilmModels +{ + +/*---------------------------------------------------------------------------*\ + Class temperatureDependentContactAngleForce Declaration +\*---------------------------------------------------------------------------*/ + +class temperatureDependentContactAngleForce +: + public contactAngleForce +{ + // Private Data + + //- Contact angle function + autoPtr> thetaPtr_; + + + // Private member functions + + //- Disallow default bitwise copy construct + temperatureDependentContactAngleForce + ( + const temperatureDependentContactAngleForce& + ); + + //- Disallow default bitwise assignment + void operator=(const temperatureDependentContactAngleForce&); + + +protected: + + //- Return the contact angle field + virtual tmp theta() const; + + +public: + + //- Runtime type information + TypeName("temperatureDependentContactAngle"); + + + // Constructors + + //- Construct from surface film model + temperatureDependentContactAngleForce + ( + surfaceFilmModel& owner, + const dictionary& dict + ); + + + //- Destructor + virtual ~temperatureDependentContactAngleForce(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace surfaceFilmModels +} // End namespace regionModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.H b/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.H index df08b53819..a3068b76e4 100644 --- a/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.H +++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/temperatureDependentAlphaContactAngle/temperatureDependentAlphaContactAngleFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -76,7 +76,7 @@ class temperatureDependentAlphaContactAngleFvPatchScalarField //- Name of temperature field, default = "T" word TName_; - //- Equilibrium contact angle table + //- Equilibrium contact angle function autoPtr> theta0_;