From 2cf966de89d98098a90ffc9620c6fc1159d75fea Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Thu, 9 Feb 2023 15:31:07 +0000 Subject: [PATCH] tutorials: Examples of mapFieldsPar usage Two pitzDaily variants have been added; pitzDailySteadyMappedToPart, and pitzDailySteadyMappedToRefined. These demonstrate usage of workflows which involve mapping between cases with mapFieldsPar. The pitzDailySteadyMappedToPart case demonstrates mapping onto a small section of the mesh; in this case in the vicinity of the the corner of the backstep. This mesh is not consistent with the source data, so fields are required in the zero directory and cutting patches are used to specify the properties at the inlets. The pitzDailySteadyMappedToRefined case demonstrates mapping onto a geometrically similar case with a different mesh density. This mesh is consistent with the source, so no fields are needed and no cutting patches are used. This case does, however, perturb the geometry of the block mesh a bit, so that some of the refined case is not overlapping the original case. This provides a test of the stabilisation procedures within the mesh-to-mesh mapping functions. --- .../0/U | 0 .../0/k | 0 .../0/nuTilda | 0 .../0/nut | 0 .../0/p | 0 .../constant/momentumTransport | 0 .../constant/physicalProperties | 0 .../system/blockMeshDict | 0 .../system/controlDict | 0 .../system/decomposeParDict | 0 .../system/fvSchemes | 0 .../system/fvSolution | 0 .../0/U | 0 .../0/epsilon | 0 .../0/k | 0 .../0/nuTilda | 0 .../0/nut | 0 .../0/p | 0 .../Allrun | 0 .../constant/boundaryData/inlet/0/U | 0 .../constant/boundaryData/inlet/0/epsilon | 0 .../constant/boundaryData/inlet/0/k | 0 .../constant/boundaryData/inlet/points | 0 .../constant/momentumTransport | 0 .../constant/physicalProperties | 0 .../system/controlDict | 0 .../system/decomposeParDict | 0 .../system/fvSchemes | 0 .../system/fvSolution | 0 .../pitzDailySteadyMappedToPart/0/U.orig | 43 ++++++++++ .../0/epsilon.orig | 46 ++++++++++ .../pitzDailySteadyMappedToPart/0/k.orig | 46 ++++++++++ .../pitzDailySteadyMappedToPart/0/nut.orig | 45 ++++++++++ .../pitzDailySteadyMappedToPart/0/p.orig | 43 ++++++++++ .../pitzDailySteadyMappedToPart/Allclean | 9 ++ .../pitzDailySteadyMappedToPart/Allrun | 1 + .../Allrun-parallel | 46 ++++++++++ .../pitzDailySteadyMappedToPart/Allrun-serial | 39 +++++++++ .../system/blockMeshDict | 85 +++++++++++++++++++ .../system/decomposeParDict | 20 +++++ .../system/mapFieldsDict | 20 +++++ .../pitzDailySteadyMappedToRefined/Allclean | 11 +++ .../pitzDailySteadyMappedToRefined/Allmesh | 30 +++++++ .../pitzDailySteadyMappedToRefined/Allrun | 1 + .../Allrun-parallel | 35 ++++++++ .../Allrun-serial | 28 ++++++ .../system/decomposeParDict | 20 +++++ 47 files changed, 568 insertions(+) rename tutorials/modules/incompressibleFluid/{pitzDailyMapped => pitzDailyLESDevelopedInlet}/0/U (100%) rename tutorials/modules/incompressibleFluid/{pitzDailyMapped => pitzDailyLESDevelopedInlet}/0/k (100%) rename tutorials/modules/incompressibleFluid/{pitzDailyMapped => pitzDailyLESDevelopedInlet}/0/nuTilda (100%) rename tutorials/modules/incompressibleFluid/{pitzDailyMapped => pitzDailyLESDevelopedInlet}/0/nut (100%) rename tutorials/modules/incompressibleFluid/{pitzDailyMapped => pitzDailyLESDevelopedInlet}/0/p (100%) rename tutorials/modules/incompressibleFluid/{pitzDailyMapped => pitzDailyLESDevelopedInlet}/constant/momentumTransport (100%) rename tutorials/modules/incompressibleFluid/{pitzDailyMapped => pitzDailyLESDevelopedInlet}/constant/physicalProperties (100%) rename tutorials/modules/incompressibleFluid/{pitzDailyMapped => pitzDailyLESDevelopedInlet}/system/blockMeshDict (100%) rename tutorials/modules/incompressibleFluid/{pitzDailyMapped => pitzDailyLESDevelopedInlet}/system/controlDict (100%) rename tutorials/modules/incompressibleFluid/{pitzDailyMapped => pitzDailyLESDevelopedInlet}/system/decomposeParDict (100%) rename tutorials/modules/incompressibleFluid/{pitzDailyMapped => pitzDailyLESDevelopedInlet}/system/fvSchemes (100%) rename tutorials/modules/incompressibleFluid/{pitzDailyMapped => pitzDailyLESDevelopedInlet}/system/fvSolution (100%) rename tutorials/modules/incompressibleFluid/{pitzDailySteadyExptInlet => pitzDailySteadyExperimentalInlet}/0/U (100%) rename tutorials/modules/incompressibleFluid/{pitzDailySteadyExptInlet => pitzDailySteadyExperimentalInlet}/0/epsilon (100%) rename tutorials/modules/incompressibleFluid/{pitzDailySteadyExptInlet => pitzDailySteadyExperimentalInlet}/0/k (100%) rename tutorials/modules/incompressibleFluid/{pitzDailySteadyExptInlet => pitzDailySteadyExperimentalInlet}/0/nuTilda (100%) rename tutorials/modules/incompressibleFluid/{pitzDailySteadyExptInlet => pitzDailySteadyExperimentalInlet}/0/nut (100%) rename tutorials/modules/incompressibleFluid/{pitzDailySteadyExptInlet => pitzDailySteadyExperimentalInlet}/0/p (100%) rename tutorials/modules/incompressibleFluid/{pitzDailySteadyExptInlet => pitzDailySteadyExperimentalInlet}/Allrun (100%) rename tutorials/modules/incompressibleFluid/{pitzDailySteadyExptInlet => pitzDailySteadyExperimentalInlet}/constant/boundaryData/inlet/0/U (100%) rename tutorials/modules/incompressibleFluid/{pitzDailySteadyExptInlet => pitzDailySteadyExperimentalInlet}/constant/boundaryData/inlet/0/epsilon (100%) rename tutorials/modules/incompressibleFluid/{pitzDailySteadyExptInlet => pitzDailySteadyExperimentalInlet}/constant/boundaryData/inlet/0/k (100%) rename tutorials/modules/incompressibleFluid/{pitzDailySteadyExptInlet => pitzDailySteadyExperimentalInlet}/constant/boundaryData/inlet/points (100%) rename tutorials/modules/incompressibleFluid/{pitzDailySteadyExptInlet => pitzDailySteadyExperimentalInlet}/constant/momentumTransport (100%) rename tutorials/modules/incompressibleFluid/{pitzDailySteadyExptInlet => pitzDailySteadyExperimentalInlet}/constant/physicalProperties (100%) rename tutorials/modules/incompressibleFluid/{pitzDailySteadyExptInlet => pitzDailySteadyExperimentalInlet}/system/controlDict (100%) rename tutorials/modules/incompressibleFluid/{pitzDailySteadyExptInlet => pitzDailySteadyExperimentalInlet}/system/decomposeParDict (100%) rename tutorials/modules/incompressibleFluid/{pitzDailySteadyExptInlet => pitzDailySteadyExperimentalInlet}/system/fvSchemes (100%) rename tutorials/modules/incompressibleFluid/{pitzDailySteadyExptInlet => pitzDailySteadyExperimentalInlet}/system/fvSolution (100%) create mode 100644 tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/0/U.orig create mode 100644 tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/0/epsilon.orig create mode 100644 tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/0/k.orig create mode 100644 tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/0/nut.orig create mode 100644 tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/0/p.orig create mode 100755 tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/Allclean create mode 120000 tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/Allrun create mode 100755 tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/Allrun-parallel create mode 100755 tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/Allrun-serial create mode 100644 tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/system/blockMeshDict create mode 100644 tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/system/decomposeParDict create mode 100644 tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/system/mapFieldsDict create mode 100755 tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/Allclean create mode 100755 tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/Allmesh create mode 120000 tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/Allrun create mode 100755 tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/Allrun-parallel create mode 100755 tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/Allrun-serial create mode 100644 tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/system/decomposeParDict diff --git a/tutorials/modules/incompressibleFluid/pitzDailyMapped/0/U b/tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/0/U similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailyMapped/0/U rename to tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/0/U diff --git a/tutorials/modules/incompressibleFluid/pitzDailyMapped/0/k b/tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/0/k similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailyMapped/0/k rename to tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/0/k diff --git a/tutorials/modules/incompressibleFluid/pitzDailyMapped/0/nuTilda b/tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/0/nuTilda similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailyMapped/0/nuTilda rename to tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/0/nuTilda diff --git a/tutorials/modules/incompressibleFluid/pitzDailyMapped/0/nut b/tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/0/nut similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailyMapped/0/nut rename to tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/0/nut diff --git a/tutorials/modules/incompressibleFluid/pitzDailyMapped/0/p b/tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/0/p similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailyMapped/0/p rename to tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/0/p diff --git a/tutorials/modules/incompressibleFluid/pitzDailyMapped/constant/momentumTransport b/tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/constant/momentumTransport similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailyMapped/constant/momentumTransport rename to tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/constant/momentumTransport diff --git a/tutorials/modules/incompressibleFluid/pitzDailyMapped/constant/physicalProperties b/tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/constant/physicalProperties similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailyMapped/constant/physicalProperties rename to tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/constant/physicalProperties diff --git a/tutorials/modules/incompressibleFluid/pitzDailyMapped/system/blockMeshDict b/tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/system/blockMeshDict similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailyMapped/system/blockMeshDict rename to tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/system/blockMeshDict diff --git a/tutorials/modules/incompressibleFluid/pitzDailyMapped/system/controlDict b/tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/system/controlDict similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailyMapped/system/controlDict rename to tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/system/controlDict diff --git a/tutorials/modules/incompressibleFluid/pitzDailyMapped/system/decomposeParDict b/tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/system/decomposeParDict similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailyMapped/system/decomposeParDict rename to tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/system/decomposeParDict diff --git a/tutorials/modules/incompressibleFluid/pitzDailyMapped/system/fvSchemes b/tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/system/fvSchemes similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailyMapped/system/fvSchemes rename to tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/system/fvSchemes diff --git a/tutorials/modules/incompressibleFluid/pitzDailyMapped/system/fvSolution b/tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/system/fvSolution similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailyMapped/system/fvSolution rename to tutorials/modules/incompressibleFluid/pitzDailyLESDevelopedInlet/system/fvSolution diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/0/U b/tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/0/U similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/0/U rename to tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/0/U diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/0/epsilon b/tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/0/epsilon similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/0/epsilon rename to tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/0/epsilon diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/0/k b/tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/0/k similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/0/k rename to tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/0/k diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/0/nuTilda b/tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/0/nuTilda similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/0/nuTilda rename to tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/0/nuTilda diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/0/nut b/tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/0/nut similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/0/nut rename to tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/0/nut diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/0/p b/tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/0/p similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/0/p rename to tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/0/p diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/Allrun b/tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/Allrun similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/Allrun rename to tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/Allrun diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/constant/boundaryData/inlet/0/U b/tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/constant/boundaryData/inlet/0/U similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/constant/boundaryData/inlet/0/U rename to tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/constant/boundaryData/inlet/0/U diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/constant/boundaryData/inlet/0/epsilon b/tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/constant/boundaryData/inlet/0/epsilon similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/constant/boundaryData/inlet/0/epsilon rename to tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/constant/boundaryData/inlet/0/epsilon diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/constant/boundaryData/inlet/0/k b/tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/constant/boundaryData/inlet/0/k similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/constant/boundaryData/inlet/0/k rename to tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/constant/boundaryData/inlet/0/k diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/constant/boundaryData/inlet/points b/tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/constant/boundaryData/inlet/points similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/constant/boundaryData/inlet/points rename to tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/constant/boundaryData/inlet/points diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/constant/momentumTransport b/tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/constant/momentumTransport similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/constant/momentumTransport rename to tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/constant/momentumTransport diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/constant/physicalProperties b/tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/constant/physicalProperties similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/constant/physicalProperties rename to tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/constant/physicalProperties diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/system/controlDict b/tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/system/controlDict similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/system/controlDict rename to tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/system/controlDict diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/system/decomposeParDict b/tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/system/decomposeParDict similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/system/decomposeParDict rename to tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/system/decomposeParDict diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/system/fvSchemes b/tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/system/fvSchemes similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/system/fvSchemes rename to tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/system/fvSchemes diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/system/fvSolution b/tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/system/fvSolution similarity index 100% rename from tutorials/modules/incompressibleFluid/pitzDailySteadyExptInlet/system/fvSolution rename to tutorials/modules/incompressibleFluid/pitzDailySteadyExperimentalInlet/system/fvSolution diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/0/U.orig b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/0/U.orig new file mode 100644 index 0000000000..13ce46a6d7 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/0/U.orig @@ -0,0 +1,43 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + cutIn + { + type fixedValue; + value $internalField; + } + cutOut + { + type pressureInletOutletVelocity; + value $internalField; + } + lowerWall + { + type noSlip; + } + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/0/epsilon.orig b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/0/epsilon.orig new file mode 100644 index 0000000000..9f60e89ca6 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/0/epsilon.orig @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 14.855; + +boundaryField +{ + cutIn + { + type fixedValue; + value $internalField; + } + cutOut + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + lowerWall + { + type epsilonWallFunction; + value $internalField; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/0/k.orig b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/0/k.orig new file mode 100644 index 0000000000..54bff1fc53 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/0/k.orig @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0.375; + +boundaryField +{ + cutIn + { + type fixedValue; + value $internalField; + } + cutOut + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + lowerWall + { + type kqRWallFunction; + value $internalField; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/0/nut.orig b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/0/nut.orig new file mode 100644 index 0000000000..5a5bb56915 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/0/nut.orig @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + cutIn + { + type calculated; + value $internalField; + } + cutOut + { + type calculated; + value $internalField; + } + lowerWall + { + type nutkWallFunction; + value $internalField; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/0/p.orig b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/0/p.orig new file mode 100644 index 0000000000..9c6acaf4f5 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/0/p.orig @@ -0,0 +1,43 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + location "0"; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + cutIn + { + type zeroGradient; + } + cutOut + { + type entrainmentPressure; + p0 $internalField; + value $internalField; + } + lowerWall + { + type zeroGradient; + } + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/Allclean b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/Allclean new file mode 100755 index 0000000000..204f58f154 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/Allclean @@ -0,0 +1,9 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase && rm -rf pitzDailySteady constant system/controlDict system/fv* + +#------------------------------------------------------------------------------ diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/Allrun b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/Allrun new file mode 120000 index 0000000000..f8f6fb5227 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/Allrun @@ -0,0 +1 @@ +Allrun-parallel \ No newline at end of file diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/Allrun-parallel b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/Allrun-parallel new file mode 100755 index 0000000000..baf5dae9c9 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/Allrun-parallel @@ -0,0 +1,46 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run and clean functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +# Copy the source case +isTest "$@" && path=.. || path=$FOAM_TUTORIALS/modules/incompressibleFluid +cp -r $path/pitzDailySteady/constant . +cp -r $path/pitzDailySteady/system/controlDict system +cp -r $path/pitzDailySteady/system/fv* system +cp -r $path/pitzDailySteady . + +# Run the source case in parallel +( + cd pitzDailySteady + isTest "$@" && cleanCase + cp ../system/decomposeParDict system + runApplication blockMesh -dict $FOAM_TUTORIALS/resources/blockMesh/pitzDaily + runApplication decomposePar + runParallel foamRun +) + +# Mesh +runApplication blockMesh +runApplication decomposePar + +# Map from the source case into this case and run in parallel +# +# !!! Smooth interpolative mapping from a coarse to a fine case is not +# available within mapFieldsPar. All current options create fields with step +# changes at the boundaries between coarse source cells. This poor +# initialisation results in a large transient at the start of the part +# simulation. We need a lot of under-relaxation to overcome this. In future, it +# is desired to introduce smooth interpolative mapping, which should resolve +# this issue and the need for additional under-relaxation. +# +runParallel mapFieldsPar pitzDailySteady -sourceTime latestTime -fields "(epsilon k nut p U)" +runApplication foamDictionary system/fvSolution -entry relaxationFactors/equations -set '{ ".*" 0.1; }' +runParallel foamRun + +# Reconstruct, including the values mapped to the zero directory +runApplication reconstructPar -withZero + +#------------------------------------------------------------------------------ diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/Allrun-serial b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/Allrun-serial new file mode 100755 index 0000000000..d2ef23cf99 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/Allrun-serial @@ -0,0 +1,39 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run and clean functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +# Copy the source case +isTest "$@" && path=.. || path=$FOAM_TUTORIALS/modules/incompressibleFluid +cp -r $path/pitzDailySteady/constant . +cp -r $path/pitzDailySteady/system/controlDict system +cp -r $path/pitzDailySteady/system/fv* system +cp -r $path/pitzDailySteady . + +# Run the source case +( + cd pitzDailySteady + isTest "$@" && cleanCase + ./Allrun +) + +# Mesh +runApplication blockMesh + +# Map from the source case into this case and run +# +# !!! Smooth interpolative mapping from a coarse to a fine case is not +# available within mapFieldsPar. All current options create fields with step +# changes at the boundaries between coarse source cells. This poor +# initialisation results in a large transient at the start of the part +# simulation. We need a lot of under-relaxation to overcome this. In future, it +# is desired to introduce smooth interpolative mapping, which should resolve +# this issue and the need for additional under-relaxation. +# +runApplication mapFieldsPar pitzDailySteady -sourceTime latestTime -fields "(epsilon k nut p U)" +runApplication foamDictionary system/fvSolution -entry relaxationFactors/equations -set '{ ".*" 0.1; }' +runApplication foamRun + +#------------------------------------------------------------------------------ diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/system/blockMeshDict b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/system/blockMeshDict new file mode 100644 index 0000000000..ca3ce122d1 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/system/blockMeshDict @@ -0,0 +1,85 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.001; + +vertices +( + (-2 0 -0.5) + (-2 1 -0.5) + (0 -1 -0.5) + (0 0 -0.5) + (0 1 -0.5) + (2 -1 -0.5) + (2 0 -0.5) + (2 1 -0.5) + + (-2 0 0.5) + (-2 1 0.5) + (0 -1 0.5) + (0 0 0.5) + (0 1 0.5) + (2 -1 0.5) + (2 0 0.5) + (2 1 0.5) +); + +blocks +( + hex (0 3 4 1 8 11 12 9) (30 40 1) simpleGrading (0.2 5 1) + hex (2 5 6 3 10 13 14 11) (30 40 1) simpleGrading (5 0.2 1) + hex (3 6 7 4 11 14 15 12) (30 40 1) simpleGrading (5 5 1) +); + +defaultPatch +{ + name frontAndBack; + type empty; +} + +boundary +( + lowerWall + { + type wall; + faces + ( + (0 3 11 8) + (3 2 10 11) + ); + } + cutIn + { + type patch; + faces + ( + (0 1 9 8) + (2 5 13 10) + ); + } + cutOut + { + type patch; + faces + ( + (1 4 12 9) + (4 7 15 12) + (5 6 14 13) + (6 7 15 14) + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/system/decomposeParDict b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/system/decomposeParDict new file mode 100644 index 0000000000..f963d34548 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/system/decomposeParDict @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method scotch; + +// ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/system/mapFieldsDict b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/system/mapFieldsDict new file mode 100644 index 0000000000..c84ed818df --- /dev/null +++ b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToPart/system/mapFieldsDict @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object mapFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +patchMap (lowerWall lowerWall); + +cuttingPatches (cutIn); + +// ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/Allclean b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/Allclean new file mode 100755 index 0000000000..f8b27ed740 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/Allclean @@ -0,0 +1,11 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase && rm -rf pitzDailySteady 0 constant + +find system -type f -not -name decomposeParDict -delete + +#------------------------------------------------------------------------------ diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/Allmesh b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/Allmesh new file mode 100755 index 0000000000..c833d9cec9 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/Allmesh @@ -0,0 +1,30 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Get the standard mesh dictionary +cp -f $FOAM_TUTORIALS/resources/blockMesh/pitzDaily system + +# Decrease the mesh spacings by a factor +factor=5/4 +for nX in 18 180 25 +do + for nY in 27 30 + do + nXYZ0="($nX $nY 1)" + nXYZ1="($(echo $nX*$factor | bc) $(echo $nY*$factor | bc) 1)" + sed -i "s/$nXYZ0/$nXYZ1/g" system/blockMeshDict + done +done + +# Create a slightly inconsistent geometry, with some cells and patch faces +# falling outside the source case. This tests the stabilisation of the +# mesh-to-mesh interpolations. +sed -i 's/(0 0 \(.*\))/(-1.2 0 \1)/g' system/blockMeshDict + +# Mesh +runApplication blockMesh + +#------------------------------------------------------------------------------ diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/Allrun b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/Allrun new file mode 120000 index 0000000000..f8f6fb5227 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/Allrun @@ -0,0 +1 @@ +Allrun-parallel \ No newline at end of file diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/Allrun-parallel b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/Allrun-parallel new file mode 100755 index 0000000000..bbbb2b70c9 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/Allrun-parallel @@ -0,0 +1,35 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run and clean functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +# Copy the source case +isTest "$@" && path=.. || path=$FOAM_TUTORIALS/modules/incompressibleFluid +cp -r $path/pitzDailySteady/constant . +cp -r $path/pitzDailySteady/system/* system +cp -r $path/pitzDailySteady . + +# Run the source case in parallel +( + cd pitzDailySteady + isTest "$@" && cleanCase + cp ../system/decomposeParDict system + runApplication blockMesh -dict $FOAM_TUTORIALS/resources/blockMesh/pitzDaily + runApplication decomposePar + runParallel foamRun +) + +# Mesh +./Allmesh +runApplication decomposePar + +# Map from the source case into this case and run +runParallel mapFieldsPar pitzDailySteady -consistent -sourceTime latestTime +runParallel foamRun + +# Reconstruct, including the values mapped to the zero directory +runApplication reconstructPar -withZero + +#------------------------------------------------------------------------------ diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/Allrun-serial b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/Allrun-serial new file mode 100755 index 0000000000..57c8136216 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/Allrun-serial @@ -0,0 +1,28 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run and clean functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +# Copy the source case +isTest "$@" && path=.. || path=$FOAM_TUTORIALS/modules/incompressibleFluid +cp -r $path/pitzDailySteady/constant . +cp -r $path/pitzDailySteady/system/* system +cp -r $path/pitzDailySteady . + +# Run the source case +( + cd pitzDailySteady + isTest "$@" && cleanCase + ./Allrun +) + +# Mesh +./Allmesh + +# Map from the source case into this case and run +runApplication mapFieldsPar pitzDailySteady -consistent -sourceTime latestTime +runApplication foamRun + +#------------------------------------------------------------------------------ diff --git a/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/system/decomposeParDict b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/system/decomposeParDict new file mode 100644 index 0000000000..f963d34548 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/pitzDailySteadyMappedToRefined/system/decomposeParDict @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method scotch; + +// ************************************************************************* //