From 34c0e8b45b5905129577bf8b405e397f3fde403c Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Wed, 17 May 2023 16:01:48 +0100 Subject: [PATCH] surfaceFilmModels: Superseded by the new isothermalFilm and film solver modules The new general multi-region framework using the isothermalFilm and film solver modules and executed with foamMultiRun is a much more flexible approach to the inclusion of liquid films in simulations with the support for coupling to other regions of various types e.g. gas flows, Lagrangian clouds, VoF, CHT etc. This has all been achieved with a significant reduction in the number of lines of code and significant improvements in code structure, readability and maintainability. --- .../solvers/modules/compressibleVoF/Allwclean | 1 - .../solvers/modules/compressibleVoF/Allwmake | 1 - .../fvModels/VoFSurfaceFilm/Make/files | 4 - .../fvModels/VoFSurfaceFilm/Make/options | 15 - .../VoFPatchTransfer/VoFPatchTransfer.C | 357 ----- .../VoFPatchTransfer/VoFPatchTransfer.H | 143 -- .../fvModels/VoFSurfaceFilm/VoFSurfaceFilm.C | 197 --- .../fvModels/VoFSurfaceFilm/VoFSurfaceFilm.H | 176 --- bin/foamInfo | 3 +- etc/caseDicts/fvModels/surfaceFilms | 20 - src/Allwmake | 3 - .../Templates/MomentumCloud/MomentumCloud.C | 10 +- .../Templates/MomentumCloud/MomentumCloud.H | 5 +- .../Templates/MomentumCloud/MomentumCloudI.H | 4 +- src/parcelSurfaceFilmModels/Make/files | 7 - src/parcelSurfaceFilmModels/Make/options | 23 - .../ThermoSurfaceFilm/ThermoSurfaceFilm.C | 752 ----------- .../ThermoSurfaceFilm/ThermoSurfaceFilm.H | 318 ----- .../ThermoSurfaceFilm/ThermoSurfaceFilmBase.C | 48 - ...eactingMultiphaseParcelSurfaceFilmModels.C | 33 - .../makeReactingParcelSurfaceFilmModels.C | 33 - .../makeSprayParcelSurfaceFilmModels.C | 33 - .../makeThermoParcelSurfaceFilmModels.C | 33 - src/surfaceFilmModels/Make/files | 76 -- src/surfaceFilmModels/Make/options | 23 - ...ilmHeightInletVelocityFvPatchVectorField.C | 152 --- ...ilmHeightInletVelocityFvPatchVectorField.H | 236 ---- ...linedFilmNusseltHeightFvPatchScalarField.C | 215 --- ...linedFilmNusseltHeightFvPatchScalarField.H | 149 --- ...lmNusseltInletVelocityFvPatchVectorField.C | 211 --- ...lmNusseltInletVelocityFvPatchVectorField.H | 152 --- ...alphatFilmWallFunctionFvPatchScalarField.C | 263 ---- ...alphatFilmWallFunctionFvPatchScalarField.H | 195 --- .../nutkFilmWallFunctionFvPatchScalarField.C | 248 ---- .../nutkFilmWallFunctionFvPatchScalarField.H | 180 --- .../fvModels/surfaceFilms/surfaceFilms.C | 309 ----- .../fvModels/surfaceFilms/surfaceFilms.H | 182 --- .../momentumSurfaceFilm/momentumSurfaceFilm.C | 1154 ----------------- .../momentumSurfaceFilm/momentumSurfaceFilm.H | 534 -------- .../momentumSurfaceFilmI.H | 249 ---- .../momentumSurfaceFilmTemplates.C | 67 - .../submodels/filmSubModelBase.C | 105 -- .../submodels/filmSubModelBase.H | 134 -- .../submodels/filmSubModelBaseI.H | 52 - .../submodels/filmSubModelBaseTemplates.C | 53 - .../BrunDrippingEjection.C | 143 -- .../BrunDrippingEjection.H | 149 --- .../curvatureSeparation/curvatureSeparation.C | 325 ----- .../curvatureSeparation/curvatureSeparation.H | 156 --- .../drippingEjection/drippingEjection.C | 164 --- .../drippingEjection/drippingEjection.H | 135 -- .../ejectionModel/ejectionModel.C | 101 -- .../ejectionModel/ejectionModel.H | 164 --- .../ejectionModel/ejectionModelNew.C | 67 - .../ejectionModelList/ejectionModelList.C | 198 --- .../ejectionModelList/ejectionModelList.H | 121 -- .../patchEjection/patchEjection.C | 203 --- .../patchEjection/patchEjection.H | 122 -- .../filmMomentumTransportModel.C | 73 -- .../filmMomentumTransportModel.H | 140 -- .../filmMomentumTransportModelNew.C | 90 -- .../laminar/laminar.C | 124 -- .../laminar/laminar.H | 110 -- .../Arrhenius/ArrheniusViscosity.C | 90 -- .../Arrhenius/ArrheniusViscosity.H | 131 -- .../Newtonian/NewtonianViscosity.C | 86 -- .../Newtonian/NewtonianViscosity.H | 108 -- .../constant/constantViscosity.C | 86 -- .../constant/constantViscosity.H | 116 -- .../filmViscosityModel/filmViscosityModel.C | 72 - .../filmViscosityModel/filmViscosityModel.H | 151 --- .../filmViscosityModelNew.C | 88 -- .../function1/function1Viscosity.C | 91 -- .../function1/function1Viscosity.H | 118 -- .../thixotropic/thixotropicViscosity.C | 186 --- .../thixotropic/thixotropicViscosity.H | 175 --- .../waxSolvent/waxSolventViscosity.C | 188 --- .../waxSolvent/waxSolventViscosity.H | 128 -- .../contactAngleForce/contactAngleForce.C | 237 ---- .../contactAngleForce/contactAngleForce.H | 125 -- .../distributionContactAngleForce.C | 118 -- .../distributionContactAngleForce.H | 124 -- ...bedTemperatureDependentContactAngleForce.C | 135 -- ...bedTemperatureDependentContactAngleForce.H | 134 -- .../temperatureDependentContactAngleForce.C | 106 -- .../temperatureDependentContactAngleForce.H | 118 -- .../submodels/momentum/force/force/force.C | 70 - .../submodels/momentum/force/force/force.H | 134 -- .../submodels/momentum/force/force/forceNew.C | 67 - .../momentum/force/forceList/forceList.C | 123 -- .../momentum/force/forceList/forceList.H | 92 -- .../thermocapillaryForce.C | 78 -- .../thermocapillaryForce.H | 102 -- .../transferModel/transferModel.C | 102 -- .../transferModel/transferModel.H | 173 --- .../transferModel/transferModelNew.C | 67 - .../transferModelList/transferModelList.C | 232 ---- .../transferModelList/transferModelList.H | 125 -- .../constantRadiation/constantRadiation.C | 130 -- .../constantRadiation/constantRadiation.H | 128 -- .../filmRadiationModel/filmRadiationModel.C | 70 - .../filmRadiationModel/filmRadiationModel.H | 136 -- .../filmRadiationModelNew.C | 93 -- .../noRadiation/noRadiation.C | 88 -- .../noRadiation/noRadiation.H | 106 -- .../primaryRadiation/primaryRadiation.C | 109 -- .../primaryRadiation/primaryRadiation.H | 114 -- .../standardRadiation/standardRadiation.C | 112 -- .../standardRadiation/standardRadiation.H | 122 -- .../constantHeatTransfer.C | 93 -- .../constantHeatTransfer.H | 112 -- .../heatTransferModel/heatTransferModel.C | 73 -- .../heatTransferModel/heatTransferModel.H | 136 -- .../heatTransferModel/heatTransferModelNew.C | 87 -- .../mappedConvectiveHeatTransfer.C | 118 -- .../mappedConvectiveHeatTransfer.H | 119 -- .../noPhaseChange/noPhaseChange.C | 86 -- .../noPhaseChange/noPhaseChange.H | 113 -- .../phaseChangeModel/phaseChangeModel.C | 125 -- .../phaseChangeModel/phaseChangeModel.H | 165 --- .../phaseChangeModel/phaseChangeModelNew.C | 93 -- .../solidification/solidification.C | 159 --- .../solidification/solidification.H | 128 -- .../speciePhaseChange/speciePhaseChange.C | 98 -- .../speciePhaseChange/speciePhaseChange.H | 104 -- .../standardPhaseChange/standardPhaseChange.C | 236 ---- .../standardPhaseChange/standardPhaseChange.H | 142 -- .../waxSolventEvaporation.C | 417 ------ .../waxSolventEvaporation.H | 157 --- .../surfaceFilm/surfaceFilm.C | 393 ------ .../surfaceFilm/surfaceFilm.H | 354 ----- .../surfaceFilm/surfaceFilmI.H | 159 --- .../surfaceFilm/surfaceFilmTemplates.C | 158 --- .../thermoSurfaceFilm/thermoSurfaceFilm.C | 646 --------- .../thermoSurfaceFilm/thermoSurfaceFilm.H | 331 ----- .../thermoSurfaceFilm/thermoSurfaceFilmI.H | 96 -- .../multicomponentFluid/hotBoxes/0/H2O | 37 - .../modules/multicomponentFluid/hotBoxes/0/N2 | 37 - .../modules/multicomponentFluid/hotBoxes/0/O2 | 37 - .../modules/multicomponentFluid/hotBoxes/0/T | 39 - .../modules/multicomponentFluid/hotBoxes/0/U | 39 - .../multicomponentFluid/hotBoxes/0/alphat | 45 - .../multicomponentFluid/hotBoxes/0/epsilon | 39 - .../multicomponentFluid/hotBoxes/0/htcConv | 40 - .../modules/multicomponentFluid/hotBoxes/0/k | 39 - .../multicomponentFluid/hotBoxes/0/nut | 41 - .../modules/multicomponentFluid/hotBoxes/0/p | 39 - .../multicomponentFluid/hotBoxes/0/p_rgh | 39 - .../multicomponentFluid/hotBoxes/0/wallFilm/T | 42 - .../multicomponentFluid/hotBoxes/0/wallFilm/U | 41 - .../hotBoxes/0/wallFilm/delta | 41 - .../multicomponentFluid/hotBoxes/Allclean | 9 - .../multicomponentFluid/hotBoxes/Allrun | 30 - .../hotBoxes/constant/cloudProperties | 157 --- .../hotBoxes/constant/fvModels | 20 - .../multicomponentFluid/hotBoxes/constant/g | 21 - .../hotBoxes/constant/momentumTransport | 29 - .../hotBoxes/constant/physicalProperties | 41 - .../hotBoxes/constant/speciesThermo | 72 - .../hotBoxes/constant/surfaceFilmProperties | 111 -- .../constant/wallFilm/physicalProperties | 31 - .../hotBoxes/system/blockMeshDict | 60 - .../hotBoxes/system/controlDict | 57 - .../hotBoxes/system/decomposeParDict | 28 - .../hotBoxes/system/extrudeToRegionMeshDict | 33 - .../hotBoxes/system/fvSchemes | 58 - .../hotBoxes/system/fvSolution | 87 -- .../hotBoxes/system/topoSetDict | 59 - .../hotBoxes/system/wallFilm/fvSchemes | 49 - .../hotBoxes/system/wallFilm/fvSolution | 55 - 170 files changed, 10 insertions(+), 21717 deletions(-) delete mode 100644 applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/Make/files delete mode 100644 applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/Make/options delete mode 100644 applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.C delete mode 100644 applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.H delete mode 100644 applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFSurfaceFilm.C delete mode 100644 applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFSurfaceFilm.H delete mode 100644 etc/caseDicts/fvModels/surfaceFilms delete mode 100644 src/parcelSurfaceFilmModels/Make/files delete mode 100644 src/parcelSurfaceFilmModels/Make/options delete mode 100644 src/parcelSurfaceFilmModels/ThermoSurfaceFilm/ThermoSurfaceFilm.C delete mode 100644 src/parcelSurfaceFilmModels/ThermoSurfaceFilm/ThermoSurfaceFilm.H delete mode 100644 src/parcelSurfaceFilmModels/ThermoSurfaceFilm/ThermoSurfaceFilmBase.C delete mode 100644 src/parcelSurfaceFilmModels/makeReactingMultiphaseParcelSurfaceFilmModels.C delete mode 100644 src/parcelSurfaceFilmModels/makeReactingParcelSurfaceFilmModels.C delete mode 100644 src/parcelSurfaceFilmModels/makeSprayParcelSurfaceFilmModels.C delete mode 100644 src/parcelSurfaceFilmModels/makeThermoParcelSurfaceFilmModels.C delete mode 100644 src/surfaceFilmModels/Make/files delete mode 100644 src/surfaceFilmModels/Make/options delete mode 100644 src/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.C delete mode 100644 src/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.H delete mode 100644 src/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C delete mode 100644 src/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.H delete mode 100644 src/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C delete mode 100644 src/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.H delete mode 100644 src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C delete mode 100644 src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.H delete mode 100644 src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C delete mode 100644 src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.H delete mode 100644 src/surfaceFilmModels/fvModels/surfaceFilms/surfaceFilms.C delete mode 100644 src/surfaceFilmModels/fvModels/surfaceFilms/surfaceFilms.H delete mode 100644 src/surfaceFilmModels/momentumSurfaceFilm/momentumSurfaceFilm.C delete mode 100644 src/surfaceFilmModels/momentumSurfaceFilm/momentumSurfaceFilm.H delete mode 100644 src/surfaceFilmModels/momentumSurfaceFilm/momentumSurfaceFilmI.H delete mode 100644 src/surfaceFilmModels/momentumSurfaceFilm/momentumSurfaceFilmTemplates.C delete mode 100644 src/surfaceFilmModels/submodels/filmSubModelBase.C delete mode 100644 src/surfaceFilmModels/submodels/filmSubModelBase.H delete mode 100644 src/surfaceFilmModels/submodels/filmSubModelBaseI.H delete mode 100644 src/surfaceFilmModels/submodels/filmSubModelBaseTemplates.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/ejectionModel/BrunDrippingEjection/BrunDrippingEjection.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/ejectionModel/BrunDrippingEjection/BrunDrippingEjection.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/ejectionModel/curvatureSeparation/curvatureSeparation.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/ejectionModel/curvatureSeparation/curvatureSeparation.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/ejectionModel/drippingEjection/drippingEjection.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/ejectionModel/drippingEjection/drippingEjection.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/ejectionModel/ejectionModel/ejectionModel.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/ejectionModel/ejectionModel/ejectionModel.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/ejectionModel/ejectionModel/ejectionModelNew.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/ejectionModel/ejectionModelList/ejectionModelList.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/ejectionModel/ejectionModelList/ejectionModelList.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/ejectionModel/patchEjection/patchEjection.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/ejectionModel/patchEjection/patchEjection.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/filmMomentumTransportModel/filmMomentumTransportModel/filmMomentumTransportModel.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/filmMomentumTransportModel/filmMomentumTransportModel/filmMomentumTransportModel.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/filmMomentumTransportModel/filmMomentumTransportModel/filmMomentumTransportModelNew.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/filmMomentumTransportModel/laminar/laminar.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/filmMomentumTransportModel/laminar/laminar.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/filmViscosityModel/Arrhenius/ArrheniusViscosity.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/filmViscosityModel/Arrhenius/ArrheniusViscosity.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/filmViscosityModel/Newtonian/NewtonianViscosity.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/filmViscosityModel/Newtonian/NewtonianViscosity.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/filmViscosityModel/constant/constantViscosity.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/filmViscosityModel/constant/constantViscosity.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/filmViscosityModel/filmViscosityModel/filmViscosityModel.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/filmViscosityModel/filmViscosityModel/filmViscosityModel.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/filmViscosityModel/filmViscosityModel/filmViscosityModelNew.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/filmViscosityModel/function1/function1Viscosity.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/filmViscosityModel/function1/function1Viscosity.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/filmViscosityModel/thixotropic/thixotropicViscosity.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/filmViscosityModel/thixotropic/thixotropicViscosity.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/filmViscosityModel/waxSolvent/waxSolventViscosity.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/filmViscosityModel/waxSolvent/waxSolventViscosity.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/force/contactAngleForces/contactAngleForce/contactAngleForce.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/force/contactAngleForces/contactAngleForce/contactAngleForce.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/force/contactAngleForces/distribution/distributionContactAngleForce.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/force/contactAngleForces/distribution/distributionContactAngleForce.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/force/contactAngleForces/perturbedTemperatureDependent/perturbedTemperatureDependentContactAngleForce.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/force/contactAngleForces/perturbedTemperatureDependent/perturbedTemperatureDependentContactAngleForce.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/force/force/force.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/force/force/force.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/force/force/forceNew.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/force/forceList/forceList.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/force/forceList/forceList.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/force/thermocapillaryForce/thermocapillaryForce.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/force/thermocapillaryForce/thermocapillaryForce.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/transferModels/transferModel/transferModel.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/transferModels/transferModel/transferModel.H delete mode 100644 src/surfaceFilmModels/submodels/momentum/transferModels/transferModel/transferModelNew.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/transferModels/transferModelList/transferModelList.C delete mode 100644 src/surfaceFilmModels/submodels/momentum/transferModels/transferModelList/transferModelList.H delete mode 100644 src/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C delete mode 100644 src/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.H delete mode 100644 src/surfaceFilmModels/submodels/thermo/filmRadiationModel/filmRadiationModel/filmRadiationModel.C delete mode 100644 src/surfaceFilmModels/submodels/thermo/filmRadiationModel/filmRadiationModel/filmRadiationModel.H delete mode 100644 src/surfaceFilmModels/submodels/thermo/filmRadiationModel/filmRadiationModel/filmRadiationModelNew.C delete mode 100644 src/surfaceFilmModels/submodels/thermo/filmRadiationModel/noRadiation/noRadiation.C delete mode 100644 src/surfaceFilmModels/submodels/thermo/filmRadiationModel/noRadiation/noRadiation.H delete mode 100644 src/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.C delete mode 100644 src/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.H delete mode 100644 src/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C delete mode 100644 src/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.H delete mode 100644 src/surfaceFilmModels/submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.C delete mode 100644 src/surfaceFilmModels/submodels/thermo/heatTransferModel/constantHeatTransfer/constantHeatTransfer.H delete mode 100644 src/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModel.C delete mode 100644 src/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModel.H delete mode 100644 src/surfaceFilmModels/submodels/thermo/heatTransferModel/heatTransferModel/heatTransferModelNew.C delete mode 100644 src/surfaceFilmModels/submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.C delete mode 100644 src/surfaceFilmModels/submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.H delete mode 100644 src/surfaceFilmModels/submodels/thermo/phaseChangeModel/noPhaseChange/noPhaseChange.C delete mode 100644 src/surfaceFilmModels/submodels/thermo/phaseChangeModel/noPhaseChange/noPhaseChange.H delete mode 100644 src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModel.C delete mode 100644 src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModel.H delete mode 100644 src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C delete mode 100644 src/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C delete mode 100644 src/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.H delete mode 100644 src/surfaceFilmModels/submodels/thermo/phaseChangeModel/speciePhaseChange/speciePhaseChange.C delete mode 100644 src/surfaceFilmModels/submodels/thermo/phaseChangeModel/speciePhaseChange/speciePhaseChange.H delete mode 100644 src/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C delete mode 100644 src/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.H delete mode 100644 src/surfaceFilmModels/submodels/thermo/phaseChangeModel/waxSolventEvaporation/waxSolventEvaporation.C delete mode 100644 src/surfaceFilmModels/submodels/thermo/phaseChangeModel/waxSolventEvaporation/waxSolventEvaporation.H delete mode 100644 src/surfaceFilmModels/surfaceFilm/surfaceFilm.C delete mode 100644 src/surfaceFilmModels/surfaceFilm/surfaceFilm.H delete mode 100644 src/surfaceFilmModels/surfaceFilm/surfaceFilmI.H delete mode 100644 src/surfaceFilmModels/surfaceFilm/surfaceFilmTemplates.C delete mode 100644 src/surfaceFilmModels/thermoSurfaceFilm/thermoSurfaceFilm.C delete mode 100644 src/surfaceFilmModels/thermoSurfaceFilm/thermoSurfaceFilm.H delete mode 100644 src/surfaceFilmModels/thermoSurfaceFilm/thermoSurfaceFilmI.H delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/0/H2O delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/0/N2 delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/0/O2 delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/0/T delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/0/U delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/0/alphat delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/0/epsilon delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/0/htcConv delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/0/k delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/0/nut delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/0/p delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/0/p_rgh delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/0/wallFilm/T delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/0/wallFilm/U delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/0/wallFilm/delta delete mode 100755 tutorials/modules/multicomponentFluid/hotBoxes/Allclean delete mode 100755 tutorials/modules/multicomponentFluid/hotBoxes/Allrun delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/constant/cloudProperties delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/constant/fvModels delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/constant/g delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/constant/momentumTransport delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/constant/physicalProperties delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/constant/speciesThermo delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/constant/surfaceFilmProperties delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/constant/wallFilm/physicalProperties delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/system/blockMeshDict delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/system/controlDict delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/system/decomposeParDict delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/system/extrudeToRegionMeshDict delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/system/fvSchemes delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/system/fvSolution delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/system/topoSetDict delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/system/wallFilm/fvSchemes delete mode 100644 tutorials/modules/multicomponentFluid/hotBoxes/system/wallFilm/fvSolution diff --git a/applications/solvers/modules/compressibleVoF/Allwclean b/applications/solvers/modules/compressibleVoF/Allwclean index 6080e40894..238131457d 100755 --- a/applications/solvers/modules/compressibleVoF/Allwclean +++ b/applications/solvers/modules/compressibleVoF/Allwclean @@ -5,7 +5,6 @@ wclean wclean libso fvModels/VoFTurbulenceDamping wclean libso fvModels/VoFClouds -wclean libso fvModels/VoFSurfaceFilm wclean libso fvModels/VoFCavitation wclean libso fvModels/VoFSolidificationMeltingSource diff --git a/applications/solvers/modules/compressibleVoF/Allwmake b/applications/solvers/modules/compressibleVoF/Allwmake index a1b0ad6cb8..b62e4363b4 100755 --- a/applications/solvers/modules/compressibleVoF/Allwmake +++ b/applications/solvers/modules/compressibleVoF/Allwmake @@ -8,7 +8,6 @@ wmake $targetType wmake $targetType fvModels/VoFTurbulenceDamping wmake $targetType fvModels/VoFClouds -wmake $targetType fvModels/VoFSurfaceFilm wmake $targetType fvModels/VoFCavitation wmake $targetType fvModels/VoFSolidificationMeltingSource diff --git a/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/Make/files b/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/Make/files deleted file mode 100644 index 2556bea36c..0000000000 --- a/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/Make/files +++ /dev/null @@ -1,4 +0,0 @@ -VoFSurfaceFilm.C -VoFPatchTransfer/VoFPatchTransfer.C - -LIB = $(FOAM_LIBBIN)/libVoFSurfaceFilm diff --git a/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/Make/options b/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/Make/options deleted file mode 100644 index 3eec46f817..0000000000 --- a/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/Make/options +++ /dev/null @@ -1,15 +0,0 @@ -EXE_INC = \ - -I$(FOAM_SOLVERS)/modules/twoPhaseVoFSolver/lnInclude \ - -I$(FOAM_SOLVERS)/modules/twoPhaseSolver/lnInclude \ - -I$(FOAM_SOLVERS)/modules/VoFSolver/lnInclude \ - -I$(FOAM_SOLVERS)/modules/compressibleVoF/lnInclude \ - -I$(LIB_SRC)/physicalProperties/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \ - -I$(LIB_SRC)/twoPhaseModels/compressibleTwoPhases/lnInclude \ - -I$(LIB_SRC)/surfaceFilmModels/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -LIB_LIBS = \ - -lsurfaceFilmModels diff --git a/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.C b/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.C deleted file mode 100644 index 116cfd92ca..0000000000 --- a/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.C +++ /dev/null @@ -1,357 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-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 "VoFPatchTransfer.H" -#include "compressibleTwoPhaseVoFMixture.H" -#include "thermoSurfaceFilm.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace surfaceFilmModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(VoFPatchTransfer, 0); -addToRunTimeSelectionTable(transferModel, VoFPatchTransfer, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -VoFPatchTransfer::VoFPatchTransfer -( - surfaceFilm& film, - const dictionary& dict -) -: - transferModel(type(), film, dict), - deltaFactorToVoF_ - ( - coeffDict_.lookupOrDefault("deltaFactorToVoF", 1.0) - ), - deltaFactorToFilm_ - ( - coeffDict_.lookupOrDefault("deltaFactorToFilm", 0.5) - ), - alphaToVoF_ - ( - coeffDict_.lookupOrDefault("alphaToVoF", 0.5) - ), - alphaToFilm_ - ( - coeffDict_.lookupOrDefault("alphaToFilm", 0.1) - ), - transferRateCoeff_ - ( - coeffDict_.lookupOrDefault("transferRateCoeff", 0.1) - ) -{ - const polyBoundaryMesh& pbm = film.mesh().boundaryMesh(); - patchIDs_.setSize - ( - pbm.size() - film.mesh().globalData().processorPatches().size() - ); - - if (coeffDict_.found("patches")) - { - const wordReList patchNames(coeffDict_.lookup("patches")); - const labelHashSet patchSet = pbm.patchSet(patchNames); - - Info<< " applying to patches:" << nl; - - label pidi = 0; - forAllConstIter(labelHashSet, patchSet, iter) - { - const label patchi = iter.key(); - patchIDs_[pidi++] = patchi; - Info<< " " << pbm[patchi].name() << endl; - } - patchIDs_.setSize(pidi); - patchTransferredMasses_.setSize(pidi, 0); - } - else - { - Info<< " applying to all patches" << endl; - - forAll(patchIDs_, patchi) - { - patchIDs_[patchi] = patchi; - } - - patchTransferredMasses_.setSize(patchIDs_.size(), 0); - } - - if (!patchIDs_.size()) - { - FatalErrorInFunction - << "No patches selected" - << exit(FatalError); - } -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -VoFPatchTransfer::~VoFPatchTransfer() -{} - - -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - -void VoFPatchTransfer::correct -( - scalarField& availableMass, - scalarField& massToTransfer, - vectorField& momentumToTransfer -) -{ - NotImplemented; -} - - -void VoFPatchTransfer::correct -( - scalarField& availableMass, - scalarField& massToTransfer, - vectorField& momentumToTransfer, - scalarField& energyToTransfer -) -{ - // Do not correct if no patches selected - if (!patchIDs_.size()) return; - - // Film properties - - const thermoSurfaceFilm& film = filmType(); - - const scalarField& delta = film.delta(); - const scalarField& rho = film.rho(); - const vectorField& U = film.U(); - const scalarField& he = film.thermo().he(); - - const scalarField& magSf = film.magSf(); - - const polyBoundaryMesh& pbm = film.mesh().boundaryMesh(); - - - // Primary region properties - - const fvMesh& primaryMesh = film.primaryMesh(); - - const compressibleTwoPhaseVoFMixture& thermo - ( - primaryMesh.lookupObject - ( - "phaseProperties" - ) - ); - - const volScalarField& alphaVoF = thermo.alpha1(); - const volScalarField& rhoVoF = thermo.thermo1().rho()(); - const volScalarField& heVoF = thermo.thermo1().he(); - - const volVectorField& UVoF - ( - primaryMesh.lookupObject("U") - ); - - forAll(patchIDs_, pidi) - { - const label patchi = patchIDs_[pidi]; - label primaryPatchi = -1; - - forAll(film.intCoupledPatchIDs(), i) - { - const label filmPatchi = film.intCoupledPatchIDs()[i]; - - if (filmPatchi == patchi) - { - primaryPatchi = film.primaryPatchIDs()[i]; - } - } - - if (primaryPatchi != -1) - { - const scalarField deltaCoeffsVoF - ( - film.toFilm - ( - patchi, - primaryMesh.boundary()[primaryPatchi].deltaCoeffs() - ) - ); - - const scalarField alphaVoFp - ( - film.toFilm(patchi, alphaVoF.boundaryField()[primaryPatchi]) - ); - - const scalarField rhoVoFp - ( - film.toFilm(patchi, rhoVoF.boundaryField()[primaryPatchi]) - ); - - const vectorField UVoFp - ( - film.toFilm(patchi, UVoF.boundaryField()[primaryPatchi]) - ); - - const scalarField heVoFp - ( - film.toFilm(patchi, heVoF.boundaryField()[primaryPatchi]) - ); - - const scalarField VVoFp - ( - film.toFilm - ( - patchi, - primaryMesh.boundary()[primaryPatchi] - .patchInternalField(primaryMesh.V()) - ) - ); - - const polyPatch& pp = pbm[patchi]; - const labelList& faceCells = pp.faceCells(); - - // Accumulate the total mass removed from patch - scalar dMassPatch = 0; - - forAll(faceCells, facei) - { - const label celli = faceCells[facei]; - - scalar dMass = 0; - - // Film->VoF transfer - if - ( - delta[celli] > 2*deltaFactorToVoF_/deltaCoeffsVoF[facei] - || alphaVoFp[facei] > alphaToVoF_ - ) - { - dMass = - transferRateCoeff_*delta[celli]*rho[celli]*magSf[celli]; - - massToTransfer[celli] += dMass; - momentumToTransfer[celli] += dMass*U[celli]; - energyToTransfer[celli] += dMass*he[celli]; - } - - // VoF->film transfer - if - ( - alphaVoFp[facei] > 0 - && delta[celli] < 2*deltaFactorToFilm_/deltaCoeffsVoF[facei] - && alphaVoFp[facei] < alphaToFilm_ - ) - { - dMass = - -transferRateCoeff_ - *alphaVoFp[facei]*rhoVoFp[facei]*VVoFp[facei]; - - massToTransfer[celli] += dMass; - momentumToTransfer[celli] += dMass*UVoFp[facei]; - energyToTransfer[celli] += dMass*heVoFp[facei]; - } - - availableMass[celli] -= dMass; - dMassPatch += dMass; - } - - patchTransferredMasses_[pidi] += dMassPatch; - addToTransferredMass(dMassPatch); - } - } - - transferModel::correct(); - - if (writeTime()) - { - scalarField patchTransferredMasses0 - ( - getModelProperty - ( - "patchTransferredMasses", - scalarField(patchTransferredMasses_.size(), 0) - ) - ); - - scalarField patchTransferredMassTotals(patchTransferredMasses_); - Pstream::listCombineGather - ( - patchTransferredMassTotals, - plusEqOp() - ); - patchTransferredMasses0 += patchTransferredMassTotals; - - setModelProperty - ( - "patchTransferredMasses", - patchTransferredMasses0 - ); - - patchTransferredMasses_ = 0; - } -} - - -void VoFPatchTransfer::patchTransferredMassTotals -( - scalarField& patchMasses -) const -{ - // Do not correct if no patches selected - if (!patchIDs_.size()) return; - - scalarField patchTransferredMasses - ( - getModelProperty - ( - "patchTransferredMasses", - scalarField(patchTransferredMasses_.size(), 0) - ) - ); - - scalarField patchTransferredMassTotals(patchTransferredMasses_); - Pstream::listCombineGather(patchTransferredMassTotals, plusEqOp()); - - forAll(patchIDs_, pidi) - { - const label patchi = patchIDs_[pidi]; - patchMasses[patchi] += - patchTransferredMasses[pidi] + patchTransferredMassTotals[pidi]; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace surfaceFilmModels -} // End namespace Foam - -// ************************************************************************* // diff --git a/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.H b/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.H deleted file mode 100644 index 55951afbd3..0000000000 --- a/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFPatchTransfer/VoFPatchTransfer.H +++ /dev/null @@ -1,143 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2022 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::surfaceFilmModels::VoFPatchTransfer - -Description - Transfer mass between the film and the VoF in the continuous phase. - -SourceFiles - VoFPatchTransfer.C - -\*---------------------------------------------------------------------------*/ - -#ifndef VoFPatchTransfer_H -#define VoFPatchTransfer_H - -#include "transferModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace surfaceFilmModels -{ - -/*---------------------------------------------------------------------------*\ - Class VoFPatchTransfer Declaration -\*---------------------------------------------------------------------------*/ - -class VoFPatchTransfer -: - public transferModel -{ -protected: - - //- Factor of the cell height above which the film is transferred - // to the VoF - scalar deltaFactorToVoF_; - - //- Factor of the cell height below which the VoF may be transferred - // to the film - scalar deltaFactorToFilm_; - - //- VoF limit above which all of the film is transferred to the VoF - scalar alphaToVoF_; - - //- VoF limit below which the VoF may be transferred to the film - scalar alphaToFilm_; - - //- Transfer rate coefficient - scalar transferRateCoeff_; - - //- List of patch IDs at which the film is removed - labelList patchIDs_; - - //- Transferred mass for each patch at which the film is removed - scalarField patchTransferredMasses_; - - -public: - - //- Runtime type information - TypeName("VoFPatchTransfer"); - - - // Constructors - - //- Construct from surface film model - VoFPatchTransfer(surfaceFilm& film, const dictionary& dict); - - //- Disallow default bitwise copy construction - VoFPatchTransfer(const VoFPatchTransfer&) = delete; - - - //- Destructor - virtual ~VoFPatchTransfer(); - - - // Member Functions - - //- Correct - virtual void correct - ( - scalarField& availableMass, - scalarField& massToTransfer, - vectorField& momentumToTransfer - ); - - //- Correct kinematic and thermodynamic transfers - virtual void correct - ( - scalarField& availableMass, - scalarField& massToTransfer, - vectorField& momentumToTransfer, - scalarField& energyToTransfer - ); - - //- Accumulate the total mass injected for the patches into the - // scalarField provided - virtual void patchTransferredMassTotals - ( - scalarField& patchMasses - ) const; - - - // Member Operators - - //- Disallow default bitwise assignment - void operator=(const VoFPatchTransfer&) = delete; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace surfaceFilmModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFSurfaceFilm.C b/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFSurfaceFilm.C deleted file mode 100644 index 96a2fbd58c..0000000000 --- a/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFSurfaceFilm.C +++ /dev/null @@ -1,197 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-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 "VoFSurfaceFilm.H" -#include "compressibleTwoPhaseVoFMixture.H" -#include "fvmSup.H" -#include "uniformDimensionedFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * // - -namespace Foam -{ - namespace fv - { - defineTypeNameAndDebug(VoFSurfaceFilm, 0); - - addToRunTimeSelectionTable - ( - fvModel, - VoFSurfaceFilm, - dictionary - ); - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::fv::VoFSurfaceFilm::VoFSurfaceFilm -( - const word& sourceName, - const word& modelType, - const fvMesh& mesh, - const dictionary& dict -) -: - fvModel(sourceName, modelType, mesh, dict), - surfaceFilm_ - ( - thermoSurfaceFilm::typeName, - mesh, - mesh.lookupObject("g"), - surfaceFilm::typeName - ), - curTimeIndex_(-1) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -Foam::wordList Foam::fv::VoFSurfaceFilm::addSupFields() const -{ - return wordList - ( - { - surfaceFilm_.rhoPrimary().name(), - surfaceFilm_.UPrimary().name(), - surfaceFilm_.primaryThermo().he().name() - } - ); -} - - -Foam::scalar Foam::fv::VoFSurfaceFilm::maxDeltaT() const -{ - return surfaceFilm_.maxDeltaT(); -} - - -void Foam::fv::VoFSurfaceFilm::correct() -{ - if (curTimeIndex_ == mesh().time().timeIndex()) - { - return; - } - - surfaceFilm_.evolve(); - - curTimeIndex_ = mesh().time().timeIndex(); -} - - -void Foam::fv::VoFSurfaceFilm::addSup -( - const volScalarField& alpha, - fvMatrix& eqn, - const word& fieldName -) const -{ - if (debug) - { - Info<< type() << ": applying source to " << eqn.psi().name() << endl; - } - - if (fieldName == surfaceFilm_.rhoPrimary().name()) - { - eqn += surfaceFilm_.Srho(); - } - else - { - FatalErrorInFunction - << "Support for field " << fieldName << " is not implemented" - << exit(FatalError); - } -} - - -void Foam::fv::VoFSurfaceFilm::addSup -( - const volScalarField& alpha, - const volScalarField& rho, - fvMatrix& eqn, - const word& fieldName -) const -{ - if (debug) - { - Info<< type() << ": applying source to " << eqn.psi().name() << endl; - } - - if (fieldName == surfaceFilm_.primaryThermo().he().name()) - { - eqn += surfaceFilm_.Sh(); - } - else - { - FatalErrorInFunction - << "Support for field " << fieldName << " is not implemented" - << exit(FatalError); - } -} - - -void Foam::fv::VoFSurfaceFilm::addSup -( - const volScalarField& rho, - fvMatrix& eqn, - const word& fieldName -) const -{ - if (debug) - { - Info<< type() << ": applying source to " << eqn.psi().name() << endl; - } - - eqn += surfaceFilm_.SU(); -} - - -void Foam::fv::VoFSurfaceFilm::topoChange(const polyTopoChangeMap&) -{ - NotImplemented; -} - - -void Foam::fv::VoFSurfaceFilm::mapMesh(const polyMeshMap& map) -{ - NotImplemented; -} - - -void Foam::fv::VoFSurfaceFilm::distribute(const polyDistributionMap&) -{ - NotImplemented; -} - - -bool Foam::fv::VoFSurfaceFilm::movePoints() -{ - return true; -} - - -// ************************************************************************* // diff --git a/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFSurfaceFilm.H b/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFSurfaceFilm.H deleted file mode 100644 index f29b327ff3..0000000000 --- a/applications/solvers/modules/compressibleVoF/fvModels/VoFSurfaceFilm/VoFSurfaceFilm.H +++ /dev/null @@ -1,176 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-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 . - -Class - Foam::fv::VoFSurfaceFilm - -Description - Surface film model for VoF simulations. - -Usage - Example usage: - \verbatim - VoFSurfaceFilm - { - type VoFSurfaceFilm; - phase water; - } - \endverbatim - -SourceFiles - VoFSurfaceFilm.C - -\*---------------------------------------------------------------------------*/ - -#ifndef VoFSurfaceFilm_H -#define VoFSurfaceFilm_H - -#include "fvModel.H" -#include "thermoSurfaceFilm.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace fv -{ - -/*---------------------------------------------------------------------------*\ - Class VoFSurfaceFilm Declaration -\*---------------------------------------------------------------------------*/ - -class VoFSurfaceFilm -: - public fvModel -{ - // Private Data - - //- The surface film model - thermoSurfaceFilm surfaceFilm_; - - //- Current time index (used for updating) - mutable label curTimeIndex_; - - -public: - - //- Runtime type information - TypeName("VoFSurfaceFilm"); - - - // Constructors - - //- Construct from explicit source name and mesh - VoFSurfaceFilm - ( - const word& sourceName, - const word& modelType, - const fvMesh& mesh, - const dictionary& dict - ); - - //- Disallow default bitwise copy construction - VoFSurfaceFilm - ( - const VoFSurfaceFilm& - ) = delete; - - - // Member Functions - - // Checks - - //- Return the list of fields for which the option adds source term - // to the transport equation - virtual wordList addSupFields() const; - - //- Return the maximum time-step for stable operation - virtual scalar maxDeltaT() const; - - - // Correct - - //- Solve the film and update the sources - virtual void correct(); - - - // Add explicit and implicit contributions to compressible equation - - //- Add explicit contribution to phase continuity - virtual void addSup - ( - const volScalarField& alpha, - fvMatrix& eqn, - const word& fieldName - ) const; - - //- Add explicit contribution to phase energy equation - virtual void addSup - ( - const volScalarField& alpha, - const volScalarField& rho, - fvMatrix& eqn, - const word& fieldName - ) const; - - //- Add implicit contribution to mixture momentum equation - virtual void addSup - ( - const volScalarField& rho, - fvMatrix& eqn, - const word& fieldName - ) const; - - - // Mesh changes - - //- Update topology using the given map - virtual void topoChange(const polyTopoChangeMap&); - - //- Update from another mesh using the given map - virtual void mapMesh(const polyMeshMap&); - - //- Redistribute or update using the given distribution map - virtual void distribute(const polyDistributionMap&); - - //- Update for mesh motion - virtual bool movePoints(); - - - // Member Operators - - //- Disallow default bitwise assignment - void operator=(const VoFSurfaceFilm&) = delete; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace fv -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/bin/foamInfo b/bin/foamInfo index f403dc7251..5a051484e6 100755 --- a/bin/foamInfo +++ b/bin/foamInfo @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | Website: https://openfoam.org -# \\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2018-2023 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -206,7 +206,6 @@ modelsInFamily () { _modelDirs="\ $(findModelDirs "$_familyDir" 2) \ $(findModelDirs "$FOAM_SRC/lagrangian/parcel/fvModels") \ - $(findModelDirs "$FOAM_SRC/surfaceFilmModels/fvModels") \ $(findModelDirs "$FOAM_SRC/radiationModels/fvModels/radiation")" [ "$_modelDirs" ] || return 0 diff --git a/etc/caseDicts/fvModels/surfaceFilms b/etc/caseDicts/fvModels/surfaceFilms deleted file mode 100644 index c8e7b87c3d..0000000000 --- a/etc/caseDicts/fvModels/surfaceFilms +++ /dev/null @@ -1,20 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: dev - \\/ M anipulation | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - format ascii; - class dictionary; - object surfaceFilms; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -type surfaceFilms; - -libs ("libsurfaceFilmModels.so"); - -// ************************************************************************* // diff --git a/src/Allwmake b/src/Allwmake index 300af5b91c..ef84db2f16 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -77,9 +77,6 @@ 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/parcel/clouds/Templates/MomentumCloud/MomentumCloud.C b/src/lagrangian/parcel/clouds/Templates/MomentumCloud/MomentumCloud.C index 90bb34bae0..47c6a49f61 100644 --- a/src/lagrangian/parcel/clouds/Templates/MomentumCloud/MomentumCloud.C +++ b/src/lagrangian/parcel/clouds/Templates/MomentumCloud/MomentumCloud.C @@ -66,7 +66,7 @@ void Foam::MomentumCloud::setModels() ).ptr() ); - surfaceFilmModel_.reset + filmModel_.reset ( SurfaceFilmModel>::New ( @@ -250,7 +250,7 @@ void Foam::MomentumCloud::cloudReset(MomentumCloud& c) dispersionModel_.reset(c.dispersionModel_.ptr()); patchInteractionModel_.reset(c.patchInteractionModel_.ptr()); stochasticCollisionModel_.reset(c.stochasticCollisionModel_.ptr()); - surfaceFilmModel_.reset(c.surfaceFilmModel_.ptr()); + filmModel_.reset(c.filmModel_.ptr()); UIntegrator_.reset(c.UIntegrator_.ptr()); } @@ -333,7 +333,7 @@ Foam::MomentumCloud::MomentumCloud dispersionModel_(nullptr), patchInteractionModel_(nullptr), stochasticCollisionModel_(nullptr), - surfaceFilmModel_(nullptr), + filmModel_(nullptr), UIntegrator_(nullptr), UTrans_ ( @@ -426,7 +426,7 @@ Foam::MomentumCloud::MomentumCloud dispersionModel_(c.dispersionModel_->clone()), patchInteractionModel_(c.patchInteractionModel_->clone()), stochasticCollisionModel_(c.stochasticCollisionModel_->clone()), - surfaceFilmModel_(c.surfaceFilmModel_->clone()), + filmModel_(c.filmModel_->clone()), UIntegrator_(c.UIntegrator_->clone()), UTrans_ ( @@ -515,7 +515,7 @@ Foam::MomentumCloud::MomentumCloud dispersionModel_(nullptr), patchInteractionModel_(nullptr), stochasticCollisionModel_(nullptr), - surfaceFilmModel_(nullptr), + filmModel_(nullptr), UIntegrator_(nullptr), UTrans_(nullptr), UCoeff_(nullptr) diff --git a/src/lagrangian/parcel/clouds/Templates/MomentumCloud/MomentumCloud.H b/src/lagrangian/parcel/clouds/Templates/MomentumCloud/MomentumCloud.H index 3e2e2a00c5..374da570cc 100644 --- a/src/lagrangian/parcel/clouds/Templates/MomentumCloud/MomentumCloud.H +++ b/src/lagrangian/parcel/clouds/Templates/MomentumCloud/MomentumCloud.H @@ -210,9 +210,8 @@ protected: autoPtr>> stochasticCollisionModel_; - //- Surface film model - autoPtr>> - surfaceFilmModel_; + //- Optional film model + autoPtr>> filmModel_; // Reference to the particle integration schemes diff --git a/src/lagrangian/parcel/clouds/Templates/MomentumCloud/MomentumCloudI.H b/src/lagrangian/parcel/clouds/Templates/MomentumCloud/MomentumCloudI.H index 4b851b6e65..05eb75344a 100644 --- a/src/lagrangian/parcel/clouds/Templates/MomentumCloud/MomentumCloudI.H +++ b/src/lagrangian/parcel/clouds/Templates/MomentumCloud/MomentumCloudI.H @@ -232,7 +232,7 @@ template inline const Foam::SurfaceFilmModel>& Foam::MomentumCloud::surfaceFilm() const { - return surfaceFilmModel_(); + return filmModel_(); } @@ -240,7 +240,7 @@ template inline Foam::SurfaceFilmModel>& Foam::MomentumCloud::surfaceFilm() { - return surfaceFilmModel_(); + return filmModel_(); } diff --git a/src/parcelSurfaceFilmModels/Make/files b/src/parcelSurfaceFilmModels/Make/files deleted file mode 100644 index ba13723233..0000000000 --- a/src/parcelSurfaceFilmModels/Make/files +++ /dev/null @@ -1,7 +0,0 @@ -ThermoSurfaceFilm/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 deleted file mode 100644 index c102700810..0000000000 --- a/src/parcelSurfaceFilmModels/Make/options +++ /dev/null @@ -1,23 +0,0 @@ -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/parcelSurfaceFilmModels/ThermoSurfaceFilm/ThermoSurfaceFilm.C b/src/parcelSurfaceFilmModels/ThermoSurfaceFilm/ThermoSurfaceFilm.C deleted file mode 100644 index 45e20f1c92..0000000000 --- a/src/parcelSurfaceFilmModels/ThermoSurfaceFilm/ThermoSurfaceFilm.C +++ /dev/null @@ -1,752 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / 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 . - -\*---------------------------------------------------------------------------*/ - -#include "ThermoSurfaceFilm.H" -#include "thermoSurfaceFilm.H" -#include "ThermoCloud.H" -#include "meshTools.H" -#include "mathematicalConstants.H" -#include "addToRunTimeSelectionTable.H" - -using namespace Foam::constant::mathematical; - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -template -Foam::vector Foam::ThermoSurfaceFilm::splashDirection -( - const vector& tanVec1, - const vector& tanVec2, - const vector& nf -) const -{ - // Azimuthal angle [rad] - const scalar phiSi = twoPi*rndGen_.sample01(); - - // Ejection angle [rad] - const scalar thetaSi = pi/180.0*(rndGen_.sample01()*(50 - 5) + 5); - - // Direction vector of new parcel - const scalar alpha = sin(thetaSi); - const scalar dcorr = cos(thetaSi); - const vector normal = alpha*(tanVec1*cos(phiSi) + tanVec2*sin(phiSi)); - vector dirVec = dcorr*nf; - dirVec += normal; - - return dirVec/mag(dirVec); -} - - -template -void Foam::ThermoSurfaceFilm::absorbInteraction -( - thermoSurfaceFilm& filmModel, - const parcelType& p, - const polyPatch& pp, - const label facei, - const scalar mass, - bool& keepParticle -) -{ - if (debug) - { - Info<< "Parcel " << p.origId() << " absorbInteraction" << endl; - } - - const fluidThermo& carrierThermo = - static_cast&>(this->owner()) - .carrierThermo(); - - const parcelThermo& thermo = - static_cast&>(this->owner()).thermo(); - - // Patch face normal - const vector& nf = pp.faceNormals()[facei]; - - // Patch velocity - const vector& Up = this->owner().U().boundaryField()[pp.index()][facei]; - - // Relative parcel velocity - const vector Urel = p.U() - Up; - - // Parcel normal velocity - const vector Un = nf*(Urel & nf); - - // Parcel tangential velocity - const vector Ut = Urel - Un; - - const liquidProperties& liq = thermo.liquids().properties()[0]; - - // Local pressure - const scalar pc = carrierThermo.p()[p.cell()]; - - filmModel.addSources - ( - pp.index(), - facei, - mass, // mass - mass*Ut, // tangential momentum - mass*mag(Un), // impingement pressure - mass*liq.Hs(pc, p.T()) // energy - ); - - this->nParcelsTransferred()++; - - keepParticle = false; -} - - -template -void Foam::ThermoSurfaceFilm::bounceInteraction -( - parcelType& p, - const polyPatch& pp, - const label facei, - bool& keepParticle -) const -{ - if (debug) - { - Info<< "Parcel " << p.origId() << " bounceInteraction" << endl; - } - - // Patch face normal - const vector& nf = pp.faceNormals()[facei]; - - // Patch velocity - const vector& Up = this->owner().U().boundaryField()[pp.index()][facei]; - - // Relative parcel velocity - const vector Urel = p.U() - Up; - - // Flip parcel normal velocity component - p.U() -= 2.0*nf*(Urel & nf); - - keepParticle = true; -} - - -template -void Foam::ThermoSurfaceFilm::drySplashInteraction -( - thermoSurfaceFilm& filmModel, - const parcelType& p, - const polyPatch& pp, - const label facei, - bool& keepParticle -) -{ - if (debug) - { - Info<< "Parcel " << p.origId() << " drySplashInteraction" << endl; - } - - const fluidThermo& carrierThermo = - static_cast&>(this->owner()) - .carrierThermo(); - - const parcelThermo& thermo = - static_cast&>(this->owner()).thermo(); - - const liquidProperties& liq = thermo.liquids().properties()[0]; - - // Patch face velocity and normal - const vector& Up = this->owner().U().boundaryField()[pp.index()][facei]; - const vector& nf = pp.faceNormals()[facei]; - - // Local pressure - const scalar pc = carrierThermo.p()[p.cell()]; - - // Retrieve parcel properties - const scalar m = p.mass()*p.nParticle(); - const scalar rho = p.rho(); - const scalar d = p.d(); - const scalar sigma = liq.sigma(pc, p.T()); - const scalar mu = liq.mu(pc, p.T()); - const vector Urel = p.U() - Up; - const vector Un = nf*(Urel & nf); - - // Laplace number - const scalar La = rho*sigma*d/sqr(mu); - - // Weber number - const scalar We = rho*magSqr(Un)*d/sigma; - - // Critical Weber number - const scalar Wec = Adry_*pow(La, -0.183); - - if (We < Wec) // Adhesion - assume absorb - { - absorbInteraction(filmModel, p, pp, facei, m, keepParticle); - } - else // Splash - { - // Ratio of incident mass to splashing mass - const scalar mRatio = 0.2 + 0.6*rndGen_.sample01(); - splashInteraction - (filmModel, p, pp, facei, mRatio, We, Wec, sigma, keepParticle); - } -} - - -template -void Foam::ThermoSurfaceFilm::wetSplashInteraction -( - thermoSurfaceFilm& filmModel, - parcelType& p, - const polyPatch& pp, - const label facei, - bool& keepParticle -) -{ - if (debug) - { - Info<< "Parcel " << p.origId() << " wetSplashInteraction" << endl; - } - - const fluidThermo& carrierThermo = - static_cast&>(this->owner()) - .carrierThermo(); - - const parcelThermo& thermo = - static_cast&>(this->owner()).thermo(); - - const liquidProperties& liq = thermo.liquids().properties()[0]; - - // Patch face velocity and normal - const vector& Up = this->owner().U().boundaryField()[pp.index()][facei]; - const vector& nf = pp.faceNormals()[facei]; - - // Local pressure - const scalar pc = carrierThermo.p()[p.cell()]; - - // Retrieve parcel properties - const scalar m = p.mass()*p.nParticle(); - const scalar rho = p.rho(); - const scalar d = p.d(); - vector& U = p.U(); - const scalar sigma = liq.sigma(pc, p.T()); - const scalar mu = liq.mu(pc, p.T()); - const vector Urel = p.U() - Up; - const vector Un = nf*(Urel & nf); - const vector Ut = Urel - Un; - - // Laplace number - const scalar La = rho*sigma*d/sqr(mu); - - // Weber number - const scalar We = rho*magSqr(Un)*d/sigma; - - // Critical Weber number - const scalar Wec = Awet_*pow(La, -0.183); - - if (We < 2) // Adhesion - assume absorb - { - absorbInteraction(filmModel, p, pp, facei, m, keepParticle); - } - else if ((We >= 2) && (We < 20)) // Bounce - { - // Incident angle of impingement - const scalar theta = pi/2 - acos(U/mag(U) & nf); - - // Restitution coefficient - const scalar epsilon = 0.993 - theta*(1.76 - theta*(1.56 - theta*0.49)); - - // Update parcel velocity - U = -epsilon*(Un) + 5.0/7.0*(Ut); - - keepParticle = true; - return; - } - else if ((We >= 20) && (We < Wec)) // Spread - assume absorb - { - absorbInteraction(filmModel, p, pp, facei, m, keepParticle); - } - else // Splash - { - // Ratio of incident mass to splashing mass - // splash mass can be > incident mass due to film entrainment - const scalar mRatio = 0.2 + 0.9*rndGen_.sample01(); - splashInteraction - (filmModel, p, pp, facei, mRatio, We, Wec, sigma, keepParticle); - } -} - - -template -void Foam::ThermoSurfaceFilm::splashInteraction -( - thermoSurfaceFilm& filmModel, - const parcelType& p, - const polyPatch& pp, - const label facei, - const scalar mRatio, - const scalar We, - const scalar Wec, - const scalar sigma, - bool& keepParticle -) -{ - // Patch face velocity and normal - const fvMesh& mesh = this->owner().mesh(); - const vector& Up = this->owner().U().boundaryField()[pp.index()][facei]; - const vector& nf = pp.faceNormals()[facei]; - - // Determine direction vectors tangential to patch normal - const vector tanVec1 = normalised(perpendicular(nf)); - const vector tanVec2 = nf^tanVec1; - - // Retrieve parcel properties - const scalar np = p.nParticle(); - const scalar m = p.mass()*np; - const scalar d = p.d(); - const vector Urel = p.U() - Up; - const vector Un = nf*(Urel & nf); - const vector Ut = Urel - Un; - const vector& posC = mesh.C()[p.cell()]; - const vector& posCf = mesh.Cf().boundaryField()[pp.index()][facei]; - - // Total mass of (all) splashed parcels - const scalar mSplash = m*mRatio; - - // Number of splashed particles per incoming particle - const scalar Ns = 5.0*(We/Wec - 1.0); - - // Average diameter of splashed particles - const scalar dBarSplash = 1/cbrt(6.0)*cbrt(mRatio/Ns)*d + rootVSmall; - - // Cumulative diameter splash distribution - const scalar dMax = 0.9*cbrt(mRatio)*d; - const scalar dMin = 0.1*dMax; - const scalar K = exp(-dMin/dBarSplash) - exp(-dMax/dBarSplash); - - // Surface energy of secondary parcels [J] - scalar ESigmaSec = 0; - - // Sample splash distribution to determine secondary parcel diameters - scalarList dNew(parcelsPerSplash_); - scalarList npNew(parcelsPerSplash_); - forAll(dNew, i) - { - const scalar y = rndGen_.sample01(); - dNew[i] = -dBarSplash*log(exp(-dMin/dBarSplash) - y*K); - npNew[i] = mRatio*np*pow3(d)/pow3(dNew[i])/parcelsPerSplash_; - ESigmaSec += npNew[i]*sigma*p.areaS(dNew[i]); - } - - // Incident kinetic energy [J] - const scalar EKIn = 0.5*m*magSqr(Un); - - // Incident surface energy [J] - const scalar ESigmaIn = np*sigma*p.areaS(d); - - // Dissipative energy - const scalar Ed = max(0.8*EKIn, np*Wec/12*pi*sigma*sqr(d)); - - // Total energy [J] - const scalar EKs = EKIn + ESigmaIn - ESigmaSec - Ed; - - // Switch to absorb if insufficient energy for splash - if (EKs <= 0) - { - absorbInteraction(filmModel, p, pp, facei, m, keepParticle); - return; - } - - // Helper variables to calculate magUns0 - const scalar logD = log(d); - const scalar coeff2 = log(dNew[0]) - logD + rootVSmall; - scalar coeff1 = 0.0; - forAll(dNew, i) - { - coeff1 += sqr(log(dNew[i]) - logD); - } - - // Magnitude of the normal velocity of the first splashed parcel - const scalar magUns0 = - sqrt(2.0*parcelsPerSplash_*EKs/mSplash/(1.0 + coeff1/sqr(coeff2))); - - // Set splashed parcel properties - forAll(dNew, i) - { - const vector dirVec = splashDirection(tanVec1, tanVec2, -nf); - - // Create a new parcel by copying source parcel - parcelType* pPtr = new parcelType(p); - - pPtr->origId() = pPtr->getNewParticleID(); - - pPtr->origProc() = Pstream::myProcNo(); - - if (splashParcelType_ >= 0) - { - pPtr->typeId() = splashParcelType_; - } - - // Perturb new parcels towards the owner cell centre - pPtr->track(mesh, 0.5*rndGen_.sample01()*(posC - posCf), 0); - - pPtr->nParticle() = npNew[i]; - - pPtr->d() = dNew[i]; - - pPtr->U() = dirVec*(mag(Cf_*Ut) + magUns0*(log(dNew[i]) - logD)/coeff2); - - // Apply correction to velocity for 2-D cases - meshTools::constrainDirection(mesh, mesh.solutionD(), pPtr->U()); - - // Add the new parcel - this->owner().addParticle(pPtr); - - nParcelsSplashed_++; - } - - // Transfer remaining part of parcel to film 0 - splashMass can be -ve - // if entraining from the film - const scalar mDash = m - mSplash; - absorbInteraction(filmModel, p, pp, facei, mDash, keepParticle); -} - - -template -Foam::UPtrList& -Foam::ThermoSurfaceFilm::filmPtrs() const -{ - const objectRegistry& db = this->owner().mesh().time(); - - if (!filmNames_.empty() && films_.empty()) - { - // If there are multiple surface films and/or surface films with - // non-default names, then require the films entry to have been - // specified - { - HashTable filmPtrs = - db.lookupClass(); - - const word defaultName = surfaceFilm::typeName + "Properties"; - - if - ( - ( - filmPtrs.size() == 1 - && filmPtrs.begin().key() != defaultName - ) - || (filmPtrs.size() > 1) - ) - { - Info << filmPtrs.begin().key() << " " << defaultName << endl; - this->coeffDict().lookup("surfaceFilms"); - } - } - - // Cache pointers to the surface film models - films_.resize(filmNames_.size()); - filmPatches_.setSize(films_.size()); - - forAll(films_, filmi) - { - films_.set - ( - filmi, - &db.template lookupObjectRef - ( - filmNames_[filmi] + "Properties" - ) - ); - - if (films_[filmi].primaryPatchIDs().size() > 1) - { - FatalErrorInFunction - << "Number of film primary patch IDs > 1 for film " - << films_[filmi].name() - << exit(FatalError); - } - - filmPatches_[filmi] = films_[filmi].primaryPatchIDs()[0]; - } - } - - return films_; -} - - -template -const Foam::labelList& Foam::ThermoSurfaceFilm::filmPatches() const -{ - // Ensure filmPatches_ has been initialise - filmPtrs(); - - return filmPatches_; -} - - -template -void Foam::ThermoSurfaceFilm::cacheFilmFields(const label filmi) -{ - const thermoSurfaceFilm& filmModel = this->filmPtrs()[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_); - - TFilmPatch_ = filmModel.thermo().T().boundaryField()[filmPatchi]; - filmModel.toPrimary(filmPatchi, TFilmPatch_); - - CpFilmPatch_ = filmModel.thermo().Cpv().boundaryField()[filmPatchi]; - filmModel.toPrimary(filmPatchi, CpFilmPatch_); -} - - -template -void Foam::ThermoSurfaceFilm::setParcelProperties -( - parcelType& p, - const label filmFacei -) const -{ - // 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]; - p.Cp() = CpFilmPatch_[filmFacei]; -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -Foam::ThermoSurfaceFilm::ThermoSurfaceFilm -( - const dictionary& dict, - CloudType& owner -) -: - SurfaceFilmModel(dict, owner, typeName), - rndGen_(owner.rndGen()), - filmNames_ - ( - this->coeffDict().lookupOrDefault - ( - "surfaceFilms", - wordList(1, surfaceFilm::typeName) - ) - ), - films_(), - UFilmPatch_(0), - rhoFilmPatch_(0), - TFilmPatch_(0), - CpFilmPatch_(0), - interactionType_ - ( - interactionTypeNames_.read(this->coeffDict().lookup("interactionType")) - ), - deltaWet_(0.0), - splashParcelType_(0), - parcelsPerSplash_(0), - Adry_(0.0), - Awet_(0.0), - Cf_(0.0), - nParcelsSplashed_(0) -{ - Info<< " Applying " << interactionTypeNames_[interactionType_] - << " interaction model" << endl; - - if (interactionType_ == interactionType::splashBai) - { - this->coeffDict().lookup("deltaWet") >> deltaWet_; - splashParcelType_ = - this->coeffDict().lookupOrDefault("splashParcelType", -1); - parcelsPerSplash_ = - this->coeffDict().lookupOrDefault("parcelsPerSplash", 2); - this->coeffDict().lookup("Adry") >> Adry_; - this->coeffDict().lookup("Awet") >> Awet_; - this->coeffDict().lookup("Cf") >> Cf_; - } -} - - -template -Foam::ThermoSurfaceFilm::ThermoSurfaceFilm -( - const ThermoSurfaceFilm& sfm -) -: - SurfaceFilmModel(sfm), - rndGen_(sfm.rndGen_), - filmNames_(sfm.filmNames_), - films_(), - UFilmPatch_(sfm.UFilmPatch_), - rhoFilmPatch_(sfm.rhoFilmPatch_), - TFilmPatch_(sfm.TFilmPatch_), - CpFilmPatch_(sfm.CpFilmPatch_), - interactionType_(sfm.interactionType_), - deltaWet_(sfm.deltaWet_), - splashParcelType_(sfm.splashParcelType_), - parcelsPerSplash_(sfm.parcelsPerSplash_), - Adry_(sfm.Adry_), - Awet_(sfm.Awet_), - Cf_(sfm.Cf_), - nParcelsSplashed_(sfm.nParcelsSplashed_) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::ThermoSurfaceFilm::~ThermoSurfaceFilm() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -bool Foam::ThermoSurfaceFilm::transferParcel -( - parcelType& p, - const polyPatch& pp, - bool& keepParticle -) -{ - const label patchi = pp.index(); - - forAll(this->filmPtrs(), filmi) - { - thermoSurfaceFilm& filmModel = this->filmPtrs()[filmi]; - - if (filmModel.isFilmPatch(patchi)) - { - const label facei = pp.whichFace(p.face()); - - switch (interactionType_) - { - case interactionType::bounce: - { - bounceInteraction(p, pp, facei, keepParticle); - break; - } - case interactionType::absorb: - { - absorbInteraction - ( - filmModel, - p, - pp, - facei, - p.nParticle()*p.mass(), - keepParticle - ); - break; - } - case interactionType::splashBai: - { - if (this->deltaFilmPatch_[facei] < deltaWet_) - { - drySplashInteraction - ( - filmModel, - p, - pp, - facei, - keepParticle - ); - } - else - { - wetSplashInteraction - ( - filmModel, - p, - pp, - facei, - keepParticle - ); - } - break; - } - default: - { - FatalErrorInFunction - << "Unknown interaction type enumeration" - << abort(FatalError); - } - } - - // Transfer parcel/parcel interactions complete - return true; - } - } - - // Parcel not interacting with film - return false; -} - - -template -void Foam::ThermoSurfaceFilm::info(Ostream& os) -{ - SurfaceFilmModel::info(os); - - label nSplash0 = this->template getModelProperty