aboutsummaryrefslogtreecommitdiff
path: root/lid_driven_cavity.cc
diff options
context:
space:
mode:
authorAdrian Kummerlaender2018-10-16 12:44:24 +0200
committerAdrian Kummerlaender2018-10-16 12:44:24 +0200
commit2bcbae122b141147e472bdbbad219c3571f71d0b (patch)
treee4e0f67dbe052708a8259da4247fa025d182efcf /lid_driven_cavity.cc
parentd1d96371a0d857bf874d6370c17595ffa0bfeaec (diff)
downloadboltzbub-2bcbae122b141147e472bdbbad219c3571f71d0b.tar
boltzbub-2bcbae122b141147e472bdbbad219c3571f71d0b.tar.gz
boltzbub-2bcbae122b141147e472bdbbad219c3571f71d0b.tar.bz2
boltzbub-2bcbae122b141147e472bdbbad219c3571f71d0b.tar.lz
boltzbub-2bcbae122b141147e472bdbbad219c3571f71d0b.tar.xz
boltzbub-2bcbae122b141147e472bdbbad219c3571f71d0b.tar.zst
boltzbub-2bcbae122b141147e472bdbbad219c3571f71d0b.zip
Implement moving wall / velocity Dirichlet boundary condition
Usable as both the inflow condition of the channel example and the top wall of a lid driven cavity.
Diffstat (limited to 'lid_driven_cavity.cc')
-rw-r--r--lid_driven_cavity.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/lid_driven_cavity.cc b/lid_driven_cavity.cc
index 79f330b..7a978ad 100644
--- a/lid_driven_cavity.cc
+++ b/lid_driven_cavity.cc
@@ -38,10 +38,12 @@ void computeLbmStep() {
}
}
- // straight wall cell bounce back
+ // moving top wall
for ( std::size_t x = 0; x < dimX; ++x ) {
- computeZouHeVelocityWallCell(pop, {x, dimY-1}, { 0,-1}, uLid);
+ computeMovingWallCell(pop, {x, dimY-1}, {0, -1}, {uLid, 0});
}
+
+ // straight wall cell bounce back
for ( std::size_t x = 1; x < dimX-1; ++x ) {
computeWallCell(pop, {x, 0}, { 0, 1});
}
@@ -76,7 +78,7 @@ int main() {
for ( std::size_t t = 0; t <= 10000; ++t ) {
computeLbmStep();
- if ( t % 100 == 0 ) {
+ if ( t % 1000 == 0 ) {
std::cout << ".";
std::cout.flush();
fluid.writeAsVTK("result/data_t" + std::to_string(t) + ".vtk");