From 326b86ec2d85f80338016c964f9d5067e34132a2 Mon Sep 17 00:00:00 2001 From: henry Date: Thu, 20 Nov 2008 17:07:17 +0000 Subject: [PATCH] Added generic turbulenceModel base class to incompressible turbulence models. --- .../incompressible/boundaryFoam/Make/options | 6 +- .../boundaryFoam/boundaryFoam.C | 4 +- .../incompressible/channelOodles/Make/files | 3 - .../incompressible/channelOodles/Make/options | 13 - .../channelOodles/channelOodles.C | 155 - .../channelOodles/createFields.H | 43 - .../channelOodles/createGradP.H | 24 - .../channelOodles/readTransportProperties.H | 28 - .../incompressible/channelOodles/writeGradP.H | 19 - .../incompressible/icoDyMFoam/Make/files | 3 - .../incompressible/icoDyMFoam/Make/options | 11 - .../solvers/incompressible/icoDyMFoam/UEqn.H | 16 - .../icoDyMFoam/checkTotalVolume.H | 6 - .../incompressible/icoDyMFoam/correctPhi.H | 44 - .../incompressible/icoDyMFoam/createFields.H | 72 - .../incompressible/icoDyMFoam/icoDyMFoam.C | 159 - .../incompressible/icoDyMFoam/readControls.H | 14 - .../nonNewtonianIcoFoam/Make/options | 3 +- .../nonNewtonianIcoFoam/nonNewtonianIcoFoam.C | 2 +- .../solvers/incompressible/oodles/Make/files | 3 - .../incompressible/oodles/Make/options | 13 - .../incompressible/oodles/createFields.H | 43 - .../solvers/incompressible/oodles/oodles.C | 128 - .../incompressible/pimpleFoam/Make/options | 10 +- .../incompressible/pimpleFoam/createFields.H | 4 +- .../incompressible/pimpleFoam/pimpleFoam.C | 20 +- .../incompressible/simpleFoam/Make/options | 8 +- .../incompressible/simpleFoam/simpleFoam.C | 4 +- .../incompressible/turbDyMFoam/Make/files | 3 - .../incompressible/turbDyMFoam/Make/options | 15 - .../solvers/incompressible/turbDyMFoam/UEqn.H | 16 - .../incompressible/turbDyMFoam/correctPhi.H | 44 - .../incompressible/turbDyMFoam/createFields.H | 59 - .../incompressible/turbDyMFoam/readControls.H | 14 - .../incompressible/turbDyMFoam/turbDyMFoam.C | 163 - .../incompressible/turbFoam/Make/files | 3 - .../incompressible/turbFoam/Make/options | 10 - .../incompressible/turbFoam/createFields.H | 42 - .../incompressible/turbFoam/turbFoam.C | 129 - .../compressibleLesInterFoam/Make/files | 3 - .../compressibleLesInterFoam/Make/options | 15 - .../compressibleLesInterFoam/UEqn.H | 29 - .../compressibleLesInterFoam/alphaEqns.H | 76 - .../alphaEqnsSubCycle.H | 43 - .../compressibleLesInterFoam.C | 105 - .../compressibleLesInterFoam/createFields.H | 152 - .../compressibleLesInterFoam/pEqn.H | 74 - .../compressibleLesInterFoam/readControls.H | 20 - .../multiphase/interDyMFoam/Make/options | 5 +- .../multiphase/interDyMFoam/createFields.H | 24 +- .../multiphase/interDyMFoam/interDyMFoam.C | 7 +- .../solvers/multiphase/interDyMFoam/pEqn.H | 2 +- .../solvers/multiphase/interFoam/Make/options | 3 + .../multiphase/interFoam/UBlendingFactor.H | 4 +- .../solvers/multiphase/interFoam/UEqn.H | 17 +- .../multiphase/interFoam/createFields.H | 25 +- .../solvers/multiphase/interFoam/gammaEqn.H | 35 - .../multiphase/interFoam/gammaEqnSubCycle.H | 35 - .../solvers/multiphase/interFoam/interFoam.C | 9 +- .../solvers/multiphase/interFoam/pEqn.H | 2 +- .../interPhaseChangeFoam/Make/options | 4 +- .../multiphase/interPhaseChangeFoam/UEqn.H | 4 +- .../interPhaseChangeFoam/createFields.H | 22 +- .../interPhaseChangeFoam/gammaEqn.H | 67 - .../interPhaseChangeFoam/gammaEqnSubCycle.H | 53 - .../interPhaseChangeFoam.C | 12 +- .../multiphase/interPhaseChangeFoam/pEqn.H | 2 +- .../phaseChangeTwoPhaseMixture.H | 2 +- .../multiphase/lesCavitatingFoam/CourantNo.H | 59 - .../multiphase/lesCavitatingFoam/Make/files | 5 - .../multiphase/lesCavitatingFoam/Make/options | 16 - .../multiphase/lesCavitatingFoam/UEqn.H | 20 - .../lesCavitatingFoam/continuityErrs.H | 22 - .../lesCavitatingFoam/createFields.H | 85 - .../devOneEqEddy/devOneEqEddy.C | 130 - .../devOneEqEddy/devOneEqEddy.H | 148 - .../multiphase/lesCavitatingFoam/gammaPsi.H | 10 - .../lesCavitatingFoam/lesCavitatingFoam.C | 94 - .../multiphase/lesCavitatingFoam/pEqn.H | 80 - .../lesCavitatingFoam/readControls.H | 9 - .../readThermodynamicProperties.H | 27 - .../lesCavitatingFoam/resetPhiPatches.H | 15 - .../lesCavitatingFoam/resetPhivPatches.H | 14 - .../multiphase/lesCavitatingFoam/rhoEqn.H | 16 - .../multiphase/lesCavitatingFoam/setDeltaT.H | 54 - .../lesCavitatingFoam/setInitialDeltaT.H | 54 - .../multiphase/lesInterFoam/Make/files | 3 - .../multiphase/lesInterFoam/Make/options | 15 - .../solvers/multiphase/lesInterFoam/UEqn.H | 32 - .../multiphase/lesInterFoam/createFields.H | 115 - .../multiphase/lesInterFoam/lesInterFoam.C | 103 - .../multiphaseInterFoam/Make/options | 4 + .../multiphase/multiphaseInterFoam/UEqn.H | 32 +- .../multiphaseInterFoam/createFields.H | 22 + .../multiphaseInterFoam/multiphaseInterFoam.C | 46 +- .../multiphase/rasCavitatingFoam/CourantNo.H | 59 - .../multiphase/rasCavitatingFoam/Make/files | 3 - .../multiphase/rasCavitatingFoam/Make/options | 14 - .../multiphase/rasCavitatingFoam/UEqn.H | 20 - .../rasCavitatingFoam/continuityErrs.H | 22 - .../rasCavitatingFoam/createFields.H | 85 - .../multiphase/rasCavitatingFoam/gammaPsi.H | 10 - .../multiphase/rasCavitatingFoam/pEqn.H | 80 - .../rasCavitatingFoam/rasCavitatingFoam.C | 94 - .../rasCavitatingFoam/readControls.H | 9 - .../readThermodynamicProperties.H | 27 - .../rasCavitatingFoam/resetPhiPatches.H | 15 - .../rasCavitatingFoam/resetPhivPatches.H | 14 - .../multiphase/rasCavitatingFoam/rhoEqn.H | 16 - .../multiphase/rasCavitatingFoam/setDeltaT.H | 54 - .../rasCavitatingFoam/setInitialDeltaT.H | 54 - .../multiphase/rasInterFoam/Make/files | 3 - .../multiphase/rasInterFoam/Make/options | 13 - .../solvers/multiphase/rasInterFoam/UEqn.H | 32 - .../multiphase/rasInterFoam/createFields.H | 116 - .../multiphase/rasInterFoam/rasInterFoam.C | 104 - .../solvers/multiphase/settlingFoam/UEqn.H | 50 +- .../twoLiquidMixingFoam/Make/options | 3 + .../multiphase/twoLiquidMixingFoam/UEqn.H | 15 +- .../twoLiquidMixingFoam/createFields.H | 36 +- .../multiphase/twoLiquidMixingFoam/gammaEqn.H | 19 - .../twoLiquidMixingFoam/twoLiquidMixingFoam.C | 9 +- .../interfaceProperties/Make/files | 10 +- ...stantGammaContactAngleFvPatchScalarField.C | 135 - ...stantGammaContactAngleFvPatchScalarField.H | 152 - ...namicGammaContactAngleFvPatchScalarField.C | 170 - ...namicGammaContactAngleFvPatchScalarField.H | 161 - .../gammaContactAngleFvPatchScalarField.C | 101 - .../gammaContactAngleFvPatchScalarField.H | 125 - ...ryingGammaContactAngleFvPatchScalarField.C | 152 - ...ryingGammaContactAngleFvPatchScalarField.H | 148 - .../gammaFixedPressureFvPatchScalarField.C | 173 - .../gammaFixedPressureFvPatchScalarField.H | 180 - .../interfaceProperties/interfaceProperties.C | 81 +- .../interfaceProperties/interfaceProperties.H | 12 +- src/turbulenceModels/Allwmake | 5 +- src/turbulenceModels/LES/Allwmake | 4 +- .../LES/LESdeltas/LESdelta/LESdelta.H | 7 +- .../LES/LESdeltas/PrandtlDelta/PrandtlDelta.H | 11 +- .../cubeRootVolDelta/cubeRootVolDelta.H | 11 +- .../LES/LESdeltas/smoothDelta/smoothDelta.H | 15 +- .../LES/LESfilters/LESfilter/LESfilter.H | 7 +- .../anisotropicFilter/anisotropicFilter.H | 20 +- .../LESfilters/laplaceFilter/laplaceFilter.H | 20 +- .../LESfilters/simpleFilter/simpleFilter.H | 20 +- .../DeardorffDiffStress/DeardorffDiffStress.C | 150 - .../DeardorffDiffStress/DeardorffDiffStress.H | 141 - .../compressible/GenEddyVisc/GenEddyVisc.C | 144 - .../compressible/GenEddyVisc/GenEddyVisc.H | 155 - .../compressible/GenSGSStress/GenSGSStress.C | 159 - .../compressible/GenSGSStress/GenSGSStress.H | 160 - .../LES/compressible/LESModel/LESModel.C | 133 - .../LES/compressible/LESModel/LESModel.H | 293 - .../LES/compressible/LESModel/newLESModel.C | 94 - .../LES/compressible/Make/files | 19 - .../LES/compressible/Make/options | 11 - .../compressible/Smagorinsky/Smagorinsky.C | 112 - .../compressible/Smagorinsky/Smagorinsky.H | 127 - .../SpalartAllmaras/SpalartAllmaras.C | 329 - .../SpalartAllmaras/SpalartAllmaras.H | 175 - ...rtAllmarasWallFunctionFvPatchScalarField.C | 205 - ...rtAllmarasWallFunctionFvPatchScalarField.H | 165 - .../compressible/dynOneEqEddy/dynOneEqEddy.C | 155 - .../compressible/dynOneEqEddy/dynOneEqEddy.H | 146 - .../lowReOneEqEddy/lowReOneEqEddy.C | 137 - .../lowReOneEqEddy/lowReOneEqEddy.H | 138 - .../LES/compressible/oneEqEddy/oneEqEddy.C | 124 - .../LES/compressible/oneEqEddy/oneEqEddy.H | 141 - .../DeardorffDiffStress/DeardorffDiffStress.C | 150 - .../DeardorffDiffStress/DeardorffDiffStress.H | 140 - .../incompressible/GenEddyVisc/GenEddyVisc.C | 126 - .../incompressible/GenEddyVisc/GenEddyVisc.H | 141 - .../GenSGSStress/GenSGSStress.C | 192 - .../GenSGSStress/GenSGSStress.H | 149 - .../LES/incompressible/LESModel/LESModel.C | 133 - .../LES/incompressible/LESModel/LESModel.H | 275 - .../LES/incompressible/LESModel/newLESModel.C | 93 - .../LRRDiffStress/LRRDiffStress.C | 161 - .../LRRDiffStress/LRRDiffStress.H | 139 - .../LES/incompressible/Make/files | 39 - .../LES/incompressible/Make/options | 12 - .../incompressible/Smagorinsky/Smagorinsky.C | 100 - .../incompressible/Smagorinsky/Smagorinsky.H | 141 - .../Smagorinsky2/Smagorinsky2.C | 124 - .../Smagorinsky2/Smagorinsky2.H | 131 - .../SpalartAllmaras/SpalartAllmaras.C | 368 - .../SpalartAllmaras/SpalartAllmaras.H | 190 - .../SpalartAllmarasDDES/SpalartAllmarasDDES.C | 120 - .../SpalartAllmarasDDES/SpalartAllmarasDDES.H | 118 - .../IDDESDelta/IDDESDelta.C | 140 - .../IDDESDelta/IDDESDelta.H | 113 - .../SpalartAllmarasIDDES.C | 214 - .../SpalartAllmarasIDDES.H | 132 - ...rtAllmarasWallFunctionFvPatchScalarField.C | 186 - ...rtAllmarasWallFunctionFvPatchScalarField.H | 157 - .../dynMixedSmagorinsky/dynMixedSmagorinsky.C | 142 - .../dynMixedSmagorinsky/dynMixedSmagorinsky.H | 150 - .../dynOneEqEddy/dynOneEqEddy.C | 181 - .../dynOneEqEddy/dynOneEqEddy.H | 155 - .../dynSmagorinsky/dynSmagorinsky.C | 161 - .../dynSmagorinsky/dynSmagorinsky.H | 155 - .../kOmegaSSTSAS/kOmegaSSTSAS.C | 447 - .../kOmegaSSTSAS/kOmegaSSTSAS.H | 258 - .../LES/incompressible/laminar/laminar.C | 166 - .../LES/incompressible/laminar/laminar.H | 130 - .../locDynOneEqEddy/locDynOneEqEddy.C | 172 - .../locDynOneEqEddy/locDynOneEqEddy.H | 173 - .../mixedSmagorinsky/mixedSmagorinsky.C | 145 - .../mixedSmagorinsky/mixedSmagorinsky.H | 156 - .../LES/incompressible/oneEqEddy/oneEqEddy.C | 129 - .../LES/incompressible/oneEqEddy/oneEqEddy.H | 148 - .../scaleSimilarity/scaleSimilarity.C | 124 - .../scaleSimilarity/scaleSimilarity.H | 134 - .../spectEddyVisc/spectEddyVisc.C | 167 - .../spectEddyVisc/spectEddyVisc.H | 138 - .../vanDriestDelta/vanDriestDelta.C | 151 - .../vanDriestDelta/vanDriestDelta.H | 114 - src/turbulenceModels/RAS/Allwmake | 8 - .../RAS/compressible/LRR/LRR.C | 476 - .../RAS/compressible/LRR/LRR.H | 202 - .../LaunderGibsonRSTM/LaunderGibsonRSTM.C | 514 - .../LaunderGibsonRSTM/LaunderGibsonRSTM.H | 211 - .../LaunderSharmaKE/LaunderSharmaKE.C | 331 - .../LaunderSharmaKE/LaunderSharmaKE.H | 191 - .../RAS/compressible/Make/files | 43 - .../RAS/compressible/Make/options | 8 - .../RAS/compressible/RASModel/RASModel.C | 228 - .../RAS/compressible/RASModel/RASModel.H | 339 - .../RAS/compressible/RASModel/newRASModel.C | 99 - .../compressible/RNGkEpsilon/RNGkEpsilon.C | 368 - .../compressible/RNGkEpsilon/RNGkEpsilon.H | 189 - .../SpalartAllmaras/SpalartAllmaras.C | 353 - .../SpalartAllmaras/SpalartAllmaras.H | 245 - .../backwardsCompatibilityWallFunctions.C | 286 - .../backwardsCompatibilityWallFunctions.H | 123 - ...wardsCompatibilityWallFunctionsTemplates.C | 166 - ...entHeatFluxTemperatureFvPatchScalarField.C | 203 - ...entHeatFluxTemperatureFvPatchScalarField.H | 176 - ...thDissipationRateInletFvPatchScalarField.C | 152 - ...thDissipationRateInletFvPatchScalarField.H | 167 - ...ngLengthFrequencyInletFvPatchScalarField.C | 158 - ...ngLengthFrequencyInletFvPatchScalarField.H | 171 - .../alphatWallFunctionFvPatchScalarField.C | 132 - .../alphatWallFunctionFvPatchScalarField.H | 155 - .../epsilonWallFunctionFvPatchScalarField.C | 218 - .../epsilonWallFunctionFvPatchScalarField.H | 164 - .../kQRWallFunctionFvPatchField.C | 155 - .../kQRWallFunctionFvPatchField.H | 170 - .../kQRWallFunctionFvPatchFields.C | 51 - .../kQRWallFunctionFvPatchFields.H | 56 - .../mutRoughWallFunctionFvPatchScalarField.C | 248 - .../mutRoughWallFunctionFvPatchScalarField.H | 194 - ...ndardRoughWallFunctionFvPatchScalarField.C | 314 - ...ndardRoughWallFunctionFvPatchScalarField.H | 208 - ...asStandardWallFunctionFvPatchScalarField.C | 175 - ...asStandardWallFunctionFvPatchScalarField.H | 158 - ...rtAllmarasWallFunctionFvPatchScalarField.C | 187 - ...rtAllmarasWallFunctionFvPatchScalarField.H | 150 - .../mutWallFunctionFvPatchScalarField.C | 162 - .../mutWallFunctionFvPatchScalarField.H | 155 - .../omegaWallFunctionFvPatchScalarField.C | 209 - .../omegaWallFunctionFvPatchScalarField.H | 159 - .../compressible/include/wallDissipationI.H | 51 - .../RAS/compressible/include/wallFunctionsI.H | 128 - .../RAS/compressible/include/wallViscosityI.H | 73 - .../RAS/compressible/kEpsilon/kEpsilon.C | 341 - .../RAS/compressible/kEpsilon/kEpsilon.H | 190 - .../RAS/compressible/kOmegaSST/kOmegaSST.C | 467 - .../RAS/compressible/kOmegaSST/kOmegaSST.H | 303 - .../RAS/compressible/laminar/laminar.C | 195 - .../RAS/compressible/laminar/laminar.H | 135 - .../compressible/realizableKE/realizableKE.C | 380 - .../compressible/realizableKE/realizableKE.H | 204 - .../RAS/incompressible/LRR/LRR.C | 433 - .../RAS/incompressible/LRR/LRR.H | 188 - .../LamBremhorstKE/LamBremhorstKE.C | 280 - .../LamBremhorstKE/LamBremhorstKE.H | 165 - .../LaunderGibsonRSTM/LaunderGibsonRSTM.C | 474 - .../LaunderGibsonRSTM/LaunderGibsonRSTM.H | 196 - .../LaunderSharmaKE/LaunderSharmaKE.C | 275 - .../LaunderSharmaKE/LaunderSharmaKE.H | 180 - .../incompressible/LienCubicKE/LienCubicKE.C | 423 - .../incompressible/LienCubicKE/LienCubicKE.H | 173 - .../LienCubicKELowRe/LienCubicKELowRe.C | 495 - .../LienCubicKELowRe/LienCubicKELowRe.H | 198 - .../LienCubicKELowReSetWallDissipation.H | 71 - .../LienLeschzinerLowRe/LienLeschzinerLowRe.C | 278 - .../LienLeschzinerLowRe/LienLeschzinerLowRe.H | 168 - .../LienLeschzinerLowReSetWallDissipation.H | 71 - .../RAS/incompressible/Make/files | 48 - .../RAS/incompressible/Make/options | 8 - .../NonlinearKEShih/NonlinearKEShih.C | 377 - .../NonlinearKEShih/NonlinearKEShih.H | 172 - .../RAS/incompressible/QZeta/QZeta.C | 330 - .../RAS/incompressible/QZeta/QZeta.H | 179 - .../RAS/incompressible/RASModel/RASModel.C | 215 - .../RAS/incompressible/RASModel/RASModel.H | 314 - .../RAS/incompressible/RASModel/newRASModel.C | 96 - .../incompressible/RNGkEpsilon/RNGkEpsilon.C | 311 - .../incompressible/RNGkEpsilon/RNGkEpsilon.H | 176 - .../SpalartAllmaras/SpalartAllmaras.C | 390 - .../SpalartAllmaras/SpalartAllmaras.H | 192 - .../backwardsCompatibilityWallFunctions.C | 215 - .../backwardsCompatibilityWallFunctions.H | 116 - ...wardsCompatibilityWallFunctionsTemplates.C | 166 - ...entHeatFluxTemperatureFvPatchScalarField.C | 191 - ...entHeatFluxTemperatureFvPatchScalarField.H | 179 - ...thDissipationRateInletFvPatchScalarField.C | 152 - ...thDissipationRateInletFvPatchScalarField.H | 167 - ...ngLengthFrequencyInletFvPatchScalarField.C | 158 - ...ngLengthFrequencyInletFvPatchScalarField.H | 171 - .../epsilonWallFunctionFvPatchScalarField.C | 213 - .../epsilonWallFunctionFvPatchScalarField.H | 164 - .../kQRWallFunctionFvPatchField.C | 155 - .../kQRWallFunctionFvPatchField.H | 170 - .../kQRWallFunctionFvPatchFields.C | 51 - .../kQRWallFunctionFvPatchFields.H | 56 - .../nutRoughWallFunctionFvPatchScalarField.C | 245 - .../nutRoughWallFunctionFvPatchScalarField.H | 194 - ...ndardRoughWallFunctionFvPatchScalarField.C | 302 - ...ndardRoughWallFunctionFvPatchScalarField.H | 208 - ...asStandardWallFunctionFvPatchScalarField.C | 172 - ...asStandardWallFunctionFvPatchScalarField.H | 160 - ...rtAllmarasWallFunctionFvPatchScalarField.C | 180 - ...rtAllmarasWallFunctionFvPatchScalarField.H | 153 - .../nutWallFunctionFvPatchScalarField.C | 157 - .../nutWallFunctionFvPatchScalarField.H | 155 - .../omegaWallFunctionFvPatchScalarField.C | 204 - .../omegaWallFunctionFvPatchScalarField.H | 159 - .../include/nonLinearWallFunctionsI.H | 127 - .../incompressible/include/wallDissipationI.H | 51 - .../include/wallFunctionsI.H.old | 126 - .../include/wallNonlinearViscosityI.H | 70 - .../include/wallViscosityI.H.old | 70 - .../RAS/incompressible/kEpsilon/kEpsilon.C | 281 - .../RAS/incompressible/kEpsilon/kEpsilon.H | 176 - .../RAS/incompressible/kOmega/kOmega.C | 287 - .../RAS/incompressible/kOmega/kOmega.H | 210 - .../RAS/incompressible/kOmegaSST/kOmegaSST.C | 425 - .../RAS/incompressible/kOmegaSST/kOmegaSST.H | 290 - .../RAS/incompressible/laminar/laminar.C | 203 - .../RAS/incompressible/laminar/laminar.H | 123 - .../realizableKE/realizableKE.C | 340 - .../realizableKE/realizableKE.H | 193 - tutorials/buoyantSimpleFoam/hotRoom/0/epsilon | 21 +- tutorials/buoyantSimpleFoam/hotRoom/0/k | 21 +- .../hotRoom/constant/polyMesh/boundary | 3 +- tutorials/interFoam/Allclean | 6 +- tutorials/interFoam/Allrun | 6 +- tutorials/interFoam/damBreak/0/U | 5 +- tutorials/interFoam/damBreak/0/gamma | 51 - tutorials/interFoam/damBreak/0/gamma.org | 51 - .../damBreak/constant/polyMesh/boundary | 3 +- tutorials/interFoam/damBreak/system/fvSchemes | 8 +- .../interFoam/damBreak/system/fvSolution | 6 +- .../interFoam/damBreak/system/setFieldsDict | 4 +- tutorials/lesInterFoam/nozzleFlow2D/0/B | 57 - tutorials/lesInterFoam/nozzleFlow2D/0/U | 57 - .../lesInterFoam/nozzleFlow2D/0/data/Ubulk | 0 .../lesInterFoam/nozzleFlow2D/0/data/ptrace | 0 tutorials/lesInterFoam/nozzleFlow2D/0/gamma | 57 - tutorials/lesInterFoam/nozzleFlow2D/0/k | 58 - tutorials/lesInterFoam/nozzleFlow2D/0/nuSgs | 54 - tutorials/lesInterFoam/nozzleFlow2D/0/nuTilda | 58 - tutorials/lesInterFoam/nozzleFlow2D/0/pd | 61 - tutorials/lesInterFoam/nozzleFlow2D/Allclean | 7 - tutorials/lesInterFoam/nozzleFlow2D/Allrun | 33 - .../nozzleFlow2D/constant/LESProperties | 176 - .../constant/environmentalProperties | 19 - .../constant/polyMesh/blockMeshDict | 114 - .../nozzleFlow2D/constant/polyMesh/boundary | 68 - .../constant/polyMesh/boundary.org | 68 - .../nozzleFlow2D/constant/polyMesh/sets/c0 | 7090 -------- .../constant/polyMesh/sets/c0_old | 21 - .../constant/polyMesh/sets/refinedCells | 14159 ---------------- .../nozzleFlow2D/constant/transportProperties | 68 - .../nozzleFlow2D/system/cellSetDict | 29 - .../nozzleFlow2D/system/cellSetDict.1 | 29 - .../nozzleFlow2D/system/cellSetDict.2 | 29 - .../nozzleFlow2D/system/controlDict | 53 - .../nozzleFlow2D/system/fvSchemes | 63 - .../nozzleFlow2D/system/fvSolution | 121 - .../nozzleFlow2D/system/refineMeshDict | 44 - 383 files changed, 428 insertions(+), 65331 deletions(-) delete mode 100644 applications/solvers/incompressible/channelOodles/Make/files delete mode 100644 applications/solvers/incompressible/channelOodles/Make/options delete mode 100644 applications/solvers/incompressible/channelOodles/channelOodles.C delete mode 100644 applications/solvers/incompressible/channelOodles/createFields.H delete mode 100644 applications/solvers/incompressible/channelOodles/createGradP.H delete mode 100644 applications/solvers/incompressible/channelOodles/readTransportProperties.H delete mode 100644 applications/solvers/incompressible/channelOodles/writeGradP.H delete mode 100644 applications/solvers/incompressible/icoDyMFoam/Make/files delete mode 100644 applications/solvers/incompressible/icoDyMFoam/Make/options delete mode 100644 applications/solvers/incompressible/icoDyMFoam/UEqn.H delete mode 100644 applications/solvers/incompressible/icoDyMFoam/checkTotalVolume.H delete mode 100644 applications/solvers/incompressible/icoDyMFoam/correctPhi.H delete mode 100644 applications/solvers/incompressible/icoDyMFoam/createFields.H delete mode 100644 applications/solvers/incompressible/icoDyMFoam/icoDyMFoam.C delete mode 100644 applications/solvers/incompressible/icoDyMFoam/readControls.H delete mode 100644 applications/solvers/incompressible/oodles/Make/files delete mode 100644 applications/solvers/incompressible/oodles/Make/options delete mode 100644 applications/solvers/incompressible/oodles/createFields.H delete mode 100644 applications/solvers/incompressible/oodles/oodles.C delete mode 100644 applications/solvers/incompressible/turbDyMFoam/Make/files delete mode 100644 applications/solvers/incompressible/turbDyMFoam/Make/options delete mode 100644 applications/solvers/incompressible/turbDyMFoam/UEqn.H delete mode 100644 applications/solvers/incompressible/turbDyMFoam/correctPhi.H delete mode 100644 applications/solvers/incompressible/turbDyMFoam/createFields.H delete mode 100644 applications/solvers/incompressible/turbDyMFoam/readControls.H delete mode 100644 applications/solvers/incompressible/turbDyMFoam/turbDyMFoam.C delete mode 100644 applications/solvers/incompressible/turbFoam/Make/files delete mode 100644 applications/solvers/incompressible/turbFoam/Make/options delete mode 100644 applications/solvers/incompressible/turbFoam/createFields.H delete mode 100644 applications/solvers/incompressible/turbFoam/turbFoam.C delete mode 100644 applications/solvers/multiphase/compressibleLesInterFoam/Make/files delete mode 100644 applications/solvers/multiphase/compressibleLesInterFoam/Make/options delete mode 100644 applications/solvers/multiphase/compressibleLesInterFoam/UEqn.H delete mode 100644 applications/solvers/multiphase/compressibleLesInterFoam/alphaEqns.H delete mode 100644 applications/solvers/multiphase/compressibleLesInterFoam/alphaEqnsSubCycle.H delete mode 100644 applications/solvers/multiphase/compressibleLesInterFoam/compressibleLesInterFoam.C delete mode 100644 applications/solvers/multiphase/compressibleLesInterFoam/createFields.H delete mode 100644 applications/solvers/multiphase/compressibleLesInterFoam/pEqn.H delete mode 100644 applications/solvers/multiphase/compressibleLesInterFoam/readControls.H delete mode 100644 applications/solvers/multiphase/interFoam/gammaEqn.H delete mode 100644 applications/solvers/multiphase/interFoam/gammaEqnSubCycle.H delete mode 100644 applications/solvers/multiphase/interPhaseChangeFoam/gammaEqn.H delete mode 100644 applications/solvers/multiphase/interPhaseChangeFoam/gammaEqnSubCycle.H delete mode 100644 applications/solvers/multiphase/lesCavitatingFoam/CourantNo.H delete mode 100644 applications/solvers/multiphase/lesCavitatingFoam/Make/files delete mode 100644 applications/solvers/multiphase/lesCavitatingFoam/Make/options delete mode 100644 applications/solvers/multiphase/lesCavitatingFoam/UEqn.H delete mode 100644 applications/solvers/multiphase/lesCavitatingFoam/continuityErrs.H delete mode 100644 applications/solvers/multiphase/lesCavitatingFoam/createFields.H delete mode 100644 applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.C delete mode 100644 applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.H delete mode 100644 applications/solvers/multiphase/lesCavitatingFoam/gammaPsi.H delete mode 100644 applications/solvers/multiphase/lesCavitatingFoam/lesCavitatingFoam.C delete mode 100644 applications/solvers/multiphase/lesCavitatingFoam/pEqn.H delete mode 100644 applications/solvers/multiphase/lesCavitatingFoam/readControls.H delete mode 100644 applications/solvers/multiphase/lesCavitatingFoam/readThermodynamicProperties.H delete mode 100644 applications/solvers/multiphase/lesCavitatingFoam/resetPhiPatches.H delete mode 100644 applications/solvers/multiphase/lesCavitatingFoam/resetPhivPatches.H delete mode 100644 applications/solvers/multiphase/lesCavitatingFoam/rhoEqn.H delete mode 100644 applications/solvers/multiphase/lesCavitatingFoam/setDeltaT.H delete mode 100644 applications/solvers/multiphase/lesCavitatingFoam/setInitialDeltaT.H delete mode 100644 applications/solvers/multiphase/lesInterFoam/Make/files delete mode 100644 applications/solvers/multiphase/lesInterFoam/Make/options delete mode 100644 applications/solvers/multiphase/lesInterFoam/UEqn.H delete mode 100644 applications/solvers/multiphase/lesInterFoam/createFields.H delete mode 100644 applications/solvers/multiphase/lesInterFoam/lesInterFoam.C delete mode 100644 applications/solvers/multiphase/rasCavitatingFoam/CourantNo.H delete mode 100644 applications/solvers/multiphase/rasCavitatingFoam/Make/files delete mode 100644 applications/solvers/multiphase/rasCavitatingFoam/Make/options delete mode 100644 applications/solvers/multiphase/rasCavitatingFoam/UEqn.H delete mode 100644 applications/solvers/multiphase/rasCavitatingFoam/continuityErrs.H delete mode 100644 applications/solvers/multiphase/rasCavitatingFoam/createFields.H delete mode 100644 applications/solvers/multiphase/rasCavitatingFoam/gammaPsi.H delete mode 100644 applications/solvers/multiphase/rasCavitatingFoam/pEqn.H delete mode 100644 applications/solvers/multiphase/rasCavitatingFoam/rasCavitatingFoam.C delete mode 100644 applications/solvers/multiphase/rasCavitatingFoam/readControls.H delete mode 100644 applications/solvers/multiphase/rasCavitatingFoam/readThermodynamicProperties.H delete mode 100644 applications/solvers/multiphase/rasCavitatingFoam/resetPhiPatches.H delete mode 100644 applications/solvers/multiphase/rasCavitatingFoam/resetPhivPatches.H delete mode 100644 applications/solvers/multiphase/rasCavitatingFoam/rhoEqn.H delete mode 100644 applications/solvers/multiphase/rasCavitatingFoam/setDeltaT.H delete mode 100644 applications/solvers/multiphase/rasCavitatingFoam/setInitialDeltaT.H delete mode 100644 applications/solvers/multiphase/rasInterFoam/Make/files delete mode 100644 applications/solvers/multiphase/rasInterFoam/Make/options delete mode 100644 applications/solvers/multiphase/rasInterFoam/UEqn.H delete mode 100644 applications/solvers/multiphase/rasInterFoam/createFields.H delete mode 100644 applications/solvers/multiphase/rasInterFoam/rasInterFoam.C delete mode 100644 applications/solvers/multiphase/twoLiquidMixingFoam/gammaEqn.H delete mode 100644 src/transportModels/interfaceProperties/gammaContactAngle/constantGammaContactAngle/constantGammaContactAngleFvPatchScalarField.C delete mode 100644 src/transportModels/interfaceProperties/gammaContactAngle/constantGammaContactAngle/constantGammaContactAngleFvPatchScalarField.H delete mode 100644 src/transportModels/interfaceProperties/gammaContactAngle/dynamicGammaContactAngle/dynamicGammaContactAngleFvPatchScalarField.C delete mode 100644 src/transportModels/interfaceProperties/gammaContactAngle/dynamicGammaContactAngle/dynamicGammaContactAngleFvPatchScalarField.H delete mode 100644 src/transportModels/interfaceProperties/gammaContactAngle/gammaContactAngle/gammaContactAngleFvPatchScalarField.C delete mode 100644 src/transportModels/interfaceProperties/gammaContactAngle/gammaContactAngle/gammaContactAngleFvPatchScalarField.H delete mode 100644 src/transportModels/interfaceProperties/gammaContactAngle/timeVaryingGammaContactAngle/timeVaryingGammaContactAngleFvPatchScalarField.C delete mode 100644 src/transportModels/interfaceProperties/gammaContactAngle/timeVaryingGammaContactAngle/timeVaryingGammaContactAngleFvPatchScalarField.H delete mode 100644 src/transportModels/interfaceProperties/gammaFixedPressure/gammaFixedPressureFvPatchScalarField.C delete mode 100644 src/transportModels/interfaceProperties/gammaFixedPressure/gammaFixedPressureFvPatchScalarField.H delete mode 100644 src/turbulenceModels/LES/compressible/DeardorffDiffStress/DeardorffDiffStress.C delete mode 100644 src/turbulenceModels/LES/compressible/DeardorffDiffStress/DeardorffDiffStress.H delete mode 100644 src/turbulenceModels/LES/compressible/GenEddyVisc/GenEddyVisc.C delete mode 100644 src/turbulenceModels/LES/compressible/GenEddyVisc/GenEddyVisc.H delete mode 100644 src/turbulenceModels/LES/compressible/GenSGSStress/GenSGSStress.C delete mode 100644 src/turbulenceModels/LES/compressible/GenSGSStress/GenSGSStress.H delete mode 100644 src/turbulenceModels/LES/compressible/LESModel/LESModel.C delete mode 100644 src/turbulenceModels/LES/compressible/LESModel/LESModel.H delete mode 100644 src/turbulenceModels/LES/compressible/LESModel/newLESModel.C delete mode 100644 src/turbulenceModels/LES/compressible/Make/files delete mode 100644 src/turbulenceModels/LES/compressible/Make/options delete mode 100644 src/turbulenceModels/LES/compressible/Smagorinsky/Smagorinsky.C delete mode 100644 src/turbulenceModels/LES/compressible/Smagorinsky/Smagorinsky.H delete mode 100644 src/turbulenceModels/LES/compressible/SpalartAllmaras/SpalartAllmaras.C delete mode 100644 src/turbulenceModels/LES/compressible/SpalartAllmaras/SpalartAllmaras.H delete mode 100644 src/turbulenceModels/LES/compressible/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsSpalartAllmarasWallFunction/muSgsSpalartAllmarasWallFunctionFvPatchScalarField.C delete mode 100644 src/turbulenceModels/LES/compressible/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsSpalartAllmarasWallFunction/muSgsSpalartAllmarasWallFunctionFvPatchScalarField.H delete mode 100644 src/turbulenceModels/LES/compressible/dynOneEqEddy/dynOneEqEddy.C delete mode 100644 src/turbulenceModels/LES/compressible/dynOneEqEddy/dynOneEqEddy.H delete mode 100644 src/turbulenceModels/LES/compressible/lowReOneEqEddy/lowReOneEqEddy.C delete mode 100644 src/turbulenceModels/LES/compressible/lowReOneEqEddy/lowReOneEqEddy.H delete mode 100644 src/turbulenceModels/LES/compressible/oneEqEddy/oneEqEddy.C delete mode 100644 src/turbulenceModels/LES/compressible/oneEqEddy/oneEqEddy.H delete mode 100644 src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.C delete mode 100644 src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.H delete mode 100644 src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.C delete mode 100644 src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.H delete mode 100644 src/turbulenceModels/LES/incompressible/GenSGSStress/GenSGSStress.C delete mode 100644 src/turbulenceModels/LES/incompressible/GenSGSStress/GenSGSStress.H delete mode 100644 src/turbulenceModels/LES/incompressible/LESModel/LESModel.C delete mode 100644 src/turbulenceModels/LES/incompressible/LESModel/LESModel.H delete mode 100644 src/turbulenceModels/LES/incompressible/LESModel/newLESModel.C delete mode 100644 src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.C delete mode 100644 src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.H delete mode 100644 src/turbulenceModels/LES/incompressible/Make/files delete mode 100644 src/turbulenceModels/LES/incompressible/Make/options delete mode 100644 src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.C delete mode 100644 src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.H delete mode 100644 src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.C delete mode 100644 src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.H delete mode 100644 src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.C delete mode 100644 src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.H delete mode 100644 src/turbulenceModels/LES/incompressible/SpalartAllmarasDDES/SpalartAllmarasDDES.C delete mode 100644 src/turbulenceModels/LES/incompressible/SpalartAllmarasDDES/SpalartAllmarasDDES.H delete mode 100644 src/turbulenceModels/LES/incompressible/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C delete mode 100644 src/turbulenceModels/LES/incompressible/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.H delete mode 100644 src/turbulenceModels/LES/incompressible/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C delete mode 100644 src/turbulenceModels/LES/incompressible/SpalartAllmarasIDDES/SpalartAllmarasIDDES.H delete mode 100644 src/turbulenceModels/LES/incompressible/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsSpalartAllmarasWallFunction/nuSgsSpalartAllmarasWallFunctionFvPatchScalarField.C delete mode 100644 src/turbulenceModels/LES/incompressible/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsSpalartAllmarasWallFunction/nuSgsSpalartAllmarasWallFunctionFvPatchScalarField.H delete mode 100644 src/turbulenceModels/LES/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.C delete mode 100644 src/turbulenceModels/LES/incompressible/dynMixedSmagorinsky/dynMixedSmagorinsky.H delete mode 100644 src/turbulenceModels/LES/incompressible/dynOneEqEddy/dynOneEqEddy.C delete mode 100644 src/turbulenceModels/LES/incompressible/dynOneEqEddy/dynOneEqEddy.H delete mode 100644 src/turbulenceModels/LES/incompressible/dynSmagorinsky/dynSmagorinsky.C delete mode 100644 src/turbulenceModels/LES/incompressible/dynSmagorinsky/dynSmagorinsky.H delete mode 100644 src/turbulenceModels/LES/incompressible/kOmegaSSTSAS/kOmegaSSTSAS.C delete mode 100644 src/turbulenceModels/LES/incompressible/kOmegaSSTSAS/kOmegaSSTSAS.H delete mode 100644 src/turbulenceModels/LES/incompressible/laminar/laminar.C delete mode 100644 src/turbulenceModels/LES/incompressible/laminar/laminar.H delete mode 100644 src/turbulenceModels/LES/incompressible/locDynOneEqEddy/locDynOneEqEddy.C delete mode 100644 src/turbulenceModels/LES/incompressible/locDynOneEqEddy/locDynOneEqEddy.H delete mode 100644 src/turbulenceModels/LES/incompressible/mixedSmagorinsky/mixedSmagorinsky.C delete mode 100644 src/turbulenceModels/LES/incompressible/mixedSmagorinsky/mixedSmagorinsky.H delete mode 100644 src/turbulenceModels/LES/incompressible/oneEqEddy/oneEqEddy.C delete mode 100644 src/turbulenceModels/LES/incompressible/oneEqEddy/oneEqEddy.H delete mode 100644 src/turbulenceModels/LES/incompressible/scaleSimilarity/scaleSimilarity.C delete mode 100644 src/turbulenceModels/LES/incompressible/scaleSimilarity/scaleSimilarity.H delete mode 100644 src/turbulenceModels/LES/incompressible/spectEddyVisc/spectEddyVisc.C delete mode 100644 src/turbulenceModels/LES/incompressible/spectEddyVisc/spectEddyVisc.H delete mode 100644 src/turbulenceModels/LES/incompressible/vanDriestDelta/vanDriestDelta.C delete mode 100644 src/turbulenceModels/LES/incompressible/vanDriestDelta/vanDriestDelta.H delete mode 100755 src/turbulenceModels/RAS/Allwmake delete mode 100644 src/turbulenceModels/RAS/compressible/LRR/LRR.C delete mode 100644 src/turbulenceModels/RAS/compressible/LRR/LRR.H delete mode 100644 src/turbulenceModels/RAS/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C delete mode 100644 src/turbulenceModels/RAS/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H delete mode 100644 src/turbulenceModels/RAS/compressible/LaunderSharmaKE/LaunderSharmaKE.C delete mode 100644 src/turbulenceModels/RAS/compressible/LaunderSharmaKE/LaunderSharmaKE.H delete mode 100644 src/turbulenceModels/RAS/compressible/Make/files delete mode 100644 src/turbulenceModels/RAS/compressible/Make/options delete mode 100644 src/turbulenceModels/RAS/compressible/RASModel/RASModel.C delete mode 100644 src/turbulenceModels/RAS/compressible/RASModel/RASModel.H delete mode 100644 src/turbulenceModels/RAS/compressible/RASModel/newRASModel.C delete mode 100644 src/turbulenceModels/RAS/compressible/RNGkEpsilon/RNGkEpsilon.C delete mode 100644 src/turbulenceModels/RAS/compressible/RNGkEpsilon/RNGkEpsilon.H delete mode 100644 src/turbulenceModels/RAS/compressible/SpalartAllmaras/SpalartAllmaras.C delete mode 100644 src/turbulenceModels/RAS/compressible/SpalartAllmaras/SpalartAllmaras.H delete mode 100644 src/turbulenceModels/RAS/compressible/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.C delete mode 100644 src/turbulenceModels/RAS/compressible/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.H delete mode 100644 src/turbulenceModels/RAS/compressible/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctionsTemplates.C delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.C delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.H delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchFields.C delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchFields.H delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/compressible/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/compressible/include/wallDissipationI.H delete mode 100644 src/turbulenceModels/RAS/compressible/include/wallFunctionsI.H delete mode 100644 src/turbulenceModels/RAS/compressible/include/wallViscosityI.H delete mode 100644 src/turbulenceModels/RAS/compressible/kEpsilon/kEpsilon.C delete mode 100644 src/turbulenceModels/RAS/compressible/kEpsilon/kEpsilon.H delete mode 100644 src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaSST.C delete mode 100644 src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaSST.H delete mode 100644 src/turbulenceModels/RAS/compressible/laminar/laminar.C delete mode 100644 src/turbulenceModels/RAS/compressible/laminar/laminar.H delete mode 100644 src/turbulenceModels/RAS/compressible/realizableKE/realizableKE.C delete mode 100644 src/turbulenceModels/RAS/compressible/realizableKE/realizableKE.H delete mode 100644 src/turbulenceModels/RAS/incompressible/LRR/LRR.C delete mode 100644 src/turbulenceModels/RAS/incompressible/LRR/LRR.H delete mode 100644 src/turbulenceModels/RAS/incompressible/LamBremhorstKE/LamBremhorstKE.C delete mode 100644 src/turbulenceModels/RAS/incompressible/LamBremhorstKE/LamBremhorstKE.H delete mode 100644 src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.C delete mode 100644 src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H delete mode 100644 src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.C delete mode 100644 src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.H delete mode 100644 src/turbulenceModels/RAS/incompressible/LienCubicKE/LienCubicKE.C delete mode 100644 src/turbulenceModels/RAS/incompressible/LienCubicKE/LienCubicKE.H delete mode 100644 src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.C delete mode 100644 src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowRe.H delete mode 100644 src/turbulenceModels/RAS/incompressible/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H delete mode 100644 src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.C delete mode 100644 src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowRe.H delete mode 100644 src/turbulenceModels/RAS/incompressible/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H delete mode 100644 src/turbulenceModels/RAS/incompressible/Make/files delete mode 100644 src/turbulenceModels/RAS/incompressible/Make/options delete mode 100644 src/turbulenceModels/RAS/incompressible/NonlinearKEShih/NonlinearKEShih.C delete mode 100644 src/turbulenceModels/RAS/incompressible/NonlinearKEShih/NonlinearKEShih.H delete mode 100644 src/turbulenceModels/RAS/incompressible/QZeta/QZeta.C delete mode 100644 src/turbulenceModels/RAS/incompressible/QZeta/QZeta.H delete mode 100644 src/turbulenceModels/RAS/incompressible/RASModel/RASModel.C delete mode 100644 src/turbulenceModels/RAS/incompressible/RASModel/RASModel.H delete mode 100644 src/turbulenceModels/RAS/incompressible/RASModel/newRASModel.C delete mode 100644 src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.C delete mode 100644 src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.H delete mode 100644 src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.C delete mode 100644 src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.H delete mode 100644 src/turbulenceModels/RAS/incompressible/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.C delete mode 100644 src/turbulenceModels/RAS/incompressible/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.H delete mode 100644 src/turbulenceModels/RAS/incompressible/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctionsTemplates.C delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.C delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.H delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchFields.C delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchFields.H delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C delete mode 100644 src/turbulenceModels/RAS/incompressible/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.H delete mode 100644 src/turbulenceModels/RAS/incompressible/include/nonLinearWallFunctionsI.H delete mode 100644 src/turbulenceModels/RAS/incompressible/include/wallDissipationI.H delete mode 100644 src/turbulenceModels/RAS/incompressible/include/wallFunctionsI.H.old delete mode 100644 src/turbulenceModels/RAS/incompressible/include/wallNonlinearViscosityI.H delete mode 100644 src/turbulenceModels/RAS/incompressible/include/wallViscosityI.H.old delete mode 100644 src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.C delete mode 100644 src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.H delete mode 100644 src/turbulenceModels/RAS/incompressible/kOmega/kOmega.C delete mode 100644 src/turbulenceModels/RAS/incompressible/kOmega/kOmega.H delete mode 100644 src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.C delete mode 100644 src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.H delete mode 100644 src/turbulenceModels/RAS/incompressible/laminar/laminar.C delete mode 100644 src/turbulenceModels/RAS/incompressible/laminar/laminar.H delete mode 100644 src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.C delete mode 100644 src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.H delete mode 100644 tutorials/interFoam/damBreak/0/gamma delete mode 100644 tutorials/interFoam/damBreak/0/gamma.org delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/0/B delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/0/U delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/0/data/Ubulk delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/0/data/ptrace delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/0/gamma delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/0/k delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/0/nuSgs delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/0/nuTilda delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/0/pd delete mode 100755 tutorials/lesInterFoam/nozzleFlow2D/Allclean delete mode 100755 tutorials/lesInterFoam/nozzleFlow2D/Allrun delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/constant/LESProperties delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/constant/environmentalProperties delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/blockMeshDict delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/boundary delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/boundary.org delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/sets/c0 delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/sets/c0_old delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/constant/polyMesh/sets/refinedCells delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/constant/transportProperties delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/system/cellSetDict delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/system/cellSetDict.1 delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/system/cellSetDict.2 delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/system/controlDict delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/system/fvSchemes delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/system/fvSolution delete mode 100644 tutorials/lesInterFoam/nozzleFlow2D/system/refineMeshDict diff --git a/applications/solvers/incompressible/boundaryFoam/Make/options b/applications/solvers/incompressible/boundaryFoam/Make/options index 835189da6d..e7594d177f 100644 --- a/applications/solvers/incompressible/boundaryFoam/Make/options +++ b/applications/solvers/incompressible/boundaryFoam/Make/options @@ -1,7 +1,9 @@ EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ + -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ diff --git a/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C b/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C index 19933091a0..4ab797dc20 100644 --- a/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C +++ b/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C @@ -37,8 +37,8 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/RASModel/RASModel.H" +#include "singlePhaseTransportModel.H" +#include "RASModel.H" #include "wallFvPatch.H" #include "makeGraph.H" diff --git a/applications/solvers/incompressible/channelOodles/Make/files b/applications/solvers/incompressible/channelOodles/Make/files deleted file mode 100644 index 62d0719790..0000000000 --- a/applications/solvers/incompressible/channelOodles/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -channelOodles.C - -EXE = $(FOAM_APPBIN)/channelOodles diff --git a/applications/solvers/incompressible/channelOodles/Make/options b/applications/solvers/incompressible/channelOodles/Make/options deleted file mode 100644 index 7f55ccc3ed..0000000000 --- a/applications/solvers/incompressible/channelOodles/Make/options +++ /dev/null @@ -1,13 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels/LES \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude \ - -I../oodles - -EXE_LIBS = \ - -lincompressibleLESModels \ - -lincompressibleTransportModels \ - -lfiniteVolume \ - -lmeshTools diff --git a/applications/solvers/incompressible/channelOodles/channelOodles.C b/applications/solvers/incompressible/channelOodles/channelOodles.C deleted file mode 100644 index 00be546b6e..0000000000 --- a/applications/solvers/incompressible/channelOodles/channelOodles.C +++ /dev/null @@ -1,155 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Application - oodles - -Description - Incompressible LES solver for flow in a channel. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/LESModel/LESModel.H" -#include "IFstream.H" -#include "OFstream.H" -#include "Random.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "setRootCase.H" - #include "createTime.H" - #include "createMesh.H" - #include "readTransportProperties.H" - #include "createFields.H" - #include "initContinuityErrs.H" - #include "createGradP.H" - - Info<< "\nStarting time loop\n" << endl; - - for(runTime++; !runTime.end(); runTime++) - { - Info<< "Time = " << runTime.timeName() << nl << endl; - - #include "readPISOControls.H" - - #include "CourantNo.H" - - sgsModel->correct(); - - fvVectorMatrix UEqn - ( - fvm::ddt(U) - + fvm::div(phi, U) - + sgsModel->divDevBeff(U) - == - flowDirection*gradP - ); - - if (momentumPredictor) - { - solve(UEqn == -fvc::grad(p)); - } - - - // --- PISO loop - - volScalarField rUA = 1.0/UEqn.A(); - - for (int corr=0; corr sgsModel - ( - incompressible::LESModel::New(U, phi, laminarTransport) - ); diff --git a/applications/solvers/incompressible/channelOodles/createGradP.H b/applications/solvers/incompressible/channelOodles/createGradP.H deleted file mode 100644 index 9bb9bb0ba2..0000000000 --- a/applications/solvers/incompressible/channelOodles/createGradP.H +++ /dev/null @@ -1,24 +0,0 @@ - dimensionedScalar gradP - ( - "gradP", - dimensionSet(0, 1, -2, 0, 0), - 0.0 - ); - - - IFstream gradPFile - ( - runTime.path()/runTime.timeName()/"uniform"/"gradP.raw" - ); - - if(gradPFile.good()) - { - gradPFile >> gradP; - Info<< "Reading average pressure gradient" < sgsModel - ( - incompressible::LESModel::New(U, phi, laminarTransport) - ); diff --git a/applications/solvers/incompressible/oodles/oodles.C b/applications/solvers/incompressible/oodles/oodles.C deleted file mode 100644 index 0714bf8515..0000000000 --- a/applications/solvers/incompressible/oodles/oodles.C +++ /dev/null @@ -1,128 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Application - oodles - -Description - Incompressible LES solver. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/transportModel/transportModel.H" -#include "incompressible/LESModel/LESModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "setRootCase.H" - #include "createTime.H" - #include "createMeshNoClear.H" - #include "createFields.H" - #include "initContinuityErrs.H" - - Info<< "\nStarting time loop\n" << endl; - - for (runTime++; !runTime.end(); runTime++) - { - Info<< "Time = " << runTime.timeName() << nl << endl; - - #include "readPISOControls.H" - #include "CourantNo.H" - - sgsModel->correct(); - - fvVectorMatrix UEqn - ( - fvm::ddt(U) - + fvm::div(phi, U) - + sgsModel->divDevBeff(U) - ); - - // Optionally ensure diagonal-dominance of the momentum matrix - UEqn.relax(); - - if (momentumPredictor) - { - solve(UEqn == -fvc::grad(p)); - } - - // --- PISO loop - for (int corr=0; corr turbulence +autoPtr turbulence ( - incompressible::RASModel::New(U, phi, laminarTransport) + incompressible::turbulenceModel::New(U, phi, laminarTransport) ); diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C index f3c1614239..bcc60b7b5e 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C @@ -26,14 +26,16 @@ Application pimpleFoam Description - Large time-step transient solver for incompressible, turbulent flow using - the PIMPLE (merged PISO-SIMPLE) algorithm. + Large time-step transient solver for incompressible, flow using the PIMPLE + (merged PISO-SIMPLE) algorithm. + + Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/RASModel/RASModel.H" +#include "singlePhaseTransportModel.H" +#include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -58,14 +60,14 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; - if (nOuterCorr != 1) - { - p.storePrevIter(); - } - // --- Pressure-velocity PIMPLE corrector loop for (int oCorr=0; oCorrdivDevReff(U) - ); - - if (ocorr != nOuterCorr-1) - { - UEqn.relax(); - } - - if (momentumPredictor) - { - solve(UEqn == -fvc::grad(p)); - } diff --git a/applications/solvers/incompressible/turbDyMFoam/correctPhi.H b/applications/solvers/incompressible/turbDyMFoam/correctPhi.H deleted file mode 100644 index 493c4e0929..0000000000 --- a/applications/solvers/incompressible/turbDyMFoam/correctPhi.H +++ /dev/null @@ -1,44 +0,0 @@ -{ - wordList pcorrTypes(p.boundaryField().types()); - - for (label i=0; i turbulence - ( - incompressible::RASModel::New(U, phi, laminarTransport) - ); - - Info<< "Reading field rAU if present\n" << endl; - volScalarField rAU - ( - IOobject - ( - "rAU", - runTime.timeName(), - mesh, - IOobject::READ_IF_PRESENT, - IOobject::AUTO_WRITE - ), - mesh, - runTime.deltaT(), - zeroGradientFvPatchScalarField::typeName - ); diff --git a/applications/solvers/incompressible/turbDyMFoam/readControls.H b/applications/solvers/incompressible/turbDyMFoam/readControls.H deleted file mode 100644 index 9336616a1b..0000000000 --- a/applications/solvers/incompressible/turbDyMFoam/readControls.H +++ /dev/null @@ -1,14 +0,0 @@ -# include "readTimeControls.H" -# include "readPISOControls.H" - - bool correctPhi = false; - if (piso.found("correctPhi")) - { - correctPhi = Switch(piso.lookup("correctPhi")); - } - - bool checkMeshCourantNo = false; - if (piso.found("checkMeshCourantNo")) - { - checkMeshCourantNo = Switch(piso.lookup("checkMeshCourantNo")); - } diff --git a/applications/solvers/incompressible/turbDyMFoam/turbDyMFoam.C b/applications/solvers/incompressible/turbDyMFoam/turbDyMFoam.C deleted file mode 100644 index a37622f6b3..0000000000 --- a/applications/solvers/incompressible/turbDyMFoam/turbDyMFoam.C +++ /dev/null @@ -1,163 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Application - turbDyMFoam - -Description - Transient solver for incompressible, turbulent flow of Newtonian fluids - with moving mesh. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/RASModel/RASModel.H" -#include "dynamicFvMesh.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - -# include "setRootCase.H" - -# include "createTime.H" -# include "createDynamicFvMesh.H" -# include "readPISOControls.H" -# include "initContinuityErrs.H" -# include "createFields.H" -# include "readTimeControls.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { -# include "readControls.H" -# include "CourantNo.H" - - p.storePrevIter(); - - // Make the fluxes absolute - fvc::makeAbsolute(phi, U); - -# include "setDeltaT.H" - - runTime++; - - Info<< "Time = " << runTime.timeName() << nl << endl; - - bool meshChanged = mesh.update(); - - if (correctPhi && meshChanged) - { -# include "correctPhi.H" - } - - // Make the fluxes relative to the mesh motion - fvc::makeRelative(phi, U); - - if (meshChanged && checkMeshCourantNo) - { -# include "meshCourantNo.H" - } - - // --- PIMPLE loop - for (int ocorr=0; ocorrcorrect(); - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return(0); -} - - -// ************************************************************************* // diff --git a/applications/solvers/incompressible/turbFoam/Make/files b/applications/solvers/incompressible/turbFoam/Make/files deleted file mode 100644 index c3d6346165..0000000000 --- a/applications/solvers/incompressible/turbFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -turbFoam.C - -EXE = $(FOAM_APPBIN)/turbFoam diff --git a/applications/solvers/incompressible/turbFoam/Make/options b/applications/solvers/incompressible/turbFoam/Make/options deleted file mode 100644 index e8bf7df237..0000000000 --- a/applications/solvers/incompressible/turbFoam/Make/options +++ /dev/null @@ -1,10 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/turbulenceModels/RAS \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -EXE_LIBS = \ - -lincompressibleRASModels \ - -lincompressibleTransportModels \ - -lfiniteVolume \ - -lmeshTools diff --git a/applications/solvers/incompressible/turbFoam/createFields.H b/applications/solvers/incompressible/turbFoam/createFields.H deleted file mode 100644 index 8bcbfe7a75..0000000000 --- a/applications/solvers/incompressible/turbFoam/createFields.H +++ /dev/null @@ -1,42 +0,0 @@ - Info<< "Reading field p\n" << endl; - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - Info<< "Reading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - -# include "createPhi.H" - - - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue); - - - singlePhaseTransportModel laminarTransport(U, phi); - - autoPtr turbulence - ( - incompressible::RASModel::New(U, phi, laminarTransport) - ); diff --git a/applications/solvers/incompressible/turbFoam/turbFoam.C b/applications/solvers/incompressible/turbFoam/turbFoam.C deleted file mode 100644 index d32ee3be69..0000000000 --- a/applications/solvers/incompressible/turbFoam/turbFoam.C +++ /dev/null @@ -1,129 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Application - turbFoam - -Description - Transient solver for incompressible, turbulent flow. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" -#include "incompressible/RASModel/RASModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - -# include "setRootCase.H" - -# include "createTime.H" -# include "createMesh.H" -# include "createFields.H" -# include "initContinuityErrs.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - for (runTime++; !runTime.end(); runTime++) - { - Info<< "Time = " << runTime.timeName() << nl << endl; - -# include "readPISOControls.H" -# include "CourantNo.H" - - // Pressure-velocity PISO corrector - { - // Momentum predictor - - fvVectorMatrix UEqn - ( - fvm::ddt(U) - + fvm::div(phi, U) - + turbulence->divDevReff(U) - ); - - if (momentumPredictor) - { - solve(UEqn == -fvc::grad(p)); - } - - // --- PISO loop - - for (int corr=0; corrcorrect(); - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return(0); -} - - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/compressibleLesInterFoam/Make/files b/applications/solvers/multiphase/compressibleLesInterFoam/Make/files deleted file mode 100644 index 05dafae8b1..0000000000 --- a/applications/solvers/multiphase/compressibleLesInterFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -compressibleLesInterFoam.C - -EXE = $(FOAM_APPBIN)/compressibleLesInterFoam diff --git a/applications/solvers/multiphase/compressibleLesInterFoam/Make/options b/applications/solvers/multiphase/compressibleLesInterFoam/Make/options deleted file mode 100644 index 45e4e10f67..0000000000 --- a/applications/solvers/multiphase/compressibleLesInterFoam/Make/options +++ /dev/null @@ -1,15 +0,0 @@ -INTERFOAM = $(FOAM_SOLVERS)/multiphase/interFoam - -EXE_INC = \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ - -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/LES \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -EXE_LIBS = \ - -linterfaceProperties \ - -lincompressibleTransportModels \ - -lincompressibleLESModels \ - -lfiniteVolume diff --git a/applications/solvers/multiphase/compressibleLesInterFoam/UEqn.H b/applications/solvers/multiphase/compressibleLesInterFoam/UEqn.H deleted file mode 100644 index 0895917367..0000000000 --- a/applications/solvers/multiphase/compressibleLesInterFoam/UEqn.H +++ /dev/null @@ -1,29 +0,0 @@ - surfaceScalarField muf = - twoPhaseProperties.muf() - + fvc::interpolate(rho*turbulence->nuSgs()); - - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) - + fvm::div(rhoPhi, U) - - fvm::laplacian(muf, U) - - (fvc::grad(U) & fvc::grad(muf)) - //- fvc::div(muf*(mesh.Sf() & fvc::interpolate(fvc::grad(U)().T()))) - ); - - if (momentumPredictor) - { - solve - ( - UEqn - == - fvc::reconstruct - ( - ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - - ghf*fvc::snGrad(rho) - - fvc::snGrad(pd) - ) * mesh.magSf() - ) - ); - } diff --git a/applications/solvers/multiphase/compressibleLesInterFoam/alphaEqns.H b/applications/solvers/multiphase/compressibleLesInterFoam/alphaEqns.H deleted file mode 100644 index 819cd0f538..0000000000 --- a/applications/solvers/multiphase/compressibleLesInterFoam/alphaEqns.H +++ /dev/null @@ -1,76 +0,0 @@ -{ - word alphaScheme("div(phi,alpha)"); - word alpharScheme("div(phirb,alpha)"); - - surfaceScalarField phir = phic*interface.nHatf(); - - for (int gCorr=0; gCorr 0.0 && alpha1[celli] > 0.0) - { - Sp[celli] -= dgdt[celli]*alpha1[celli]; - Su[celli] += dgdt[celli]*alpha1[celli]; - } - else if (dgdt[celli] < 0.0 && alpha1[celli] < 1.0) - { - Sp[celli] += dgdt[celli]*(1.0 - alpha1[celli]); - } - } - - - surfaceScalarField phiAlpha1 = - fvc::flux - ( - phi, - alpha1, - alphaScheme - ) - + fvc::flux - ( - -fvc::flux(-phir, alpha2, alpharScheme), - alpha1, - alpharScheme - ); - - MULES::explicitSolve(oneField(), alpha1, phi, phiAlpha1, Sp, Su, 1, 0); - - surfaceScalarField rho1f = fvc::interpolate(rho1); - surfaceScalarField rho2f = fvc::interpolate(rho2); - rhoPhi = phiAlpha1*(rho1f - rho2f) + phi*rho2f; - - alpha2 = scalar(1) - alpha1; - } - - Info<< "Liquid phase volume fraction = " - << alpha1.weightedAverage(mesh.V()).value() - << " Min(alpha1) = " << min(alpha1).value() - << " Min(alpha2) = " << min(alpha2).value() - << endl; -} diff --git a/applications/solvers/multiphase/compressibleLesInterFoam/alphaEqnsSubCycle.H b/applications/solvers/multiphase/compressibleLesInterFoam/alphaEqnsSubCycle.H deleted file mode 100644 index c52dce9690..0000000000 --- a/applications/solvers/multiphase/compressibleLesInterFoam/alphaEqnsSubCycle.H +++ /dev/null @@ -1,43 +0,0 @@ -{ - label nAlphaCorr - ( - readLabel(piso.lookup("nAlphaCorr")) - ); - - label nAlphaSubCycles - ( - readLabel(piso.lookup("nAlphaSubCycles")) - ); - - surfaceScalarField phic = mag(phi/mesh.magSf()); - phic = min(interface.cGamma()*phic, max(phic)); - - volScalarField divU = fvc::div(phi); - - if (nAlphaSubCycles > 1) - { - dimensionedScalar totalDeltaT = runTime.deltaT(); - surfaceScalarField rhoPhiSum = 0.0*rhoPhi; - - for - ( - subCycle alphaSubCycle(alpha1, nAlphaSubCycles); - !(++alphaSubCycle).end(); - ) - { -# include "alphaEqns.H" - rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi; - } - - rhoPhi = rhoPhiSum; - } - else - { -# include "alphaEqns.H" - } - - if (oCorr == 0) - { - interface.correct(); - } -} diff --git a/applications/solvers/multiphase/compressibleLesInterFoam/compressibleLesInterFoam.C b/applications/solvers/multiphase/compressibleLesInterFoam/compressibleLesInterFoam.C deleted file mode 100644 index 6280b4293c..0000000000 --- a/applications/solvers/multiphase/compressibleLesInterFoam/compressibleLesInterFoam.C +++ /dev/null @@ -1,105 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Application - compressibleLesInterFoam - -Description - Solver for 2 compressible, isothermal immiscible fluids using a VOF - (volume of fluid) phase-fraction based interface capturing approach. - The momentum and other fluid properties are of the "mixture" and a single - momentum equation is solved. Turbulence is modelled using a run-time - selectable incompressible LES model. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "MULES.H" -#include "subCycle.H" -#include "interfaceProperties.H" -#include "twoPhaseMixture.H" -#include "incompressible/LESModel/LESModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "setRootCase.H" - #include "createTime.H" - #include "createMesh.H" - #include "readEnvironmentalProperties.H" - #include "readControls.H" - #include "initContinuityErrs.H" - #include "createFields.H" - #include "CourantNo.H" - #include "setInitialDeltaT.H" - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { - #include "readControls.H" - #include "CourantNo.H" - #include "setDeltaT.H" - - runTime++; - - Info<< "Time = " << runTime.timeName() << nl << endl; - - turbulence->correct(); - - // --- Outer-corrector loop - for (int oCorr=0; oCorr turbulence - ( - incompressible::LESModel::New(U, phi, twoPhaseProperties) - ); diff --git a/applications/solvers/multiphase/compressibleLesInterFoam/pEqn.H b/applications/solvers/multiphase/compressibleLesInterFoam/pEqn.H deleted file mode 100644 index ebf24498ad..0000000000 --- a/applications/solvers/multiphase/compressibleLesInterFoam/pEqn.H +++ /dev/null @@ -1,74 +0,0 @@ -{ - volScalarField rUA = 1.0/UEqn.A(); - surfaceScalarField rUAf = fvc::interpolate(rUA); - - tmp pdEqnComp; - - if (transonic) - { - pdEqnComp = - (fvm::ddt(pd) + fvm::div(phi, pd) - fvm::Sp(fvc::div(phi), pd)); - } - else - { - pdEqnComp = - (fvm::ddt(pd) + fvc::div(phi, pd) - fvc::Sp(fvc::div(phi), pd)); - } - - - U = rUA*UEqn.H(); - - surfaceScalarField phiU - ( - "phiU", - (fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, rho, U, phi) - ); - - phi = phiU + - ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - - ghf*fvc::snGrad(rho) - )*rUAf*mesh.magSf(); - - for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - fvScalarMatrix pdEqnIncomp - ( - fvc::div(phi) - - fvm::laplacian(rUAf, pd) - ); - - solve - ( - ( - max(alpha1, scalar(0))*(psi1/rho1) - + max(alpha2, scalar(0))*(psi2/rho2) - ) - *pdEqnComp() - + pdEqnIncomp - ); - - if (nonOrth == nNonOrthCorr) - { - dgdt = - (pos(alpha2)*(psi2/rho2) - pos(alpha1)*(psi1/rho1)) - *(pdEqnComp & pd); - phi += pdEqnIncomp.flux(); - } - } - - U += rUA*fvc::reconstruct((phi - phiU)/rUAf); - U.correctBoundaryConditions(); - - p = max - ( - (pd + gh*(alpha1*rho10 + alpha2*rho20))/(1.0 - gh*(alpha1*psi1 + alpha2*psi2)), - pMin - ); - - rho1 = rho10 + psi1*p; - rho2 = rho20 + psi2*p; - - Info<< "max(U) " << max(mag(U)).value() << endl; - Info<< "min(pd) " << min(pd).value() << endl; -} diff --git a/applications/solvers/multiphase/compressibleLesInterFoam/readControls.H b/applications/solvers/multiphase/compressibleLesInterFoam/readControls.H deleted file mode 100644 index 7e23354f47..0000000000 --- a/applications/solvers/multiphase/compressibleLesInterFoam/readControls.H +++ /dev/null @@ -1,20 +0,0 @@ - #include "readPISOControls.H" - #include "readTimeControls.H" - - label nAlphaCorr - ( - readLabel(piso.lookup("nAlphaCorr")) - ); - - label nAlphaSubCycles - ( - readLabel(piso.lookup("nAlphaSubCycles")) - ); - - if (nAlphaSubCycles > 1 && nOuterCorr != 1) - { - FatalErrorIn(args.executable()) - << "Sub-cycling alpha is only allowed for PISO, " - "i.e. when the number of outer-correctors = 1" - << exit(FatalError); - } diff --git a/applications/solvers/multiphase/interDyMFoam/Make/options b/applications/solvers/multiphase/interDyMFoam/Make/options index 6755d5bc59..74498326a9 100644 --- a/applications/solvers/multiphase/interDyMFoam/Make/options +++ b/applications/solvers/multiphase/interDyMFoam/Make/options @@ -1,11 +1,9 @@ EXE_INC = \ - -I../rasInterFoam \ -I../interFoam \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ - -I$(LIB_SRC)/turbulenceModels/RAS/incompressible/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ @@ -16,6 +14,7 @@ EXE_LIBS = \ -linterfaceProperties \ -lincompressibleTransportModels \ -lincompressibleRASModels \ + -lincompressibleLESModels \ -lfiniteVolume \ -ldynamicMesh \ -lmeshTools \ diff --git a/applications/solvers/multiphase/interDyMFoam/createFields.H b/applications/solvers/multiphase/interDyMFoam/createFields.H index ab58050ed0..0f1efe717f 100644 --- a/applications/solvers/multiphase/interDyMFoam/createFields.H +++ b/applications/solvers/multiphase/interDyMFoam/createFields.H @@ -12,12 +12,12 @@ mesh ); - Info<< "Reading field gamma\n" << endl; - volScalarField gamma + Info<< "Reading field alpha1\n" << endl; + volScalarField alpha1 ( IOobject ( - "gamma", + "alpha1", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -44,7 +44,7 @@ Info<< "Reading transportProperties\n" << endl; - twoPhaseMixture twoPhaseProperties(U, phi, "gamma"); + twoPhaseMixture twoPhaseProperties(U, phi); const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); const dimensionedScalar& rho2 = twoPhaseProperties.rho2(); @@ -60,15 +60,15 @@ mesh, IOobject::READ_IF_PRESENT ), - gamma*rho1 + (scalar(1) - gamma)*rho2, - gamma.boundaryField().types() + alpha1*rho1 + (scalar(1) - alpha1)*rho2, + alpha1.boundaryField().types() ); rho.oldTime(); // Mass flux // Initialisation does not matter because rhoPhi is reset after the - // gamma solution before it is used in the U equation. + // alpha1 solution before it is used in the U equation. surfaceScalarField rhoPhi ( IOobject @@ -83,13 +83,13 @@ ); - // Construct interface from gamma distribution - interfaceProperties interface(gamma, U, twoPhaseProperties); + // Construct interface from alpha1 distribution + interfaceProperties interface(alpha1, U, twoPhaseProperties); - // Construct incompressible RAS model - autoPtr turbulence + // Construct incompressible turbulence model + autoPtr turbulence ( - incompressible::RASModel::New(U, phi, twoPhaseProperties) + incompressible::turbulenceModel::New(U, phi, twoPhaseProperties) ); wordList pcorrTypes(pd.boundaryField().types()); diff --git a/applications/solvers/multiphase/interDyMFoam/interDyMFoam.C b/applications/solvers/multiphase/interDyMFoam/interDyMFoam.C index 915fee9a97..0ea32adcc8 100644 --- a/applications/solvers/multiphase/interDyMFoam/interDyMFoam.C +++ b/applications/solvers/multiphase/interDyMFoam/interDyMFoam.C @@ -39,7 +39,7 @@ Description #include "subCycle.H" #include "interfaceProperties.H" #include "twoPhaseMixture.H" -#include "incompressible/RASModel/RASModel.H" +#include "turbulenceModel.H" #include "probes.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -58,8 +58,7 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; while (runTime.run()) @@ -106,7 +105,7 @@ int main(int argc, char *argv[]) twoPhaseProperties.correct(); - #include "gammaEqnSubCycle.H" + #include "alphaEqnSubCycle.H" #include "UEqn.H" diff --git a/applications/solvers/multiphase/interDyMFoam/pEqn.H b/applications/solvers/multiphase/interDyMFoam/pEqn.H index c6961f6c22..f8ff18f606 100644 --- a/applications/solvers/multiphase/interDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/interDyMFoam/pEqn.H @@ -7,7 +7,7 @@ phi = phiU + ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma) + fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) )*rAUf*mesh.magSf(); diff --git a/applications/solvers/multiphase/interFoam/Make/options b/applications/solvers/multiphase/interFoam/Make/options index ae5ccba0fd..0e21fc2d64 100644 --- a/applications/solvers/multiphase/interFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/Make/options @@ -2,9 +2,12 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -linterfaceProperties \ -lincompressibleTransportModels \ + -lincompressibleRASModels \ + -lincompressibleLESModels \ -lfiniteVolume diff --git a/applications/solvers/multiphase/interFoam/UBlendingFactor.H b/applications/solvers/multiphase/interFoam/UBlendingFactor.H index 217a9c3977..ade1b8e7f3 100644 --- a/applications/solvers/multiphase/interFoam/UBlendingFactor.H +++ b/applications/solvers/multiphase/interFoam/UBlendingFactor.H @@ -1,6 +1,6 @@ - surfaceScalarField gammaf = fvc::interpolate(gamma); + surfaceScalarField alpha1f = fvc::interpolate(alpha1); surfaceScalarField UBlendingFactor ( "UBlendingFactor", - sqrt(max(min(4*gammaf*(1.0 - gammaf), 1.0), 0.0)) + sqrt(max(min(4*alpha1f*(1.0 - alpha1f), 1.0), 0.0)) ); diff --git a/applications/solvers/multiphase/interFoam/UEqn.H b/applications/solvers/multiphase/interFoam/UEqn.H index e585f3cab1..528e0aaafd 100644 --- a/applications/solvers/multiphase/interFoam/UEqn.H +++ b/applications/solvers/multiphase/interFoam/UEqn.H @@ -1,14 +1,21 @@ - surfaceScalarField muf = twoPhaseProperties.muf(); + surfaceScalarField muEff + ( + "muEff", + twoPhaseProperties.muf() + + fvc::interpolate(rho*turbulence->nut()) + ); fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - - fvm::laplacian(muf, U) - - (fvc::grad(U) & fvc::grad(muf)) - //- fvc::div(muf*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + - fvm::laplacian(muEff, U) + - (fvc::grad(U) & fvc::grad(muEff)) + //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) ); + UEqn.relax(); + if (momentumPredictor) { solve @@ -18,7 +25,7 @@ fvc::reconstruct ( ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma) + fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) - fvc::snGrad(pd) ) * mesh.magSf() diff --git a/applications/solvers/multiphase/interFoam/createFields.H b/applications/solvers/multiphase/interFoam/createFields.H index 887bcbdead..af349d7917 100644 --- a/applications/solvers/multiphase/interFoam/createFields.H +++ b/applications/solvers/multiphase/interFoam/createFields.H @@ -12,12 +12,12 @@ mesh ); - Info<< "Reading field gamma\n" << endl; - volScalarField gamma + Info<< "Reading field alpha1\n" << endl; + volScalarField alpha1 ( IOobject ( - "gamma", + "alpha1", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -44,7 +44,7 @@ Info<< "Reading transportProperties\n" << endl; - twoPhaseMixture twoPhaseProperties(U, phi, "gamma"); + twoPhaseMixture twoPhaseProperties(U, phi); const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); const dimensionedScalar& rho2 = twoPhaseProperties.rho2(); @@ -60,15 +60,15 @@ mesh, IOobject::READ_IF_PRESENT ), - gamma*rho1 + (scalar(1) - gamma)*rho2, - gamma.boundaryField().types() + alpha1*rho1 + (scalar(1) - alpha1)*rho2, + alpha1.boundaryField().types() ); rho.oldTime(); // Mass flux // Initialisation does not matter because rhoPhi is reset after the - // gamma solution before it is used in the U equation. + // alpha1 solution before it is used in the U equation. surfaceScalarField rhoPhi ( IOobject @@ -107,5 +107,12 @@ setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue); - // Construct interface from gamma distribution - interfaceProperties interface(gamma, U, twoPhaseProperties); + // Construct interface from alpha1 distribution + interfaceProperties interface(alpha1, U, twoPhaseProperties); + + + // Construct incompressible turbulence model + autoPtr turbulence + ( + incompressible::turbulenceModel::New(U, phi, twoPhaseProperties) + ); diff --git a/applications/solvers/multiphase/interFoam/gammaEqn.H b/applications/solvers/multiphase/interFoam/gammaEqn.H deleted file mode 100644 index 8978d1d293..0000000000 --- a/applications/solvers/multiphase/interFoam/gammaEqn.H +++ /dev/null @@ -1,35 +0,0 @@ -{ - word gammaScheme("div(phi,gamma)"); - word gammarScheme("div(phirb,gamma)"); - - surfaceScalarField phic = mag(phi/mesh.magSf()); - phic = min(interface.cGamma()*phic, max(phic)); - surfaceScalarField phir = phic*interface.nHatf(); - - for (int gCorr=0; gCorr 1) -{ - dimensionedScalar totalDeltaT = runTime.deltaT(); - surfaceScalarField rhoPhiSum = 0.0*rhoPhi; - - for - ( - subCycle gammaSubCycle(gamma, nGammaSubCycles); - !(++gammaSubCycle).end(); - ) - { -# include "gammaEqn.H" - rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi; - } - - rhoPhi = rhoPhiSum; -} -else -{ -# include "gammaEqn.H" -} - -interface.correct(); - -rho == gamma*rho1 + (scalar(1) - gamma)*rho2; diff --git a/applications/solvers/multiphase/interFoam/interFoam.C b/applications/solvers/multiphase/interFoam/interFoam.C index b7f4f0ada5..1286a16d62 100644 --- a/applications/solvers/multiphase/interFoam/interFoam.C +++ b/applications/solvers/multiphase/interFoam/interFoam.C @@ -31,6 +31,8 @@ Description The momentum and other fluid properties are of the "mixture" and a single momentum equation is solved. + Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. + For a two-fluid approach see twoPhaseEulerFoam. \*---------------------------------------------------------------------------*/ @@ -40,6 +42,7 @@ Description #include "subCycle.H" #include "interfaceProperties.H" #include "twoPhaseMixture.H" +#include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -57,7 +60,7 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -74,7 +77,7 @@ int main(int argc, char *argv[]) twoPhaseProperties.correct(); - #include "gammaEqnSubCycle.H" + #include "alphaEqnSubCycle.H" #include "UEqn.H" @@ -88,6 +91,8 @@ int main(int argc, char *argv[]) p = pd + rho*gh; + turbulence->correct(); + runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/solvers/multiphase/interFoam/pEqn.H b/applications/solvers/multiphase/interFoam/pEqn.H index 77256a8e2f..e5afbb8e4f 100644 --- a/applications/solvers/multiphase/interFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/pEqn.H @@ -12,7 +12,7 @@ phi = phiU + ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma) + fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) )*rUAf*mesh.magSf(); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/Make/options b/applications/solvers/multiphase/interPhaseChangeFoam/Make/options index fa6943e580..24e523f249 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/Make/options +++ b/applications/solvers/multiphase/interPhaseChangeFoam/Make/options @@ -2,13 +2,13 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/LES \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -IphaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -linterfaceProperties \ -lincompressibleTransportModels \ + -lincompressibleRASModels \ -lincompressibleLESModels \ -lfiniteVolume diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H index fefdeb41c3..f020863077 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H @@ -1,6 +1,6 @@ surfaceScalarField muf = twoPhaseProperties->muf() - + fvc::interpolate(rho*turbulence->nuSgs()); + + fvc::interpolate(rho*turbulence->nut()); fvVectorMatrix UEqn ( @@ -23,7 +23,7 @@ fvc::reconstruct ( ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma) + fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) - fvc::snGrad(pd) ) * mesh.magSf() diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H b/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H index 9e9c68a890..5e727dea3e 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/createFields.H @@ -12,12 +12,12 @@ mesh ); - Info<< "Reading field gamma\n" << endl; - volScalarField gamma + Info<< "Reading field alpha1\n" << endl; + volScalarField alpha1 ( IOobject ( - "gamma", + "alpha1", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -44,7 +44,7 @@ Info<< "Creating phaseChangeTwoPhaseMixture\n" << endl; autoPtr twoPhaseProperties = - phaseChangeTwoPhaseMixture::New(U, phi, "gamma"); + phaseChangeTwoPhaseMixture::New(U, phi); const dimensionedScalar& rho1 = twoPhaseProperties->rho1(); const dimensionedScalar& rho2 = twoPhaseProperties->rho2(); @@ -60,8 +60,8 @@ mesh, IOobject::READ_IF_PRESENT ), - gamma*rho1 + (scalar(1) - gamma)*rho2, - gamma.boundaryField().types() + alpha1*rho1 + (scalar(1) - alpha1)*rho2, + alpha1.boundaryField().types() ); rho.oldTime(); @@ -88,11 +88,11 @@ ); - // Construct interface from gamma distribution - interfaceProperties interface(gamma, U, twoPhaseProperties()); + // Construct interface from alpha1 distribution + interfaceProperties interface(alpha1, U, twoPhaseProperties()); - // Construct LES model - autoPtr turbulence + // Construct incompressible turbulence model + autoPtr turbulence ( - incompressible::LESModel::New(U, phi, twoPhaseProperties()) + incompressible::turbulenceModel::New(U, phi, twoPhaseProperties()) ); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/gammaEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/gammaEqn.H deleted file mode 100644 index 0186948920..0000000000 --- a/applications/solvers/multiphase/interPhaseChangeFoam/gammaEqn.H +++ /dev/null @@ -1,67 +0,0 @@ -{ - word gammaScheme("div(phi,gamma)"); - word gammarScheme("div(phirb,gamma)"); - - surfaceScalarField phir("phir", phic*interface.nHatf()); - - for (int gCorr=0; gCorr > vDotAlphal = - twoPhaseProperties->vDotAlphal(); - const volScalarField& vDotcAlphal = vDotAlphal[0](); - const volScalarField& vDotvAlphal = vDotAlphal[1](); - - volScalarField Sp - ( - IOobject - ( - "Sp", - runTime.timeName(), - mesh - ), - vDotvAlphal - vDotcAlphal - ); - - volScalarField Su - ( - IOobject - ( - "Su", - runTime.timeName(), - mesh - ), - // Divergence term is handled explicitly to be - // consistent with the explicit transport solution - divU*gamma - + vDotcAlphal - ); - - //MULES::explicitSolve(gamma, phi, phiGamma, 1, 0); - //MULES::explicitSolve(oneField(), gamma, phi, phiGamma, Sp, Su, 1, 0); - MULES::implicitSolve(oneField(), gamma, phi, phiGamma, Sp, Su, 1, 0); - - rhoPhi += - (runTime.deltaT()/totalDeltaT) - *(phiGamma*(rho1 - rho2) + phi*rho2); - } - - Info<< "Liquid phase volume fraction = " - << gamma.weightedAverage(mesh.V()).value() - << " Min(gamma) = " << min(gamma).value() - << " Max(gamma) = " << max(gamma).value() - << endl; -} diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/gammaEqnSubCycle.H b/applications/solvers/multiphase/interPhaseChangeFoam/gammaEqnSubCycle.H deleted file mode 100644 index c6355d6fb0..0000000000 --- a/applications/solvers/multiphase/interPhaseChangeFoam/gammaEqnSubCycle.H +++ /dev/null @@ -1,53 +0,0 @@ -surfaceScalarField rhoPhi -( - IOobject - ( - "rhoPhi", - runTime.timeName(), - mesh - ), - mesh, - dimensionedScalar("0", dimensionSet(1, 0, -1, 0, 0), 0) -); - -{ - label nGammaCorr - ( - readLabel(piso.lookup("nGammaCorr")) - ); - - label nGammaSubCycles - ( - readLabel(piso.lookup("nGammaSubCycles")) - ); - - surfaceScalarField phic = mag(phi/mesh.magSf()); - phic = min(interface.cGamma()*phic, max(phic)); - - volScalarField divU = fvc::div(phi); - - dimensionedScalar totalDeltaT = runTime.deltaT(); - - if (nGammaSubCycles > 1) - { - for - ( - subCycle gammaSubCycle(gamma, nGammaSubCycles); - !(++gammaSubCycle).end(); - ) - { -# include "gammaEqn.H" - } - } - else - { -# include "gammaEqn.H" - } - - if (nOuterCorr == 1) - { - interface.correct(); - } - - rho == gamma*rho1 + (scalar(1) - gamma)*rho2; -} diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C index bb6f1133ce..f7c8aa7250 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C @@ -35,6 +35,8 @@ Description but other mechanisms of phase-change are supported within this solver framework. + Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. + \*---------------------------------------------------------------------------*/ #include "fvCFD.H" @@ -42,7 +44,7 @@ Description #include "subCycle.H" #include "interfaceProperties.H" #include "phaseChangeTwoPhaseMixture.H" -#include "incompressible/LESModel/LESModel.H" +#include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -60,7 +62,7 @@ int main(int argc, char *argv[]) #include "CourantNo.H" #include "setInitialDeltaT.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -75,9 +77,7 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; - twoPhaseProperties->correct(); - - #include "gammaEqnSubCycle.H" + #include "alphaEqnSubCycle.H" turbulence->correct(); @@ -95,6 +95,8 @@ int main(int argc, char *argv[]) #include "continuityErrs.H" } + twoPhaseProperties->correct(); + runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H index 3a7f7e4ebc..0037d71cf5 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H @@ -13,7 +13,7 @@ phi = phiU + ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma) + fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) - ghf*fvc::snGrad(rho) )*rUAf*mesh.magSf(); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H index 0cbc33c52e..a2db01643a 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H @@ -106,7 +106,7 @@ public: ( const volVectorField& U, const surfaceScalarField& phi, - const word& alpha1Name + const word& alpha1Name = "alpha1" ); diff --git a/applications/solvers/multiphase/lesCavitatingFoam/CourantNo.H b/applications/solvers/multiphase/lesCavitatingFoam/CourantNo.H deleted file mode 100644 index 014944e191..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/CourantNo.H +++ /dev/null @@ -1,59 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Global - CourantNo - -Description - Calculates and outputs the mean and maximum Courant Numbers. - -\*---------------------------------------------------------------------------*/ - -scalar CoNum = 0.0; -scalar meanCoNum = 0.0; -scalar acousticCoNum = 0.0; - -if (mesh.nInternalFaces()) -{ - surfaceScalarField SfUfbyDelta = - mesh.surfaceInterpolation::deltaCoeffs()*mag(phiv); - - CoNum = max(SfUfbyDelta/mesh.magSf()) - .value()*runTime.deltaT().value(); - - meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf())) - .value()*runTime.deltaT().value(); - - acousticCoNum = max - ( - mesh.surfaceInterpolation::deltaCoeffs()/sqrt(fvc::interpolate(psi)) - ).value()*runTime.deltaT().value(); -} - -Info<< "phiv Courant Number mean: " << meanCoNum - << " max: " << CoNum - << " acoustic max: " << acousticCoNum - << endl; - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/lesCavitatingFoam/Make/files b/applications/solvers/multiphase/lesCavitatingFoam/Make/files deleted file mode 100644 index b577562e27..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/Make/files +++ /dev/null @@ -1,5 +0,0 @@ -lesCavitatingFoam.C - -devOneEqEddy/devOneEqEddy.C - -EXE = $(FOAM_APPBIN)/lesCavitatingFoam diff --git a/applications/solvers/multiphase/lesCavitatingFoam/Make/options b/applications/solvers/multiphase/lesCavitatingFoam/Make/options deleted file mode 100644 index 91833c1365..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/Make/options +++ /dev/null @@ -1,16 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ - -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/LES \ - -I$(LIB_SRC)/turbulenceModels/LES/incompressible/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/barotropicCompressibilityModel/lnInclude - -EXE_LIBS = \ - -lincompressibleTransportModels \ - -lincompressibleLESModels \ - -lfiniteVolume \ - -lbarotropicCompressibilityModel - diff --git a/applications/solvers/multiphase/lesCavitatingFoam/UEqn.H b/applications/solvers/multiphase/lesCavitatingFoam/UEqn.H deleted file mode 100644 index 73033ddfaa..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/UEqn.H +++ /dev/null @@ -1,20 +0,0 @@ - surfaceScalarField muEff - ( - "muEff", - twoPhaseProperties.muf() - + fvc::interpolate(rho*turbulence->nuSgs()) - ); - - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) - + fvm::div(phi, U) - - fvm::laplacian(muEff, U) - //- (fvc::grad(U) & fvc::grad(muf)) - - fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) - ); - - if (momentumPredictor) - { - solve(UEqn == -fvc::grad(p)); - } diff --git a/applications/solvers/multiphase/lesCavitatingFoam/continuityErrs.H b/applications/solvers/multiphase/lesCavitatingFoam/continuityErrs.H deleted file mode 100644 index 6f1622510f..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/continuityErrs.H +++ /dev/null @@ -1,22 +0,0 @@ -{ - volScalarField thermoRho = psi*p + (1.0 - gamma)*rhol0; - - dimensionedScalar totalMass = fvc::domainIntegrate(rho); - - scalar sumLocalContErr = - ( - fvc::domainIntegrate(mag(rho - thermoRho))/totalMass - ).value(); - - scalar globalContErr = - ( - fvc::domainIntegrate(rho - thermoRho)/totalMass - ).value(); - - cumulativeContErr += globalContErr; - - Info<< "time step continuity errors : sum local = " << sumLocalContErr - << ", global = " << globalContErr - << ", cumulative = " << cumulativeContErr - << endl; -} diff --git a/applications/solvers/multiphase/lesCavitatingFoam/createFields.H b/applications/solvers/multiphase/lesCavitatingFoam/createFields.H deleted file mode 100644 index d2e19bcae8..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/createFields.H +++ /dev/null @@ -1,85 +0,0 @@ - Info<< "Reading field p\n" << endl; - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - volScalarField gamma - ( - IOobject - ( - "gamma", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0)) - ); - gamma.oldTime(); - - Info<< "Creating compressibilityModel\n" << endl; - autoPtr psiModel = - barotropicCompressibilityModel::New - ( - thermodynamicProperties, - gamma - ); - - const volScalarField& psi = psiModel->psi(); - - rho == max - ( - psi*p - + (1.0 - gamma)*rhol0 - + ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat, - rhoMin - ); - - Info<< "Reading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - -# include "createPhiv.H" -# include "compressibleCreatePhi.H" - - Info<< "Reading transportProperties\n" << endl; - - twoPhaseMixture twoPhaseProperties(U, phiv, "gamma"); - - // Create LES model - autoPtr turbulence - ( - incompressible::LESModel::New(U, phiv, twoPhaseProperties) - ); diff --git a/applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.C b/applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.C deleted file mode 100644 index db9cb56991..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.C +++ /dev/null @@ -1,130 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "devOneEqEddy.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(devOneEqEddy, 0); -addToRunTimeSelectionTable(LESModel, devOneEqEddy, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -devOneEqEddy::devOneEqEddy -( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport -) -: - LESModel(typeName, U, phi, transport), - GenEddyVisc(U, phi, transport), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - ck_ - ( - dimensioned::lookupOrAddToDict - ( - "ck", - coeffDict(), - 0.07 - ) - ) -{ - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void devOneEqEddy::correct(const tmp& gradU) -{ - GenEddyVisc::correct(gradU); - - //volScalarField G = 2*nuSgs_*magSqr(symm(gradU)); - volScalarField G = 2*nuSgs_*(gradU() && dev(symm(gradU()))); - - solve - ( - fvm::ddt(k_) - + fvm::div(phi(), k_) - - fvm::Sp(fvc::div(phi()), k_) - - fvm::laplacian(DkEff(), k_) - == - G - - fvm::Sp(ce_*sqrt(k_)/delta(), k_) - ); - - bound(k_, k0()); - - nuSgs_ = ck_*sqrt(k_)*delta(); - nuSgs_.correctBoundaryConditions(); -} - - -bool devOneEqEddy::read() -{ - if (GenEddyVisc::read()) - { - ck_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.H b/applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.H deleted file mode 100644 index 30090fe28f..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/devOneEqEddy/devOneEqEddy.H +++ /dev/null @@ -1,148 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - devOneEqEddy - -Description -
-    One Equation Eddy Viscosity Model
-    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    Eddy viscosity SGS model using a modeled balance equation to simulate the
-    behaviour of k, hence,
-
-        d/dt(k) + div(U*k) - div(nuEff*grad(k))
-        =
-        -B*L - ce*k^3/2/delta
-
-    and
-
-        B = 2/3*k*I - 2*nuEff*dev(D)
-
-    where
-
-        D = symm(grad(U));
-        nuSgs = ck*sqrt(k)*delta
-        nuEff = nuSgs + nu
-
- -SourceFiles - devOneEqEddy.C - -\*---------------------------------------------------------------------------*/ - -#ifndef devOneEqEddy_H -#define devOneEqEddy_H - -#include "GenEddyVisc.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class devOneEqEddy Declaration -\*---------------------------------------------------------------------------*/ - -class devOneEqEddy -: - public GenEddyVisc -{ - // Private data - - volScalarField k_; - - dimensionedScalar ck_; - - - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - devOneEqEddy(const devOneEqEddy&); - devOneEqEddy& operator=(const devOneEqEddy&); - - -public: - - //- Runtime type information - TypeName("devOneEqEddy"); - - // Constructors - - //- Constructor from components - devOneEqEddy - ( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport - ); - - - // Destructor - - ~devOneEqEddy() - {} - - - // Member Functions - - //- Return SGS kinetic energy - tmp k() const - { - return k_; - } - - //- Return the effective diffusivity for k - tmp DkEff() const - { - return tmp - ( - new volScalarField("DkEff", nuSgs_ + nu()) - ); - } - - //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); - - //- Read turbulenceProperties dictionary - bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModelsModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/lesCavitatingFoam/gammaPsi.H b/applications/solvers/multiphase/lesCavitatingFoam/gammaPsi.H deleted file mode 100644 index b259ddd322..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/gammaPsi.H +++ /dev/null @@ -1,10 +0,0 @@ -{ - gamma = max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0)); - - Info<< "max-min gamma: " << max(gamma).value() - << " " << min(gamma).value() << endl; - - psiModel->correct(); - - //Info<< "min a: " << 1.0/sqrt(max(psi)).value() << endl; -} diff --git a/applications/solvers/multiphase/lesCavitatingFoam/lesCavitatingFoam.C b/applications/solvers/multiphase/lesCavitatingFoam/lesCavitatingFoam.C deleted file mode 100644 index 2ad2dfb04f..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/lesCavitatingFoam.C +++ /dev/null @@ -1,94 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Application - lesCavitatingFoam - -Description - Transient cavitation code with LES turbulence. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "barotropicCompressibilityModel.H" -#include "twoPhaseMixture.H" -#include "incompressible/LESModel/LESModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - -# include "setRootCase.H" - -# include "createTime.H" -# include "createMesh.H" -# include "readThermodynamicProperties.H" -# include "readControls.H" -# include "createFields.H" -# include "initContinuityErrs.H" -# include "compressibleCourantNo.H" -# include "setInitialDeltaT.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { -# include "readControls.H" -# include "CourantNo.H" -# include "setDeltaT.H" - - runTime++; - Info<< "Time = " << runTime.timeName() << nl << endl; - - turbulence->correct(); - - for (int outerCorr=0; outerCorr(phiPatches[patchI]); - - phiPatch == ((rhoPatches[patchI]*Upatches[patchI]) & SfPatches[patchI]); - } -} diff --git a/applications/solvers/multiphase/lesCavitatingFoam/resetPhivPatches.H b/applications/solvers/multiphase/lesCavitatingFoam/resetPhivPatches.H deleted file mode 100644 index 7e8b040bb6..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/resetPhivPatches.H +++ /dev/null @@ -1,14 +0,0 @@ -surfaceScalarField::GeometricBoundaryField& phivPatches = phiv.boundaryField(); -const volVectorField::GeometricBoundaryField& Upatches = U.boundaryField(); -const surfaceVectorField::GeometricBoundaryField& SfPatches = mesh.Sf().boundaryField(); - -forAll(phivPatches, patchI) -{ - if (phiv.boundaryField().types()[patchI] == "calculated") - { - calculatedFvsPatchScalarField& phivPatch = - refCast(phivPatches[patchI]); - - phivPatch == (Upatches[patchI] & SfPatches[patchI]); - } -} diff --git a/applications/solvers/multiphase/lesCavitatingFoam/rhoEqn.H b/applications/solvers/multiphase/lesCavitatingFoam/rhoEqn.H deleted file mode 100644 index d0bd6e1dad..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/rhoEqn.H +++ /dev/null @@ -1,16 +0,0 @@ -{ - fvScalarMatrix rhoEqn - ( - fvm::ddt(rho) - + fvm::div(phiv, rho) - ); - - rhoEqn.solve(); - - phi = rhoEqn.flux(); - - Info<< "max-min rho: " << max(rho).value() - << " " << min(rho).value() << endl; - - rho == max(rho, rhoMin); -} diff --git a/applications/solvers/multiphase/lesCavitatingFoam/setDeltaT.H b/applications/solvers/multiphase/lesCavitatingFoam/setDeltaT.H deleted file mode 100644 index 012a5276e8..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/setDeltaT.H +++ /dev/null @@ -1,54 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Global - setDeltaT - -Description - Reset the timestep to maintain a constant maximum courant Number. - Reduction of time-step is imediate but increase is damped to avoid - unstable oscillations. - -\*---------------------------------------------------------------------------*/ - -if (adjustTimeStep) -{ - scalar maxDeltaTFact = - min(maxCo/(CoNum + SMALL), maxAcousticCo/(acousticCoNum + SMALL)); - - scalar deltaTFact = min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2); - - runTime.setDeltaT - ( - min - ( - deltaTFact*runTime.deltaT().value(), - maxDeltaT - ) - ); - - Info<< "deltaT = " << runTime.deltaT().value() << endl; -} - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/lesCavitatingFoam/setInitialDeltaT.H b/applications/solvers/multiphase/lesCavitatingFoam/setInitialDeltaT.H deleted file mode 100644 index 237cacd05a..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/setInitialDeltaT.H +++ /dev/null @@ -1,54 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Global - setInitialDeltaT - -Description - Set the initial timestep corresponding to the timestep adjustment - algorithm in setDeltaT - -\*---------------------------------------------------------------------------*/ - -if (adjustTimeStep) -{ -# include "CourantNo.H" - - if (CoNum > SMALL) - { - scalar maxDeltaTFact = - min(maxCo/(CoNum + SMALL), maxAcousticCo/(acousticCoNum + SMALL)); - - runTime.setDeltaT - ( - min - ( - maxDeltaTFact*runTime.deltaT().value(), - maxDeltaT - ) - ); - } -} - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/lesInterFoam/Make/files b/applications/solvers/multiphase/lesInterFoam/Make/files deleted file mode 100644 index 40039bd1a7..0000000000 --- a/applications/solvers/multiphase/lesInterFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -lesInterFoam.C - -EXE = $(FOAM_APPBIN)/lesInterFoam diff --git a/applications/solvers/multiphase/lesInterFoam/Make/options b/applications/solvers/multiphase/lesInterFoam/Make/options deleted file mode 100644 index 43c523e220..0000000000 --- a/applications/solvers/multiphase/lesInterFoam/Make/options +++ /dev/null @@ -1,15 +0,0 @@ -EXE_INC = \ - -Iaveraging \ - -I../interFoam \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ - -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/LES \ - -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -EXE_LIBS = \ - -linterfaceProperties \ - -lincompressibleTransportModels \ - -lincompressibleLESModels \ - -lfiniteVolume diff --git a/applications/solvers/multiphase/lesInterFoam/UEqn.H b/applications/solvers/multiphase/lesInterFoam/UEqn.H deleted file mode 100644 index 1bf56f02dd..0000000000 --- a/applications/solvers/multiphase/lesInterFoam/UEqn.H +++ /dev/null @@ -1,32 +0,0 @@ - surfaceScalarField muEff - ( - "muEff", - twoPhaseProperties.muf() - + fvc::interpolate(rho*turbulence->nuSgs()) - ); - - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) - + fvm::div(rhoPhi, U) - - fvm::laplacian(muEff, U) - - (fvc::grad(U) & fvc::grad(muEff)) - //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) - ); - - if (momentumPredictor) - { - solve - ( - UEqn - == - fvc::reconstruct - ( - ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma) - - ghf*fvc::snGrad(rho) - - fvc::snGrad(pd) - ) * mesh.magSf() - ) - ); - } diff --git a/applications/solvers/multiphase/lesInterFoam/createFields.H b/applications/solvers/multiphase/lesInterFoam/createFields.H deleted file mode 100644 index c622be1561..0000000000 --- a/applications/solvers/multiphase/lesInterFoam/createFields.H +++ /dev/null @@ -1,115 +0,0 @@ - Info<< "Reading field pd\n" << endl; - volScalarField pd - ( - IOobject - ( - "pd", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - Info<< "Reading field gamma\n" << endl; - volScalarField gamma - ( - IOobject - ( - "gamma", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - Info<< "Reading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - -# include "createPhi.H" - - Info<< "Reading transportProperties\n" << endl; - twoPhaseMixture twoPhaseProperties(U, phi, "gamma"); - - const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); - const dimensionedScalar& rho2 = twoPhaseProperties.rho2(); - - - // Need to store rho for ddt(rho, U) - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::READ_IF_PRESENT - ), - gamma*rho1 + (scalar(1) - gamma)*rho2, - gamma.boundaryField().types() - ); - rho.oldTime(); - - // Mass flux - // Initialisation does not matter because rhoPhi is reset after the - // gamma solution before it is used in the U equation. - surfaceScalarField rhoPhi - ( - IOobject - ( - "rho*phi", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - rho1*phi - ); - - - label pdRefCell = 0; - scalar pdRefValue = 0.0; - setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue); - - - Info<< "Calculating field g.h\n" << endl; - volScalarField gh("gh", g & mesh.C()); - surfaceScalarField ghf("gh", g & mesh.Cf()); - - - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - pd + rho*gh - ); - - - // Construct interface from gamma distribution - interfaceProperties interface(gamma, U, twoPhaseProperties); - - // Construct LES model - autoPtr turbulence - ( - incompressible::LESModel::New(U, phi, twoPhaseProperties) - ); diff --git a/applications/solvers/multiphase/lesInterFoam/lesInterFoam.C b/applications/solvers/multiphase/lesInterFoam/lesInterFoam.C deleted file mode 100644 index 8d109f03b3..0000000000 --- a/applications/solvers/multiphase/lesInterFoam/lesInterFoam.C +++ /dev/null @@ -1,103 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Application - lesInterFoam - -Description - Solver for 2 incompressible, isothermal immiscible fluids using a VOF - (volume of fluid) phase-fraction based interface capturing approach. - The momentum and other fluid properties are of the "mixture" and a single - momentum equation is solved. Turbulence is modelled using a run-time - selectable incompressible LES model. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "MULES.H" -#include "subCycle.H" -#include "interfaceProperties.H" -#include "twoPhaseMixture.H" -#include "incompressible/LESModel/LESModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "setRootCase.H" - #include "createTime.H" - #include "createMesh.H" - #include "readEnvironmentalProperties.H" - #include "readPISOControls.H" - #include "initContinuityErrs.H" - #include "createFields.H" - #include "readTimeControls.H" - #include "correctPhi.H" - #include "CourantNo.H" - #include "setInitialDeltaT.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { - #include "readPISOControls.H" - #include "readTimeControls.H" - #include "CourantNo.H" - #include "setDeltaT.H" - - runTime++; - Info<< "Time = " << runTime.timeName() << nl << endl; - - #include "gammaEqnSubCycle.H" - - turbulence->correct(); - - #include "UEqn.H" - - // --- PISO loop - for (int corr=0; corr < nCorr; corr++) - { - #include "pEqn.H" - } - - #include "continuityErrs.H" - - p = pd + rho*gh; - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return(0); -} - - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseInterFoam/Make/options b/applications/solvers/multiphase/multiphaseInterFoam/Make/options index cd906bfa53..1fc821726c 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/Make/options +++ b/applications/solvers/multiphase/multiphaseInterFoam/Make/options @@ -6,9 +6,13 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -linterfaceProperties \ -lincompressibleTransportModels \ + -lincompressibleTransportModels \ + -lincompressibleRASModels \ + -lincompressibleLESModels \ -lfiniteVolume diff --git a/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H b/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H index 43cc2cb183..5ce0c0c088 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/UEqn.H @@ -1,10 +1,34 @@ - surfaceScalarField muf = mixture.muf(); + surfaceScalarField muEff + ( + "muEff", + mixture.muf() + + fvc::interpolate(rho*turbulence->nut()) + ); fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(mixture.rhoPhi(), U) - - fvm::laplacian(muf, U) - - (fvc::grad(U) & fvc::grad(muf)) - //- fvc::div(muf*(mesh.Sf() & fvc::interpolate(fvc::grad(U)().T()))) + - fvm::laplacian(muEff, U) + - (fvc::grad(U) & fvc::grad(muEff)) + //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) ); + + UEqn.relax(); + + if (momentumPredictor) + { + solve + ( + UEqn + == + fvc::reconstruct + ( + ( + mixture.surfaceTensionForce() + - ghf*fvc::snGrad(rho) + - fvc::snGrad(pd) + ) * mesh.magSf() + ) + ); + } diff --git a/applications/solvers/multiphase/multiphaseInterFoam/createFields.H b/applications/solvers/multiphase/multiphaseInterFoam/createFields.H index 4f71f75ba4..aa62d0f2a1 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/createFields.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/createFields.H @@ -46,9 +46,31 @@ Info<< "Calculating field g.h\n" << endl; + volScalarField gh("gh", g & mesh.C()); surfaceScalarField ghf("gh", g & mesh.Cf()); + volScalarField p + ( + IOobject + ( + "p", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + pd + rho*gh + ); + + label pdRefCell = 0; scalar pdRefValue = 0.0; setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue); + + + // Construct incompressible turbulence model + autoPtr turbulence + ( + incompressible::turbulenceModel::New(U, phi, mixture) + ); diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C index 5dd13984bf..edd2bca880 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C @@ -29,38 +29,40 @@ Description Solver for n incompressible fluids which captures the interfaces and includes surface-tension and contact-angle effects for each. + Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. + \*---------------------------------------------------------------------------*/ #include "fvCFD.H" #include "multiphaseMixture.H" +#include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readEnvironmentalProperties.H" + #include "readPISOControls.H" + #include "initContinuityErrs.H" + #include "createFields.H" + #include "readTimeControls.H" + #include "correctPhi.H" + #include "CourantNo.H" + #include "setInitialDeltaT.H" -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "readEnvironmentalProperties.H" -# include "readPISOControls.H" -# include "initContinuityErrs.H" -# include "createFields.H" -# include "readTimeControls.H" -# include "correctPhi.H" -# include "CourantNo.H" -# include "setInitialDeltaT.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { -# include "readPISOControls.H" -# include "readTimeControls.H" -# include "CourantNo.H" -# include "setDeltaT.H" + #include "readPISOControls.H" + #include "readTimeControls.H" + #include "CourantNo.H" + #include "setDeltaT.H" runTime++; @@ -69,15 +71,19 @@ int main(int argc, char *argv[]) mixture.correct(); rho = mixture.rho(); -# include "UEqn.H" + #include "UEqn.H" // --- PISO loop for (int corr=0; corrcorrect(); runTime.write(); diff --git a/applications/solvers/multiphase/rasCavitatingFoam/CourantNo.H b/applications/solvers/multiphase/rasCavitatingFoam/CourantNo.H deleted file mode 100644 index 014944e191..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/CourantNo.H +++ /dev/null @@ -1,59 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Global - CourantNo - -Description - Calculates and outputs the mean and maximum Courant Numbers. - -\*---------------------------------------------------------------------------*/ - -scalar CoNum = 0.0; -scalar meanCoNum = 0.0; -scalar acousticCoNum = 0.0; - -if (mesh.nInternalFaces()) -{ - surfaceScalarField SfUfbyDelta = - mesh.surfaceInterpolation::deltaCoeffs()*mag(phiv); - - CoNum = max(SfUfbyDelta/mesh.magSf()) - .value()*runTime.deltaT().value(); - - meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf())) - .value()*runTime.deltaT().value(); - - acousticCoNum = max - ( - mesh.surfaceInterpolation::deltaCoeffs()/sqrt(fvc::interpolate(psi)) - ).value()*runTime.deltaT().value(); -} - -Info<< "phiv Courant Number mean: " << meanCoNum - << " max: " << CoNum - << " acoustic max: " << acousticCoNum - << endl; - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/rasCavitatingFoam/Make/files b/applications/solvers/multiphase/rasCavitatingFoam/Make/files deleted file mode 100644 index 4509463796..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -rasCavitatingFoam.C - -EXE = $(FOAM_APPBIN)/rasCavitatingFoam diff --git a/applications/solvers/multiphase/rasCavitatingFoam/Make/options b/applications/solvers/multiphase/rasCavitatingFoam/Make/options deleted file mode 100644 index a694ac2179..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/Make/options +++ /dev/null @@ -1,14 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ - -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ - -I$(LIB_SRC)/thermophysicalModels/barotropicCompressibilityModel/lnInclude - -EXE_LIBS = \ - -lincompressibleTransportModels \ - -lincompressibleRASModels \ - -lfiniteVolume \ - -lbarotropicCompressibilityModel - diff --git a/applications/solvers/multiphase/rasCavitatingFoam/UEqn.H b/applications/solvers/multiphase/rasCavitatingFoam/UEqn.H deleted file mode 100644 index 374e410c2e..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/UEqn.H +++ /dev/null @@ -1,20 +0,0 @@ - surfaceScalarField muEff - ( - "muEff", - twoPhaseProperties.muf() - + fvc::interpolate(rho*turbulence->nut()) - ); - - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) - + fvm::div(phi, U) - - fvm::laplacian(muEff, U) - //- (fvc::grad(U) & fvc::grad(muf)) - - fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) - ); - - if (momentumPredictor) - { - solve(UEqn == -fvc::grad(p)); - } diff --git a/applications/solvers/multiphase/rasCavitatingFoam/continuityErrs.H b/applications/solvers/multiphase/rasCavitatingFoam/continuityErrs.H deleted file mode 100644 index 6f1622510f..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/continuityErrs.H +++ /dev/null @@ -1,22 +0,0 @@ -{ - volScalarField thermoRho = psi*p + (1.0 - gamma)*rhol0; - - dimensionedScalar totalMass = fvc::domainIntegrate(rho); - - scalar sumLocalContErr = - ( - fvc::domainIntegrate(mag(rho - thermoRho))/totalMass - ).value(); - - scalar globalContErr = - ( - fvc::domainIntegrate(rho - thermoRho)/totalMass - ).value(); - - cumulativeContErr += globalContErr; - - Info<< "time step continuity errors : sum local = " << sumLocalContErr - << ", global = " << globalContErr - << ", cumulative = " << cumulativeContErr - << endl; -} diff --git a/applications/solvers/multiphase/rasCavitatingFoam/createFields.H b/applications/solvers/multiphase/rasCavitatingFoam/createFields.H deleted file mode 100644 index 37ff01d41f..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/createFields.H +++ /dev/null @@ -1,85 +0,0 @@ - Info<< "Reading field p\n" << endl; - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - volScalarField gamma - ( - IOobject - ( - "gamma", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0)) - ); - gamma.oldTime(); - - Info<< "Creating compressibilityModel\n" << endl; - autoPtr psiModel = - barotropicCompressibilityModel::New - ( - thermodynamicProperties, - gamma - ); - - const volScalarField& psi = psiModel->psi(); - - rho == max - ( - psi*p - + (1.0 - gamma)*rhol0 - + ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat, - rhoMin - ); - - Info<< "Reading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - -# include "createPhiv.H" -# include "compressibleCreatePhi.H" - - Info<< "Reading transportProperties\n" << endl; - - twoPhaseMixture twoPhaseProperties(U, phiv, "gamma"); - - // Create RAS turbulence model - autoPtr turbulence - ( - incompressible::RASModel::New(U, phiv, twoPhaseProperties) - ); diff --git a/applications/solvers/multiphase/rasCavitatingFoam/gammaPsi.H b/applications/solvers/multiphase/rasCavitatingFoam/gammaPsi.H deleted file mode 100644 index b259ddd322..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/gammaPsi.H +++ /dev/null @@ -1,10 +0,0 @@ -{ - gamma = max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0)); - - Info<< "max-min gamma: " << max(gamma).value() - << " " << min(gamma).value() << endl; - - psiModel->correct(); - - //Info<< "min a: " << 1.0/sqrt(max(psi)).value() << endl; -} diff --git a/applications/solvers/multiphase/rasCavitatingFoam/pEqn.H b/applications/solvers/multiphase/rasCavitatingFoam/pEqn.H deleted file mode 100644 index c9382dfc0f..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/pEqn.H +++ /dev/null @@ -1,80 +0,0 @@ -{ - if (nOuterCorr == 1) - { - p = - ( - rho - - (1.0 - gamma)*rhol0 - - ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat - )/psi; - } - - surfaceScalarField rhof = fvc::interpolate(rho, "rhof"); - - volScalarField rUA = 1.0/UEqn.A(); - surfaceScalarField rUAf("rUAf", rhof*fvc::interpolate(rUA)); - volVectorField HbyA = rUA*UEqn.H(); - - phiv = (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phiv); - - p.boundaryField().updateCoeffs(); - - surfaceScalarField phiGradp = rUAf*mesh.magSf()*fvc::snGrad(p); - - phiv -= phiGradp/rhof; - -# include "resetPhivPatches.H" - - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - fvScalarMatrix pEqn - ( - fvm::ddt(psi, p) - - (rhol0 + (psil - psiv)*pSat)*fvc::ddt(gamma) - pSat*fvc::ddt(psi) - + fvc::div(phiv, rho) - + fvc::div(phiGradp) - - fvm::laplacian(rUAf, p) - ); - - pEqn.solve(); - - if (nonOrth == nNonOrthCorr) - { - phiv += (phiGradp + pEqn.flux())/rhof; - } - } - - Info<< "max-min p: " << max(p).value() - << " " << min(p).value() << endl; - - - U = HbyA - rUA*fvc::grad(p); - - // Remove the swirl component of velocity for "wedge" cases - if (piso.found("removeSwirl")) - { - label swirlCmpt(readLabel(piso.lookup("removeSwirl"))); - - Info<< "Removing swirl component-" << swirlCmpt << " of U" << endl; - U.field().replace(swirlCmpt, 0.0); - } - - U.correctBoundaryConditions(); - - Info<< "max(U) " << max(mag(U)).value() << endl; - - rho == max - ( - psi*p - + (1.0 - gamma)*rhol0 - + ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat, - rhoMin - ); - - Info<< "max-min rho: " << max(rho).value() - << " " << min(rho).value() << endl; - -# include "gammaPsi.H" - -} diff --git a/applications/solvers/multiphase/rasCavitatingFoam/rasCavitatingFoam.C b/applications/solvers/multiphase/rasCavitatingFoam/rasCavitatingFoam.C deleted file mode 100644 index 51d2a31dde..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/rasCavitatingFoam.C +++ /dev/null @@ -1,94 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Application - rasCavitatingFoam - -Description - Transient cavitation code with RAS turbulence. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "barotropicCompressibilityModel.H" -#include "twoPhaseMixture.H" -#include "incompressible/RASModel/RASModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - -# include "setRootCase.H" - -# include "createTime.H" -# include "createMesh.H" -# include "readThermodynamicProperties.H" -# include "readControls.H" -# include "createFields.H" -# include "initContinuityErrs.H" -# include "compressibleCourantNo.H" -# include "setInitialDeltaT.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { -# include "readControls.H" -# include "CourantNo.H" -# include "setDeltaT.H" - - runTime++; - Info<< "Time = " << runTime.timeName() << nl << endl; - - for (int outerCorr=0; outerCorrcorrect(); - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "\n end \n"; - - return(0); -} - - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/rasCavitatingFoam/readControls.H b/applications/solvers/multiphase/rasCavitatingFoam/readControls.H deleted file mode 100644 index f53e7b9eb1..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/readControls.H +++ /dev/null @@ -1,9 +0,0 @@ -#include "readTimeControls.H" - -scalar maxAcousticCo -( - readScalar(runTime.controlDict().lookup("maxAcousticCo")) -); - - -#include "readPISOControls.H" diff --git a/applications/solvers/multiphase/rasCavitatingFoam/readThermodynamicProperties.H b/applications/solvers/multiphase/rasCavitatingFoam/readThermodynamicProperties.H deleted file mode 100644 index d3fbb9307a..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/readThermodynamicProperties.H +++ /dev/null @@ -1,27 +0,0 @@ - Info<< "Reading thermodynamicProperties\n" << endl; - - IOdictionary thermodynamicProperties - ( - IOobject - ( - "thermodynamicProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ); - - dimensionedScalar psil(thermodynamicProperties.lookup("psil")); - - dimensionedScalar rholSat(thermodynamicProperties.lookup("rholSat")); - - dimensionedScalar psiv(thermodynamicProperties.lookup("psiv")); - - dimensionedScalar pSat(thermodynamicProperties.lookup("pSat")); - - dimensionedScalar rhovSat("rhovSat", psiv*pSat); - - dimensionedScalar rhol0("rhol0", rholSat - pSat*psil); - - dimensionedScalar rhoMin(thermodynamicProperties.lookup("rhoMin")); diff --git a/applications/solvers/multiphase/rasCavitatingFoam/resetPhiPatches.H b/applications/solvers/multiphase/rasCavitatingFoam/resetPhiPatches.H deleted file mode 100644 index e7d0c2f93e..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/resetPhiPatches.H +++ /dev/null @@ -1,15 +0,0 @@ -fvsPatchScalarFieldField& phiPatches = phi.boundaryField(); -const fvPatchScalarFieldField& rhoPatches = rho.boundaryField(); -const fvPatchVectorFieldField& Upatches = U.boundaryField(); -const fvsPatchVectorFieldField& SfPatches = mesh.Sf().boundaryField(); - -forAll(phiPatches, patchI) -{ - if (phi.boundaryField().types()[patchI] == "calculated") - { - calculatedFvsPatchScalarField& phiPatch = - refCast(phiPatches[patchI]); - - phiPatch == ((rhoPatches[patchI]*Upatches[patchI]) & SfPatches[patchI]); - } -} diff --git a/applications/solvers/multiphase/rasCavitatingFoam/resetPhivPatches.H b/applications/solvers/multiphase/rasCavitatingFoam/resetPhivPatches.H deleted file mode 100644 index 7e8b040bb6..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/resetPhivPatches.H +++ /dev/null @@ -1,14 +0,0 @@ -surfaceScalarField::GeometricBoundaryField& phivPatches = phiv.boundaryField(); -const volVectorField::GeometricBoundaryField& Upatches = U.boundaryField(); -const surfaceVectorField::GeometricBoundaryField& SfPatches = mesh.Sf().boundaryField(); - -forAll(phivPatches, patchI) -{ - if (phiv.boundaryField().types()[patchI] == "calculated") - { - calculatedFvsPatchScalarField& phivPatch = - refCast(phivPatches[patchI]); - - phivPatch == (Upatches[patchI] & SfPatches[patchI]); - } -} diff --git a/applications/solvers/multiphase/rasCavitatingFoam/rhoEqn.H b/applications/solvers/multiphase/rasCavitatingFoam/rhoEqn.H deleted file mode 100644 index d0bd6e1dad..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/rhoEqn.H +++ /dev/null @@ -1,16 +0,0 @@ -{ - fvScalarMatrix rhoEqn - ( - fvm::ddt(rho) - + fvm::div(phiv, rho) - ); - - rhoEqn.solve(); - - phi = rhoEqn.flux(); - - Info<< "max-min rho: " << max(rho).value() - << " " << min(rho).value() << endl; - - rho == max(rho, rhoMin); -} diff --git a/applications/solvers/multiphase/rasCavitatingFoam/setDeltaT.H b/applications/solvers/multiphase/rasCavitatingFoam/setDeltaT.H deleted file mode 100644 index 012a5276e8..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/setDeltaT.H +++ /dev/null @@ -1,54 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Global - setDeltaT - -Description - Reset the timestep to maintain a constant maximum courant Number. - Reduction of time-step is imediate but increase is damped to avoid - unstable oscillations. - -\*---------------------------------------------------------------------------*/ - -if (adjustTimeStep) -{ - scalar maxDeltaTFact = - min(maxCo/(CoNum + SMALL), maxAcousticCo/(acousticCoNum + SMALL)); - - scalar deltaTFact = min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2); - - runTime.setDeltaT - ( - min - ( - deltaTFact*runTime.deltaT().value(), - maxDeltaT - ) - ); - - Info<< "deltaT = " << runTime.deltaT().value() << endl; -} - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/rasCavitatingFoam/setInitialDeltaT.H b/applications/solvers/multiphase/rasCavitatingFoam/setInitialDeltaT.H deleted file mode 100644 index 237cacd05a..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/setInitialDeltaT.H +++ /dev/null @@ -1,54 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Global - setInitialDeltaT - -Description - Set the initial timestep corresponding to the timestep adjustment - algorithm in setDeltaT - -\*---------------------------------------------------------------------------*/ - -if (adjustTimeStep) -{ -# include "CourantNo.H" - - if (CoNum > SMALL) - { - scalar maxDeltaTFact = - min(maxCo/(CoNum + SMALL), maxAcousticCo/(acousticCoNum + SMALL)); - - runTime.setDeltaT - ( - min - ( - maxDeltaTFact*runTime.deltaT().value(), - maxDeltaT - ) - ); - } -} - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/rasInterFoam/Make/files b/applications/solvers/multiphase/rasInterFoam/Make/files deleted file mode 100644 index 39b992ad4d..0000000000 --- a/applications/solvers/multiphase/rasInterFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -rasInterFoam.C - -EXE = $(FOAM_APPBIN)/rasInterFoam diff --git a/applications/solvers/multiphase/rasInterFoam/Make/options b/applications/solvers/multiphase/rasInterFoam/Make/options deleted file mode 100644 index 04a3c57887..0000000000 --- a/applications/solvers/multiphase/rasInterFoam/Make/options +++ /dev/null @@ -1,13 +0,0 @@ -EXE_INC = \ - -I../interFoam \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ - -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/RAS \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -EXE_LIBS = \ - -linterfaceProperties \ - -lincompressibleTransportModels \ - -lincompressibleRASModels \ - -lfiniteVolume diff --git a/applications/solvers/multiphase/rasInterFoam/UEqn.H b/applications/solvers/multiphase/rasInterFoam/UEqn.H deleted file mode 100644 index c627f04d17..0000000000 --- a/applications/solvers/multiphase/rasInterFoam/UEqn.H +++ /dev/null @@ -1,32 +0,0 @@ - surfaceScalarField muEff - ( - "muEff", - twoPhaseProperties.muf() - + fvc::interpolate(rho*turbulence->nut()) - ); - - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) - + fvm::div(rhoPhi, U) - - fvm::laplacian(muEff, U) - - (fvc::grad(U) & fvc::grad(muEff)) - //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) - ); - - if (momentumPredictor) - { - solve - ( - UEqn - == - fvc::reconstruct - ( - ( - fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma) - - ghf*fvc::snGrad(rho) - - fvc::snGrad(pd) - ) * mesh.magSf() - ) - ); - } diff --git a/applications/solvers/multiphase/rasInterFoam/createFields.H b/applications/solvers/multiphase/rasInterFoam/createFields.H deleted file mode 100644 index e97a3abcb0..0000000000 --- a/applications/solvers/multiphase/rasInterFoam/createFields.H +++ /dev/null @@ -1,116 +0,0 @@ - Info<< "Reading field pd\n" << endl; - volScalarField pd - ( - IOobject - ( - "pd", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - Info<< "Reading field gamma\n" << endl; - volScalarField gamma - ( - IOobject - ( - "gamma", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - Info<< "Reading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - -# include "createPhi.H" - - Info<< "Reading transportProperties\n" << endl; - twoPhaseMixture twoPhaseProperties(U, phi, "gamma"); - - const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); - const dimensionedScalar& rho2 = twoPhaseProperties.rho2(); - - - // Need to store rho for ddt(rho, U) - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::READ_IF_PRESENT - ), - gamma*rho1 + (scalar(1) - gamma)*rho2, - gamma.boundaryField().types() - ); - rho.oldTime(); - - - // Mass flux - // Initialisation does not matter because rhoPhi is reset after the - // gamma solution before it is used in the U equation. - surfaceScalarField rhoPhi - ( - IOobject - ( - "rho*phi", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - rho1*phi - ); - - - label pdRefCell = 0; - scalar pdRefValue = 0.0; - setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue); - - - Info<< "Calculating field g.h\n" << endl; - volScalarField gh("gh", g & mesh.C()); - surfaceScalarField ghf("gh", g & mesh.Cf()); - - - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - pd + rho*gh - ); - - - // Construct interface from gamma distribution - interfaceProperties interface(gamma, U, twoPhaseProperties); - - // Construct LES model - autoPtr turbulence - ( - incompressible::RASModel::New(U, phi, twoPhaseProperties) - ); diff --git a/applications/solvers/multiphase/rasInterFoam/rasInterFoam.C b/applications/solvers/multiphase/rasInterFoam/rasInterFoam.C deleted file mode 100644 index 33e85efd4b..0000000000 --- a/applications/solvers/multiphase/rasInterFoam/rasInterFoam.C +++ /dev/null @@ -1,104 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Application - rasInterFoam - -Description - Solver for 2 incompressible, isothermal immiscible fluids using a VOF - (volume of fluid) phase-fraction based interface capturing approach. - The momentum and other fluid properties are of the "mixture" and a single - momentum equation is solved. Turbulence is modelled using a run-time - selectable incompressible RAS model. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "MULES.H" -#include "subCycle.H" -#include "interfaceProperties.H" -#include "twoPhaseMixture.H" -#include "incompressible/RASModel/RASModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "setRootCase.H" - #include "createTime.H" - #include "createMesh.H" - #include "readEnvironmentalProperties.H" - #include "readPISOControls.H" - #include "initContinuityErrs.H" - #include "createFields.H" - #include "readTimeControls.H" - #include "correctPhi.H" - #include "CourantNo.H" - #include "setInitialDeltaT.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { - #include "readPISOControls.H" - #include "readTimeControls.H" - #include "CourantNo.H" - #include "setDeltaT.H" - - runTime++; - - Info<< "Time = " << runTime.timeName() << nl << endl; - - #include "gammaEqnSubCycle.H" - - #include "UEqn.H" - - // --- PISO loop - for (int corr=0; corr < nCorr; corr++) - { - #include "pEqn.H" - } - - #include "continuityErrs.H" - - p = pd + rho*gh; - - turbulence->correct(); - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return(0); -} - - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/settlingFoam/UEqn.H b/applications/solvers/multiphase/settlingFoam/UEqn.H index 8dba5041c2..ac4c18ab19 100644 --- a/applications/solvers/multiphase/settlingFoam/UEqn.H +++ b/applications/solvers/multiphase/settlingFoam/UEqn.H @@ -1,29 +1,31 @@ -// Solve the Momentum equation + // Solve the Momentum equation -fvVectorMatrix UEqn -( - fvm::ddt(rho, U) - + fvm::div(phi, U) - + fvc::div + fvVectorMatrix UEqn ( - (Alpha/(scalar(1.001) - Alpha))*(sqr(rhoc)/rho)*Vdj*Vdj, - "div(phiVdj,Vdj)" - ) - - fvm::laplacian(mu, U, "laplacian(muEff,U)") -); - -if (momentumPredictor) -{ - solve - ( - UEqn - == - fvc::reconstruct + fvm::ddt(rho, U) + + fvm::div(phi, U) + + fvc::div ( - ( - - ghf*fvc::snGrad(rho) - - fvc::snGrad(p) - )*mesh.magSf() + (Alpha/(scalar(1.001) - Alpha))*(sqr(rhoc)/rho)*Vdj*Vdj, + "div(phiVdj,Vdj)" ) + - fvm::laplacian(mu, U, "laplacian(muEff,U)") ); -} + + UEqn.relax(); + + if (momentumPredictor) + { + solve + ( + UEqn + == + fvc::reconstruct + ( + ( + - ghf*fvc::snGrad(rho) + - fvc::snGrad(p) + )*mesh.magSf() + ) + ); + } diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options b/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options index ae5ccba0fd..0e21fc2d64 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options @@ -2,9 +2,12 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -linterfaceProperties \ -lincompressibleTransportModels \ + -lincompressibleRASModels \ + -lincompressibleLESModels \ -lfiniteVolume diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H index 0ebaec44f5..5a945697ca 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H @@ -1,14 +1,21 @@ - surfaceScalarField muf = twoPhaseProperties.muf(); + surfaceScalarField muEff + ( + "muEff", + twoPhaseProperties.muf() + + fvc::interpolate(rho*turbulence->nut()) + ); fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - - fvm::laplacian(muf, U) - //- (fvc::grad(U) & fvc::grad(muf)) - - fvc::div(muf*(mesh.Sf() & fvc::interpolate(fvc::grad(U)().T()))) + - fvm::laplacian(muEff, U) + - (fvc::grad(U) & fvc::grad(muEff)) + //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) ); + UEqn.relax(); + if (momentumPredictor) { solve diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H b/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H index 652d1ad64c..bd7c3e2c9f 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H @@ -12,12 +12,12 @@ mesh ); - Info<< "Reading field gamma\n" << endl; - volScalarField gamma + Info<< "Reading field alpha1\n" << endl; + volScalarField alpha1 ( IOobject ( - "gamma", + "alpha1", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -43,21 +43,21 @@ # include "createPhi.H" Info<< "Reading transportProperties\n" << endl; - twoPhaseMixture twoPhaseProperties(U, phi, "gamma"); - + twoPhaseMixture twoPhaseProperties(U, phi); + const dimensionedScalar& rho1 = twoPhaseProperties.rho1(); const dimensionedScalar& rho2 = twoPhaseProperties.rho2(); dimensionedScalar Dab(twoPhaseProperties.lookup("Dab")); // Need to store rho for ddt(rho, U) - volScalarField rho("rho", gamma*rho1 + (scalar(1) - gamma)*rho2); + volScalarField rho("rho", alpha1*rho1 + (scalar(1) - alpha1)*rho2); rho.oldTime(); // Mass flux // Initialisation does not matter because rhoPhi is reset after the - // gamma solution before it is used in the U equation. + // alpha1 solution before it is used in the U equation. surfaceScalarField rhoPhi ( IOobject @@ -73,9 +73,31 @@ Info<< "Calculating field g.h\n" << endl; + volScalarField gh("gh", g & mesh.C()); surfaceScalarField ghf("gh", g & mesh.Cf()); + volScalarField p + ( + IOobject + ( + "p", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + pd + rho*gh + ); + + label pdRefCell = 0; scalar pdRefValue = 0.0; setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue); + + + // Construct incompressible turbulence model + autoPtr turbulence + ( + incompressible::turbulenceModel::New(U, phi, twoPhaseProperties) + ); diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/gammaEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/gammaEqn.H deleted file mode 100644 index 144339f398..0000000000 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/gammaEqn.H +++ /dev/null @@ -1,19 +0,0 @@ -{ - fvScalarMatrix gammaEqn - ( - fvm::ddt(gamma) - + fvm::div(phi, gamma) - - fvm::laplacian(Dab, gamma) - ); - - gammaEqn.solve(); - - rhoPhi = gammaEqn.flux()*(rho1 - rho2) + phi*rho2; - rho = gamma*rho1 + (scalar(1) - gamma)*rho2; - - Info<< "Phase 1 volume fraction = " - << gamma.weightedAverage(mesh.V()).value() - << " Min(gamma) = " << min(gamma).value() - << " Max(gamma) = " << max(gamma).value() - << endl; -} diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C index 64895530f6..7f9b32a917 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C @@ -28,10 +28,13 @@ Application Description Solver for mixing 2 incompressible fluids. + Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. + \*---------------------------------------------------------------------------*/ #include "fvCFD.H" #include "twoPhaseMixture.H" +#include "turbulenceModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -58,7 +61,7 @@ int main(int argc, char *argv[]) twoPhaseProperties.correct(); -# include "gammaEqn.H" +# include "alphaEqn.H" # include "UEqn.H" @@ -70,6 +73,10 @@ int main(int argc, char *argv[]) # include "continuityErrs.H" + p = pd + rho*gh; + + turbulence->correct(); + runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/src/transportModels/interfaceProperties/Make/files b/src/transportModels/interfaceProperties/Make/files index 56f21e91b1..a62008cee8 100644 --- a/src/transportModels/interfaceProperties/Make/files +++ b/src/transportModels/interfaceProperties/Make/files @@ -1,11 +1,11 @@ interfaceProperties.C interfaceCompression/interfaceCompression.C -gammaContactAngle/gammaContactAngle/gammaContactAngleFvPatchScalarField.C -gammaContactAngle/constantGammaContactAngle/constantGammaContactAngleFvPatchScalarField.C -gammaContactAngle/dynamicGammaContactAngle/dynamicGammaContactAngleFvPatchScalarField.C -gammaContactAngle/timeVaryingGammaContactAngle/timeVaryingGammaContactAngleFvPatchScalarField.C +alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C +alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C +alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.C +alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.C -gammaFixedPressure/gammaFixedPressureFvPatchScalarField.C +alphaFixedPressure/alphaFixedPressureFvPatchScalarField.C LIB = $(FOAM_LIBBIN)/libinterfaceProperties diff --git a/src/transportModels/interfaceProperties/gammaContactAngle/constantGammaContactAngle/constantGammaContactAngleFvPatchScalarField.C b/src/transportModels/interfaceProperties/gammaContactAngle/constantGammaContactAngle/constantGammaContactAngleFvPatchScalarField.C deleted file mode 100644 index d13c0c0c05..0000000000 --- a/src/transportModels/interfaceProperties/gammaContactAngle/constantGammaContactAngle/constantGammaContactAngleFvPatchScalarField.C +++ /dev/null @@ -1,135 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "constantGammaContactAngleFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "volMesh.H" -#include "fvPatchFieldMapper.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -constantGammaContactAngleFvPatchScalarField:: -constantGammaContactAngleFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF -) -: - gammaContactAngleFvPatchScalarField(p, iF), - theta0_(0.0) -{} - - -constantGammaContactAngleFvPatchScalarField:: -constantGammaContactAngleFvPatchScalarField -( - const constantGammaContactAngleFvPatchScalarField& gcpsf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - gammaContactAngleFvPatchScalarField(gcpsf, p, iF, mapper), - theta0_(gcpsf.theta0_) -{} - - -constantGammaContactAngleFvPatchScalarField:: -constantGammaContactAngleFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - gammaContactAngleFvPatchScalarField(p, iF), - theta0_(readScalar(dict.lookup("theta0"))) -{ - evaluate(); -} - - -constantGammaContactAngleFvPatchScalarField:: -constantGammaContactAngleFvPatchScalarField -( - const constantGammaContactAngleFvPatchScalarField& gcpsf -) -: - gammaContactAngleFvPatchScalarField(gcpsf), - theta0_(gcpsf.theta0_) -{} - - -constantGammaContactAngleFvPatchScalarField:: -constantGammaContactAngleFvPatchScalarField -( - const constantGammaContactAngleFvPatchScalarField& gcpsf, - const DimensionedField& iF -) -: - gammaContactAngleFvPatchScalarField(gcpsf, iF), - theta0_(gcpsf.theta0_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp constantGammaContactAngleFvPatchScalarField::theta -( - const fvPatchVectorField&, - const fvsPatchVectorField& -) const -{ - return tmp(new scalarField(size(), theta0_)); -} - - -void constantGammaContactAngleFvPatchScalarField::write(Ostream& os) const -{ - fvPatchScalarField::write(os); - os.writeKeyword("theta0") << theta0_ << token::END_STATEMENT << nl; - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - constantGammaContactAngleFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/transportModels/interfaceProperties/gammaContactAngle/constantGammaContactAngle/constantGammaContactAngleFvPatchScalarField.H b/src/transportModels/interfaceProperties/gammaContactAngle/constantGammaContactAngle/constantGammaContactAngleFvPatchScalarField.H deleted file mode 100644 index d941402ec1..0000000000 --- a/src/transportModels/interfaceProperties/gammaContactAngle/constantGammaContactAngle/constantGammaContactAngleFvPatchScalarField.H +++ /dev/null @@ -1,152 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::constantGammaContactAngleFvPatchScalarField - -Description - A constant gammaContactAngle scalar boundary condition - (gammaContactAngleFvPatchScalarField) - -SourceFiles - constantGammaContactAngleFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef constantGammaContactAngleFvPatchScalarField_H -#define constantGammaContactAngleFvPatchScalarField_H - -#include "gammaContactAngleFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class constantGammaContactAngleFvPatch Declaration -\*---------------------------------------------------------------------------*/ - -class constantGammaContactAngleFvPatchScalarField -: - public gammaContactAngleFvPatchScalarField -{ - // Private data - - //- Equilibrium contact angle - scalar theta0_; - - -public: - - //- Runtime type information - TypeName("constantGammaContactAngle"); - - - // Constructors - - //- Construct from patch and internal field - constantGammaContactAngleFvPatchScalarField - ( - const fvPatch&, - const DimensionedField& - ); - - //- Construct from patch, internal field and dictionary - constantGammaContactAngleFvPatchScalarField - ( - const fvPatch&, - const DimensionedField&, - const dictionary& - ); - - //- Construct by mapping given - // constantGammaContactAngleFvPatchScalarField - // onto a new patch - constantGammaContactAngleFvPatchScalarField - ( - const constantGammaContactAngleFvPatchScalarField&, - const fvPatch&, - const DimensionedField&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - constantGammaContactAngleFvPatchScalarField - ( - const constantGammaContactAngleFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new constantGammaContactAngleFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - constantGammaContactAngleFvPatchScalarField - ( - const constantGammaContactAngleFvPatchScalarField&, - const DimensionedField& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp clone - ( - const DimensionedField& iF - ) const - { - return tmp - ( - new constantGammaContactAngleFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - //- Return the equilibrium contact-angle - virtual tmp theta - ( - const fvPatchVectorField& Up, - const fvsPatchVectorField& nHat - ) const; - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/transportModels/interfaceProperties/gammaContactAngle/dynamicGammaContactAngle/dynamicGammaContactAngleFvPatchScalarField.C b/src/transportModels/interfaceProperties/gammaContactAngle/dynamicGammaContactAngle/dynamicGammaContactAngleFvPatchScalarField.C deleted file mode 100644 index e965671150..0000000000 --- a/src/transportModels/interfaceProperties/gammaContactAngle/dynamicGammaContactAngle/dynamicGammaContactAngleFvPatchScalarField.C +++ /dev/null @@ -1,170 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "dynamicGammaContactAngleFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volMesh.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::dynamicGammaContactAngleFvPatchScalarField:: -dynamicGammaContactAngleFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF -) -: - gammaContactAngleFvPatchScalarField(p, iF), - theta0_(0.0), - uTheta_(0.0), - thetaA_(0.0), - thetaR_(0.0) -{} - - -Foam::dynamicGammaContactAngleFvPatchScalarField:: -dynamicGammaContactAngleFvPatchScalarField -( - const dynamicGammaContactAngleFvPatchScalarField& gcpsf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - gammaContactAngleFvPatchScalarField(gcpsf, p, iF, mapper), - theta0_(gcpsf.theta0_), - uTheta_(gcpsf.uTheta_), - thetaA_(gcpsf.thetaA_), - thetaR_(gcpsf.thetaR_) -{} - - -Foam::dynamicGammaContactAngleFvPatchScalarField:: -dynamicGammaContactAngleFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - gammaContactAngleFvPatchScalarField(p, iF), - theta0_(readScalar(dict.lookup("theta0"))), - uTheta_(readScalar(dict.lookup("uTheta"))), - thetaA_(readScalar(dict.lookup("thetaA"))), - thetaR_(readScalar(dict.lookup("thetaR"))) -{ - evaluate(); -} - - -Foam::dynamicGammaContactAngleFvPatchScalarField:: -dynamicGammaContactAngleFvPatchScalarField -( - const dynamicGammaContactAngleFvPatchScalarField& gcpsf -) -: - gammaContactAngleFvPatchScalarField(gcpsf), - theta0_(gcpsf.theta0_), - uTheta_(gcpsf.uTheta_), - thetaA_(gcpsf.thetaA_), - thetaR_(gcpsf.thetaR_) -{} - - -Foam::dynamicGammaContactAngleFvPatchScalarField:: -dynamicGammaContactAngleFvPatchScalarField -( - const dynamicGammaContactAngleFvPatchScalarField& gcpsf, - const DimensionedField& iF -) -: - gammaContactAngleFvPatchScalarField(gcpsf, iF), - theta0_(gcpsf.theta0_), - uTheta_(gcpsf.uTheta_), - thetaA_(gcpsf.thetaA_), - thetaR_(gcpsf.thetaR_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -Foam::tmp -Foam::dynamicGammaContactAngleFvPatchScalarField::theta -( - const fvPatchVectorField& Up, - const fvsPatchVectorField& nHat -) const -{ - if (uTheta_ < SMALL) - { - return tmp(new scalarField(size(), theta0_)); - } - - vectorField nf = patch().nf(); - - // Calculated the component of the velocity parallel to the wall - vectorField Uwall = Up.patchInternalField() - Up; - Uwall -= (nf & Uwall)*nf; - - // Find the direction of the interface parallel to the wall - vectorField nWall = nHat - (nf & nHat)*nf; - - // Normalise nWall - nWall /= (mag(nWall) + SMALL); - - // Calculate Uwall resolved normal to the interface parallel to - // the interface - scalarField uwall = nWall & Uwall; - - return theta0_ + (thetaA_ - thetaR_)*tanh(uwall/uTheta_); -} - - -void Foam::dynamicGammaContactAngleFvPatchScalarField::write(Ostream& os) const -{ - fvPatchScalarField::write(os); - os.writeKeyword("theta0") << theta0_ << token::END_STATEMENT << nl; - os.writeKeyword("uTheta") << uTheta_ << token::END_STATEMENT << nl; - os.writeKeyword("thetaA") << thetaA_ << token::END_STATEMENT << nl; - os.writeKeyword("thetaR") << thetaR_ << token::END_STATEMENT << nl; - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - makePatchTypeField - ( - fvPatchScalarField, - dynamicGammaContactAngleFvPatchScalarField - ); -} - - -// ************************************************************************* // diff --git a/src/transportModels/interfaceProperties/gammaContactAngle/dynamicGammaContactAngle/dynamicGammaContactAngleFvPatchScalarField.H b/src/transportModels/interfaceProperties/gammaContactAngle/dynamicGammaContactAngle/dynamicGammaContactAngleFvPatchScalarField.H deleted file mode 100644 index 9e730c6f74..0000000000 --- a/src/transportModels/interfaceProperties/gammaContactAngle/dynamicGammaContactAngle/dynamicGammaContactAngleFvPatchScalarField.H +++ /dev/null @@ -1,161 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::dynamicGammaContactAngleFvPatchScalarField - -Description - A dynamic gammaContactAngle scalar boundary condition - (gammaContactAngleFvPatchScalarField) - -SourceFiles - dynamicGammaContactAngleFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef dynamicGammaContactAngleFvPatchScalarField_H -#define dynamicGammaContactAngleFvPatchScalarField_H - -#include "gammaContactAngleFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class dynamicGammaContactAngleFvPatch Declaration -\*---------------------------------------------------------------------------*/ - -class dynamicGammaContactAngleFvPatchScalarField -: - public gammaContactAngleFvPatchScalarField -{ - // Private data - - //- Equilibrium contact angle - scalar theta0_; - - //- Dynamic contact angle velocity scale - scalar uTheta_; - - //- Limiting advancing contact angle - scalar thetaA_; - - //- Limiting receeding contact angle - scalar thetaR_; - - -public: - - //- Runtime type information - TypeName("dynamicGammaContactAngle"); - - - // Constructors - - //- Construct from patch and internal field - dynamicGammaContactAngleFvPatchScalarField - ( - const fvPatch&, - const DimensionedField& - ); - - //- Construct from patch, internal field and dictionary - dynamicGammaContactAngleFvPatchScalarField - ( - const fvPatch&, - const DimensionedField&, - const dictionary& - ); - - //- Construct by mapping given - // dynamicGammaContactAngleFvPatchScalarField - // onto a new patch - dynamicGammaContactAngleFvPatchScalarField - ( - const dynamicGammaContactAngleFvPatchScalarField&, - const fvPatch&, - const DimensionedField&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - dynamicGammaContactAngleFvPatchScalarField - ( - const dynamicGammaContactAngleFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new dynamicGammaContactAngleFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - dynamicGammaContactAngleFvPatchScalarField - ( - const dynamicGammaContactAngleFvPatchScalarField&, - const DimensionedField& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp clone - ( - const DimensionedField& iF - ) const - { - return tmp - ( - new dynamicGammaContactAngleFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - //- Evaluate and return dynamic contact-angle - virtual tmp theta - ( - const fvPatchVectorField& Up, - const fvsPatchVectorField& nHat - ) const; - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/transportModels/interfaceProperties/gammaContactAngle/gammaContactAngle/gammaContactAngleFvPatchScalarField.C b/src/transportModels/interfaceProperties/gammaContactAngle/gammaContactAngle/gammaContactAngleFvPatchScalarField.C deleted file mode 100644 index e4862424a4..0000000000 --- a/src/transportModels/interfaceProperties/gammaContactAngle/gammaContactAngle/gammaContactAngleFvPatchScalarField.C +++ /dev/null @@ -1,101 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "gammaContactAngleFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volMesh.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(gammaContactAngleFvPatchScalarField, 0); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -gammaContactAngleFvPatchScalarField::gammaContactAngleFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF -) -: - zeroGradientFvPatchScalarField(p, iF) -{} - - -gammaContactAngleFvPatchScalarField::gammaContactAngleFvPatchScalarField -( - const gammaContactAngleFvPatchScalarField& gcpsf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - zeroGradientFvPatchScalarField(gcpsf, p, iF, mapper) -{} - - -gammaContactAngleFvPatchScalarField::gammaContactAngleFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - zeroGradientFvPatchScalarField(p, iF) -{ - evaluate(); -} - - -gammaContactAngleFvPatchScalarField::gammaContactAngleFvPatchScalarField -( - const gammaContactAngleFvPatchScalarField& gcpsf -) -: - zeroGradientFvPatchScalarField(gcpsf) -{} - - -gammaContactAngleFvPatchScalarField::gammaContactAngleFvPatchScalarField -( - const gammaContactAngleFvPatchScalarField& gcpsf, - const DimensionedField& iF -) -: - zeroGradientFvPatchScalarField(gcpsf, iF) -{} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/transportModels/interfaceProperties/gammaContactAngle/gammaContactAngle/gammaContactAngleFvPatchScalarField.H b/src/transportModels/interfaceProperties/gammaContactAngle/gammaContactAngle/gammaContactAngleFvPatchScalarField.H deleted file mode 100644 index 6b90d838e1..0000000000 --- a/src/transportModels/interfaceProperties/gammaContactAngle/gammaContactAngle/gammaContactAngleFvPatchScalarField.H +++ /dev/null @@ -1,125 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::gammaContactAngleFvPatchScalarField - -Description - Abstract base class for gammaContactAngle boundary conditions. - - Derived classes must implement the theta() fuction which returns the - wall contact angle field. - -SourceFiles - gammaContactAngleFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef gammaContactAngleFvPatchScalarField_H -#define gammaContactAngleFvPatchScalarField_H - -#include "zeroGradientFvPatchFields.H" -#include "fvsPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class gammaContactAngleFvPatch Declaration -\*---------------------------------------------------------------------------*/ - -class gammaContactAngleFvPatchScalarField -: - public zeroGradientFvPatchScalarField -{ - -public: - - //- Runtime type information - TypeName("gammaContactAngle"); - - - // Constructors - - //- Construct from patch and internal field - gammaContactAngleFvPatchScalarField - ( - const fvPatch&, - const DimensionedField& - ); - - //- Construct from patch, internal field and dictionary - gammaContactAngleFvPatchScalarField - ( - const fvPatch&, - const DimensionedField&, - const dictionary& - ); - - //- Construct by mapping given gammaContactAngleFvPatchScalarField - // onto a new patch - gammaContactAngleFvPatchScalarField - ( - const gammaContactAngleFvPatchScalarField&, - const fvPatch&, - const DimensionedField&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - gammaContactAngleFvPatchScalarField - ( - const gammaContactAngleFvPatchScalarField& - ); - - //- Construct as copy setting internal field reference - gammaContactAngleFvPatchScalarField - ( - const gammaContactAngleFvPatchScalarField&, - const DimensionedField& - ); - - - // Member functions - - //- Return the contact angle - virtual tmp theta - ( - const fvPatchVectorField& Up, - const fvsPatchVectorField& nHat - ) const = 0; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/transportModels/interfaceProperties/gammaContactAngle/timeVaryingGammaContactAngle/timeVaryingGammaContactAngleFvPatchScalarField.C b/src/transportModels/interfaceProperties/gammaContactAngle/timeVaryingGammaContactAngle/timeVaryingGammaContactAngleFvPatchScalarField.C deleted file mode 100644 index 0f43629851..0000000000 --- a/src/transportModels/interfaceProperties/gammaContactAngle/timeVaryingGammaContactAngle/timeVaryingGammaContactAngleFvPatchScalarField.C +++ /dev/null @@ -1,152 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "timeVaryingGammaContactAngleFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volMesh.H" -#include "Time.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -timeVaryingGammaContactAngleFvPatchScalarField:: -timeVaryingGammaContactAngleFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF -) -: - gammaContactAngleFvPatchScalarField(p, iF), - t0_(0.0), - thetaT0_(0.0), - te_(0.0), - thetaTe_(0.0) -{} - - -timeVaryingGammaContactAngleFvPatchScalarField:: -timeVaryingGammaContactAngleFvPatchScalarField -( - const timeVaryingGammaContactAngleFvPatchScalarField& gcpsf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - gammaContactAngleFvPatchScalarField(gcpsf, p, iF, mapper), - t0_(gcpsf.t0_), - thetaT0_(gcpsf.thetaT0_), - te_(gcpsf.te_), - thetaTe_(gcpsf.te_) -{} - - -timeVaryingGammaContactAngleFvPatchScalarField:: -timeVaryingGammaContactAngleFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - gammaContactAngleFvPatchScalarField(p, iF), - t0_(readScalar(dict.lookup("t0"))), - thetaT0_(readScalar(dict.lookup("thetaT0"))), - te_(readScalar(dict.lookup("te"))), - thetaTe_(readScalar(dict.lookup("thetaTe"))) -{ - evaluate(); -} - - -timeVaryingGammaContactAngleFvPatchScalarField:: -timeVaryingGammaContactAngleFvPatchScalarField -( - const timeVaryingGammaContactAngleFvPatchScalarField& gcpsf, - const DimensionedField& iF -) -: - gammaContactAngleFvPatchScalarField(gcpsf, iF), - t0_(gcpsf.t0_), - thetaT0_(gcpsf.thetaT0_), - te_(gcpsf.te_), - thetaTe_(gcpsf.thetaTe_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp timeVaryingGammaContactAngleFvPatchScalarField::theta -( - const fvPatchVectorField&, - const fvsPatchVectorField& -) const -{ - scalar t = patch().boundaryMesh().mesh().time().value(); - scalar theta0 = thetaT0_; - - if (t < t0_) - { - theta0 = thetaT0_; - } - else if (t > te_) - { - theta0 = thetaTe_; - } - else - { - theta0 = thetaT0_ + (t - t0_)*(thetaTe_ - thetaT0_)/(te_ - t0_); - } - - return tmp(new scalarField(size(), theta0)); -} - - -void timeVaryingGammaContactAngleFvPatchScalarField::write(Ostream& os) const -{ - fvPatchScalarField::write(os); - os.writeKeyword("t0") << t0_ << token::END_STATEMENT << nl; - os.writeKeyword("thetaT0") << thetaT0_ << token::END_STATEMENT << nl; - os.writeKeyword("te") << te_ << token::END_STATEMENT << nl; - os.writeKeyword("thetaTe") << thetaTe_ << token::END_STATEMENT << nl; - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField(fvPatchScalarField, timeVaryingGammaContactAngleFvPatchScalarField); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/transportModels/interfaceProperties/gammaContactAngle/timeVaryingGammaContactAngle/timeVaryingGammaContactAngleFvPatchScalarField.H b/src/transportModels/interfaceProperties/gammaContactAngle/timeVaryingGammaContactAngle/timeVaryingGammaContactAngleFvPatchScalarField.H deleted file mode 100644 index e07637471b..0000000000 --- a/src/transportModels/interfaceProperties/gammaContactAngle/timeVaryingGammaContactAngle/timeVaryingGammaContactAngleFvPatchScalarField.H +++ /dev/null @@ -1,148 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::timeVaryingGammaContactAngleFvPatchScalarField - -Description - A time-varying gammaContactAngle scalar boundary condition - (gammaContactAngleFvPatchScalarField) - -SourceFiles - timeVaryingGammaContactAngleFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef timeVaryingGammaContactAngleFvPatchScalarField_H -#define timeVaryingGammaContactAngleFvPatchScalarField_H - -#include "gammaContactAngleFvPatchScalarField.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class timeVaryingGammaContactAngleFvPatch Declaration -\*---------------------------------------------------------------------------*/ - -class timeVaryingGammaContactAngleFvPatchScalarField -: - public gammaContactAngleFvPatchScalarField -{ - // Private data - - // Equilibrium contact angle control parameters - scalar t0_; - scalar thetaT0_; - scalar te_; - scalar thetaTe_; - - -public: - - //- Runtime type information - TypeName("timeVaryingGammaContactAngle"); - - - // Constructors - - //- Construct from patch and internal field - timeVaryingGammaContactAngleFvPatchScalarField - ( - const fvPatch&, - const DimensionedField& - ); - - //- Construct from patch, internal field and dictionary - timeVaryingGammaContactAngleFvPatchScalarField - ( - const fvPatch&, - const DimensionedField&, - const dictionary& - ); - - //- Construct by mapping given timeVaryingGammaContactAngleFvPatchScalarField - // onto a new patch - timeVaryingGammaContactAngleFvPatchScalarField - ( - const timeVaryingGammaContactAngleFvPatchScalarField&, - const fvPatch&, - const DimensionedField&, - const fvPatchFieldMapper& - ); - - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new timeVaryingGammaContactAngleFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - timeVaryingGammaContactAngleFvPatchScalarField - ( - const timeVaryingGammaContactAngleFvPatchScalarField&, - const DimensionedField& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp clone - ( - const DimensionedField& iF - ) const - { - return tmp - ( - new timeVaryingGammaContactAngleFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - //- Evaluate and return the time-varying equilibrium contact-angle - virtual tmp theta - ( - const fvPatchVectorField& Up, - const fvsPatchVectorField& nHat - ) const; - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/transportModels/interfaceProperties/gammaFixedPressure/gammaFixedPressureFvPatchScalarField.C b/src/transportModels/interfaceProperties/gammaFixedPressure/gammaFixedPressureFvPatchScalarField.C deleted file mode 100644 index aa9637b993..0000000000 --- a/src/transportModels/interfaceProperties/gammaFixedPressure/gammaFixedPressureFvPatchScalarField.C +++ /dev/null @@ -1,173 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "gammaFixedPressureFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "surfaceFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -gammaFixedPressureFvPatchScalarField::gammaFixedPressureFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF -) -: - fixedValueFvPatchScalarField(p, iF), - p_(p.size(), 0.0) -{} - - -gammaFixedPressureFvPatchScalarField::gammaFixedPressureFvPatchScalarField -( - const gammaFixedPressureFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchScalarField(ptf, p, iF, mapper), - p_(ptf.p_, mapper) -{} - - -gammaFixedPressureFvPatchScalarField::gammaFixedPressureFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - fixedValueFvPatchScalarField(p, iF), - p_("p", dict, p.size()) -{ - if (dict.found("value")) - { - fvPatchField::operator= - ( - scalarField("value", dict, p.size()) - ); - } - else - { - fvPatchField::operator=(p_); - } -} - - -gammaFixedPressureFvPatchScalarField::gammaFixedPressureFvPatchScalarField -( - const gammaFixedPressureFvPatchScalarField& tppsf -) -: - fixedValueFvPatchScalarField(tppsf), - p_(tppsf.p_) -{} - - -gammaFixedPressureFvPatchScalarField::gammaFixedPressureFvPatchScalarField -( - const gammaFixedPressureFvPatchScalarField& tppsf, - const DimensionedField& iF -) -: - fixedValueFvPatchScalarField(tppsf, iF), - p_(tppsf.p_) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void gammaFixedPressureFvPatchScalarField::autoMap -( - const fvPatchFieldMapper& m -) -{ - scalarField::autoMap(m); - p_.autoMap(m); -} - - -void gammaFixedPressureFvPatchScalarField::rmap -( - const fvPatchScalarField& ptf, - const labelList& addr -) -{ - fixedValueFvPatchScalarField::rmap(ptf, addr); - - const gammaFixedPressureFvPatchScalarField& tiptf = - refCast(ptf); - - p_.rmap(tiptf.p_, addr); -} - - -void gammaFixedPressureFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const dictionary& environmentalProperties - = db().lookupObject("environmentalProperties"); - - dimensionedVector g(environmentalProperties.lookup("g")); - - const fvPatchField& rho = - patch().lookupPatchField("rho"); - - operator==(p_ - rho*(g.value() & patch().Cf())); - - fixedValueFvPatchScalarField::updateCoeffs(); -} - - -void gammaFixedPressureFvPatchScalarField::write(Ostream& os) const -{ - fvPatchScalarField::write(os); - p_.writeEntry("p", os); - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField(fvPatchScalarField, gammaFixedPressureFvPatchScalarField); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/transportModels/interfaceProperties/gammaFixedPressure/gammaFixedPressureFvPatchScalarField.H b/src/transportModels/interfaceProperties/gammaFixedPressure/gammaFixedPressureFvPatchScalarField.H deleted file mode 100644 index e7c360b6bc..0000000000 --- a/src/transportModels/interfaceProperties/gammaFixedPressure/gammaFixedPressureFvPatchScalarField.H +++ /dev/null @@ -1,180 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::gammaFixedPressureFvPatchScalarField - -Description - A fixed-pressure gammaContactAngle boundary - -SourceFiles - gammaFixedPressureFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef gammaFixedPressureFvPatchScalarField_H -#define gammaFixedPressureFvPatchScalarField_H - -#include "fixedValueFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class gammaFixedPressureFvPatch Declaration -\*---------------------------------------------------------------------------*/ - -class gammaFixedPressureFvPatchScalarField -: - public fixedValueFvPatchScalarField -{ - // Private data - - //- Fixed pressure - scalarField p_; - - -public: - - //- Runtime type information - TypeName("gammaFixedPressure"); - - - // Constructors - - //- Construct from patch and internal field - gammaFixedPressureFvPatchScalarField - ( - const fvPatch&, - const DimensionedField& - ); - - //- Construct from patch, internal field and dictionary - gammaFixedPressureFvPatchScalarField - ( - const fvPatch&, - const DimensionedField&, - const dictionary& - ); - - //- Construct by mapping given gammaFixedPressureFvPatchScalarField - // onto a new patch - gammaFixedPressureFvPatchScalarField - ( - const gammaFixedPressureFvPatchScalarField&, - const fvPatch&, - const DimensionedField&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - gammaFixedPressureFvPatchScalarField - ( - const gammaFixedPressureFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new gammaFixedPressureFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - gammaFixedPressureFvPatchScalarField - ( - const gammaFixedPressureFvPatchScalarField&, - const DimensionedField& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp clone - ( - const DimensionedField& iF - ) const - { - return tmp - ( - new gammaFixedPressureFvPatchScalarField(*this, iF) - ); - } - - - // Member functions - - // Access - - //- Return the gammaFixed pressure - const scalarField& p() const - { - return p_; - } - - //- Return reference to the gammaFixed pressure to allow adjustment - scalarField& p() - { - return p_; - } - - - // Mapping functions - - //- Map (and resize as needed) from self given a mapping object - virtual void autoMap - ( - const fvPatchFieldMapper& - ); - - //- Reverse map the given fvPatchField onto this fvPatchField - virtual void rmap - ( - const fvPatchScalarField&, - const labelList& - ); - - - // Evaluation functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/transportModels/interfaceProperties/interfaceProperties.C b/src/transportModels/interfaceProperties/interfaceProperties.C index 2cf5fff1a3..4e3fb21ddc 100644 --- a/src/transportModels/interfaceProperties/interfaceProperties.C +++ b/src/transportModels/interfaceProperties/interfaceProperties.C @@ -22,33 +22,20 @@ License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Application - interfaceProperties - -Description - Properties to aid interFoam : - 1. Correct the gamma boundary condition for dynamic contact angle. - 2. Calculate interface curvature. - \*---------------------------------------------------------------------------*/ #include "interfaceProperties.H" -#include "gammaContactAngleFvPatchScalarField.H" +#include "alphaContactAngleFvPatchScalarField.H" #include "mathematicalConstants.H" #include "surfaceInterpolate.H" #include "fvcDiv.H" #include "fvcGrad.H" #include "fvcSnGrad.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * // -const scalar interfaceProperties::convertToRad = - mathematicalConstant::pi/180.0; +const Foam::scalar Foam::interfaceProperties::convertToRad = + Foam::mathematicalConstant::pi/180.0; // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -59,26 +46,26 @@ const scalar interfaceProperties::convertToRad = // The dynamic contact angle is calculated from the component of the // velocity on the direction of the interface, parallel to the wall. -void interfaceProperties::correctContactAngle +void Foam::interfaceProperties::correctContactAngle ( surfaceVectorField::GeometricBoundaryField& nHatb ) const { - const fvMesh& mesh = gamma_.mesh(); - const volScalarField::GeometricBoundaryField& gbf = gamma_.boundaryField(); + const fvMesh& mesh = alpha1_.mesh(); + const volScalarField::GeometricBoundaryField& gbf = alpha1_.boundaryField(); const fvBoundaryMesh& boundary = mesh.boundary(); forAll(boundary, patchi) { - if (isA(gbf[patchi])) + if (isA(gbf[patchi])) { - const gammaContactAngleFvPatchScalarField& gcap = - refCast + const alphaContactAngleFvPatchScalarField& gcap = + refCast (gbf[patchi]); fvsPatchVectorField& nHatp = nHatb[patchi]; - scalarField theta = + scalarField theta = convertToRad*gcap.theta(U_.boundaryField()[patchi], nHatp); vectorField nf = boundary[patchi].nf(); @@ -109,22 +96,22 @@ void interfaceProperties::correctContactAngle } -void interfaceProperties::calculateK() +void Foam::interfaceProperties::calculateK() { - const fvMesh& mesh = gamma_.mesh(); + const fvMesh& mesh = alpha1_.mesh(); const surfaceVectorField& Sf = mesh.Sf(); - // Cell gradient of gamma - volVectorField gradGamma = fvc::grad(gamma_); + // Cell gradient of alpha + volVectorField gradAlpha = fvc::grad(alpha1_); - // Interpolated face-gradient of gamma - surfaceVectorField gradGammaf = fvc::interpolate(gradGamma); - //gradGammaf -= + // Interpolated face-gradient of alpha + surfaceVectorField gradAlphaf = fvc::interpolate(gradAlpha); + //gradAlphaf -= // (mesh.Sf()/mesh.magSf()) - // *(fvc::snGrad(gamma_) - (mesh.Sf() & gradGammaf)/mesh.magSf()); + // *(fvc::snGrad(alpha1_) - (mesh.Sf() & gradAlphaf)/mesh.magSf()); // Face unit interface normal - surfaceVectorField nHatfv = gradGammaf/(mag(gradGammaf) + deltaN_); + surfaceVectorField nHatfv = gradAlphaf/(mag(gradAlphaf) + deltaN_); correctContactAngle(nHatfv.boundaryField()); // Face unit interface normal flux @@ -136,7 +123,7 @@ void interfaceProperties::calculateK() // Complex expression for curvature. // Correction is formally zero but numerically non-zero. /* - volVectorField nHat = gradGamma/(mag(gradGamma) + deltaN_); + volVectorField nHat = gradAlpha/(mag(gradAlpha) + deltaN_); forAll(nHat.boundaryField(), patchi) { nHat.boundaryField()[patchi] = nHatfv.boundaryField()[patchi]; @@ -149,19 +136,19 @@ void interfaceProperties::calculateK() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -interfaceProperties::interfaceProperties +Foam::interfaceProperties::interfaceProperties ( - const volScalarField& gamma, + const volScalarField& alpha1, const volVectorField& U, const IOdictionary& dict ) : transportPropertiesDict_(dict), - cGamma_ + cAlpha_ ( readScalar ( - gamma.mesh().solutionDict().subDict("PISO").lookup("cGamma") + alpha1.mesh().solutionDict().subDict("PISO").lookup("cAlpha") ) ), sigma_(dict.lookup("sigma")), @@ -169,10 +156,10 @@ interfaceProperties::interfaceProperties deltaN_ ( "deltaN", - 1e-8/pow(average(gamma.mesh().V()), 1.0/3.0) + 1e-8/pow(average(alpha1.mesh().V()), 1.0/3.0) ), - gamma_(gamma), + alpha1_(alpha1), U_(U), nHatf_ @@ -180,10 +167,10 @@ interfaceProperties::interfaceProperties IOobject ( "nHatf", - gamma_.time().timeName(), - gamma_.mesh() + alpha1_.time().timeName(), + alpha1_.mesh() ), - gamma_.mesh(), + alpha1_.mesh(), dimensionedScalar("nHatf", dimArea, 0.0) ), @@ -192,10 +179,10 @@ interfaceProperties::interfaceProperties IOobject ( "K", - gamma_.time().timeName(), - gamma_.mesh() + alpha1_.time().timeName(), + alpha1_.mesh() ), - gamma_.mesh(), + alpha1_.mesh(), dimensionedScalar("K", dimless/dimLength, 0.0) ) { @@ -203,8 +190,4 @@ interfaceProperties::interfaceProperties } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/transportModels/interfaceProperties/interfaceProperties.H b/src/transportModels/interfaceProperties/interfaceProperties.H index 33294b1319..e47345f59d 100644 --- a/src/transportModels/interfaceProperties/interfaceProperties.H +++ b/src/transportModels/interfaceProperties/interfaceProperties.H @@ -29,7 +29,7 @@ Description Contains the interface properties. Properties to aid interFoam: - -# Correct the gamma boundary condition for dynamic contact angle. + -# Correct the alpha boundary condition for dynamic contact angle. -# Calculate interface curvature. SourceFiles @@ -61,7 +61,7 @@ class interfaceProperties const dictionary& transportPropertiesDict_; //- Compression coefficient - scalar cGamma_; + scalar cAlpha_; //- Surface tension dimensionedScalar sigma_; @@ -69,7 +69,7 @@ class interfaceProperties //- Stabilisation for normalisation of the interface normal const dimensionedScalar deltaN_; - const volScalarField& gamma_; + const volScalarField& alpha1_; const volVectorField& U_; surfaceScalarField nHatf_; volScalarField K_; @@ -104,7 +104,7 @@ public: //- Construct from volume fraction field gamma and IOdictionary interfaceProperties ( - const volScalarField& gamma, + const volScalarField& alpha1, const volVectorField& U, const IOdictionary& ); @@ -112,9 +112,9 @@ public: // Member Functions - scalar cGamma() const + scalar cAlpha() const { - return cGamma_; + return cAlpha_; } const dimensionedScalar& deltaN() const diff --git a/src/turbulenceModels/Allwmake b/src/turbulenceModels/Allwmake index b4633551ac..4c49ec6163 100755 --- a/src/turbulenceModels/Allwmake +++ b/src/turbulenceModels/Allwmake @@ -2,7 +2,8 @@ cd ${0%/*} || exit 1 # run from this directory set -x -( cd RAS && ./Allwmake ) -( cd LES && ./Allwmake ) +(cd LES && ./Allwmake ) +(cd incompressible && ./Allwmake ) +(cd compressible && ./Allwmake ) # ----------------------------------------------------------------- end-of-file diff --git a/src/turbulenceModels/LES/Allwmake b/src/turbulenceModels/LES/Allwmake index a2521d21f0..a80c71ab57 100755 --- a/src/turbulenceModels/LES/Allwmake +++ b/src/turbulenceModels/LES/Allwmake @@ -2,11 +2,9 @@ cd ${0%/*} || exit 1 # run from this directory set -x -wmakeLnInclude -f incompressible +wmakeLnInclude -f ../incompressible/LES wmake libso LESfilters wmake libso LESdeltas -wmake libso incompressible -wmake libso compressible # ----------------------------------------------------------------- end-of-file diff --git a/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.H b/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.H index fa13c45c32..9aed207d23 100644 --- a/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.H +++ b/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.H @@ -113,10 +113,9 @@ public: ); - // Destructor - - virtual ~LESdelta() - {} + //- Destructor + virtual ~LESdelta() + {} // Member Functions diff --git a/src/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.H b/src/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.H index 00c47f9eb7..a1f26f8ead 100644 --- a/src/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.H +++ b/src/turbulenceModels/LES/LESdeltas/PrandtlDelta/PrandtlDelta.H @@ -85,19 +85,18 @@ public: ); - // Destructor - - ~PrandtlDelta() - {} + //- Destructor + virtual ~PrandtlDelta() + {} // Member Functions //- Read the LESdelta dictionary - void read(const dictionary&); + virtual void read(const dictionary&); // Correct values - void correct(); + virtual void correct(); }; diff --git a/src/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.H b/src/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.H index 28d9362265..3277e77032 100644 --- a/src/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.H +++ b/src/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.H @@ -83,19 +83,18 @@ public: ); - // Destructor - - ~cubeRootVolDelta() - {} + //- Destructor + virtual ~cubeRootVolDelta() + {} // Member Functions //- Read the LESdelta dictionary - void read(const dictionary&); + virtual void read(const dictionary&); // Correct values - void correct(); + virtual void correct(); }; diff --git a/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H b/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H index 45266f583b..119d41f8f0 100644 --- a/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H +++ b/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H @@ -26,8 +26,8 @@ Class Foam::smoothDelta Description - Smoothed delta which takes a given simple geometric delta and applies - smoothing to it such that the ratio of deltas between two cells is no + Smoothed delta which takes a given simple geometric delta and applies + smoothing to it such that the ratio of deltas between two cells is no larger than a specified amount, typically 1.15. SourceFiles @@ -233,19 +233,18 @@ public: ); - // Destructor - - ~smoothDelta() - {} + //- Destructor + virtual ~smoothDelta() + {} // Member Functions //- Read the LESdelta dictionary - void read(const dictionary&); + virtual void read(const dictionary&); // Correct values - void correct(); + virtual void correct(); }; diff --git a/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.H b/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.H index 714605fd96..8d53e8ccd5 100644 --- a/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.H +++ b/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.H @@ -107,10 +107,9 @@ public: ); - // Destructor - - virtual ~LESfilter() - {} + //- Destructor + virtual ~LESfilter() + {} // Member Functions diff --git a/src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.H b/src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.H index 729eeb34b2..45a4e70edf 100644 --- a/src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.H +++ b/src/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.H @@ -86,27 +86,29 @@ public: anisotropicFilter(const fvMesh& mesh, const dictionary&); - // Destructor - - ~anisotropicFilter() - {} + //- Destructor + virtual ~anisotropicFilter() + {} // Member Functions //- Read the LESfilter dictionary - void read(const dictionary&); + virtual void read(const dictionary&); // Member Operators - tmp operator()(const tmp&) const; - tmp operator()(const tmp&) const; - tmp operator() + virtual tmp operator()(const tmp&) const; + + virtual tmp operator()(const tmp&) const; + + virtual tmp operator() ( const tmp& ) const; - tmp operator()(const tmp&) const; + + virtual tmp operator()(const tmp&) const; }; diff --git a/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.H b/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.H index 158f3ea320..3e5760604b 100644 --- a/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.H +++ b/src/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.H @@ -87,27 +87,29 @@ public: laplaceFilter(const fvMesh& mesh, const dictionary&); - // Destructor - - ~laplaceFilter() - {} + //- Destructor + virtual ~laplaceFilter() + {} // Member Functions //- Read the LESfilter dictionary - void read(const dictionary&); + virtual void read(const dictionary&); // Member Operators - tmp operator()(const tmp&) const; - tmp operator()(const tmp&) const; - tmp operator() + virtual tmp operator()(const tmp&) const; + + virtual tmp operator()(const tmp&) const; + + virtual tmp operator() ( const tmp& ) const; - tmp operator()(const tmp&) const; + + virtual tmp operator()(const tmp&) const; }; diff --git a/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.H b/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.H index 6cf7729e1e..4e4c5e0f47 100644 --- a/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.H +++ b/src/turbulenceModels/LES/LESfilters/simpleFilter/simpleFilter.H @@ -76,27 +76,29 @@ public: simpleFilter(const fvMesh& mesh, const dictionary&); - // Destructor - - ~simpleFilter() - {} + //- Destructor + virtual ~simpleFilter() + {} // Member Functions //- Read the LESfilter dictionary - void read(const dictionary&); + virtual void read(const dictionary&); // Member Operators - tmp operator()(const tmp&) const; - tmp operator()(const tmp&) const; - tmp operator() + virtual tmp operator()(const tmp&) const; + + virtual tmp operator()(const tmp&) const; + + virtual tmp operator() ( const tmp& ) const; - tmp operator()(const tmp&) const; + + virtual tmp operator()(const tmp&) const; }; diff --git a/src/turbulenceModels/LES/compressible/DeardorffDiffStress/DeardorffDiffStress.C b/src/turbulenceModels/LES/compressible/DeardorffDiffStress/DeardorffDiffStress.C deleted file mode 100644 index 28f31e7164..0000000000 --- a/src/turbulenceModels/LES/compressible/DeardorffDiffStress/DeardorffDiffStress.C +++ /dev/null @@ -1,150 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "DeardorffDiffStress.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(DeardorffDiffStress, 0); -addToRunTimeSelectionTable(LESModel, DeardorffDiffStress, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -// from components -DeardorffDiffStress::DeardorffDiffStress -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel -) -: - LESModel(typeName, rho, U, phi, thermoPhysicalModel), - GenSGSStress(rho, U, phi, thermoPhysicalModel), - - ck_ - ( - dimensioned::lookupOrAddToDict - ( - "ck", - coeffDict(), - 0.094 - ) - ), - cm_ - ( - dimensioned::lookupOrAddToDict - ( - "cm", - coeffDict(), - 4.13 - ) - ) -{ - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void DeardorffDiffStress::correct(const tmp& tgradU) -{ - const volTensorField& gradU = tgradU(); - - GenSGSStress::correct(gradU); - - volSymmTensorField D = symm(gradU); - - volSymmTensorField P = -rho()*twoSymm(B_ & gradU); - - volScalarField K = 0.5*tr(B_); - - solve - ( - fvm::ddt(rho(), B_) - + fvm::div(phi(), B_) - - fvm::laplacian(DBEff(), B_) - + fvm::Sp(cm_*rho()*sqrt(K)/delta(), B_) - == - P - + 0.8*rho()*K*D - - (2*ce_ - 0.667*cm_)*I*rho()*epsilon() - ); - - - // Bounding the component kinetic energies - - forAll(B_, celli) - { - B_[celli].component(symmTensor::XX) = - max(B_[celli].component(symmTensor::XX), 1.0e-10); - B_[celli].component(symmTensor::YY) = - max(B_[celli].component(symmTensor::YY), 1.0e-10); - B_[celli].component(symmTensor::ZZ) = - max(B_[celli].component(symmTensor::ZZ), 1.0e-10); - } - - K = 0.5*tr(B_); - bound(K, k0()); - - muSgs_ = ck_*rho()*sqrt(K)*delta(); - muSgs_.correctBoundaryConditions(); -} - - -bool DeardorffDiffStress::read() -{ - if (GenSGSStress::read()) - { - ck_.readIfPresent(coeffDict()); - cm_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/compressible/DeardorffDiffStress/DeardorffDiffStress.H b/src/turbulenceModels/LES/compressible/DeardorffDiffStress/DeardorffDiffStress.H deleted file mode 100644 index bfbcb2a41b..0000000000 --- a/src/turbulenceModels/LES/compressible/DeardorffDiffStress/DeardorffDiffStress.H +++ /dev/null @@ -1,141 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::compressible::LESModels::DeardorffDiffStress - -Description - Differential SGS Stress Equation Model for compressible flows - - The DSEM uses a model version of the full balance equation for the SGS - stress tensor to simulate the behaviour of B. - Thus, - @verbatim - d/dt(rho*B) + div(rho*U*B) - div(muSgs*grad(B)) - = - P - c1*rho*epsilon/k*B - 0.667*(1 - c1)*rho*epsilon*I - c2*(P - 0.333*trP*I) - - where - - k = 0.5*trB, - epsilon = ce*k^3/2/delta, - epsilon/k = ce*k^1/2/delta - P = -rho*(B'L + L'B) - muSgs = ck*rho*sqrt(k)*delta - muEff = muSgs + mu - @endverbatim - -SourceFiles - DeardorffDiffStress.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleDeardorffDiffStress_H -#define compressibleDeardorffDiffStress_H - -#include "GenSGSStress.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class DeardorffDiffStress Declaration -\*---------------------------------------------------------------------------*/ - -class DeardorffDiffStress -: - public GenSGSStress -{ - // Private data - - dimensionedScalar ck_; - dimensionedScalar cm_; - - - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - DeardorffDiffStress(const DeardorffDiffStress&); - DeardorffDiffStress& operator=(const DeardorffDiffStress&); - - -public: - - //- Runtime type information - TypeName("DeardorffDiffStress"); - - // Constructors - - //- Constructor from components - DeardorffDiffStress - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel - ); - - - // Destructor - - ~DeardorffDiffStress() - {} - - - // Member Functions - - //- Return the effective diffusivity for B - tmp DBEff() const - { - return tmp - ( - new volScalarField("DBEff", muSgs_ + mu()) - ); - } - - //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); - - //- Read turbulenceProperties dictionary - bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/compressible/GenEddyVisc/GenEddyVisc.C b/src/turbulenceModels/LES/compressible/GenEddyVisc/GenEddyVisc.C deleted file mode 100644 index c3843bb8f1..0000000000 --- a/src/turbulenceModels/LES/compressible/GenEddyVisc/GenEddyVisc.C +++ /dev/null @@ -1,144 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "GenEddyVisc.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -// from components -GenEddyVisc::GenEddyVisc -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel -) -: - LESModel - ( - word("GenEddyVisc"), rho, U, phi, thermoPhysicalModel - ), - - ce_ - ( - dimensioned::lookupOrAddToDict - ( - "ce", - coeffDict(), - 1.048 - ) - ), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - muSgs_ - ( - IOobject - ( - "muSgs", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ) -{ -// printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp GenEddyVisc::B() const -{ - return ((2.0/3.0)*I)*k_ - (muSgs_/rho())*dev(twoSymm(fvc::grad(U()))); -} - - -tmp GenEddyVisc::devRhoBeff() const -{ - return -muEff()*dev(twoSymm(fvc::grad(U()))); -} - - -tmp GenEddyVisc::divDevRhoBeff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(fvc::grad(U)().T())) - ); -} - - -void GenEddyVisc::correct(const tmp& gradU) -{ - LESModel::correct(gradU); -} - - -bool GenEddyVisc::read() -{ - if (LESModel::read()) - { - ce_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/compressible/GenEddyVisc/GenEddyVisc.H b/src/turbulenceModels/LES/compressible/GenEddyVisc/GenEddyVisc.H deleted file mode 100644 index cd501e9f68..0000000000 --- a/src/turbulenceModels/LES/compressible/GenEddyVisc/GenEddyVisc.H +++ /dev/null @@ -1,155 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::compressible::LESModels::GenEddyVisc - -Description - General base class for all compressible models that can be implemented as - an eddy viscosity, i.e. algebraic and one-equation models. - - Contains fields for k (SGS turbulent kinetic energy), gamma - (modelled viscosity) and epsilon (SGS dissipation). - -SourceFiles - GenEddyVisc.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleGenEddyVisc_H -#define compressibleGenEddyVisc_H - -#include "LESModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class GenEddyVisc Declaration -\*---------------------------------------------------------------------------*/ - -class GenEddyVisc -: - virtual public LESModel -{ - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - GenEddyVisc(const GenEddyVisc&); - GenEddyVisc& operator=(const GenEddyVisc&); - - -protected: - - dimensionedScalar ce_; - - volScalarField k_; - volScalarField muSgs_; - - -public: - - // Constructors - - //- Construct from components - GenEddyVisc - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel - ); - - - // Destructor - - virtual ~GenEddyVisc() - {} - - - // Member Functions - - //- Return SGS kinetic energy - virtual tmp k() const - { - return k_; - } - - //- Return sub-grid disipation rate - virtual tmp epsilon() const - { - return ce_*k_*sqrt(k_)/delta(); - } - - //- Return viscosity - virtual tmp muSgs() const - { - return muSgs_; - } - - //- Return thermal conductivity - virtual tmp alphaEff() const - { - return tmp - ( - new volScalarField("alphaEff", muSgs_ + alpha()) - ); - } - - //- Return the sub-grid stress tensor. - virtual tmp B() const; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp devRhoBeff() const; - - //- Returns div(rho*dev(B)). - // This is the additional term due to the filtering of the NSE. - virtual tmp divDevRhoBeff(volVectorField& U) const; - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp& gradU); - - //- Read turbulenceProperties dictionary - bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/compressible/GenSGSStress/GenSGSStress.C b/src/turbulenceModels/LES/compressible/GenSGSStress/GenSGSStress.C deleted file mode 100644 index 7ef8ebee76..0000000000 --- a/src/turbulenceModels/LES/compressible/GenSGSStress/GenSGSStress.C +++ /dev/null @@ -1,159 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "GenSGSStress.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -// from components -GenSGSStress::GenSGSStress -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel -) -: - LESModel - ( - word("GenSGSStress"), - rho, - U, - phi, - thermoPhysicalModel - ), - - ce_ - ( - dimensioned::lookupOrAddToDict - ( - "ce", - coeffDict(), - 1.048 - ) - ), - - B_ - ( - IOobject - ( - "B", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - muSgs_ - ( - IOobject - ( - "muSgs", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ) -{ -// printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp GenSGSStress::devRhoBeff() const -{ - return tmp - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - rho()*B_ - mu()*dev(twoSymm(fvc::grad(U()))) - ) - ); -} - - -tmp GenSGSStress::divDevRhoBeff(volVectorField& U) const -{ - return - ( - fvc::div(rho()*B_ + 0.05*muSgs_*fvc::grad(U)) - + fvc::laplacian(0.95*muSgs_, U, "laplacian(muEff,U)") - - fvm::laplacian(muEff(), U) - - fvc::div(mu()*dev2(fvc::grad(U)().T())) - ); -} - - -void GenSGSStress::correct(const tmp& gradU) -{ - LESModel::correct(gradU); -} - - -bool GenSGSStress::read() -{ - if (LESModel::read()) - { - ce_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/compressible/GenSGSStress/GenSGSStress.H b/src/turbulenceModels/LES/compressible/GenSGSStress/GenSGSStress.H deleted file mode 100644 index c071a7a01c..0000000000 --- a/src/turbulenceModels/LES/compressible/GenSGSStress/GenSGSStress.H +++ /dev/null @@ -1,160 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::compressible::LESModels::GenSGSStress - -Description - General base class for all compressible models that directly - solve for the SGS stress tensor B. - - Contains tensor fields B (the SGS stress tensor) as well as scalar - fields for k (SGS turbulent energy) gamma (SGS viscosity) and epsilon - (SGS dissipation). - -SourceFiles - GenSGSStress.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleGenSGSStress_H -#define compressibleGenSGSStress_H - -#include "LESModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class GenSGSStress Declaration -\*---------------------------------------------------------------------------*/ - -class GenSGSStress -: - virtual public LESModel -{ - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - GenSGSStress(const GenSGSStress&); - GenSGSStress& operator=(const GenSGSStress&); - - -protected: - - dimensionedScalar ce_; - - volSymmTensorField B_; - volScalarField muSgs_; - - -public: - - // Constructors - - //- Constructor from components - GenSGSStress - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel - ); - - - // Destructor - - virtual ~GenSGSStress() - {} - - - // Member Functions - - //- Return the SGS turbulent kinetic energy. - virtual tmp k() const - { - return 0.5*tr(B_); - } - - //- Return the SGS turbulent dissipation. - virtual tmp epsilon() const - { - volScalarField K = k(); - return ce_*K*sqrt(K)/delta(); - } - - //- Return the SGS viscosity. - virtual tmp muSgs() const - { - return muSgs_; - } - - //- Return thermal conductivity - virtual tmp alphaEff() const - { - return tmp - ( - new volScalarField("alphaEff", muSgs_ + alpha()) - ); - } - - //- Return the sub-grid stress tensor. - virtual tmp B() const - { - return B_; - } - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp devRhoBeff() const; - - //- Returns divergence of B : i.e. the additional term in the - // filtered NSE. - virtual tmp divDevRhoBeff(volVectorField& U) const; - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp& gradU); - - //- Read turbulenceProperties dictionary - bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/compressible/LESModel/LESModel.C b/src/turbulenceModels/LES/compressible/LESModel/LESModel.C deleted file mode 100644 index 8591c4c7b4..0000000000 --- a/src/turbulenceModels/LES/compressible/LESModel/LESModel.C +++ /dev/null @@ -1,133 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "LESModel.H" -#include "wallDist.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(LESModel, 0); -defineRunTimeSelectionTable(LESModel, dictionary); - -// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // - -void LESModel::printCoeffs() -{ - if (printCoeffs_) - { - Info<< type() << "Coeffs" << coeffDict_ << endl; - } -} - - -// * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * * // - -LESModel::LESModel -( - const word& type, - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel -) -: - IOdictionary - ( - IOobject - ( - "LESProperties", - U.time().constant(), - U.db(), - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ), - - runTime_(U.time()), - mesh_(U.mesh()), - - rho_(rho), - U_(U), - phi_(phi), - thermoPhysicalModel_(thermoPhysicalModel), - - printCoeffs_(lookupOrDefault("printCoeffs", false)), - coeffDict_(subDict(type + "Coeffs")), - - k0_("k0", dimVelocity*dimVelocity, SMALL), - - delta_(LESdelta::New("delta", U.mesh(), *this)) -{ - readIfPresent("k0", k0_); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void LESModel::correct(const tmp&) -{ - delta_().correct(); -} - - -void LESModel::correct() -{ - correct(fvc::grad(U_)); -} - - -bool LESModel::read() -{ - if (regIOobject::read()) - { - coeffDict_ = subDict(type() + "Coeffs"); - - delta_().read(*this); - - readIfPresent("k0", k0_); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/compressible/LESModel/LESModel.H b/src/turbulenceModels/LES/compressible/LESModel/LESModel.H deleted file mode 100644 index ecef2d8f77..0000000000 --- a/src/turbulenceModels/LES/compressible/LESModel/LESModel.H +++ /dev/null @@ -1,293 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Namespace - Foam::compressible::LESModels - -Description - Namespace for compressible LES models. - - -Class - Foam::compressible::LESModel - -Description - Class for all compressible flow LES SGS models. - - This class defines the basic interface for a compressible flow SGS model, - and encapsulates data of value to all possible models. In particular - this includes references to all the dependent fields (rho, U, phi), - the physical viscosity mu, and the turbulenceProperties dictionary - which contains the model selection and model coefficients. - -SourceFiles - LESModel.C - newLESModel.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleLESModel_H -#define compressibleLESModel_H - -#include "LESdelta.H" -#include "fvm.H" -#include "fvc.H" -#include "fvMatrices.H" -#include "basicThermo.H" -#include "bound.H" -#include "autoPtr.H" -#include "runTimeSelectionTables.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -/*---------------------------------------------------------------------------*\ - Class LESModel Declaration -\*---------------------------------------------------------------------------*/ - -class LESModel -: - public IOdictionary -{ - -protected: - - // Protected data - - const Time& runTime_; - const fvMesh& mesh_; - - -private: - - // Private data - - const volScalarField& rho_; - const volVectorField& U_; - const surfaceScalarField& phi_; - - const basicThermo& thermoPhysicalModel_; - - Switch printCoeffs_; - dictionary coeffDict_; - - dimensionedScalar k0_; - - autoPtr delta_; - - - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - LESModel(const LESModel&); - LESModel& operator=(const LESModel&); - - -protected: - - // Protected Member Functions - - //- Print model coefficients - virtual void printCoeffs(); - - -public: - - //- Runtime type information - TypeName("LESModel"); - - - // Declare run-time constructor selection table - - declareRunTimeSelectionTable - ( - autoPtr, - LESModel, - dictionary, - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel - ), - (rho, U, phi, thermoPhysicalModel) - ); - - - // Constructors - - //- Construct from components - LESModel - ( - const word& type, - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel - ); - - - // Selectors - - //- Return a reference to the selected LES model - static autoPtr New - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel - ); - - - // Destructor - - virtual ~LESModel() - {} - - - // Member Functions - - // Access - - //- Access function to the density field - inline const volScalarField& rho() const - { - return rho_; - } - - //- Access function to velocity field - inline const volVectorField& U() const - { - return U_; - } - - //- Access function to flux field - inline const surfaceScalarField& phi() const - { - return phi_; - } - - //- Access function to the thermophysical properties model - inline const basicThermo& thermo() const - { - return thermoPhysicalModel_; - } - - //- Access the dictionary which provides info. about choice of - // models, and all related data (particularly model coefficients). - inline dictionary& coeffDict() - { - return coeffDict_; - } - - //- Access function to filter width - inline const volScalarField& delta() const - { - return delta_(); - } - - //- Return the value of k0 which k is not allowed to be less than - const dimensionedScalar& k0() const - { - return k0_; - } - - //- Allow k0 to be changed - dimensionedScalar& k0() - { - return k0_; - } - - //- Access function to laminar viscosity - tmp mu() const - { - return thermoPhysicalModel_.mu(); - } - - //- Access function to laminar thermal conductivity - tmp alpha() const - { - return thermoPhysicalModel_.alpha(); - } - - - //- Return the SGS turbulent kinetic energy. - virtual tmp k() const = 0; - - //- Return the SGS turbulent dissipation. - virtual tmp epsilon() const = 0; - - //- Return the effective viscosity - virtual tmp muSgs() const = 0; - - //- Return the effective viscosity - virtual tmp muEff() const - { - return tmp - ( - new volScalarField("muEff", muSgs() + mu()) - ); - } - - //- Return the SGS thermal conductivity. - virtual tmp alphaEff() const = 0; - - //- Return the sub-grid stress tensor. - virtual tmp B() const = 0; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp devRhoBeff() const = 0; - - //- Returns div(rho*dev(B)). - // This is the additional term due to the filtering of the NSE. - virtual tmp divDevRhoBeff(volVectorField& U) const = 0; - - //- Correct Eddy-Viscosity and related properties. - // This calls correct(const tmp& gradU) by supplying - // gradU calculated locally. - void correct(); - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp& gradU); - - //- Read turbulenceProperties dictionary - virtual bool read() = 0; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/compressible/LESModel/newLESModel.C b/src/turbulenceModels/LES/compressible/LESModel/newLESModel.C deleted file mode 100644 index b411074b17..0000000000 --- a/src/turbulenceModels/LES/compressible/LESModel/newLESModel.C +++ /dev/null @@ -1,94 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "LESModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -autoPtr LESModel::New -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel -) -{ - word LESModelTypeName; - - // Enclose the creation of the turbulencePropertiesDict to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary turbulencePropertiesDict - ( - IOobject - ( - "LESProperties", - U.time().constant(), - U.db(), - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ); - - turbulencePropertiesDict.lookup("LESModel") >> LESModelTypeName; - } - - Info<< "Selecting LES turbulence model " << LESModelTypeName << endl; - - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(LESModelTypeName); - - if (cstrIter == dictionaryConstructorTablePtr_->end()) - { - FatalErrorIn - ( - "LESModel::New(const volVectorField& U, const " - "surfaceScalarField& phi, const basicThermo&)" - ) << "Unknown LESModel type " << LESModelTypeName - << endl << endl - << "Valid LESModel types are :" << endl - << dictionaryConstructorTablePtr_->toc() - << exit(FatalError); - } - - return autoPtr(cstrIter()(rho, U, phi, thermoPhysicalModel)); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/compressible/Make/files b/src/turbulenceModels/LES/compressible/Make/files deleted file mode 100644 index dc31f55cae..0000000000 --- a/src/turbulenceModels/LES/compressible/Make/files +++ /dev/null @@ -1,19 +0,0 @@ -LESModel/LESModel.C -LESModel/newLESModel.C -GenEddyVisc/GenEddyVisc.C -GenSGSStress/GenSGSStress.C - -Smagorinsky/Smagorinsky.C -oneEqEddy/oneEqEddy.C -lowReOneEqEddy/lowReOneEqEddy.C -dynOneEqEddy/dynOneEqEddy.C -DeardorffDiffStress/DeardorffDiffStress.C -SpalartAllmaras/SpalartAllmaras.C - -/* Wall functions */ -wallFunctions=derivedFvPatchFields/wallFunctions - -muSgsWallFunctions=$(wallFunctions)/muSgsWallFunctions -$(muSgsWallFunctions)/muSgsSpalartAllmarasWallFunction/muSgsSpalartAllmarasWallFunctionFvPatchScalarField.C - -LIB = $(FOAM_LIBBIN)/libcompressibleLESModels diff --git a/src/turbulenceModels/LES/compressible/Make/options b/src/turbulenceModels/LES/compressible/Make/options deleted file mode 100644 index c148a902e0..0000000000 --- a/src/turbulenceModels/LES/compressible/Make/options +++ /dev/null @@ -1,11 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I../LESdeltas/lnInclude \ - -I../LESfilters/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude - -LIB_LIBS = \ - -lLESdeltas \ - -lLESfilters \ - -lmeshTools diff --git a/src/turbulenceModels/LES/compressible/Smagorinsky/Smagorinsky.C b/src/turbulenceModels/LES/compressible/Smagorinsky/Smagorinsky.C deleted file mode 100644 index 547fd60f5e..0000000000 --- a/src/turbulenceModels/LES/compressible/Smagorinsky/Smagorinsky.C +++ /dev/null @@ -1,112 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "Smagorinsky.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(Smagorinsky, 0); -addToRunTimeSelectionTable(LESModel, Smagorinsky, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -// from components -Smagorinsky::Smagorinsky -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel -) -: - LESModel(typeName, rho, U, phi, thermoPhysicalModel), - GenEddyVisc(rho, U, phi, thermoPhysicalModel), - - ck_ - ( - dimensioned::lookupOrAddToDict - ( - "ck", - coeffDict(), - 0.02 - ) - ) -{ - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Smagorinsky::correct(const tmp& gradU) -{ - GenEddyVisc::correct(gradU); - - volSymmTensorField D = symm(gradU); - - volScalarField a = ce_/delta(); - volScalarField b = (2.0/3.0)*tr(D); - volScalarField c = 2*ck_*delta()*(dev(D) && D); - - k_ = sqr((-b + sqrt(sqr(b) + 4*a*c))/(2*a)); - - muSgs_ = ck_*rho()*delta()*sqrt(k_); - muSgs_.correctBoundaryConditions(); -} - - -bool Smagorinsky::read() -{ - if (GenEddyVisc::read()) - { - ck_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/compressible/Smagorinsky/Smagorinsky.H b/src/turbulenceModels/LES/compressible/Smagorinsky/Smagorinsky.H deleted file mode 100644 index e5d786f94a..0000000000 --- a/src/turbulenceModels/LES/compressible/Smagorinsky/Smagorinsky.H +++ /dev/null @@ -1,127 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::compressible::LESModels::Smagorinsky - -Description - The choric Smagorinsky Model for compressible flows. - - Algebraic eddy viscosity SGS model founded on the assumption that - local equilibrium prevails. - Thus, - @verbatim - - B = 2/3*k*I - 2*nuSgs*dev(D) - - where - - D = symm(grad(U)); - k from rho*D:B + ce*rho*k^3/2/delta = 0 - muSgs = ck*rho*sqrt(k)*delta - @endverbatim - -SourceFiles - Smagorinsky.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleSmagorinsky_H -#define compressibleSmagorinsky_H - -#include "GenEddyVisc.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class Smagorinsky Declaration -\*---------------------------------------------------------------------------*/ - -class Smagorinsky -: - public GenEddyVisc -{ - // Private data - - dimensionedScalar ck_; - - - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - Smagorinsky(const Smagorinsky&); - Smagorinsky& operator=(const Smagorinsky&); - - -public: - - //- Runtime type information - TypeName("Smagorinsky"); - - // Constructors - - //- Construct from components - Smagorinsky - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel - ); - - - // Destructor - - ~Smagorinsky() - {} - - - // Member Functions - - //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); - - //- Read turbulenceProperties dictionary - bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/compressible/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/LES/compressible/SpalartAllmaras/SpalartAllmaras.C deleted file mode 100644 index 568598a065..0000000000 --- a/src/turbulenceModels/LES/compressible/SpalartAllmaras/SpalartAllmaras.C +++ /dev/null @@ -1,329 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "SpalartAllmaras.H" -#include "addToRunTimeSelectionTable.H" -#include "wallDist.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(SpalartAllmaras, 0); -addToRunTimeSelectionTable(LESModel, SpalartAllmaras, dictionary); - - -// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // - -tmp SpalartAllmaras::fv1() const -{ - volScalarField chi3 = pow3(nuTilda_/(mu()/rho())); - return chi3/(chi3 + pow3(Cv1_)); -} - - -tmp SpalartAllmaras::fv2() const -{ - volScalarField chi = nuTilda_/(mu()/rho()); - //return scalar(1) - chi/(scalar(1) + chi*fv1()); - return 1.0/pow3(scalar(1) + chi/Cv2_); -} - - -tmp SpalartAllmaras::fv3() const -{ - volScalarField chi = nuTilda_/(mu()/rho()); - volScalarField chiByCv2 = (1/Cv2_)*chi; - - return - (scalar(1) + chi*fv1()) - *(1/Cv2_) - *(3*(scalar(1) + chiByCv2) + sqr(chiByCv2)) - /pow3(scalar(1) + chiByCv2); -} - - -tmp SpalartAllmaras::fw(const volScalarField& Stilda) const -{ - volScalarField r = min - ( - nuTilda_ - /( - max(Stilda, dimensionedScalar("SMALL", Stilda.dimensions(), SMALL)) - *sqr(kappa_*dTilda_) - ), - scalar(10.0) - ); - r.boundaryField() == 0.0; - - volScalarField g = r + Cw2_*(pow6(r) - r); - - return g*pow((1.0 + pow6(Cw3_))/(pow6(g) + pow6(Cw3_)), 1.0/6.0); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -SpalartAllmaras::SpalartAllmaras -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel -) -: - LESModel(typeName, rho, U, phi, thermoPhysicalModel), - - alphaNut_ - ( - dimensioned::lookupOrAddToDict - ( - "alphaNut", - coeffDict(), - 1.5 - ) - ), - - Cb1_ - ( - dimensioned::lookupOrAddToDict - ( - "Cb1", - coeffDict(), - 0.1355 - ) - ), - Cb2_ - ( - dimensioned::lookupOrAddToDict - ( - "Cb2", - coeffDict(), - 0.622 - ) - ), - Cv1_ - ( - dimensioned::lookupOrAddToDict - ( - "Cv1", - coeffDict(), - 7.1 - ) - ), - Cv2_ - ( - dimensioned::lookupOrAddToDict - ( - "Cv2", - coeffDict(), - 5.0 - ) - ), - CDES_ - ( - dimensioned::lookupOrAddToDict - ( - "CDES", - coeffDict(), - 0.65 - ) - ), - ck_ - ( - dimensioned::lookupOrAddToDict - ( - "ck", - coeffDict(), - 0.07 - ) - ), - kappa_ - ( - dimensioned::lookupOrAddToDict - ( - "kappa", - *this, - 0.4187 - ) - ), - Cw1_(Cb1_/sqr(kappa_) + alphaNut_*(1.0 + Cb2_)), - Cw2_ - ( - dimensioned::lookupOrAddToDict - ( - "Cw2", - coeffDict(), - 0.3 - ) - ), - Cw3_ - ( - dimensioned::lookupOrAddToDict - ( - "Cw3", - coeffDict(), - 2.0 - ) - ), - - nuTilda_ - ( - IOobject - ( - "nuTilda", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - dTilda_(min(CDES_*delta(), wallDist(mesh_).y())), - muSgs_ - ( - IOobject - ( - "muSgs", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ) - -{ - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp SpalartAllmaras::B() const -{ - return ((2.0/3.0)*I)*k() - (muSgs_/rho())*dev(twoSymm(fvc::grad(U()))); -} - - -tmp SpalartAllmaras::devRhoBeff() const -{ - return -muEff()*dev(twoSymm(fvc::grad(U()))); -} - - -tmp SpalartAllmaras::epsilon() const -{ - return 2*muEff()/rho()*magSqr(symm(fvc::grad(U()))); -} - - -tmp SpalartAllmaras::divDevRhoBeff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(fvc::grad(U)().T())) - ); -} - - -void SpalartAllmaras::correct(const tmp& tgradU) -{ - const volTensorField& gradU = tgradU(); - LESModel::correct(gradU); - - if (mesh_.changing()) - { - dTilda_ = min(CDES_*delta(), wallDist(mesh_).y()); - } - - volScalarField Stilda = - fv3()*::sqrt(2.0)*mag(skew(gradU)) + fv2()*nuTilda_/sqr(kappa_*dTilda_); - - solve - ( - fvm::ddt(rho(), nuTilda_) - + fvm::div(phi(), nuTilda_) - - fvm::laplacian - ( - alphaNut_*(nuTilda_*rho() + mu()), - nuTilda_, - "laplacian(DnuTildaEff,nuTilda)" - ) - - alphaNut_*rho()*Cb2_*magSqr(fvc::grad(nuTilda_)) - == - rho()*Cb1_*Stilda*nuTilda_ - - fvm::Sp(rho()*Cw1_*fw(Stilda)*nuTilda_/sqr(dTilda_), nuTilda_) - ); - - bound(nuTilda_, dimensionedScalar("zero", nuTilda_.dimensions(), 0.0)); - - nuTilda_.correctBoundaryConditions(); - muSgs_.internalField() = rho()*fv1()*nuTilda_.internalField(); - muSgs_.correctBoundaryConditions(); -} - - -bool SpalartAllmaras::read() -{ - if (LESModel::read()) - { - alphaNut_.readIfPresent(coeffDict()); - Cb1_.readIfPresent(coeffDict()); - Cb2_.readIfPresent(coeffDict()); - Cw1_ = Cb1_/sqr(kappa_) + alphaNut_*(1.0 + Cb2_); - Cw2_.readIfPresent(coeffDict()); - Cw3_.readIfPresent(coeffDict()); - Cv1_.readIfPresent(coeffDict()); - Cv2_.readIfPresent(coeffDict()); - CDES_.readIfPresent(coeffDict()); - ck_.readIfPresent(coeffDict()); - kappa_.readIfPresent(*this); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/compressible/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/LES/compressible/SpalartAllmaras/SpalartAllmaras.H deleted file mode 100644 index 67a1d7b8a8..0000000000 --- a/src/turbulenceModels/LES/compressible/SpalartAllmaras/SpalartAllmaras.H +++ /dev/null @@ -1,175 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::compressible::LESModels::SpalartAllmaras - -Description - SpalartAllmaras for compressible flows - -SourceFiles - SpalartAllmaras.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleSpalartAllmaras_H -#define compressibleSpalartAllmaras_H - -#include "LESModel.H" -#include "volFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class SpalartAllmaras Declaration -\*---------------------------------------------------------------------------*/ - -class SpalartAllmaras -: - public LESModel -{ - // Private data - - dimensionedScalar alphaNut_; - - dimensionedScalar Cb1_; - dimensionedScalar Cb2_; - dimensionedScalar Cv1_; - dimensionedScalar Cv2_; - dimensionedScalar CDES_; - dimensionedScalar ck_; - dimensionedScalar kappa_; - dimensionedScalar Cw1_; - dimensionedScalar Cw2_; - dimensionedScalar Cw3_; - - - // Private member functions - - tmp fv1() const; - tmp fv2() const; - tmp fv3() const; - tmp fw(const volScalarField& Stilda) const; - - // Disallow default bitwise copy construct and assignment - SpalartAllmaras(const SpalartAllmaras&); - SpalartAllmaras& operator=(const SpalartAllmaras&); - - volScalarField nuTilda_; - volScalarField dTilda_; - volScalarField muSgs_; - - -public: - - //- Runtime type information - TypeName("SpalartAllmaras"); - - - // Constructors - - //- Constructor from components - SpalartAllmaras - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel - ); - - - // Destructor - - ~SpalartAllmaras() - {} - - - // Member Functions - - //- Return SGS kinetic energy - tmp k() const - { - return sqr(muSgs()/rho()/ck_/dTilda_); - } - - //- Return sub-grid disipation rate - tmp epsilon() const; - - tmp nuTilda() const - { - return nuTilda_; - } - - //- Return SGS viscosity - tmp muSgs() const - { - return muSgs_; - } - - //- Return thermal conductivity - tmp alphaEff() const - { - return tmp - ( - new volScalarField("alphaEff", muSgs_ + alpha()) - ); - } - - //- Return the sub-grid stress tensor. - virtual tmp B() const; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp devRhoBeff() const; - - //- Returns div(rho*dev(B)). - // This is the additional term due to the filtering of the NSE. - tmp divDevRhoBeff(volVectorField& U) const; - - //- Correct nuTilda and related properties - void correct(const tmp& gradU); - - //- Read turbulenceProperties dictionary - bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/compressible/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsSpalartAllmarasWallFunction/muSgsSpalartAllmarasWallFunctionFvPatchScalarField.C b/src/turbulenceModels/LES/compressible/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsSpalartAllmarasWallFunction/muSgsSpalartAllmarasWallFunctionFvPatchScalarField.C deleted file mode 100644 index e210c32c73..0000000000 --- a/src/turbulenceModels/LES/compressible/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsSpalartAllmarasWallFunction/muSgsSpalartAllmarasWallFunctionFvPatchScalarField.C +++ /dev/null @@ -1,205 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "muSgsSpalartAllmarasWallFunctionFvPatchScalarField.H" -#include "LESModel.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -muSgsSpalartAllmarasWallFunctionFvPatchScalarField:: -muSgsSpalartAllmarasWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF -) -: - fixedValueFvPatchScalarField(p, iF) -{} - - -muSgsSpalartAllmarasWallFunctionFvPatchScalarField:: -muSgsSpalartAllmarasWallFunctionFvPatchScalarField -( - const muSgsSpalartAllmarasWallFunctionFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchScalarField(ptf, p, iF, mapper) -{} - - -muSgsSpalartAllmarasWallFunctionFvPatchScalarField:: -muSgsSpalartAllmarasWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - Istream& is -) -: - fixedValueFvPatchScalarField(p, iF, is) -{} - - -muSgsSpalartAllmarasWallFunctionFvPatchScalarField:: -muSgsSpalartAllmarasWallFunctionFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - fixedValueFvPatchScalarField(p, iF, dict) -{} - - -muSgsSpalartAllmarasWallFunctionFvPatchScalarField:: -muSgsSpalartAllmarasWallFunctionFvPatchScalarField -( - const muSgsSpalartAllmarasWallFunctionFvPatchScalarField& tppsf -) -: - fixedValueFvPatchScalarField(tppsf) -{} - - -muSgsSpalartAllmarasWallFunctionFvPatchScalarField:: -muSgsSpalartAllmarasWallFunctionFvPatchScalarField -( - const muSgsSpalartAllmarasWallFunctionFvPatchScalarField& tppsf, - const DimensionedField& iF -) -: - fixedValueFvPatchScalarField(tppsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void muSgsSpalartAllmarasWallFunctionFvPatchScalarField::evaluate -( - const Pstream::commsTypes -) -{ - const LESModel& sgsModel - = db().lookupObject("LESProperties"); - - scalar kappa = readScalar(sgsModel.lookup("kappa")); - - scalar E = readScalar(sgsModel.subDict("wallFunctionCoeffs").lookup("E")); - - const scalarField& ry = patch().deltaCoeffs(); - - const fvPatchVectorField& U = - patch().lookupPatchField("U"); - - scalarField magUp = mag(U.patchInternalField() - U); - - const scalarField& muw = - patch().lookupPatchField("mu"); - - const scalarField& rhow = - patch().lookupPatchField("rho"); - - scalarField& muSgsw = *this; - - scalarField magFaceGradU = mag(U.snGrad()); - - forAll(muSgsw, facei) - { - scalar magUpara = magUp[facei]; - - scalar utau = sqrt - ( - (muSgsw[facei] + muw[facei]) - *magFaceGradU[facei]/rhow[facei] - ); - - if(utau > 0) - { - int iter = 0; - scalar err = GREAT; - - do - { - scalar kUu = kappa*magUpara/utau; - scalar fkUu = exp(kUu) - 1 - kUu*(1 + 0.5*kUu); - - scalar f = - - utau/(ry[facei]*muw[facei]/rhow[facei]) - + magUpara/utau - + 1/E*(fkUu - 1.0/6.0*kUu*sqr(kUu)); - - scalar df = - - 1.0/(ry[facei]*muw[facei]/rhow[facei]) - - magUpara/sqr(utau) - - 1/E*kUu*fkUu/utau; - - scalar utauNew = utau - f/df; - err = mag((utau - utauNew)/utau); - utau = utauNew; - - } while (utau > VSMALL && err > 0.01 && ++iter < 10); - - muSgsw[facei] = - max(rhow[facei]*sqr(utau)/magFaceGradU[facei] - muw[facei],0.0); - } - else - { - muSgsw[facei] = 0; - } - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - muSgsSpalartAllmarasWallFunctionFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/compressible/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsSpalartAllmarasWallFunction/muSgsSpalartAllmarasWallFunctionFvPatchScalarField.H b/src/turbulenceModels/LES/compressible/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsSpalartAllmarasWallFunction/muSgsSpalartAllmarasWallFunctionFvPatchScalarField.H deleted file mode 100644 index 9d3210c1d4..0000000000 --- a/src/turbulenceModels/LES/compressible/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsSpalartAllmarasWallFunction/muSgsSpalartAllmarasWallFunctionFvPatchScalarField.H +++ /dev/null @@ -1,165 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::compressible::LESModels:: - muSgsSpalartAllmarasWallFunctionFvPatchScalarField - -Description - Spalart Allmaas wall function boundary condition for compressible flows - -SourceFiles - muSgsSpalartAllmarasWallFunctionFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef muSgsSpalartAllmarasWallFunctionFvPatchScalarField_H -#define muSgsSpalartAllmarasWallFunctionFvPatchScalarField_H - -#include "fixedValueFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class muSgsSpalartAllmarasWallFunctionFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class muSgsSpalartAllmarasWallFunctionFvPatchScalarField -: - public fixedValueFvPatchScalarField -{ - // Private data - - -public: - - //- Runtime type information - TypeName("muSgsSpalartAllmarasWallFunction"); - - - // Constructors - - //- Construct from patch and internal field - muSgsSpalartAllmarasWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField& - ); - - //- Construct from patch, internal field and Istream - muSgsSpalartAllmarasWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField&, - Istream& - ); - - //- Construct from patch, internal field and dictionary - muSgsSpalartAllmarasWallFunctionFvPatchScalarField - ( - const fvPatch&, - const DimensionedField&, - const dictionary& - ); - - //- Construct by mapping given - // muSgsSpalartAllmarasWallFunctionFvPatchScalarField - // onto a new patch - muSgsSpalartAllmarasWallFunctionFvPatchScalarField - ( - const muSgsSpalartAllmarasWallFunctionFvPatchScalarField&, - const fvPatch&, - const DimensionedField&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - muSgsSpalartAllmarasWallFunctionFvPatchScalarField - ( - const muSgsSpalartAllmarasWallFunctionFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp clone() const - { - return tmp - ( - new muSgsSpalartAllmarasWallFunctionFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - muSgsSpalartAllmarasWallFunctionFvPatchScalarField - ( - const muSgsSpalartAllmarasWallFunctionFvPatchScalarField&, - const DimensionedField& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp clone - ( - const DimensionedField& iF - ) const - { - return tmp - ( - new muSgsSpalartAllmarasWallFunctionFvPatchScalarField - ( - *this, - iF - ) - ); - } - - - // Member functions - - // Evaluation functions - - //- Evaluate the patchField - virtual void evaluate - ( - const Pstream::commsTypes commsType=Pstream::blocking - ); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/compressible/dynOneEqEddy/dynOneEqEddy.C b/src/turbulenceModels/LES/compressible/dynOneEqEddy/dynOneEqEddy.C deleted file mode 100644 index 96bf8abbc9..0000000000 --- a/src/turbulenceModels/LES/compressible/dynOneEqEddy/dynOneEqEddy.C +++ /dev/null @@ -1,155 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "dynOneEqEddy.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(dynOneEqEddy, 0); -addToRunTimeSelectionTable(LESModel, dynOneEqEddy, dictionary); - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -dimensionedScalar dynOneEqEddy::ck_(const volSymmTensorField& D) const -{ - volScalarField KK = 0.5*(filter_(magSqr(U())) - magSqr(filter_(U()))); - - volSymmTensorField LL = dev(filter_(sqr(U())) - (sqr(filter_(U())))); - - volSymmTensorField MM = - delta()*(filter_(sqrt(k_)*D) - 2*sqrt(KK + filter_(k_))*filter_(D)); - - return average(LL && MM)/average(magSqr(MM)); -} - - -dimensionedScalar dynOneEqEddy::ce_(const volSymmTensorField& D) const -{ - volScalarField KK = 0.5*(filter_(magSqr(U())) - magSqr(filter_(U()))); - - volScalarField mm = - pow(KK + filter_(k_), 1.5)/(2*delta()) - filter_(pow(k_, 1.5))/delta(); - - volScalarField ee = - 2*delta()*ck_(D)* - ( - filter_(sqrt(k_)*magSqr(D)) - - 2*sqrt(KK + filter_(k_))*magSqr(filter_(D)) - ); - - return average(ee*mm)/average(mm*mm); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -// from components -dynOneEqEddy::dynOneEqEddy -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel -) -: - LESModel(typeName, rho, U, phi, thermoPhysicalModel), - GenEddyVisc(rho, U, phi, thermoPhysicalModel), - - filterPtr_(LESfilter::New(U.mesh(), coeffDict())), - filter_(filterPtr_()) -{ - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -dynOneEqEddy::~dynOneEqEddy() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void dynOneEqEddy::correct(const tmp& tgradU) -{ - const volTensorField& gradU = tgradU(); - - GenEddyVisc::correct(gradU); - - volSymmTensorField D = dev(symm(gradU)); - volScalarField divU = fvc::div(phi()/fvc::interpolate(rho())); - volScalarField G = 2*muSgs_*(gradU && D); - - solve - ( - fvm::ddt(rho(), k_) - + fvm::div(phi(), k_) - - fvm::laplacian(DkEff(), k_) - == - G - - fvm::SuSp(2.0/3.0*rho()*divU, k_) - - fvm::Sp(ce_(D)*rho()*sqrt(k_)/delta(), k_) - ); - - bound(k_, dimensionedScalar("0", k_.dimensions(), 1.0e-10)); - - muSgs_ = ck_(D)*rho()*sqrt(k_)*delta(); - muSgs_.correctBoundaryConditions(); -} - - -bool dynOneEqEddy::read() -{ - if (GenEddyVisc::read()) - { - filter_.read(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/compressible/dynOneEqEddy/dynOneEqEddy.H b/src/turbulenceModels/LES/compressible/dynOneEqEddy/dynOneEqEddy.H deleted file mode 100644 index 3ffeb9c5db..0000000000 --- a/src/turbulenceModels/LES/compressible/dynOneEqEddy/dynOneEqEddy.H +++ /dev/null @@ -1,146 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::compressible::LESModels::dynOneEqEddy - -Description - One Equation Eddy Viscosity Model for compressible flows. - - Eddy viscosity SGS model using a modeled balance equation to simulate - the behaviour of k. - Thus - @verbatim - d/dt(k) + div(U*k) - div(nuSgs*grad(k)) - = - -rho*B*L - ce*rho*k^3/2/delta - - and - - B = 2/3*k*I - 2*nuSgs*dev(D) - - where - - D = symm(grad(U)); - nuSgs = ck*sqrt(k)*delta - @endverbatim - -SourceFiles - dynOneEqEddy.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleDynOneEqEddy_H -#define compressibleDynOneEqEddy_H - -#include "GenEddyVisc.H" -#include "LESfilter.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class dynOneEqEddy Declaration -\*---------------------------------------------------------------------------*/ - -class dynOneEqEddy -: - public GenEddyVisc -{ - // Private data - - autoPtr filterPtr_; - LESfilter& filter_; - - - // Private Member Functions - - //- Calculate ck, ce by filtering the velocity field U. - dimensionedScalar ck_(const volSymmTensorField& D) const; - dimensionedScalar ce_(const volSymmTensorField& D) const; - - // Disallow default bitwise copy construct and assignment - dynOneEqEddy(const dynOneEqEddy&); - dynOneEqEddy& operator=(const dynOneEqEddy&); - - -public: - - //- Runtime type information - TypeName("dynOneEqEddy"); - - - // Constructors - - //- Constructor from components - dynOneEqEddy - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel - ); - - - // Destructor - - ~dynOneEqEddy(); - - - // Member Functions - - //- Return the effective diffusivity for k - tmp DkEff() const - { - return tmp - ( - new volScalarField("DkEff", muSgs_ + mu()) - ); - } - - //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); - - //- Read turbulenceProperties dictionary - bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/compressible/lowReOneEqEddy/lowReOneEqEddy.C b/src/turbulenceModels/LES/compressible/lowReOneEqEddy/lowReOneEqEddy.C deleted file mode 100644 index a626068335..0000000000 --- a/src/turbulenceModels/LES/compressible/lowReOneEqEddy/lowReOneEqEddy.C +++ /dev/null @@ -1,137 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "lowReOneEqEddy.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -defineTypeNameAndDebug(lowReOneEqEddy, 0); -addToRunTimeSelectionTable(LESModel, lowReOneEqEddy, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -// from components -lowReOneEqEddy::lowReOneEqEddy -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel -) -: - LESModel(typeName, rho, U, phi, thermoPhysicalModel), - GenEddyVisc(rho, U, phi, thermoPhysicalModel), - - ck_ - ( - dimensioned::lookupOrAddToDict - ( - "ck", - coeffDict(), - 0.07 - ) - ), - beta_ - ( - dimensioned::lookupOrAddToDict - ( - "beta", - coeffDict(), - 0.01 - ) - ) -{ - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void lowReOneEqEddy::correct(const tmp& tgradU) -{ - const volTensorField& gradU = tgradU(); - - GenEddyVisc::correct(gradU); - - volScalarField divU = fvc::div(phi()/fvc::interpolate(rho())); - volScalarField G = 2*muSgs_*(gradU && dev(symm(gradU))); - - solve - ( - fvm::ddt(rho(), k_) - + fvm::div(phi(), k_) - - fvm::laplacian(DkEff(), k_) - == - G - - fvm::SuSp(2.0/3.0*rho()*divU, k_) - - fvm::Sp(ce_*rho()*sqrt(k_)/delta(), k_) - ); - - bound(k_, k0()); - - // High Re eddy viscosity - muSgs_ = ck_*rho()*sqrt(k_)*delta(); - - // low Re no corrected eddy viscosity - muSgs_ -= (mu()/beta_)*(scalar(1) - exp(-beta_*muSgs_/mu())); - - muSgs_.correctBoundaryConditions(); -} - - -bool lowReOneEqEddy::read() -{ - if (GenEddyVisc::read()) - { - ck_.readIfPresent(coeffDict()); - beta_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/compressible/lowReOneEqEddy/lowReOneEqEddy.H b/src/turbulenceModels/LES/compressible/lowReOneEqEddy/lowReOneEqEddy.H deleted file mode 100644 index 44d74f8ea9..0000000000 --- a/src/turbulenceModels/LES/compressible/lowReOneEqEddy/lowReOneEqEddy.H +++ /dev/null @@ -1,138 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::compressible::LESModels::lowReOneEqEddy - -Description - One Equation Eddy Viscosity Model for compressible flow - - @verbatim - d/dt(rho*k) + div(rho*U*k) - div(muEff*grad(k)) - = - -rho*B*L - ce*rho*k^3/2/delta - - and - - B = 2/3*k*I - 2*nuSgs*dev(D) - - where - - nuSgsHiRe = ck*sqrt(k)*delta - nuSgs = (nu/beta)*(1 - exp(-beta*nuSgsHiRe/nu)); - @endverbatim - -SourceFiles - lowReOneEqEddy.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleLowReOneEqEddy_H -#define compressibleLowReOneEqEddy_H - -#include "GenEddyVisc.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class lowReOneEqEddy Declaration -\*---------------------------------------------------------------------------*/ - -class lowReOneEqEddy -: - public GenEddyVisc -{ - // Private data - - dimensionedScalar ck_; - dimensionedScalar beta_; - - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - lowReOneEqEddy(const lowReOneEqEddy&); - lowReOneEqEddy& operator=(const lowReOneEqEddy&); - - -public: - - //- Runtime type information - TypeName("lowReOneEqEddy"); - - - // Constructors - - //- Constructor from components - lowReOneEqEddy - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel - ); - - - // Destructor - - ~lowReOneEqEddy() - {} - - - // Member Functions - - //- Return the effective diffusivity for k - tmp DkEff() const - { - return tmp - ( - new volScalarField("DkEff", muSgs_ + mu()) - ); - } - - //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); - - //- Read turbulenceProperties dictionary - bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/compressible/oneEqEddy/oneEqEddy.C b/src/turbulenceModels/LES/compressible/oneEqEddy/oneEqEddy.C deleted file mode 100644 index bf4103e430..0000000000 --- a/src/turbulenceModels/LES/compressible/oneEqEddy/oneEqEddy.C +++ /dev/null @@ -1,124 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "oneEqEddy.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(oneEqEddy, 0); -addToRunTimeSelectionTable(LESModel, oneEqEddy, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -oneEqEddy::oneEqEddy -( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel -) -: - LESModel(typeName, rho, U, phi, thermoPhysicalModel), - GenEddyVisc(rho, U, phi, thermoPhysicalModel), - - ck_ - ( - dimensioned::lookupOrAddToDict - ( - "ck", - coeffDict(), - 0.094 - ) - ) -{ - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void oneEqEddy::correct(const tmp& tgradU) -{ - const volTensorField& gradU = tgradU(); - - GenEddyVisc::correct(gradU); - - volScalarField divU = fvc::div(phi()/fvc::interpolate(rho())); - volScalarField G = 2*muSgs_*(gradU && dev(symm(gradU))); - - fvScalarMatrix kEqn - ( - fvm::ddt(rho(), k_) - + fvm::div(phi(), k_) - - fvm::laplacian(DkEff(), k_) - == - G - - fvm::SuSp(2.0/3.0*rho()*divU, k_) - - fvm::Sp(ce_*rho()*sqrt(k_)/delta(), k_) - ); - - kEqn.relax(); - kEqn.solve(); - - bound(k_, k0()); - - muSgs_ = ck_*rho()*sqrt(k_)*delta(); - muSgs_.correctBoundaryConditions(); -} - - -bool oneEqEddy::read() -{ - if (GenEddyVisc::read()) - { - ck_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/compressible/oneEqEddy/oneEqEddy.H b/src/turbulenceModels/LES/compressible/oneEqEddy/oneEqEddy.H deleted file mode 100644 index edd2c04d37..0000000000 --- a/src/turbulenceModels/LES/compressible/oneEqEddy/oneEqEddy.H +++ /dev/null @@ -1,141 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::compressible::LESModels::oneEqEddy - -Description - One Equation Eddy Viscosity Model for incompressible flows - - Eddy viscosity SGS model using a modeled balance equation to simulate the - behaviour of k, hence, - @verbatim - d/dt(rho*k) + div(rho*U*k) - div(muEff*grad(k)) - = - -rho*D:B - ce*rho*k^3/2/delta - - and - - B = 2/3*k*I - 2*nuSgs*dev(D) - - where - - D = symm(grad(U)); - muSgs = ck*rho*sqrt(k)*delta - @endverbatim - - -SourceFiles - oneEqEddy.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibleOneEqEddy_H -#define compressibleOneEqEddy_H - -#include "GenEddyVisc.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class oneEqEddy Declaration -\*---------------------------------------------------------------------------*/ - -class oneEqEddy -: - public GenEddyVisc -{ - // Private data - - dimensionedScalar ck_; - - - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - oneEqEddy(const oneEqEddy&); - oneEqEddy& operator=(const oneEqEddy&); - - -public: - - //- Runtime type information - TypeName("oneEqEddy"); - - - // Constructors - - //- Constructor from components - oneEqEddy - ( - const volScalarField& rho, - const volVectorField& U, - const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel - ); - - - // Destructor - - ~oneEqEddy() - {} - - - // Member Functions - - //- Return the effective diffusivity for k - tmp DkEff() const - { - return tmp - ( - new volScalarField("DkEff", muSgs_ + mu()) - ); - } - - //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); - - //- Read turbulenceProperties dictionary - bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.C b/src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.C deleted file mode 100644 index dabd5838f1..0000000000 --- a/src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.C +++ /dev/null @@ -1,150 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "DeardorffDiffStress.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(DeardorffDiffStress, 0); -addToRunTimeSelectionTable(LESModel, DeardorffDiffStress, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -// from components -DeardorffDiffStress::DeardorffDiffStress -( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport -) -: - LESModel(typeName, U, phi, transport), - GenSGSStress(U, phi, transport), - - ck_ - ( - dimensioned::lookupOrAddToDict - ( - "ck", - coeffDict(), - 0.094 - ) - ), - cm_ - ( - dimensioned::lookupOrAddToDict - ( - "cm", - coeffDict(), - 4.13 - ) - ) -{ - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void DeardorffDiffStress::correct(const tmp& tgradU) -{ - const volTensorField& gradU = tgradU(); - - GenSGSStress::correct(gradU); - - volSymmTensorField D = symm(gradU); - - volSymmTensorField P = -twoSymm(B_ & gradU); - - volScalarField K = 0.5*tr(B_); - volScalarField Epsilon = 2*nuEff()*magSqr(D); - - solve - ( - fvm::ddt(B_) - + fvm::div(phi(), B_) - - fvm::laplacian(DBEff(), B_) - + fvm::Sp(cm_*sqrt(K)/delta(), B_) - == - P - + 0.8*K*D - - (2*ce_ - 0.667*cm_)*I*Epsilon - ); - - - // Bounding the component kinetic energies - - forAll(B_, celli) - { - B_[celli].component(symmTensor::XX) = - max(B_[celli].component(symmTensor::XX), k0().value()); - B_[celli].component(symmTensor::YY) = - max(B_[celli].component(symmTensor::YY), k0().value()); - B_[celli].component(symmTensor::ZZ) = - max(B_[celli].component(symmTensor::ZZ), k0().value()); - } - - K = 0.5*tr(B_); - bound(K, k0()); - - nuSgs_ = ck_*sqrt(K)*delta(); - nuSgs_.correctBoundaryConditions(); -} - - -bool DeardorffDiffStress::read() -{ - if (GenSGSStress::read()) - { - ck_.readIfPresent(coeffDict()); - cm_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.H b/src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.H deleted file mode 100644 index 57576bf5e5..0000000000 --- a/src/turbulenceModels/LES/incompressible/DeardorffDiffStress/DeardorffDiffStress.H +++ /dev/null @@ -1,140 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::incompressible::LESModels::DeardorffDiffStress - -Description - Differential SGS Stress Equation Model for incompressible flows - - The DSEM uses a model version of the full balance equation for the SGS - stress tensor to simulate the behaviour of B. - Thus, - @verbatim - d/dt(B) + div(U*B) - div(nuSgs*grad(B)) - = - P - c1*epsilon/k*B - 0.667*(1 - c1)*epsilon*I - c2*(P - 0.333*trP*I) - - where - - k = 0.5*tr(B), - epsilon = ce*k^3/2/delta, - epsilon/k = ce*k^1/2/delta - P = -(B'L + L'B) - nuSgs = ck*sqrt(k)*delta - nuEff = nuSgs + nu - @endverbatim - -SourceFiles - DeardorffDiffStress.C - -\*---------------------------------------------------------------------------*/ - -#ifndef DeardorffDiffStress_H -#define DeardorffDiffStress_H - -#include "GenSGSStress.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class DeardorffDiffStress Declaration -\*---------------------------------------------------------------------------*/ - -class DeardorffDiffStress -: - public GenSGSStress -{ - // Private data - - dimensionedScalar ck_; - dimensionedScalar cm_; - - - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - DeardorffDiffStress(const DeardorffDiffStress&); - DeardorffDiffStress& operator=(const DeardorffDiffStress&); - - -public: - - //- Runtime type information - TypeName("DeardorffDiffStress"); - - // Constructors - - //- Constructor from components - DeardorffDiffStress - ( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport - ); - - - // Destructor - - ~DeardorffDiffStress() - {} - - - // Member Functions - - //- Return the effective diffusivity for B - tmp DBEff() const - { - return tmp - ( - new volScalarField("DBEff", nuSgs_ + nu()) - ); - } - - //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); - - //- Read turbulenceProperties dictionary - bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.C b/src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.C deleted file mode 100644 index 7cf9d6a2f3..0000000000 --- a/src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.C +++ /dev/null @@ -1,126 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "GenEddyVisc.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -GenEddyVisc::GenEddyVisc -( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport -) -: - LESModel(word("GenEddyVisc"), U, phi, transport), - - ce_ - ( - dimensioned::lookupOrAddToDict - ( - "ce", - coeffDict(), - 1.048 - ) - ), - - nuSgs_ - ( - IOobject - ( - "nuSgs", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ) -{ -// printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp GenEddyVisc::B() const -{ - return ((2.0/3.0)*I)*k() - nuSgs_*twoSymm(fvc::grad(U())); -} - - -tmp GenEddyVisc::devBeff() const -{ - return -nuEff()*dev(twoSymm(fvc::grad(U()))); -} - - -tmp GenEddyVisc::divDevBeff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(fvc::grad(U)().T())) - ); -} - - -void GenEddyVisc::correct(const tmp& gradU) -{ - LESModel::correct(gradU); -} - - -bool GenEddyVisc::read() -{ - if (LESModel::read()) - { - ce_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.H b/src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.H deleted file mode 100644 index 388606f284..0000000000 --- a/src/turbulenceModels/LES/incompressible/GenEddyVisc/GenEddyVisc.H +++ /dev/null @@ -1,141 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::incompressible::LESModels::GenEddyVisc - -Description - General base class for all incompressible models that can be implemented - as an eddy viscosity, i.e. algebraic and one-equation models. - - Contains fields for k (SGS turbulent kinetic energy), gamma - (modelled viscosity) and epsilon (SGS dissipation). - -SourceFiles - GenEddyVisc.C - -\*---------------------------------------------------------------------------*/ - -#ifndef GenEddyVisc_H -#define GenEddyVisc_H - -#include "LESModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class GenEddyVisc Declaration -\*---------------------------------------------------------------------------*/ - -class GenEddyVisc -: - virtual public LESModel -{ - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - GenEddyVisc(const GenEddyVisc&); - GenEddyVisc& operator=(const GenEddyVisc&); - - -protected: - - dimensionedScalar ce_; - - volScalarField nuSgs_; - - -public: - - // Constructors - - //- Construct from components - GenEddyVisc - ( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport - ); - - - // Destructor - - virtual ~GenEddyVisc() - {} - - - // Member Functions - - //- Return SGS kinetic energy - virtual tmp k() const = 0; - - //- Return sub-grid disipation rate - virtual tmp epsilon() const - { - return ce_*k()*sqrt(k())/delta(); - } - - //- Return the SGS viscosity. - virtual tmp nuSgs() const - { - return nuSgs_; - } - - //- Return the sub-grid stress tensor. - virtual tmp B() const; - - //- Return the effective sub-grid turbulence stress tensor - // including the laminar stress - virtual tmp devBeff() const; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp divDevBeff(volVectorField& U) const; - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp& gradU); - - //- Read turbulenceProperties dictionary - bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/incompressible/GenSGSStress/GenSGSStress.C b/src/turbulenceModels/LES/incompressible/GenSGSStress/GenSGSStress.C deleted file mode 100644 index 469bb17b43..0000000000 --- a/src/turbulenceModels/LES/incompressible/GenSGSStress/GenSGSStress.C +++ /dev/null @@ -1,192 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "GenSGSStress.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -GenSGSStress::GenSGSStress -( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport -) -: - LESModel(word("GenSGSStress"), U, phi, transport), - - ce_ - ( - dimensioned::lookupOrAddToDict - ( - "ce", - coeffDict(), - 1.048 - ) - ), - - couplingFactor_ - ( - dimensioned::lookupOrAddToDict - ( - "couplingFactor", - coeffDict(), - 0.0 - ) - ), - - B_ - ( - IOobject - ( - "B", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - nuSgs_ - ( - IOobject - ( - "nuSgs", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - nu(), - B_.boundaryField().types() - ) -{ - if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0) - { - FatalErrorIn - ( - "GenSGSStress::GenSGSStress" - "(const volVectorField& U, const surfaceScalarField& phi," - "transportModel& lamTransportModel)" - ) << "couplingFactor = " << couplingFactor_ - << " is not in range 0 - 1" << nl - << exit(FatalError); - } -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -tmp GenSGSStress::devBeff() const -{ - return tmp - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - B_ - nu()*dev(twoSymm(fvc::grad(U()))) - ) - ); -} - - -tmp GenSGSStress::divDevBeff -( - volVectorField& U -) const -{ - if (couplingFactor_.value() > 0.0) - { - return - ( - fvc::div(B_ + couplingFactor_*nuSgs_*fvc::grad(U)) - + fvc::laplacian - ( - (1.0 - couplingFactor_)*nuSgs_, U, "laplacian(nuEff,U)" - ) - - fvm::laplacian(nuEff(), U) - ); - } - else - { - return - ( - fvc::div(B_) - + fvc::laplacian(nuSgs_, U, "laplacian(nuEff,U)") - - fvm::laplacian(nuEff(), U) - ); - } -} - - -bool GenSGSStress::read() -{ - if (LESModel::read()) - { - ce_.readIfPresent(coeffDict()); - - couplingFactor_.readIfPresent(coeffDict()); - - if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0) - { - FatalErrorIn("GenSGSStress::read()") - << "couplingFactor = " << couplingFactor_ - << " is not in range 0 - 1" - << exit(FatalError); - } - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/incompressible/GenSGSStress/GenSGSStress.H b/src/turbulenceModels/LES/incompressible/GenSGSStress/GenSGSStress.H deleted file mode 100644 index eb6cc7e906..0000000000 --- a/src/turbulenceModels/LES/incompressible/GenSGSStress/GenSGSStress.H +++ /dev/null @@ -1,149 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::incompressible::LESModels::GenSGSStress - -Description - General base class for all incompressible models that directly - solve for the SGS stress tensor B. - - Contains tensor fields B (the SGS stress tensor) as well as scalar - fields for k (SGS turbulent energy) gamma (SGS viscosity) and epsilon - (SGS dissipation). - -SourceFiles - GenSGSStress.C - -\*---------------------------------------------------------------------------*/ - -#ifndef GenSGSStress_H -#define GenSGSStress_H - -#include "LESModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class GenSGSStress Declaration -\*---------------------------------------------------------------------------*/ - -class GenSGSStress -: - virtual public LESModel -{ - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - GenSGSStress(const GenSGSStress&); - GenSGSStress& operator=(const GenSGSStress&); - - -protected: - - dimensionedScalar ce_; - - dimensionedScalar couplingFactor_; - - volSymmTensorField B_; - volScalarField nuSgs_; - - -public: - - // Constructors - - //- Constructor from components - GenSGSStress - ( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport - ); - - - // Destructor - - virtual ~GenSGSStress() - {} - - - // Member Functions - - //- Return the SGS turbulent kinetic energy. - virtual tmp k() const - { - return 0.5*tr(B_); - } - - //- Return the SGS turbulent dissipation. - virtual tmp epsilon() const - { - volScalarField K = k(); - return ce_*K*sqrt(K)/delta(); - } - - //- Return the SGS viscosity. - virtual tmp nuSgs() const - { - return nuSgs_; - } - - //- Return the sub-grid stress tensor. - virtual tmp B() const - { - return B_; - } - - //- Return the effective sub-grid turbulence stress tensor - // including the laminar stress - virtual tmp devBeff() const; - - //- Returns div(B). - // This is the additional term due to the filtering of the NSE. - virtual tmp divDevBeff(volVectorField& U) const; - - //- Read turbulenceProperties dictionary - bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/incompressible/LESModel/LESModel.C b/src/turbulenceModels/LES/incompressible/LESModel/LESModel.C deleted file mode 100644 index 4eefbe2d60..0000000000 --- a/src/turbulenceModels/LES/incompressible/LESModel/LESModel.C +++ /dev/null @@ -1,133 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "LESModel.H" -#include "wallDist.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(LESModel, 0); -defineRunTimeSelectionTable(LESModel, dictionary); - -// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // - -void LESModel::printCoeffs() -{ - if (printCoeffs_) - { - Info<< type() << "Coeffs" << coeffDict_ << endl; - } -} - - -// * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * * // - -LESModel::LESModel -( - const word& type, - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport -) -: - IOdictionary - ( - IOobject - ( - "LESProperties", - U.time().constant(), - U.db(), - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ), - - runTime_(U.time()), - mesh_(U.mesh()), - - U_(U), - phi_(phi), - transport_(transport), - - printCoeffs_(lookupOrDefault("printCoeffs", false)), - - coeffDict_(subDict(type + "Coeffs")), - - k0_("k0", dimVelocity*dimVelocity, SMALL), - - delta_(LESdelta::New("delta", U.mesh(), *this)) -{ - readIfPresent("k0", k0_); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void LESModel::correct(const tmp&) -{ - delta_().correct(); - transport_.correct(); -} - - -void LESModel::correct() -{ - correct(fvc::grad(U_)); -} - - -bool LESModel::read() -{ - if (regIOobject::read()) - { - coeffDict_ = subDict(type() + "Coeffs"); - - delta_().read(*this); - - readIfPresent("k0", k0_); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/incompressible/LESModel/LESModel.H b/src/turbulenceModels/LES/incompressible/LESModel/LESModel.H deleted file mode 100644 index e1374ed286..0000000000 --- a/src/turbulenceModels/LES/incompressible/LESModel/LESModel.H +++ /dev/null @@ -1,275 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Namespace - Foam::incompressible::LESModels - -Description - Namespace for incompressible LES models. - - -Class - Foam::incompressible::LESModel - -Description - Base class for all incompressible flow LES SGS models. - - This class defines the basic interface for an incompressible flow SGS - model, and encapsulates data of value to all possible models. In - particular this includes references to all the dependent fields (U, - phi), the physical viscosity nu, and the turbulenceProperties - dictionary which contains the model selection and model coefficients. - -SourceFiles - LESModel.C - newIsoLESModel.C - -\*---------------------------------------------------------------------------*/ - -#ifndef LESModel_H -#define LESModel_H - -#include "LESdelta.H" -#include "fvm.H" -#include "fvc.H" -#include "fvMatrices.H" -#include "incompressible/transportModel/transportModel.H" -#include "wallFvPatch.H" -#include "bound.H" -#include "autoPtr.H" -#include "runTimeSelectionTables.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class LESModel Declaration -\*---------------------------------------------------------------------------*/ - -class LESModel -: - public IOdictionary -{ - -protected: - - // Protected data - - const Time& runTime_; - const fvMesh& mesh_; - - -private: - - // Private data - - const volVectorField& U_; - const surfaceScalarField& phi_; - - transportModel& transport_; - - Switch printCoeffs_; - dictionary coeffDict_; - - dimensionedScalar k0_; - - autoPtr delta_; - - - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - LESModel(const LESModel&); - LESModel& operator=(const LESModel&); - - -protected: - - // Protected member functions - - //- Print model coefficients - virtual void printCoeffs(); - - -public: - - //- Runtime type information - TypeName("LESModel"); - - - // Declare run-time constructor selection table - - declareRunTimeSelectionTable - ( - autoPtr, - LESModel, - dictionary, - ( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport - ), - (U, phi, transport) - ); - - - // Constructors - - //- Construct from components - LESModel - ( - const word& type, - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport - ); - - - // Selectors - - //- Return a reference to the selected LES model - static autoPtr New - ( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport - ); - - - // Destructor - - virtual ~LESModel() - {} - - - // Member Functions - - // Access - - //- Access function to velocity field - inline const volVectorField& U() const - { - return U_; - } - - //- Access function to flux field - inline const surfaceScalarField& phi() const - { - return phi_; - } - - //- Access function to incompressible transport model - inline transportModel& transport() const - { - return transport_; - } - - //- Access the dictionary which provides info. about choice of - // models, and all related data (particularly model coefficients). - inline dictionary& coeffDict() - { - return coeffDict_; - } - - //- Access function to filter width - inline const volScalarField& delta() const - { - return delta_(); - } - - //- Access function to incompressible viscosity - inline const volScalarField& nu() const - { - return transport_.nu(); - } - - //- Return the value of k0 which k is not allowed to be less than - const dimensionedScalar& k0() const - { - return k0_; - } - - //- Allow k0 to be changed - dimensionedScalar& k0() - { - return k0_; - } - - - //- Return the SGS turbulent kinetic energy. - virtual tmp k() const = 0; - - //- Return the SGS turbulent dissipation. - virtual tmp epsilon() const = 0; - - //- Return the SGS viscosity. - virtual tmp nuSgs() const = 0; - - //- Return the effective viscosity - virtual tmp nuEff() const - { - return tmp - ( - new volScalarField("nuEff", nuSgs() + nu()) - ); - } - - //- Return the sub-grid stress tensor. - virtual tmp B() const = 0; - - //- Return the deviatoric part of the effective sub-grid - // turbulence stress tensor including the laminar stress - virtual tmp devBeff() const = 0; - - //- Returns div(dev(Beff)). - // This is the additional term due to the filtering of the NSE. - virtual tmp divDevBeff(volVectorField& U) const = 0; - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp& gradU); - - //- Correct Eddy-Viscosity and related properties. - // This calls correct(const tmp& gradU) by supplying - // gradU calculated locally. - void correct(); - - //- Read turbulenceProperties dictionary - virtual bool read() = 0; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/incompressible/LESModel/newLESModel.C b/src/turbulenceModels/LES/incompressible/LESModel/newLESModel.C deleted file mode 100644 index 5cda1e5f56..0000000000 --- a/src/turbulenceModels/LES/incompressible/LESModel/newLESModel.C +++ /dev/null @@ -1,93 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "LESModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -autoPtr LESModel::New -( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport -) -{ - word LESModelTypeName; - - // Enclose the creation of the turbulencePropertiesDict to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary turbulencePropertiesDict - ( - IOobject - ( - "LESProperties", - U.time().constant(), - U.db(), - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ); - - turbulencePropertiesDict.lookup("LESModel") >> LESModelTypeName; - } - - Info<< "Selecting LES turbulence model " << LESModelTypeName << endl; - - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(LESModelTypeName); - - if (cstrIter == dictionaryConstructorTablePtr_->end()) - { - FatalErrorIn - ( - "LESModel::select(const volVectorField&, const " - "surfaceScalarField&, transportModel&)" - ) << "Unknown LESModel type " << LESModelTypeName - << endl << endl - << "Valid LESModel types are :" << endl - << dictionaryConstructorTablePtr_->toc() - << exit(FatalError); - } - - return autoPtr(cstrIter()(U, phi, transport)); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.C b/src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.C deleted file mode 100644 index af3fb1628e..0000000000 --- a/src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.C +++ /dev/null @@ -1,161 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "LRRDiffStress.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(LRRDiffStress, 0); -addToRunTimeSelectionTable(LESModel, LRRDiffStress, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -// from components -LRRDiffStress::LRRDiffStress -( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport -) -: - LESModel(typeName, U, phi, transport), - GenSGSStress(U, phi, transport), - - ck_ - ( - dimensioned::lookupOrAddToDict - ( - "ck", - coeffDict(), - 0.09 - ) - ), - c1_ - ( - dimensioned::lookupOrAddToDict - ( - "c1", - coeffDict(), - 1.8 - ) - ), - c2_ - ( - dimensioned::lookupOrAddToDict - ( - "c2", - coeffDict(), - 0.6 - ) - ) -{ - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void LRRDiffStress::correct(const tmp& tgradU) -{ - const volTensorField& gradU = tgradU(); - - GenSGSStress::correct(gradU); - - volSymmTensorField D = symm(gradU); - - volSymmTensorField P = -twoSymm(B_ & gradU); - - volScalarField K = 0.5*tr(B_); - volScalarField Epsilon = 2*nuEff()*magSqr(D); - - solve - ( - fvm::ddt(B_) - + fvm::div(phi(), B_) - - fvm::laplacian(DBEff(), B_) - + fvm::Sp(c1_*Epsilon/K, B_) - == - P - - (0.667*(1.0 - c1_)*I)*Epsilon - - c2_*(P - 0.333*I*tr(P)) - - (0.667 - 2*c1_)*I*pow(K, 1.5)/delta() - ); - - - // Bounding the component kinetic energies - - forAll(B_, celli) - { - B_[celli].component(symmTensor::XX) = - max(B_[celli].component(symmTensor::XX), k0().value()); - B_[celli].component(symmTensor::YY) = - max(B_[celli].component(symmTensor::YY), k0().value()); - B_[celli].component(symmTensor::ZZ) = - max(B_[celli].component(symmTensor::ZZ), k0().value()); - } - - K = 0.5*tr(B_); - bound(K, k0()); - - nuSgs_ = ck_*sqrt(K)*delta(); - nuSgs_.correctBoundaryConditions(); -} - - -bool LRRDiffStress::read() -{ - if (GenSGSStress::read()) - { - ck_.readIfPresent(coeffDict()); - c1_.readIfPresent(coeffDict()); - c2_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.H b/src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.H deleted file mode 100644 index f58b6e224b..0000000000 --- a/src/turbulenceModels/LES/incompressible/LRRDiffStress/LRRDiffStress.H +++ /dev/null @@ -1,139 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::incompressible::LESModels::LRRDiffStress - -Description - Differential SGS Stress Equation Model for incompressible flows. - - The DSEM uses a model version of the full balance equation for the SGS - stress tensor to simulate the behaviour of B, hence, - @verbatim - d/dt(B) + div(U*B) - div(nuSgs*grad(B)) - = - P - c1*e/k*B - 0.667*(1 - c1)*e*I - c2*(P - 0.333*trP*I) - where - k = 0.5*trB, - epsilon = ce*k^3/2/delta - epsilon/k = ce*k^1/2/delta - P = -(B'L + L'B) - nuEff = ck*sqrt(k)*delta + nu - @endverbatim - - This version from Launder, Rece & Rodi 1975 - -SourceFiles - LRRDiffStress.C - -\*---------------------------------------------------------------------------*/ - -#ifndef LRRDiffStress_H -#define LRRDiffStress_H - -#include "GenSGSStress.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class LRRDiffStress Declaration -\*---------------------------------------------------------------------------*/ - -class LRRDiffStress -: - public GenSGSStress -{ - // Private data - - dimensionedScalar ck_; - dimensionedScalar c1_; - dimensionedScalar c2_; - - - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - LRRDiffStress(const LRRDiffStress&); - LRRDiffStress& operator=(const LRRDiffStress&); - - -public: - - //- Runtime type information - TypeName("LRRDiffStress"); - - // Constructors - - //- Constructors from components - LRRDiffStress - ( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport - ); - - - // Destructor - - ~LRRDiffStress() - {} - - - // Member Functions - - //- Return the effective diffusivity for B - tmp DBEff() const - { - return tmp - ( - new volScalarField("DBEff", nuSgs_ + nu()) - ); - } - - //- Correct Eddy-Viscosity and related properties - void correct(const tmp& gradU); - - //- Read turbulenceProperties dictionary - bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/incompressible/Make/files b/src/turbulenceModels/LES/incompressible/Make/files deleted file mode 100644 index feda56ca15..0000000000 --- a/src/turbulenceModels/LES/incompressible/Make/files +++ /dev/null @@ -1,39 +0,0 @@ -vanDriestDelta/vanDriestDelta.C - -LESModel/LESModel.C -LESModel/newLESModel.C - -GenEddyVisc/GenEddyVisc.C -GenSGSStress/GenSGSStress.C - -laminar/laminar.C -SpalartAllmaras/SpalartAllmaras.C -SpalartAllmarasDDES/SpalartAllmarasDDES.C -SpalartAllmarasIDDES/SpalartAllmarasIDDES.C -SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C - -oneEqEddy/oneEqEddy.C -dynOneEqEddy/dynOneEqEddy.C -locDynOneEqEddy/locDynOneEqEddy.C -Smagorinsky/Smagorinsky.C -dynSmagorinsky/dynSmagorinsky.C -LRRDiffStress/LRRDiffStress.C -DeardorffDiffStress/DeardorffDiffStress.C -spectEddyVisc/spectEddyVisc.C - -scaleSimilarity/scaleSimilarity.C -mixedSmagorinsky/mixedSmagorinsky.C -dynMixedSmagorinsky/dynMixedSmagorinsky.C - -/*Smagorinsky2/Smagorinsky2.C*/ - -kOmegaSSTSAS/kOmegaSSTSAS.C - -/* Wall functions */ -wallFunctions=derivedFvPatchFields/wallFunctions - -nuSgsWallFunctions=$(wallFunctions)/nuSgsWallFunctions -$(nuSgsWallFunctions)/nuSgsSpalartAllmarasWallFunction/nuSgsSpalartAllmarasWallFunctionFvPatchScalarField.C - - -LIB = $(FOAM_LIBBIN)/libincompressibleLESModels diff --git a/src/turbulenceModels/LES/incompressible/Make/options b/src/turbulenceModels/LES/incompressible/Make/options deleted file mode 100644 index a2991710f1..0000000000 --- a/src/turbulenceModels/LES/incompressible/Make/options +++ /dev/null @@ -1,12 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I../LESdeltas/lnInclude \ - -I../LESfilters/lnInclude \ - -I$(LIB_SRC)/transportModels - -LIB_LIBS = \ - -lLESdeltas \ - -lLESfilters\ - -lfiniteVolume \ - -lmeshTools diff --git a/src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.C b/src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.C deleted file mode 100644 index 3011677064..0000000000 --- a/src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.C +++ /dev/null @@ -1,100 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "Smagorinsky.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(Smagorinsky, 0); -addToRunTimeSelectionTable(LESModel, Smagorinsky, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Smagorinsky::Smagorinsky -( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport -) -: - LESModel(typeName, U, phi, transport), - GenEddyVisc(U, phi, transport), - - ck_ - ( - dimensioned::lookupOrAddToDict - ( - "ck", - coeffDict(), - 0.094 - ) - ) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Smagorinsky::correct(const tmp& gradU) -{ - GenEddyVisc::correct(gradU); - - nuSgs_ = ck_*delta()*sqrt(k(gradU)); - nuSgs_.correctBoundaryConditions(); -} - - -bool Smagorinsky::read() -{ - if (GenEddyVisc::read()) - { - ck_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.H b/src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.H deleted file mode 100644 index f86578934e..0000000000 --- a/src/turbulenceModels/LES/incompressible/Smagorinsky/Smagorinsky.H +++ /dev/null @@ -1,141 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::incompressible::LESModels::Smagorinsky - -Description - The Isochoric Smagorinsky Model for incompressible flows. - - Algebraic eddy viscosity SGS model founded on the assumption that - local equilibrium prevails. - Thus, - @verbatim - B = 2/3*k*I - 2*nuSgs*dev(D) - Beff = 2/3*k*I - 2*nuEff*dev(D) - - where - - D = symm(grad(U)); - k = (2*ck/ce)*delta^2*||D||^2 - nuSgs = ck*sqrt(k)*delta - nuEff = nuSgs + nu - @endverbatim - -SourceFiles - Smagorinsky.C - -\*---------------------------------------------------------------------------*/ - -#ifndef Smagorinsky_H -#define Smagorinsky_H - -#include "GenEddyVisc.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class Smagorinsky Declaration -\*---------------------------------------------------------------------------*/ - -class Smagorinsky -: - public GenEddyVisc -{ - // Private data - - dimensionedScalar ck_; - - - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - Smagorinsky(const Smagorinsky&); - Smagorinsky& operator=(const Smagorinsky&); - - -public: - - //- Runtime type information - TypeName("Smagorinsky"); - - // Constructors - - //- Construct from components - Smagorinsky - ( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport - ); - - - // Destructor - - ~Smagorinsky() - {} - - - // Member Functions - - //- Return SGS kinetic energy - // calculated from the given velocity gradient - tmp k(const tmp& gradU) const - { - return (2.0*ck_/ce_)*sqr(delta())*magSqr(dev(symm(gradU))); - } - - //- Return SGS kinetic energy - tmp k() const - { - return k(fvc::grad(U())); - } - - - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp& gradU); - - //- Read turbulenceProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.C b/src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.C deleted file mode 100644 index 351db3526e..0000000000 --- a/src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.C +++ /dev/null @@ -1,124 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "Smagorinsky2.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(Smagorinsky2, 0); -addToRunTimeSelectionTable(LESModel, Smagorinsky2, dictionary); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Smagorinsky2::Smagorinsky2 -( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport -) -: - LESModel(typeName, U, phi, transport), - Smagorinsky(U, phi, transport), - - cD2_ - ( - dimensioned::lookupOrAddToDict - ( - "cD2", - coeffDict(), - 0.02 - ) - ) -{ - printCoeffs(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -// Evaluate B (from the definition of an eddy viscosity model) and -// return it. - -tmp Smagorinsky2::B() const -{ - volSymmTensorField D = dev(symm(fvc::grad(U()))); - - return (((2.0/3.0)*I)*k() - 2.0*nuSgs_*D - (2.0*cD2_)*delta()*(D&D)); -} - - -tmp Smagorinsky2::divDevBeff -( - volVectorField& U -) const -{ - volTensorField gradU = fvc::grad(U); - - volSymmTensorField aniNuEff - ( - "aniNuEff", - I*nuEff() + cD2_*delta()*symm(gradU) - ); - - return - ( - - fvm::laplacian(aniNuEff, U) - fvc::div(nuEff()*dev(fvc::grad(U)().T())) - ); -} - - -bool Smagorinsky2::read() -{ - if (Smagorinsky::read()) - { - cD2.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.H b/src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.H deleted file mode 100644 index 7c780da1e1..0000000000 --- a/src/turbulenceModels/LES/incompressible/Smagorinsky2/Smagorinsky2.H +++ /dev/null @@ -1,131 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::incompressible::LESModels::Smagorinsky2 - -Description - The Isochoric Smagorinsky Model for incompressible flows - - Algebraic eddy viscosity SGS model founded on the assumption that - local equilibrium prevails, hence - @verbatim - B = 2/3*k*I - 2*nuSgs*dev(D) - 2*cD2*delta*(D.dev(D)); - Beff = 2/3*k*I - 2*nuEff*dev(D) - 2*cD2*delta*(D.dev(D)); - - where - - D = symm(grad(U)); - k = cI*delta^2*||D||^2 - nuSgs = ck*sqrt(k)*delta - nuEff = nuSgs + nu - @endverbatim - -SourceFiles - Smagorinsky2.C - -\*---------------------------------------------------------------------------*/ - -#ifndef Smagorinsky2_H -#define Smagorinsky2_H - -#include "Smagorinsky.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class Smagorinsky2 Declaration -\*---------------------------------------------------------------------------*/ - -class Smagorinsky2 -: - public Smagorinsky -{ - // Private data - - dimensionedScalar cD2_; - - - // Private Member Functions - - // Disallow default bitwise copy construct and assignment - Smagorinsky2(const Smagorinsky2&); - Smagorinsky2& operator=(const Smagorinsky2&); - - -public: - - //- Runtime type information - TypeName("Smagorinsky2"); - - - // Constructors - - //- Construct from components - Smagorinsky2 - ( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport - ); - - - // Destructor - - ~Smagorinsky2() - {} - - - // Member Functions - - //- Return B. - tmp B() const; - - //- Returns div(B). - // This is the additional term due to the filtering of the NSE. - tmp divDevBeff(volVectorField& U) const; - - //- Read turbulenceProperties dictionary - bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.C b/src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.C deleted file mode 100644 index 9d5ad49bdd..0000000000 --- a/src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.C +++ /dev/null @@ -1,368 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "SpalartAllmaras.H" -#include "addToRunTimeSelectionTable.H" -#include "wallDist.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(SpalartAllmaras, 0); -addToRunTimeSelectionTable(LESModel, SpalartAllmaras, dictionary); - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -tmp SpalartAllmaras::fv1() const -{ - volScalarField chi3 = pow3(nuTilda_/nu()); - return chi3/(chi3 + pow3(Cv1_)); -} - - -tmp SpalartAllmaras::fv2() const -{ - volScalarField chi = nuTilda_/nu(); - return 1.0/pow3(scalar(1) + chi/Cv2_); -} - - -tmp SpalartAllmaras::fv3() const -{ - volScalarField chi = nuTilda_/nu(); - volScalarField chiByCv2 = (1/Cv2_)*chi; - - return - (scalar(1) + chi*fv1()) - *(1/Cv2_) - *(3*(scalar(1) + chiByCv2) + sqr(chiByCv2)) - /pow3(scalar(1) + chiByCv2); -} - - -tmp SpalartAllmaras::calcS(const volTensorField& gradU) -{ - return ::sqrt(2.0)*mag(skew(gradU)); -} - - -tmp SpalartAllmaras::calcSTilda(const volTensorField& gradU) -{ - return fv3()*calcS(gradU) + fv2()*nuTilda_/sqr(kappa_*dTilda_); -} - - -tmp SpalartAllmaras::r -( - const volScalarField& visc, - const volScalarField& S -) const -{ - tmp tr - ( - new volScalarField - ( - min - ( - visc - /( - max - ( - S, - dimensionedScalar("SMALL", S.dimensions(), SMALL) - ) - *sqr(kappa_*dTilda_) - + dimensionedScalar - ( - "ROOTVSMALL", - dimensionSet(0, 2 , -1, 0, 0), - ROOTVSMALL - ) - ), - scalar(10.0) - ) - ) - ); - - return tr; -} - - -tmp SpalartAllmaras::fw(const volScalarField& S) const -{ - volScalarField r = this->r(nuTilda_, S); - - volScalarField g = r + Cw2_*(pow6(r) - r); - - return g*pow((1.0 + pow6(Cw3_))/(pow6(g) + pow6(Cw3_)), 1.0/6.0); -} - - -void SpalartAllmaras::dTildaUpdate(const volScalarField&) -{ - if (mesh_.changing()) - { - dTilda_ = min(CDES_*delta(), wallDist(mesh_).y()); - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -SpalartAllmaras::SpalartAllmaras -( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport, - const word& modelName -) -: - LESModel(modelName, U, phi, transport), - - alphaNut_ - ( - dimensioned::lookupOrAddToDict - ( - "alphaNut", - coeffDict(), - 1.5 - ) - ), - kappa_ - ( - dimensioned::lookupOrAddToDict - ( - "kappa", - *this, - 0.4187 - ) - ), - Cb1_ - ( - dimensioned::lookupOrAddToDict - ( - "Cb1", - coeffDict(), - 0.1355 - ) - ), - Cb2_ - ( - dimensioned::lookupOrAddToDict - ( - "Cb2", - coeffDict(), - 0.622 - ) - ), - Cv1_ - ( - dimensioned::lookupOrAddToDict - ( - "Cv1", - coeffDict(), - 7.1 - ) - ), - Cv2_ - ( - dimensioned::lookupOrAddToDict - ( - "Cv2", - coeffDict(), - 5.0 - ) - ), - CDES_ - ( - dimensioned::lookupOrAddToDict - ( - "CDES", - coeffDict(), - 0.65 - ) - ), - ck_ - ( - dimensioned::lookupOrAddToDict - ( - "ck", - coeffDict(), - 0.07 - ) - ), - Cw1_(Cb1_/sqr(kappa_) + alphaNut_*(1.0 + Cb2_)), - Cw2_ - ( - dimensioned::lookupOrAddToDict - ( - "Cw2", - coeffDict(), - 0.3 - ) - ), - Cw3_ - ( - dimensioned::lookupOrAddToDict - ( - "Cw3", - coeffDict(), - 2.0 - ) - ), - - nuTilda_ - ( - IOobject - ( - "nuTilda", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ), - - dTilda_(min(CDES_*delta(), wallDist(mesh_).y())), - - nuSgs_ - ( - IOobject - ( - "nuSgs", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh_ - ) -{} - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void SpalartAllmaras::correct(const tmp& gradU) -{ - LESModel::correct(gradU); - - const volScalarField STilda = calcSTilda(gradU); - - const volScalarField S = calcS(gradU); - - dTildaUpdate(S); - - solve - ( - fvm::ddt(nuTilda_) - + fvm::div(phi(), nuTilda_) - - fvm::laplacian - ( - alphaNut_*(nuTilda_ + nu()), - nuTilda_, - "laplacian(DnuTildaEff,nuTilda)" - ) - - alphaNut_*Cb2_*magSqr(fvc::grad(nuTilda_)) - == - Cb1_*STilda*nuTilda_ - - fvm::Sp(Cw1_*fw(STilda)*nuTilda_/sqr(dTilda_), nuTilda_) - ); - - bound(nuTilda_, dimensionedScalar("zero", nuTilda_.dimensions(), 0.0)); - nuTilda_.correctBoundaryConditions(); - - nuSgs_.internalField() = fv1()*nuTilda_.internalField(); - nuSgs_.correctBoundaryConditions(); -} - - -tmp SpalartAllmaras::epsilon() const -{ - return 2.0*nuEff()*magSqr(symm(fvc::grad(U()))); -} - - -tmp SpalartAllmaras::B() const -{ - return ((2.0/3.0)*I)*k() - nuSgs()*twoSymm(fvc::grad(U())); -} - - -tmp SpalartAllmaras::devBeff() const -{ - return -nuEff()*dev(twoSymm(fvc::grad(U()))); -} - - -tmp SpalartAllmaras::divDevBeff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(fvc::grad(U)().T())) - ); -} - - -bool SpalartAllmaras::read() -{ - if (LESModel::read()) - { - alphaNut_.readIfPresent(coeffDict()); - kappa_.readIfPresent(*this); - Cb1_.readIfPresent(coeffDict()); - Cb2_.readIfPresent(coeffDict()); - Cv1_.readIfPresent(coeffDict()); - Cv2_.readIfPresent(coeffDict()); - CDES_.readIfPresent(coeffDict()); - ck_.readIfPresent(coeffDict()); - Cw1_ = Cb1_/sqr(kappa_) + alphaNut_*(1.0 + Cb2_); - Cw2_.readIfPresent(coeffDict()); - Cw3_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.H deleted file mode 100644 index 1bcecd018f..0000000000 --- a/src/turbulenceModels/LES/incompressible/SpalartAllmaras/SpalartAllmaras.H +++ /dev/null @@ -1,190 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::LESmodels::SpalartAllmaras - -Description - SpalartAllmaras DES (SA + LES) turbulence model for incompressible flows - -SourceFiles - SpalartAllmaras.C - -\*---------------------------------------------------------------------------*/ - -#ifndef SpalartAllmaras_H -#define SpalartAllmaras_H - -#include "LESModel.H" -#include "volFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class SpalartAllmaras Declaration -\*---------------------------------------------------------------------------*/ - -class SpalartAllmaras -: - public LESModel -{ - // Private member functions - - // Disallow default bitwise copy construct and assignment - SpalartAllmaras(const SpalartAllmaras&); - SpalartAllmaras& operator=(const SpalartAllmaras&); - - -protected: - - // Protected data - - dimensionedScalar alphaNut_; - dimensionedScalar kappa_; - - - // Model constants - - dimensionedScalar Cb1_; - dimensionedScalar Cb2_; - dimensionedScalar Cv1_; - dimensionedScalar Cv2_; - dimensionedScalar CDES_; - dimensionedScalar ck_; - dimensionedScalar Cw1_; - dimensionedScalar Cw2_; - dimensionedScalar Cw3_; - - - // Fields - - volScalarField nuTilda_; - volScalarField dTilda_; - volScalarField nuSgs_; - - - // Protected member functions - - // Helper functions - - virtual tmp fv1() const; - virtual tmp fv2() const; - virtual tmp fv3() const; - //- - virtual tmp calcS(const volTensorField& gradU); - virtual tmp calcSTilda(const volTensorField& gradU); - virtual tmp r - ( - const volScalarField& visc, - const volScalarField& S - ) const; - virtual tmp fw(const volScalarField& S) const; - - //- Length scale calculation - virtual void dTildaUpdate(const volScalarField& S); - - -public: - - //- Runtime type information - TypeName("SpalartAllmaras"); - - - // Constructors - - //- Constructor from components - SpalartAllmaras - ( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport, - const word& modelName = typeName - ); - - - // Destructor - - virtual ~SpalartAllmaras() - {} - - - // Member Functions - - //- Return SGS kinetic energy - tmp k() const - { - return sqr(nuSgs()/ck_/dTilda_); - } - - //- Return sub-grid disipation rate - tmp epsilon() const; - - tmp nuTilda() const - { - return nuTilda_; - } - - //- Return SGS viscosity - tmp nuSgs() const - { - return nuSgs_; - } - - //- Return the sub-grid stress tensor. - tmp B() const; - - //- Return the effective sub-grid turbulence stress tensor - // including the laminar stress - tmp devBeff() const; - - //- Return the deviatoric part of the divergence of Beff - // i.e. the additional term in the filtered NSE. - tmp divDevBeff(volVectorField& U) const; - - //- Correct nuTilda and related properties - virtual void correct(const tmp& gradU); - - //- Read turbulenceProperties dictionary - virtual bool read(); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/incompressible/SpalartAllmarasDDES/SpalartAllmarasDDES.C b/src/turbulenceModels/LES/incompressible/SpalartAllmarasDDES/SpalartAllmarasDDES.C deleted file mode 100644 index 6f5435a268..0000000000 --- a/src/turbulenceModels/LES/incompressible/SpalartAllmarasDDES/SpalartAllmarasDDES.C +++ /dev/null @@ -1,120 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "SpalartAllmarasDDES.H" -#include "addToRunTimeSelectionTable.H" -#include "wallDist.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(SpalartAllmarasDDES, 0); -addToRunTimeSelectionTable(LESModel, SpalartAllmarasDDES, dictionary); - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -tmp SpalartAllmarasDDES::rd -( - const volScalarField& visc, - const volScalarField& S -) const -{ - volScalarField d = wallDist(mesh_).y(); - - tmp trd - ( - new volScalarField - ( - min - ( - visc - /( - max - ( - S, - dimensionedScalar("SMALL", S.dimensions(), SMALL) - )*sqr(kappa_*d) - + dimensionedScalar - ( - "ROOTVSMALL", - dimensionSet(0, 2 , -1, 0, 0), - ROOTVSMALL - ) - ), scalar(10.0) - ) - ) - ); - - return trd; -} - - -tmp SpalartAllmarasDDES::fd(const volScalarField& S) -{ - return 1.0 - tanh(pow3(8.0*rd(nuSgs_ + transport().nu(), S))); -} - - -void SpalartAllmarasDDES::dTildaUpdate(const volScalarField& S) -{ - dTilda_ = - wallDist(mesh_).y() - - fd(S)*max - ( - dimensionedScalar("zero", dimLength, 0.0), - wallDist(mesh_).y() - CDES_*delta() - ); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -SpalartAllmarasDDES::SpalartAllmarasDDES -( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport -) -: - SpalartAllmaras(U, phi, transport, typeName) -{} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/incompressible/SpalartAllmarasDDES/SpalartAllmarasDDES.H b/src/turbulenceModels/LES/incompressible/SpalartAllmarasDDES/SpalartAllmarasDDES.H deleted file mode 100644 index d905c34710..0000000000 --- a/src/turbulenceModels/LES/incompressible/SpalartAllmarasDDES/SpalartAllmarasDDES.H +++ /dev/null @@ -1,118 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::LESmodels::SpalartAllmarasDDES - -Description - SpalartAllmaras DDES LES turbulence model for incompressible flows - - Reference: - P.R. Spalart, S. Deck, S., M.L.Shur, K.D. Squires, M.Kh Strelets, and - A. Travin. `A new version of detached-eddy simulation, resistant to - ambiguous grid densities'. Theor. Comp. Fluid Dyn., 20:181-195, 2006. - -SourceFiles - SpalartAllmarasDDES.C - -\*---------------------------------------------------------------------------*/ - -#ifndef SpalartAllmarasDDES_H -#define SpalartAllmarasDDES_H - -#include "SpalartAllmaras.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ -namespace LESModels -{ - -/*---------------------------------------------------------------------------*\ - Class SpalartAllmarasDDES Declaration -\*---------------------------------------------------------------------------*/ - -class SpalartAllmarasDDES -: - public SpalartAllmaras -{ - // Private member functions - - // Disallow default bitwise copy construct and assignment - SpalartAllmarasDDES(const SpalartAllmarasDDES&); - SpalartAllmarasDDES& operator=(const SpalartAllmarasDDES&); - - -protected: - - // Protected member functions - - tmp fd(const volScalarField& S); - tmp rd - ( - const volScalarField& visc, - const volScalarField& S - ) const; - - //- Length scale calculation - virtual void dTildaUpdate(const volScalarField& S); - - -public: - - //- Runtime type information - TypeName("SpalartAllmarasDDES"); - - - // Constructors - - //- Constructor from components - SpalartAllmarasDDES - ( - const volVectorField& U, - const surfaceScalarField& phi, - transportModel& transport - ); - - - //- Destructor - virtual ~SpalartAllmarasDDES() - {} -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace LESModels -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/LES/incompressible/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C b/src/turbulenceModels/LES/incompressible/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C deleted file mode 100644 index 36e6a46a4e..0000000000 --- a/src/turbulenceModels/LES/incompressible/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C +++ /dev/null @@ -1,140 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "IDDESDelta.H" -#include "addToRunTimeSelectionTable.H" -#include "wallDist.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(IDDESDelta, 0); - addToRunTimeSelectionTable(LESdelta, IDDESDelta, dictionary); -} - - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void Foam::IDDESDelta::calcDelta() -{ - const Vector