From 8924b4ca86a270f364cdd669bf1e41eb6723717e Mon Sep 17 00:00:00 2001 From: sergio Date: Mon, 14 Dec 2015 10:02:49 -0800 Subject: [PATCH 1/5] BUG: Adding boundaryRadiationProperties in oppositeBurningPanels tutorial Adding decompose boundaryRadiationProperties in constant folder in Allrun for oppositeBurningPanels and smallPoolFire3D --- .../fireFoam/les/oppositeBurningPanels/Allrun | 3 +- .../constant/boundaryRadiationProperties | 38 +++++++++++++++++++ .../fireFoam/les/smallPoolFire3D/Allrun | 2 +- 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/boundaryRadiationProperties diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/Allrun b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/Allrun index 5528c96c78..2fe5ebd457 100755 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/Allrun +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/Allrun @@ -24,7 +24,8 @@ runApplication topoSet -dict system/fBurner.topoSetDict runApplication createPatch -overwrite -decomposePar -force > log.decomposePar 2>&1 +# Decompose mesh, constant/boundaryRadiationProperties and fields +decomposePar -force -constant > log.decomposePar 2>&1 decomposePar -region panelRegion > log.decomposeParPanelRegion 2>&1 diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/boundaryRadiationProperties b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/boundaryRadiationProperties new file mode 100644 index 0000000000..f746687ec3 --- /dev/null +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/boundaryRadiationProperties @@ -0,0 +1,38 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object boundaryRadiationProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + ".*" + { + type boundaryRadiation; + mode lookup; + emissivity uniform 1.0; + value uniform 0; + } + "(region0_to.*)" + { + type boundaryRadiation; + mode solidRadiation; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/Allrun b/tutorials/combustion/fireFoam/les/smallPoolFire3D/Allrun index ebd159495f..41634fbe09 100755 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/Allrun +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/Allrun @@ -9,7 +9,7 @@ application=`getApplication` runApplication blockMesh runApplication topoSet runApplication createPatch -overwrite -runApplication decomposePar -force +runApplication decomposePar -force -constant # Run runParallel $application 4 From cdbe0e31a8f59f5522b4f81310a9a91954490b0e Mon Sep 17 00:00:00 2001 From: sergio Date: Mon, 14 Dec 2015 10:43:31 -0800 Subject: [PATCH 2/5] BUG: Switching off radiationProperties in heater. Adding boundaryRadiationProperties and adding transmissivity keyword in radiationProperties. --- .../constant/heater/radiationProperties | 17 +------- .../multiRegionHeaterRadiation/Allclean | 5 +++ .../bottomAir/boundaryRadiationProperties | 40 +++++++++++++++++++ .../constant/bottomAir/radiationProperties | 3 ++ .../constant/heater/radiationProperties | 1 + .../topAir/boundaryRadiationProperties | 39 ++++++++++++++++++ 6 files changed, 90 insertions(+), 15 deletions(-) create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/boundaryRadiationProperties create mode 100644 tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/boundaryRadiationProperties diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/heater/radiationProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/heater/radiationProperties index 9d5646d40e..d0fc2af6ae 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/heater/radiationProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/heater/radiationProperties @@ -16,21 +16,8 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -radiation on; +radiation off; -radiationModel opaqueSolid; - -absorptionEmissionModel constantAbsorptionEmission; - -constantAbsorptionEmissionCoeffs -{ - absorptivity absorptivity [0 -1 0 0 0 0 0] 0.0; //opaque - emissivity emissivity [0 -1 0 0 0 0 0] 0.1; - E E [1 -1 -3 0 0 0 0] 0; -} - -scatterModel none; - -sootModel none; +radiationModel none; // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allclean b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allclean index 34e76f9ade..a6a8d2c544 100755 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allclean +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allclean @@ -25,11 +25,16 @@ rm -f constant/bottomAir/constructMap* rm -f constant/bottomAir/finalAgglom rm -f constant/bottomAir/globalFaceFaces rm -f constant/bottomAir/subMap +rm -f constant/bottomAir/visibleFaceFaces +rm -f constant/bottomAir/mapDist + rm -f constant/topAir/F rm -f constant/topAir/constructMap* rm -f constant/topAir/finalAgglom rm -f constant/topAir/globalFaceFaces rm -f constant/topAir/subMap +rm -f constant/topAir/visibleFaceFaces +rm -f constant/topAir/mapDist # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/boundaryRadiationProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/boundaryRadiationProperties new file mode 100644 index 0000000000..c6498f35da --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/boundaryRadiationProperties @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object boundaryRadiationProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + ".*" + { + type boundaryRadiation; + mode lookup; + emissivity uniform 1.0; + absorptivity uniform 1.0; + value uniform 0; // Dummy value + } + + "bottomAir_to_.*" + { + type boundaryRadiation; + mode solidRadiation; + value uniform 0; // Dummy value + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/radiationProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/radiationProperties index 956cb65e42..019fd36007 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/radiationProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/radiationProperties @@ -42,4 +42,7 @@ scatterModel none; sootModel none; +transmissivityModel none; + + // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/heater/radiationProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/heater/radiationProperties index e75b019da5..8cd6df5893 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/heater/radiationProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/heater/radiationProperties @@ -33,4 +33,5 @@ scatterModel none; sootModel none; +transmissivityModel none; // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/boundaryRadiationProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/boundaryRadiationProperties new file mode 100644 index 0000000000..93993a1544 --- /dev/null +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/boundaryRadiationProperties @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object boundaryRadiationProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + ".*" + { + type boundaryRadiation; + mode lookup; + emissivity uniform 1.0; + value uniform 0; // Dummy value + } + + "topAir_to_.*" + { + type boundaryRadiation; + mode solidRadiation; + value uniform 0; // Dummy value + } +} + +// ************************************************************************* // From a4877d8a1f472f8e500173816223300cad0847b8 Mon Sep 17 00:00:00 2001 From: sergio Date: Mon, 14 Dec 2015 11:04:00 -0800 Subject: [PATCH 3/5] BUG: Fixing Allrun for cp -r polyMesh from case to case --- tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun b/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun index 196a72a1d8..65057eef6f 100755 --- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun +++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/Allrun @@ -19,7 +19,7 @@ runApplication simpleFoam # Copy the mesh from the steady state case and map the results to a # mesh motion case, then solve transient. cd ../wingMotion2D_pimpleDyMFoam -cp -r ../wingMotion2D_simpleFoam/constant/polyMesh/* constant/polyMesh/ +cp -r ../wingMotion2D_simpleFoam/constant/polyMesh/ constant/ cp -r 0.org 0 runApplication mapFields ../wingMotion2D_simpleFoam -sourceTime latestTime -consistent mv 0/pointDisplacement.unmapped 0/pointDisplacement From 63ecd073db68b044ae54ef643bac0935ac4ac3d0 Mon Sep 17 00:00:00 2001 From: sergio Date: Mon, 14 Dec 2015 11:09:37 -0800 Subject: [PATCH 4/5] ENH: Adding boundary file --- .../ras/tank3D/constant/polyMesh/boundary | 160 ++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 tutorials/multiphase/driftFluxFoam/ras/tank3D/constant/polyMesh/boundary diff --git a/tutorials/multiphase/driftFluxFoam/ras/tank3D/constant/polyMesh/boundary b/tutorials/multiphase/driftFluxFoam/ras/tank3D/constant/polyMesh/boundary new file mode 100644 index 0000000000..5ccd3d50b0 --- /dev/null +++ b/tutorials/multiphase/driftFluxFoam/ras/tank3D/constant/polyMesh/boundary @@ -0,0 +1,160 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +( + SYMP3 + { + type patch; + startFace 53708; + nFaces 3191; + } + + INLE1 + { + type patch; + startFace 56899; + nFaces 45; + } + + OUTL9 + { + type patch; + startFace 56944; + nFaces 11; + } + + OUTL10 + { + type patch; + startFace 56955; + nFaces 11; + } + + OUTL11 + { + type patch; + startFace 56966; + nFaces 11; + } + + OUTL12 + { + type patch; + startFace 56977; + nFaces 11; + } + + WALL6 + { + type wall; + startFace 56988; + nFaces 1474; + } + + WALL8 + { + type wall; + startFace 58462; + nFaces 1640; + } + + WALL61 + { + type wall; + startFace 60102; + nFaces 44; + } + + WALL62 + { + type wall; + startFace 60146; + nFaces 78; + } + + WALL63 + { + type wall; + startFace 60224; + nFaces 255; + } + + WALL64 + { + type wall; + startFace 60479; + nFaces 157; + } + + WALL65 + { + type wall; + startFace 60636; + nFaces 35; + } + + WALL66 + { + type wall; + startFace 60671; + nFaces 60; + } + + WALL67 + { + type wall; + startFace 60731; + nFaces 55; + } + + WALL68 + { + type wall; + startFace 60786; + nFaces 116; + } + + WALL69 + { + type wall; + startFace 60902; + nFaces 24; + } + + WALL7 + { + type wall; + startFace 60926; + nFaces 121; + } + + WALL70 + { + type wall; + startFace 61047; + nFaces 182; + } + + OUTL15 + { + type patch; + startFace 61229; + nFaces 14; + } + +) + +// ************************************************************************* // From 1b94025a64373af990803c60ca42524354ffee67 Mon Sep 17 00:00:00 2001 From: sergio Date: Mon, 14 Dec 2015 15:05:44 -0800 Subject: [PATCH 5/5] BUG: adding limiter for KK to dynamicKEqn. Fixing access to tmp of nuEff. --- .../turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C | 8 +++++++- .../fixedShearStress/fixedShearStressFvPatchVectorField.C | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C b/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C index ac076991e8..19f557bc36 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C +++ b/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C @@ -48,7 +48,13 @@ volScalarField dynamicKEqn::Ck const volSymmTensorField MM ( - simpleFilter_(-2.0*this->delta()*sqrt(KK)*filter_(D)) + simpleFilter_ + ( + -2.0*this->delta()*sqrt + ( + max(KK, dimensionedScalar("zero", KK.dimensions(), 0.0)) + )*filter_(D) + ) ); const volScalarField Ck diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C index db6e0ecd43..291d5d33dc 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C @@ -109,7 +109,7 @@ void Foam::fixedShearStressFvPatchVectorField::updateCoeffs() ) ); - scalarField nuEff(turbModel.nuEff()()[patch().index()]); + tmp nuEff(turbModel.nuEff(patch().index())); const vectorField Uc(patchInternalField()); @@ -117,7 +117,7 @@ void Foam::fixedShearStressFvPatchVectorField::updateCoeffs() const scalarField& ry = patch().deltaCoeffs(); - operator==(tauHat*(tauHat & (tau0_*(1.0/(ry*nuEff)) + Uc))); + operator==(tauHat*(tauHat & (tau0_*(1.0/(ry*nuEff())) + Uc))); fixedValueFvPatchVectorField::updateCoeffs(); }