summaryrefslogtreecommitdiff
path: root/apps/adrian
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-01-17 13:37:26 +0100
committerAdrian Kummerlaender2019-06-24 15:17:09 +0200
commitd900d8c794bb9d50f528bc8e72ceb594fbc292c8 (patch)
tree3e5852e239daae4086c3b9c1c7b70dbaf0cf5c53 /apps/adrian
parentac6ac9383dfcc3a688579dc1fb56874bc6ff392e (diff)
downloadgrid_refinement_openlb-d900d8c794bb9d50f528bc8e72ceb594fbc292c8.tar
grid_refinement_openlb-d900d8c794bb9d50f528bc8e72ceb594fbc292c8.tar.gz
grid_refinement_openlb-d900d8c794bb9d50f528bc8e72ceb594fbc292c8.tar.bz2
grid_refinement_openlb-d900d8c794bb9d50f528bc8e72ceb594fbc292c8.tar.lz
grid_refinement_openlb-d900d8c794bb9d50f528bc8e72ceb594fbc292c8.tar.xz
grid_refinement_openlb-d900d8c794bb9d50f528bc8e72ceb594fbc292c8.tar.zst
grid_refinement_openlb-d900d8c794bb9d50f528bc8e72ceb594fbc292c8.zip
Add named types to Grid2D constructor
This allows for readable differentiation between constructor overloads.
Diffstat (limited to 'apps/adrian')
-rw-r--r--apps/adrian/cylinder2d/cylinder2d.cpp12
-rw-r--r--apps/adrian/poiseuille2d/poiseuille2d.cpp6
2 files changed, 9 insertions, 9 deletions
diff --git a/apps/adrian/cylinder2d/cylinder2d.cpp b/apps/adrian/cylinder2d/cylinder2d.cpp
index cb0cfc6..739c02c 100644
--- a/apps/adrian/cylinder2d/cylinder2d.cpp
+++ b/apps/adrian/cylinder2d/cylinder2d.cpp
@@ -1,8 +1,8 @@
-/* Lattice Boltzmann sample, written in C++, using the OpenLB
- * library
+/*
+ * Lattice Boltzmann grid refinement sample, written in C++,
+ * using the OpenLB library
*
- * Copyright (C) 2007, 2012 Jonas Latt, Mathias J. Krause
- * Vojtech Cvrcek, Peter Weisbrod
+ * Copyright (C) 2019 Adrian Kummerländer
* E-mail contact: info@openlb.net
* The most recent release of OpenLB can be downloaded at
* <http://www.openlb.net/>
@@ -170,7 +170,7 @@ void getResults(const std::string& prefix,
vtmWriter.createMasterFile();
}
- if (iT%20==0) {
+ if (iT%100==0) {
vtmWriter.write(iT);
}
@@ -192,7 +192,7 @@ int main(int argc, char* argv[])
const Vector<T,2> coarseExtend {lx, ly};
IndicatorCuboid2D<T> coarseCuboid(coarseExtend, coarseOrigin);
- Grid2D<T,DESCRIPTOR> coarseGrid(coarseCuboid, N, baseTau, Re);
+ Grid2D<T,DESCRIPTOR> coarseGrid(coarseCuboid, N, RelaxationTime<T>(baseTau), Re);
prepareGeometry(coarseGrid);
const Vector<T,2> fineExtend {3.0, 1.5};
diff --git a/apps/adrian/poiseuille2d/poiseuille2d.cpp b/apps/adrian/poiseuille2d/poiseuille2d.cpp
index d92934b..19dc4d7 100644
--- a/apps/adrian/poiseuille2d/poiseuille2d.cpp
+++ b/apps/adrian/poiseuille2d/poiseuille2d.cpp
@@ -38,9 +38,9 @@ typedef double T;
const T lx = 4.0; // length of the channel
const T ly = 1.0; // height of the channel
-const int N = 30; // resolution of the model
+const int N = 50; // resolution of the model
const T Re = 100.; // Reynolds number
-const T baseTau = 0.8; // Relaxation time of coarsest grid
+const T uMax = 0.02; // Max lattice speed
const T maxPhysT = 60.; // max. simulation time in s, SI unit
const T physInterval = 0.25; // interval for the convergence check in s
const T residuum = 1e-5; // residuum for the convergence check
@@ -184,7 +184,7 @@ int main(int argc, char* argv[])
const Vector<T,2> coarseExtend {lx/2, ly};
IndicatorCuboid2D<T> coarseCuboid(coarseExtend, coarseOrigin);
- Grid2D<T,DESCRIPTOR> coarseGrid(coarseCuboid, N, baseTau, Re);
+ Grid2D<T,DESCRIPTOR> coarseGrid(coarseCuboid, N, LatticeVelocity<T>(uMax), Re);
prepareGeometry(coarseGrid);
const T coarseDeltaX = coarseGrid.getConverter().getPhysDeltaX();