From a12a5ce40acc878344cdcddf696e38857b9b2436 Mon Sep 17 00:00:00 2001
From: Anna Wellmann <a.wellmann@tu-bs.de>
Date: Wed, 21 Dec 2022 08:17:30 +0000
Subject: [PATCH] Change ALM size

---
 apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp    | 22 +++++++++----------
 .../LBM/ActuatorLine/configActuatorLine.txt   |  4 ++--
 .../CumulantK17Sponge_Device.cu               |  4 ++--
 3 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp b/apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp
index 69fcacbb3..8e3302db8 100644
--- a/apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp
+++ b/apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp
@@ -97,12 +97,6 @@
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
-LbmOrGks lbmOrGks = LBM;
-
-std::string path(".");
-
-std::string simulationName("ActuatorLine");
-
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -110,6 +104,10 @@ std::string simulationName("ActuatorLine");
 void multipleLevel(const std::string& configPath)
 {
 
+    const LbmOrGks lbmOrGks = LBM;
+    const std::string path(".");
+    const std::string simulationName("ActuatorLine");
+
     logging::Logger::addStream(&std::cout);
     logging::Logger::setDebugLevel(logging::Logger::Level::INFO_LOW);
     logging::Logger::timeStamp(logging::Logger::ENABLE);
@@ -130,7 +128,7 @@ void multipleLevel(const std::string& configPath)
     const real velocity = config.getValue<real>("Velocity");
 
 
-    const real L_x = 12*reference_diameter;
+    const real L_x = 10*reference_diameter;
     const real L_y = 5*reference_diameter;
     const real L_z = 6*reference_diameter;
 
@@ -148,7 +146,7 @@ void multipleLevel(const std::string& configPath)
     // const float tAveraging          =  config.getValue<real>("tAveraging");
     // const float tStartOutProbe      =  config.getValue<real>("tStartOutProbe");
     // const float tOutProbe           =  config.getValue<real>("tOutProbe");
-        
+
     SPtr<Parameter> para = std::make_shared<Parameter>(communicator.getNummberOfProcess(), communicator.getPID(), &config);
     BoundaryConditionFactory bcFactory = BoundaryConditionFactory();
     GridScalingFactory scalingFactory  = GridScalingFactory();
@@ -157,14 +155,14 @@ void multipleLevel(const std::string& configPath)
 
     const real dx = reference_diameter/real(nodes_per_diameter);
 
-    real turbPos[3] = {2*reference_diameter, 2*reference_diameter, 3*reference_diameter};
+    real turbPos[3] = {static_cast<real>(1.5*reference_diameter), 2*reference_diameter, 3*reference_diameter};
 
     gridBuilder->addCoarseGrid(0.0, 0.0, 0.0,
                                L_x,  L_y,  L_z, dx);
 
     gridBuilder->setNumberOfLayers(4,0);
-    gridBuilder->addGrid( new Cuboid(   turbPos[0]-1.0*reference_diameter,  turbPos[1]-1.5*reference_diameter,  turbPos[2]-1.5*reference_diameter, 
-                                        turbPos[0]+6.0*reference_diameter,  turbPos[1]+1.5*reference_diameter,  turbPos[2]+1.5*reference_diameter) , 1 );
+    gridBuilder->addGrid( new Cuboid(   turbPos[0]-1.0*reference_diameter,  turbPos[1]-1.1*reference_diameter,  turbPos[2]-1.1*reference_diameter,
+                                        turbPos[0]+5.0*reference_diameter,  turbPos[1]+1.1*reference_diameter,  turbPos[2]+1.1*reference_diameter) , 1 );
     para->setMaxLevel(2);
     scalingFactory.setScalingFactory(GridScalingFactory::GridScaling::ScaleCompressible);
 
@@ -181,6 +179,7 @@ void multipleLevel(const std::string& configPath)
     const real viscosityLB = viscosity * dt / (dx * dx); // LB units
 
     VF_LOG_INFO("Knoten pro Turbinendurchmesser     = {}", reference_diameter/dx);
+    VF_LOG_INFO("dx = {}", dx);
     VF_LOG_INFO("velocity  [m/s] = {}", velocity);
     VF_LOG_INFO("velocity  [dx/dt] = {}", velocityLB);
     VF_LOG_INFO("viscosity [10^8 dx^2/dt] = {}", viscosityLB*1e8);
@@ -242,7 +241,6 @@ void multipleLevel(const std::string& configPath)
     const uint nBladeNodes = 32;
     const real tipspeed_ratio = 7.5f; // tipspeed ratio = angular vel * radius / inflow vel
     const real omega = 2*tipspeed_ratio*velocity/reference_diameter;
-    
 
     SPtr<ActuatorFarm> actuator_farm = std::make_shared<ActuatorFarm>(nBlades, density, nBladeNodes, epsilon, level, dt, dx, true);
     std::vector<real> bladeRadii;
diff --git a/apps/gpu/LBM/ActuatorLine/configActuatorLine.txt b/apps/gpu/LBM/ActuatorLine/configActuatorLine.txt
index e6475bbae..668ee1c6e 100644
--- a/apps/gpu/LBM/ActuatorLine/configActuatorLine.txt
+++ b/apps/gpu/LBM/ActuatorLine/configActuatorLine.txt
@@ -12,8 +12,8 @@ NodesPerDiameter=20
 Velocity=9
 ##################################################
 tStartOut=0
-tOut=50
-tEnd=500
+tOut=10000
+tEnd=100000
 ##################################################
 
 # tStartTmpAveraging=100
diff --git a/src/gpu/VirtualFluids_GPU/Kernel/Kernels/BasicKernels/FluidFlow/Compressible/CumulantK17Sponge/CumulantK17Sponge_Device.cu b/src/gpu/VirtualFluids_GPU/Kernel/Kernels/BasicKernels/FluidFlow/Compressible/CumulantK17Sponge/CumulantK17Sponge_Device.cu
index 84ad84ac2..a6bf00fb0 100644
--- a/src/gpu/VirtualFluids_GPU/Kernel/Kernels/BasicKernels/FluidFlow/Compressible/CumulantK17Sponge/CumulantK17Sponge_Device.cu
+++ b/src/gpu/VirtualFluids_GPU/Kernel/Kernels/BasicKernels/FluidFlow/Compressible/CumulantK17Sponge/CumulantK17Sponge_Device.cu
@@ -358,8 +358,8 @@ __global__ void LB_Kernel_CumulantK17Sponge(
     // 3.
     
     // Calculate modified omega for sponge bob layer
-    real startXsponge = 1300.0f;
-    real endXsponge = 1500.0f;
+    real startXsponge = 1060.0f;
+    real endXsponge = 1260.0f;
     real sizeSponge = endXsponge - startXsponge;
 
     real OxyyPxzz = c8o1 * (-c2o1 + omega) * (c1o1 + c2o1 * omega) / (-c8o1 - c14o1 * omega + c7o1 * omega * omega);
-- 
GitLab