summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-01-10 15:13:23 +0100
committerAdrian Kummerlaender2019-06-24 15:16:31 +0200
commit68f2384f79bff6553d1db21ac0b3173d57e4e2bf (patch)
tree456cf59f72b31b9d9d58ffe1f50383aa72aed3d9 /apps
parent55d840574e71dc4a56a406a71d00b19698ad2791 (diff)
downloadgrid_refinement_openlb-68f2384f79bff6553d1db21ac0b3173d57e4e2bf.tar
grid_refinement_openlb-68f2384f79bff6553d1db21ac0b3173d57e4e2bf.tar.gz
grid_refinement_openlb-68f2384f79bff6553d1db21ac0b3173d57e4e2bf.tar.bz2
grid_refinement_openlb-68f2384f79bff6553d1db21ac0b3173d57e4e2bf.tar.lz
grid_refinement_openlb-68f2384f79bff6553d1db21ac0b3173d57e4e2bf.tar.xz
grid_refinement_openlb-68f2384f79bff6553d1db21ac0b3173d57e4e2bf.tar.zst
grid_refinement_openlb-68f2384f79bff6553d1db21ac0b3173d57e4e2bf.zip
Add hacky MPI support for grid refinement
Works but is nowhere near anything one could consider good. Obvious issues: * More than one cuboid per grid makes it harder to determine the next lattice cell to be coupled * i.e. currently lattice positions are determined ad hoc by resolving their physical position * Coupling is not actually parallelized * All coupling lines are traversed by all processes, way to much communication * Load balancing and cuboid decomposition doesn't care about refinement * ideally refined cuboids should be computationally near their coarse _parent_ cuboids The first two isses should be fixable with a reasonable amount of work. This sadly doesn't apply in any form to the last issue.
Diffstat (limited to 'apps')
-rw-r--r--apps/adrian/poiseuille2d/poiseuille2d.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/adrian/poiseuille2d/poiseuille2d.cpp b/apps/adrian/poiseuille2d/poiseuille2d.cpp
index a6d7bd1..df166e1 100644
--- a/apps/adrian/poiseuille2d/poiseuille2d.cpp
+++ b/apps/adrian/poiseuille2d/poiseuille2d.cpp
@@ -35,10 +35,11 @@ typedef double T;
#define DESCRIPTOR D2Q9Descriptor
-const T lx = 4.0; // length of the channel
-const T ly = 1.0; // height of the channel
-const int N = 60; // resolution of the model
+const T lx = 8.0; // length of the channel
+const T ly = 2.0; // height of the channel
+const int N = 64; // resolution of the model
const T Re = 500.; // Reynolds number
+const T baseTau = 0.57; // Relaxation time of coarsest grid
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
@@ -183,10 +184,10 @@ int main(int argc, char* argv[])
const Vector<T,2> coarseExtend {lx, ly};
IndicatorCuboid2D<T> coarseCuboid(coarseExtend, coarseOrigin);
- auto coarseGrid = Grid2D<T,DESCRIPTOR>::make(coarseCuboid, N, 0.57, Re);
+ auto coarseGrid = Grid2D<T,DESCRIPTOR>::make(coarseCuboid, N, baseTau, Re);
prepareGeometry(coarseGrid->getConverter(), coarseGrid->getSuperGeometry());
- const Vector<T,2> wantedFineExtend {2.0, 0.75};
+ const Vector<T,2> wantedFineExtend {3.0, 1.5};
const Vector<T,2> fineOrigin = coarseGrid->alignToGrid({0.8, (ly-wantedFineExtend[1])/2});
const Vector<T,2> fineExtend = coarseGrid->alignToGrid(fineOrigin + wantedFineExtend) - fineOrigin;
@@ -220,7 +221,7 @@ int main(int argc, char* argv[])
sOnLatticeBoundaryCondition2D<T, DESCRIPTOR> fineSBoundaryCondition(fineGrid->getSuperLattice());
createLocalBoundaryCondition2D<T, DESCRIPTOR>(fineSBoundaryCondition);
- const Vector<T,2> wantedFineExtend2 {0.4, 0.4};
+ const Vector<T,2> wantedFineExtend2 {0.6, 0.4};
const Vector<T,2> fineOrigin2 = fineGrid->alignToGrid({1.05, (ly-wantedFineExtend2[1])/2});
const Vector<T,2> fineExtend2 = fineGrid->alignToGrid(fineOrigin2 + wantedFineExtend2) - fineOrigin2;