From 1a8a7148fe51c99fd69c2b6410545eb151e0c0df Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Mon, 11 May 2015 11:41:43 +0100 Subject: [PATCH] Immersed boundary solver, Zeljko Tukovic and Hrvoje Jasak --- .../solvers/immersedBoundary/SOLVER_COOKBOOK | 49 + .../immersedBoundary/icoIbFoam/Make/files | 3 + .../immersedBoundary/icoIbFoam/Make/options | 15 + .../immersedBoundary/icoIbFoam/createFields.H | 55 + .../immersedBoundary/icoIbFoam/icoIbFoam.C | 128 + .../immersedBoundary/interIbFoam/Make/files | 3 + .../immersedBoundary/interIbFoam/Make/options | 24 + .../immersedBoundary/interIbFoam/UEqn.H | 34 + .../immersedBoundary/interIbFoam/alphaEqn.H | 37 + .../immersedBoundary/interIbFoam/correctPhi.H | 56 + .../interIbFoam/createFields.H | 138 + .../interIbFoam/interIbFoam.C | 136 + .../immersedBoundary/interIbFoam/limitU.H | 24 + .../immersedBoundary/interIbFoam/pEqn.H | 64 + .../porousSimpleIbFoam/Make/files | 3 + .../porousSimpleIbFoam/Make/options | 22 + .../porousSimpleIbFoam/UEqn.H | 17 + .../porousSimpleIbFoam/convergenceCheck.H | 9 + .../porousSimpleIbFoam/createFields.H | 44 + .../porousSimpleIbFoam/initConvergenceCheck.H | 7 + .../porousSimpleIbFoam/pEqn.H | 51 + .../porousSimpleIbFoam/porousSimpleIbFoam.C | 92 + .../potentialIbFoam/Make/files | 3 + .../potentialIbFoam/Make/options | 15 + .../potentialIbFoam/createFields.H | 49 + .../potentialIbFoam/potentialIbFoam.C | 229 + .../immersedBoundary/simpleIbFoam/Make/files | 3 + .../simpleIbFoam/Make/options | 22 + .../immersedBoundary/simpleIbFoam/UEqn.H | 15 + .../simpleIbFoam/convergenceCheck.H | 9 + .../simpleIbFoam/createFields.H | 42 + .../simpleIbFoam/initConvergenceCheck.H | 7 + .../immersedBoundary/simpleIbFoam/pEqn.H | 51 + .../simpleIbFoam/simpleIbFoam.C | 91 + .../ibContinuityError/Make/files | 3 + .../ibContinuityError/Make/options | 14 + .../ibContinuityError/ibContinuityError.C | 93 + .../makeTriSurfaceMesh/Make/files | 3 + .../makeTriSurfaceMesh/Make/options | 10 + .../makeTriSurfaceMesh/makeTriSurfaceMesh.C | 76 + .../refineImmersedBoundaryMesh/Make/files | 3 + .../refineImmersedBoundaryMesh/Make/options | 15 + .../refineImmersedBoundaryMesh.C | 93 + .../surfaceInvertNormal/Make/files | 3 + .../surfaceInvertNormal/Make/options | 7 + .../surfaceInvertNormal/surfaceInvertNormal.C | 79 + .../immersedBoundary/surfaceNormal/Make/files | 3 + .../surfaceNormal/Make/options | 7 + .../surfaceNormal/surfaceNormal.C | 69 + .../immersedBoundary/writeIbMasks/Make/files | 3 + .../writeIbMasks/Make/options | 15 + .../writeIbMasks/writeIbMasks.C | 62 + src/Allwmake | 4 + .../immersedBoundary/Make/files | 17 + .../immersedBoundary/Make/options | 15 + ...lFlowRateInletVelocityFvPatchVectorField.C | 225 + ...lFlowRateInletVelocityFvPatchVectorField.H | 202 + .../immersedBoundaryAdjustPhi.C | 281 + .../immersedBoundaryAdjustPhi.H | 60 + .../immersedBoundaryFvPatch.C | 2565 + .../immersedBoundaryFvPatch.H | 572 + .../immersedBoundaryFvPatchLeastSquaresFit.C | 594 + .../immersedBoundaryFvPatchSamplingWeights.C | 208 + .../immersedBoundaryFvPatchTemplates.C | 324 + .../immersedBoundaryFvPatchTriAddressing.C | 201 + .../immersedBoundaryFvPatchField.C | 1099 + .../immersedBoundaryFvPatchField.H | 402 + .../immersedBoundaryFvPatchFields.C | 45 + .../immersedBoundaryFvPatchFields.H | 50 + .../immersedBoundaryFvPatchFieldsFwd.H | 52 + .../immersedBoundaryFvsPatchField.C | 129 + .../immersedBoundaryFvsPatchField.H | 195 + .../immersedBoundaryFvsPatchFields.C | 47 + .../immersedBoundaryFvsPatchFields.H | 50 + .../immersedBoundaryFvsPatchFieldsFwd.H | 52 + .../immersedBoundaryPointPatch.C | 47 + .../immersedBoundaryPointPatch.H | 93 + .../immersedBoundaryPolyPatch.C | 296 + .../immersedBoundaryPolyPatch.H | 235 + .../immersedBoundary/include/createIbMasks.H | 72 + .../include/immersedBoundaryContinuityErrs.H | 52 + .../include/immersedBoundaryCourantNo.H | 59 + .../refineImmersedBoundaryMesh.C | 475 + .../refineImmersedBoundaryMesh.H | 139 + .../IOimmersedBoundaryForces.H | 50 + .../immersedBoundaryForce/Make/files | 4 + .../immersedBoundaryForce/Make/options | 28 + .../immersedBoundaryForces.C | 249 + .../immersedBoundaryForces.H | 107 + .../immersedBoundaryForcesFunctionObject.C | 47 + .../immersedBoundaryForcesFunctionObject.H | 55 + .../immersedBoundaryTurbulence/Make/files | 6 + .../immersedBoundaryTurbulence/Make/options | 26 + ...aryEpsilonWallFunctionFvPatchScalarField.C | 394 + ...aryEpsilonWallFunctionFvPatchScalarField.H | 202 + ...ndaryOmegaWallFunctionFvPatchScalarField.C | 386 + ...ndaryOmegaWallFunctionFvPatchScalarField.H | 217 + ...ryVelocityWallFunctionFvPatchVectorField.C | 224 + ...ryVelocityWallFunctionFvPatchVectorField.H | 229 + ...immersedBoundaryWallFunctionFvPatchField.C | 183 + ...immersedBoundaryWallFunctionFvPatchField.H | 227 + ...mmersedBoundaryWallFunctionFvPatchFields.C | 51 + ...mmersedBoundaryWallFunctionFvPatchFields.H | 56 + tutorials/immersedBoundary/Allclean | 25 + tutorials/immersedBoundary/Allrun | 25 + .../.gitignore | 52 + .../0_org/U | 71 + .../0_org/epsilon | 64 + .../0_org/k | 61 + .../0_org/nut | 62 + .../0_org/p | 67 + .../Allclean | 13 + .../Allrun | 15 + .../constant/RASProperties | 23 + .../constant/polyMesh/blockMeshDict | 71 + .../constant/transportProperties | 23 + .../triSurface/pitzDailyIB-contour.ftr | 2267 + .../triSurface/pitzDailyIB-contour.stl | 7848 + .../constant/triSurface/pitzDailyIB.ftr | 1917 + .../constant/triSurface/pitzDailyIB.stl | 6626 + .../save/blockMeshDict | 71 + .../save/boundary | 59 + .../system/controlDict | 104 + .../system/decomposeParDict | 50 + .../system/fvSchemes | 65 + .../system/fvSolution | 106 + .../cylBumpInterIbFoam/.gitignore | 52 + .../cylBumpInterIbFoam/0_org/U | 62 + .../cylBumpInterIbFoam/0_org/alpha1 | 67 + .../cylBumpInterIbFoam/0_org/pd | 67 + .../cylBumpInterIbFoam/Allclean | 9 + .../cylBumpInterIbFoam/Allrun | 15 + .../cylBumpInterIbFoam/constant/g | 21 + .../constant/polyMesh/blockMeshDict | 69 + .../constant/transportProperties | 34 + .../constant/triSurface/ibCylinder.ftr | 210 + .../constant/triSurface/ibCylinder.stl | 674 + .../constant/turbulenceProperties | 20 + .../cylBumpInterIbFoam/save/blockMeshDict | 69 + .../cylBumpInterIbFoam/save/boundary | 60 + .../cylBumpInterIbFoam/system/controlDict | 56 + .../system/decomposeParDict | 50 + .../cylBumpInterIbFoam/system/fvSchemes | 59 + .../cylBumpInterIbFoam/system/fvSolution | 104 + .../cylBumpInterIbFoam/system/mapFieldsDict | 31 + .../cylBumpInterIbFoam/system/setFieldsDict | 35 + .../cylinderInChannelFineIcoIbFoam/.gitignore | 52 + .../cylinderInChannelFineIcoIbFoam/0_org/U | 70 + .../cylinderInChannelFineIcoIbFoam/0_org/p | 68 + .../cylinderInChannelFineIcoIbFoam/Allclean | 9 + .../cylinderInChannelFineIcoIbFoam/Allrun | 15 + .../constant/polyMesh/blockMeshDict | 69 + .../constant/transportProperties | 24 + .../constant/triSurface/ibCylinder.ftr | 210 + .../constant/triSurface/ibCylinder.stl | 674 + .../save/blockMeshDict | 69 + .../save/boundary | 60 + .../system/controlDict | 84 + .../system/decomposeParDict | 50 + .../system/fvSchemes | 64 + .../system/fvSolution | 69 + .../system/mapFieldsDict | 31 + .../cylinderInChannelIcoIbFoam/.gitignore | 52 + .../cylinderInChannelIcoIbFoam/0_org/U | 68 + .../cylinderInChannelIcoIbFoam/0_org/p | 68 + .../cylinderInChannelIcoIbFoam/Allclean | 9 + .../cylinderInChannelIcoIbFoam/Allrun | 15 + .../constant/polyMesh/blockMeshDict | 69 + .../constant/transportProperties | 22 + .../constant/triSurface/ibCylinder.ftr | 210 + .../constant/triSurface/ibCylinder.stl | 674 + .../save/blockMeshDict | 69 + .../cylinderInChannelIcoIbFoam/save/boundary | 60 + .../system/controlDict | 88 + .../system/decomposeParDict | 50 + .../system/fvSchemes | 59 + .../system/fvSolution | 69 + .../system/mapFieldsDict | 31 + .../cylinderInChannelPotential/.gitignore | 52 + .../cylinderInChannelPotential/0_org/U | 69 + .../cylinderInChannelPotential/0_org/p | 69 + .../cylinderInChannelPotential/Allclean | 9 + .../cylinderInChannelPotential/Allrun | 14 + .../constant/polyMesh/blockMeshDict | 70 + .../constant/transportProperties | 28 + .../constant/triSurface/ibCylinder.ftr | 210 + .../constant/triSurface/ibCylinder.stl | 674 + .../save/blockMeshDict | 70 + .../cylinderInChannelPotential/save/boundary | 60 + .../system/controlDict | 73 + .../system/decomposeParDict | 50 + .../system/fvSchemes | 59 + .../system/fvSolution | 73 + .../system/mapFieldsDict | 31 + .../.gitignore | 52 + .../cylinderInChannelScalarTransport/0_org/T | 66 + .../cylinderInChannelScalarTransport/0_org/U | 69 + .../cylinderInChannelScalarTransport/0_org/p | 69 + .../cylinderInChannelScalarTransport/Allclean | 9 + .../cylinderInChannelScalarTransport/Allrun | 15 + .../constant/polyMesh/blockMeshDict | 70 + .../constant/transportProperties | 22 + .../constant/triSurface/ibCylinder.ftr | 210 + .../constant/triSurface/ibCylinder.stl | 674 + .../save/blockMeshDict | 70 + .../save/boundary | 60 + .../system/controlDict | 53 + .../system/decomposeParDict | 50 + .../system/fvSchemes | 58 + .../system/fvSolution | 44 + .../system/mapFieldsDict | 31 + .../cylinderInSquareLaplace/.gitignore | 52 + .../cylinderInSquareLaplace/0_org/T | 67 + .../cylinderInSquareLaplace/Allclean | 9 + .../cylinderInSquareLaplace/Allrun | 14 + .../constant/polyMesh/blockMeshDict | 69 + .../constant/transportProperties | 22 + .../constant/triSurface/ibCylinder.ftr | 210 + .../constant/triSurface/ibCylinder.stl | 674 + .../save/blockMeshDict | 69 + .../cylinderInSquareLaplace/save/boundary | 60 + .../system/controlDict | 50 + .../system/decomposeParDict | 50 + .../cylinderInSquareLaplace/system/fvSchemes | 50 + .../cylinderInSquareLaplace/system/fvSolution | 48 + .../system/mapFieldsDict | 31 + .../cylinderInSquarePotential/.gitignore | 52 + .../cylinderInSquarePotential/0_org/U | 69 + .../cylinderInSquarePotential/0_org/p | 69 + .../cylinderInSquarePotential/Allclean | 9 + .../cylinderInSquarePotential/Allrun | 14 + .../constant/polyMesh/blockMeshDict | 69 + .../constant/transportProperties | 28 + .../constant/triSurface/ibCylinder.ftr | 210 + .../constant/triSurface/ibCylinder.stl | 674 + .../save/blockMeshDict | 69 + .../cylinderInSquarePotential/save/boundary | 60 + .../system/controlDict | 66 + .../system/decomposeParDict | 50 + .../system/fvSchemes | 60 + .../system/fvSolution | 73 + .../system/mapFieldsDict | 31 + .../pitzDailyBodyFitted/.gitignore | 52 + .../pitzDailyBodyFitted/0_org/R | 50 + .../pitzDailyBodyFitted/0_org/U | 52 + .../pitzDailyBodyFitted/0_org/epsilon | 58 + .../pitzDailyBodyFitted/0_org/k | 50 + .../pitzDailyBodyFitted/0_org/nuTilda | 50 + .../pitzDailyBodyFitted/0_org/nut | 57 + .../pitzDailyBodyFitted/0_org/p | 50 + .../pitzDailyBodyFitted/0_org/y | 12375 ++ .../pitzDailyBodyFitted/0_org/yPlus | 532 + .../pitzDailyBodyFitted/Allclean | 8 + .../pitzDailyBodyFitted/Allrun | 14 + .../constant/RASProperties | 200 + .../constant/polyMesh/blockMeshDict | 153 + .../constant/transportProperties | 37 + .../pitzDailyBodyFitted/system/controlDict | 92 + .../pitzDailyBodyFitted/system/fvSchemes | 70 + .../pitzDailyBodyFitted/system/fvSolution | 66 + .../pitzDailyLaminarIcoIbFoam/.gitignore | 52 + .../pitzDailyLaminarIcoIbFoam/0_org/U | 111 + .../pitzDailyLaminarIcoIbFoam/0_org/p | 67 + .../pitzDailyLaminarIcoIbFoam/Allclean | 9 + .../pitzDailyLaminarIcoIbFoam/Allrun | 15 + .../constant/polyMesh/blockMeshDict | 70 + .../constant/transportProperties | 22 + .../triSurface/pitzDailyIB-contour.ftr | 2267 + .../triSurface/pitzDailyIB-contour.stl | 7848 + .../constant/triSurface/pitzDailyIB.ftr | 1917 + .../constant/triSurface/pitzDailyIB.stl | 6626 + .../save/blockMeshDict | 70 + .../pitzDailyLaminarIcoIbFoam/save/boundary | 60 + .../system/controlDict | 66 + .../system/decomposeParDict | 50 + .../system/fvSchemes | 61 + .../system/fvSolution | 88 + .../pitzDailyLaminarSimpleIbFoam/.gitignore | 52 + .../pitzDailyLaminarSimpleIbFoam/0_org/U | 111 + .../pitzDailyLaminarSimpleIbFoam/0_org/p | 67 + .../pitzDailyLaminarSimpleIbFoam/Allclean | 9 + .../pitzDailyLaminarSimpleIbFoam/Allrun | 15 + .../constant/RASProperties | 23 + .../constant/polyMesh/blockMeshDict | 70 + .../constant/transportProperties | 23 + .../triSurface/pitzDailyIB-contour.ftr | 2267 + .../triSurface/pitzDailyIB-contour.stl | 7848 + .../constant/triSurface/pitzDailyIB.ftr | 1917 + .../constant/triSurface/pitzDailyIB.stl | 6626 + .../save/blockMeshDict | 70 + .../save/boundary | 59 + .../system/controlDict | 88 + .../system/decomposeParDict | 50 + .../system/fvSchemes | 60 + .../system/fvSolution | 85 + .../pitzDailyTurbulentSimpleIbFoam/.gitignore | 52 + .../pitzDailyTurbulentSimpleIbFoam/0_org/U | 68 + .../0_org/epsilon | 65 + .../pitzDailyTurbulentSimpleIbFoam/0_org/k | 62 + .../pitzDailyTurbulentSimpleIbFoam/0_org/nut | 62 + .../pitzDailyTurbulentSimpleIbFoam/0_org/p | 67 + .../pitzDailyTurbulentSimpleIbFoam/Allclean | 9 + .../pitzDailyTurbulentSimpleIbFoam/Allrun | 15 + .../constant/RASProperties | 23 + .../constant/polyMesh/blockMeshDict | 71 + .../constant/transportProperties | 23 + .../triSurface/pitzDailyIB-contour.ftr | 2267 + .../triSurface/pitzDailyIB-contour.stl | 7848 + .../constant/triSurface/pitzDailyIB.ftr | 1917 + .../constant/triSurface/pitzDailyIB.stl | 6626 + .../save/blockMeshDict | 71 + .../save/boundary | 59 + .../system/controlDict | 111 + .../system/decomposeParDict | 50 + .../system/fvSchemes | 65 + .../system/fvSolution | 106 + .../porousBumpChannelBodyFitted/.gitignore | 52 + .../porousBumpChannelBodyFitted/0_org/U | 45 + .../porousBumpChannelBodyFitted/0_org/epsilon | 47 + .../porousBumpChannelBodyFitted/0_org/k | 47 + .../porousBumpChannelBodyFitted/0_org/nut | 45 + .../porousBumpChannelBodyFitted/0_org/p | 42 + .../porousBumpChannelBodyFitted/Allclean | 8 + .../porousBumpChannelBodyFitted/Allrun | 15 + .../constant/RASProperties | 24 + .../constant/polyMesh/blockMeshDict | 96 + .../constant/porousZones | 36 + .../constant/transportProperties | 21 + .../porousBumpChannelBodyFitted/setSet.batch | 2 + .../system/controlDict | 50 + .../system/fvSchemes | 63 + .../system/fvSolution | 67 + .../porousBumpChannelIb/.gitignore | 52 + .../porousBumpChannelIb/0_org/U | 59 + .../porousBumpChannelIb/0_org/epsilon | 61 + .../porousBumpChannelIb/0_org/k | 58 + .../porousBumpChannelIb/0_org/nut | 56 + .../porousBumpChannelIb/0_org/p | 55 + .../porousBumpChannelIb/Allclean | 9 + .../porousBumpChannelIb/Allrun | 18 + .../constant/RASProperties | 24 + .../constant/polyMesh/blockMeshDict | 69 + .../porousBumpChannelIb/constant/porousZones | 36 + .../constant/transportProperties | 21 + .../constant/triSurface/porousBumpChannel.ftr | 1062 + .../constant/triSurface/porousBumpChannel.stl | 3642 + .../porousBumpChannelIb/save/blockMeshDict | 69 + .../porousBumpChannelIb/save/boundary | 55 + .../porousBumpChannelIb/save/setSet.batch | 2 + .../porousBumpChannelIb/setSet.batch | 2 + .../porousBumpChannelIb/system/controlDict | 96 + .../system/decomposeParDict | 50 + .../porousBumpChannelIb/system/fvSchemes | 65 + .../porousBumpChannelIb/system/fvSolution | 106 + .../simpleSilencerLaminarIcoIbFoam/.gitignore | 52 + .../simpleSilencerLaminarIcoIbFoam/0_org/U | 70 + .../simpleSilencerLaminarIcoIbFoam/0_org/p | 72 + .../simpleSilencerLaminarIcoIbFoam/Allclean | 9 + .../simpleSilencerLaminarIcoIbFoam/Allrun | 24 + .../constant/immersedBoundaryProperties | 28 + .../constant/transportProperties | 22 + .../constant/triSurface/silencer.ftr | 8390 ++ .../save/blockMeshDict | 73 + .../save/boundary | 65 + .../system/cellSetDict | 126 + .../system/controlDict | 79 + .../system/decomposeParDict | 50 + .../system/fvSchemes | 61 + .../system/fvSolution | 76 + .../system/mapFieldsDict | 31 + .../simpleSilencerLaminarIcoIbFoam/temp.28755 | 0 .../sphereInChannel/.gitignore | 52 + .../immersedBoundary/sphereInChannel/0_org/U | 77 + .../immersedBoundary/sphereInChannel/0_org/p | 71 + .../immersedBoundary/sphereInChannel/Allclean | 10 + .../immersedBoundary/sphereInChannel/Allrun | 26 + .../constant/transportProperties | 22 + .../constant/triSurface/ibSphere.ftr | 109916 +++++++++++++++ .../refineSphereMesh/Make/files | 3 + .../refineSphereMesh/Make/options | 15 + .../refineSphereMesh/refineSphereMesh.C | 170 + .../sphereInChannel/save/blockMeshDict | 72 + .../sphereInChannel/save/boundary | 65 + .../sphereInChannel/system/controlDict | 79 + .../sphereInChannel/system/decomposeParDict | 50 + .../sphereInChannel/system/fvSchemes | 61 + .../sphereInChannel/system/fvSolution | 92 + .../thickPlateRefinedMesh/.gitignore | 52 + .../thickPlateRefinedMesh/0_org/U | 68 + .../thickPlateRefinedMesh/0_org/p | 66 + .../thickPlateRefinedMesh/Allclean | 10 + .../thickPlateRefinedMesh/Allrun | 26 + .../constant/transportProperties | 22 + .../constant/triSurface/ibThickPlate.ftr | 2138 + .../constant/triSurface/ibThickPlate.stl | 7422 + .../refineThickPlateMesh/Make/files | 3 + .../refineThickPlateMesh/Make/options | 15 + .../refineThickPlateMesh.C | 176 + .../thickPlateRefinedMesh/save/blockMeshDict | 69 + .../thickPlateRefinedMesh/save/boundary | 59 + .../thickPlateRefinedMesh/system/controlDict | 66 + .../system/decomposeParDict | 50 + .../thickPlateRefinedMesh/system/fvSchemes | 61 + .../thickPlateRefinedMesh/system/fvSolution | 77 + .../thickPlateRefinedMesh/temp.11283 | 50 + 405 files changed, 253902 insertions(+) create mode 100644 applications/solvers/immersedBoundary/SOLVER_COOKBOOK create mode 100644 applications/solvers/immersedBoundary/icoIbFoam/Make/files create mode 100644 applications/solvers/immersedBoundary/icoIbFoam/Make/options create mode 100644 applications/solvers/immersedBoundary/icoIbFoam/createFields.H create mode 100644 applications/solvers/immersedBoundary/icoIbFoam/icoIbFoam.C create mode 100644 applications/solvers/immersedBoundary/interIbFoam/Make/files create mode 100644 applications/solvers/immersedBoundary/interIbFoam/Make/options create mode 100644 applications/solvers/immersedBoundary/interIbFoam/UEqn.H create mode 100644 applications/solvers/immersedBoundary/interIbFoam/alphaEqn.H create mode 100644 applications/solvers/immersedBoundary/interIbFoam/correctPhi.H create mode 100644 applications/solvers/immersedBoundary/interIbFoam/createFields.H create mode 100644 applications/solvers/immersedBoundary/interIbFoam/interIbFoam.C create mode 100644 applications/solvers/immersedBoundary/interIbFoam/limitU.H create mode 100644 applications/solvers/immersedBoundary/interIbFoam/pEqn.H create mode 100644 applications/solvers/immersedBoundary/porousSimpleIbFoam/Make/files create mode 100644 applications/solvers/immersedBoundary/porousSimpleIbFoam/Make/options create mode 100644 applications/solvers/immersedBoundary/porousSimpleIbFoam/UEqn.H create mode 100644 applications/solvers/immersedBoundary/porousSimpleIbFoam/convergenceCheck.H create mode 100644 applications/solvers/immersedBoundary/porousSimpleIbFoam/createFields.H create mode 100644 applications/solvers/immersedBoundary/porousSimpleIbFoam/initConvergenceCheck.H create mode 100644 applications/solvers/immersedBoundary/porousSimpleIbFoam/pEqn.H create mode 100644 applications/solvers/immersedBoundary/porousSimpleIbFoam/porousSimpleIbFoam.C create mode 100644 applications/solvers/immersedBoundary/potentialIbFoam/Make/files create mode 100644 applications/solvers/immersedBoundary/potentialIbFoam/Make/options create mode 100644 applications/solvers/immersedBoundary/potentialIbFoam/createFields.H create mode 100644 applications/solvers/immersedBoundary/potentialIbFoam/potentialIbFoam.C create mode 100644 applications/solvers/immersedBoundary/simpleIbFoam/Make/files create mode 100644 applications/solvers/immersedBoundary/simpleIbFoam/Make/options create mode 100644 applications/solvers/immersedBoundary/simpleIbFoam/UEqn.H create mode 100644 applications/solvers/immersedBoundary/simpleIbFoam/convergenceCheck.H create mode 100644 applications/solvers/immersedBoundary/simpleIbFoam/createFields.H create mode 100644 applications/solvers/immersedBoundary/simpleIbFoam/initConvergenceCheck.H create mode 100644 applications/solvers/immersedBoundary/simpleIbFoam/pEqn.H create mode 100644 applications/solvers/immersedBoundary/simpleIbFoam/simpleIbFoam.C create mode 100644 applications/utilities/immersedBoundary/ibContinuityError/Make/files create mode 100644 applications/utilities/immersedBoundary/ibContinuityError/Make/options create mode 100644 applications/utilities/immersedBoundary/ibContinuityError/ibContinuityError.C create mode 100644 applications/utilities/immersedBoundary/makeTriSurfaceMesh/Make/files create mode 100644 applications/utilities/immersedBoundary/makeTriSurfaceMesh/Make/options create mode 100644 applications/utilities/immersedBoundary/makeTriSurfaceMesh/makeTriSurfaceMesh.C create mode 100644 applications/utilities/immersedBoundary/refineImmersedBoundaryMesh/Make/files create mode 100644 applications/utilities/immersedBoundary/refineImmersedBoundaryMesh/Make/options create mode 100644 applications/utilities/immersedBoundary/refineImmersedBoundaryMesh/refineImmersedBoundaryMesh.C create mode 100644 applications/utilities/immersedBoundary/surfaceInvertNormal/Make/files create mode 100644 applications/utilities/immersedBoundary/surfaceInvertNormal/Make/options create mode 100644 applications/utilities/immersedBoundary/surfaceInvertNormal/surfaceInvertNormal.C create mode 100644 applications/utilities/immersedBoundary/surfaceNormal/Make/files create mode 100644 applications/utilities/immersedBoundary/surfaceNormal/Make/options create mode 100644 applications/utilities/immersedBoundary/surfaceNormal/surfaceNormal.C create mode 100644 applications/utilities/immersedBoundary/writeIbMasks/Make/files create mode 100644 applications/utilities/immersedBoundary/writeIbMasks/Make/options create mode 100644 applications/utilities/immersedBoundary/writeIbMasks/writeIbMasks.C create mode 100644 src/immersedBoundary/immersedBoundary/Make/files create mode 100644 src/immersedBoundary/immersedBoundary/Make/options create mode 100644 src/immersedBoundary/immersedBoundary/ibSwirlFlowRateInletVelocity/ibSwirlFlowRateInletVelocityFvPatchVectorField.C create mode 100644 src/immersedBoundary/immersedBoundary/ibSwirlFlowRateInletVelocity/ibSwirlFlowRateInletVelocityFvPatchVectorField.H create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryAdjustPhi/immersedBoundaryAdjustPhi.C create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryAdjustPhi/immersedBoundaryAdjustPhi.H create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatch/immersedBoundaryFvPatch.C create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatch/immersedBoundaryFvPatch.H create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatch/immersedBoundaryFvPatchLeastSquaresFit.C create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatch/immersedBoundaryFvPatchSamplingWeights.C create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatch/immersedBoundaryFvPatchTemplates.C create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatch/immersedBoundaryFvPatchTriAddressing.C create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatchField/immersedBoundaryFvPatchField.C create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatchField/immersedBoundaryFvPatchField.H create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatchField/immersedBoundaryFvPatchFields.C create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatchField/immersedBoundaryFvPatchFields.H create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatchField/immersedBoundaryFvPatchFieldsFwd.H create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryFvsPatchField/immersedBoundaryFvsPatchField.C create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryFvsPatchField/immersedBoundaryFvsPatchField.H create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryFvsPatchField/immersedBoundaryFvsPatchFields.C create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryFvsPatchField/immersedBoundaryFvsPatchFields.H create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryFvsPatchField/immersedBoundaryFvsPatchFieldsFwd.H create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryPointPatch/immersedBoundaryPointPatch.C create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryPointPatch/immersedBoundaryPointPatch.H create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryPolyPatch/immersedBoundaryPolyPatch.C create mode 100644 src/immersedBoundary/immersedBoundary/immersedBoundaryPolyPatch/immersedBoundaryPolyPatch.H create mode 100644 src/immersedBoundary/immersedBoundary/include/createIbMasks.H create mode 100644 src/immersedBoundary/immersedBoundary/include/immersedBoundaryContinuityErrs.H create mode 100644 src/immersedBoundary/immersedBoundary/include/immersedBoundaryCourantNo.H create mode 100644 src/immersedBoundary/immersedBoundary/refineImmersedBoundaryMesh/refineImmersedBoundaryMesh.C create mode 100644 src/immersedBoundary/immersedBoundary/refineImmersedBoundaryMesh/refineImmersedBoundaryMesh.H create mode 100644 src/immersedBoundary/immersedBoundaryForce/IOimmersedBoundaryForces.H create mode 100644 src/immersedBoundary/immersedBoundaryForce/Make/files create mode 100644 src/immersedBoundary/immersedBoundaryForce/Make/options create mode 100644 src/immersedBoundary/immersedBoundaryForce/immersedBoundaryForces.C create mode 100644 src/immersedBoundary/immersedBoundaryForce/immersedBoundaryForces.H create mode 100644 src/immersedBoundary/immersedBoundaryForce/immersedBoundaryForcesFunctionObject.C create mode 100644 src/immersedBoundary/immersedBoundaryForce/immersedBoundaryForcesFunctionObject.H create mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/Make/files create mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/Make/options create mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryEpsilonWallFunctions/immersedBoundaryEpsilonWallFunctionFvPatchScalarField.C create mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryEpsilonWallFunctions/immersedBoundaryEpsilonWallFunctionFvPatchScalarField.H create mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryOmegaWallFunctions/immersedBoundaryOmegaWallFunctionFvPatchScalarField.C create mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryOmegaWallFunctions/immersedBoundaryOmegaWallFunctionFvPatchScalarField.H create mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryVelocityWallFunctions/immersedBoundaryVelocityWallFunctionFvPatchVectorField.C create mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryVelocityWallFunctions/immersedBoundaryVelocityWallFunctionFvPatchVectorField.H create mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchField.C create mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchField.H create mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchFields.C create mode 100644 src/immersedBoundary/immersedBoundaryTurbulence/wallFunctions/immersedBoundaryWallFunctions/immersedBoundaryWallFunctionFvPatchFields.H create mode 100755 tutorials/immersedBoundary/Allclean create mode 100755 tutorials/immersedBoundary/Allrun create mode 100644 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/.gitignore create mode 100644 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/0_org/U create mode 100644 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/0_org/epsilon create mode 100644 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/0_org/k create mode 100644 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/0_org/nut create mode 100644 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/0_org/p create mode 100755 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/Allclean create mode 100755 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/Allrun create mode 100644 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/constant/RASProperties create mode 100644 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/constant/polyMesh/blockMeshDict create mode 100644 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/constant/transportProperties create mode 100644 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/constant/triSurface/pitzDailyIB-contour.ftr create mode 100644 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/constant/triSurface/pitzDailyIB-contour.stl create mode 100644 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/constant/triSurface/pitzDailyIB.ftr create mode 100644 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/constant/triSurface/pitzDailyIB.stl create mode 100644 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/save/blockMeshDict create mode 100644 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/save/boundary create mode 100644 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/system/controlDict create mode 100644 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/system/decomposeParDict create mode 100644 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/system/fvSchemes create mode 100644 tutorials/immersedBoundary/backwardStepShortTurbulentSimpleIbFoam/system/fvSolution create mode 100644 tutorials/immersedBoundary/cylBumpInterIbFoam/.gitignore create mode 100644 tutorials/immersedBoundary/cylBumpInterIbFoam/0_org/U create mode 100644 tutorials/immersedBoundary/cylBumpInterIbFoam/0_org/alpha1 create mode 100644 tutorials/immersedBoundary/cylBumpInterIbFoam/0_org/pd create mode 100755 tutorials/immersedBoundary/cylBumpInterIbFoam/Allclean create mode 100755 tutorials/immersedBoundary/cylBumpInterIbFoam/Allrun create mode 100644 tutorials/immersedBoundary/cylBumpInterIbFoam/constant/g create mode 100644 tutorials/immersedBoundary/cylBumpInterIbFoam/constant/polyMesh/blockMeshDict create mode 100644 tutorials/immersedBoundary/cylBumpInterIbFoam/constant/transportProperties create mode 100644 tutorials/immersedBoundary/cylBumpInterIbFoam/constant/triSurface/ibCylinder.ftr create mode 100644 tutorials/immersedBoundary/cylBumpInterIbFoam/constant/triSurface/ibCylinder.stl create mode 100644 tutorials/immersedBoundary/cylBumpInterIbFoam/constant/turbulenceProperties create mode 100644 tutorials/immersedBoundary/cylBumpInterIbFoam/save/blockMeshDict create mode 100644 tutorials/immersedBoundary/cylBumpInterIbFoam/save/boundary create mode 100644 tutorials/immersedBoundary/cylBumpInterIbFoam/system/controlDict create mode 100644 tutorials/immersedBoundary/cylBumpInterIbFoam/system/decomposeParDict create mode 100644 tutorials/immersedBoundary/cylBumpInterIbFoam/system/fvSchemes create mode 100644 tutorials/immersedBoundary/cylBumpInterIbFoam/system/fvSolution create mode 100644 tutorials/immersedBoundary/cylBumpInterIbFoam/system/mapFieldsDict create mode 100644 tutorials/immersedBoundary/cylBumpInterIbFoam/system/setFieldsDict create mode 100644 tutorials/immersedBoundary/cylinderInChannelFineIcoIbFoam/.gitignore create mode 100644 tutorials/immersedBoundary/cylinderInChannelFineIcoIbFoam/0_org/U create mode 100644 tutorials/immersedBoundary/cylinderInChannelFineIcoIbFoam/0_org/p create mode 100755 tutorials/immersedBoundary/cylinderInChannelFineIcoIbFoam/Allclean create mode 100755 tutorials/immersedBoundary/cylinderInChannelFineIcoIbFoam/Allrun create mode 100644 tutorials/immersedBoundary/cylinderInChannelFineIcoIbFoam/constant/polyMesh/blockMeshDict create mode 100644 tutorials/immersedBoundary/cylinderInChannelFineIcoIbFoam/constant/transportProperties create mode 100644 tutorials/immersedBoundary/cylinderInChannelFineIcoIbFoam/constant/triSurface/ibCylinder.ftr create mode 100644 tutorials/immersedBoundary/cylinderInChannelFineIcoIbFoam/constant/triSurface/ibCylinder.stl create mode 100644 tutorials/immersedBoundary/cylinderInChannelFineIcoIbFoam/save/blockMeshDict create mode 100644 tutorials/immersedBoundary/cylinderInChannelFineIcoIbFoam/save/boundary create mode 100644 tutorials/immersedBoundary/cylinderInChannelFineIcoIbFoam/system/controlDict create mode 100644 tutorials/immersedBoundary/cylinderInChannelFineIcoIbFoam/system/decomposeParDict create mode 100644 tutorials/immersedBoundary/cylinderInChannelFineIcoIbFoam/system/fvSchemes create mode 100644 tutorials/immersedBoundary/cylinderInChannelFineIcoIbFoam/system/fvSolution create mode 100644 tutorials/immersedBoundary/cylinderInChannelFineIcoIbFoam/system/mapFieldsDict create mode 100644 tutorials/immersedBoundary/cylinderInChannelIcoIbFoam/.gitignore create mode 100644 tutorials/immersedBoundary/cylinderInChannelIcoIbFoam/0_org/U create mode 100644 tutorials/immersedBoundary/cylinderInChannelIcoIbFoam/0_org/p create mode 100755 tutorials/immersedBoundary/cylinderInChannelIcoIbFoam/Allclean create mode 100755 tutorials/immersedBoundary/cylinderInChannelIcoIbFoam/Allrun create mode 100644 tutorials/immersedBoundary/cylinderInChannelIcoIbFoam/constant/polyMesh/blockMeshDict create mode 100644 tutorials/immersedBoundary/cylinderInChannelIcoIbFoam/constant/transportProperties create mode 100644 tutorials/immersedBoundary/cylinderInChannelIcoIbFoam/constant/triSurface/ibCylinder.ftr create mode 100644 tutorials/immersedBoundary/cylinderInChannelIcoIbFoam/constant/triSurface/ibCylinder.stl create mode 100644 tutorials/immersedBoundary/cylinderInChannelIcoIbFoam/save/blockMeshDict create mode 100644 tutorials/immersedBoundary/cylinderInChannelIcoIbFoam/save/boundary create mode 100644 tutorials/immersedBoundary/cylinderInChannelIcoIbFoam/system/controlDict create mode 100644 tutorials/immersedBoundary/cylinderInChannelIcoIbFoam/system/decomposeParDict create mode 100644 tutorials/immersedBoundary/cylinderInChannelIcoIbFoam/system/fvSchemes create mode 100644 tutorials/immersedBoundary/cylinderInChannelIcoIbFoam/system/fvSolution create mode 100644 tutorials/immersedBoundary/cylinderInChannelIcoIbFoam/system/mapFieldsDict create mode 100644 tutorials/immersedBoundary/cylinderInChannelPotential/.gitignore create mode 100644 tutorials/immersedBoundary/cylinderInChannelPotential/0_org/U create mode 100644 tutorials/immersedBoundary/cylinderInChannelPotential/0_org/p create mode 100755 tutorials/immersedBoundary/cylinderInChannelPotential/Allclean create mode 100755 tutorials/immersedBoundary/cylinderInChannelPotential/Allrun create mode 100644 tutorials/immersedBoundary/cylinderInChannelPotential/constant/polyMesh/blockMeshDict create mode 100644 tutorials/immersedBoundary/cylinderInChannelPotential/constant/transportProperties create mode 100644 tutorials/immersedBoundary/cylinderInChannelPotential/constant/triSurface/ibCylinder.ftr create mode 100644 tutorials/immersedBoundary/cylinderInChannelPotential/constant/triSurface/ibCylinder.stl create mode 100644 tutorials/immersedBoundary/cylinderInChannelPotential/save/blockMeshDict create mode 100644 tutorials/immersedBoundary/cylinderInChannelPotential/save/boundary create mode 100644 tutorials/immersedBoundary/cylinderInChannelPotential/system/controlDict create mode 100644 tutorials/immersedBoundary/cylinderInChannelPotential/system/decomposeParDict create mode 100644 tutorials/immersedBoundary/cylinderInChannelPotential/system/fvSchemes create mode 100644 tutorials/immersedBoundary/cylinderInChannelPotential/system/fvSolution create mode 100644 tutorials/immersedBoundary/cylinderInChannelPotential/system/mapFieldsDict create mode 100644 tutorials/immersedBoundary/cylinderInChannelScalarTransport/.gitignore create mode 100644 tutorials/immersedBoundary/cylinderInChannelScalarTransport/0_org/T create mode 100644 tutorials/immersedBoundary/cylinderInChannelScalarTransport/0_org/U create mode 100644 tutorials/immersedBoundary/cylinderInChannelScalarTransport/0_org/p create mode 100755 tutorials/immersedBoundary/cylinderInChannelScalarTransport/Allclean create mode 100755 tutorials/immersedBoundary/cylinderInChannelScalarTransport/Allrun create mode 100644 tutorials/immersedBoundary/cylinderInChannelScalarTransport/constant/polyMesh/blockMeshDict create mode 100644 tutorials/immersedBoundary/cylinderInChannelScalarTransport/constant/transportProperties create mode 100644 tutorials/immersedBoundary/cylinderInChannelScalarTransport/constant/triSurface/ibCylinder.ftr create mode 100644 tutorials/immersedBoundary/cylinderInChannelScalarTransport/constant/triSurface/ibCylinder.stl create mode 100644 tutorials/immersedBoundary/cylinderInChannelScalarTransport/save/blockMeshDict create mode 100644 tutorials/immersedBoundary/cylinderInChannelScalarTransport/save/boundary create mode 100644 tutorials/immersedBoundary/cylinderInChannelScalarTransport/system/controlDict create mode 100644 tutorials/immersedBoundary/cylinderInChannelScalarTransport/system/decomposeParDict create mode 100644 tutorials/immersedBoundary/cylinderInChannelScalarTransport/system/fvSchemes create mode 100644 tutorials/immersedBoundary/cylinderInChannelScalarTransport/system/fvSolution create mode 100644 tutorials/immersedBoundary/cylinderInChannelScalarTransport/system/mapFieldsDict create mode 100644 tutorials/immersedBoundary/cylinderInSquareLaplace/.gitignore create mode 100644 tutorials/immersedBoundary/cylinderInSquareLaplace/0_org/T create mode 100755 tutorials/immersedBoundary/cylinderInSquareLaplace/Allclean create mode 100755 tutorials/immersedBoundary/cylinderInSquareLaplace/Allrun create mode 100644 tutorials/immersedBoundary/cylinderInSquareLaplace/constant/polyMesh/blockMeshDict create mode 100644 tutorials/immersedBoundary/cylinderInSquareLaplace/constant/transportProperties create mode 100644 tutorials/immersedBoundary/cylinderInSquareLaplace/constant/triSurface/ibCylinder.ftr create mode 100644 tutorials/immersedBoundary/cylinderInSquareLaplace/constant/triSurface/ibCylinder.stl create mode 100644 tutorials/immersedBoundary/cylinderInSquareLaplace/save/blockMeshDict create mode 100644 tutorials/immersedBoundary/cylinderInSquareLaplace/save/boundary create mode 100644 tutorials/immersedBoundary/cylinderInSquareLaplace/system/controlDict create mode 100644 tutorials/immersedBoundary/cylinderInSquareLaplace/system/decomposeParDict create mode 100644 tutorials/immersedBoundary/cylinderInSquareLaplace/system/fvSchemes create mode 100644 tutorials/immersedBoundary/cylinderInSquareLaplace/system/fvSolution create mode 100644 tutorials/immersedBoundary/cylinderInSquareLaplace/system/mapFieldsDict create mode 100644 tutorials/immersedBoundary/cylinderInSquarePotential/.gitignore create mode 100644 tutorials/immersedBoundary/cylinderInSquarePotential/0_org/U create mode 100644 tutorials/immersedBoundary/cylinderInSquarePotential/0_org/p create mode 100755 tutorials/immersedBoundary/cylinderInSquarePotential/Allclean create mode 100755 tutorials/immersedBoundary/cylinderInSquarePotential/Allrun create mode 100644 tutorials/immersedBoundary/cylinderInSquarePotential/constant/polyMesh/blockMeshDict create mode 100644 tutorials/immersedBoundary/cylinderInSquarePotential/constant/transportProperties create mode 100644 tutorials/immersedBoundary/cylinderInSquarePotential/constant/triSurface/ibCylinder.ftr create mode 100644 tutorials/immersedBoundary/cylinderInSquarePotential/constant/triSurface/ibCylinder.stl create mode 100644 tutorials/immersedBoundary/cylinderInSquarePotential/save/blockMeshDict create mode 100644 tutorials/immersedBoundary/cylinderInSquarePotential/save/boundary create mode 100644 tutorials/immersedBoundary/cylinderInSquarePotential/system/controlDict create mode 100644 tutorials/immersedBoundary/cylinderInSquarePotential/system/decomposeParDict create mode 100644 tutorials/immersedBoundary/cylinderInSquarePotential/system/fvSchemes create mode 100644 tutorials/immersedBoundary/cylinderInSquarePotential/system/fvSolution create mode 100644 tutorials/immersedBoundary/cylinderInSquarePotential/system/mapFieldsDict create mode 100644 tutorials/immersedBoundary/pitzDailyBodyFitted/.gitignore create mode 100644 tutorials/immersedBoundary/pitzDailyBodyFitted/0_org/R create mode 100644 tutorials/immersedBoundary/pitzDailyBodyFitted/0_org/U create mode 100644 tutorials/immersedBoundary/pitzDailyBodyFitted/0_org/epsilon create mode 100644 tutorials/immersedBoundary/pitzDailyBodyFitted/0_org/k create mode 100644 tutorials/immersedBoundary/pitzDailyBodyFitted/0_org/nuTilda create mode 100644 tutorials/immersedBoundary/pitzDailyBodyFitted/0_org/nut create mode 100644 tutorials/immersedBoundary/pitzDailyBodyFitted/0_org/p create mode 100644 tutorials/immersedBoundary/pitzDailyBodyFitted/0_org/y create mode 100644 tutorials/immersedBoundary/pitzDailyBodyFitted/0_org/yPlus create mode 100755 tutorials/immersedBoundary/pitzDailyBodyFitted/Allclean create mode 100755 tutorials/immersedBoundary/pitzDailyBodyFitted/Allrun create mode 100644 tutorials/immersedBoundary/pitzDailyBodyFitted/constant/RASProperties create mode 100644 tutorials/immersedBoundary/pitzDailyBodyFitted/constant/polyMesh/blockMeshDict create mode 100644 tutorials/immersedBoundary/pitzDailyBodyFitted/constant/transportProperties create mode 100644 tutorials/immersedBoundary/pitzDailyBodyFitted/system/controlDict create mode 100644 tutorials/immersedBoundary/pitzDailyBodyFitted/system/fvSchemes create mode 100644 tutorials/immersedBoundary/pitzDailyBodyFitted/system/fvSolution create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarIcoIbFoam/.gitignore create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarIcoIbFoam/0_org/U create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarIcoIbFoam/0_org/p create mode 100755 tutorials/immersedBoundary/pitzDailyLaminarIcoIbFoam/Allclean create mode 100755 tutorials/immersedBoundary/pitzDailyLaminarIcoIbFoam/Allrun create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarIcoIbFoam/constant/polyMesh/blockMeshDict create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarIcoIbFoam/constant/transportProperties create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarIcoIbFoam/constant/triSurface/pitzDailyIB-contour.ftr create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarIcoIbFoam/constant/triSurface/pitzDailyIB-contour.stl create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarIcoIbFoam/constant/triSurface/pitzDailyIB.ftr create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarIcoIbFoam/constant/triSurface/pitzDailyIB.stl create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarIcoIbFoam/save/blockMeshDict create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarIcoIbFoam/save/boundary create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarIcoIbFoam/system/controlDict create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarIcoIbFoam/system/decomposeParDict create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarIcoIbFoam/system/fvSchemes create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarIcoIbFoam/system/fvSolution create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarSimpleIbFoam/.gitignore create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarSimpleIbFoam/0_org/U create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarSimpleIbFoam/0_org/p create mode 100755 tutorials/immersedBoundary/pitzDailyLaminarSimpleIbFoam/Allclean create mode 100755 tutorials/immersedBoundary/pitzDailyLaminarSimpleIbFoam/Allrun create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarSimpleIbFoam/constant/RASProperties create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarSimpleIbFoam/constant/polyMesh/blockMeshDict create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarSimpleIbFoam/constant/transportProperties create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarSimpleIbFoam/constant/triSurface/pitzDailyIB-contour.ftr create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarSimpleIbFoam/constant/triSurface/pitzDailyIB-contour.stl create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarSimpleIbFoam/constant/triSurface/pitzDailyIB.ftr create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarSimpleIbFoam/constant/triSurface/pitzDailyIB.stl create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarSimpleIbFoam/save/blockMeshDict create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarSimpleIbFoam/save/boundary create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarSimpleIbFoam/system/controlDict create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarSimpleIbFoam/system/decomposeParDict create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarSimpleIbFoam/system/fvSchemes create mode 100644 tutorials/immersedBoundary/pitzDailyLaminarSimpleIbFoam/system/fvSolution create mode 100644 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/.gitignore create mode 100644 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/0_org/U create mode 100644 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/0_org/epsilon create mode 100644 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/0_org/k create mode 100644 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/0_org/nut create mode 100644 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/0_org/p create mode 100755 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/Allclean create mode 100755 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/Allrun create mode 100644 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/constant/RASProperties create mode 100644 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/constant/polyMesh/blockMeshDict create mode 100644 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/constant/transportProperties create mode 100644 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/constant/triSurface/pitzDailyIB-contour.ftr create mode 100644 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/constant/triSurface/pitzDailyIB-contour.stl create mode 100644 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/constant/triSurface/pitzDailyIB.ftr create mode 100644 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/constant/triSurface/pitzDailyIB.stl create mode 100644 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/save/blockMeshDict create mode 100644 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/save/boundary create mode 100644 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/system/controlDict create mode 100644 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/system/decomposeParDict create mode 100644 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/system/fvSchemes create mode 100644 tutorials/immersedBoundary/pitzDailyTurbulentSimpleIbFoam/system/fvSolution create mode 100644 tutorials/immersedBoundary/porousBumpChannelBodyFitted/.gitignore create mode 100644 tutorials/immersedBoundary/porousBumpChannelBodyFitted/0_org/U create mode 100644 tutorials/immersedBoundary/porousBumpChannelBodyFitted/0_org/epsilon create mode 100644 tutorials/immersedBoundary/porousBumpChannelBodyFitted/0_org/k create mode 100644 tutorials/immersedBoundary/porousBumpChannelBodyFitted/0_org/nut create mode 100644 tutorials/immersedBoundary/porousBumpChannelBodyFitted/0_org/p create mode 100755 tutorials/immersedBoundary/porousBumpChannelBodyFitted/Allclean create mode 100755 tutorials/immersedBoundary/porousBumpChannelBodyFitted/Allrun create mode 100644 tutorials/immersedBoundary/porousBumpChannelBodyFitted/constant/RASProperties create mode 100644 tutorials/immersedBoundary/porousBumpChannelBodyFitted/constant/polyMesh/blockMeshDict create mode 100644 tutorials/immersedBoundary/porousBumpChannelBodyFitted/constant/porousZones create mode 100644 tutorials/immersedBoundary/porousBumpChannelBodyFitted/constant/transportProperties create mode 100644 tutorials/immersedBoundary/porousBumpChannelBodyFitted/setSet.batch create mode 100644 tutorials/immersedBoundary/porousBumpChannelBodyFitted/system/controlDict create mode 100644 tutorials/immersedBoundary/porousBumpChannelBodyFitted/system/fvSchemes create mode 100644 tutorials/immersedBoundary/porousBumpChannelBodyFitted/system/fvSolution create mode 100644 tutorials/immersedBoundary/porousBumpChannelIb/.gitignore create mode 100644 tutorials/immersedBoundary/porousBumpChannelIb/0_org/U create mode 100644 tutorials/immersedBoundary/porousBumpChannelIb/0_org/epsilon create mode 100644 tutorials/immersedBoundary/porousBumpChannelIb/0_org/k create mode 100644 tutorials/immersedBoundary/porousBumpChannelIb/0_org/nut create mode 100644 tutorials/immersedBoundary/porousBumpChannelIb/0_org/p create mode 100755 tutorials/immersedBoundary/porousBumpChannelIb/Allclean create mode 100755 tutorials/immersedBoundary/porousBumpChannelIb/Allrun create mode 100644 tutorials/immersedBoundary/porousBumpChannelIb/constant/RASProperties create mode 100644 tutorials/immersedBoundary/porousBumpChannelIb/constant/polyMesh/blockMeshDict create mode 100644 tutorials/immersedBoundary/porousBumpChannelIb/constant/porousZones create mode 100644 tutorials/immersedBoundary/porousBumpChannelIb/constant/transportProperties create mode 100644 tutorials/immersedBoundary/porousBumpChannelIb/constant/triSurface/porousBumpChannel.ftr create mode 100644 tutorials/immersedBoundary/porousBumpChannelIb/constant/triSurface/porousBumpChannel.stl create mode 100644 tutorials/immersedBoundary/porousBumpChannelIb/save/blockMeshDict create mode 100644 tutorials/immersedBoundary/porousBumpChannelIb/save/boundary create mode 100644 tutorials/immersedBoundary/porousBumpChannelIb/save/setSet.batch create mode 100644 tutorials/immersedBoundary/porousBumpChannelIb/setSet.batch create mode 100644 tutorials/immersedBoundary/porousBumpChannelIb/system/controlDict create mode 100644 tutorials/immersedBoundary/porousBumpChannelIb/system/decomposeParDict create mode 100644 tutorials/immersedBoundary/porousBumpChannelIb/system/fvSchemes create mode 100644 tutorials/immersedBoundary/porousBumpChannelIb/system/fvSolution create mode 100644 tutorials/immersedBoundary/simpleSilencerLaminarIcoIbFoam/.gitignore create mode 100644 tutorials/immersedBoundary/simpleSilencerLaminarIcoIbFoam/0_org/U create mode 100644 tutorials/immersedBoundary/simpleSilencerLaminarIcoIbFoam/0_org/p create mode 100755 tutorials/immersedBoundary/simpleSilencerLaminarIcoIbFoam/Allclean create mode 100755 tutorials/immersedBoundary/simpleSilencerLaminarIcoIbFoam/Allrun create mode 100644 tutorials/immersedBoundary/simpleSilencerLaminarIcoIbFoam/constant/immersedBoundaryProperties create mode 100644 tutorials/immersedBoundary/simpleSilencerLaminarIcoIbFoam/constant/transportProperties create mode 100644 tutorials/immersedBoundary/simpleSilencerLaminarIcoIbFoam/constant/triSurface/silencer.ftr create mode 100644 tutorials/immersedBoundary/simpleSilencerLaminarIcoIbFoam/save/blockMeshDict create mode 100644 tutorials/immersedBoundary/simpleSilencerLaminarIcoIbFoam/save/boundary create mode 100644 tutorials/immersedBoundary/simpleSilencerLaminarIcoIbFoam/system/cellSetDict create mode 100644 tutorials/immersedBoundary/simpleSilencerLaminarIcoIbFoam/system/controlDict create mode 100644 tutorials/immersedBoundary/simpleSilencerLaminarIcoIbFoam/system/decomposeParDict create mode 100644 tutorials/immersedBoundary/simpleSilencerLaminarIcoIbFoam/system/fvSchemes create mode 100644 tutorials/immersedBoundary/simpleSilencerLaminarIcoIbFoam/system/fvSolution create mode 100644 tutorials/immersedBoundary/simpleSilencerLaminarIcoIbFoam/system/mapFieldsDict create mode 100644 tutorials/immersedBoundary/simpleSilencerLaminarIcoIbFoam/temp.28755 create mode 100644 tutorials/immersedBoundary/sphereInChannel/.gitignore create mode 100644 tutorials/immersedBoundary/sphereInChannel/0_org/U create mode 100644 tutorials/immersedBoundary/sphereInChannel/0_org/p create mode 100755 tutorials/immersedBoundary/sphereInChannel/Allclean create mode 100755 tutorials/immersedBoundary/sphereInChannel/Allrun create mode 100644 tutorials/immersedBoundary/sphereInChannel/constant/transportProperties create mode 100644 tutorials/immersedBoundary/sphereInChannel/constant/triSurface/ibSphere.ftr create mode 100644 tutorials/immersedBoundary/sphereInChannel/refineSphereMesh/Make/files create mode 100644 tutorials/immersedBoundary/sphereInChannel/refineSphereMesh/Make/options create mode 100644 tutorials/immersedBoundary/sphereInChannel/refineSphereMesh/refineSphereMesh.C create mode 100644 tutorials/immersedBoundary/sphereInChannel/save/blockMeshDict create mode 100644 tutorials/immersedBoundary/sphereInChannel/save/boundary create mode 100644 tutorials/immersedBoundary/sphereInChannel/system/controlDict create mode 100644 tutorials/immersedBoundary/sphereInChannel/system/decomposeParDict create mode 100644 tutorials/immersedBoundary/sphereInChannel/system/fvSchemes create mode 100644 tutorials/immersedBoundary/sphereInChannel/system/fvSolution create mode 100644 tutorials/immersedBoundary/thickPlateRefinedMesh/.gitignore create mode 100644 tutorials/immersedBoundary/thickPlateRefinedMesh/0_org/U create mode 100644 tutorials/immersedBoundary/thickPlateRefinedMesh/0_org/p create mode 100755 tutorials/immersedBoundary/thickPlateRefinedMesh/Allclean create mode 100755 tutorials/immersedBoundary/thickPlateRefinedMesh/Allrun create mode 100644 tutorials/immersedBoundary/thickPlateRefinedMesh/constant/transportProperties create mode 100644 tutorials/immersedBoundary/thickPlateRefinedMesh/constant/triSurface/ibThickPlate.ftr create mode 100644 tutorials/immersedBoundary/thickPlateRefinedMesh/constant/triSurface/ibThickPlate.stl create mode 100644 tutorials/immersedBoundary/thickPlateRefinedMesh/refineThickPlateMesh/Make/files create mode 100644 tutorials/immersedBoundary/thickPlateRefinedMesh/refineThickPlateMesh/Make/options create mode 100644 tutorials/immersedBoundary/thickPlateRefinedMesh/refineThickPlateMesh/refineThickPlateMesh.C create mode 100644 tutorials/immersedBoundary/thickPlateRefinedMesh/save/blockMeshDict create mode 100644 tutorials/immersedBoundary/thickPlateRefinedMesh/save/boundary create mode 100644 tutorials/immersedBoundary/thickPlateRefinedMesh/system/controlDict create mode 100644 tutorials/immersedBoundary/thickPlateRefinedMesh/system/decomposeParDict create mode 100644 tutorials/immersedBoundary/thickPlateRefinedMesh/system/fvSchemes create mode 100644 tutorials/immersedBoundary/thickPlateRefinedMesh/system/fvSolution create mode 100644 tutorials/immersedBoundary/thickPlateRefinedMesh/temp.11283 diff --git a/applications/solvers/immersedBoundary/SOLVER_COOKBOOK b/applications/solvers/immersedBoundary/SOLVER_COOKBOOK new file mode 100644 index 000000000..762319239 --- /dev/null +++ b/applications/solvers/immersedBoundary/SOLVER_COOKBOOK @@ -0,0 +1,49 @@ +Make/options: add + + -I$(LIB_SRC)/triSurface/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I../immersedBoundary/lnInclude + + + -ltriSurface \ + -lmeshTools \ + -L$(FOAM_USER_LIBBIN) -limmersedBoundary \ + + +createFields.H: add + +# include "createIbMasks.H" + + +solver: + +1) add immersed boundary headers + +#include "immersedBoundaryFvPatch.H" +#include "immersedBoundaryAdjustPhi.H" + +2) on calculation of face fluxes (or their components), mask with faceIbMask + +3) before to adjustPhi, add: + + // Adjust immersed boundary fluxes + immersedBoundaryAdjustPhi(phi, U); + +4) on explicit updates, add correctBoundaryConditions(); + +eg. + + U = fvc::reconstruct(phi); + U.correctBoundaryConditions(); + +5) On reports of continuity error, add masking: + + Info<< "IB-masked continuity error = " + << mag(cellIbMask*fvc::div(phi))().weightedAverage(mesh.V()).value() + << endl; + + or use immersedBoundaryContinuityErrs.H + +5) Chenge Courant number check to be IB-sensitive, using + + immersedBoundaryCourantNo.H diff --git a/applications/solvers/immersedBoundary/icoIbFoam/Make/files b/applications/solvers/immersedBoundary/icoIbFoam/Make/files new file mode 100644 index 000000000..96a8e6f27 --- /dev/null +++ b/applications/solvers/immersedBoundary/icoIbFoam/Make/files @@ -0,0 +1,3 @@ +icoIbFoam.C + +EXE = $(FOAM_APPBIN)/icoIbFoam diff --git a/applications/solvers/immersedBoundary/icoIbFoam/Make/options b/applications/solvers/immersedBoundary/icoIbFoam/Make/options new file mode 100644 index 000000000..8b88922bf --- /dev/null +++ b/applications/solvers/immersedBoundary/icoIbFoam/Make/options @@ -0,0 +1,15 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/triSurface/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/immersedBoundary/immersedBoundary/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + -ltriSurface \ + -lmeshTools \ + -lsurfMesh \ + -lsampling \ + -ldynamicMesh \ + -limmersedBoundary \ + -llduSolvers diff --git a/applications/solvers/immersedBoundary/icoIbFoam/createFields.H b/applications/solvers/immersedBoundary/icoIbFoam/createFields.H new file mode 100644 index 000000000..a2031e291 --- /dev/null +++ b/applications/solvers/immersedBoundary/icoIbFoam/createFields.H @@ -0,0 +1,55 @@ + Info<< "Reading transportProperties\n" << endl; + + IOdictionary transportProperties + ( + IOobject + ( + "transportProperties", + runTime.constant(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + dimensionedScalar nu + ( + transportProperties.lookup("nu") + ); + + 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("PIMPLE"), pRefCell, pRefValue); diff --git a/applications/solvers/immersedBoundary/icoIbFoam/icoIbFoam.C b/applications/solvers/immersedBoundary/icoIbFoam/icoIbFoam.C new file mode 100644 index 000000000..aa4590475 --- /dev/null +++ b/applications/solvers/immersedBoundary/icoIbFoam/icoIbFoam.C @@ -0,0 +1,128 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright held by original author + \\/ 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 + icoIbFoam + +Description + Transient solver for incompressible, laminar flow of Newtonian fluids + with immersed boundary support. + +Author + Hrvoje Jasak, Wikki Ltd. All rights reserved + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "immersedBoundaryFvPatch.H" +#include "immersedBoundaryAdjustPhi.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ +# include "setRootCase.H" + +# include "createTime.H" +# include "createMesh.H" +# include "createIbMasks.H" +# include "createFields.H" +# include "initContinuityErrs.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nStarting time loop\n" << endl; + + while (runTime.loop()) + { + Info<< "Time = " << runTime.timeName() << nl << endl; + +# include "readPIMPLEControls.H" +# include "CourantNo.H" + + // Pressure-velocity corrector + int oCorr = 0; + do + { + fvVectorMatrix UEqn + ( + fvm::ddt(U) + + fvm::div(phi, U) + - fvm::laplacian(nu, U) + ); + + solve(UEqn == -fvc::grad(p)); + + // --- PISO loop + for (int corr = 0; corr < nCorr; corr++) + { + volScalarField rUA = 1.0/UEqn.A(); + + U = rUA*UEqn.H(); + // Immersed boundary update + U.correctBoundaryConditions(); + + phi = faceIbMask*(fvc::interpolate(U) & mesh.Sf()); + + // Adjust immersed boundary fluxes + immersedBoundaryAdjustPhi(phi, U); + adjustPhi(phi, U, p); + + for (int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++) + { + fvScalarMatrix pEqn + ( + fvm::laplacian(rUA, p) == fvc::div(phi) + ); + + pEqn.setReference(pRefCell, pRefValue); + pEqn.solve(); + + if (nonOrth == nNonOrthCorr) + { + phi -= pEqn.flux(); + } + } + +# include "immersedBoundaryContinuityErrs.H" + + U -= rUA*fvc::grad(p); + U.correctBoundaryConditions(); + } + } while (++oCorr < nOuterCorr); + + runTime.write(); + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + } + + Info<< "End\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/solvers/immersedBoundary/interIbFoam/Make/files b/applications/solvers/immersedBoundary/interIbFoam/Make/files new file mode 100644 index 000000000..5d3b09dcd --- /dev/null +++ b/applications/solvers/immersedBoundary/interIbFoam/Make/files @@ -0,0 +1,3 @@ +interIbFoam.C + +EXE = $(FOAM_APPBIN)/interIbFoam diff --git a/applications/solvers/immersedBoundary/interIbFoam/Make/options b/applications/solvers/immersedBoundary/interIbFoam/Make/options new file mode 100644 index 000000000..7e6f08025 --- /dev/null +++ b/applications/solvers/immersedBoundary/interIbFoam/Make/options @@ -0,0 +1,24 @@ +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 \ + -I$(LIB_SRC)/triSurface/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/immersedBoundary/immersedBoundary/lnInclude + +EXE_LIBS = \ + -linterfaceProperties \ + -lincompressibleTransportModels \ + -lincompressibleTurbulenceModel \ + -lincompressibleRASModels \ + -lincompressibleLESModels \ + -lfiniteVolume \ + -ltriSurface \ + -lmeshTools \ + -lsurfMesh \ + -lsampling \ + -ldynamicMesh \ + -limmersedBoundary \ + -llduSolvers diff --git a/applications/solvers/immersedBoundary/interIbFoam/UEqn.H b/applications/solvers/immersedBoundary/interIbFoam/UEqn.H new file mode 100644 index 000000000..528e0aaaf --- /dev/null +++ b/applications/solvers/immersedBoundary/interIbFoam/UEqn.H @@ -0,0 +1,34 @@ + 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())) + ); + + UEqn.relax(); + + 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/immersedBoundary/interIbFoam/alphaEqn.H b/applications/solvers/immersedBoundary/interIbFoam/alphaEqn.H new file mode 100644 index 000000000..a4139a969 --- /dev/null +++ b/applications/solvers/immersedBoundary/interIbFoam/alphaEqn.H @@ -0,0 +1,37 @@ +{ + word alphaScheme("div(phi,alpha)"); + word alpharScheme("div(phirb,alpha)"); + + surfaceScalarField phic = mag(phi/mesh.magSf()); + phic = min(interface.cAlpha()*phic, max(phic)); + surfaceScalarField phir = faceIbMask*phic*interface.nHatf(); + + fvScalarMatrix alpha1Eqn + ( + fvm::ddt(alpha1) + + fvm::div(phi, alpha1, alphaScheme) + + fvm::div + ( + -fvc::flux(-phir, scalar(1) - alpha1, alpharScheme), + alpha1, + alpharScheme + ) + ); + + alpha1Eqn.solve(); + + Info<< "Liquid phase volume fraction = " + << alpha1.weightedAverage(mesh.V()).value() + << " Min(alpha1) = " << min(cellIbMask*alpha1).value() + << " Max(alpha1) = " << max(cellIbMask*alpha1).value() + << endl; + + // Limit alpha to handle IB cells + alpha1.max(0); + alpha1.min(1); + + // Update of interface and density + interface.correct(); + + rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2; +} diff --git a/applications/solvers/immersedBoundary/interIbFoam/correctPhi.H b/applications/solvers/immersedBoundary/interIbFoam/correctPhi.H new file mode 100644 index 000000000..cf979e1d1 --- /dev/null +++ b/applications/solvers/immersedBoundary/interIbFoam/correctPhi.H @@ -0,0 +1,56 @@ +{ +# include "continuityErrs.H" + + wordList pcorrTypes + ( + pd.boundaryField().size(), + zeroGradientFvPatchScalarField::typeName + ); + + for (label i=0; i turbulence + ( + incompressible::turbulenceModel::New(U, phi, twoPhaseProperties) + ); diff --git a/applications/solvers/immersedBoundary/interIbFoam/interIbFoam.C b/applications/solvers/immersedBoundary/interIbFoam/interIbFoam.C new file mode 100644 index 000000000..9f7d8143a --- /dev/null +++ b/applications/solvers/immersedBoundary/interIbFoam/interIbFoam.C @@ -0,0 +1,136 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright held by original author + \\/ 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 + interIbFoam + +Description + Solver for 2 incompressible, isothermal immiscible fluids using a VOF + (volume of fluid) phase-fraction based interface capturing approach, + with immersed boundary support + + 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. + +Author + Hrvoje Jasak, Wikki Ltd. All rights reserved + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "interfaceProperties.H" +#include "twoPhaseMixture.H" +#include "turbulenceModel.H" + +#include "immersedBoundaryFvPatch.H" +#include "immersedBoundaryAdjustPhi.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ +# include "setRootCase.H" +# include "createTime.H" +# include "createMesh.H" +# include "readGravitationalAcceleration.H" +# include "readPIMPLEControls.H" +# include "initContinuityErrs.H" +# include "createFields.H" +# include "createIbMasks.H" +# include "readTimeControls.H" +# include "correctPhi.H" +# include "CourantNo.H" +# include "setInitialDeltaT.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nStarting time loop\n" << endl; + + while (runTime.run()) + { +# include "readPIMPLEControls.H" +# include "readTimeControls.H" +# include "immersedBoundaryCourantNo.H" +# include "setDeltaT.H" + + runTime++; + + Info<< "Time = " << runTime.timeName() << nl << endl; + + // Pressure-velocity corrector + int oCorr = 0; + do + { + twoPhaseProperties.correct(); + +# include "alphaEqn.H" + +# include "UEqn.H" + + // --- PISO loop + for (int corr = 0; corr < nCorr; corr++) + { +# include "pEqn.H" + } + +# include "immersedBoundaryContinuityErrs.H" + +# include "limitU.H" + + // Recalculate the mass fluxes + rhoPhi = phi*fvc::interpolate(rho); + + p = pd + cellIbMask*rho*gh; + + if (pd.needReference()) + { + p += dimensionedScalar + ( + "p", + p.dimensions(), + pRefValue - getRefCellValue(p, pdRefCell) + ); + } + + turbulence->correct(); + } while (++oCorr < nOuterCorr); + + runTime.write(); + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + } + + Info<< "End\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/solvers/immersedBoundary/interIbFoam/limitU.H b/applications/solvers/immersedBoundary/interIbFoam/limitU.H new file mode 100644 index 000000000..322e59b7c --- /dev/null +++ b/applications/solvers/immersedBoundary/interIbFoam/limitU.H @@ -0,0 +1,24 @@ +{ + scalar limitMagU = readScalar(pimple.lookup("limitMagU")); + + volScalarField magU(mag(U)); + + scalar maxMagU = max(magU).value(); + + Info<< "mag(U): max: " << maxMagU + << " avg: " << magU.weightedAverage(mesh.V()).value(); + + if (maxMagU > limitMagU) + { + U.internalField() *= + neg(magU.internalField() - limitMagU) + + pos(magU.internalField() - limitMagU)* + limitMagU/(magU.internalField() + SMALL); + U.correctBoundaryConditions(); + Info << " ...limiting" << endl; + } + else + { + Info << endl; + } +} diff --git a/applications/solvers/immersedBoundary/interIbFoam/pEqn.H b/applications/solvers/immersedBoundary/interIbFoam/pEqn.H new file mode 100644 index 000000000..42fa96e0e --- /dev/null +++ b/applications/solvers/immersedBoundary/interIbFoam/pEqn.H @@ -0,0 +1,64 @@ +{ + if (nOuterCorr != 1) + { + pd.storePrevIter(); + } + + volScalarField rUA = 1.0/UEqn.A(); + surfaceScalarField rUAf = fvc::interpolate(rUA); + + U = rUA*UEqn.H(); + // Immersed boundary update + U.correctBoundaryConditions(); + + surfaceScalarField phiU + ( + "phiU", + faceIbMask*(fvc::interpolate(U) & mesh.Sf()) + ); + + // Adjust immersed boundary fluxes + immersedBoundaryAdjustPhi(phiU, U); + adjustPhi(phiU, U, pd); + + phi = phiU + + faceIbMask* + ( + fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) + - ghf*fvc::snGrad(rho) + )*rUAf*mesh.magSf(); + + + for(int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++) + { + fvScalarMatrix pdEqn + ( + fvm::laplacian(rUAf, pd) == fvc::div(phi) + ); + + pdEqn.setReference(pdRefCell, pdRefValue); + + if (corr == nCorr - 1 && nonOrth == nNonOrthCorr) + { + pdEqn.solve(mesh.solutionDict().solver(pd.name() + "Final")); + } + else + { + pdEqn.solve(mesh.solutionDict().solver(pd.name())); + } + + if (nonOrth == nNonOrthCorr) + { + phi -= pdEqn.flux(); + } + } + + // Explicitly relax pressure except for last corrector + if (oCorr != nOuterCorr - 1) + { + pd.relax(); + } + + U += rUA*fvc::reconstruct((phi - phiU)/rUAf); + U.correctBoundaryConditions(); +} diff --git a/applications/solvers/immersedBoundary/porousSimpleIbFoam/Make/files b/applications/solvers/immersedBoundary/porousSimpleIbFoam/Make/files new file mode 100644 index 000000000..f7992747e --- /dev/null +++ b/applications/solvers/immersedBoundary/porousSimpleIbFoam/Make/files @@ -0,0 +1,3 @@ +porousSimpleIbFoam.C + +EXE = $(FOAM_APPBIN)/porousSimpleIbFoam diff --git a/applications/solvers/immersedBoundary/porousSimpleIbFoam/Make/options b/applications/solvers/immersedBoundary/porousSimpleIbFoam/Make/options new file mode 100644 index 000000000..74bed7bf7 --- /dev/null +++ b/applications/solvers/immersedBoundary/porousSimpleIbFoam/Make/options @@ -0,0 +1,22 @@ +EXE_INC = \ + -I$(LIB_SRC)/turbulenceModels \ + -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)/triSurface/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/immersedBoundary/immersedBoundary/lnInclude + +EXE_LIBS = \ + -lincompressibleRASModels \ + -lincompressibleTransportModels \ + -lfiniteVolume \ + -ltriSurface \ + -lmeshTools \ + -lsurfMesh \ + -lsampling \ + -ldynamicMesh \ + -limmersedBoundary \ + -limmersedBoundaryTurbulence \ + -llduSolvers diff --git a/applications/solvers/immersedBoundary/porousSimpleIbFoam/UEqn.H b/applications/solvers/immersedBoundary/porousSimpleIbFoam/UEqn.H new file mode 100644 index 000000000..fd96d5362 --- /dev/null +++ b/applications/solvers/immersedBoundary/porousSimpleIbFoam/UEqn.H @@ -0,0 +1,17 @@ + // Solve the Momentum equation + tmp UEqn + ( + fvm::div(phi, U) + + turbulence->divDevReff(U) + ); + + UEqn().relax(); + + pZones.addResistance(UEqn()); + + eqnResidual = solve + ( + UEqn() == -fvc::grad(p) + ).initialResidual(); + + maxResidual = max(eqnResidual, maxResidual); diff --git a/applications/solvers/immersedBoundary/porousSimpleIbFoam/convergenceCheck.H b/applications/solvers/immersedBoundary/porousSimpleIbFoam/convergenceCheck.H new file mode 100644 index 000000000..895806319 --- /dev/null +++ b/applications/solvers/immersedBoundary/porousSimpleIbFoam/convergenceCheck.H @@ -0,0 +1,9 @@ +// check convergence + +if (maxResidual < convergenceCriterion) +{ + Info<< "reached convergence criterion: " << convergenceCriterion << endl; + runTime.writeAndEnd(); + Info<< "latestTime = " << runTime.timeName() << endl; +} + diff --git a/applications/solvers/immersedBoundary/porousSimpleIbFoam/createFields.H b/applications/solvers/immersedBoundary/porousSimpleIbFoam/createFields.H new file mode 100644 index 000000000..8c7e220e0 --- /dev/null +++ b/applications/solvers/immersedBoundary/porousSimpleIbFoam/createFields.H @@ -0,0 +1,44 @@ + 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("SIMPLE"), pRefCell, pRefValue); + + + singlePhaseTransportModel laminarTransport(U, phi); + + autoPtr turbulence + ( + incompressible::RASModel::New(U, phi, laminarTransport) + ); + + porousZones pZones(mesh); diff --git a/applications/solvers/immersedBoundary/porousSimpleIbFoam/initConvergenceCheck.H b/applications/solvers/immersedBoundary/porousSimpleIbFoam/initConvergenceCheck.H new file mode 100644 index 000000000..b56197f22 --- /dev/null +++ b/applications/solvers/immersedBoundary/porousSimpleIbFoam/initConvergenceCheck.H @@ -0,0 +1,7 @@ +// initialize values for convergence checks + + scalar eqnResidual = 1, maxResidual = 0; + scalar convergenceCriterion = 0; + + simple.readIfPresent("convergence", convergenceCriterion); + diff --git a/applications/solvers/immersedBoundary/porousSimpleIbFoam/pEqn.H b/applications/solvers/immersedBoundary/porousSimpleIbFoam/pEqn.H new file mode 100644 index 000000000..b49a24366 --- /dev/null +++ b/applications/solvers/immersedBoundary/porousSimpleIbFoam/pEqn.H @@ -0,0 +1,51 @@ + p.boundaryField().updateCoeffs(); + + volScalarField AU = UEqn().A(); + + U = UEqn().H()/AU; + // Immersed boundary update + U.correctBoundaryConditions(); + + UEqn.clear(); + phi = faceIbMask*(fvc::interpolate(U) & mesh.Sf()); + + // Adjust immersed boundary fluxes + immersedBoundaryAdjustPhi(phi, U); + adjustPhi(phi, U, p); + + // Non-orthogonal pressure corrector loop + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + fvScalarMatrix pEqn + ( + fvm::laplacian(1.0/AU, p) == fvc::div(phi) + ); + + pEqn.setReference(pRefCell, pRefValue); + + // Retain the residual from the first iteration + if (nonOrth == 0) + { + eqnResidual = pEqn.solve().initialResidual(); + maxResidual = max(eqnResidual, maxResidual); + } + else + { + pEqn.solve(); + } + + if (nonOrth == nNonOrthCorr) + { + phi -= pEqn.flux(); + } + } + +# include "immersedBoundaryContinuityErrs.H" + + // Explicitly relax pressure for momentum corrector + p.relax(); + + // Momentum corrector + U -= fvc::grad(p)/AU; + U.correctBoundaryConditions(); + diff --git a/applications/solvers/immersedBoundary/porousSimpleIbFoam/porousSimpleIbFoam.C b/applications/solvers/immersedBoundary/porousSimpleIbFoam/porousSimpleIbFoam.C new file mode 100644 index 000000000..b5fb9c9e1 --- /dev/null +++ b/applications/solvers/immersedBoundary/porousSimpleIbFoam/porousSimpleIbFoam.C @@ -0,0 +1,92 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright held by original author + \\/ 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 + simpleIbFoam + +Description + Steady-state solver for incompressible, turbulent flow + with porous zones and immersed boundary support. + +Author + Hrvoje Jasak, Wikki Ltd. All rights reserved + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "singlePhaseTransportModel.H" +#include "RASModel.H" +#include "porousZones.H" + +#include "immersedBoundaryFvPatch.H" +#include "immersedBoundaryAdjustPhi.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ +# include "setRootCase.H" +# include "createTime.H" +# include "createMesh.H" +# include "createIbMasks.H" +# include "createFields.H" +# include "initContinuityErrs.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nStarting time loop\n" << endl; + + while (runTime.loop()) + { + Info<< "Time = " << runTime.timeName() << nl << endl; + +# include "readSIMPLEControls.H" +# include "initConvergenceCheck.H" + + p.storePrevIter(); + + // Pressure-velocity SIMPLE corrector + { +# include "UEqn.H" +# include "pEqn.H" + } + + turbulence->correct(); + + runTime.write(); + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + +# include "convergenceCheck.H" + } + + Info<< "End\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/solvers/immersedBoundary/potentialIbFoam/Make/files b/applications/solvers/immersedBoundary/potentialIbFoam/Make/files new file mode 100644 index 000000000..a234c5801 --- /dev/null +++ b/applications/solvers/immersedBoundary/potentialIbFoam/Make/files @@ -0,0 +1,3 @@ +potentialIbFoam.C + +EXE = $(FOAM_APPBIN)/potentialIbFoam diff --git a/applications/solvers/immersedBoundary/potentialIbFoam/Make/options b/applications/solvers/immersedBoundary/potentialIbFoam/Make/options new file mode 100644 index 000000000..8b88922bf --- /dev/null +++ b/applications/solvers/immersedBoundary/potentialIbFoam/Make/options @@ -0,0 +1,15 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/triSurface/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/immersedBoundary/immersedBoundary/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + -ltriSurface \ + -lmeshTools \ + -lsurfMesh \ + -lsampling \ + -ldynamicMesh \ + -limmersedBoundary \ + -llduSolvers diff --git a/applications/solvers/immersedBoundary/potentialIbFoam/createFields.H b/applications/solvers/immersedBoundary/potentialIbFoam/createFields.H new file mode 100644 index 000000000..a25abd7d9 --- /dev/null +++ b/applications/solvers/immersedBoundary/potentialIbFoam/createFields.H @@ -0,0 +1,49 @@ + Info<< "Reading field p\n" << endl; + volScalarField p + ( + IOobject + ( + "p", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ), + mesh + ); + + // Do not reset p + + Info<< "Reading field U\n" << endl; + volVectorField U + ( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + + // Do not reset U + + surfaceScalarField phi + ( + IOobject + ( + "phi", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + fvc::interpolate(U) & mesh.Sf() + ); + + + label pRefCell = 0; + scalar pRefValue = 0.0; + setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue); diff --git a/applications/solvers/immersedBoundary/potentialIbFoam/potentialIbFoam.C b/applications/solvers/immersedBoundary/potentialIbFoam/potentialIbFoam.C new file mode 100644 index 000000000..f9ec83d7a --- /dev/null +++ b/applications/solvers/immersedBoundary/potentialIbFoam/potentialIbFoam.C @@ -0,0 +1,229 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright held by original author + \\/ 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 + potentialIbFoam + +Description + Potential flow solver with immersed boundary support. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "immersedBoundaryFvPatch.H" +#include "immersedBoundaryAdjustPhi.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + argList::validOptions.insert("writep", ""); + +# include "setRootCase.H" + +# include "createTime.H" +# include "createMesh.H" +# include "createIbMasks.H" +# include "createFields.H" +# include "readSIMPLEControls.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< nl << "Calculating potential flow" << endl; + + // Do correctors over the complete set + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + phi = faceIbMask*(linearInterpolate(U) & mesh.Sf()); + + // Adjust immersed boundary fluxes + immersedBoundaryAdjustPhi(phi, U); + + // Adjust fluxes + adjustPhi(phi, U, p); + + p.storePrevIter(); + + fvScalarMatrix pEqn + ( + fvm::laplacian + ( + dimensionedScalar + ( + "1", + dimTime/p.dimensions()*dimensionSet(0, 2, -2, 0, 0), + 1 + ), + p + ) + == + fvc::div(phi) + ); + + pEqn.setReference(pRefCell, pRefValue); + pEqn.solve(); + + // Correct the flux + phi -= pEqn.flux(); + + if (nonOrth != nNonOrthCorr) + { + p.relax(); + } + + Info<< "p min " << gMin(p.internalField()) + << " max " << gMax(p.internalField()) + << " masked min " + << gMin(cellIbMask.internalField()*p.internalField()) + << " max " + << gMax(cellIbMask.internalField()*p.internalField()) + << endl; + + Info<< "continuity error = " + << mag + ( + fvc::div(faceIbMask*phi) + )().weightedAverage(mesh.V()).value() + << endl; + + Info<< "Contour continuity error = " + << mag(sum(phi.boundaryField())) + << endl; + + U = fvc::reconstruct(phi); + U.correctBoundaryConditions(); + + Info<< "Interpolated U error = " + << ( + sqrt + ( + sum + ( + sqr + ( + faceIbMask* + ( + fvc::interpolate(U) & mesh.Sf() + ) + - phi + ) + ) + )/sum(mesh.magSf()) + ).value() + << endl; + } + + // Calculate velocity magnitude + { + volScalarField magU = cellIbMask*mag(U); + + Info << "IB-masked mag(U): max: " << gMax(magU.internalField()) + << " min: " << gMin(magU.internalField()) << endl; + } + + // Force the write + U.write(); + phi.write(); + + cellIbMask.write(); + cellIbMaskExt.write(); + + if (args.optionFound("writep")) + { + // Find reference patch + label refPatch = -1; + scalar maxMagU = 0; + + // Go through all velocity patches and find the one that fixes + // velocity to the largest value + + forAll (U.boundaryField(), patchI) + { + const fvPatchVectorField& Upatch = U.boundaryField()[patchI]; + + if (Upatch.fixesValue()) + { + // Calculate mean velocity + scalar u = sum(mag(Upatch)); + label patchSize = Upatch.size(); + + reduce(u, sumOp()); + reduce(patchSize, sumOp