summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-02-01 14:11:54 +0100
committerAdrian Kummerlaender2019-06-24 15:17:09 +0200
commit87f0b74b54a67d3838950e78214978ac2472589e (patch)
tree85e4cf7c52039926c22c3db1995c1bc89a2f7353
parent3bc4210c9a3c10ffe61f0237bba101f9700b7668 (diff)
downloadgrid_refinement_openlb-87f0b74b54a67d3838950e78214978ac2472589e.tar
grid_refinement_openlb-87f0b74b54a67d3838950e78214978ac2472589e.tar.gz
grid_refinement_openlb-87f0b74b54a67d3838950e78214978ac2472589e.tar.bz2
grid_refinement_openlb-87f0b74b54a67d3838950e78214978ac2472589e.tar.xz
grid_refinement_openlb-87f0b74b54a67d3838950e78214978ac2472589e.zip
Adjust cylinder2d refinement structure
Required to both increase cylinder discretization detail and fix cell count to a uniform N=9 grid.
-rw-r--r--apps/adrian/cylinder2d/cylinder2d.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/apps/adrian/cylinder2d/cylinder2d.cpp b/apps/adrian/cylinder2d/cylinder2d.cpp
index a0732e4..b2ed6fc 100644
--- a/apps/adrian/cylinder2d/cylinder2d.cpp
+++ b/apps/adrian/cylinder2d/cylinder2d.cpp
@@ -221,7 +221,7 @@ int main(int argc, char* argv[])
const auto coarseDeltaX = coarseGrid.getConverter().getPhysDeltaX();
- const Vector<T,2> fineExtend {8*cylinderD, ly-2*coarseDeltaX};
+ const Vector<T,2> fineExtend {6.5*cylinderD, ly-2*coarseDeltaX};
const Vector<T,2> fineOrigin {0.75*cylinderD, coarseDeltaX};
auto& fineGrid = coarseGrid.refine(fineOrigin, fineExtend);
@@ -251,18 +251,27 @@ int main(int argc, char* argv[])
coarseGrid.getSuperGeometry().rename(4,0,refined);
}
- const Vector<T,2> fineExtend2 {3.6*cylinderD, 2*cylinderD};
- const Vector<T,2> fineOrigin2 {1*cylinderD, 2*cylinderD-fineExtend2[1]/2};
+ const Vector<T,2> fineExtend2 {2.3*cylinderD, 1.7*cylinderD};
+ const Vector<T,2> fineOrigin2 {1.0*cylinderD, 2*cylinderD-fineExtend2[1]/2};
auto& fineGrid2 = fineGrid.refine(fineOrigin2, fineExtend2);
prepareGeometry(fineGrid2);
disableRefinedArea(fineGrid, fineGrid2);
+ const Vector<T,2> fineExtend3 {1.4*cylinderD, 1.4*cylinderD};
+ const Vector<T,2> fineOrigin3 {2*cylinderD-fineExtend3[0]/2, 2*cylinderD-fineExtend3[1]/2};
+
+ auto& fineGrid3 = fineGrid2.refine(fineOrigin3, fineExtend3);
+ prepareGeometry(fineGrid3);
+
+ disableRefinedArea(fineGrid2, fineGrid3);
+
prepareLattice(coarseGrid);
prepareLattice(fineGrid);
prepareLattice(fineOutflowGrid);
prepareLattice(fineGrid2);
+ prepareLattice(fineGrid3);
clout << "Total number of active cells: " << coarseGrid.getActiveVoxelN() << endl;
clout << "Starting simulation..." << endl;
@@ -281,6 +290,7 @@ int main(int argc, char* argv[])
getResults("level1_", fineGrid, iT);
getResults("level1_outflow_", fineOutflowGrid, iT);
getResults("level2_", fineGrid2, iT);
+ getResults("level3_", fineGrid3, iT);
if (iT%statIter == 0) {
timer.update(iT);