From 80d7fe97f0ce830c713f2efbfa1681b5777757dc Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@esi-group.com>
Date: Wed, 9 Apr 2025 15:43:41 +0200
Subject: [PATCH] TUT: clarify use of Antal parameters (#3353)

TUT: simplify example of coded motion solver
---
 .../constant/water/phaseProperties            |  4 +++-
 .../twistingColumn/constant/dynamicMeshDict   | 22 +++++++++----------
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/tutorials/heatTransfer/chtMultiRegionTwoPhaseEulerFoam/solidQuenching2D/constant/water/phaseProperties b/tutorials/heatTransfer/chtMultiRegionTwoPhaseEulerFoam/solidQuenching2D/constant/water/phaseProperties
index ba637ac600e..7d3da527277 100644
--- a/tutorials/heatTransfer/chtMultiRegionTwoPhaseEulerFoam/solidQuenching2D/constant/water/phaseProperties
+++ b/tutorials/heatTransfer/chtMultiRegionTwoPhaseEulerFoam/solidQuenching2D/constant/water/phaseProperties
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2412                                 |
+|  \\    /   O peration     | Version:  v2506                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -304,8 +304,10 @@ wallLubrication
     (gas in liquid)
     {
         type            Antal;
+        // Antal:
         Cw1             -0.01;
         Cw2             0.05;
+        // Frank:
         Cwc             10.0;
         Cwd             6.8;
         p               1.7;
diff --git a/tutorials/mesh/moveDynamicMesh/twistingColumn/constant/dynamicMeshDict b/tutorials/mesh/moveDynamicMesh/twistingColumn/constant/dynamicMeshDict
index 6a29a9039db..fd5f110facf 100644
--- a/tutorials/mesh/moveDynamicMesh/twistingColumn/constant/dynamicMeshDict
+++ b/tutorials/mesh/moveDynamicMesh/twistingColumn/constant/dynamicMeshDict
@@ -1,7 +1,7 @@
 /*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
-|  \\    /   O peration     | Version:  v2412                                 |
+|  \\    /   O peration     | Version:  v2506                                 |
 |   \\  /    A nd           | Website:  www.openfoam.com                      |
 |    \\/     M anipulation  |                                                 |
 \*---------------------------------------------------------------------------*/
@@ -29,7 +29,7 @@ localCode
     // Generate new set of points
     tmp<pointField> twistColumn
     (
-        const scalar& maxRotAngle,
+        const scalar maxRotAngle,
         const pointField& points
     )
     {
@@ -37,22 +37,22 @@ localCode
         auto& newPoints = tnewPoints.ref();
 
         const boundBox bb(points, true);
-        const scalar zMin = bb.min()[vector::Z];
-        const scalar zSpan = bb.span()[vector::Z];
+        const scalar zMin = bb.min().z();
+        const scalar zSpan = bb.span().z();
 
-        forAll(points, pointI)
+        for (auto& p : newPoints)
         {
-            const scalar x = points[pointI].component(0);
-            const scalar y = points[pointI].component(1);
-            const scalar z = points[pointI].component(2);
+            const scalar x = p.x();
+            const scalar y = p.y();
+            const scalar z = p.z();
 
             // Scale the angle by height
             const scalar localAngle = maxRotAngle*(z-zMin)/zSpan;
 
-            const scalar xr = x*cos(localAngle)-y*sin(localAngle);
-            const scalar yr = x*sin(localAngle)+y*cos(localAngle);
-            newPoints[pointI] = vector(xr, yr, z);
+            p.x() = x*cos(localAngle)-y*sin(localAngle);
+            p.y() = x*sin(localAngle)+y*cos(localAngle);
         }
+
         return tnewPoints;
     }
 #};
-- 
GitLab