TUT: clarify use of Antal parameters (#3353)

TUT: simplify example of coded motion solver
This commit is contained in:
Mark Olesen 2025-04-09 15:43:41 +02:00
parent b8a0706e72
commit 80d7fe97f0
2 changed files with 14 additions and 12 deletions

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\ /*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2412 | | \\ / O peration | Version: v2506 |
| \\ / A nd | Website: www.openfoam.com | | \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -304,8 +304,10 @@ wallLubrication
(gas in liquid) (gas in liquid)
{ {
type Antal; type Antal;
// Antal:
Cw1 -0.01; Cw1 -0.01;
Cw2 0.05; Cw2 0.05;
// Frank:
Cwc 10.0; Cwc 10.0;
Cwd 6.8; Cwd 6.8;
p 1.7; p 1.7;

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\ /*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2412 | | \\ / O peration | Version: v2506 |
| \\ / A nd | Website: www.openfoam.com | | \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -29,7 +29,7 @@ localCode
// Generate new set of points // Generate new set of points
tmp<pointField> twistColumn tmp<pointField> twistColumn
( (
const scalar& maxRotAngle, const scalar maxRotAngle,
const pointField& points const pointField& points
) )
{ {
@ -37,22 +37,22 @@ localCode
auto& newPoints = tnewPoints.ref(); auto& newPoints = tnewPoints.ref();
const boundBox bb(points, true); const boundBox bb(points, true);
const scalar zMin = bb.min()[vector::Z]; const scalar zMin = bb.min().z();
const scalar zSpan = bb.span()[vector::Z]; const scalar zSpan = bb.span().z();
forAll(points, pointI) for (auto& p : newPoints)
{ {
const scalar x = points[pointI].component(0); const scalar x = p.x();
const scalar y = points[pointI].component(1); const scalar y = p.y();
const scalar z = points[pointI].component(2); const scalar z = p.z();
// Scale the angle by height // Scale the angle by height
const scalar localAngle = maxRotAngle*(z-zMin)/zSpan; const scalar localAngle = maxRotAngle*(z-zMin)/zSpan;
const scalar xr = x*cos(localAngle)-y*sin(localAngle); p.x() = x*cos(localAngle)-y*sin(localAngle);
const scalar yr = x*sin(localAngle)+y*cos(localAngle); p.y() = x*sin(localAngle)+y*cos(localAngle);
newPoints[pointI] = vector(xr, yr, z);
} }
return tnewPoints; return tnewPoints;
} }
#}; #};