From 70874860b95571b4b6a7542c5c5d9f45c4356661 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 12 Jun 2023 12:00:00 +0200 Subject: [PATCH 01/10] CONFIG: bump patch level for maintenance-v2212 --- META-INFO/api-info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/META-INFO/api-info b/META-INFO/api-info index 433789f6fe..17a42ef365 100644 --- a/META-INFO/api-info +++ b/META-INFO/api-info @@ -1,2 +1,2 @@ api=2212 -patch=230110 +patch=230612 From fbf00d6bf2893511d97e65fe048967938edae59e Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Mon, 26 Jun 2023 22:07:57 +0100 Subject: [PATCH 02/10] RELEASE: Updated version to v2306 --- etc/bashrc | 2 +- etc/cshrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/bashrc b/etc/bashrc index 02d084f060..857ffaa370 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -55,7 +55,7 @@ # [WM_PROJECT_VERSION] - A human-readable version name # A development version is often named 'com' - as in www.openfoam.com -export WM_PROJECT_VERSION=com +export WM_PROJECT_VERSION=v2306 #------------------------------------------------------------------------------ # Configuration environment variables. diff --git a/etc/cshrc b/etc/cshrc index 7f19beec7b..b294d99e79 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -55,7 +55,7 @@ # [WM_PROJECT_VERSION] - A human-readable version name # A development version is often named 'com' - as in www.openfoam.com -setenv WM_PROJECT_VERSION com +setenv WM_PROJECT_VERSION v2306 #------------------------------------------------------------------------------ # Configuration environment variables. From aff5c3b6803a3ea5f1efe050dc16611f78e2e860 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 3 Jul 2023 11:01:48 +0200 Subject: [PATCH 03/10] DOC: update links to source packs (#2927) --- doc/Build.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/Build.md b/doc/Build.md index 490a3c6c94..6c201777eb 100644 --- a/doc/Build.md +++ b/doc/Build.md @@ -1,23 +1,23 @@ ## Getting the code -Links to all code packs are available on https://dl.openfoam.com. For OpenFOAM-v2212: +Links to all code packs are available on https://dl.openfoam.com. For OpenFOAM-v2306: - https://dl.openfoam.com/source/latest/ -- Source: https://dl.openfoam.com/source/v2212/OpenFOAM-v2212.tgz -- ThirdParty: https://dl.openfoam.com/source/v2212/ThirdParty-v2212.tgz +- Source: https://dl.openfoam.com/source/v2306/OpenFOAM-v2306.tgz +- ThirdParty: https://dl.openfoam.com/source/v2306/ThirdParty-v2306.tgz ## OpenFOAM® Quick Build Guide Prior to building, ensure that the [system requirements][link openfoam-require] are satisfied (including any special [cross-compiling][wiki-cross-compile] considerations), and source the correct OpenFOAM environment. -For example, for the OpenFOAM-v2212 version: +For example, for the OpenFOAM-v2306 version: ``` -source /OpenFOAM-v2212/etc/bashrc +source /OpenFOAM-v2306/etc/bashrc ``` e.g. if installed under the `~/openfoam` directory ``` -source ~/openfoam/OpenFOAM-v2212/etc/bashrc +source ~/openfoam/OpenFOAM-v2306/etc/bashrc ``` @@ -157,4 +157,4 @@ More details in the [ThirdParty build guide][link third-build]. [wiki-config]: https://develop.openfoam.com/Development/openfoam/-/wikis/configuring --- -Copyright 2019-2022 OpenCFD Ltd +Copyright 2019-2023 OpenCFD Ltd From 1fc9313c97ff178bd0a141cfc2a6ea6198727678 Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Wed, 26 Jul 2023 15:36:25 +0100 Subject: [PATCH 04/10] BUG: Conservative AMI - use supplied points when resetting the AMI. See #2078 --- .../patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C | 4 ++-- .../mixerVesselAMI2D-topologyChange/system/fvSolution | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C index 89aa2fc668..1f080d9d00 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C @@ -383,8 +383,8 @@ void Foam::cyclicAMIPolyPatch::resetAMI(const UList& points) const } const cyclicAMIPolyPatch& nbr = neighbPatch(); - pointField srcPoints(localPoints()); - pointField nbrPoints(nbr.localPoints()); + const pointField srcPoints(points, meshPoints()); + pointField nbrPoints(points, nbr.meshPoints()); Info<< "AMI: Creating AMI for source:" << name() << " and target:" << nbr.name() << endl; diff --git a/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/system/fvSolution b/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/system/fvSolution index 1c25f4cbff..db8c83bf09 100644 --- a/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/system/fvSolution +++ b/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/system/fvSolution @@ -19,7 +19,7 @@ solvers "pcorr.*" { solver GAMG; - smoother GaussSeidel; + smoother DICGaussSeidel; cacheAgglomeration no; tolerance 0.02; relTol 0; From bd5021e31c1cb7e663e1ea25b8da13f565276df7 Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Wed, 26 Jul 2023 15:39:02 +0100 Subject: [PATCH 05/10] BUG: AMI - areaNormalisationMode now written to boundary file. Fixes #2949 --- .../AMIInterpolation/advancingFrontAMI/advancingFrontAMI.C | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/advancingFrontAMI/advancingFrontAMI.C b/src/meshTools/AMIInterpolation/AMIInterpolation/advancingFrontAMI/advancingFrontAMI.C index f835c6c70e..9a803ba08d 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/advancingFrontAMI/advancingFrontAMI.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/advancingFrontAMI/advancingFrontAMI.C @@ -614,6 +614,12 @@ void Foam::advancingFrontAMI::write(Ostream& os) const faceAreaIntersect::triangulationModeNames_[faceAreaIntersect::tmMesh], faceAreaIntersect::triangulationModeNames_[triMode_] ); + os.writeEntryIfDifferent + ( + "areaNormalisationMode", + areaNormalisationModeNames_[areaNormalisationMode::project], + areaNormalisationModeNames_[areaNormalisationMode_] + ); } From 286de9dde9f0ec1053a663609a3b02dd1087e8e8 Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Thu, 3 Aug 2023 18:13:39 +0100 Subject: [PATCH 06/10] BUG: filmPyrolysisRadiativeCoupledMixed - corrected field retrieval. See #2955 --- ...sRadiativeCoupledMixedFvPatchScalarField.C | 158 ++++++++++-------- ...sRadiativeCoupledMixedFvPatchScalarField.H | 2 + 2 files changed, 86 insertions(+), 74 deletions(-) diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C index c121f24042..4bdfc0c989 100644 --- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C +++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2017 OpenFOAM Foundation - Copyright (C) 2019-2020 OpenCFD Ltd. + Copyright (C) 2019-202i3 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -38,24 +38,22 @@ namespace Foam // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // const filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::filmModelType& -filmPyrolysisRadiativeCoupledMixedFvPatchScalarField:: -filmModel() const +filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::filmModel() const { - HashTable models - = db().time().lookupClass(); + const auto models = db().time().lookupClass(); + DynamicList modelNames(models.size()); forAllConstIters(models, iter) { - if (iter()->regionMesh().name() == filmRegionName_) + const auto& model = *(iter.val()); + const word& modelName = model.regionMesh().name(); + + if (modelName == filmRegionName_) { - return *iter(); + return model; } - } - DynamicList modelNames; - forAllConstIters(models, iter) - { - modelNames.append(iter()->regionMesh().name()); + modelNames.push_back(modelName); } FatalErrorInFunction @@ -69,24 +67,22 @@ filmModel() const const filmPyrolysisRadiativeCoupledMixedFvPatchScalarField:: pyrolysisModelType& -filmPyrolysisRadiativeCoupledMixedFvPatchScalarField:: -pyrModel() const +filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::pyrModel() const { - HashTable models = - db().time().lookupClass(); + const auto models = db().time().lookupClass(); + DynamicList modelNames(models.size()); forAllConstIters(models, iter) { - if (iter()->regionMesh().name() == pyrolysisRegionName_) + const auto& model = *(iter.val()); + const word& modelName = model.regionMesh().name(); + + if (modelName == pyrolysisRegionName_) { - return *iter(); + return model; } - } - DynamicList modelNames; - forAllConstIters(models, iter) - { - modelNames.append(iter()->regionMesh().name()); + modelNames.push_back(modelName); } FatalErrorInFunction @@ -233,13 +229,9 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::rmap { mixedFvPatchScalarField::rmap(ptf, addr); - const filmPyrolysisRadiativeCoupledMixedFvPatchScalarField& tiptf = - refCast - < - const filmPyrolysisRadiativeCoupledMixedFvPatchScalarField - >(ptf); + const auto& fpptf = refCast(ptf); - temperatureCoupledBase::rmap(tiptf, addr); + temperatureCoupledBase::rmap(fpptf, addr); } @@ -251,8 +243,7 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs() } // Get the coupling information from the mappedPatchBase - const mappedPatchBase& mpp = - refCast(patch().patch()); + const auto& mpp = refCast(patch().patch()); const label patchi = patch().index(); const label nbrPatchi = mpp.samplePolyPatch().index(); @@ -264,10 +255,7 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs() scalarField intFld(patchInternalField()); const auto& nbrField = - refCast - < - const filmPyrolysisRadiativeCoupledMixedFvPatchScalarField - > + refCast ( nbrPatch.lookupPatchField(TnbrName_) ); @@ -285,7 +273,7 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs() scalarField KDeltaNbr(nbrK*nbrPatch.deltaCoeffs()); mpp.distribute(KDeltaNbr); - scalarField myKDelta(K*patch().deltaCoeffs()); + const scalarField myKDelta(K*patch().deltaCoeffs()); scalarList Tfilm(patch().size(), Zero); scalarList htcwfilm(patch().size(), Zero); @@ -298,22 +286,78 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs() scalarField qr(patch().size(), Zero); label coupledPatchi = -1; + label filmPatchi = -1; if (pyrolysisRegionName_ == mesh.name()) { + // Working on the pyrolysis mesh + coupledPatchi = patchi; if (qrName_ != "none") { qr = nbrPatch.lookupPatchField(qrName_); mpp.distribute(qr); } + + filmPatchi = pyrolysis.nbrCoupledPatchID(film, coupledPatchi); + + const scalarField htcw(film.htcw().h()().boundaryField()[filmPatchi]); + + // Obtain htcw + htcwfilm = + pyrolysis.mapRegionPatchField + ( + film, + coupledPatchi, + filmPatchi, + htcw, + true + ); + + // Obtain Tfilm at the boundary through Ts. + // NOTE: Tf is not good as at the boundary it will retrieve Tp + const scalarField Ts(film.Ts().boundaryField()[filmPatchi]); + Tfilm = + pyrolysis.mapRegionPatchField + ( + film, + coupledPatchi, + filmPatchi, + Ts, + true + ); + + // Obtain delta + filmDelta = + pyrolysis.mapRegionPatchField + ( + film, + "deltaf", + coupledPatchi, + true + ); } else if (pyrolysis.primaryMesh().name() == mesh.name()) { + // Working on the primary mesh + coupledPatchi = nbrPatch.index(); if (qrName_ != "none") { qr = patch().lookupPatchField(qrName_); } + + filmPatchi = pyrolysis.nbrCoupledPatchID(film, coupledPatchi); + + htcwfilm = film.htcw().h()().boundaryField()[filmPatchi]; + film.toPrimary(filmPatchi, htcwfilm); + + // Obtain Tfilm at the boundary through Ts. + // NOTE: Tf is not good as at the boundary it will retrieve Tp + Tfilm = film.Ts().boundaryField()[filmPatchi]; + film.toPrimary(filmPatchi, Tfilm); + + filmDelta = film.delta().boundaryField()[filmPatchi]; + film.toPrimary(filmPatchi, filmDelta); } else { @@ -323,39 +367,8 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs() << exit(FatalError); } - const label filmPatchi = pyrolysis.nbrCoupledPatchID(film, coupledPatchi); - - const scalarField htcw(film.htcw().h()().boundaryField()[filmPatchi]); - - // Obtain htcw - htcwfilm = - pyrolysis.mapRegionPatchField - ( - film, - coupledPatchi, - filmPatchi, - htcw, - true - ); - - - // Obtain Tfilm at the boundary through Ts. - // NOTE: Tf is not good as at the boundary it will retrieve Tp - Tfilm = film.Ts().boundaryField()[filmPatchi]; - film.toPrimary(filmPatchi, Tfilm); - - // Obtain delta - filmDelta = - pyrolysis.mapRegionPatchField - ( - film, - "deltaf", - coupledPatchi, - true - ); - // Estimate wetness of the film (1: wet , 0: dry) - scalarField ratio + const scalarField ratio ( min ( @@ -368,14 +381,11 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs() ) ); - scalarField qConv(ratio*htcwfilm*(Tfilm - Tp)*convectiveScaling_); - - scalarField qRad((1.0 - ratio)*qr); - - scalarField alpha(KDeltaNbr - (qRad + qConv)/Tp); + const scalarField qConv(ratio*htcwfilm*(Tfilm - Tp)*convectiveScaling_); + const scalarField qRad((1.0 - ratio)*qr); + const scalarField alpha(KDeltaNbr - (qRad + qConv)/Tp); valueFraction() = alpha/(alpha + (1.0 - ratio)*myKDelta); - refValue() = ratio*Tfilm + (1.0 - ratio)*(KDeltaNbr*nbrIntFld)/alpha; mixedFvPatchScalarField::updateCoeffs(); diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.H b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.H index 66e0625638..36c92d4ccd 100644 --- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.H +++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.H @@ -110,6 +110,8 @@ public: typedef Foam::regionModels::pyrolysisModels::pyrolysisModel pyrolysisModelType; + typedef filmPyrolysisRadiativeCoupledMixedFvPatchScalarField myType; + private: From 61cd298928e29bbdd2e95afb9a3459f100b1f03a Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 5 Jul 2023 17:01:02 +0200 Subject: [PATCH 07/10] COMP: missing compilation of hostUncollated (fixes #2934) --- src/OpenFOAM/Make/files | 1 + 1 file changed, 1 insertion(+) diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files index 0edb074fde..0113c15ee6 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -24,6 +24,7 @@ $(fileOps)/fileOperation/fileOperationRanks.C $(fileOps)/fileOperation/fileOperationInitialise.C $(fileOps)/dummyFileOperation/dummyFileOperation.C $(fileOps)/uncollatedFileOperation/uncollatedFileOperation.C +$(fileOps)/uncollatedFileOperation/hostUncollatedFileOperation.C $(fileOps)/masterUncollatedFileOperation/masterUncollatedFileOperation.C $(fileOps)/collatedFileOperation/collatedFileOperation.C $(fileOps)/collatedFileOperation/hostCollatedFileOperation.C From 313b1f71f14657e3280550f4f819e53769232f62 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 30 Aug 2023 11:45:47 +0100 Subject: [PATCH 08/10] BUG: mapFields: incorrect patches. Fixes #2944. --- src/sampling/meshToMesh/meshToMeshTemplates.C | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sampling/meshToMesh/meshToMeshTemplates.C b/src/sampling/meshToMesh/meshToMeshTemplates.C index adde5edb2d..02c45eae93 100644 --- a/src/sampling/meshToMesh/meshToMeshTemplates.C +++ b/src/sampling/meshToMesh/meshToMeshTemplates.C @@ -834,15 +834,15 @@ Foam::meshToMesh::mapTgtToSrc label srcPatchi = srcPatchID_[i]; label tgtPatchi = tgtPatchID_[i]; - if (!srcPatchFields.set(tgtPatchi)) + if (!srcPatchFields.set(srcPatchi)) { srcPatchFields.set ( srcPatchi, fvPatchField::New ( - tgtBfld[srcPatchi], - srcMesh.boundary()[tgtPatchi], + tgtBfld[tgtPatchi], + srcMesh.boundary()[srcPatchi], DimensionedField::null(), directFvPatchFieldMapper ( From 8fe025cb8e5dda4e51228ae69bbf0e0838facccf Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 31 Aug 2023 14:03:57 +0100 Subject: [PATCH 09/10] BUG: snappyHexMesh: correct oppositeness checking. Fixes #2971 --- src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C index 4832b63339..8cd6708a15 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C @@ -1387,6 +1387,7 @@ Foam::label Foam::snappyRefineDriver::refinementInterfaceRefine ( face2i != facei && surfaceIndex[face2i] != -1 + && cutter.faceLevel(face2i) > cLevel ) { // Get outwards pointing normal From c423ebecc1cd1b4bb878e51705a59a1875d9d608 Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Thu, 12 Oct 2023 10:48:55 +0100 Subject: [PATCH 10/10] BUG: ConeInjection - corrected parallel restart. Fixes #2998 --- .../Kinematic/InjectionModel/ConeInjection/ConeInjection.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C index 59cc22beba..16a406fa7a 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C @@ -96,7 +96,7 @@ Foam::ConeInjection::ConeInjection this->coeffDict().subDict("sizeDistribution"), owner.rndGen() ) ), - nInjected_(this->parcelsAddedTotal()), + nInjected_(Pstream::master() ? this->parcelsAddedTotal() : 0), injectorOrder_(identity(positionAxis_.size())), tanVec1_(), tanVec2_() @@ -233,7 +233,7 @@ Foam::label Foam::ConeInjection::parcelsToInject const label targetParcels = ceil(positionAxis_.size()*parcelsPerInjector_*volumeFraction); - return targetParcels - nInjected_; + return targetParcels - returnReduce(nInjected_, sumOp