diff --git a/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.C b/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.C index f77ccd0bfab025e335af100897b4217c656b8fdc..185136b9e917eb003058f4531d227a5b477278a3 100644 --- a/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/SlicedGeometricField/SlicedGeometricField.C @@ -176,10 +176,11 @@ makeBoundary new SlicedPatchField<Type> ( p, - DimensionedField<Type, GeoMesh>::null(), - bField[patchi] + DimensionedField<Type, GeoMesh>::null() ) ); + + bf[patchi].UList<Type>::shallowCopy(bField[patchi]); } } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C index 2cee8c6914d49597167134ad218c6b2dc170db56..5136e354ee8bdebe1ecbc9ad2a4e34d4e027b04c 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C @@ -123,13 +123,13 @@ bool Foam::polyMesh::checkFaceOrthogonality reduce(severeNonOrth, sumOp<label>()); reduce(errorNonOrth, sumOp<label>()); - const scalar maxNonOrth = radToDeg(::acos(clamp(minDDotS, -1, 1))); - const scalar aveNonOrth = radToDeg(::acos(clamp(sumDDotS/nSummed, -1, 1))); - dictionary& meshDict = const_cast<dictionary&>(data().meshDict()); if (nSummed > 0) { + scalar maxNonOrth = radToDeg(::acos(clamp(minDDotS, -1, 1))); + scalar aveNonOrth = radToDeg(::acos(clamp(sumDDotS/nSummed, -1, 1))); + meshDict.set("maxNonOrth", maxNonOrth); meshDict.set("aveNonOrth", aveNonOrth); diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBaseI.H b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBaseI.H index 5c267312207a8c7a42e062827147202d080b6b6a..d4becd2851c1f3d0c487d25033c85df73879fb97 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBaseI.H +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBaseI.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2020-2021 OpenCFD Ltd. + Copyright (C) 2020-2021,2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -201,7 +201,10 @@ Foam::mappedPatchBase::updateSampleMeshTime() const { if (!updateSampleMeshTimePtr_) { - const auto& mesh = sampleMesh(); + // Note: explicitly register on our mesh instead of sampleMesh + // since otherwise the destructor might give problems since sampleMesh + // might have already been taken down before. + const auto& mesh = patch_.boundaryMesh().mesh(); updateSampleMeshTimePtr_.reset ( diff --git a/tutorials/compressible/rhoPimpleFoam/LES/pitzDaily/0/muTilda b/tutorials/compressible/rhoPimpleFoam/LES/pitzDaily/0/nuTilda similarity index 95% rename from tutorials/compressible/rhoPimpleFoam/LES/pitzDaily/0/muTilda rename to tutorials/compressible/rhoPimpleFoam/LES/pitzDaily/0/nuTilda index 9185a4ea39d1a5d586cbe99231422436bc753bf1..3f718252466fe6609680bd9e2b2a71729d9789b1 100644 --- a/tutorials/compressible/rhoPimpleFoam/LES/pitzDaily/0/muTilda +++ b/tutorials/compressible/rhoPimpleFoam/LES/pitzDaily/0/nuTilda @@ -10,11 +10,11 @@ FoamFile version 2.0; format ascii; class volScalarField; - object muTilda; + object nuTilda; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [1 -1 -1 0 0 0 0]; +dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; diff --git a/tutorials/compressible/rhoPimpleFoam/LES/pitzDaily/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/LES/pitzDaily/system/fvSchemes index 421332163edced07c575fdd622ee767fc664a964..5cb5eb6fd7e024e4c6c35d97e88406b253eb3075 100644 --- a/tutorials/compressible/rhoPimpleFoam/LES/pitzDaily/system/fvSchemes +++ b/tutorials/compressible/rhoPimpleFoam/LES/pitzDaily/system/fvSchemes @@ -36,7 +36,7 @@ divSchemes div(phi,k) Gauss limitedLinear 1; div(phi,B) Gauss limitedLinear 1; - div(phi,muTilda) Gauss limitedLinear 1; + div(phi,nuTilda) Gauss limitedLinear 1; div(B) Gauss linear; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; @@ -57,5 +57,9 @@ snGradSchemes default corrected; } +wallDist +{ + method meshWave; +} // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun.pre b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun.pre index 03f7254cf24e63fd7ac8c0a882dfc69a4c1f801b..3f6ac683133f41d6736859191dfb2f523a58d4e8 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun.pre +++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun.pre @@ -13,8 +13,8 @@ rm -rf 0/domain3 constant/domain3 system/domain3 # Remove fluid fields from solid regions (important for post-processing) for region in $(foamListRegions solid) do - rm -f 0/$region/{rho,mut,alphat,epsilon,k,U,p_rgh,qr,G,IDefault} - rm -f processor*/0/$region/{rho,mut,alphat,epsilon,k,U,p_rgh,qr,G,IDefault} + rm -f 0/$region/{rho,nut,alphat,epsilon,k,U,p_rgh,qr,G,IDefault} + rm -f processor*/0/$region/{rho,nut,alphat,epsilon,k,U,p_rgh,qr,G,IDefault} done # Set the initial fields diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/solarBeamWithTrees/Allrun.pre b/tutorials/heatTransfer/chtMultiRegionFoam/solarBeamWithTrees/Allrun.pre index e013b5fb06c73277cda729519edeabce0b5d185c..1ca5a5bad86b1dd4def5275a0585131a00632c8b 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/solarBeamWithTrees/Allrun.pre +++ b/tutorials/heatTransfer/chtMultiRegionFoam/solarBeamWithTrees/Allrun.pre @@ -15,8 +15,8 @@ rm -rf 0/domain3 constant/domain3 system/domain3 # Remove fluid fields from solid regions (important for post-processing) for region in $(foamListRegions solid) do - rm -f 0/"$region"/{rho,mut,alphat,epsilon,k,U,p_rgh,qr,G,IDefault} - rm -f processor*/0/"$region"/{rho,mut,alphat,epsilon,k,U,p_rgh,qr,G,IDefault} + rm -f 0/"$region"/{rho,nut,alphat,epsilon,k,U,p_rgh,qr,G,IDefault} + rm -f processor*/0/"$region"/{rho,nut,alphat,epsilon,k,U,p_rgh,qr,G,IDefault} done # Set the initial fields diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/0.orig/cabin/mut b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/0.orig/cabin/mut deleted file mode 100644 index 80a787164c4ee1b00acb69abf89b23c4bfe7bd59..0000000000000000000000000000000000000000 --- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/0.orig/cabin/mut +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2312 | -| \\ / A nd | Website: www.openfoam.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format binary; - class volScalarField; - object mut; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [1 -1 -1 0 0 0 0]; - -internalField uniform 0; - -boundaryField -{ - inlet - { - type calculated; - value uniform 0; - } - - outlet - { - type calculated; - value uniform 0; - } - - symmetry - { - type symmetryPlane; - } - - walls - { - type mutkWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0; - } - - cabin_to_ice - { - type mutkWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0; - } -} - - -// ************************************************************************* //