diff --git a/src/Allwmake b/src/Allwmake index 317df567d7..edc53ccb82 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -67,7 +67,6 @@ MomentumTransportModels/Allwmake $targetType $* ThermophysicalTransportModels/Allwmake $targetType $* wmake $targetType radiationModels wmake $targetType combustionModels -wmake $targetType surfaceFilmModels mesh/Allwmake $targetType $* renumber/Allwmake $targetType $* fvAgglomerationMethods/Allwmake $targetType $* @@ -79,6 +78,9 @@ functionObjects/Allwmake $targetType $* lagrangian/Allwmake $targetType $* +wmake $targetType surfaceFilmModels +wmake $targetType parcelSurfaceFilmModels + wmake $targetType sixDoFRigidBodyMotion wmake $targetType sixDoFRigidBodyState wmake $targetType rigidBodyDynamics diff --git a/src/lagrangian/functionObjects/Make/options b/src/lagrangian/functionObjects/Make/options index 0a2b4ad092..9cc215b820 100644 --- a/src/lagrangian/functionObjects/Make/options +++ b/src/lagrangian/functionObjects/Make/options @@ -5,7 +5,6 @@ EXE_INC = \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/parcel/lnInclude \ -I$(LIB_SRC)/lagrangian/DSMC/lnInclude \ - -I$(LIB_SRC)/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/functionObjects/utilities/lnInclude LIB_LIBS = \ @@ -15,5 +14,4 @@ LIB_LIBS = \ -llagrangian \ -llagrangianParcel \ -llagrangianParcelTurbulence \ - -lsurfaceFilmModels \ -lutilityFunctionObjects diff --git a/src/lagrangian/parcel/Make/files b/src/lagrangian/parcel/Make/files index 22bc43e457..1488e4ff53 100644 --- a/src/lagrangian/parcel/Make/files +++ b/src/lagrangian/parcel/Make/files @@ -113,9 +113,6 @@ clouds/Templates/MomentumCloud/cloudSolution/cloudSolution.C # averaging methods submodels/MPPIC/AveragingMethods/makeAveragingMethods.C -# surface films -submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilmBase.C - # fvModels fvModels/clouds/clouds.C diff --git a/src/lagrangian/parcel/Make/options b/src/lagrangian/parcel/Make/options index 61df748e55..d92ca22f5f 100644 --- a/src/lagrangian/parcel/Make/options +++ b/src/lagrangian/parcel/Make/options @@ -7,7 +7,6 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/multicomponentThermo/lnInclude \ -I$(LIB_SRC)/radiationModels/lnInclude \ - -I$(LIB_SRC)/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude @@ -21,7 +20,6 @@ LIB_LIBS = \ -lmulticomponentThermophysicalModels \ -lradiationModels \ -lphysicalProperties \ - -lsurfaceFilmModels \ -lsampling \ -lfiniteVolume \ -lmeshTools diff --git a/src/lagrangian/parcel/parcelCloud/parcelCloudNew.C b/src/lagrangian/parcel/parcelCloud/parcelCloudNew.C index dd45c79ce9..f01d28c005 100644 --- a/src/lagrangian/parcel/parcelCloud/parcelCloudNew.C +++ b/src/lagrangian/parcel/parcelCloud/parcelCloudNew.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -52,6 +52,8 @@ Foam::autoPtr Foam::parcelCloud::New Info<< "Selecting " << parcelCloud::typeName << " " << type << endl; + libs.open(dict, "libs"); + viscosityConstructorTable::iterator cstrIter = viscosityConstructorTablePtr_->find(type); @@ -93,6 +95,8 @@ Foam::autoPtr Foam::parcelCloud::New Info<< "Selecting " << parcelCloud::typeName << " " << type << endl; + libs.open(dict, "libs"); + thermoConstructorTable::iterator cstrIter = thermoConstructorTablePtr_->find(type); diff --git a/src/lagrangian/parcel/parcels/derived/reactingMultiphaseParcel/makeReactingMultiphaseParcelSubmodels.C b/src/lagrangian/parcel/parcels/derived/reactingMultiphaseParcel/makeReactingMultiphaseParcelSubmodels.C index 3ba89bb39c..ff16394ada 100644 --- a/src/lagrangian/parcel/parcels/derived/reactingMultiphaseParcel/makeReactingMultiphaseParcelSubmodels.C +++ b/src/lagrangian/parcel/parcels/derived/reactingMultiphaseParcel/makeReactingMultiphaseParcelSubmodels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,7 +33,7 @@ License #include "makeReactingMultiphaseParcelInjectionModels.H" // MP variant #include "makeParcelPatchInteractionModels.H" #include "makeReactingMultiphaseParcelStochasticCollisionModels.H" // MP variant -#include "makeReactingParcelSurfaceFilmModels.H" // Reacting variant +#include "makeParcelSurfaceFilmModels.H" // Thermodynamic #include "makeParcelHeatTransferModels.H" @@ -59,7 +59,7 @@ makeReactingMultiphaseParcelStochasticCollisionModels ( reactingMultiphaseCloud ); -makeReactingParcelSurfaceFilmModels(reactingMultiphaseCloud); +makeParcelSurfaceFilmModels(reactingMultiphaseCloud); // Thermo sub-models makeParcelHeatTransferModels(reactingMultiphaseCloud); diff --git a/src/lagrangian/parcel/parcels/derived/reactingParcel/makeReactingParcelSubmodels.C b/src/lagrangian/parcel/parcels/derived/reactingParcel/makeReactingParcelSubmodels.C index 481f0af637..b20a8e5217 100644 --- a/src/lagrangian/parcel/parcels/derived/reactingParcel/makeReactingParcelSubmodels.C +++ b/src/lagrangian/parcel/parcels/derived/reactingParcel/makeReactingParcelSubmodels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,7 +33,7 @@ License #include "makeReactingParcelInjectionModels.H" // Reacting variant #include "makeParcelPatchInteractionModels.H" #include "makeParcelStochasticCollisionModels.H" -#include "makeReactingParcelSurfaceFilmModels.H" // Reacting variant +#include "makeParcelSurfaceFilmModels.H" // Thermodynamic #include "makeParcelHeatTransferModels.H" @@ -52,7 +52,7 @@ makeParcelDispersionModels(reactingCloud); makeReactingParcelInjectionModels(reactingCloud); makeParcelPatchInteractionModels(reactingCloud); makeParcelStochasticCollisionModels(reactingCloud); -makeReactingParcelSurfaceFilmModels(reactingCloud); +makeParcelSurfaceFilmModels(reactingCloud); // Thermo sub-models makeParcelHeatTransferModels(reactingCloud); diff --git a/src/lagrangian/parcel/parcels/derived/sprayParcel/makeSprayParcelSubmodels.C b/src/lagrangian/parcel/parcels/derived/sprayParcel/makeSprayParcelSubmodels.C index cbaa0852d1..e38a9d5f0d 100644 --- a/src/lagrangian/parcel/parcels/derived/sprayParcel/makeSprayParcelSubmodels.C +++ b/src/lagrangian/parcel/parcels/derived/sprayParcel/makeSprayParcelSubmodels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,7 +40,7 @@ License // Reacting #include "makeReactingParcelPhaseChangeModels.H" -#include "makeReactingParcelSurfaceFilmModels.H" +#include "makeParcelSurfaceFilmModels.H" // Spray #include "DistortedSphereDragForce.H" @@ -64,7 +64,7 @@ makeParcelCompositionModels(sprayCloud); // Reacting sub-models makeReactingParcelPhaseChangeModels(sprayCloud); -makeReactingParcelSurfaceFilmModels(sprayCloud); +makeParcelSurfaceFilmModels(sprayCloud); // Spray sub-models makeParticleForceModelType(DistortedSphereDragForce, sprayCloud); diff --git a/src/lagrangian/parcel/parcels/derived/thermoParcel/makeThermoParcelSubmodels.C b/src/lagrangian/parcel/parcels/derived/thermoParcel/makeThermoParcelSubmodels.C index 6a1b54efe2..4efd9f9239 100644 --- a/src/lagrangian/parcel/parcels/derived/thermoParcel/makeThermoParcelSubmodels.C +++ b/src/lagrangian/parcel/parcels/derived/thermoParcel/makeThermoParcelSubmodels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,7 +33,7 @@ License #include "makeThermoParcelInjectionModels.H" #include "makeParcelPatchInteractionModels.H" #include "makeParcelStochasticCollisionModels.H" -#include "makeThermoParcelSurfaceFilmModels.H" // thermo variant +#include "makeParcelSurfaceFilmModels.H" // Thermodynamic #include "makeParcelHeatTransferModels.H" diff --git a/src/lagrangian/parcel/parcels/derived/thermoParcel/makeThermoParcelSurfaceFilmModels.C b/src/lagrangian/parcel/parcels/derived/thermoParcel/makeThermoParcelSurfaceFilmModels.C new file mode 100644 index 0000000000..c7855d45ae --- /dev/null +++ b/src/lagrangian/parcel/parcels/derived/thermoParcel/makeThermoParcelSurfaceFilmModels.C @@ -0,0 +1,33 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2023 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 "thermoCloud.H" +#include "makeThermoParcelSurfaceFilmModels.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeThermoParcelSurfaceFilmModels(thermoCloud); + +// ************************************************************************* // diff --git a/src/lagrangian/parcel/parcels/include/makeThermoParcelSurfaceFilmModels.H b/src/lagrangian/parcel/parcels/include/makeThermoParcelSurfaceFilmModels.H index 6946b1bc96..68e305655f 100644 --- a/src/lagrangian/parcel/parcels/include/makeThermoParcelSurfaceFilmModels.H +++ b/src/lagrangian/parcel/parcels/include/makeThermoParcelSurfaceFilmModels.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,16 +28,11 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "NoSurfaceFilm.H" #include "ThermoSurfaceFilm.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeParcelSurfaceFilmModels(CloudType) \ - \ - makeSurfaceFilmModel(CloudType); \ - \ - makeSurfaceFilmModelType(NoSurfaceFilm, CloudType); \ +#define makeThermoParcelSurfaceFilmModels(CloudType) \ makeSurfaceFilmModelType(ThermoSurfaceFilm, CloudType); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/parcel/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C b/src/lagrangian/parcel/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C index 8bd0d2cb2f..595f9b1038 100644 --- a/src/lagrangian/parcel/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C +++ b/src/lagrangian/parcel/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,6 +24,9 @@ License \*---------------------------------------------------------------------------*/ #include "ParticleErosion.H" +#include "mathematicalConstants.H" + +using namespace Foam::constant; // * * * * * * * * * * * * * Protectd Member Functions * * * * * * * * * * * // diff --git a/src/lagrangian/parcel/submodels/MPPIC/PackingModels/Implicit/Implicit.C b/src/lagrangian/parcel/submodels/MPPIC/PackingModels/Implicit/Implicit.C index f1050593c6..b1984f4d6c 100644 --- a/src/lagrangian/parcel/submodels/MPPIC/PackingModels/Implicit/Implicit.C +++ b/src/lagrangian/parcel/submodels/MPPIC/PackingModels/Implicit/Implicit.C @@ -30,6 +30,7 @@ License #include "fvmLaplacian.H" #include "fvcReconstruct.H" #include "volPointInterpolation.H" +#include "fixedValueFvPatchFields.H" #include "zeroGradientFvPatchFields.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/lagrangian/parcel/submodels/Momentum/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.C b/src/lagrangian/parcel/submodels/Momentum/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.C index a6f549e3ef..be15dc7a7d 100644 --- a/src/lagrangian/parcel/submodels/Momentum/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.C +++ b/src/lagrangian/parcel/submodels/Momentum/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,14 +29,27 @@ License // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // template -Foam::UPtrList& -Foam::NoSurfaceFilm::surfaceFilmPtrs() const +const Foam::labelList& Foam::NoSurfaceFilm::filmPatches() const { - static UPtrList null; + static labelList null; return null; } +template +void Foam::NoSurfaceFilm::cacheFilmFields(const label filmi) +{} + + +template +void Foam::NoSurfaceFilm::setParcelProperties +( + parcelType& p, + const label filmFacei +) const +{} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template @@ -81,15 +94,6 @@ bool Foam::NoSurfaceFilm::transferParcel } -template -void Foam::NoSurfaceFilm::setParcelProperties -( - parcelType&, - const label -) const -{} - - template void Foam::NoSurfaceFilm::info(Ostream&) {} diff --git a/src/lagrangian/parcel/submodels/Momentum/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.H b/src/lagrangian/parcel/submodels/Momentum/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.H index 571f817e8f..7d039af44b 100644 --- a/src/lagrangian/parcel/submodels/Momentum/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.H +++ b/src/lagrangian/parcel/submodels/Momentum/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,7 +62,17 @@ protected: // Protected Member Functions //- Return pointers to the films - virtual UPtrList& surfaceFilmPtrs() const; + virtual const labelList& filmPatches() const; + + //- Cache the film fields in preparation for injection + virtual void cacheFilmFields(const label filmi); + + //- Set the individual parcel properties + virtual void setParcelProperties + ( + parcelType& p, + const label filmFacei + ) const; public: @@ -106,13 +116,6 @@ public: bool& keepParticle ); - //- Set parcel properties - virtual void setParcelProperties - ( - parcelType& p, - const label filmCelli - ) const; - // I-O diff --git a/src/lagrangian/parcel/submodels/Momentum/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C b/src/lagrangian/parcel/submodels/Momentum/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C index 2f38f5f795..1559d69d3d 100644 --- a/src/lagrangian/parcel/submodels/Momentum/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C +++ b/src/lagrangian/parcel/submodels/Momentum/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,64 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "SurfaceFilmModel.H" -#include "UPtrList.H" -#include "surfaceFilm.H" +#include "volFields.H" #include "surfaceFields.H" -#include "mathematicalConstants.H" - -using namespace Foam::constant; - - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -template -void Foam::SurfaceFilmModel::cacheFilmFields -( - const label filmPatchi, - const label primaryPatchi, - const surfaceFilm& filmModel -) -{ - massParcelPatch_ = filmModel.cloudMassTrans().boundaryField()[filmPatchi]; - filmModel.toPrimary(filmPatchi, massParcelPatch_); - - diameterParcelPatch_ = - filmModel.cloudDiameterTrans().boundaryField()[filmPatchi]; - filmModel.toPrimary(filmPatchi, diameterParcelPatch_); - - UFilmPatch_ = filmModel.U().boundaryField()[filmPatchi]; - filmModel.toPrimary(filmPatchi, UFilmPatch_); - - rhoFilmPatch_ = filmModel.rho().boundaryField()[filmPatchi]; - filmModel.toPrimary(filmPatchi, rhoFilmPatch_); - - deltaFilmPatch_[primaryPatchi] = - filmModel.delta().boundaryField()[filmPatchi]; - filmModel.toPrimary(filmPatchi, deltaFilmPatch_[primaryPatchi]); -} - - -template -void Foam::SurfaceFilmModel::setParcelProperties -( - parcelType& p, - const label filmFacei -) const -{ - // Set parcel properties - scalar vol = mathematical::pi/6.0*pow3(diameterParcelPatch_[filmFacei]); - p.d() = diameterParcelPatch_[filmFacei]; - p.U() = UFilmPatch_[filmFacei]; - p.rho() = rhoFilmPatch_[filmFacei]; - - p.nParticle() = massParcelPatch_[filmFacei]/p.rho()/vol; - - if (ejectedParcelType_ >= 0) - { - p.typeId() = ejectedParcelType_; - } -} - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -93,9 +37,7 @@ Foam::SurfaceFilmModel::SurfaceFilmModel(CloudType& owner) ejectedParcelType_(0), massParcelPatch_(0), diameterParcelPatch_(0), - UFilmPatch_(0), - rhoFilmPatch_(0), - deltaFilmPatch_(owner.mesh().boundary().size()), + deltaFilmPatch_(0), nParcelsTransferred_(0), nParcelsInjected_(0) {} @@ -117,9 +59,7 @@ Foam::SurfaceFilmModel::SurfaceFilmModel ), massParcelPatch_(0), diameterParcelPatch_(0), - UFilmPatch_(0), - rhoFilmPatch_(0), - deltaFilmPatch_(owner.mesh().boundary().size()), + deltaFilmPatch_(), nParcelsTransferred_(0), nParcelsInjected_(0) {} @@ -136,8 +76,6 @@ Foam::SurfaceFilmModel::SurfaceFilmModel ejectedParcelType_(sfm.ejectedParcelType_), massParcelPatch_(sfm.massParcelPatch_), diameterParcelPatch_(sfm.diameterParcelPatch_), - UFilmPatch_(sfm.UFilmPatch_), - rhoFilmPatch_(sfm.rhoFilmPatch_), deltaFilmPatch_(sfm.deltaFilmPatch_), nParcelsTransferred_(sfm.nParcelsTransferred_), nParcelsInjected_(sfm.nParcelsInjected_) @@ -157,69 +95,60 @@ template template void Foam::SurfaceFilmModel::inject(TrackCloudType& cloud) { - forAll(surfaceFilmPtrs(), filmi) - { - const surfaceFilm& filmModel = surfaceFilmPtrs()[filmi]; + const labelList& filmPatches = this->filmPatches(); - const labelList& filmPatches = filmModel.intCoupledPatchIDs(); - const labelList& primaryPatches = filmModel.primaryPatchIDs(); + forAll(filmPatches, filmi) + { + const label filmPatchi = filmPatches[filmi]; const fvMesh& mesh = this->owner().mesh(); const polyBoundaryMesh& pbm = mesh.boundaryMesh(); - forAll(filmPatches, i) + const labelList& injectorCellsPatch = pbm[filmPatchi].faceCells(); + + cacheFilmFields(filmi); + + const vectorField& Cf = mesh.C().boundaryField()[filmPatchi]; + const vectorField& Sf = mesh.Sf().boundaryField()[filmPatchi]; + const scalarField& magSf = mesh.magSf().boundaryField()[filmPatchi]; + + forAll(injectorCellsPatch, j) { - const label filmPatchi = filmPatches[i]; - const label primaryPatchi = primaryPatches[i]; - - const labelList& injectorCellsPatch = - pbm[primaryPatchi].faceCells(); - - cacheFilmFields(filmPatchi, primaryPatchi, filmModel); - - const vectorField& Cf = mesh.C().boundaryField()[primaryPatchi]; - const vectorField& Sf = mesh.Sf().boundaryField()[primaryPatchi]; - const scalarField& magSf = - mesh.magSf().boundaryField()[primaryPatchi]; - - forAll(injectorCellsPatch, j) + if (massParcelPatch_[j] > 0) { - if (massParcelPatch_[j] > 0) + const label celli = injectorCellsPatch[j]; + + const scalar offset = + max + ( + diameterParcelPatch_[j], + deltaFilmPatch_[j] + ); + const point pos = Cf[j] - 1.1*offset*Sf[j]/magSf[j]; + + // Create a new parcel + parcelType* pPtr = + new parcelType(this->owner().pMesh(), pos, celli); + + // Check/set new parcel thermo properties + cloud.setParcelThermoProperties(*pPtr); + + setParcelProperties(*pPtr, j); + + if (pPtr->nParticle() > 0.001) { - const label celli = injectorCellsPatch[j]; + // Check new parcel properties + cloud.checkParcelProperties(*pPtr, false); - const scalar offset = - max - ( - diameterParcelPatch_[j], - deltaFilmPatch_[primaryPatchi][j] - ); - const point pos = Cf[j] - 1.1*offset*Sf[j]/magSf[j]; + // Add the new parcel to the cloud + cloud.addParticle(pPtr); - // Create a new parcel - parcelType* pPtr = - new parcelType(this->owner().pMesh(), pos, celli); - - // Check/set new parcel thermo properties - cloud.setParcelThermoProperties(*pPtr); - - setParcelProperties(*pPtr, j); - - if (pPtr->nParticle() > 0.001) - { - // Check new parcel properties - cloud.checkParcelProperties(*pPtr, false); - - // Add the new parcel to the cloud - cloud.addParticle(pPtr); - - nParcelsInjected_++; - } - else - { - // TODO: cache mass and re-distribute? - delete pPtr; - } + nParcelsInjected_++; + } + else + { + // TODO: cache mass and re-distribute? + delete pPtr; } } } diff --git a/src/lagrangian/parcel/submodels/Momentum/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H b/src/lagrangian/parcel/submodels/Momentum/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H index 2b81665607..1e8191d18e 100644 --- a/src/lagrangian/parcel/submodels/Momentum/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H +++ b/src/lagrangian/parcel/submodels/Momentum/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,21 +36,16 @@ SourceFiles #ifndef SurfaceFilmModel_H #define SurfaceFilmModel_H -#include "IOdictionary.H" -#include "autoPtr.H" -#include "runTimeSelectionTables.H" #include "CloudSubModelBase.H" -#include "surfaceMesh.H" #include "dimensionedTypes.H" +#include "polyPatch.H" +#include "runTimeSelectionTables.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -// Forward declaration of classes -class surfaceFilm; - /*---------------------------------------------------------------------------*\ Class SurfaceFilmModel Declaration \*---------------------------------------------------------------------------*/ @@ -84,14 +79,8 @@ protected: //- Parcel diameter / patch face scalarField diameterParcelPatch_; - //- Film velocity / patch face - vectorField UFilmPatch_; - - //- Film density / patch face - scalarField rhoFilmPatch_; - //- Film height of all film patches / patch face - List deltaFilmPatch_; + scalarField deltaFilmPatch_; // Counters @@ -105,24 +94,18 @@ protected: // Protected functions - //- Return pointers to the films - virtual UPtrList& - surfaceFilmPtrs() const = 0; + //- Return list of film patches + virtual const labelList& filmPatches() const = 0; //- Cache the film fields in preparation for injection - virtual void cacheFilmFields - ( - const label filmPatchi, - const label primaryPatchi, - const surfaceFilm& - ); + virtual void cacheFilmFields(const label filmi) = 0; //- Set the individual parcel properties virtual void setParcelProperties ( parcelType& p, const label filmFacei - ) const; + ) const = 0; public: diff --git a/src/lagrangian/parcel/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C b/src/lagrangian/parcel/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C index 401976ed86..fced7e8d9f 100644 --- a/src/lagrangian/parcel/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C +++ b/src/lagrangian/parcel/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C @@ -25,11 +25,10 @@ License #include "ThermoSurfaceFilm.H" #include "thermoSurfaceFilm.H" -#include "addToRunTimeSelectionTable.H" -#include "mathematicalConstants.H" -#include "Pstream.H" #include "ThermoCloud.H" #include "meshTools.H" +#include "mathematicalConstants.H" +#include "addToRunTimeSelectionTable.H" using namespace Foam::constant::mathematical; @@ -464,6 +463,8 @@ Foam::ThermoSurfaceFilm::surfaceFilmPtrs() const // Cache pointers to the surface film models surfaceFilms_.resize(surfaceFilmNames_.size()); + filmPatches_.setSize(surfaceFilms_.size()); + forAll(surfaceFilms_, filmi) { surfaceFilms_.set @@ -474,6 +475,16 @@ Foam::ThermoSurfaceFilm::surfaceFilmPtrs() const surfaceFilmNames_[filmi] + "Properties" ) ); + + if (surfaceFilms_[filmi].primaryPatchIDs().size() > 1) + { + FatalErrorInFunction + << "Number of film primary patch IDs > 1 for film " + << surfaceFilms_[filmi].name() + << exit(FatalError); + } + + filmPatches_[filmi] = surfaceFilms_[filmi].primaryPatchIDs()[0]; } } @@ -482,19 +493,38 @@ Foam::ThermoSurfaceFilm::surfaceFilmPtrs() const template -void Foam::ThermoSurfaceFilm::cacheFilmFields -( - const label filmPatchi, - const label primaryPatchi, - const surfaceFilm& filmModel -) +const Foam::labelList& Foam::ThermoSurfaceFilm::filmPatches() const { - SurfaceFilmModel::cacheFilmFields - ( - filmPatchi, - primaryPatchi, - filmModel - ); + // Ensure filmPatches_ has been initialise + surfaceFilmPtrs(); + + return filmPatches_; +} + + +template +void Foam::ThermoSurfaceFilm::cacheFilmFields(const label filmi) +{ + const surfaceFilm& filmModel = this->surfaceFilmPtrs()[filmi]; + const label filmPatchi = filmModel.intCoupledPatchIDs()[0]; + + this->massParcelPatch_ = + filmModel.cloudMassTrans().boundaryField()[filmPatchi]; + filmModel.toPrimary(filmPatchi, this->massParcelPatch_); + + this->diameterParcelPatch_ = + filmModel.cloudDiameterTrans().boundaryField()[filmPatchi]; + filmModel.toPrimary(filmPatchi, this->diameterParcelPatch_); + + UFilmPatch_ = filmModel.U().boundaryField()[filmPatchi]; + filmModel.toPrimary(filmPatchi, UFilmPatch_); + + rhoFilmPatch_ = filmModel.rho().boundaryField()[filmPatchi]; + filmModel.toPrimary(filmPatchi, rhoFilmPatch_); + + this->deltaFilmPatch_ = + filmModel.delta().boundaryField()[filmPatchi]; + filmModel.toPrimary(filmPatchi, this->deltaFilmPatch_); const thermoSurfaceFilm& thermalFilmModel = refCast(filmModel); @@ -515,7 +545,19 @@ void Foam::ThermoSurfaceFilm::setParcelProperties const label filmFacei ) const { - SurfaceFilmModel::setParcelProperties(p, filmFacei); + // Set parcel properties + const scalar vol = + mathematical::pi/6.0*pow3(this->diameterParcelPatch_[filmFacei]); + p.d() = this->diameterParcelPatch_[filmFacei]; + p.U() = UFilmPatch_[filmFacei]; + p.rho() = rhoFilmPatch_[filmFacei]; + + p.nParticle() = this->massParcelPatch_[filmFacei]/p.rho()/vol; + + if (this->ejectedParcelType_ >= 0) + { + p.typeId() = this->ejectedParcelType_; + } // Set parcel properties p.T() = TFilmPatch_[filmFacei]; @@ -543,6 +585,8 @@ Foam::ThermoSurfaceFilm::ThermoSurfaceFilm ) ), surfaceFilms_(), + UFilmPatch_(0), + rhoFilmPatch_(0), TFilmPatch_(0), CpFilmPatch_(0), interactionType_ @@ -584,6 +628,8 @@ Foam::ThermoSurfaceFilm::ThermoSurfaceFilm rndGen_(sfm.rndGen_), surfaceFilmNames_(sfm.surfaceFilmNames_), surfaceFilms_(), + UFilmPatch_(sfm.UFilmPatch_), + rhoFilmPatch_(sfm.rhoFilmPatch_), TFilmPatch_(sfm.TFilmPatch_), CpFilmPatch_(sfm.CpFilmPatch_), interactionType_(sfm.interactionType_), @@ -646,7 +692,7 @@ bool Foam::ThermoSurfaceFilm::transferParcel } case interactionType::splashBai: { - if (this->deltaFilmPatch_[patchi][facei] < deltaWet_) + if (this->deltaFilmPatch_[facei] < deltaWet_) { drySplashInteraction ( diff --git a/src/lagrangian/parcel/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H b/src/lagrangian/parcel/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H index a9e51aaa8d..5c71a0f3a4 100644 --- a/src/lagrangian/parcel/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H +++ b/src/lagrangian/parcel/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,6 +56,11 @@ SourceFiles namespace Foam { +// Forward declaration of classes +class surfaceFilm; +class Random; + + /*---------------------------------------------------------------------------*\ Class ThermoSurfaceFilmBase Declaration \*---------------------------------------------------------------------------*/ @@ -87,9 +92,15 @@ class ThermoSurfaceFilm public SurfaceFilmModel, public ThermoSurfaceFilmBase { + // Private Member Functions + + //- Return pointers to the films + UPtrList& surfaceFilmPtrs() const; + + protected: - // Protected data + // Protected Data //- Convenience typedef to the cloud's parcel type typedef typename CloudType::parcelType parcelType; @@ -106,9 +117,18 @@ protected: //- Pointers to the surface films mutable UPtrList surfaceFilms_; + //- List of film patches + mutable labelList filmPatches_; + // Cached injector fields per film patch + //- Film velocity / patch face + vectorField UFilmPatch_; + + //- Film density / patch face + scalarField rhoFilmPatch_; + //- Film temperature / patch face scalarField TFilmPatch_; @@ -219,17 +239,11 @@ protected: bool& keepParticle ); - //- Return pointers to the films - virtual UPtrList& surfaceFilmPtrs() const; + virtual const labelList& filmPatches() const; //- Cache the film fields in preparation for injection - virtual void cacheFilmFields - ( - const label filmPatchi, - const label primaryPatchi, - const surfaceFilm& filmModel - ); + virtual void cacheFilmFields(const label filmi); //- Set the individual parcel properties virtual void setParcelProperties diff --git a/src/lagrangian/parcelTurbulence/Make/options b/src/lagrangian/parcelTurbulence/Make/options index c390bddfe7..3163e11daa 100644 --- a/src/lagrangian/parcelTurbulence/Make/options +++ b/src/lagrangian/parcelTurbulence/Make/options @@ -10,7 +10,6 @@ EXE_INC = \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ - -I$(LIB_SRC)/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude @@ -28,7 +27,6 @@ LIB_LIBS = \ -lincompressibleMomentumTransportModels \ -lcompressibleMomentumTransportModels \ -lphysicalProperties \ - -lsurfaceFilmModels \ -lsampling \ -lfiniteVolume \ -lmeshTools diff --git a/src/parcelSurfaceFilmModels/Make/files b/src/parcelSurfaceFilmModels/Make/files new file mode 100644 index 0000000000..74ba6c98ab --- /dev/null +++ b/src/parcelSurfaceFilmModels/Make/files @@ -0,0 +1,7 @@ +ThermoSurfaceFilmBase.C +makeThermoParcelSurfaceFilmModels.C +makeReactingParcelSurfaceFilmModels.C +makeReactingMultiphaseParcelSurfaceFilmModels.C +makeSprayParcelSurfaceFilmModels.C + +LIB = $(FOAM_LIBBIN)/libparcelSurfaceFilmModels diff --git a/src/parcelSurfaceFilmModels/Make/options b/src/parcelSurfaceFilmModels/Make/options new file mode 100644 index 0000000000..c102700810 --- /dev/null +++ b/src/parcelSurfaceFilmModels/Make/options @@ -0,0 +1,23 @@ +EXE_INC = \ + -I$(LIB_SRC)/lagrangian/basic/lnInclude \ + -I$(LIB_SRC)/lagrangian/parcel/lnInclude \ + -I$(LIB_SRC)/physicalProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/multicomponentThermo/lnInclude \ + -I$(LIB_SRC)/surfaceFilmModels/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude + +LIB_LIBS = \ + -llagrangian \ + -llagrangianParcel \ + -lphysicalProperties \ + -lspecie \ + -lfluidThermophysicalModels \ + -lthermophysicalProperties \ + -lmulticomponentThermophysicalModels \ + -lsurfaceFilmModels \ + -lfiniteVolume \ + -lmeshTools diff --git a/src/lagrangian/parcel/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilmBase.C b/src/parcelSurfaceFilmModels/ThermoSurfaceFilmBase.C similarity index 95% rename from src/lagrangian/parcel/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilmBase.C rename to src/parcelSurfaceFilmModels/ThermoSurfaceFilmBase.C index e503357e8e..6ecce111c5 100644 --- a/src/lagrangian/parcel/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilmBase.C +++ b/src/parcelSurfaceFilmModels/ThermoSurfaceFilmBase.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/parcelSurfaceFilmModels/makeReactingMultiphaseParcelSurfaceFilmModels.C b/src/parcelSurfaceFilmModels/makeReactingMultiphaseParcelSurfaceFilmModels.C new file mode 100644 index 0000000000..92cbe3f473 --- /dev/null +++ b/src/parcelSurfaceFilmModels/makeReactingMultiphaseParcelSurfaceFilmModels.C @@ -0,0 +1,33 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2023 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 "reactingMultiphaseCloud.H" +#include "makeReactingParcelSurfaceFilmModels.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeReactingParcelSurfaceFilmModels(reactingMultiphaseCloud); + +// ************************************************************************* // diff --git a/src/parcelSurfaceFilmModels/makeReactingParcelSurfaceFilmModels.C b/src/parcelSurfaceFilmModels/makeReactingParcelSurfaceFilmModels.C new file mode 100644 index 0000000000..a2005802eb --- /dev/null +++ b/src/parcelSurfaceFilmModels/makeReactingParcelSurfaceFilmModels.C @@ -0,0 +1,33 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2023 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 "reactingCloud.H" +#include "makeReactingParcelSurfaceFilmModels.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeReactingParcelSurfaceFilmModels(reactingCloud); + +// ************************************************************************* // diff --git a/src/lagrangian/parcel/parcels/include/makeReactingParcelSurfaceFilmModels.H b/src/parcelSurfaceFilmModels/makeReactingParcelSurfaceFilmModels.H similarity index 83% rename from src/lagrangian/parcel/parcels/include/makeReactingParcelSurfaceFilmModels.H rename to src/parcelSurfaceFilmModels/makeReactingParcelSurfaceFilmModels.H index b2d06be824..0381c001e5 100644 --- a/src/lagrangian/parcel/parcels/include/makeReactingParcelSurfaceFilmModels.H +++ b/src/parcelSurfaceFilmModels/makeReactingParcelSurfaceFilmModels.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,15 +28,11 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "NoSurfaceFilm.H" #include "ThermoSurfaceFilm.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #define makeReactingParcelSurfaceFilmModels(CloudType) \ - \ - makeSurfaceFilmModel(CloudType); \ - makeSurfaceFilmModelType(NoSurfaceFilm, CloudType); \ makeSurfaceFilmModelType(ThermoSurfaceFilm, CloudType); diff --git a/src/parcelSurfaceFilmModels/makeSprayParcelSurfaceFilmModels.C b/src/parcelSurfaceFilmModels/makeSprayParcelSurfaceFilmModels.C new file mode 100644 index 0000000000..ba61f6e8ab --- /dev/null +++ b/src/parcelSurfaceFilmModels/makeSprayParcelSurfaceFilmModels.C @@ -0,0 +1,33 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2023 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 "sprayCloud.H" +#include "makeReactingParcelSurfaceFilmModels.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeReactingParcelSurfaceFilmModels(sprayCloud); + +// ************************************************************************* // diff --git a/src/parcelSurfaceFilmModels/makeThermoParcelSurfaceFilmModels.C b/src/parcelSurfaceFilmModels/makeThermoParcelSurfaceFilmModels.C new file mode 100644 index 0000000000..c7855d45ae --- /dev/null +++ b/src/parcelSurfaceFilmModels/makeThermoParcelSurfaceFilmModels.C @@ -0,0 +1,33 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2023 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 "thermoCloud.H" +#include "makeThermoParcelSurfaceFilmModels.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makeThermoParcelSurfaceFilmModels(thermoCloud); + +// ************************************************************************* // diff --git a/src/parcelSurfaceFilmModels/makeThermoParcelSurfaceFilmModels.H b/src/parcelSurfaceFilmModels/makeThermoParcelSurfaceFilmModels.H new file mode 100644 index 0000000000..68e305655f --- /dev/null +++ b/src/parcelSurfaceFilmModels/makeThermoParcelSurfaceFilmModels.H @@ -0,0 +1,42 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2011-2023 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 . + +\*---------------------------------------------------------------------------*/ + +#ifndef makeThermoParcelSurfaceFilmModels_H +#define makeThermoParcelSurfaceFilmModels_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "ThermoSurfaceFilm.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeThermoParcelSurfaceFilmModels(CloudType) \ + makeSurfaceFilmModelType(ThermoSurfaceFilm, CloudType); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/tutorials/modules/compressibleVoF/cylinder/constant/cloudProperties b/tutorials/modules/compressibleVoF/cylinder/constant/cloudProperties index fc5331c95b..5493826b3e 100644 --- a/tutorials/modules/compressibleVoF/cylinder/constant/cloudProperties +++ b/tutorials/modules/compressibleVoF/cylinder/constant/cloudProperties @@ -16,6 +16,8 @@ FoamFile type thermoCloud; +libs ("libparcelSurfaceFilmModels.so"); + solution { coupled no; diff --git a/tutorials/modules/compressibleVoF/cylinder/system/blockMeshDict b/tutorials/modules/compressibleVoF/cylinder/system/blockMeshDict index e22ef4d2b1..f5c743f7ba 100644 --- a/tutorials/modules/compressibleVoF/cylinder/system/blockMeshDict +++ b/tutorials/modules/compressibleVoF/cylinder/system/blockMeshDict @@ -108,13 +108,7 @@ boundary (1 2 21 20) (12 11 30 31) (13 12 31 32) - ); - } - cylinder - { - type wall; - faces - ( + (5 0 19 24) (10 5 24 29) (16 10 29 35) diff --git a/tutorials/modules/compressibleVoF/cylinder/system/extrudeToRegionMeshDict b/tutorials/modules/compressibleVoF/cylinder/system/extrudeToRegionMeshDict index 74d04d0b84..2bfe70ed3c 100644 --- a/tutorials/modules/compressibleVoF/cylinder/system/extrudeToRegionMeshDict +++ b/tutorials/modules/compressibleVoF/cylinder/system/extrudeToRegionMeshDict @@ -15,7 +15,7 @@ FoamFile region wallFilm; -patches (walls cylinder); +patches (walls); extrudeModel linearNormal; diff --git a/tutorials/modules/multicomponentFluid/cylinder/0/wallFilm/T b/tutorials/modules/multicomponentFluid/cylinder/0/wallFilm/T index b856352862..8de58edd3e 100644 --- a/tutorials/modules/multicomponentFluid/cylinder/0/wallFilm/T +++ b/tutorials/modules/multicomponentFluid/cylinder/0/wallFilm/T @@ -22,7 +22,7 @@ boundaryField { #includeEtc "caseDicts/setConstraintTypes" - "(sides|frontAndBack|walls_top|cylinder_top)" + "(sides|frontAndBack|walls_top)" { type zeroGradient; } diff --git a/tutorials/modules/multicomponentFluid/cylinder/0/wallFilm/U b/tutorials/modules/multicomponentFluid/cylinder/0/wallFilm/U index 2df447c54d..9e7bbd2447 100644 --- a/tutorials/modules/multicomponentFluid/cylinder/0/wallFilm/U +++ b/tutorials/modules/multicomponentFluid/cylinder/0/wallFilm/U @@ -22,7 +22,7 @@ boundaryField { #includeEtc "caseDicts/setConstraintTypes" - "(walls_top|cylinder_top)" + walls_top { type slip; } diff --git a/tutorials/modules/multicomponentFluid/cylinder/0/wallFilm/delta b/tutorials/modules/multicomponentFluid/cylinder/0/wallFilm/delta index 7f268aeac9..8a19988575 100644 --- a/tutorials/modules/multicomponentFluid/cylinder/0/wallFilm/delta +++ b/tutorials/modules/multicomponentFluid/cylinder/0/wallFilm/delta @@ -22,7 +22,7 @@ boundaryField { #includeEtc "caseDicts/setConstraintTypes" - "(sides|frontAndBack|walls_top|cylinder_top)" + "(sides|frontAndBack|walls_top)" { type zeroGradient; } diff --git a/tutorials/modules/multicomponentFluid/cylinder/constant/cloudProperties b/tutorials/modules/multicomponentFluid/cylinder/constant/cloudProperties index 5f778c271e..e4b2b6539b 100644 --- a/tutorials/modules/multicomponentFluid/cylinder/constant/cloudProperties +++ b/tutorials/modules/multicomponentFluid/cylinder/constant/cloudProperties @@ -16,6 +16,8 @@ FoamFile type reactingCloud; +libs ("libparcelSurfaceFilmModels.so"); + solution { coupled no; diff --git a/tutorials/modules/multicomponentFluid/cylinder/system/blockMeshDict b/tutorials/modules/multicomponentFluid/cylinder/system/blockMeshDict index e22ef4d2b1..f5c743f7ba 100644 --- a/tutorials/modules/multicomponentFluid/cylinder/system/blockMeshDict +++ b/tutorials/modules/multicomponentFluid/cylinder/system/blockMeshDict @@ -108,13 +108,7 @@ boundary (1 2 21 20) (12 11 30 31) (13 12 31 32) - ); - } - cylinder - { - type wall; - faces - ( + (5 0 19 24) (10 5 24 29) (16 10 29 35) diff --git a/tutorials/modules/multicomponentFluid/cylinder/system/extrudeToRegionMeshDict b/tutorials/modules/multicomponentFluid/cylinder/system/extrudeToRegionMeshDict index 74d04d0b84..2bfe70ed3c 100644 --- a/tutorials/modules/multicomponentFluid/cylinder/system/extrudeToRegionMeshDict +++ b/tutorials/modules/multicomponentFluid/cylinder/system/extrudeToRegionMeshDict @@ -15,7 +15,7 @@ FoamFile region wallFilm; -patches (walls cylinder); +patches (walls); extrudeModel linearNormal; diff --git a/tutorials/modules/multicomponentFluid/hotBoxes/constant/cloudProperties b/tutorials/modules/multicomponentFluid/hotBoxes/constant/cloudProperties index 9061ecd028..16c47d6d60 100644 --- a/tutorials/modules/multicomponentFluid/hotBoxes/constant/cloudProperties +++ b/tutorials/modules/multicomponentFluid/hotBoxes/constant/cloudProperties @@ -16,6 +16,8 @@ FoamFile type reactingCloud; +libs ("libparcelSurfaceFilmModels.so"); + solution { coupled yes; diff --git a/tutorials/modules/multicomponentFluid/hotBoxes/system/blockMeshDict b/tutorials/modules/multicomponentFluid/hotBoxes/system/blockMeshDict index 2572e50bc1..c98e84a5f6 100644 --- a/tutorials/modules/multicomponentFluid/hotBoxes/system/blockMeshDict +++ b/tutorials/modules/multicomponentFluid/hotBoxes/system/blockMeshDict @@ -46,7 +46,7 @@ boundary (1 5 4 0) ); } - floor + boxes { type wall; faces @@ -54,12 +54,6 @@ boundary (0 3 2 1) ); } - boxes - { - type wall; - faces - (); - } ); diff --git a/tutorials/modules/multicomponentFluid/hotBoxes/system/extrudeToRegionMeshDict b/tutorials/modules/multicomponentFluid/hotBoxes/system/extrudeToRegionMeshDict index 032c9056b7..829db326af 100644 --- a/tutorials/modules/multicomponentFluid/hotBoxes/system/extrudeToRegionMeshDict +++ b/tutorials/modules/multicomponentFluid/hotBoxes/system/extrudeToRegionMeshDict @@ -15,7 +15,7 @@ FoamFile region wallFilm; -patches (floor boxes); +patches (boxes); extrudeModel linearNormal; diff --git a/tutorials/modules/multicomponentFluid/splashPanel/constant/cloudProperties b/tutorials/modules/multicomponentFluid/splashPanel/constant/cloudProperties index 654635f7ad..44ccd74da5 100644 --- a/tutorials/modules/multicomponentFluid/splashPanel/constant/cloudProperties +++ b/tutorials/modules/multicomponentFluid/splashPanel/constant/cloudProperties @@ -16,6 +16,8 @@ FoamFile type reactingCloud; +libs ("libparcelSurfaceFilmModels.so"); + solution { coupled no;