Skip to content
Snippets Groups Projects
Commit 8d5718c6 authored by Anna Wellmann's avatar Anna Wellmann
Browse files

Change bcs for flow around sphere

parent c221b979
No related branches found
No related tags found
1 merge request!112Synchronize OpenSource GridGenerator and Develop
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
// //
//! \file LidDrivenCavity.cpp //! \file LidDrivenCavity.cpp
//! \ingroup Applications //! \ingroup Applications
//! \author Martin Schoenherr, Stephan Lenz //! \author Martin Schoenherr, Stephan Lenz, Anna Wellmann
//======================================================================================= //=======================================================================================
#define _USE_MATH_DEFINES #define _USE_MATH_DEFINES
#include <exception> #include <exception>
...@@ -83,8 +83,8 @@ int main(int argc, char *argv[]) ...@@ -83,8 +83,8 @@ int main(int argc, char *argv[])
const real dt = (real)0.5e-3; const real dt = (real)0.5e-3;
const uint nx = 64; const uint nx = 64;
const uint timeStepOut = 10000; const uint timeStepOut = 10;
const uint timeStepEnd = 250000; const uint timeStepEnd = 100;
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// setup logger // setup logger
...@@ -131,8 +131,7 @@ int main(int argc, char *argv[]) ...@@ -131,8 +131,7 @@ int main(int argc, char *argv[])
const real velocityLB = velocity * dt / dx; // LB units const real velocityLB = velocity * dt / dx; // LB units
const real vx = velocityLB / sqrt(2.0); // LB units const real vxLB = velocityLB / sqrt(2.0); // LB units
const real vy = velocityLB / sqrt(2.0); // LB units
const real viscosityLB = nx * velocityLB / Re; // LB units const real viscosityLB = nx * velocityLB / Re; // LB units
...@@ -162,13 +161,13 @@ int main(int argc, char *argv[]) ...@@ -162,13 +161,13 @@ int main(int argc, char *argv[])
// set boundary conditions // set boundary conditions
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
gridBuilder->setNoSlipBoundaryCondition(SideType::PX); gridBuilder->setVelocityBoundaryCondition(SideType::MX, vxLB, 0.0, 0.0);
gridBuilder->setNoSlipBoundaryCondition(SideType::MX); gridBuilder->setVelocityBoundaryCondition(SideType::MY, 0.0, 0.0, 0.0);
gridBuilder->setNoSlipBoundaryCondition(SideType::PY); gridBuilder->setVelocityBoundaryCondition(SideType::PY, vxLB, 0.0, 0.0);
gridBuilder->setNoSlipBoundaryCondition(SideType::MY); gridBuilder->setVelocityBoundaryCondition(SideType::MZ, vxLB, 0.0, 0.0);
gridBuilder->setVelocityBoundaryCondition(SideType::PZ, vx, vy, 0.0); gridBuilder->setVelocityBoundaryCondition(SideType::PZ, vxLB, 0.0, 0.0);
gridBuilder->setNoSlipBoundaryCondition(SideType::MZ);
gridBuilder->setVelocityBoundaryCondition(SideType::GEOMETRY, 0.0, 0.0, 0.0); gridBuilder->setVelocityBoundaryCondition(SideType::GEOMETRY, 0.0, 0.0, 0.0);
gridBuilder->setPressureBoundaryCondition(SideType::PX, 0.0); // set pressure BC after velocity BCs
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// set copy mesh to simulation // set copy mesh to simulation
...@@ -187,7 +186,7 @@ int main(int argc, char *argv[]) ...@@ -187,7 +186,7 @@ int main(int argc, char *argv[])
sim.init(para, gridGenerator, fileWriter, cudaMemoryManager); sim.init(para, gridGenerator, fileWriter, cudaMemoryManager);
sim.run(); sim.run();
sim.free(); sim.free();
} catch (const std::bad_alloc &e) { } catch (const std::bad_alloc &e) {
*logging::out << logging::Logger::LOGGER_ERROR << "Bad Alloc:" << e.what() << "\n"; *logging::out << logging::Logger::LOGGER_ERROR << "Bad Alloc:" << e.what() << "\n";
} catch (const std::exception &e) { } catch (const std::exception &e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment