From c49d95f9485f1174876e39d4bef07e2f9553c31b Mon Sep 17 00:00:00 2001
From: Felix <feh7@hi.is>
Date: Sat, 24 Apr 2021 13:30:36 +0000
Subject: [PATCH] Aref calculated with parameters

---
 openfoam2012/freeCylinderFlow/parameters                      | 2 ++
 openfoam2012/freeCylinderFlow/system/blockMeshDict            | 4 ++--
 .../freeCylinderFlow/system/forceCoeffsIncompressible         | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/openfoam2012/freeCylinderFlow/parameters b/openfoam2012/freeCylinderFlow/parameters
index 72ae222..7cae1d8 100644
--- a/openfoam2012/freeCylinderFlow/parameters
+++ b/openfoam2012/freeCylinderFlow/parameters
@@ -3,3 +3,5 @@ inVelocity 10;
 Tinf 300;
 Tw 310;
 Pr_t 1;
+thickness 1;
+radius 1;
diff --git a/openfoam2012/freeCylinderFlow/system/blockMeshDict b/openfoam2012/freeCylinderFlow/system/blockMeshDict
index b1e3ecb..1c0059c 100644
--- a/openfoam2012/freeCylinderFlow/system/blockMeshDict
+++ b/openfoam2012/freeCylinderFlow/system/blockMeshDict
@@ -16,7 +16,7 @@ FoamFile
 
 #include "../parameters";
 
-r 1;
+r $radius;
 // radius of cylinder
 
 Ltod 20;
@@ -28,7 +28,7 @@ sqrTod 3;
 arccenterDistortion #eval{3*$r};
 // how much off the cylinder center the center of the arcs in the square sides is
 
-thick -10;
+thick #eval{-$thickness};
 
 Lhalf #eval{$Ltod*$r};
 L #eval{$Lhalf * 2};
diff --git a/openfoam2012/freeCylinderFlow/system/forceCoeffsIncompressible b/openfoam2012/freeCylinderFlow/system/forceCoeffsIncompressible
index 9c337ce..f286764 100644
--- a/openfoam2012/freeCylinderFlow/system/forceCoeffsIncompressible
+++ b/openfoam2012/freeCylinderFlow/system/forceCoeffsIncompressible
@@ -12,11 +12,12 @@ Description
 
 \*---------------------------------------------------------------------------*/
 
+#include "../parameters";
 patches     (cylinder);
 
 magUInf     0.2;
 lRef        1;
-Aref        0.1;
+Aref        #eval{$thickness * $radius * 2};  // diameter of cylinder * length(=thickness)
 
 liftDir     (0 1 0);
 dragDir     (1 0 0);
-- 
GitLab