From 646236dad6fcdedeac7fa5d6774aba877bcfb90a 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] Add pole --- apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp | 22 ++- apps/gpu/LBM/ActuatorLine/Pole.stl | 142 ++++++++++++++++++ .../LBM/ActuatorLine/configActuatorLine.txt | 4 +- 3 files changed, 163 insertions(+), 5 deletions(-) create mode 100644 apps/gpu/LBM/ActuatorLine/Pole.stl diff --git a/apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp b/apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp index 8e3302db8..a36ac4aca 100644 --- a/apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp +++ b/apps/gpu/LBM/ActuatorLine/ActuatorLine.cpp @@ -61,6 +61,8 @@ #include "GridGenerator/grid/GridBuilder/MultipleGridBuilder.h" #include "GridGenerator/grid/BoundaryConditions/Side.h" #include "GridGenerator/grid/BoundaryConditions/BoundaryCondition.h" +#include "GridGenerator/geometries/TriangularMesh/TriangularMesh.h" + #include "GridGenerator/grid/GridFactory.h" @@ -134,7 +136,7 @@ void multipleLevel(const std::string& configPath) const real viscosity = 1.56e-5; - const real mach = 0.1; + const real mach = 0.2; const float tStartOut = config.getValue<real>("tStartOut"); @@ -166,6 +168,12 @@ void multipleLevel(const std::string& configPath) para->setMaxLevel(2); scalingFactory.setScalingFactory(GridScalingFactory::GridScaling::ScaleCompressible); + std::string stlPath = "./apps/gpu/LBM/ActuatorLine/Pole.stl"; + + Object *sphere = TriangularMesh::make(stlPath); + + gridBuilder->addGeometry(sphere); + gridBuilder->setPeriodicBoundaryCondition(false, false, false); gridBuilder->buildGrids(lbmOrGks, false); // buildGrids() has to be called before setting the BCs!!!! @@ -178,11 +186,16 @@ 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("dx (coarse grid) [m] = {}", dx); + VF_LOG_INFO("dt [s] = {}", dt); + VF_LOG_INFO("Lx [m] = {}", L_x); + VF_LOG_INFO("Ly [m] = {}", L_y); + VF_LOG_INFO("Lz [m] = {}", L_z); 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); + VF_LOG_INFO("nodes/turbine diameter = {}", reference_diameter/dx); + VF_LOG_INFO("1000 timesteps are {} s", 1000 * dt); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -226,6 +239,9 @@ void multipleLevel(const std::string& configPath) gridBuilder->setVelocityBoundaryCondition(SideType::PZ, velocityLB, 0.0, 0.0); gridBuilder->setPressureBoundaryCondition(SideType::PX, 0.0); + gridBuilder->setNoSlipBoundaryCondition(SideType::GEOMETRY); + bcFactory.setGeometryBoundaryCondition(BoundaryConditionFactory::NoSlipBC::NoSlipCompressible); + bcFactory.setVelocityBoundaryCondition(BoundaryConditionFactory::VelocityBC::VelocityAndPressureCompressible); bcFactory.setPressureBoundaryCondition(BoundaryConditionFactory::PressureBC::OutflowNonReflective); diff --git a/apps/gpu/LBM/ActuatorLine/Pole.stl b/apps/gpu/LBM/ActuatorLine/Pole.stl new file mode 100644 index 000000000..5b6453f68 --- /dev/null +++ b/apps/gpu/LBM/ActuatorLine/Pole.stl @@ -0,0 +1,142 @@ +solid Visualization Toolkit generated SLA File + facet normal 0.866025 0 -0.5 + outer loop + vertex 214 256 378 + vertex 214 -4 378 + vertex 209 256 369.34 + endloop + endfacet + facet normal -0.866025 0 0.5 + outer loop + vertex 209 -4 369.34 + vertex 209 256 369.34 + vertex 214 -4 378 + endloop + endfacet + facet normal 0.866025 0 -0.5 + outer loop + vertex 209 256 369.34 + vertex 209 -4 369.34 + vertex 199 256 369.34 + endloop + endfacet + facet normal -0.866025 0 0.5 + outer loop + vertex 199 -4 369.34 + vertex 199 256 369.34 + vertex 209 -4 369.34 + endloop + endfacet + facet normal 0.866025 0 -0.5 + outer loop + vertex 199 256 369.34 + vertex 199 -4 369.34 + vertex 194 256 378 + endloop + endfacet + facet normal -0.866025 0 0.5 + outer loop + vertex 194 -4 378 + vertex 194 256 378 + vertex 199 -4 369.34 + endloop + endfacet + facet normal 0.866025 0 -0.5 + outer loop + vertex 194 256 378 + vertex 194 -4 378 + vertex 199 256 386.66 + endloop + endfacet + facet normal -0.866025 0 0.5 + outer loop + vertex 199 -4 386.66 + vertex 199 256 386.66 + vertex 194 -4 378 + endloop + endfacet + facet normal 0.866025 0 -0.5 + outer loop + vertex 199 256 386.66 + vertex 199 -4 386.66 + vertex 209 256 386.66 + endloop + endfacet + facet normal -0.866025 0 0.5 + outer loop + vertex 209 -4 386.66 + vertex 209 256 386.66 + vertex 199 -4 386.66 + endloop + endfacet + facet normal 0.866025 0 -0.5 + outer loop + vertex 209 256 386.66 + vertex 209 -4 386.66 + vertex 214 256 378 + endloop + endfacet + facet normal -0.866025 0 0.5 + outer loop + vertex 214 -4 378 + vertex 214 256 378 + vertex 209 -4 386.66 + endloop + endfacet + facet normal 0.5 0 -0.866026 + outer loop + vertex 214 256 378 + vertex 209 256 369.34 + vertex 209 256 386.66 + endloop + endfacet + facet normal -0.5 0 0.866026 + outer loop + vertex 209 256 386.66 + vertex 209 256 369.34 + vertex 199 256 386.66 + endloop + endfacet + facet normal 0 0.0332902 0.999446 + outer loop + vertex 209 256 369.34 + vertex 199 256 369.34 + vertex 199 256 386.66 + endloop + endfacet + facet normal 0 0 -1 + outer loop + vertex 194 256 378 + vertex 199 256 386.66 + vertex 199 256 369.34 + endloop + endfacet + facet normal -0.866025 0 0.5 + outer loop + vertex 194 -4 378 + vertex 199 -4 369.34 + vertex 199 -4 386.66 + endloop + endfacet + facet normal 0.866025 0 -0.5 + outer loop + vertex 199 -4 386.66 + vertex 199 -4 369.34 + vertex 209 -4 386.66 + endloop + endfacet + facet normal 0.499907 0.0192272 -0.865865 + outer loop + vertex 199 -4 369.34 + vertex 209 -4 369.34 + vertex 209 -4 386.66 + endloop + endfacet + facet normal -0.5 0 0.866026 + outer loop + vertex 214 -4 378 + vertex 209 -4 386.66 + vertex 209 -4 369.34 + endloop + endfacet +endsolid diff --git a/apps/gpu/LBM/ActuatorLine/configActuatorLine.txt b/apps/gpu/LBM/ActuatorLine/configActuatorLine.txt index 668ee1c6e..11f0d471d 100644 --- a/apps/gpu/LBM/ActuatorLine/configActuatorLine.txt +++ b/apps/gpu/LBM/ActuatorLine/configActuatorLine.txt @@ -8,7 +8,7 @@ GridPath=. ################################################## ReferenceDiameter=126 -NodesPerDiameter=20 +NodesPerDiameter=32 #20=800mb # 32=3200mb Velocity=9 ################################################## tStartOut=0 @@ -25,7 +25,7 @@ tEnd=100000 ################################################## TurbulenceModel = None -#SGSconstant = 0.3333333 +# SGSconstant = 0.3333333 # #QuadricLimiterP = 100000.0 #QuadricLimiterM = 100000.0 -- GitLab