From bb1874eb34b5f32074c931bdb809404503085b18 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 26 May 2016 13:37:01 +0100 Subject: [PATCH 1/4] Bugfix: handling of gradU with cacheing --- .../compressible/RAS/RNGkEpsilon/RNGkEpsilon.C | 2 +- .../compressible/RAS/kOmegaSST/kOmegaSST.C | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.C b/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.C index aa770daad..cb83af66f 100644 --- a/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.C +++ b/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.C @@ -308,7 +308,7 @@ void RNGkEpsilon::correct() const tmp tgradU = fvc::grad(U_); const volTensorField& gradU = tgradU(); - volScalarField S2 = (gradU && dev(twoSymm(tgradU))); + volScalarField S2 = (gradU && dev(twoSymm(gradU))); volScalarField G("RASModel::G", mut_*S2); diff --git a/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C b/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C index 90fe77060..01285bb20 100644 --- a/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C +++ b/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C @@ -442,9 +442,11 @@ void kOmegaSST::correct() divU += fvc::div(mesh_.phi()); } - tmp tgradU = fvc::grad(U_); - volScalarField S2(2*magSqr(symm(tgradU()))); - volScalarField GbyMu((tgradU() && dev(twoSymm(tgradU())))); + const tmp tgradU = fvc::grad(U_); + const volTensorField& gradU = tgradU(); + + volScalarField S2(2*magSqr(symm(gradU))); + volScalarField GbyMu((gradU && dev(twoSymm(gradU)))); volScalarField G("RASModel::G", mut_*GbyMu); tgradU.clear(); From bcff0c43f118ec200d8f6f54713a811e67821547 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 26 May 2016 13:38:39 +0100 Subject: [PATCH 2/4] Bugfix: Execute GGI transforms only on masked faces to avoid NaNs --- .../GGIInterpolation/GGIInterpolate.C | 32 +++- .../constraint/ggi/ggiPolyPatchTemplates.C | 164 +++++++++--------- 2 files changed, 112 insertions(+), 84 deletions(-) diff --git a/src/foam/interpolations/GGIInterpolation/GGIInterpolate.C b/src/foam/interpolations/GGIInterpolation/GGIInterpolate.C index ac1c40e1f..bcd3d1286 100644 --- a/src/foam/interpolations/GGIInterpolation/GGIInterpolate.C +++ b/src/foam/interpolations/GGIInterpolation/GGIInterpolate.C @@ -284,17 +284,27 @@ void GGIInterpolation::maskedMasterToSlave if (this->doTransform() && pTraits::rank > 0) { // Transform master data to slave - Field transformFF; + Field transformFF(ff.size()); if (reverseT_.size() == 1) { // Constant transform - transformFF = transform(reverseT_[0], ff); + // Transform only masked elements. HJ, 25/May/2016 + forAll (mask, maskI) + { + transformFF[mask[maskI]] = + transform(reverseT_[0], ff[mask[maskI]]); + } } else { // Full patch transform - transformFF = transform(reverseT_, ff); + // Transform only masked elements. HJ, 25/May/2016 + forAll (mask, maskI) + { + transformFF[mask[maskI]] = + transform(reverseT_[mask[maskI]], ff[mask[maskI]]); + } } GGIInterpolation::maskedInterpolate @@ -445,16 +455,26 @@ void GGIInterpolation::maskedSlaveToMaster if (this->doTransform() && pTraits::rank > 0) { // Transform slave data to master - Field transformFF; + Field transformFF(ff.size()); if (forwardT_.size() == 1) { // Constant transform - transformFF = transform(forwardT_[0], ff); + // Transform only masked elements. HJ, 25/May/2016 + forAll (mask, maskI) + { + transformFF[mask[maskI]] = + transform(forwardT_[0], ff[mask[maskI]]); + } } else { // Full patch transform - transformFF = transform(forwardT_, ff); + // Transform only masked elements. HJ, 25/May/2016 + forAll (mask, maskI) + { + transformFF[mask[maskI]] = + transform(forwardT_[mask[maskI]], ff[mask[maskI]]); + } } GGIInterpolation::maskedInterpolate diff --git a/src/foam/meshes/polyMesh/polyPatches/constraint/ggi/ggiPolyPatchTemplates.C b/src/foam/meshes/polyMesh/polyPatches/constraint/ggi/ggiPolyPatchTemplates.C index 51105ac1d..b575727c2 100644 --- a/src/foam/meshes/polyMesh/polyPatches/constraint/ggi/ggiPolyPatchTemplates.C +++ b/src/foam/meshes/polyMesh/polyPatches/constraint/ggi/ggiPolyPatchTemplates.C @@ -89,6 +89,10 @@ Foam::tmp > Foam::ggiPolyPatch::fastExpand shadow().receiveAddr(); } +#if 1 + + // New version: mapDistribute + if (Pstream::parRun()) { // Optimised mapDistribute @@ -124,13 +128,15 @@ Foam::tmp > Foam::ggiPolyPatch::fastExpand return texpandField; } -#if 0 +#else // Variant 2: global gather-scatter. Original version + // Note: expandField is filled with nans in unused part + // HJ, 25/May/2016 tmp > texpandField ( - new Field(zone().size()) // filled with nans + new Field(zone().size()) ); Field& expandField = texpandField(); @@ -237,96 +243,98 @@ Foam::tmp > Foam::ggiPolyPatch::fastExpand } } + return texpandField; + // #else - // Variant 3: unpacked mapDistribute - if (Pstream::parRun()) - { - // Send subField to other processors - for (label domainI = 0; domainI < Pstream::nProcs(); domainI++) - { - const labelList& curMap = map().subMap()[domainI]; +// // Variant 3: unpacked mapDistribute +// if (Pstream::parRun()) +// { +// // Send subField to other processors +// for (label domainI = 0; domainI < Pstream::nProcs(); domainI++) +// { +// const labelList& curMap = map().subMap()[domainI]; - if (domainI != Pstream::myProcNo() && curMap.size()) - { - Pout<< "Sending " << curMap.size() - << " from " << Pstream::myProcNo() - << " to " << domainI - << endl; - OPstream toNbr(Pstream::blocking, domainI); - toNbr << List(UIndirectList(ff, curMap)); - } - } +// if (domainI != Pstream::myProcNo() && curMap.size()) +// { +// Pout<< "Sending " << curMap.size() +// << " from " << Pstream::myProcNo() +// << " to " << domainI +// << endl; +// OPstream toNbr(Pstream::blocking, domainI); +// toNbr << List(UIndirectList(ff, curMap)); +// } +// } - // Subset myself - { - const labelList& mySubMap = map().subMap()[Pstream::myProcNo()]; +// // Subset myself +// { +// const labelList& mySubMap = map().subMap()[Pstream::myProcNo()]; - List subField(mySubMap.size()); - forAll (mySubMap, i) - { - subField[i] = ff[mySubMap[i]]; - } +// List subField(mySubMap.size()); +// forAll (mySubMap, i) +// { +// subField[i] = ff[mySubMap[i]]; +// } - // Receive sub field from myself (subField) - const labelList& curMap = - map().constructMap()[Pstream::myProcNo()]; +// // Receive sub field from myself (subField) +// const labelList& curMap = +// map().constructMap()[Pstream::myProcNo()]; - forAll (curMap, i) - { - expandField[curMap[i]] = subField[i]; - } - } +// forAll (curMap, i) +// { +// expandField[curMap[i]] = subField[i]; +// } +// } - // Receive sub field from neighbour - for (label domainI = 0; domainI < Pstream::nProcs(); domainI++) - { - const labelList& curMap = map().constructMap()[domainI]; +// // Receive sub field from neighbour +// for (label domainI = 0; domainI < Pstream::nProcs(); domainI++) +// { +// const labelList& curMap = map().constructMap()[domainI]; - if (domainI != Pstream::myProcNo() && curMap.size()) - { - IPstream fromNbr(Pstream::blocking, domainI); - List recvField(fromNbr); - Pout<< "Receiving " << recvField.size() - << " (" << curMap.size() - << ") from " << domainI - << " to " << Pstream::myProcNo() - << endl; +// if (domainI != Pstream::myProcNo() && curMap.size()) +// { +// IPstream fromNbr(Pstream::blocking, domainI); +// List recvField(fromNbr); +// Pout<< "Receiving " << recvField.size() +// << " (" << curMap.size() +// << ") from " << domainI +// << " to " << Pstream::myProcNo() +// << endl; - if (curMap.size() != recvField.size()) - { - FatalErrorIn - ( - "tmp > ggiPolyPatch::fastExpand\n" - "(\n" - " const Field& ff\n" - ") const" - ) << "Expected from processor " << domainI << " size " - << curMap.size() << " but received " - << recvField.size() << " elements." - << abort(FatalError); - } +// if (curMap.size() != recvField.size()) +// { +// FatalErrorIn +// ( +// "tmp > ggiPolyPatch::fastExpand\n" +// "(\n" +// " const Field& ff\n" +// ") const" +// ) << "Expected from processor " << domainI << " size " +// << curMap.size() << " but received " +// << recvField.size() << " elements." +// << abort(FatalError); +// } - forAll (curMap, i) - { - expandField[curMap[i]] = recvField[i]; - } - } - } +// forAll (curMap, i) +// { +// expandField[curMap[i]] = recvField[i]; +// } +// } +// } - return texpandField; - } - else - { - // Serial. Expand the field to zone size +// return texpandField; +// } +// else +// { +// // Serial. Expand the field to zone size - const labelList& zAddr = zoneAddressing(); +// const labelList& zAddr = zoneAddressing(); - forAll (zAddr, i) - { - expandField[zAddr[i]] = ff[i]; - } - } +// forAll (zAddr, i) +// { +// expandField[zAddr[i]] = ff[i]; +// } +// } #endif } From 0248621005259b3cfa500f3d1a113a5c8b5f2a40 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 26 May 2016 13:38:48 +0100 Subject: [PATCH 3/4] Formatting --- .../mapPolyMesh/mapDistribute/mapDistributeTemplates.C | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/foam/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C b/src/foam/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C index eac7ba8f5..11c0db0cd 100644 --- a/src/foam/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C +++ b/src/foam/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C @@ -141,6 +141,7 @@ void Foam::mapDistribute::distribute } } } + field.transfer(newField); } else if (commsType == Pstream::nonBlocking) @@ -174,7 +175,9 @@ void Foam::mapDistribute::distribute if (domain != Pstream::myProcNo() && map.size()) { List& subField = sendFields[domain]; + subField.setSize(map.size()); + forAll(map, i) { subField[i] = field[map[i]]; @@ -219,6 +222,7 @@ void Foam::mapDistribute::distribute List& subField = sendFields[Pstream::myProcNo()]; subField.setSize(map.size()); + forAll(map, i) { subField[i] = field[map[i]]; @@ -230,7 +234,6 @@ void Foam::mapDistribute::distribute field.setSize(constructSize); - // Receive sub field from myself (sendFields[Pstream::myProcNo()]) { const labelList& map = constructMap[Pstream::myProcNo()]; From b9586f41e68536491026a24527c234e0a92bf822 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 26 May 2016 13:41:07 +0100 Subject: [PATCH 4/4] Feature: universal steady solver for incompressible and compressible flows --- .../steadyUniversalFoam/Make/files | 3 + .../steadyUniversalFoam/Make/options | 13 + .../compressible/steadyUniversalFoam/UEqn.H | 18 + .../steadyUniversalFoam/clearThermo.H | 7 + .../steadyUniversalFoam/convergenceCheck.H | 9 + .../steadyUniversalFoam/createFields.H | 41 ++ .../steadyUniversalFoam/createThermo.H | 51 ++ .../steadyUniversalFoam/divError.H | 48 ++ .../compressible/steadyUniversalFoam/hEqn.H | 36 ++ .../initConvergenceCheck.H | 7 + .../compressible/steadyUniversalFoam/pEqn.H | 79 +++ .../steadyUniversalFoam/readFieldBounds.H | 20 + .../steadyUniversalFoam/rhoFromP.H | 15 + .../steadyUniversalFoam/steadyUniversalFoam.C | 94 +++ .../universalContinuityErrs.H | 49 ++ .../steadyUniversalMRFFoam/Make/files | 3 + .../steadyUniversalMRFFoam/Make/options | 13 + .../steadyUniversalMRFFoam/UEqn.H | 21 + .../steadyUniversalMRFFoam/clearThermo.H | 7 + .../steadyUniversalMRFFoam/convergenceCheck.H | 9 + .../steadyUniversalMRFFoam/createFields.H | 82 +++ .../steadyUniversalMRFFoam/createThermo.H | 51 ++ .../steadyUniversalMRFFoam/divError.H | 48 ++ .../steadyUniversalMRFFoam/iEqn.H | 31 + .../initConvergenceCheck.H | 7 + .../steadyUniversalMRFFoam/pEqn.H | 79 +++ .../steadyUniversalMRFFoam/readFieldBounds.H | 20 + .../steadyUniversalMRFFoam/rhoFromP.H | 15 + .../steadyUniversalMRFFoam.C | 101 +++ .../universalContinuityErrs.H | 49 ++ .../axialTurbineGgiJump/0/T | 116 ++++ .../axialTurbineGgiJump/0/U | 114 ++++ .../axialTurbineGgiJump/0/alphat | 130 ++++ .../axialTurbineGgiJump/0/epsilon | 157 +++++ .../axialTurbineGgiJump/0/i | 138 +++++ .../axialTurbineGgiJump/0/k | 121 ++++ .../axialTurbineGgiJump/0/mut | 146 +++++ .../axialTurbineGgiJump/0/p | 110 ++++ .../axialTurbineGgiJump/Allclean | 8 + .../axialTurbineGgiJump/Allrun | 20 + .../axialTurbineGgiJump/constant/MRFZones | 31 + .../constant/RASProperties | 191 ++++++ .../constant/polyMesh/blockMeshDict | 508 +++++++++++++++ .../constant/polyMesh/blockMeshDict.m4 | 508 +++++++++++++++ .../constant/polyMesh/boundary | 177 ++++++ .../constant/thermophysicalProperties | 23 + .../constant/transportProperties | 37 ++ .../axialTurbineGgiJump/save/T | 116 ++++ .../axialTurbineGgiJump/save/U | 114 ++++ .../axialTurbineGgiJump/save/alphat | 130 ++++ .../axialTurbineGgiJump/save/epsilon | 157 +++++ .../axialTurbineGgiJump/save/i | 138 +++++ .../axialTurbineGgiJump/save/k | 121 ++++ .../axialTurbineGgiJump/save/mut | 146 +++++ .../axialTurbineGgiJump/save/p | 110 ++++ .../axialTurbineGgiJump/setBatchGgi | 9 + .../axialTurbineGgiJump/system/controlDict | 63 ++ .../system/decomposeParDict | 86 +++ .../axialTurbineGgiJump/system/fvSchemes | 107 ++++ .../axialTurbineGgiJump/system/fvSchemes_old | 76 +++ .../axialTurbineGgiJump/system/fvSolution | 117 ++++ .../axialTurbineMixingPlane/0/T | 116 ++++ .../axialTurbineMixingPlane/0/U | 114 ++++ .../axialTurbineMixingPlane/0/alphat | 130 ++++ .../axialTurbineMixingPlane/0/epsilon | 153 +++++ .../axialTurbineMixingPlane/0/i | 138 +++++ .../axialTurbineMixingPlane/0/k | 121 ++++ .../axialTurbineMixingPlane/0/mut | 146 +++++ .../axialTurbineMixingPlane/0/p | 106 ++++ .../axialTurbineMixingPlane/Allclean | 8 + .../axialTurbineMixingPlane/Allrun | 20 + .../axialTurbineMixingPlane/constant/MRFZones | 31 + .../constant/RASProperties | 24 + .../constant/polyMesh/blockMeshDict | 576 ++++++++++++++++++ .../constant/polyMesh/blockMeshDict.m4 | 576 ++++++++++++++++++ .../constant/polyMesh/boundary | 205 +++++++ .../constant/thermophysicalProperties | 23 + .../constant/transportProperties | 37 ++ .../axialTurbineMixingPlane/save/T | 116 ++++ .../axialTurbineMixingPlane/save/U | 114 ++++ .../axialTurbineMixingPlane/save/alphat | 130 ++++ .../axialTurbineMixingPlane/save/epsilon | 153 +++++ .../axialTurbineMixingPlane/save/i | 138 +++++ .../axialTurbineMixingPlane/save/k | 121 ++++ .../axialTurbineMixingPlane/save/mut | 146 +++++ .../axialTurbineMixingPlane/save/p | 106 ++++ .../setBatchMixingPlane | 9 + .../system/controlDict | 75 +++ .../system/decomposeParDict | 86 +++ .../axialTurbineMixingPlane/system/fvSchemes | 90 +++ .../system/fvSchemes_old | 76 +++ .../axialTurbineMixingPlane/system/fvSolution | 107 ++++ 92 files changed, 9042 insertions(+) create mode 100644 applications/solvers/compressible/steadyUniversalFoam/Make/files create mode 100644 applications/solvers/compressible/steadyUniversalFoam/Make/options create mode 100644 applications/solvers/compressible/steadyUniversalFoam/UEqn.H create mode 100644 applications/solvers/compressible/steadyUniversalFoam/clearThermo.H create mode 100644 applications/solvers/compressible/steadyUniversalFoam/convergenceCheck.H create mode 100644 applications/solvers/compressible/steadyUniversalFoam/createFields.H create mode 100644 applications/solvers/compressible/steadyUniversalFoam/createThermo.H create mode 100644 applications/solvers/compressible/steadyUniversalFoam/divError.H create mode 100644 applications/solvers/compressible/steadyUniversalFoam/hEqn.H create mode 100644 applications/solvers/compressible/steadyUniversalFoam/initConvergenceCheck.H create mode 100644 applications/solvers/compressible/steadyUniversalFoam/pEqn.H create mode 100644 applications/solvers/compressible/steadyUniversalFoam/readFieldBounds.H create mode 100644 applications/solvers/compressible/steadyUniversalFoam/rhoFromP.H create mode 100644 applications/solvers/compressible/steadyUniversalFoam/steadyUniversalFoam.C create mode 100644 applications/solvers/compressible/steadyUniversalFoam/universalContinuityErrs.H create mode 100644 applications/solvers/compressible/steadyUniversalMRFFoam/Make/files create mode 100644 applications/solvers/compressible/steadyUniversalMRFFoam/Make/options create mode 100644 applications/solvers/compressible/steadyUniversalMRFFoam/UEqn.H create mode 100644 applications/solvers/compressible/steadyUniversalMRFFoam/clearThermo.H create mode 100644 applications/solvers/compressible/steadyUniversalMRFFoam/convergenceCheck.H create mode 100644 applications/solvers/compressible/steadyUniversalMRFFoam/createFields.H create mode 100644 applications/solvers/compressible/steadyUniversalMRFFoam/createThermo.H create mode 100644 applications/solvers/compressible/steadyUniversalMRFFoam/divError.H create mode 100644 applications/solvers/compressible/steadyUniversalMRFFoam/iEqn.H create mode 100644 applications/solvers/compressible/steadyUniversalMRFFoam/initConvergenceCheck.H create mode 100644 applications/solvers/compressible/steadyUniversalMRFFoam/pEqn.H create mode 100644 applications/solvers/compressible/steadyUniversalMRFFoam/readFieldBounds.H create mode 100644 applications/solvers/compressible/steadyUniversalMRFFoam/rhoFromP.H create mode 100644 applications/solvers/compressible/steadyUniversalMRFFoam/steadyUniversalMRFFoam.C create mode 100644 applications/solvers/compressible/steadyUniversalMRFFoam/universalContinuityErrs.H create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/T create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/U create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/alphat create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/epsilon create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/i create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/k create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/mut create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/p create mode 100755 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/Allclean create mode 100755 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/Allrun create mode 100755 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/MRFZones create mode 100755 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/RASProperties create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/polyMesh/blockMeshDict create mode 100755 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/polyMesh/blockMeshDict.m4 create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/polyMesh/boundary create mode 100755 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/thermophysicalProperties create mode 100755 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/transportProperties create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/T create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/U create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/alphat create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/epsilon create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/i create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/k create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/mut create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/p create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/setBatchGgi create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/system/controlDict create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/system/decomposeParDict create mode 100755 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/system/fvSchemes create mode 100755 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/system/fvSchemes_old create mode 100755 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/system/fvSolution create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/T create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/U create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/alphat create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/epsilon create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/i create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/k create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/mut create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/p create mode 100755 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/Allclean create mode 100755 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/Allrun create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/MRFZones create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/RASProperties create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/polyMesh/blockMeshDict create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/polyMesh/blockMeshDict.m4 create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/polyMesh/boundary create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/thermophysicalProperties create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/transportProperties create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/T create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/U create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/alphat create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/epsilon create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/i create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/k create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/mut create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/p create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/setBatchMixingPlane create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/system/controlDict create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/system/decomposeParDict create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/system/fvSchemes create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/system/fvSchemes_old create mode 100644 tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/system/fvSolution diff --git a/applications/solvers/compressible/steadyUniversalFoam/Make/files b/applications/solvers/compressible/steadyUniversalFoam/Make/files new file mode 100644 index 000000000..d2e3d7c30 --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalFoam/Make/files @@ -0,0 +1,3 @@ +steadyUniversalFoam.C + +EXE = $(FOAM_APPBIN)/steadyUniversalFoam diff --git a/applications/solvers/compressible/steadyUniversalFoam/Make/options b/applications/solvers/compressible/steadyUniversalFoam/Make/options new file mode 100644 index 000000000..4989a55bb --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalFoam/Make/options @@ -0,0 +1,13 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel + +EXE_LIBS = \ + -lfiniteVolume \ + -lmeshTools \ + -lbasicThermophysicalModels \ + -lspecie \ + -lcompressibleRASModels \ + -llduSolvers diff --git a/applications/solvers/compressible/steadyUniversalFoam/UEqn.H b/applications/solvers/compressible/steadyUniversalFoam/UEqn.H new file mode 100644 index 000000000..4e2e22af0 --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalFoam/UEqn.H @@ -0,0 +1,18 @@ + // Solve the momentum equation + U.storePrevIter(); + + fvVectorMatrix UEqn + ( + fvm::ddt(rho, U) + + fvm::div(phi, U) + + turbulence->divDevRhoReff(U) + ); + + UEqn.relax(); + + eqnResidual = solve + ( + UEqn == -fvc::grad(p) + ).initialResidual(); + + maxResidual = max(eqnResidual, maxResidual); diff --git a/applications/solvers/compressible/steadyUniversalFoam/clearThermo.H b/applications/solvers/compressible/steadyUniversalFoam/clearThermo.H new file mode 100644 index 000000000..8b84ece5d --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalFoam/clearThermo.H @@ -0,0 +1,7 @@ +if (compressible) +{ + if (psisPtr) + { + delete psisPtr; + } +} diff --git a/applications/solvers/compressible/steadyUniversalFoam/convergenceCheck.H b/applications/solvers/compressible/steadyUniversalFoam/convergenceCheck.H new file mode 100644 index 000000000..895806319 --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalFoam/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/compressible/steadyUniversalFoam/createFields.H b/applications/solvers/compressible/steadyUniversalFoam/createFields.H new file mode 100644 index 000000000..fed1a01c7 --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalFoam/createFields.H @@ -0,0 +1,41 @@ + volScalarField rho + ( + IOobject + ( + "rho", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + thermo.rho() + ); + rho.oldTime(); + + Info<< "\nReading field U\n" << endl; + volVectorField U + ( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + +# include "compressibleCreatePhi.H" + + Info<< "Creating turbulence model\n" << endl; + autoPtr turbulence + ( + compressible::RASModel::New + ( + rho, + U, + phi, + thermo + ) + ); diff --git a/applications/solvers/compressible/steadyUniversalFoam/createThermo.H b/applications/solvers/compressible/steadyUniversalFoam/createThermo.H new file mode 100644 index 000000000..1c9e0c7f6 --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalFoam/createThermo.H @@ -0,0 +1,51 @@ + Info<< "Reading thermophysical properties\n" << endl; + + volScalarField* pPtr = NULL; + volScalarField* hPtr = NULL; + const volScalarField* TPtr = NULL; + + volScalarField* psisPtr = NULL; + basicThermo* thermoPtr = NULL; + + Switch compressible; + + { + dictionary pimple = mesh.solutionDict().subDict("PIMPLE"); + + compressible = Switch(pimple.lookup("compressible")); + + if (compressible) + { + thermoPtr = + ( + basicPsiThermo::New(mesh) + ).ptr(); + + pPtr = &(thermoPtr->p()); + hPtr = &(thermoPtr->h()); + TPtr = &(thermoPtr->T()); + psisPtr = new volScalarField + ( + "psi", + thermoPtr->psi()/thermoPtr->Cp()*thermoPtr->Cv() + ); + } + else + { + thermoPtr = + ( + basicRhoThermo::New(mesh) + ).ptr(); + + pPtr = &(thermoPtr->p()); + hPtr = &(thermoPtr->h()); + TPtr = &(thermoPtr->T()); + psisPtr = const_cast(&(thermoPtr->psi())); + } + } + + basicThermo& thermo = *thermoPtr; + volScalarField& p = *pPtr; + volScalarField& h = *hPtr; + const volScalarField& T = *TPtr; + volScalarField& psis = *psisPtr; diff --git a/applications/solvers/compressible/steadyUniversalFoam/divError.H b/applications/solvers/compressible/steadyUniversalFoam/divError.H new file mode 100644 index 000000000..5ce78191b --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalFoam/divError.H @@ -0,0 +1,48 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | foam-extend: Open Source CFD + \\ / O peration | Version: 3.2 + \\ / A nd | Web: http://www.foam-extend.org + \\/ M anipulation | For copyright notice see file Copyright +------------------------------------------------------------------------------- +License + This file is part of foam-extend. + + foam-extend is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation, either version 3 of the License, or (at your + option) any later version. + + foam-extend 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 foam-extend. If not, see . + +Global + continuityErrs + +Description + Calculates and prints the continuity errors. + +\*---------------------------------------------------------------------------*/ + +{ + volScalarField divErr = fvc::ddt(psi, p); + + scalar sumLocalDivErr = + mag(divErr)().weightedAverage(mesh.V()).value(); + + scalar globalDivErr = + divErr.weightedAverage(mesh.V()).value(); + + Info<< "time step divFlux errors: " + << "maximum = " << max(divErr.internalField()) + << ", sum local = " << sumLocalDivErr + << ", global = " << globalDivErr + << endl; +} + +// ************************************************************************* // diff --git a/applications/solvers/compressible/steadyUniversalFoam/hEqn.H b/applications/solvers/compressible/steadyUniversalFoam/hEqn.H new file mode 100644 index 000000000..c379926a8 --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalFoam/hEqn.H @@ -0,0 +1,36 @@ +{ + // Solve the enthalpy equation + + // Calculate face velocity from flux + surfaceScalarField faceU + ( + "faceU", + phi/fvc::interpolate(rho) + ); + + fvScalarMatrix hEqn + ( + fvm::ddt(rho, h) + + fvm::div(phi, h) + - fvm::laplacian(turbulence->alphaEff(), h) + == + fvc::div(faceU, p, "div(U,p)") + - p*fvc::div(faceU) + // ddt(p) term removed: steady-state. HJ, 27/Apr/2010 + // Viscous heating: note sign (devRhoReff has a minus in it) + - (turbulence->devRhoReff() && fvc::grad(U)) + ); + + hEqn.relax(); + + eqnResidual = hEqn.solve().initialResidual(); + maxResidual = max(eqnResidual, maxResidual); + + // Bounding of enthalpy taken out + thermo.correct(); + + if (compressible) + { + psis = thermo.psi()/thermo.Cp()*thermo.Cv(); + } +} diff --git a/applications/solvers/compressible/steadyUniversalFoam/initConvergenceCheck.H b/applications/solvers/compressible/steadyUniversalFoam/initConvergenceCheck.H new file mode 100644 index 000000000..47a1852f0 --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalFoam/initConvergenceCheck.H @@ -0,0 +1,7 @@ +// initialize values for convergence checks + + scalar eqnResidual = 1, maxResidual = 0; + scalar convergenceCriterion = 0; + + pimple.readIfPresent("convergence", convergenceCriterion); + diff --git a/applications/solvers/compressible/steadyUniversalFoam/pEqn.H b/applications/solvers/compressible/steadyUniversalFoam/pEqn.H new file mode 100644 index 000000000..636de243d --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalFoam/pEqn.H @@ -0,0 +1,79 @@ +{ + volScalarField rUA = 1.0/UEqn.A(); + + surfaceScalarField psisf = fvc::interpolate(psis); + surfaceScalarField rhof = fvc::interpolate(rho); + + // Needs to be outside of loop since p is changing, but psi and rho are not + surfaceScalarField rhoReff = rhof - psisf*fvc::interpolate(p); + + for (int corr = 0; corr < nCorr; corr++) + { + U = rUA*UEqn.H(); + + // Calculate phi for boundary conditions + phi = rhof*fvc::interpolate(U) & mesh.Sf(); + + surfaceScalarField phid2 = rhoReff/rhof*phi; + + surfaceScalarField phid("phid", psisf/rhof*phi); + + p.storePrevIter(); + + for (int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++) + { + fvScalarMatrix pEqn + ( + fvm::ddt(psis, p) + + fvm::div(phid, p) + + fvc::div(phid2) + - fvm::laplacian(rho*rUA, p) + ); + + // Retain the residual from the first pressure solution + eqnResidual = pEqn.solve().initialResidual(); + + if (corr == 0 && nonOrth == 0) + { + maxResidual = max(eqnResidual, maxResidual); + } + + // Calculate the flux + if (nonOrth == nNonOrthCorr) + { + phi = phid2 + pEqn.flux(); + } + } + + // Use custom continuity error check +# include "universalContinuityErrs.H" + + // Relax the pressure + p.relax(); + + U -= rUA*fvc::grad(p); + U.correctBoundaryConditions(); + } + + // Bound the pressure + if (min(p) < pMin || max(p) > pMax) + { + p.max(pMin); + p.min(pMax); + p.correctBoundaryConditions(); + } + + // Bound the velocity + volScalarField magU = mag(U); + + if (max(magU) > UMax) + { + volScalarField Ulimiter = pos(magU - UMax)*UMax/(magU + smallU) + + neg(magU - UMax); + Ulimiter.max(scalar(0)); + Ulimiter.min(scalar(1)); + + U *= Ulimiter; + U.correctBoundaryConditions(); + } +} diff --git a/applications/solvers/compressible/steadyUniversalFoam/readFieldBounds.H b/applications/solvers/compressible/steadyUniversalFoam/readFieldBounds.H new file mode 100644 index 000000000..b348b1988 --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalFoam/readFieldBounds.H @@ -0,0 +1,20 @@ + // Read field bounds + dictionary fieldBounds = mesh.solutionDict().subDict("fieldBounds"); + + // Pressure bounds + dimensionedScalar pMin("pMin", p.dimensions(), 0); + dimensionedScalar pMax("pMax", p.dimensions(), GREAT); + + fieldBounds.lookup(p.name()) >> pMin.value() >> pMax.value(); + + // Temperature bounds + dimensionedScalar TMin("TMin", T.dimensions(), 0); + dimensionedScalar TMax("TMax", T.dimensions(), GREAT); + + fieldBounds.lookup(T.name()) >> TMin.value() >> TMax.value(); + + // Velocity bound + dimensionedScalar UMax("UMax", U.dimensions(), GREAT); + + fieldBounds.lookup(U.name()) >> UMax.value(); + dimensionedScalar smallU("smallU", dimVelocity, 1e-10); diff --git a/applications/solvers/compressible/steadyUniversalFoam/rhoFromP.H b/applications/solvers/compressible/steadyUniversalFoam/rhoFromP.H new file mode 100644 index 000000000..31278008e --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalFoam/rhoFromP.H @@ -0,0 +1,15 @@ +{ + // Calculate density from pressure + rho.storePrevIter(); + rho = thermo.rho()(); + + // Bound rho + volScalarField R = thermo.Cp() - thermo.Cv(); + + volScalarField rhoMin = pMin/(R*TMax); + volScalarField rhoMax = pMax/(R*TMin); + + rho = Foam::min(rho, rhoMax); + rho = Foam::max(rho, rhoMin); + rho.relax(); +} diff --git a/applications/solvers/compressible/steadyUniversalFoam/steadyUniversalFoam.C b/applications/solvers/compressible/steadyUniversalFoam/steadyUniversalFoam.C new file mode 100644 index 000000000..42fab40e4 --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalFoam/steadyUniversalFoam.C @@ -0,0 +1,94 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | foam-extend: Open Source CFD + \\ / O peration | Version: 3.2 + \\ / A nd | Web: http://www.foam-extend.org + \\/ M anipulation | For copyright notice see file Copyright +------------------------------------------------------------------------------- +License + This file is part of foam-extend. + + foam-extend is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation, either version 3 of the License, or (at your + option) any later version. + + foam-extend 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 foam-extend. If not, see . + +Application + steadyUniversalFoam + +Description + Steady-state solver for incompressible and compressible turbulent flow. + +Author + Hrvoje Jasak, Wikki Ltd. All rights reserved. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "basicPsiThermo.H" +#include "basicRhoThermo.H" +#include "RASModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + +# include "setRootCase.H" + +# include "createTime.H" +# include "createMesh.H" +# include "createThermo.H" +# include "createFields.H" +# include "readPIMPLEControls.H" +# include "initContinuityErrs.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nStarting time loop\n" << endl; + + while (runTime.loop()) + { + Info<< "Time = " << runTime.timeName() << nl << endl; + +# include "readPIMPLEControls.H" +# include "readFieldBounds.H" + +# include "initConvergenceCheck.H" + +# include "UEqn.H" +# include "pEqn.H" + +# include "hEqn.H" + +# include "rhoFromP.H" + + // Correct turbulence + turbulence->correct(); + + runTime.write(); + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + +# include "convergenceCheck.H" + } + +# include "clearThermo.H" + + Info<< "End\n" << endl; + + return(0); +} + + +// ************************************************************************* // diff --git a/applications/solvers/compressible/steadyUniversalFoam/universalContinuityErrs.H b/applications/solvers/compressible/steadyUniversalFoam/universalContinuityErrs.H new file mode 100644 index 000000000..24b8cf151 --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalFoam/universalContinuityErrs.H @@ -0,0 +1,49 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | foam-extend: Open Source CFD + \\ / O peration | Version: 3.2 + \\ / A nd | Web: http://www.foam-extend.org + \\/ M anipulation | For copyright notice see file Copyright +------------------------------------------------------------------------------- +License + This file is part of foam-extend. + + foam-extend is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation, either version 3 of the License, or (at your + option) any later version. + + foam-extend 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 foam-extend. If not, see . + +Global + continuityErrs + +Description + Calculates and prints the continuity errors. + +\*---------------------------------------------------------------------------*/ + +{ + volScalarField contErr = fvc::ddt(rho) + fvc::div(phi); + + sumLocalContErr = runTime.deltaT().value()* + mag(contErr)().weightedAverage(mesh.V()).value(); + + globalContErr = runTime.deltaT().value()* + contErr.weightedAverage(mesh.V()).value(); + + cumulativeContErr += globalContErr; + + Info<< "time step continuity errors : sum local = " << sumLocalContErr + << ", global = " << globalContErr + << ", cumulative = " << cumulativeContErr + << endl; +} + +// ************************************************************************* // diff --git a/applications/solvers/compressible/steadyUniversalMRFFoam/Make/files b/applications/solvers/compressible/steadyUniversalMRFFoam/Make/files new file mode 100644 index 000000000..5c46179ce --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalMRFFoam/Make/files @@ -0,0 +1,3 @@ +steadyUniversalMRFFoam.C + +EXE = $(FOAM_APPBIN)/steadyUniversalMRFFoam diff --git a/applications/solvers/compressible/steadyUniversalMRFFoam/Make/options b/applications/solvers/compressible/steadyUniversalMRFFoam/Make/options new file mode 100644 index 000000000..4989a55bb --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalMRFFoam/Make/options @@ -0,0 +1,13 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel + +EXE_LIBS = \ + -lfiniteVolume \ + -lmeshTools \ + -lbasicThermophysicalModels \ + -lspecie \ + -lcompressibleRASModels \ + -llduSolvers diff --git a/applications/solvers/compressible/steadyUniversalMRFFoam/UEqn.H b/applications/solvers/compressible/steadyUniversalMRFFoam/UEqn.H new file mode 100644 index 000000000..1c39c948b --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalMRFFoam/UEqn.H @@ -0,0 +1,21 @@ + // Solve the momentum equation + U.storePrevIter(); + + fvVectorMatrix UEqn + ( + fvm::ddt(rho, U) + + fvm::div(phi, U) + + turbulence->divDevRhoReff(U) + ); + + // MRF: add Coriolis force + mrfZones.addCoriolis(rho, UEqn); + + UEqn.relax(); + + eqnResidual = solve + ( + UEqn == -fvc::grad(p) + ).initialResidual(); + + maxResidual = max(eqnResidual, maxResidual); diff --git a/applications/solvers/compressible/steadyUniversalMRFFoam/clearThermo.H b/applications/solvers/compressible/steadyUniversalMRFFoam/clearThermo.H new file mode 100644 index 000000000..8b84ece5d --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalMRFFoam/clearThermo.H @@ -0,0 +1,7 @@ +if (compressible) +{ + if (psisPtr) + { + delete psisPtr; + } +} diff --git a/applications/solvers/compressible/steadyUniversalMRFFoam/convergenceCheck.H b/applications/solvers/compressible/steadyUniversalMRFFoam/convergenceCheck.H new file mode 100644 index 000000000..895806319 --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalMRFFoam/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/compressible/steadyUniversalMRFFoam/createFields.H b/applications/solvers/compressible/steadyUniversalMRFFoam/createFields.H new file mode 100644 index 000000000..5a432a884 --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalMRFFoam/createFields.H @@ -0,0 +1,82 @@ + volScalarField rho + ( + IOobject + ( + "rho", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + thermo.rho() + ); + rho.oldTime(); + + Info<< "\nReading field U\n" << endl; + volVectorField U + ( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + +# include "compressibleCreatePhi.H" + + Info<< "Creating turbulence model\n" << endl; + autoPtr turbulence + ( + compressible::RASModel::New + ( + rho, + U, + phi, + thermo + ) + ); + + // Create MRF zones + MRFZones mrfZones(mesh); + mrfZones.correctBoundaryVelocity(U); + + // Create relative velocity + volVectorField Urel + ( + IOobject + ( + "Urel", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + U + ); + mrfZones.relativeVelocity(Urel); + + // Create rotational velocity (= omega x r) + volVectorField Urot + ( + "Urot", + U - Urel + ); + + // Create rothalpy, in two steps to preserve boundary conditions + volScalarField i + ( + IOobject + ( + "i", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + i == h - 0.5*(magSqr(Urot) - magSqr(Urel)); diff --git a/applications/solvers/compressible/steadyUniversalMRFFoam/createThermo.H b/applications/solvers/compressible/steadyUniversalMRFFoam/createThermo.H new file mode 100644 index 000000000..1c9e0c7f6 --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalMRFFoam/createThermo.H @@ -0,0 +1,51 @@ + Info<< "Reading thermophysical properties\n" << endl; + + volScalarField* pPtr = NULL; + volScalarField* hPtr = NULL; + const volScalarField* TPtr = NULL; + + volScalarField* psisPtr = NULL; + basicThermo* thermoPtr = NULL; + + Switch compressible; + + { + dictionary pimple = mesh.solutionDict().subDict("PIMPLE"); + + compressible = Switch(pimple.lookup("compressible")); + + if (compressible) + { + thermoPtr = + ( + basicPsiThermo::New(mesh) + ).ptr(); + + pPtr = &(thermoPtr->p()); + hPtr = &(thermoPtr->h()); + TPtr = &(thermoPtr->T()); + psisPtr = new volScalarField + ( + "psi", + thermoPtr->psi()/thermoPtr->Cp()*thermoPtr->Cv() + ); + } + else + { + thermoPtr = + ( + basicRhoThermo::New(mesh) + ).ptr(); + + pPtr = &(thermoPtr->p()); + hPtr = &(thermoPtr->h()); + TPtr = &(thermoPtr->T()); + psisPtr = const_cast(&(thermoPtr->psi())); + } + } + + basicThermo& thermo = *thermoPtr; + volScalarField& p = *pPtr; + volScalarField& h = *hPtr; + const volScalarField& T = *TPtr; + volScalarField& psis = *psisPtr; diff --git a/applications/solvers/compressible/steadyUniversalMRFFoam/divError.H b/applications/solvers/compressible/steadyUniversalMRFFoam/divError.H new file mode 100644 index 000000000..5ce78191b --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalMRFFoam/divError.H @@ -0,0 +1,48 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | foam-extend: Open Source CFD + \\ / O peration | Version: 3.2 + \\ / A nd | Web: http://www.foam-extend.org + \\/ M anipulation | For copyright notice see file Copyright +------------------------------------------------------------------------------- +License + This file is part of foam-extend. + + foam-extend is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation, either version 3 of the License, or (at your + option) any later version. + + foam-extend 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 foam-extend. If not, see . + +Global + continuityErrs + +Description + Calculates and prints the continuity errors. + +\*---------------------------------------------------------------------------*/ + +{ + volScalarField divErr = fvc::ddt(psi, p); + + scalar sumLocalDivErr = + mag(divErr)().weightedAverage(mesh.V()).value(); + + scalar globalDivErr = + divErr.weightedAverage(mesh.V()).value(); + + Info<< "time step divFlux errors: " + << "maximum = " << max(divErr.internalField()) + << ", sum local = " << sumLocalDivErr + << ", global = " << globalDivErr + << endl; +} + +// ************************************************************************* // diff --git a/applications/solvers/compressible/steadyUniversalMRFFoam/iEqn.H b/applications/solvers/compressible/steadyUniversalMRFFoam/iEqn.H new file mode 100644 index 000000000..861099c75 --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalMRFFoam/iEqn.H @@ -0,0 +1,31 @@ +{ + // Create relative velocity + Urel == U; + mrfZones.relativeVelocity(Urel); + + // Create rotational velocity (= omega x r) + Urot == U - Urel; + + fvScalarMatrix iEqn + ( + fvm::ddt(rho, i) + + fvm::div(phi, i) + - fvm::laplacian(turbulence->alphaEff(), i) + == + // Viscous heating: note sign (devRhoReff has a minus in it) + - (turbulence->devRhoReff() && fvc::grad(U)) + ); + + iEqn.relax(); + + eqnResidual = iEqn.solve().initialResidual(); + maxResidual = max(eqnResidual, maxResidual); + + // From rothalpy, calculate enthalpy after solution of rothalpy equation + h = i + 0.5*(magSqr(Urot) - magSqr(Urel)); + h.correctBoundaryConditions(); + // Update thermo for new h + thermo.correct(); + psis = thermo.psi()/thermo.Cp()*thermo.Cv(); +} + diff --git a/applications/solvers/compressible/steadyUniversalMRFFoam/initConvergenceCheck.H b/applications/solvers/compressible/steadyUniversalMRFFoam/initConvergenceCheck.H new file mode 100644 index 000000000..47a1852f0 --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalMRFFoam/initConvergenceCheck.H @@ -0,0 +1,7 @@ +// initialize values for convergence checks + + scalar eqnResidual = 1, maxResidual = 0; + scalar convergenceCriterion = 0; + + pimple.readIfPresent("convergence", convergenceCriterion); + diff --git a/applications/solvers/compressible/steadyUniversalMRFFoam/pEqn.H b/applications/solvers/compressible/steadyUniversalMRFFoam/pEqn.H new file mode 100644 index 000000000..636de243d --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalMRFFoam/pEqn.H @@ -0,0 +1,79 @@ +{ + volScalarField rUA = 1.0/UEqn.A(); + + surfaceScalarField psisf = fvc::interpolate(psis); + surfaceScalarField rhof = fvc::interpolate(rho); + + // Needs to be outside of loop since p is changing, but psi and rho are not + surfaceScalarField rhoReff = rhof - psisf*fvc::interpolate(p); + + for (int corr = 0; corr < nCorr; corr++) + { + U = rUA*UEqn.H(); + + // Calculate phi for boundary conditions + phi = rhof*fvc::interpolate(U) & mesh.Sf(); + + surfaceScalarField phid2 = rhoReff/rhof*phi; + + surfaceScalarField phid("phid", psisf/rhof*phi); + + p.storePrevIter(); + + for (int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++) + { + fvScalarMatrix pEqn + ( + fvm::ddt(psis, p) + + fvm::div(phid, p) + + fvc::div(phid2) + - fvm::laplacian(rho*rUA, p) + ); + + // Retain the residual from the first pressure solution + eqnResidual = pEqn.solve().initialResidual(); + + if (corr == 0 && nonOrth == 0) + { + maxResidual = max(eqnResidual, maxResidual); + } + + // Calculate the flux + if (nonOrth == nNonOrthCorr) + { + phi = phid2 + pEqn.flux(); + } + } + + // Use custom continuity error check +# include "universalContinuityErrs.H" + + // Relax the pressure + p.relax(); + + U -= rUA*fvc::grad(p); + U.correctBoundaryConditions(); + } + + // Bound the pressure + if (min(p) < pMin || max(p) > pMax) + { + p.max(pMin); + p.min(pMax); + p.correctBoundaryConditions(); + } + + // Bound the velocity + volScalarField magU = mag(U); + + if (max(magU) > UMax) + { + volScalarField Ulimiter = pos(magU - UMax)*UMax/(magU + smallU) + + neg(magU - UMax); + Ulimiter.max(scalar(0)); + Ulimiter.min(scalar(1)); + + U *= Ulimiter; + U.correctBoundaryConditions(); + } +} diff --git a/applications/solvers/compressible/steadyUniversalMRFFoam/readFieldBounds.H b/applications/solvers/compressible/steadyUniversalMRFFoam/readFieldBounds.H new file mode 100644 index 000000000..b348b1988 --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalMRFFoam/readFieldBounds.H @@ -0,0 +1,20 @@ + // Read field bounds + dictionary fieldBounds = mesh.solutionDict().subDict("fieldBounds"); + + // Pressure bounds + dimensionedScalar pMin("pMin", p.dimensions(), 0); + dimensionedScalar pMax("pMax", p.dimensions(), GREAT); + + fieldBounds.lookup(p.name()) >> pMin.value() >> pMax.value(); + + // Temperature bounds + dimensionedScalar TMin("TMin", T.dimensions(), 0); + dimensionedScalar TMax("TMax", T.dimensions(), GREAT); + + fieldBounds.lookup(T.name()) >> TMin.value() >> TMax.value(); + + // Velocity bound + dimensionedScalar UMax("UMax", U.dimensions(), GREAT); + + fieldBounds.lookup(U.name()) >> UMax.value(); + dimensionedScalar smallU("smallU", dimVelocity, 1e-10); diff --git a/applications/solvers/compressible/steadyUniversalMRFFoam/rhoFromP.H b/applications/solvers/compressible/steadyUniversalMRFFoam/rhoFromP.H new file mode 100644 index 000000000..31278008e --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalMRFFoam/rhoFromP.H @@ -0,0 +1,15 @@ +{ + // Calculate density from pressure + rho.storePrevIter(); + rho = thermo.rho()(); + + // Bound rho + volScalarField R = thermo.Cp() - thermo.Cv(); + + volScalarField rhoMin = pMin/(R*TMax); + volScalarField rhoMax = pMax/(R*TMin); + + rho = Foam::min(rho, rhoMax); + rho = Foam::max(rho, rhoMin); + rho.relax(); +} diff --git a/applications/solvers/compressible/steadyUniversalMRFFoam/steadyUniversalMRFFoam.C b/applications/solvers/compressible/steadyUniversalMRFFoam/steadyUniversalMRFFoam.C new file mode 100644 index 000000000..757afc5ee --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalMRFFoam/steadyUniversalMRFFoam.C @@ -0,0 +1,101 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | foam-extend: Open Source CFD + \\ / O peration | Version: 3.2 + \\ / A nd | Web: http://www.foam-extend.org + \\/ M anipulation | For copyright notice see file Copyright +------------------------------------------------------------------------------- +License + This file is part of foam-extend. + + foam-extend is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation, either version 3 of the License, or (at your + option) any later version. + + foam-extend 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 foam-extend. If not, see . + +Application + steadyUniversalMRFFoam + +Description + Steady-state solver for incompressible and compressible turbulent flow + with MRF zones. + +Author + Ilaria De Dominicis, General Electric Power, (March 2016) + +Contributor + Hrvoje Jasak, Wikki Ltd. + +GE CONFIDENTIAL INFORMATION 2016 General Electric Company. All Rights Reserved + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "basicPsiThermo.H" +#include "basicRhoThermo.H" +#include "RASModel.H" +#include "MRFZones.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + +# include "setRootCase.H" + +# include "createTime.H" +# include "createMesh.H" +# include "createThermo.H" +# include "createFields.H" +# include "readPIMPLEControls.H" +# include "initContinuityErrs.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nStarting time loop\n" << endl; + + while (runTime.loop()) + { + Info<< "Time = " << runTime.timeName() << nl << endl; + +# include "readPIMPLEControls.H" +# include "readFieldBounds.H" + +# include "initConvergenceCheck.H" + +# include "UEqn.H" +# include "pEqn.H" + +# include "iEqn.H" + +# include "rhoFromP.H" + + // Correct turbulence + turbulence->correct(); + + runTime.write(); + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + +# include "convergenceCheck.H" + } + +# include "clearThermo.H" + + Info<< "End\n" << endl; + + return(0); +} + + +// ************************************************************************* // diff --git a/applications/solvers/compressible/steadyUniversalMRFFoam/universalContinuityErrs.H b/applications/solvers/compressible/steadyUniversalMRFFoam/universalContinuityErrs.H new file mode 100644 index 000000000..24b8cf151 --- /dev/null +++ b/applications/solvers/compressible/steadyUniversalMRFFoam/universalContinuityErrs.H @@ -0,0 +1,49 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | foam-extend: Open Source CFD + \\ / O peration | Version: 3.2 + \\ / A nd | Web: http://www.foam-extend.org + \\/ M anipulation | For copyright notice see file Copyright +------------------------------------------------------------------------------- +License + This file is part of foam-extend. + + foam-extend is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation, either version 3 of the License, or (at your + option) any later version. + + foam-extend 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 foam-extend. If not, see . + +Global + continuityErrs + +Description + Calculates and prints the continuity errors. + +\*---------------------------------------------------------------------------*/ + +{ + volScalarField contErr = fvc::ddt(rho) + fvc::div(phi); + + sumLocalContErr = runTime.deltaT().value()* + mag(contErr)().weightedAverage(mesh.V()).value(); + + globalContErr = runTime.deltaT().value()* + contErr.weightedAverage(mesh.V()).value(); + + cumulativeContErr += globalContErr; + + Info<< "time step continuity errors : sum local = " << sumLocalContErr + << ", global = " << globalContErr + << ", cumulative = " << cumulativeContErr + << endl; +} + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/T b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/T new file mode 100644 index 000000000..cb72a9700 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/T @@ -0,0 +1,116 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 305.66; + +boundaryField +{ + GVINLET + { + type fixedValue; + value uniform 305.66; + } + GVOUTLET + { + type ggiEnthalpyJump; + patchType ggi; + rotating false; + value uniform 305.66; + } + GVCYCLIC + { + type cyclic; + } + GVBLADE + { + type zeroGradient; + } + GVHUB + { + type zeroGradient; + } + GVSHROUD + { + type zeroGradient; + } + RUINLET + { + type ggiEnthalpyJump; + patchType ggi; + rotating true; + value uniform 305.66; + } + RUOUTLET + { + type ggiEnthalpyJump; + patchType ggi; + rotating true; + value uniform 305.66; + } + RUCYCLIC1 + { + type cyclicGgi; + } + RUCYCLIC2 + { + type cyclicGgi; + } + RUBLADE + { + type zeroGradient; + } + RUHUB + { + type zeroGradient; + } + RUSHROUD + { + type zeroGradient; + } + DTINLET + { + type ggiEnthalpyJump; + patchType ggi; +rotating false; + value uniform 305.66; + } + DTOUTLET + { + type zeroGradient; + } + DTCYCLIC1 + { + type cyclicGgi; + } + DTCYCLIC2 + { + type cyclicGgi; + } + DTHUB + { + type zeroGradient; + } + DTSHROUD + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/U b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/U new file mode 100644 index 000000000..4d6db263c --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/U @@ -0,0 +1,114 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0.1 0.1 -1); + +boundaryField +{ + GVINLET + { + type fixedValue; + value uniform (0 0 -1); + } + GVOUTLET + { + type ggi; + value uniform (0 0 -1); + } + GVCYCLIC + { + type cyclic; + } + GVBLADE + { + type fixedValue; + value uniform (0 0 0); + } + GVHUB + { + type fixedValue; + value uniform (0 0 0); + } + GVSHROUD + { + type fixedValue; + value uniform (0 0 0); + } + RUINLET + { + type ggi; + value uniform (0 0 -1); + } + RUOUTLET + { + type ggi; + value uniform (0 0 -1); + } + RUCYCLIC1 + { + type cyclicGgi; + } + RUCYCLIC2 + { + type cyclicGgi; + } + RUBLADE + { + type fixedValue; + value uniform (0 0 0); + } + RUHUB + { + type fixedValue; + value uniform (0 0 0); + } + RUSHROUD + { + type fixedValue; + value uniform (0 0 0); + } + DTINLET + { + type ggi; + value uniform (0 0 -1); + } + DTOUTLET + { + type zeroGradient; + } + DTCYCLIC1 + { + type cyclicGgi; + } + DTCYCLIC2 + { + type cyclicGgi; + } + DTHUB + { + type fixedValue; + value uniform (0 0 0); + } + DTSHROUD + { + type fixedValue; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/alphat b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/alphat new file mode 100644 index 000000000..c0a7a5557 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/alphat @@ -0,0 +1,130 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + GVINLET + { + type calculated; + value uniform 0; + } + GVOUTLET + { + type ggi; + value uniform 0; + } + GVCYCLIC + { + type cyclic; + value uniform 0; + } + GVBLADE + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + GVHUB + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + GVSHROUD + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + RUINLET + { + type ggi; + value uniform 0; + } + RUOUTLET + { + type ggi; + value uniform 0; + } + RUCYCLIC1 + { + type cyclicGgi; + value uniform 0; + } + RUCYCLIC2 + { + type cyclicGgi; + value uniform 0; + } + RUBLADE + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + RUHUB + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + RUSHROUD + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + DTINLET + { + type ggi; + value uniform 0; + } + DTOUTLET + { + type calculated; + value uniform 0; + } + DTCYCLIC1 + { + type cyclicGgi; + value uniform 0; + } + DTCYCLIC2 + { + type cyclicGgi; + value uniform 0; + } + DTHUB + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + DTSHROUD + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/epsilon b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/epsilon new file mode 100644 index 000000000..66bf38921 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/epsilon @@ -0,0 +1,157 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 14.855; + +boundaryField +{ + GVINLET + { + type fixedValue; + value uniform 14.855; + } + GVOUTLET + { + type ggi; + patchType ggi; + value uniform 14.855; + } + GVCYCLIC + { + type cyclic; + value uniform 14.855; + } + GVBLADE + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + GVHUB + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + GVSHROUD + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + RUINLET + { + type ggi; + patchType ggi; + value uniform 14.855; + } + RUOUTLET + { + type ggi; + patchType ggi; + value uniform 14.855; + } + RUCYCLIC1 + { + type cyclicGgi; + value uniform 14.855; + } + RUCYCLIC2 + { + type cyclicGgi; + value uniform 14.855; + } + RUBLADE + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + RUHUB + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + RUSHROUD + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + DTINLET + { + type ggi; + patchType ggi; + value uniform 14.855; + } + DTOUTLET + { + type zeroGradient; + } + DTCYCLIC1 + { + type cyclicGgi; + value uniform 14.855; + } + DTCYCLIC2 + { + type cyclicGgi; + value uniform 14.855; + } + DTHUB + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + DTSHROUD + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/i b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/i new file mode 100644 index 000000000..88cf1b25f --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/i @@ -0,0 +1,138 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "20"; + object i; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 307494; + +boundaryField +{ + GVINLET + { + type fixedEnthalpy; + value uniform 307494; + } + GVOUTLET + { + type ggiEnthalpyJump; + patchType ggi; + rotating false; + value uniform 307494; + } + GVCYCLIC + { + type cyclic; + value uniform 307494; + } + GVBLADE + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307000; + } + GVHUB + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307494; + } + GVSHROUD + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307494; + } + RUINLET + { + type ggiEnthalpyJump; + patchType ggi; + rotating true; + value uniform 307494; + } + RUOUTLET + { + type ggiEnthalpyJump; + patchType ggi; + rotating true; + value uniform 307494; + } + RUCYCLIC1 + { + type cyclicGgi; + value uniform 307494; + } + RUCYCLIC2 + { + type cyclicGgi; + value uniform 307494; + } + RUBLADE + { + type gradientEnthalpy; + gradient uniform 307494; + } + RUHUB + { + type gradientEnthalpy; + gradient uniform 307494; + } + RUSHROUD + { + type gradientEnthalpy; + gradient uniform 307494; + + } + DTINLET + { + type ggiEnthalpyJump; + patchType ggi; + rotating false; + value uniform 305.66; + } + DTOUTLET + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307494; + } + DTCYCLIC1 + { + type cyclicGgi; + value uniform 307494; + } + DTCYCLIC2 + { + type cyclicGgi; + value uniform 307494; + } + DTHUB + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307494; + + } + DTSHROUD + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307494; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/k b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/k new file mode 100644 index 000000000..889b50142 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/k @@ -0,0 +1,121 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0.375; + +boundaryField +{ + GVINLET + { + type fixedValue; + value uniform 0.375; + } + GVOUTLET + { + type ggi; + value uniform 0.375; + } + GVCYCLIC + { + type cyclic; + value uniform 0.375; + } + GVBLADE + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + GVHUB + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + GVSHROUD + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + RUINLET + { + type ggi; + value uniform 0.375; + } + RUOUTLET + { + type ggi; + value uniform 0.375; + } + RUCYCLIC1 + { + type cyclicGgi; + value uniform 0.375; + } + RUCYCLIC2 + { + type cyclicGgi; + value uniform 0.375; + } + RUBLADE + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + RUHUB + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + RUSHROUD + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + DTINLET + { + type ggi; + value uniform 0.375; + } + DTOUTLET + { + type zeroGradient; + } + DTCYCLIC1 + { + type cyclicGgi; + value uniform 0.375; + } + DTCYCLIC2 + { + type cyclicGgi; + value uniform 0.375; + } + DTHUB + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + DTSHROUD + { + type compressible::kqRWallFunction; + value uniform 0.375; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/mut b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/mut new file mode 100644 index 000000000..884ad8de9 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/mut @@ -0,0 +1,146 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object mut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + GVINLET + { + type calculated; + value uniform 0; + } + GVOUTLET + { + type ggi; + value uniform 0; + } + GVCYCLIC + { + type cyclic; + value uniform 0; + } + GVBLADE + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + GVHUB + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + GVSHROUD + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + RUINLET + { + type ggi; + value uniform 0; + } + RUOUTLET + { + type ggi; + value uniform 0; + } + RUCYCLIC1 + { + type cyclicGgi; + value uniform 0; + } + RUCYCLIC2 + { + type cyclicGgi; + value uniform 0; + } + RUBLADE + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + RUHUB + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + RUSHROUD + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + DTINLET + { + type ggi; + value uniform 0; + } + DTOUTLET + { + type calculated; + value uniform 0; + } + DTCYCLIC1 + { + type cyclicGgi; + value uniform 0; + } + DTCYCLIC2 + { + type cyclicGgi; + value uniform 0; + } + DTHUB + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + DTSHROUD + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/p b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/p new file mode 100644 index 000000000..3a357c73e --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/0/p @@ -0,0 +1,110 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 100000; + +boundaryField +{ + GVINLET + { + type zeroGradient; + } + GVOUTLET + { + type ggi; + patchType ggi; + value uniform 100000; + } + GVCYCLIC + { + type cyclic; + } + GVBLADE + { + type zeroGradient; + } + GVHUB + { + type zeroGradient; + } + GVSHROUD + { + type zeroGradient; + } + RUINLET + { + type ggi; + patchType ggi; + value uniform 100000; + } + RUOUTLET + { + type ggi; + patchType ggi; + value uniform 100000; + } + RUCYCLIC1 + { + type cyclicGgi; + } + RUCYCLIC2 + { + type cyclicGgi; + } + RUBLADE + { + type zeroGradient; + } + RUHUB + { + type zeroGradient; + } + RUSHROUD + { + type zeroGradient; + } + DTINLET + { + type ggi; + patchType ggi; + value uniform 100000; + } + DTOUTLET + { + type fixedValue; + value uniform 100000; + } + DTCYCLIC1 + { + type cyclicGgi; + } + DTCYCLIC2 + { + type cyclicGgi; + } + DTHUB + { + type zeroGradient; + } + DTSHROUD + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/Allclean b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/Allclean new file mode 100755 index 000000000..b9a46198e --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/Allclean @@ -0,0 +1,8 @@ +#!/bin/sh + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase +\rm -rf 0 +\cp -r save 0 diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/Allrun b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/Allrun new file mode 100755 index 000000000..3a8627259 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/Allrun @@ -0,0 +1,20 @@ +#!/bin/sh + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +application=steadyUniversalMRFFoam + +#Create the mesh: +m4 < constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict +runApplication blockMesh +transformPoints -scale "(1 20 1)" +transformPoints -cylToCart "((0 0 0) (0 0 1) (1 0 0))" + +# Set 0-directory and create GGI set: +\rm -rf 0 +\cp -r save 0 +runApplication setSet -batch setBatchGgi +runApplication setsToZones -noFlipMap + +runApplication $application diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/MRFZones b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/MRFZones new file mode 100755 index 000000000..5820df5f4 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/MRFZones @@ -0,0 +1,31 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object MRFZones; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +1 +( + rotor + { + //patches (rotor); + // Fixed patches (by default they 'move' with the MRF zone) + nonRotatingPatches ( RUSHROUD ); + + origin origin [0 1 0 0 0 0 0] (0 0 0); + axis axis [0 0 0 0 0 0 0] (0 0 1); + omega omega [0 0 -1 0 0 0 0] -366; + } +) + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/RASProperties b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/RASProperties new file mode 100755 index 000000000..12405fc31 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/RASProperties @@ -0,0 +1,191 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object RASProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RASModel kEpsilon; + +turbulence on; + +printCoeffs on; + +laminarCoeffs +{ +} + +kEpsilonCoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; +} + +RNGkEpsilonCoeffs +{ + Cmu 0.0845; + C1 1.42; + C2 1.68; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; +} + +kOmegaSSTCoeffs +{ + alphaK1 0.85034; + alphaK2 1.0; + alphaOmega1 0.5; + alphaOmega2 0.85616; + gamma1 0.5532; + gamma2 0.4403; + beta1 0.0750; + beta2 0.0828; + betaStar 0.09; + a1 0.31; + c1 10; + + Cmu 0.09; +} + +NonlinearKEShihCoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76932; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; +} + +LienCubicKECoeffs +{ + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; +} + +QZetaCoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaZeta 0.76923; + anisotropic no; +} + +LaunderSharmaKECoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; +} + +LamBremhorstKECoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; +} + +LienCubicKELowReCoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; +} + +LienLeschzinerLowReCoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; +} + +LRRCoeffs +{ + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; +} + +LaunderGibsonRSTMCoeffs +{ + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; + alphaR 1.22; +} + +SpalartAllmarasCoeffs +{ + alphaNut 1.5; + Cb1 0.1355; + Cb2 0.622; + Cw2 0.3; + Cw3 2; + Cv1 7.1; + Cv2 5.0; +} + +wallFunctionCoeffs +{ + kappa 0.4187; + E 9; +} + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/polyMesh/blockMeshDict b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/polyMesh/blockMeshDict new file mode 100644 index 000000000..f91ab2f8b --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/polyMesh/blockMeshDict @@ -0,0 +1,508 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// General macros to create 2D/extruded-2D meshes + + + +//define(calc, [esyscmd(echo $1 | bc | tr -d \\n)]) + + + + + + + + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +// HUB AND SHROUD RADIUS +// Hub radius (m) + +// Shroud radius (m) + + +// GUIDE VANE REGION GEOMETRY AND MESH PROPERTIES +// Guide vane inlet axial length (m) + +// Guide vane axial length (m) + +// Guide vane outlet axial length (m) + +// Number of guide vanes per 360 degrees (integer!) + +// Number of cells in radial direction at guide vane + +// Number of cells in tangential direction between guide vanes + +// Number of cells in axial direction at guide vane inlet + +// Number of cells in axial direction between guide vanes + +// Number of cells in axial direction at guide vane outlet + + +// RUNNER REGION GEOMETRY AND MESH PROPERTIES +// Runner inlet axial length (m) + +// Runner axial length (m) + +// Runner outlet axial length (m) + +// Number of runner blades per 360 degrees (integer!) + +// Number of cells in radial direction in runner + +// Number of cells in tangential direction between runner blades + +// Number of cells in axial direction at runner inlet + +// Number of cells in axial direction between runner blades + +// Number of cells in axial direction at runner outlet + + +// DRAFT TUBE REGION GEOMETRY AND MESH PROPERTIES +// "Draft tube" axial length (m) + +// Number of sections per 360 degrees (integer!) + +// Number of cells in radial direction in "draft tube" + +// Number of cells in tangential direction in "draft tube" + +// Number of cells in axial direction in "draft tube" + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// TANGENTIAL PITCHES (RADIANS) +// Guide vane region + +// Runner region + +// Draft tube region + + +// TANGENTIAL SHIFTS BETWEEN AXIAL LEVELS (BOTTOM-UP) +// Tangential shift from level DT0 to DT1 + +// Runner region +// Tangential shift from level RU0 to RU1 + +// Tangential shift from level RU1 to RU2 + +// Tangential shift from level RU2 to RU3 + +// Guide vane region +// Tangential shift from level GV0 to GV1 + +// Tangential shift from level GV1 to GV2 + +// Tangential shift from level GV2 to GV3 + + +// AXIAL/TANGENTIAL BASE POINTS FOR EACH LEVEL (BOTTOM-UP): +// (CENTER OF RUNNER SET TO THETA=0, Z=0) +// Draft tube: + //Center runner + // Straight draft tube! + //Center runner +// Runner: + //Center runner + //Center runner + + + +// Guide vane: + //Center runner + //Center runner + + + + +vertices //(radial [m], tangential [radians], axial [m]) +( +//Guide vane hub: + (0.05 -0.0691150383 0.07) // Vertex GV0lb = 0 + (0.05 -0.00628318530000001 0.07) // Vertex GV0rb = 1 + (0.05 -0.062831853 0.09) // Vertex GV1lb = 2 + (0.05 0 0.09) // Vertex GV1rb = 3 + (0.05 -0.0314159265 0.19) // Vertex GV2lb = 4 + (0.05 0.0314159265 0.19) // Vertex GV2rb = 5 + (0.05 -0.0314159265 0.29) // Vertex GV3lb = 6 + (0.05 0.0314159265 0.29) // Vertex GV3rb = 7 + +//Guide vane shroud: + (0.1 -0.0691150383 0.07) // Vertex GV0lt = 8 + (0.1 -0.00628318530000001 0.07) // Vertex GV0rt = 9 + (0.1 -0.062831853 0.09) // Vertex GV1lt = 10 + (0.1 0 0.09) // Vertex GV1rt = 11 + (0.1 -0.0314159265 0.19) // Vertex GV2lt = 12 + (0.1 0.0314159265 0.19) // Vertex GV2rt = 13 + (0.1 -0.0314159265 0.29) // Vertex GV3lt = 14 + (0.1 0.0314159265 0.29) // Vertex GV3rt = 15 + +//Runner hub: + (0.05 -0.0062831853 -0.07) // Vertex RU0lb = 16 + (0.05 0.0565486677 -0.07) // Vertex RU0rb = 17 + (0.05 -0.0125663706 -0.05) // Vertex RU1lb = 18 + (0.05 0.0502654824 -0.05) // Vertex RU1rb = 19 + (0.05 -0.062831853 0.05) // Vertex RU2lb = 20 + (0.05 0 0.05) // Vertex RU2rb = 21 + (0.05 -0.0691150383 0.07) // Vertex RU3lb = 22 + (0.05 -0.00628318530000001 0.07) // Vertex RU3rb = 23 + +//Runner shroud: + (0.1 -0.0062831853 -0.07) // Vertex RU0lt = 24 + (0.1 0.0565486677 -0.07) // Vertex RU0rt = 25 + (0.1 -0.0125663706 -0.05) // Vertex RU1lt = 26 + (0.1 0.0502654824 -0.05) // Vertex RU1rt = 27 + (0.1 -0.062831853 0.05) // Vertex RU2lt = 28 + (0.1 0 0.05) // Vertex RU2rt = 29 + (0.1 -0.0691150383 0.07) // Vertex RU3lt = 30 + (0.1 -0.00628318530000001 0.07) // Vertex RU3rt = 31 + +//Draft tube hub: + (0.05 -0.0062831853 -0.14) // Vertex DT0lb = 32 + (0.05 0.0565486677 -0.14) // Vertex DT0rb = 33 + (0.05 -0.0062831853 -0.07) // Vertex DT1lb = 34 + (0.05 0.0565486677 -0.07) // Vertex DT1rb = 35 + +//Draft tube shroud: + (0.1 -0.0062831853 -0.14) // Vertex DT0lt = 36 + (0.1 0.0565486677 -0.14) // Vertex DT0rt = 37 + (0.1 -0.0062831853 -0.07) // Vertex DT1lt = 38 + (0.1 0.0565486677 -0.07) // Vertex DT1rt = 39 +); + +blocks +( +//Guide vane: + hex (0 1 3 2 8 9 11 10) + (10 2 10) + simpleGrading (1 1 1) + + hex (2 3 5 4 10 11 13 12) + (10 10 10) + simpleGrading (1 1 1) + + hex (4 5 7 6 12 13 15 14) + (10 10 10) + simpleGrading (1 1 1) + +//Runner: + hex (16 17 19 18 24 25 27 26) + rotor + (10 2 10) + simpleGrading (1 1 1) + + hex (18 19 21 20 26 27 29 28) + rotor + (10 10 10) + simpleGrading (1 1 1) + + hex (20 21 23 22 28 29 31 30) + rotor + (10 2 10) + simpleGrading (1 1 1) + +//Draft tube: + hex (32 33 35 34 36 37 39 38) + (10 7 10) + simpleGrading (1 1 1) + +); + +edges // Inappropriate with arc due to coordinate conversion +( +//Runner + spline 26 28 + ( + (0.1 -0.04523893416 0) + ) + spline 18 20 + ( + (0.05 -0.04523893416 0) + ) + spline 27 29 + ( + (0.1 0.0125663706 0) + ) + spline 19 21 + ( + (0.05 0.0125663706 0) + ) +//Guide vane + spline 10 12 + ( + (0.1 -0.039269908125 0.14) + ) + spline 2 4 + ( + (0.05 -0.039269908125 0.14) + ) + spline 11 13 + ( + (0.1 0.020420352225 0.14) + ) + spline 3 5 + ( + (0.05 0.020420352225 0.14) + ) +); + +boundary +( + GVINLET + { + type patch; + faces + ( + (7 6 14 15) + ); + } + + GVOUTLET + { + type ggi; + shadowPatch RUINLET; + zone GVOUTLETZone; + bridgeOverlap false; + faces + ( + (0 1 9 8) + ); + } + + GVCYCLIC + { + type cyclic; + featureCos 0.9; + //MUST specify transformation since cyclic is not flat. + //Set global debugSwitch cyclic to 1 to check that it is correct! + transform rotational; + rotationAxis (0 0 1); + rotationCentre (0 0 0); + rotationAngle -72; //Degrees from second half to first half + //Face numbering must be same on both halfs/sides. The numbering + //is determined by the block definition, not by the faces list + //below. Just make sure that each face definition is according + //to the rule "clockwise when looking from inside the block". + faces + ( + //First half, left side: + (2 0 8 10) + (6 4 12 14) + //Second half, right side: + (1 3 11 9) + (5 7 15 13) + ); + } + + GVBLADE + { + type wall; + faces + ( + (4 2 10 12) + (3 5 13 11) + ); + } + + GVHUB + { + type wall; + faces + ( + (0 2 3 1) + (2 4 5 3) + (4 6 7 5) + ); + } + + GVSHROUD + { + type wall; + faces + ( + (8 9 11 10) + (10 11 13 12) + (12 13 15 14) + ); + } + + RUINLET + { + type ggi; + shadowPatch GVOUTLET; + zone RUINLETZone; + bridgeOverlap false; + faces + ( + (23 22 30 31) + ); + } + + RUOUTLET + { + type ggi; + shadowPatch DTINLET; + zone RUOUTLETZone; + bridgeOverlap false; + faces + ( + (16 17 25 24) + ); + } + + RUCYCLIC1 + { + type cyclicGgi; + shadowPatch RUCYCLIC2; + zone RUCYCLIC1Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle 72; + separationOffset (0 0 0); + faces + ( + (18 16 24 26) + (22 20 28 30) + ); + } + + RUCYCLIC2 + { + type cyclicGgi; + shadowPatch RUCYCLIC1; + zone RUCYCLIC2Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle -72; + separationOffset (0 0 0); + faces + ( + (17 19 27 25) + (21 23 31 29) + ); + } + + RUBLADE + { + type wall; + faces + ( + (20 18 26 28) + (19 21 29 27) + ); + } + + RUHUB + { + type wall; + faces + ( + (16 18 19 17) + (18 20 21 19) + (20 22 23 21) + ); + } + + RUSHROUD + { + type wall; + faces + ( + (24 25 27 26) + (26 27 29 28) + (28 29 31 30) + ); + } + + DTINLET + { + type ggi; + shadowPatch RUOUTLET; + zone DTINLETZone; + bridgeOverlap false; + faces + ( + (35 34 38 39) + ); + } + + DTOUTLET + { + type patch; + faces + ( + (32 33 37 36) + ); + } + + DTCYCLIC1 + { + type cyclicGgi; + shadowPatch DTCYCLIC2; + zone DTCYCLIC1Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle 72; + separationOffset (0 0 0); + faces + ( + (34 32 36 38) + ); + } + + DTCYCLIC2 + { + type cyclicGgi; + shadowPatch DTCYCLIC1; + zone DTCYCLIC2Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle -72; + separationOffset (0 0 0); + faces + ( + (33 35 39 37) + ); + } + + DTHUB + { + type wall; + faces + ( + (32 34 35 33) + ); + } + + DTSHROUD + { + type wall; + faces + ( + (36 37 39 38) + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/polyMesh/blockMeshDict.m4 b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/polyMesh/blockMeshDict.m4 new file mode 100755 index 000000000..c191a1fc6 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/polyMesh/blockMeshDict.m4 @@ -0,0 +1,508 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// General macros to create 2D/extruded-2D meshes + +changecom(//)changequote([,]) +define(calc, [esyscmd(perl -e 'printf ($1)')]) +//define(calc, [esyscmd(echo $1 | bc | tr -d \\n)]) +define(VCOUNT, 0) +define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) +define(pi, calc(3.14159265/20)) + +define(hex2D, hex ($1b $2b $3b $4b $1t $2t $3t $4t)) +define(quad2D, ($1b $2b $2t $1t)) +define(frontQuad, ($1t $2t $3t $4t)) +define(backQuad, ($1b $4b $3b $2b)) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +// HUB AND SHROUD RADIUS +// Hub radius (m) +define(hr, 0.05) +// Shroud radius (m) +define(sr, 0.1) + +// GUIDE VANE REGION GEOMETRY AND MESH PROPERTIES +// Guide vane inlet axial length (m) +define(GVial, 0.1) +// Guide vane axial length (m) +define(GVbal, 0.1) +// Guide vane outlet axial length (m) +define(GVoal, 0.02) +// Number of guide vanes per 360 degrees (integer!) +define(GVnb, 5) +// Number of cells in radial direction at guide vane +define(GVrc, 10) +// Number of cells in tangential direction between guide vanes +define(GVtc, 10) +// Number of cells in axial direction at guide vane inlet +define(GViac, 10) +// Number of cells in axial direction between guide vanes +define(GVbac, 10) +// Number of cells in axial direction at guide vane outlet +define(GVoac, 2) + +// RUNNER REGION GEOMETRY AND MESH PROPERTIES +// Runner inlet axial length (m) +define(RUial, 0.02) +// Runner axial length (m) +define(RUal, 0.1) +// Runner outlet axial length (m) +define(RUoal, 0.02) +// Number of runner blades per 360 degrees (integer!) +define(RUnb, 5) +// Number of cells in radial direction in runner +define(RUrc, 10) +// Number of cells in tangential direction between runner blades +define(RUtc, 10) +// Number of cells in axial direction at runner inlet +define(RUiac, 2) +// Number of cells in axial direction between runner blades +define(RUbac, 10) +// Number of cells in axial direction at runner outlet +define(RUoac, 2) + +// DRAFT TUBE REGION GEOMETRY AND MESH PROPERTIES +// "Draft tube" axial length (m) +define(DTal, 0.07) +// Number of sections per 360 degrees (integer!) +define(DTns, 5) +// Number of cells in radial direction in "draft tube" +define(DTrc, 10) +// Number of cells in tangential direction in "draft tube" +define(DTtc, 10) +// Number of cells in axial direction in "draft tube" +define(DTac, 7) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// TANGENTIAL PITCHES (RADIANS) +// Guide vane region +define(GVp, calc(2*pi/GVnb)) +// Runner region +define(RUp, calc(2*pi/RUnb)) +// Draft tube region +define(DTp, calc(2*pi/DTns)) + +// TANGENTIAL SHIFTS BETWEEN AXIAL LEVELS (BOTTOM-UP) +// Tangential shift from level DT0 to DT1 +define(DTts01, calc(5*DTp)) +// Runner region +// Tangential shift from level RU0 to RU1 +define(RUts01, calc(-1/10*RUp)) +// Tangential shift from level RU1 to RU2 +define(RUts12, calc(-4/5*RUp)) +// Tangential shift from level RU2 to RU3 +define(RUts23, calc(-1/10*RUp)) +// Guide vane region +// Tangential shift from level GV0 to GV1 +define(GVts01, calc(1/10*GVp)) +// Tangential shift from level GV1 to GV2 +define(GVts12, calc(1/2*GVp)) +// Tangential shift from level GV2 to GV3 +define(GVts23, calc(0*GVp)) + +// AXIAL/TANGENTIAL BASE POINTS FOR EACH LEVEL (BOTTOM-UP): +// (CENTER OF RUNNER SET TO THETA=0, Z=0) +// Draft tube: +define(DTa0, calc(-RUoal-0.5*RUal-DTal)) //Center runner +define(DTt0, calc(-0.5*RUp-(0.5*RUts12)-(0*DTts01))) // Straight draft tube! +define(DTt1, calc(-0.5*RUp-(0.5*RUts12))) //Center runner +// Runner: +define(RUa0, calc(-RUoal-0.5*RUal)) //Center runner +define(RUt0, calc(-0.5*RUp-(0.5*RUts12))) //Center runner +define(RUt1, calc(RUt0+RUts01)) +define(RUt2, calc(RUt1+RUts12)) +define(RUt3, calc(RUt2+RUts23)) +// Guide vane: +define(GVa0, calc(0.5*RUal+RUial)) //Center runner +define(GVt0, calc(-0.5*RUp-(0.5*RUts12)+RUts01+RUts12+RUts23)) //Center runner +define(GVt1, calc(GVt0+GVts01)) +define(GVt2, calc(GVt1+GVts12)) +define(GVt3, calc(GVt2+GVts23)) + +vertices //(radial [m], tangential [radians], axial [m]) +( +//Guide vane hub: + (hr GVt0 GVa0) vlabel(GV0lb) + (hr calc(GVt0+GVp) GVa0) vlabel(GV0rb) + (hr GVt1 calc(GVa0+GVoal)) vlabel(GV1lb) + (hr calc(GVt1+GVp) calc(GVa0+GVoal)) vlabel(GV1rb) + (hr GVt2 calc(GVa0+GVoal+GVbal)) vlabel(GV2lb) + (hr calc(GVt2+GVp) calc(GVa0+GVoal+GVbal)) vlabel(GV2rb) + (hr GVt3 calc(GVa0+GVoal+GVbal+GVial)) vlabel(GV3lb) + (hr calc(GVt3+GVp) calc(GVa0+GVoal+GVbal+GVial)) vlabel(GV3rb) + +//Guide vane shroud: + (sr GVt0 GVa0) vlabel(GV0lt) + (sr calc(GVt0+GVp) GVa0) vlabel(GV0rt) + (sr GVt1 calc(GVa0+GVoal)) vlabel(GV1lt) + (sr calc(GVt1+GVp) calc(GVa0+GVoal)) vlabel(GV1rt) + (sr GVt2 calc(GVa0+GVoal+GVbal)) vlabel(GV2lt) + (sr calc(GVt2+GVp) calc(GVa0+GVoal+GVbal)) vlabel(GV2rt) + (sr GVt3 calc(GVa0+GVoal+GVbal+GVial)) vlabel(GV3lt) + (sr calc(GVt3+GVp) calc(GVa0+GVoal+GVbal+GVial)) vlabel(GV3rt) + +//Runner hub: + (hr RUt0 RUa0) vlabel(RU0lb) + (hr calc(RUt0+RUp) RUa0) vlabel(RU0rb) + (hr RUt1 calc(RUa0+RUoal)) vlabel(RU1lb) + (hr calc(RUt1+RUp) calc(RUa0+RUoal)) vlabel(RU1rb) + (hr RUt2 calc(RUa0+RUoal+RUal)) vlabel(RU2lb) + (hr calc(RUt2+RUp) calc(RUa0+RUoal+RUal)) vlabel(RU2rb) + (hr RUt3 calc(RUa0+RUoal+RUal+RUial)) vlabel(RU3lb) + (hr calc(RUt3+RUp) calc(RUa0+RUoal+RUal+RUial)) vlabel(RU3rb) + +//Runner shroud: + (sr RUt0 RUa0) vlabel(RU0lt) + (sr calc(RUt0+RUp) RUa0) vlabel(RU0rt) + (sr RUt1 calc(RUa0+RUoal)) vlabel(RU1lt) + (sr calc(RUt1+RUp) calc(RUa0+RUoal)) vlabel(RU1rt) + (sr RUt2 calc(RUa0+RUoal+RUal)) vlabel(RU2lt) + (sr calc(RUt2+RUp) calc(RUa0+RUoal+RUal)) vlabel(RU2rt) + (sr RUt3 calc(RUa0+RUoal+RUal+RUial)) vlabel(RU3lt) + (sr calc(RUt3+RUp) calc(RUa0+RUoal+RUal+RUial)) vlabel(RU3rt) + +//Draft tube hub: + (hr DTt0 DTa0) vlabel(DT0lb) + (hr calc(DTt0+DTp) DTa0) vlabel(DT0rb) + (hr DTt1 calc(DTa0+DTal)) vlabel(DT1lb) + (hr calc(DTt1+DTp) calc(DTa0+DTal)) vlabel(DT1rb) + +//Draft tube shroud: + (sr DTt0 DTa0) vlabel(DT0lt) + (sr calc(DTt0+DTp) DTa0) vlabel(DT0rt) + (sr DTt1 calc(DTa0+DTal)) vlabel(DT1lt) + (sr calc(DTt1+DTp) calc(DTa0+DTal)) vlabel(DT1rt) +); + +blocks +( +//Guide vane: + hex2D(GV0l, GV0r, GV1r, GV1l) + (GVtc GVoac GVrc) + simpleGrading (1 1 1) + + hex2D(GV1l, GV1r, GV2r, GV2l) + (GVtc GVbac GVrc) + simpleGrading (1 1 1) + + hex2D(GV2l, GV2r, GV3r, GV3l) + (GVtc GViac GVrc) + simpleGrading (1 1 1) + +//Runner: + hex2D(RU0l, RU0r, RU1r, RU1l) + rotor + (RUtc RUoac RUrc) + simpleGrading (1 1 1) + + hex2D(RU1l, RU1r, RU2r, RU2l) + rotor + (RUtc RUbac RUrc) + simpleGrading (1 1 1) + + hex2D(RU2l, RU2r, RU3r, RU3l) + rotor + (RUtc RUiac RUrc) + simpleGrading (1 1 1) + +//Draft tube: + hex2D(DT0l, DT0r, DT1r, DT1l) + (DTtc DTac DTrc) + simpleGrading (1 1 1) + +); + +edges // Inappropriate with arc due to coordinate conversion +( +//Runner + spline RU1lt RU2lt + ( + (sr calc(RUt1+0.65*(RUt2-(RUt1))) calc(RUa0+RUoal+0.5*RUal)) + ) + spline RU1lb RU2lb + ( + (hr calc(RUt1+0.65*(RUt2-(RUt1))) calc(RUa0+RUoal+0.5*RUal)) + ) + spline RU1rt RU2rt + ( + (sr calc(RUt1+RUp+0.75*(RUt2-(RUt1))) calc(RUa0+RUoal+0.5*RUal)) + ) + spline RU1rb RU2rb + ( + (hr calc(RUt1+RUp+0.75*(RUt2-(RUt1))) calc(RUa0+RUoal+0.5*RUal)) + ) +//Guide vane + spline GV1lt GV2lt + ( + (sr calc(GVt1+0.75*(GVt2-(GVt1))) calc(GVa0+GVoal+0.5*GVbal)) + ) + spline GV1lb GV2lb + ( + (hr calc(GVt1+0.75*(GVt2-(GVt1))) calc(GVa0+GVoal+0.5*GVbal)) + ) + spline GV1rt GV2rt + ( + (sr calc(GVt1+GVp+0.65*(GVt2-(GVt1))) calc(GVa0+GVoal+0.5*GVbal)) + ) + spline GV1rb GV2rb + ( + (hr calc(GVt1+GVp+0.65*(GVt2-(GVt1))) calc(GVa0+GVoal+0.5*GVbal)) + ) +); + +boundary +( + GVINLET + { + type patch; + faces + ( + quad2D(GV3r, GV3l) + ); + } + + GVOUTLET + { + type ggi; + shadowPatch RUINLET; + zone GVOUTLETZone; + bridgeOverlap false; + faces + ( + quad2D(GV0l, GV0r) + ); + } + + GVCYCLIC + { + type cyclic; + featureCos 0.9; + //MUST specify transformation since cyclic is not flat. + //Set global debugSwitch cyclic to 1 to check that it is correct! + transform rotational; + rotationAxis (0 0 1); + rotationCentre (0 0 0); + rotationAngle -72; //Degrees from second half to first half + //Face numbering must be same on both halfs/sides. The numbering + //is determined by the block definition, not by the faces list + //below. Just make sure that each face definition is according + //to the rule "clockwise when looking from inside the block". + faces + ( + //First half, left side: + quad2D(GV1l, GV0l) + quad2D(GV3l, GV2l) + //Second half, right side: + quad2D(GV0r, GV1r) + quad2D(GV2r, GV3r) + ); + } + + GVBLADE + { + type wall; + faces + ( + quad2D(GV2l, GV1l) + quad2D(GV1r, GV2r) + ); + } + + GVHUB + { + type wall; + faces + ( + backQuad(GV0l, GV0r, GV1r, GV1l) + backQuad(GV1l, GV1r, GV2r, GV2l) + backQuad(GV2l, GV2r, GV3r, GV3l) + ); + } + + GVSHROUD + { + type wall; + faces + ( + frontQuad(GV0l, GV0r, GV1r, GV1l) + frontQuad(GV1l, GV1r, GV2r, GV2l) + frontQuad(GV2l, GV2r, GV3r, GV3l) + ); + } + + RUINLET + { + type ggi; + shadowPatch GVOUTLET; + zone RUINLETZone; + bridgeOverlap false; + faces + ( + quad2D(RU3r, RU3l) + ); + } + + RUOUTLET + { + type ggi; + shadowPatch DTINLET; + zone RUOUTLETZone; + bridgeOverlap false; + faces + ( + quad2D(RU0l, RU0r) + ); + } + + RUCYCLIC1 + { + type cyclicGgi; + shadowPatch RUCYCLIC2; + zone RUCYCLIC1Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle 72; + separationOffset (0 0 0); + faces + ( + quad2D(RU1l, RU0l) + quad2D(RU3l, RU2l) + ); + } + + RUCYCLIC2 + { + type cyclicGgi; + shadowPatch RUCYCLIC1; + zone RUCYCLIC2Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle -72; + separationOffset (0 0 0); + faces + ( + quad2D(RU0r, RU1r) + quad2D(RU2r, RU3r) + ); + } + + RUBLADE + { + type wall; + faces + ( + quad2D(RU2l, RU1l) + quad2D(RU1r, RU2r) + ); + } + + RUHUB + { + type wall; + faces + ( + backQuad(RU0l, RU0r, RU1r, RU1l) + backQuad(RU1l, RU1r, RU2r, RU2l) + backQuad(RU2l, RU2r, RU3r, RU3l) + ); + } + + RUSHROUD + { + type wall; + faces + ( + frontQuad(RU0l, RU0r, RU1r, RU1l) + frontQuad(RU1l, RU1r, RU2r, RU2l) + frontQuad(RU2l, RU2r, RU3r, RU3l) + ); + } + + DTINLET + { + type ggi; + shadowPatch RUOUTLET; + zone DTINLETZone; + bridgeOverlap false; + faces + ( + quad2D(DT1r, DT1l) + ); + } + + DTOUTLET + { + type patch; + faces + ( + quad2D(DT0l, DT0r) + ); + } + + DTCYCLIC1 + { + type cyclicGgi; + shadowPatch DTCYCLIC2; + zone DTCYCLIC1Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle 72; + separationOffset (0 0 0); + faces + ( + quad2D(DT1l, DT0l) + ); + } + + DTCYCLIC2 + { + type cyclicGgi; + shadowPatch DTCYCLIC1; + zone DTCYCLIC2Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle -72; + separationOffset (0 0 0); + faces + ( + quad2D(DT0r, DT1r) + ); + } + + DTHUB + { + type wall; + faces + ( + backQuad(DT0l, DT0r, DT1r, DT1l) + ); + } + + DTSHROUD + { + type wall; + faces + ( + frontQuad(DT0l, DT0r, DT1r, DT1l) + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/polyMesh/boundary b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/polyMesh/boundary new file mode 100644 index 000000000..2fc847beb --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/polyMesh/boundary @@ -0,0 +1,177 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +19 +( + GVINLET + { + type patch; + nFaces 100; + startFace 11740; + } + GVOUTLET + { + type ggi; + nFaces 100; + startFace 11840; + shadowPatch RUINLET; + zone GVOUTLETZone; + bridgeOverlap false; + } + GVCYCLIC + { + type cyclic; + nFaces 240; + startFace 11940; + featureCos 0.9; + transform rotational; + rotationAxis (0 0 1); + rotationCentre (0 0 0); + rotationAngle -72; + } + GVBLADE + { + type wall; + nFaces 200; + startFace 12180; + } + GVHUB + { + type wall; + nFaces 220; + startFace 12380; + } + GVSHROUD + { + type wall; + nFaces 220; + startFace 12600; + } + RUINLET + { + type ggi; + nFaces 100; + startFace 12820; + shadowPatch GVOUTLET; + zone RUINLETZone; + bridgeOverlap false; + } + RUOUTLET + { + type ggi; + nFaces 100; + startFace 12920; + shadowPatch DTINLET; + zone RUOUTLETZone; + bridgeOverlap false; + } + RUCYCLIC1 + { + type cyclicGgi; + nFaces 40; + startFace 13020; + shadowPatch RUCYCLIC2; + zone RUCYCLIC1Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle 72; + separationOffset (0 0 0); + } + RUCYCLIC2 + { + type cyclicGgi; + nFaces 40; + startFace 13060; + shadowPatch RUCYCLIC1; + zone RUCYCLIC2Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle -72; + separationOffset (0 0 0); + } + RUBLADE + { + type wall; + nFaces 200; + startFace 13100; + } + RUHUB + { + type wall; + nFaces 140; + startFace 13300; + } + RUSHROUD + { + type wall; + nFaces 140; + startFace 13440; + } + DTINLET + { + type ggi; + nFaces 100; + startFace 13580; + shadowPatch RUOUTLET; + zone DTINLETZone; + bridgeOverlap false; + } + DTOUTLET + { + type patch; + nFaces 100; + startFace 13680; + } + DTCYCLIC1 + { + type cyclicGgi; + nFaces 70; + startFace 13780; + shadowPatch DTCYCLIC2; + zone DTCYCLIC1Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle 72; + separationOffset (0 0 0); + } + DTCYCLIC2 + { + type cyclicGgi; + nFaces 70; + startFace 13850; + shadowPatch DTCYCLIC1; + zone DTCYCLIC2Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle -72; + separationOffset (0 0 0); + } + DTHUB + { + type wall; + nFaces 70; + startFace 13920; + } + DTSHROUD + { + type wall; + nFaces 70; + startFace 13990; + } +) + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/thermophysicalProperties b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/thermophysicalProperties new file mode 100755 index 000000000..9296d0e9d --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/thermophysicalProperties @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType hPsiThermo>>>>; + +mixture air 1 28.966 1006 0 1.8e-05 0.7; + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/transportProperties b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/transportProperties new file mode 100755 index 000000000..f815668fc --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/constant/transportProperties @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +transportModel Newtonian; + +nu nu [0 2 -1 0 0 0 0] 1e-05; + +CrossPowerLawCoeffs +{ + nu0 nu0 [0 2 -1 0 0 0 0] 1e-06; + nuInf nuInf [0 2 -1 0 0 0 0] 1e-06; + m m [0 0 1 0 0 0 0] 1; + n n [0 0 0 0 0 0 0] 1; +} + +BirdCarreauCoeffs +{ + nu0 nu0 [0 2 -1 0 0 0 0] 1e-06; + nuInf nuInf [0 2 -1 0 0 0 0] 1e-06; + k k [0 0 1 0 0 0 0] 0; + n n [0 0 0 0 0 0 0] 1; +} + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/T b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/T new file mode 100644 index 000000000..cb72a9700 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/T @@ -0,0 +1,116 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 305.66; + +boundaryField +{ + GVINLET + { + type fixedValue; + value uniform 305.66; + } + GVOUTLET + { + type ggiEnthalpyJump; + patchType ggi; + rotating false; + value uniform 305.66; + } + GVCYCLIC + { + type cyclic; + } + GVBLADE + { + type zeroGradient; + } + GVHUB + { + type zeroGradient; + } + GVSHROUD + { + type zeroGradient; + } + RUINLET + { + type ggiEnthalpyJump; + patchType ggi; + rotating true; + value uniform 305.66; + } + RUOUTLET + { + type ggiEnthalpyJump; + patchType ggi; + rotating true; + value uniform 305.66; + } + RUCYCLIC1 + { + type cyclicGgi; + } + RUCYCLIC2 + { + type cyclicGgi; + } + RUBLADE + { + type zeroGradient; + } + RUHUB + { + type zeroGradient; + } + RUSHROUD + { + type zeroGradient; + } + DTINLET + { + type ggiEnthalpyJump; + patchType ggi; +rotating false; + value uniform 305.66; + } + DTOUTLET + { + type zeroGradient; + } + DTCYCLIC1 + { + type cyclicGgi; + } + DTCYCLIC2 + { + type cyclicGgi; + } + DTHUB + { + type zeroGradient; + } + DTSHROUD + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/U b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/U new file mode 100644 index 000000000..4d6db263c --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/U @@ -0,0 +1,114 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0.1 0.1 -1); + +boundaryField +{ + GVINLET + { + type fixedValue; + value uniform (0 0 -1); + } + GVOUTLET + { + type ggi; + value uniform (0 0 -1); + } + GVCYCLIC + { + type cyclic; + } + GVBLADE + { + type fixedValue; + value uniform (0 0 0); + } + GVHUB + { + type fixedValue; + value uniform (0 0 0); + } + GVSHROUD + { + type fixedValue; + value uniform (0 0 0); + } + RUINLET + { + type ggi; + value uniform (0 0 -1); + } + RUOUTLET + { + type ggi; + value uniform (0 0 -1); + } + RUCYCLIC1 + { + type cyclicGgi; + } + RUCYCLIC2 + { + type cyclicGgi; + } + RUBLADE + { + type fixedValue; + value uniform (0 0 0); + } + RUHUB + { + type fixedValue; + value uniform (0 0 0); + } + RUSHROUD + { + type fixedValue; + value uniform (0 0 0); + } + DTINLET + { + type ggi; + value uniform (0 0 -1); + } + DTOUTLET + { + type zeroGradient; + } + DTCYCLIC1 + { + type cyclicGgi; + } + DTCYCLIC2 + { + type cyclicGgi; + } + DTHUB + { + type fixedValue; + value uniform (0 0 0); + } + DTSHROUD + { + type fixedValue; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/alphat b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/alphat new file mode 100644 index 000000000..c0a7a5557 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/alphat @@ -0,0 +1,130 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + GVINLET + { + type calculated; + value uniform 0; + } + GVOUTLET + { + type ggi; + value uniform 0; + } + GVCYCLIC + { + type cyclic; + value uniform 0; + } + GVBLADE + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + GVHUB + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + GVSHROUD + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + RUINLET + { + type ggi; + value uniform 0; + } + RUOUTLET + { + type ggi; + value uniform 0; + } + RUCYCLIC1 + { + type cyclicGgi; + value uniform 0; + } + RUCYCLIC2 + { + type cyclicGgi; + value uniform 0; + } + RUBLADE + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + RUHUB + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + RUSHROUD + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + DTINLET + { + type ggi; + value uniform 0; + } + DTOUTLET + { + type calculated; + value uniform 0; + } + DTCYCLIC1 + { + type cyclicGgi; + value uniform 0; + } + DTCYCLIC2 + { + type cyclicGgi; + value uniform 0; + } + DTHUB + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + DTSHROUD + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/epsilon b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/epsilon new file mode 100644 index 000000000..66bf38921 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/epsilon @@ -0,0 +1,157 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 14.855; + +boundaryField +{ + GVINLET + { + type fixedValue; + value uniform 14.855; + } + GVOUTLET + { + type ggi; + patchType ggi; + value uniform 14.855; + } + GVCYCLIC + { + type cyclic; + value uniform 14.855; + } + GVBLADE + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + GVHUB + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + GVSHROUD + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + RUINLET + { + type ggi; + patchType ggi; + value uniform 14.855; + } + RUOUTLET + { + type ggi; + patchType ggi; + value uniform 14.855; + } + RUCYCLIC1 + { + type cyclicGgi; + value uniform 14.855; + } + RUCYCLIC2 + { + type cyclicGgi; + value uniform 14.855; + } + RUBLADE + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + RUHUB + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + RUSHROUD + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + DTINLET + { + type ggi; + patchType ggi; + value uniform 14.855; + } + DTOUTLET + { + type zeroGradient; + } + DTCYCLIC1 + { + type cyclicGgi; + value uniform 14.855; + } + DTCYCLIC2 + { + type cyclicGgi; + value uniform 14.855; + } + DTHUB + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + DTSHROUD + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/i b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/i new file mode 100644 index 000000000..88cf1b25f --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/i @@ -0,0 +1,138 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "20"; + object i; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 307494; + +boundaryField +{ + GVINLET + { + type fixedEnthalpy; + value uniform 307494; + } + GVOUTLET + { + type ggiEnthalpyJump; + patchType ggi; + rotating false; + value uniform 307494; + } + GVCYCLIC + { + type cyclic; + value uniform 307494; + } + GVBLADE + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307000; + } + GVHUB + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307494; + } + GVSHROUD + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307494; + } + RUINLET + { + type ggiEnthalpyJump; + patchType ggi; + rotating true; + value uniform 307494; + } + RUOUTLET + { + type ggiEnthalpyJump; + patchType ggi; + rotating true; + value uniform 307494; + } + RUCYCLIC1 + { + type cyclicGgi; + value uniform 307494; + } + RUCYCLIC2 + { + type cyclicGgi; + value uniform 307494; + } + RUBLADE + { + type gradientEnthalpy; + gradient uniform 307494; + } + RUHUB + { + type gradientEnthalpy; + gradient uniform 307494; + } + RUSHROUD + { + type gradientEnthalpy; + gradient uniform 307494; + + } + DTINLET + { + type ggiEnthalpyJump; + patchType ggi; + rotating false; + value uniform 305.66; + } + DTOUTLET + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307494; + } + DTCYCLIC1 + { + type cyclicGgi; + value uniform 307494; + } + DTCYCLIC2 + { + type cyclicGgi; + value uniform 307494; + } + DTHUB + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307494; + + } + DTSHROUD + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307494; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/k b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/k new file mode 100644 index 000000000..889b50142 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/k @@ -0,0 +1,121 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0.375; + +boundaryField +{ + GVINLET + { + type fixedValue; + value uniform 0.375; + } + GVOUTLET + { + type ggi; + value uniform 0.375; + } + GVCYCLIC + { + type cyclic; + value uniform 0.375; + } + GVBLADE + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + GVHUB + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + GVSHROUD + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + RUINLET + { + type ggi; + value uniform 0.375; + } + RUOUTLET + { + type ggi; + value uniform 0.375; + } + RUCYCLIC1 + { + type cyclicGgi; + value uniform 0.375; + } + RUCYCLIC2 + { + type cyclicGgi; + value uniform 0.375; + } + RUBLADE + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + RUHUB + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + RUSHROUD + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + DTINLET + { + type ggi; + value uniform 0.375; + } + DTOUTLET + { + type zeroGradient; + } + DTCYCLIC1 + { + type cyclicGgi; + value uniform 0.375; + } + DTCYCLIC2 + { + type cyclicGgi; + value uniform 0.375; + } + DTHUB + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + DTSHROUD + { + type compressible::kqRWallFunction; + value uniform 0.375; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/mut b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/mut new file mode 100644 index 000000000..884ad8de9 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/mut @@ -0,0 +1,146 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object mut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + GVINLET + { + type calculated; + value uniform 0; + } + GVOUTLET + { + type ggi; + value uniform 0; + } + GVCYCLIC + { + type cyclic; + value uniform 0; + } + GVBLADE + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + GVHUB + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + GVSHROUD + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + RUINLET + { + type ggi; + value uniform 0; + } + RUOUTLET + { + type ggi; + value uniform 0; + } + RUCYCLIC1 + { + type cyclicGgi; + value uniform 0; + } + RUCYCLIC2 + { + type cyclicGgi; + value uniform 0; + } + RUBLADE + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + RUHUB + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + RUSHROUD + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + DTINLET + { + type ggi; + value uniform 0; + } + DTOUTLET + { + type calculated; + value uniform 0; + } + DTCYCLIC1 + { + type cyclicGgi; + value uniform 0; + } + DTCYCLIC2 + { + type cyclicGgi; + value uniform 0; + } + DTHUB + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + DTSHROUD + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/p b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/p new file mode 100644 index 000000000..3a357c73e --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/save/p @@ -0,0 +1,110 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 100000; + +boundaryField +{ + GVINLET + { + type zeroGradient; + } + GVOUTLET + { + type ggi; + patchType ggi; + value uniform 100000; + } + GVCYCLIC + { + type cyclic; + } + GVBLADE + { + type zeroGradient; + } + GVHUB + { + type zeroGradient; + } + GVSHROUD + { + type zeroGradient; + } + RUINLET + { + type ggi; + patchType ggi; + value uniform 100000; + } + RUOUTLET + { + type ggi; + patchType ggi; + value uniform 100000; + } + RUCYCLIC1 + { + type cyclicGgi; + } + RUCYCLIC2 + { + type cyclicGgi; + } + RUBLADE + { + type zeroGradient; + } + RUHUB + { + type zeroGradient; + } + RUSHROUD + { + type zeroGradient; + } + DTINLET + { + type ggi; + patchType ggi; + value uniform 100000; + } + DTOUTLET + { + type fixedValue; + value uniform 100000; + } + DTCYCLIC1 + { + type cyclicGgi; + } + DTCYCLIC2 + { + type cyclicGgi; + } + DTHUB + { + type zeroGradient; + } + DTSHROUD + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/setBatchGgi b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/setBatchGgi new file mode 100644 index 000000000..5b5d6b459 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/setBatchGgi @@ -0,0 +1,9 @@ +faceSet RUCYCLIC1Zone new patchToFace RUCYCLIC1 +faceSet RUCYCLIC2Zone new patchToFace RUCYCLIC2 +faceSet DTCYCLIC1Zone new patchToFace DTCYCLIC1 +faceSet DTCYCLIC2Zone new patchToFace DTCYCLIC2 +faceSet GVOUTLETZone new patchToFace GVOUTLET +faceSet RUINLETZone new patchToFace RUINLET +faceSet RUOUTLETZone new patchToFace RUOUTLET +faceSet DTINLETZone new patchToFace DTINLET +quit diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/system/controlDict b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/system/controlDict new file mode 100644 index 000000000..ee24cb725 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/system/controlDict @@ -0,0 +1,63 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application steadyUniversalMRFFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 200; + +deltaT 1; + +writeControl timeStep; + +writeInterval 20; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 12; + +writeCompression compressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; +//libs ("libjumpFiniteVolume.so"); + +// Compute the flux value on each side of a GGI interface +functions +( + ggiCheck + { + // Type of functionObject + type ggiCheck; + + phi phi; + + // Where to load it from (if not already in solver) + functionObjectLibs ("libcheckFunctionObjects.so"); + } +); + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/system/decomposeParDict b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/system/decomposeParDict new file mode 100644 index 000000000..3604ff59e --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/system/decomposeParDict @@ -0,0 +1,86 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 8; + +//method metis; +method patchConstrained; + +globalFaceZones +( + RUCYCLIC1Zone + RUINLETZone + RUCYCLIC2Zone + RUOUTLETZone + GVOUTLETZone + DTINLETZone + DTCYCLIC1Zone + DTCYCLIC2Zone +); + +patchConstrainedCoeffs +{ + method metis; + numberOfSubdomains 8; + patchConstraints + ( + (RUINLET 1) + (GVOUTLET 1) + (RUOUTLET 2) + (DTINLET 2) + ); +} + +simpleCoeffs +{ + n (2 2 1); + delta 0.001; +} + +hierarchicalCoeffs +{ + n (1 1 1); + delta 0.001; + order xyz; +} + +metisCoeffs +{ + processorWeights + ( + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + ); +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots +( +); + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/system/fvSchemes b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/system/fvSchemes new file mode 100755 index 000000000..f2a536827 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/system/fvSchemes @@ -0,0 +1,107 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.2 | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default steadyState; + +// ddt(rho,U) steadyInertial phi rho 0.25; + ddt(rho,h) steadyState; + ddt(rho,i) steadyState; +// ddt(rho,h) steadyInertial phi rho 0.25; + ddt(psi,p) steadyInertial phi rho 1; +// ddt(psi,p) steadyState; + + ddt(rho,k) steadyState; + ddt(rho,epsilon) steadyState; + + U steadyState; + T steadyState; + p steadyState; +} +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss upwind; + div(phi,h) Gauss upwind; + div(phi,i) Gauss upwind; + div(phid,p) Gauss upwind; + + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + + + div((muEff*dev2(T(grad(U))))) Gauss linear; + div((nuEff*dev(T(grad(U))))) Gauss linear; + div(U,p) Gauss upwind; + +} + +laplacianSchemes +{ + default Gauss linear limited 0.5; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default limited 0.5; +} + +fluxRequired +{ + default no; + p; +} + +mixingPlane +{ + default areaAveraging; + U areaAveraging; + k fluxAveraging; + omega areaAveraging; +} + + + + + + + + + + + + + + + + + + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/system/fvSchemes_old b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/system/fvSchemes_old new file mode 100755 index 000000000..82a1b4cd4 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/system/fvSchemes_old @@ -0,0 +1,76 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default steadyState; +} + +gradSchemes +{ + default Gauss linear; + grad(p) Gauss linear; + grad(U) Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss limitedLinearV 1; + div(phi,k) Gauss limitedLinear 1; + div(phi,i) Gauss limitedLinear 1; + div(phid,p) Gauss limitedLinear 1; + div(phi,epsilon) Gauss limitedLinear 1; + div((nuEff*dev(grad(U).T()))) Gauss linear; + div((muEff*dev2(grad(U).T()))) Gauss linear; +} + +laplacianSchemes +{ + default none; + laplacian(nuEff,U) Gauss linear corrected; + laplacian((rho*(1|A(U))),p) Gauss linear corrected; + laplacian(DkEff,k) Gauss linear corrected; + laplacian(DepsilonEff,epsilon) Gauss linear corrected; + laplacian(muEff,U) Gauss linear corrected; + laplacian(alphaEff,i) Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; + interpolate(U) linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p; +} + +mixingPlane +{ + default areaAveraging; + //U fluxAveragingAdjustMassFlow; + //p zeroGradientAreaAveragingMix; +} + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/system/fvSolution b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/system/fvSolution new file mode 100755 index 000000000..db7e86343 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineGgiJump/system/fvSolution @@ -0,0 +1,117 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver GAMG; + tolerance 1e-8; + relTol 0.05; + + smoother GaussSeidel; + + cacheAgglomeration true; + + nCellsInCoarsestLevel 20; + agglomerator faceAreaPair; + mergeLevels 1; + } + + U + { + solver smoothSolver; + smoother GaussSeidel; + nSweeps 2; + tolerance 1e-7; + relTol 0.1; + } + + k + { + solver smoothSolver; + smoother GaussSeidel; + nSweeps 2; + tolerance 1e-7; + relTol 0.1; + } + + epsilon + { + solver smoothSolver; + smoother GaussSeidel; + nSweeps 2; + tolerance 1e-7; + relTol 0.1; + } + T + { + solver smoothSolver; + smoother GaussSeidel; + nSweeps 2; + tolerance 1e-7; + relTol 0.1; + } + i + { + solver smoothSolver; + smoother GaussSeidel; + nSweeps 2; + tolerance 1e-7; + relTol 0.1; + } +} + +SIMPLE +{ + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; +} +PIMPLE +{ + nOuterCorrectors 1; + nCorrectors 1; + nNonOrthogonalCorrectors 0; + compressible yes; + convergence 1e-5; + +} + +relaxationFactors +{ + // Note: under-relaxation factors used in wave-transmissive schemes + U 0.1; + p 0.1; + h 0.1; + i 0.1; + rho 0.1; + T 0.1; + + k 0.1; + epsilon 0.1; +} + +fieldBounds +{ + p 50 1e8; + T 100 1000; + U 1000; + epsilon 0 1e6; +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/T b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/T new file mode 100644 index 000000000..8e3300846 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/T @@ -0,0 +1,116 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 305.66; + +boundaryField +{ + GVINLET + { + type fixedValue; + value uniform 305.66; + } + GVOUTLET + { + type mixingPlaneEnthalpyJump; + patchType mixingPlane; + rotating false; + value uniform 305.66; + } + GVCYCLIC + { + type cyclic; + } + GVBLADE + { + type zeroGradient; + } + GVHUB + { + type zeroGradient; + } + GVSHROUD + { + type zeroGradient; + } + RUINLET + { + type mixingPlaneEnthalpyJump; + patchType mixingPlane; + rotating true; + value uniform 305.66; + } + RUOUTLET + { + type mixingPlaneEnthalpyJump; + patchType mixingPlane; + rotating true; + value uniform 305.66; + } + RUCYCLIC1 + { + type cyclicGgi; + } + RUCYCLIC2 + { + type cyclicGgi; + } + RUBLADE + { + type zeroGradient; + } + RUHUB + { + type zeroGradient; + } + RUSHROUD + { + type zeroGradient; + } + DTINLET + { + type mixingPlaneEnthalpyJump; + patchType mixingPlane; + rotating false; + value uniform 305.66; + } + DTOUTLET + { + type zeroGradient; + } + DTCYCLIC1 + { + type cyclicGgi; + } + DTCYCLIC2 + { + type cyclicGgi; + } + DTHUB + { + type zeroGradient; + } + DTSHROUD + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/U b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/U new file mode 100644 index 000000000..9b2d2f485 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/U @@ -0,0 +1,114 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0.1 0.1 -1); + +boundaryField +{ + GVINLET + { + type fixedValue; + value uniform (0 0 -1); + } + GVOUTLET + { + type mixingPlane; + value uniform (0 0 -1); + } + GVCYCLIC + { + type cyclic; + } + GVBLADE + { + type fixedValue; + value uniform (0 0 0); + } + GVHUB + { + type fixedValue; + value uniform (0 0 0); + } + GVSHROUD + { + type fixedValue; + value uniform (0 0 0); + } + RUINLET + { + type mixingPlane; + value uniform (0 0 -1); + } + RUOUTLET + { + type mixingPlane; + value uniform (0 0 -1); + } + RUCYCLIC1 + { + type cyclicGgi; + } + RUCYCLIC2 + { + type cyclicGgi; + } + RUBLADE + { + type fixedValue; + value uniform (0 0 0); + } + RUHUB + { + type fixedValue; + value uniform (0 0 0); + } + RUSHROUD + { + type fixedValue; + value uniform (0 0 0); + } + DTINLET + { + type mixingPlane; + value uniform (0 0 -1); + } + DTOUTLET + { + type zeroGradient; + } + DTCYCLIC1 + { + type cyclicGgi; + } + DTCYCLIC2 + { + type cyclicGgi; + } + DTHUB + { + type fixedValue; + value uniform (0 0 0); + } + DTSHROUD + { + type fixedValue; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/alphat b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/alphat new file mode 100644 index 000000000..051a6889e --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/alphat @@ -0,0 +1,130 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + GVINLET + { + type calculated; + value uniform 0; + } + GVOUTLET + { + type mixingPlane; + value uniform 0; + } + GVCYCLIC + { + type cyclic; + value uniform 0; + } + GVBLADE + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + GVHUB + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + GVSHROUD + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + RUINLET + { + type mixingPlane; + value uniform 0; + } + RUOUTLET + { + type mixingPlane; + value uniform 0; + } + RUCYCLIC1 + { + type cyclicGgi; + value uniform 0; + } + RUCYCLIC2 + { + type cyclicGgi; + value uniform 0; + } + RUBLADE + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + RUHUB + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + RUSHROUD + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + DTINLET + { + type mixingPlane; + value uniform 0; + } + DTOUTLET + { + type calculated; + value uniform 0; + } + DTCYCLIC1 + { + type cyclicGgi; + value uniform 0; + } + DTCYCLIC2 + { + type cyclicGgi; + value uniform 0; + } + DTHUB + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + DTSHROUD + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/epsilon b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/epsilon new file mode 100644 index 000000000..e6aa150b8 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/epsilon @@ -0,0 +1,153 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 14.855; + +boundaryField +{ + GVINLET + { + type fixedValue; + value uniform 14.855; + } + GVOUTLET + { + type mixingPlane; + value uniform 14.855; + } + GVCYCLIC + { + type cyclic; + value uniform 14.855; + } + GVBLADE + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + GVHUB + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + GVSHROUD + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + RUINLET + { + type mixingPlane; + value uniform 14.855; + } + RUOUTLET + { + type mixingPlane; + value uniform 14.855; + } + RUCYCLIC1 + { + type cyclicGgi; + value uniform 14.855; + } + RUCYCLIC2 + { + type cyclicGgi; + value uniform 14.855; + } + RUBLADE + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + RUHUB + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + RUSHROUD + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + DTINLET + { + type mixingPlane; + value uniform 14.855; + } + DTOUTLET + { + type zeroGradient; + } + DTCYCLIC1 + { + type cyclicGgi; + value uniform 14.855; + } + DTCYCLIC2 + { + type cyclicGgi; + value uniform 14.855; + } + DTHUB + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + DTSHROUD + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/i b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/i new file mode 100644 index 000000000..793c5fc5e --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/i @@ -0,0 +1,138 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "20"; + object i; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 307494; + +boundaryField +{ + GVINLET + { + type fixedEnthalpy; + value uniform 307494; + } + GVOUTLET + { + type mixingPlaneEnthalpyJump; + patchType mixingPlane; + rotating false; + value uniform 307494; + } + GVCYCLIC + { + type cyclic; + value uniform 307494; + } + GVBLADE + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307000; + } + GVHUB + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307494; + } + GVSHROUD + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307494; + } + RUINLET + { + type mixingPlaneEnthalpyJump; + patchType mixingPlane; + rotating true; + value uniform 307494; + } + RUOUTLET + { + type mixingPlaneEnthalpyJump; + patchType mixingPlane; + rotating true; + value uniform 307494; + } + RUCYCLIC1 + { + type cyclicGgi; + value uniform 307494; + } + RUCYCLIC2 + { + type cyclicGgi; + value uniform 307494; + } + RUBLADE + { + type gradientEnthalpy; + gradient uniform 307494; + } + RUHUB + { + type gradientEnthalpy; + gradient uniform 307494; + } + RUSHROUD + { + type gradientEnthalpy; + gradient uniform 307494; + + } + DTINLET + { + type mixingPlaneEnthalpyJump; + patchType mixingPlane; + rotating false; + value uniform 305.66; + } + DTOUTLET + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307494; + } + DTCYCLIC1 + { + type cyclicGgi; + value uniform 307494; + } + DTCYCLIC2 + { + type cyclicGgi; + value uniform 307494; + } + DTHUB + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307494; + + } + DTSHROUD + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307494; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/k b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/k new file mode 100644 index 000000000..d54ad70b2 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/k @@ -0,0 +1,121 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0.375; + +boundaryField +{ + GVINLET + { + type fixedValue; + value uniform 0.375; + } + GVOUTLET + { + type mixingPlane; + value uniform 0.375; + } + GVCYCLIC + { + type cyclic; + value uniform 0.375; + } + GVBLADE + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + GVHUB + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + GVSHROUD + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + RUINLET + { + type mixingPlane; + value uniform 0.375; + } + RUOUTLET + { + type mixingPlane; + value uniform 0.375; + } + RUCYCLIC1 + { + type cyclicGgi; + value uniform 0.375; + } + RUCYCLIC2 + { + type cyclicGgi; + value uniform 0.375; + } + RUBLADE + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + RUHUB + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + RUSHROUD + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + DTINLET + { + type mixingPlane; + value uniform 0.375; + } + DTOUTLET + { + type zeroGradient; + } + DTCYCLIC1 + { + type cyclicGgi; + value uniform 0.375; + } + DTCYCLIC2 + { + type cyclicGgi; + value uniform 0.375; + } + DTHUB + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + DTSHROUD + { + type compressible::kqRWallFunction; + value uniform 0.375; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/mut b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/mut new file mode 100644 index 000000000..7e0188117 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/mut @@ -0,0 +1,146 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object mut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + GVINLET + { + type calculated; + value uniform 0; + } + GVOUTLET + { + type mixingPlane; + value uniform 0; + } + GVCYCLIC + { + type cyclic; + value uniform 0; + } + GVBLADE + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + GVHUB + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + GVSHROUD + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + RUINLET + { + type mixingPlane; + value uniform 0; + } + RUOUTLET + { + type mixingPlane; + value uniform 0; + } + RUCYCLIC1 + { + type cyclicGgi; + value uniform 0; + } + RUCYCLIC2 + { + type cyclicGgi; + value uniform 0; + } + RUBLADE + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + RUHUB + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + RUSHROUD + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + DTINLET + { + type mixingPlane; + value uniform 0; + } + DTOUTLET + { + type calculated; + value uniform 0; + } + DTCYCLIC1 + { + type cyclicGgi; + value uniform 0; + } + DTCYCLIC2 + { + type cyclicGgi; + value uniform 0; + } + DTHUB + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + DTSHROUD + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/p b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/p new file mode 100644 index 000000000..8531b9daa --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/0/p @@ -0,0 +1,106 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 100000; + +boundaryField +{ + GVINLET + { + type zeroGradient; + } + GVOUTLET + { + type mixingPlane; + value uniform 100000; + } + GVCYCLIC + { + type cyclic; + } + GVBLADE + { + type zeroGradient; + } + GVHUB + { + type zeroGradient; + } + GVSHROUD + { + type zeroGradient; + } + RUINLET + { + type mixingPlane; + value uniform 100000; + } + RUOUTLET + { + type mixingPlane; + value uniform 100000; + } + RUCYCLIC1 + { + type cyclicGgi; + } + RUCYCLIC2 + { + type cyclicGgi; + } + RUBLADE + { + type zeroGradient; + } + RUHUB + { + type zeroGradient; + } + RUSHROUD + { + type zeroGradient; + } + DTINLET + { + type mixingPlane; + value uniform 100000; + } + DTOUTLET + { + type fixedValue; + value uniform 100000; + } + DTCYCLIC1 + { + type cyclicGgi; + } + DTCYCLIC2 + { + type cyclicGgi; + } + DTHUB + { + type zeroGradient; + } + DTSHROUD + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/Allclean b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/Allclean new file mode 100755 index 000000000..b9a46198e --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/Allclean @@ -0,0 +1,8 @@ +#!/bin/sh + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase +\rm -rf 0 +\cp -r save 0 diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/Allrun b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/Allrun new file mode 100755 index 000000000..9640a9926 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/Allrun @@ -0,0 +1,20 @@ +#!/bin/sh + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +application=steadyUniversalMRFFoam + +#Create the mesh: +m4 < constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict +runApplication blockMesh +transformPoints -scale "(1 20 1)" +transformPoints -cylToCart "((0 0 0) (0 0 1) (1 0 0))" + +# Set 0-directory and create GGI set: +\rm -rf 0 +\cp -r save 0 +runApplication setSet -batch setBatchMixingPlane +runApplication setsToZones -noFlipMap + +runApplication $application diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/MRFZones b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/MRFZones new file mode 100644 index 000000000..8e2e4d7b1 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/MRFZones @@ -0,0 +1,31 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object MRFZones; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +1 +( + rotor + { + //patches (rotor); + // Fixed patches (by default they 'move' with the MRF zone) + nonRotatingPatches ( RUSHROUD ); + + origin origin [0 1 0 0 0 0 0] (0 0 0); + axis axis [0 0 0 0 0 0 0] (0 0 1); + omega omega [0 0 -1 0 0 0 0] -10; + } +) + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/RASProperties b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/RASProperties new file mode 100644 index 000000000..7dd9f65e1 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/RASProperties @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object RASProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RASModel RNGkEpsilon; + +turbulence on; + +printCoeffs on; + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/polyMesh/blockMeshDict b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/polyMesh/blockMeshDict new file mode 100644 index 000000000..19b82a106 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/polyMesh/blockMeshDict @@ -0,0 +1,576 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// General macros to create 2D/extruded-2D meshes + + + +//define(calc, [esyscmd(echo $1 | bc | tr -d \\n)]) + + + + + + + + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +// HUB AND SHROUD RADIUS +// Hub radius (m) + +// Shroud radius (m) + + +// GUIDE VANE REGION GEOMETRY AND MESH PROPERTIES +// Guide vane inlet axial length (m) + +// Guide vane axial length (m) + +// Guide vane outlet axial length (m) + +// Number of guide vanes per 360 degrees (integer!) + +// Number of cells in radial direction at guide vane + +// Number of cells in tangential direction between guide vanes + +// Number of cells in axial direction at guide vane inlet + +// Number of cells in axial direction between guide vanes + +// Number of cells in axial direction at guide vane outlet + + +// RUNNER REGION GEOMETRY AND MESH PROPERTIES +// Runner inlet axial length (m) + +// Runner axial length (m) + +// Runner outlet axial length (m) + +// Number of runner blades per 360 degrees (integer!) + +// Number of cells in radial direction in runner + +// Number of cells in tangential direction between runner blades + +// Number of cells in axial direction at runner inlet + +// Number of cells in axial direction between runner blades + +// Number of cells in axial direction at runner outlet + + +// DRAFT TUBE REGION GEOMETRY AND MESH PROPERTIES +// "Draft tube" axial length (m) + +// Number of sections per 360 degrees (integer!) + +// Number of cells in radial direction in "draft tube" + +// Number of cells in tangential direction in "draft tube" + +// Number of cells in axial direction in "draft tube" + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// TANGENTIAL PITCHES (RADIANS) +// Guide vane region + +// Runner region + +// Draft tube region + + +// TANGENTIAL SHIFTS BETWEEN AXIAL LEVELS (BOTTOM-UP) +// Tangential shift from level DT0 to DT1 + +// Runner region +// Tangential shift from level RU0 to RU1 + +// Tangential shift from level RU1 to RU2 + +// Tangential shift from level RU2 to RU3 + +// Guide vane region +// Tangential shift from level GV0 to GV1 + +// Tangential shift from level GV1 to GV2 + +// Tangential shift from level GV2 to GV3 + + +// AXIAL/TANGENTIAL BASE POINTS FOR EACH LEVEL (BOTTOM-UP): +// (CENTER OF RUNNER SET TO THETA=0, Z=0) +// Draft tube: + //Center runner + // Straight draft tube! + //Center runner +// Runner: + //Center runner + //Center runner + + + +// Guide vane: + //Center runner + //Center runner + + + + +vertices //(radial [m], tangential [radians], axial [m]) +( +//Guide vane hub: + (0.05 -0.0691150383 0.07) // Vertex GV0lb = 0 + (0.05 -0.00628318530000001 0.07) // Vertex GV0rb = 1 + (0.05 -0.062831853 0.09) // Vertex GV1lb = 2 + (0.05 0 0.09) // Vertex GV1rb = 3 + (0.05 -0.0314159265 0.19) // Vertex GV2lb = 4 + (0.05 0.0314159265 0.19) // Vertex GV2rb = 5 + (0.05 -0.0314159265 0.29) // Vertex GV3lb = 6 + (0.05 0.0314159265 0.29) // Vertex GV3rb = 7 + +//Guide vane shroud: + (0.1 -0.0691150383 0.07) // Vertex GV0lt = 8 + (0.1 -0.00628318530000001 0.07) // Vertex GV0rt = 9 + (0.1 -0.062831853 0.09) // Vertex GV1lt = 10 + (0.1 0 0.09) // Vertex GV1rt = 11 + (0.1 -0.0314159265 0.19) // Vertex GV2lt = 12 + (0.1 0.0314159265 0.19) // Vertex GV2rt = 13 + (0.1 -0.0314159265 0.29) // Vertex GV3lt = 14 + (0.1 0.0314159265 0.29) // Vertex GV3rt = 15 + +//Runner hub: + (0.05 -0.0062831853 -0.07) // Vertex RU0lb = 16 + (0.05 0.0565486677 -0.07) // Vertex RU0rb = 17 + (0.05 -0.0125663706 -0.05) // Vertex RU1lb = 18 + (0.05 0.0502654824 -0.05) // Vertex RU1rb = 19 + (0.05 -0.062831853 0.05) // Vertex RU2lb = 20 + (0.05 0 0.05) // Vertex RU2rb = 21 + (0.05 -0.0691150383 0.07) // Vertex RU3lb = 22 + (0.05 -0.00628318530000001 0.07) // Vertex RU3rb = 23 + +//Runner shroud: + (0.1 -0.0062831853 -0.07) // Vertex RU0lt = 24 + (0.1 0.0565486677 -0.07) // Vertex RU0rt = 25 + (0.1 -0.0125663706 -0.05) // Vertex RU1lt = 26 + (0.1 0.0502654824 -0.05) // Vertex RU1rt = 27 + (0.1 -0.062831853 0.05) // Vertex RU2lt = 28 + (0.1 0 0.05) // Vertex RU2rt = 29 + (0.1 -0.0691150383 0.07) // Vertex RU3lt = 30 + (0.1 -0.00628318530000001 0.07) // Vertex RU3rt = 31 + +//Draft tube hub: + (0.05 -0.0062831853 -0.14) // Vertex DT0lb = 32 + (0.05 0.0565486677 -0.14) // Vertex DT0rb = 33 + (0.05 -0.0062831853 -0.07) // Vertex DT1lb = 34 + (0.05 0.0565486677 -0.07) // Vertex DT1rb = 35 + +//Draft tube shroud: + (0.1 -0.0062831853 -0.14) // Vertex DT0lt = 36 + (0.1 0.0565486677 -0.14) // Vertex DT0rt = 37 + (0.1 -0.0062831853 -0.07) // Vertex DT1lt = 38 + (0.1 0.0565486677 -0.07) // Vertex DT1rt = 39 +); + +blocks +( +//Guide vane: + hex (0 1 3 2 8 9 11 10) + (10 2 10) + simpleGrading (1 1 1) + + hex (2 3 5 4 10 11 13 12) + (10 10 10) + simpleGrading (1 1 1) + + hex (4 5 7 6 12 13 15 14) + (10 10 10) + simpleGrading (1 1 1) + +//Runner: + hex (16 17 19 18 24 25 27 26) + rotor + (10 2 10) + simpleGrading (1 1 1) + + hex (18 19 21 20 26 27 29 28) + rotor + (10 10 10) + simpleGrading (1 1 1) + + hex (20 21 23 22 28 29 31 30) + rotor + (10 2 10) + simpleGrading (1 1 1) + +//Draft tube: + hex (32 33 35 34 36 37 39 38) + (10 7 10) + simpleGrading (1 1 1) + +); + +edges // Inappropriate with arc due to coordinate conversion +( +//Runner + spline 26 28 + ( + (0.1 -0.04523893416 0) + ) + spline 18 20 + ( + (0.05 -0.04523893416 0) + ) + spline 27 29 + ( + (0.1 0.0125663706 0) + ) + spline 19 21 + ( + (0.05 0.0125663706 0) + ) +//Guide vane + spline 10 12 + ( + (0.1 -0.039269908125 0.14) + ) + spline 2 4 + ( + (0.05 -0.039269908125 0.14) + ) + spline 11 13 + ( + (0.1 0.020420352225 0.14) + ) + spline 3 5 + ( + (0.05 0.020420352225 0.14) + ) +); + +boundary +( + GVINLET + { + type patch; + faces + ( + (7 6 14 15) + ); + } + + GVOUTLET + { + type mixingPlane; + shadowPatch RUINLET; + zone GVOUTLETZone; + coordinateSystem + { + type cylindrical; + name mixingCS; + origin (0 0 0); + axis (0 0 1); + direction (1 0 0); + inDegrees false; //Use radians + //Equivalent axis/direction definition: + //e3 (0 0 1); + //e1 (1 0 0); + } + ribbonPatch + { + sweepAxis Theta; + stackAxis R; + discretisation bothPatches; + } + faces + ( + (0 1 9 8) + ); + } + + GVCYCLIC + { + type cyclic; + featureCos 0.9; + //MUST specify transformation since cyclic is not flat. + //Set global debugSwitch cyclic to 1 to check that it is correct! + transform rotational; + rotationAxis (0 0 1); + rotationCentre (0 0 0); + rotationAngle -72; //Degrees from second half to first half + //Face numbering must be same on both halfs/sides. The numbering + //is determined by the block definition, not by the faces list + //below. Just make sure that each face definition is according + //to the rule "clockwise when looking from inside the block". + faces + ( + //First half, left side: + (2 0 8 10) + (6 4 12 14) + //Second half, right side: + (1 3 11 9) + (5 7 15 13) + ); + } + + GVBLADE + { + type wall; + faces + ( + (4 2 10 12) + (3 5 13 11) + ); + } + + GVHUB + { + type wall; + faces + ( + (0 2 3 1) + (2 4 5 3) + (4 6 7 5) + ); + } + + GVSHROUD + { + type wall; + faces + ( + (8 9 11 10) + (10 11 13 12) + (12 13 15 14) + ); + } + + RUINLET + { + type mixingPlane; + shadowPatch GVOUTLET; + zone RUINLETZone; + coordinateSystem + { + type cylindrical; + name mixingCS; + origin (0 0 0); + axis (0 0 1); + direction (1 0 0); + inDegrees false; //Use radians + //Equivalent axis/direction definition: + //e3 (0 0 1); + //e1 (1 0 0); + } + ribbonPatch + { + sweepAxis Theta; + stackAxis R; + discretisation bothPatches; + } + faces + ( + (23 22 30 31) + ); + } + + RUOUTLET + { + type mixingPlane; + shadowPatch DTINLET; + zone RUOUTLETZone; + coordinateSystem + { + type cylindrical; + name mixingCS; + origin (0 0 0); + axis (0 0 1); + direction (1 0 0); + inDegrees false; //Use radians + //Equivalent axis/direction definition: + //e3 (0 0 1); + //e1 (1 0 0); + } + ribbonPatch + { + sweepAxis Theta; + stackAxis R; + discretisation bothPatches; + } + faces + ( + (16 17 25 24) + ); + } + + RUCYCLIC1 + { + type cyclicGgi; + shadowPatch RUCYCLIC2; + zone RUCYCLIC1Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle 72; + separationOffset (0 0 0); + faces + ( + (18 16 24 26) + (22 20 28 30) + ); + } + + RUCYCLIC2 + { + type cyclicGgi; + shadowPatch RUCYCLIC1; + zone RUCYCLIC2Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle -72; + separationOffset (0 0 0); + faces + ( + (17 19 27 25) + (21 23 31 29) + ); + } + + RUBLADE + { + type wall; + faces + ( + (20 18 26 28) + (19 21 29 27) + ); + } + + RUHUB + { + type wall; + faces + ( + (16 18 19 17) + (18 20 21 19) + (20 22 23 21) + ); + } + + RUSHROUD + { + type wall; + faces + ( + (24 25 27 26) + (26 27 29 28) + (28 29 31 30) + ); + } + + DTINLET + { + type mixingPlane; + shadowPatch RUOUTLET; + zone DTINLETZone; + coordinateSystem + { + type cylindrical; + name mixingCS; + origin (0 0 0); + axis (0 0 1); + direction (1 0 0); + inDegrees false; //Use radians + //Equivalent axis/direction definition: + //e3 (0 0 1); + //e1 (1 0 0); + } + ribbonPatch + { + sweepAxis Theta; + stackAxis R; + discretisation bothPatches; + } + faces + ( + (35 34 38 39) + ); + } + + DTOUTLET + { + type patch; + faces + ( + (32 33 37 36) + ); + } + + DTCYCLIC1 + { + type cyclicGgi; + shadowPatch DTCYCLIC2; + zone DTCYCLIC1Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle 72; + separationOffset (0 0 0); + faces + ( + (34 32 36 38) + ); + } + + DTCYCLIC2 + { + type cyclicGgi; + shadowPatch DTCYCLIC1; + zone DTCYCLIC2Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle -72; + separationOffset (0 0 0); + faces + ( + (33 35 39 37) + ); + } + + DTHUB + { + type wall; + faces + ( + (32 34 35 33) + ); + } + + DTSHROUD + { + type wall; + faces + ( + (36 37 39 38) + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/polyMesh/blockMeshDict.m4 b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/polyMesh/blockMeshDict.m4 new file mode 100644 index 000000000..047cec8d4 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/polyMesh/blockMeshDict.m4 @@ -0,0 +1,576 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// General macros to create 2D/extruded-2D meshes + +changecom(//)changequote([,]) +define(calc, [esyscmd(perl -e 'printf ($1)')]) +//define(calc, [esyscmd(echo $1 | bc | tr -d \\n)]) +define(VCOUNT, 0) +define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) +define(pi, calc(3.14159265/20)) + +define(hex2D, hex ($1b $2b $3b $4b $1t $2t $3t $4t)) +define(quad2D, ($1b $2b $2t $1t)) +define(frontQuad, ($1t $2t $3t $4t)) +define(backQuad, ($1b $4b $3b $2b)) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +// HUB AND SHROUD RADIUS +// Hub radius (m) +define(hr, 0.05) +// Shroud radius (m) +define(sr, 0.1) + +// GUIDE VANE REGION GEOMETRY AND MESH PROPERTIES +// Guide vane inlet axial length (m) +define(GVial, 0.1) +// Guide vane axial length (m) +define(GVbal, 0.1) +// Guide vane outlet axial length (m) +define(GVoal, 0.02) +// Number of guide vanes per 360 degrees (integer!) +define(GVnb, 5) +// Number of cells in radial direction at guide vane +define(GVrc, 10) +// Number of cells in tangential direction between guide vanes +define(GVtc, 10) +// Number of cells in axial direction at guide vane inlet +define(GViac, 10) +// Number of cells in axial direction between guide vanes +define(GVbac, 10) +// Number of cells in axial direction at guide vane outlet +define(GVoac, 2) + +// RUNNER REGION GEOMETRY AND MESH PROPERTIES +// Runner inlet axial length (m) +define(RUial, 0.02) +// Runner axial length (m) +define(RUal, 0.1) +// Runner outlet axial length (m) +define(RUoal, 0.02) +// Number of runner blades per 360 degrees (integer!) +define(RUnb, 5) +// Number of cells in radial direction in runner +define(RUrc, 10) +// Number of cells in tangential direction between runner blades +define(RUtc, 10) +// Number of cells in axial direction at runner inlet +define(RUiac, 2) +// Number of cells in axial direction between runner blades +define(RUbac, 10) +// Number of cells in axial direction at runner outlet +define(RUoac, 2) + +// DRAFT TUBE REGION GEOMETRY AND MESH PROPERTIES +// "Draft tube" axial length (m) +define(DTal, 0.07) +// Number of sections per 360 degrees (integer!) +define(DTns, 5) +// Number of cells in radial direction in "draft tube" +define(DTrc, 10) +// Number of cells in tangential direction in "draft tube" +define(DTtc, 10) +// Number of cells in axial direction in "draft tube" +define(DTac, 7) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// TANGENTIAL PITCHES (RADIANS) +// Guide vane region +define(GVp, calc(2*pi/GVnb)) +// Runner region +define(RUp, calc(2*pi/RUnb)) +// Draft tube region +define(DTp, calc(2*pi/DTns)) + +// TANGENTIAL SHIFTS BETWEEN AXIAL LEVELS (BOTTOM-UP) +// Tangential shift from level DT0 to DT1 +define(DTts01, calc(5*DTp)) +// Runner region +// Tangential shift from level RU0 to RU1 +define(RUts01, calc(-1/10*RUp)) +// Tangential shift from level RU1 to RU2 +define(RUts12, calc(-4/5*RUp)) +// Tangential shift from level RU2 to RU3 +define(RUts23, calc(-1/10*RUp)) +// Guide vane region +// Tangential shift from level GV0 to GV1 +define(GVts01, calc(1/10*GVp)) +// Tangential shift from level GV1 to GV2 +define(GVts12, calc(1/2*GVp)) +// Tangential shift from level GV2 to GV3 +define(GVts23, calc(0*GVp)) + +// AXIAL/TANGENTIAL BASE POINTS FOR EACH LEVEL (BOTTOM-UP): +// (CENTER OF RUNNER SET TO THETA=0, Z=0) +// Draft tube: +define(DTa0, calc(-RUoal-0.5*RUal-DTal)) //Center runner +define(DTt0, calc(-0.5*RUp-(0.5*RUts12)-(0*DTts01))) // Straight draft tube! +define(DTt1, calc(-0.5*RUp-(0.5*RUts12))) //Center runner +// Runner: +define(RUa0, calc(-RUoal-0.5*RUal)) //Center runner +define(RUt0, calc(-0.5*RUp-(0.5*RUts12))) //Center runner +define(RUt1, calc(RUt0+RUts01)) +define(RUt2, calc(RUt1+RUts12)) +define(RUt3, calc(RUt2+RUts23)) +// Guide vane: +define(GVa0, calc(0.5*RUal+RUial)) //Center runner +define(GVt0, calc(-0.5*RUp-(0.5*RUts12)+RUts01+RUts12+RUts23)) //Center runner +define(GVt1, calc(GVt0+GVts01)) +define(GVt2, calc(GVt1+GVts12)) +define(GVt3, calc(GVt2+GVts23)) + +vertices //(radial [m], tangential [radians], axial [m]) +( +//Guide vane hub: + (hr GVt0 GVa0) vlabel(GV0lb) + (hr calc(GVt0+GVp) GVa0) vlabel(GV0rb) + (hr GVt1 calc(GVa0+GVoal)) vlabel(GV1lb) + (hr calc(GVt1+GVp) calc(GVa0+GVoal)) vlabel(GV1rb) + (hr GVt2 calc(GVa0+GVoal+GVbal)) vlabel(GV2lb) + (hr calc(GVt2+GVp) calc(GVa0+GVoal+GVbal)) vlabel(GV2rb) + (hr GVt3 calc(GVa0+GVoal+GVbal+GVial)) vlabel(GV3lb) + (hr calc(GVt3+GVp) calc(GVa0+GVoal+GVbal+GVial)) vlabel(GV3rb) + +//Guide vane shroud: + (sr GVt0 GVa0) vlabel(GV0lt) + (sr calc(GVt0+GVp) GVa0) vlabel(GV0rt) + (sr GVt1 calc(GVa0+GVoal)) vlabel(GV1lt) + (sr calc(GVt1+GVp) calc(GVa0+GVoal)) vlabel(GV1rt) + (sr GVt2 calc(GVa0+GVoal+GVbal)) vlabel(GV2lt) + (sr calc(GVt2+GVp) calc(GVa0+GVoal+GVbal)) vlabel(GV2rt) + (sr GVt3 calc(GVa0+GVoal+GVbal+GVial)) vlabel(GV3lt) + (sr calc(GVt3+GVp) calc(GVa0+GVoal+GVbal+GVial)) vlabel(GV3rt) + +//Runner hub: + (hr RUt0 RUa0) vlabel(RU0lb) + (hr calc(RUt0+RUp) RUa0) vlabel(RU0rb) + (hr RUt1 calc(RUa0+RUoal)) vlabel(RU1lb) + (hr calc(RUt1+RUp) calc(RUa0+RUoal)) vlabel(RU1rb) + (hr RUt2 calc(RUa0+RUoal+RUal)) vlabel(RU2lb) + (hr calc(RUt2+RUp) calc(RUa0+RUoal+RUal)) vlabel(RU2rb) + (hr RUt3 calc(RUa0+RUoal+RUal+RUial)) vlabel(RU3lb) + (hr calc(RUt3+RUp) calc(RUa0+RUoal+RUal+RUial)) vlabel(RU3rb) + +//Runner shroud: + (sr RUt0 RUa0) vlabel(RU0lt) + (sr calc(RUt0+RUp) RUa0) vlabel(RU0rt) + (sr RUt1 calc(RUa0+RUoal)) vlabel(RU1lt) + (sr calc(RUt1+RUp) calc(RUa0+RUoal)) vlabel(RU1rt) + (sr RUt2 calc(RUa0+RUoal+RUal)) vlabel(RU2lt) + (sr calc(RUt2+RUp) calc(RUa0+RUoal+RUal)) vlabel(RU2rt) + (sr RUt3 calc(RUa0+RUoal+RUal+RUial)) vlabel(RU3lt) + (sr calc(RUt3+RUp) calc(RUa0+RUoal+RUal+RUial)) vlabel(RU3rt) + +//Draft tube hub: + (hr DTt0 DTa0) vlabel(DT0lb) + (hr calc(DTt0+DTp) DTa0) vlabel(DT0rb) + (hr DTt1 calc(DTa0+DTal)) vlabel(DT1lb) + (hr calc(DTt1+DTp) calc(DTa0+DTal)) vlabel(DT1rb) + +//Draft tube shroud: + (sr DTt0 DTa0) vlabel(DT0lt) + (sr calc(DTt0+DTp) DTa0) vlabel(DT0rt) + (sr DTt1 calc(DTa0+DTal)) vlabel(DT1lt) + (sr calc(DTt1+DTp) calc(DTa0+DTal)) vlabel(DT1rt) +); + +blocks +( +//Guide vane: + hex2D(GV0l, GV0r, GV1r, GV1l) + (GVtc GVoac GVrc) + simpleGrading (1 1 1) + + hex2D(GV1l, GV1r, GV2r, GV2l) + (GVtc GVbac GVrc) + simpleGrading (1 1 1) + + hex2D(GV2l, GV2r, GV3r, GV3l) + (GVtc GViac GVrc) + simpleGrading (1 1 1) + +//Runner: + hex2D(RU0l, RU0r, RU1r, RU1l) + rotor + (RUtc RUoac RUrc) + simpleGrading (1 1 1) + + hex2D(RU1l, RU1r, RU2r, RU2l) + rotor + (RUtc RUbac RUrc) + simpleGrading (1 1 1) + + hex2D(RU2l, RU2r, RU3r, RU3l) + rotor + (RUtc RUiac RUrc) + simpleGrading (1 1 1) + +//Draft tube: + hex2D(DT0l, DT0r, DT1r, DT1l) + (DTtc DTac DTrc) + simpleGrading (1 1 1) + +); + +edges // Inappropriate with arc due to coordinate conversion +( +//Runner + spline RU1lt RU2lt + ( + (sr calc(RUt1+0.65*(RUt2-(RUt1))) calc(RUa0+RUoal+0.5*RUal)) + ) + spline RU1lb RU2lb + ( + (hr calc(RUt1+0.65*(RUt2-(RUt1))) calc(RUa0+RUoal+0.5*RUal)) + ) + spline RU1rt RU2rt + ( + (sr calc(RUt1+RUp+0.75*(RUt2-(RUt1))) calc(RUa0+RUoal+0.5*RUal)) + ) + spline RU1rb RU2rb + ( + (hr calc(RUt1+RUp+0.75*(RUt2-(RUt1))) calc(RUa0+RUoal+0.5*RUal)) + ) +//Guide vane + spline GV1lt GV2lt + ( + (sr calc(GVt1+0.75*(GVt2-(GVt1))) calc(GVa0+GVoal+0.5*GVbal)) + ) + spline GV1lb GV2lb + ( + (hr calc(GVt1+0.75*(GVt2-(GVt1))) calc(GVa0+GVoal+0.5*GVbal)) + ) + spline GV1rt GV2rt + ( + (sr calc(GVt1+GVp+0.65*(GVt2-(GVt1))) calc(GVa0+GVoal+0.5*GVbal)) + ) + spline GV1rb GV2rb + ( + (hr calc(GVt1+GVp+0.65*(GVt2-(GVt1))) calc(GVa0+GVoal+0.5*GVbal)) + ) +); + +boundary +( + GVINLET + { + type patch; + faces + ( + quad2D(GV3r, GV3l) + ); + } + + GVOUTLET + { + type mixingPlane; + shadowPatch RUINLET; + zone GVOUTLETZone; + coordinateSystem + { + type cylindrical; + name mixingCS; + origin (0 0 0); + axis (0 0 1); + direction (1 0 0); + inDegrees false; //Use radians + //Equivalent axis/direction definition: + //e3 (0 0 1); + //e1 (1 0 0); + } + ribbonPatch + { + sweepAxis Theta; + stackAxis R; + discretisation bothPatches; + } + faces + ( + quad2D(GV0l, GV0r) + ); + } + + GVCYCLIC + { + type cyclic; + featureCos 0.9; + //MUST specify transformation since cyclic is not flat. + //Set global debugSwitch cyclic to 1 to check that it is correct! + transform rotational; + rotationAxis (0 0 1); + rotationCentre (0 0 0); + rotationAngle -72; //Degrees from second half to first half + //Face numbering must be same on both halfs/sides. The numbering + //is determined by the block definition, not by the faces list + //below. Just make sure that each face definition is according + //to the rule "clockwise when looking from inside the block". + faces + ( + //First half, left side: + quad2D(GV1l, GV0l) + quad2D(GV3l, GV2l) + //Second half, right side: + quad2D(GV0r, GV1r) + quad2D(GV2r, GV3r) + ); + } + + GVBLADE + { + type wall; + faces + ( + quad2D(GV2l, GV1l) + quad2D(GV1r, GV2r) + ); + } + + GVHUB + { + type wall; + faces + ( + backQuad(GV0l, GV0r, GV1r, GV1l) + backQuad(GV1l, GV1r, GV2r, GV2l) + backQuad(GV2l, GV2r, GV3r, GV3l) + ); + } + + GVSHROUD + { + type wall; + faces + ( + frontQuad(GV0l, GV0r, GV1r, GV1l) + frontQuad(GV1l, GV1r, GV2r, GV2l) + frontQuad(GV2l, GV2r, GV3r, GV3l) + ); + } + + RUINLET + { + type mixingPlane; + shadowPatch GVOUTLET; + zone RUINLETZone; + coordinateSystem + { + type cylindrical; + name mixingCS; + origin (0 0 0); + axis (0 0 1); + direction (1 0 0); + inDegrees false; //Use radians + //Equivalent axis/direction definition: + //e3 (0 0 1); + //e1 (1 0 0); + } + ribbonPatch + { + sweepAxis Theta; + stackAxis R; + discretisation bothPatches; + } + faces + ( + quad2D(RU3r, RU3l) + ); + } + + RUOUTLET + { + type mixingPlane; + shadowPatch DTINLET; + zone RUOUTLETZone; + coordinateSystem + { + type cylindrical; + name mixingCS; + origin (0 0 0); + axis (0 0 1); + direction (1 0 0); + inDegrees false; //Use radians + //Equivalent axis/direction definition: + //e3 (0 0 1); + //e1 (1 0 0); + } + ribbonPatch + { + sweepAxis Theta; + stackAxis R; + discretisation bothPatches; + } + faces + ( + quad2D(RU0l, RU0r) + ); + } + + RUCYCLIC1 + { + type cyclicGgi; + shadowPatch RUCYCLIC2; + zone RUCYCLIC1Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle 72; + separationOffset (0 0 0); + faces + ( + quad2D(RU1l, RU0l) + quad2D(RU3l, RU2l) + ); + } + + RUCYCLIC2 + { + type cyclicGgi; + shadowPatch RUCYCLIC1; + zone RUCYCLIC2Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle -72; + separationOffset (0 0 0); + faces + ( + quad2D(RU0r, RU1r) + quad2D(RU2r, RU3r) + ); + } + + RUBLADE + { + type wall; + faces + ( + quad2D(RU2l, RU1l) + quad2D(RU1r, RU2r) + ); + } + + RUHUB + { + type wall; + faces + ( + backQuad(RU0l, RU0r, RU1r, RU1l) + backQuad(RU1l, RU1r, RU2r, RU2l) + backQuad(RU2l, RU2r, RU3r, RU3l) + ); + } + + RUSHROUD + { + type wall; + faces + ( + frontQuad(RU0l, RU0r, RU1r, RU1l) + frontQuad(RU1l, RU1r, RU2r, RU2l) + frontQuad(RU2l, RU2r, RU3r, RU3l) + ); + } + + DTINLET + { + type mixingPlane; + shadowPatch RUOUTLET; + zone DTINLETZone; + coordinateSystem + { + type cylindrical; + name mixingCS; + origin (0 0 0); + axis (0 0 1); + direction (1 0 0); + inDegrees false; //Use radians + //Equivalent axis/direction definition: + //e3 (0 0 1); + //e1 (1 0 0); + } + ribbonPatch + { + sweepAxis Theta; + stackAxis R; + discretisation bothPatches; + } + faces + ( + quad2D(DT1r, DT1l) + ); + } + + DTOUTLET + { + type patch; + faces + ( + quad2D(DT0l, DT0r) + ); + } + + DTCYCLIC1 + { + type cyclicGgi; + shadowPatch DTCYCLIC2; + zone DTCYCLIC1Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle 72; + separationOffset (0 0 0); + faces + ( + quad2D(DT1l, DT0l) + ); + } + + DTCYCLIC2 + { + type cyclicGgi; + shadowPatch DTCYCLIC1; + zone DTCYCLIC2Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle -72; + separationOffset (0 0 0); + faces + ( + quad2D(DT0r, DT1r) + ); + } + + DTHUB + { + type wall; + faces + ( + backQuad(DT0l, DT0r, DT1r, DT1l) + ); + } + + DTSHROUD + { + type wall; + faces + ( + frontQuad(DT0l, DT0r, DT1r, DT1l) + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/polyMesh/boundary b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/polyMesh/boundary new file mode 100644 index 000000000..5f07b38a0 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/polyMesh/boundary @@ -0,0 +1,205 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +19 +( + GVINLET + { + type patch; + nFaces 100; + startFace 11740; + } + GVOUTLET + { + type mixingPlane; + nFaces 100; + startFace 11840; + shadowPatch RUINLET; + zone GVOUTLETZone; + coordinateSystem + { + type cylindrical; + name mixingCS; + origin (0 0 0); + e1 (1 0 0); + e3 (0 0 1); + inDegrees true; + } + ribbonPatch + { + sweepAxis Theta; + stackAxis R; + discretisation bothPatches; + } + + } + GVCYCLIC + { + type cyclic; + nFaces 240; + startFace 11940; + featureCos 0.9; + transform rotational; + rotationAxis (0 0 1); + rotationCentre (0 0 0); + rotationAngle -72; + } + GVBLADE + { + type wall; + nFaces 200; + startFace 12180; + } + GVHUB + { + type wall; + nFaces 220; + startFace 12380; + } + GVSHROUD + { + type wall; + nFaces 220; + startFace 12600; + } + RUINLET + { + type mixingPlane; + nFaces 100; + startFace 12820; + shadowPatch GVOUTLET; + zone RUINLETZone; + } + RUOUTLET + { + type mixingPlane; + nFaces 100; + startFace 12920; + shadowPatch DTINLET; + zone RUOUTLETZone; + coordinateSystem + { + type cylindrical; + name mixingCS; + origin (0 0 0); + e1 (1 0 0); + e3 (0 0 1); + inDegrees true; + } + ribbonPatch + { + sweepAxis Theta; + stackAxis R; + discretisation bothPatches; + } + + } + RUCYCLIC1 + { + type cyclicGgi; + nFaces 40; + startFace 13020; + shadowPatch RUCYCLIC2; + zone RUCYCLIC1Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle 72; + separationOffset (0 0 0); + } + RUCYCLIC2 + { + type cyclicGgi; + nFaces 40; + startFace 13060; + shadowPatch RUCYCLIC1; + zone RUCYCLIC2Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle -72; + separationOffset (0 0 0); + } + RUBLADE + { + type wall; + nFaces 200; + startFace 13100; + } + RUHUB + { + type wall; + nFaces 140; + startFace 13300; + } + RUSHROUD + { + type wall; + nFaces 140; + startFace 13440; + } + DTINLET + { + type mixingPlane; + nFaces 100; + startFace 13580; + shadowPatch RUOUTLET; + zone DTINLETZone; + } + DTOUTLET + { + type patch; + nFaces 100; + startFace 13680; + } + DTCYCLIC1 + { + type cyclicGgi; + nFaces 70; + startFace 13780; + shadowPatch DTCYCLIC2; + zone DTCYCLIC1Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle 72; + separationOffset (0 0 0); + } + DTCYCLIC2 + { + type cyclicGgi; + nFaces 70; + startFace 13850; + shadowPatch DTCYCLIC1; + zone DTCYCLIC2Zone; + bridgeOverlap false; + rotationAxis (0 0 1); + rotationAngle -72; + separationOffset (0 0 0); + } + DTHUB + { + type wall; + nFaces 70; + startFace 13920; + } + DTSHROUD + { + type wall; + nFaces 70; + startFace 13990; + } +) + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/thermophysicalProperties b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/thermophysicalProperties new file mode 100644 index 000000000..9296d0e9d --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/thermophysicalProperties @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType hPsiThermo>>>>; + +mixture air 1 28.966 1006 0 1.8e-05 0.7; + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/transportProperties b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/transportProperties new file mode 100644 index 000000000..f815668fc --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/constant/transportProperties @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +transportModel Newtonian; + +nu nu [0 2 -1 0 0 0 0] 1e-05; + +CrossPowerLawCoeffs +{ + nu0 nu0 [0 2 -1 0 0 0 0] 1e-06; + nuInf nuInf [0 2 -1 0 0 0 0] 1e-06; + m m [0 0 1 0 0 0 0] 1; + n n [0 0 0 0 0 0 0] 1; +} + +BirdCarreauCoeffs +{ + nu0 nu0 [0 2 -1 0 0 0 0] 1e-06; + nuInf nuInf [0 2 -1 0 0 0 0] 1e-06; + k k [0 0 1 0 0 0 0] 0; + n n [0 0 0 0 0 0 0] 1; +} + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/T b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/T new file mode 100644 index 000000000..8e3300846 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/T @@ -0,0 +1,116 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 305.66; + +boundaryField +{ + GVINLET + { + type fixedValue; + value uniform 305.66; + } + GVOUTLET + { + type mixingPlaneEnthalpyJump; + patchType mixingPlane; + rotating false; + value uniform 305.66; + } + GVCYCLIC + { + type cyclic; + } + GVBLADE + { + type zeroGradient; + } + GVHUB + { + type zeroGradient; + } + GVSHROUD + { + type zeroGradient; + } + RUINLET + { + type mixingPlaneEnthalpyJump; + patchType mixingPlane; + rotating true; + value uniform 305.66; + } + RUOUTLET + { + type mixingPlaneEnthalpyJump; + patchType mixingPlane; + rotating true; + value uniform 305.66; + } + RUCYCLIC1 + { + type cyclicGgi; + } + RUCYCLIC2 + { + type cyclicGgi; + } + RUBLADE + { + type zeroGradient; + } + RUHUB + { + type zeroGradient; + } + RUSHROUD + { + type zeroGradient; + } + DTINLET + { + type mixingPlaneEnthalpyJump; + patchType mixingPlane; + rotating false; + value uniform 305.66; + } + DTOUTLET + { + type zeroGradient; + } + DTCYCLIC1 + { + type cyclicGgi; + } + DTCYCLIC2 + { + type cyclicGgi; + } + DTHUB + { + type zeroGradient; + } + DTSHROUD + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/U b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/U new file mode 100644 index 000000000..9b2d2f485 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/U @@ -0,0 +1,114 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0.1 0.1 -1); + +boundaryField +{ + GVINLET + { + type fixedValue; + value uniform (0 0 -1); + } + GVOUTLET + { + type mixingPlane; + value uniform (0 0 -1); + } + GVCYCLIC + { + type cyclic; + } + GVBLADE + { + type fixedValue; + value uniform (0 0 0); + } + GVHUB + { + type fixedValue; + value uniform (0 0 0); + } + GVSHROUD + { + type fixedValue; + value uniform (0 0 0); + } + RUINLET + { + type mixingPlane; + value uniform (0 0 -1); + } + RUOUTLET + { + type mixingPlane; + value uniform (0 0 -1); + } + RUCYCLIC1 + { + type cyclicGgi; + } + RUCYCLIC2 + { + type cyclicGgi; + } + RUBLADE + { + type fixedValue; + value uniform (0 0 0); + } + RUHUB + { + type fixedValue; + value uniform (0 0 0); + } + RUSHROUD + { + type fixedValue; + value uniform (0 0 0); + } + DTINLET + { + type mixingPlane; + value uniform (0 0 -1); + } + DTOUTLET + { + type zeroGradient; + } + DTCYCLIC1 + { + type cyclicGgi; + } + DTCYCLIC2 + { + type cyclicGgi; + } + DTHUB + { + type fixedValue; + value uniform (0 0 0); + } + DTSHROUD + { + type fixedValue; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/alphat b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/alphat new file mode 100644 index 000000000..051a6889e --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/alphat @@ -0,0 +1,130 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + GVINLET + { + type calculated; + value uniform 0; + } + GVOUTLET + { + type mixingPlane; + value uniform 0; + } + GVCYCLIC + { + type cyclic; + value uniform 0; + } + GVBLADE + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + GVHUB + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + GVSHROUD + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + RUINLET + { + type mixingPlane; + value uniform 0; + } + RUOUTLET + { + type mixingPlane; + value uniform 0; + } + RUCYCLIC1 + { + type cyclicGgi; + value uniform 0; + } + RUCYCLIC2 + { + type cyclicGgi; + value uniform 0; + } + RUBLADE + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + RUHUB + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + RUSHROUD + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + DTINLET + { + type mixingPlane; + value uniform 0; + } + DTOUTLET + { + type calculated; + value uniform 0; + } + DTCYCLIC1 + { + type cyclicGgi; + value uniform 0; + } + DTCYCLIC2 + { + type cyclicGgi; + value uniform 0; + } + DTHUB + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } + DTSHROUD + { + type alphatWallFunction; + Prt 0.85; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/epsilon b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/epsilon new file mode 100644 index 000000000..e6aa150b8 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/epsilon @@ -0,0 +1,153 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 14.855; + +boundaryField +{ + GVINLET + { + type fixedValue; + value uniform 14.855; + } + GVOUTLET + { + type mixingPlane; + value uniform 14.855; + } + GVCYCLIC + { + type cyclic; + value uniform 14.855; + } + GVBLADE + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + GVHUB + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + GVSHROUD + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + RUINLET + { + type mixingPlane; + value uniform 14.855; + } + RUOUTLET + { + type mixingPlane; + value uniform 14.855; + } + RUCYCLIC1 + { + type cyclicGgi; + value uniform 14.855; + } + RUCYCLIC2 + { + type cyclicGgi; + value uniform 14.855; + } + RUBLADE + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + RUHUB + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + RUSHROUD + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + DTINLET + { + type mixingPlane; + value uniform 14.855; + } + DTOUTLET + { + type zeroGradient; + } + DTCYCLIC1 + { + type cyclicGgi; + value uniform 14.855; + } + DTCYCLIC2 + { + type cyclicGgi; + value uniform 14.855; + } + DTHUB + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } + DTSHROUD + { + type compressible::epsilonWallFunction; + refValue uniform 0; + value uniform 14.855; + Cmu 0.09; + kappa 0.41; + E 9.8; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/i b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/i new file mode 100644 index 000000000..793c5fc5e --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/i @@ -0,0 +1,138 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "20"; + object i; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 307494; + +boundaryField +{ + GVINLET + { + type fixedEnthalpy; + value uniform 307494; + } + GVOUTLET + { + type mixingPlaneEnthalpyJump; + patchType mixingPlane; + rotating false; + value uniform 307494; + } + GVCYCLIC + { + type cyclic; + value uniform 307494; + } + GVBLADE + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307000; + } + GVHUB + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307494; + } + GVSHROUD + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307494; + } + RUINLET + { + type mixingPlaneEnthalpyJump; + patchType mixingPlane; + rotating true; + value uniform 307494; + } + RUOUTLET + { + type mixingPlaneEnthalpyJump; + patchType mixingPlane; + rotating true; + value uniform 307494; + } + RUCYCLIC1 + { + type cyclicGgi; + value uniform 307494; + } + RUCYCLIC2 + { + type cyclicGgi; + value uniform 307494; + } + RUBLADE + { + type gradientEnthalpy; + gradient uniform 307494; + } + RUHUB + { + type gradientEnthalpy; + gradient uniform 307494; + } + RUSHROUD + { + type gradientEnthalpy; + gradient uniform 307494; + + } + DTINLET + { + type mixingPlaneEnthalpyJump; + patchType mixingPlane; + rotating false; + value uniform 305.66; + } + DTOUTLET + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307494; + } + DTCYCLIC1 + { + type cyclicGgi; + value uniform 307494; + } + DTCYCLIC2 + { + type cyclicGgi; + value uniform 307494; + } + DTHUB + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307494; + + } + DTSHROUD + { + type gradientEnthalpy; + gradient uniform 0; + value uniform 307494; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/k b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/k new file mode 100644 index 000000000..d54ad70b2 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/k @@ -0,0 +1,121 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0.375; + +boundaryField +{ + GVINLET + { + type fixedValue; + value uniform 0.375; + } + GVOUTLET + { + type mixingPlane; + value uniform 0.375; + } + GVCYCLIC + { + type cyclic; + value uniform 0.375; + } + GVBLADE + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + GVHUB + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + GVSHROUD + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + RUINLET + { + type mixingPlane; + value uniform 0.375; + } + RUOUTLET + { + type mixingPlane; + value uniform 0.375; + } + RUCYCLIC1 + { + type cyclicGgi; + value uniform 0.375; + } + RUCYCLIC2 + { + type cyclicGgi; + value uniform 0.375; + } + RUBLADE + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + RUHUB + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + RUSHROUD + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + DTINLET + { + type mixingPlane; + value uniform 0.375; + } + DTOUTLET + { + type zeroGradient; + } + DTCYCLIC1 + { + type cyclicGgi; + value uniform 0.375; + } + DTCYCLIC2 + { + type cyclicGgi; + value uniform 0.375; + } + DTHUB + { + type compressible::kqRWallFunction; + value uniform 0.375; + } + DTSHROUD + { + type compressible::kqRWallFunction; + value uniform 0.375; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/mut b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/mut new file mode 100644 index 000000000..7e0188117 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/mut @@ -0,0 +1,146 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | For copyright notice see file Copyright | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object mut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + GVINLET + { + type calculated; + value uniform 0; + } + GVOUTLET + { + type mixingPlane; + value uniform 0; + } + GVCYCLIC + { + type cyclic; + value uniform 0; + } + GVBLADE + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + GVHUB + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + GVSHROUD + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + RUINLET + { + type mixingPlane; + value uniform 0; + } + RUOUTLET + { + type mixingPlane; + value uniform 0; + } + RUCYCLIC1 + { + type cyclicGgi; + value uniform 0; + } + RUCYCLIC2 + { + type cyclicGgi; + value uniform 0; + } + RUBLADE + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + RUHUB + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + RUSHROUD + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + DTINLET + { + type mixingPlane; + value uniform 0; + } + DTOUTLET + { + type calculated; + value uniform 0; + } + DTCYCLIC1 + { + type cyclicGgi; + value uniform 0; + } + DTCYCLIC2 + { + type cyclicGgi; + value uniform 0; + } + DTHUB + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + DTSHROUD + { + type mutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/p b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/p new file mode 100644 index 000000000..8531b9daa --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/save/p @@ -0,0 +1,106 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 100000; + +boundaryField +{ + GVINLET + { + type zeroGradient; + } + GVOUTLET + { + type mixingPlane; + value uniform 100000; + } + GVCYCLIC + { + type cyclic; + } + GVBLADE + { + type zeroGradient; + } + GVHUB + { + type zeroGradient; + } + GVSHROUD + { + type zeroGradient; + } + RUINLET + { + type mixingPlane; + value uniform 100000; + } + RUOUTLET + { + type mixingPlane; + value uniform 100000; + } + RUCYCLIC1 + { + type cyclicGgi; + } + RUCYCLIC2 + { + type cyclicGgi; + } + RUBLADE + { + type zeroGradient; + } + RUHUB + { + type zeroGradient; + } + RUSHROUD + { + type zeroGradient; + } + DTINLET + { + type mixingPlane; + value uniform 100000; + } + DTOUTLET + { + type fixedValue; + value uniform 100000; + } + DTCYCLIC1 + { + type cyclicGgi; + } + DTCYCLIC2 + { + type cyclicGgi; + } + DTHUB + { + type zeroGradient; + } + DTSHROUD + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/setBatchMixingPlane b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/setBatchMixingPlane new file mode 100644 index 000000000..5b5d6b459 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/setBatchMixingPlane @@ -0,0 +1,9 @@ +faceSet RUCYCLIC1Zone new patchToFace RUCYCLIC1 +faceSet RUCYCLIC2Zone new patchToFace RUCYCLIC2 +faceSet DTCYCLIC1Zone new patchToFace DTCYCLIC1 +faceSet DTCYCLIC2Zone new patchToFace DTCYCLIC2 +faceSet GVOUTLETZone new patchToFace GVOUTLET +faceSet RUINLETZone new patchToFace RUINLET +faceSet RUOUTLETZone new patchToFace RUOUTLET +faceSet DTINLETZone new patchToFace DTINLET +quit diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/system/controlDict b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/system/controlDict new file mode 100644 index 000000000..d96c07708 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/system/controlDict @@ -0,0 +1,75 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application steadyUniversalMRFFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 200; + +deltaT 1; + +writeControl timeStep; + +writeInterval 20; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 12; + +writeCompression compressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; +//libs ("libjumpFiniteVolume.so"); + +// Compute the flux value on each side of a GGI interface +functions +( + ggiCheck + { + // Type of functionObject + type ggiCheck; + + phi phi; + + // Where to load it from (if not already in solver) + functionObjectLibs ("libcheckFunctionObjects.so"); + } + // Compute the flux value on each side of a mixingPlane interface + mixingPlaneCheck + { + // Type of functionObject + type mixingPlaneCheck; + + phi phi; + + // Where to load it from (if not already in solver) + functionObjectLibs ("libcheckFunctionObjects.so"); + } +); + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/system/decomposeParDict b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/system/decomposeParDict new file mode 100644 index 000000000..3604ff59e --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/system/decomposeParDict @@ -0,0 +1,86 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 8; + +//method metis; +method patchConstrained; + +globalFaceZones +( + RUCYCLIC1Zone + RUINLETZone + RUCYCLIC2Zone + RUOUTLETZone + GVOUTLETZone + DTINLETZone + DTCYCLIC1Zone + DTCYCLIC2Zone +); + +patchConstrainedCoeffs +{ + method metis; + numberOfSubdomains 8; + patchConstraints + ( + (RUINLET 1) + (GVOUTLET 1) + (RUOUTLET 2) + (DTINLET 2) + ); +} + +simpleCoeffs +{ + n (2 2 1); + delta 0.001; +} + +hierarchicalCoeffs +{ + n (1 1 1); + delta 0.001; + order xyz; +} + +metisCoeffs +{ + processorWeights + ( + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + ); +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots +( +); + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/system/fvSchemes b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/system/fvSchemes new file mode 100644 index 000000000..268ba8029 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/system/fvSchemes @@ -0,0 +1,90 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.2 | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default steadyState; + +// ddt(rho,U) steadyInertial phi rho 0.25; + ddt(rho,h) steadyState; + ddt(rho,i) steadyState; +// ddt(rho,h) steadyInertial phi rho 0.25; + ddt(psi,p) steadyInertial phi rho 1; +// ddt(psi,p) steadyState; + + ddt(rho,k) steadyState; + ddt(rho,epsilon) steadyState; + + U steadyState; + T steadyState; + p steadyState; +} +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss upwind; + div(phi,h) Gauss upwind; + div(phi,i) Gauss upwind; + div(phid,p) Gauss upwind; + + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + + + div((muEff*dev2(T(grad(U))))) Gauss linear; + div((nuEff*dev(T(grad(U))))) Gauss linear; + div(U,p) Gauss upwind; + +} + +laplacianSchemes +{ + default Gauss linear limited 0.5; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default limited 0.5; +} + +fluxRequired +{ + default no; + p; +} + +mixingPlane +{ + default areaAveraging; + U areaAveraging; + k fluxAveraging; + omega areaAveraging; +} + + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/system/fvSchemes_old b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/system/fvSchemes_old new file mode 100644 index 000000000..82a1b4cd4 --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/system/fvSchemes_old @@ -0,0 +1,76 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default steadyState; +} + +gradSchemes +{ + default Gauss linear; + grad(p) Gauss linear; + grad(U) Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss limitedLinearV 1; + div(phi,k) Gauss limitedLinear 1; + div(phi,i) Gauss limitedLinear 1; + div(phid,p) Gauss limitedLinear 1; + div(phi,epsilon) Gauss limitedLinear 1; + div((nuEff*dev(grad(U).T()))) Gauss linear; + div((muEff*dev2(grad(U).T()))) Gauss linear; +} + +laplacianSchemes +{ + default none; + laplacian(nuEff,U) Gauss linear corrected; + laplacian((rho*(1|A(U))),p) Gauss linear corrected; + laplacian(DkEff,k) Gauss linear corrected; + laplacian(DepsilonEff,epsilon) Gauss linear corrected; + laplacian(muEff,U) Gauss linear corrected; + laplacian(alphaEff,i) Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; + interpolate(U) linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p; +} + +mixingPlane +{ + default areaAveraging; + //U fluxAveragingAdjustMassFlow; + //p zeroGradientAreaAveragingMix; +} + +// ************************************************************************* // diff --git a/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/system/fvSolution b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/system/fvSolution new file mode 100644 index 000000000..3a3b832ae --- /dev/null +++ b/tutorials/compressible/steadyUniversalMRFFoam/axialTurbineMixingPlane/system/fvSolution @@ -0,0 +1,107 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | foam-extend: Open Source CFD | +| \\ / O peration | Version: 3.2 | +| \\ / A nd | Web: http://www.foam-extend.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver BiCGStab; + preconditioner DILU; + tolerance 1e-8; + relTol 0.05; + } + U + { + solver smoothSolver; + smoother GaussSeidel; + nSweeps 2; + tolerance 1e-7; + relTol 0.1; + } + k + { + solver smoothSolver; + smoother GaussSeidel; + nSweeps 2; + tolerance 1e-7; + relTol 0.1; + } + epsilon + { + solver smoothSolver; + smoother GaussSeidel; + nSweeps 2; + tolerance 1e-7; + relTol 0.1; + } + T + { + solver smoothSolver; + smoother GaussSeidel; + nSweeps 2; + tolerance 1e-7; + relTol 0.1; + } + i + { + solver smoothSolver; + smoother GaussSeidel; + nSweeps 2; + tolerance 1e-7; + relTol 0.1; + } +} + +SIMPLE +{ + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; +} +PIMPLE +{ + nOuterCorrectors 1; + nCorrectors 1; + nNonOrthogonalCorrectors 0; + compressible yes; + convergence 1e-5; + +} + +relaxationFactors +{ + // Note: under-relaxation factors used in wave-transmissive schemes + U 0.1; + p 0.1; + h 0.1; + i 0.1; + rho 0.1; + T 0.1; + + k 0.1; + epsilon 0.1; +} + +fieldBounds +{ + p 50 1e8; + T 100 1000; + U 1000; + epsilon 0 1e6; +} + + +// ************************************************************************* //