| 1 |
############################################################# |
| 2 |
## ## |
| 3 |
## Copyright (c) 2007-2017 by The University of Queensland ## |
| 4 |
## Centre for Geoscience Computing ## |
| 5 |
## http://earth.uq.edu.au/centre-geoscience-computing ## |
| 6 |
## ## |
| 7 |
## Primary Business: Brisbane, Queensland, Australia ## |
| 8 |
## Licensed under the Open Software License version 3.0 ## |
| 9 |
## http://www.apache.org/licenses/LICENSE-2.0 ## |
| 10 |
## ## |
| 11 |
############################################################# |
| 12 |
|
| 13 |
from gengeo import * |
| 14 |
|
| 15 |
xsize=50.0 |
| 16 |
ysize=50.0 |
| 17 |
ysize_cl=10.0 |
| 18 |
ntry=1000 |
| 19 |
rmin_nb=0.2 |
| 20 |
rmin_b=0.2 |
| 21 |
pbond=0.5 |
| 22 |
|
| 23 |
y_bdry_1=0.5*(ysize-ysize_cl) |
| 24 |
y_bdry_2=ysize-y_bdry_1 |
| 25 |
|
| 26 |
T = MNTable2D(Vector3(0.0,0.0,0.0),Vector3(xsize,ysize,0.0),2.5,1) |
| 27 |
GB = InsertGenerator2D(rmin_b,1.0,ntry,1000,1e-6) |
| 28 |
GNB = InsertGenerator2D(rmin_nb,1.0,ntry,1000,1e-6) |
| 29 |
|
| 30 |
CenterBox = BoxWithLines2D (Vector3(0.0,y_bdry_1,0.0),Vector3(xsize,y_bdry_2,0.0)) |
| 31 |
|
| 32 |
CenterBox.addLine(Line2D(Vector3(0.0,y_bdry_1,0.0),Vector3(0.0,y_bdry_2,0.0))) |
| 33 |
CenterBox.addLine(Line2D(Vector3(xsize,y_bdry_1,0.0),Vector3(xsize,y_bdry_2,0.0))) |
| 34 |
CenterBox.addLine(Line2D(Vector3(0.0,y_bdry_1,0.0),Vector3(xsize,y_bdry_1,0.0))) |
| 35 |
CenterBox.addLine(Line2D(Vector3(0.0,y_bdry_2,0.0),Vector3(xsize,y_bdry_2,0.0))) |
| 36 |
|
| 37 |
GB.generatePacking(CenterBox,T,0,1) |
| 38 |
T.generateRandomBonds(0,1e-5,pbond,0,1,0) |
| 39 |
|
| 40 |
BottomBox = BoxWithLines2D (Vector3(0.0,0.0,0.0),Vector3(xsize,y_bdry_1+0.5,0.0)) |
| 41 |
|
| 42 |
BottomBox.addLine(Line2D(Vector3(0.0,0.0,0.0),Vector3(0.0,y_bdry_1,0.0))) |
| 43 |
BottomBox.addLine(Line2D(Vector3(xsize,0.0,0.0),Vector3(xsize,y_bdry_1,0.0))) |
| 44 |
BottomBox.addLine(Line2D(Vector3(0.0,0.0,0.0),Vector3(xsize,0.0,0.0))) |
| 45 |
|
| 46 |
GNB.generatePacking(BottomBox,T,0,2) |
| 47 |
|
| 48 |
TopBox = BoxWithLines2D (Vector3(0.0,y_bdry_2-0.5,0.0),Vector3(xsize,ysize,0.0)) |
| 49 |
|
| 50 |
TopBox.addLine(Line2D(Vector3(0.0,y_bdry_2,0.0),Vector3(0.0,ysize,0.0))) |
| 51 |
TopBox.addLine(Line2D(Vector3(xsize,y_bdry_2,0.0),Vector3(xsize,ysize,0.0))) |
| 52 |
TopBox.addLine(Line2D(Vector3(0.0,ysize,0.0),Vector3(xsize,ysize,0.0))) |
| 53 |
|
| 54 |
GNB.generatePacking(TopBox,T,0,3) |
| 55 |
|
| 56 |
T.write("temp/geo_hlayer.vtu",2) |