From 8ab97c332c37b1a7657052c0aad35f3c8434afd7 Mon Sep 17 00:00:00 2001
From: Hkorb <henry.korb@geo.uu.se>
Date: Thu, 30 Sep 2021 18:49:12 +0200
Subject: [PATCH] some renaming in actuator app

---
 apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp | 34 ++++++++++++----------
 1 file changed, 18 insertions(+), 16 deletions(-)

diff --git a/apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp b/apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp
index 2f5824156..244dd9b64 100644
--- a/apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp
+++ b/apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp
@@ -69,11 +69,11 @@
 
 LbmOrGks lbmOrGks = LBM;
 
-const real D = 126.0; // diameter in m
+const real reference_diameter = 126.0; // diameter in m
 
-const real L_x = 10*D;
-const real L_y = 6*D;
-const real L_z = 6*D;
+const real L_x = 10*reference_diameter;
+const real L_y = 6*reference_diameter;
+const real L_z = 6*reference_diameter;
 
 const real viscosity = 1.56e-5;
 
@@ -81,15 +81,14 @@ const real velocity  = 9.0;
 
 const real mach = 0.1;
 
-const uint nodes_per_D = 32;
+const uint nodes_per_diameter = 32;
 
 std::string path(".");
 
 std::string simulationName("ActuatorLine");
 
 const uint timeStepOut = 500;
-const uint timeStepEnd = 1000;
-const float tEnd = 200;
+const float tEnd = 200; // total time of simulation
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -108,7 +107,7 @@ void multipleLevel(const std::string& configPath)
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
-	const real dx = D/real(nodes_per_D);
+	const real dx = reference_diameter/real(nodes_per_diameter);
 
 	gridBuilder->addCoarseGrid(0.0, 0.0, 0.0,
 							   L_x,  L_y,  L_z, dx);
@@ -192,26 +191,29 @@ void multipleLevel(const std::string& configPath)
 
         SPtr<GridProvider> gridGenerator = GridProvider::makeGridGenerator(gridBuilder, para, cudaMemoryManager);
 
-        real turbPos[3] = {3*D, 3*D, 3*D};
-        real epsilon = 5.f;
+        real turbPos[3] = {3*reference_diameter, 3*reference_diameter, 3*reference_diameter};
+        real epsilon = 5.f; // width of gaussian smearing
         real density = 1.225f;
         int level = 0;
+        uint nBlades = 3;
+        uint nBladeNodes = 32;
 
-        SPtr<ActuatorLine> actuator_line =SPtr<ActuatorLine>( new ActuatorLine((unsigned int) 3, density, (unsigned int)32, epsilon, turbPos[0], turbPos[1], turbPos[2], D, level, dt, dx) );
+
+        SPtr<ActuatorLine> actuator_line =SPtr<ActuatorLine>( new ActuatorLine(nBlades, density, nBladeNodes, epsilon, turbPos[0], turbPos[1], turbPos[2], reference_diameter, level, dt, dx) );
         para->addActuator( actuator_line );
 
         SPtr<PointProbe> pointProbe = SPtr<PointProbe>( new PointProbe("pointProbe", 100, 500, 100) );
-        std::vector<real> probeCoordsX = {D,2*D,5*D};
-        std::vector<real> probeCoordsY = {3*D,3*D,3*D};
-        std::vector<real> probeCoordsZ = {3*D,3*D,3*D};
-        pointProbe->setProbePointsFromList(probeCoordsX,probeCoordsY,probeCoordsZ);
+        std::vector<real> probeCoordsX = {reference_diameter,2*reference_diameter,5*reference_diameter};
+        std::vector<real> probeCoordsY = {3*reference_diameter,3*reference_diameter,3*reference_diameter};
+        std::vector<real> probeCoordsZ = {3*reference_diameter,3*reference_diameter,3*reference_diameter};
+        pointProbe->setProbePointsFromList(probeCoordsX, probeCoordsY, probeCoordsZ);
         // pointProbe->setProbePointsFromXNormalPlane(2*D, 0.0, 0.0, L_y, L_z, dx, dx);
         pointProbe->addPostProcessingVariable(PostProcessingVariable::Means);
         pointProbe->addPostProcessingVariable(PostProcessingVariable::Variances);
         para->addProbe( pointProbe );
 
         SPtr<PlaneProbe> planeProbe = SPtr<PlaneProbe>( new PlaneProbe("planeProbe", 100, 500, 100) );
-        planeProbe->setProbePlane(5*D, 0, 0, dx, L_y, L_z);
+        planeProbe->setProbePlane(5*reference_diameter, 0, 0, dx, L_y, L_z);
         planeProbe->addPostProcessingVariable(PostProcessingVariable::Means);
         para->addProbe( planeProbe );
 
-- 
GitLab