gengeo question: BoundingBox Size in *.geo was different from what was set in MNTable3D
Question BoundingBox Size in smooth_box.geo was different from what was set in MNTable3D
In smooth_box.geo: BoundingBox 0 0 0 10 10 10
the value in MNTable3D: maxPoint 8 8 8
# --- geometry setup script for monodisperse packing with particle at regular postion ---
from gengeo import *
from math import *
# - input parameters --
#'''
# radius
minRadius = 0.4
maxRadius = 2.0
# maximum number of particle in three directions
N_X = 10
N_Y = 10
N_Z = 10
# atuo_cal block dimensions
## adopt float!
xdim=N_
ydim=N_
zdim=N_
#
# -------
# corner points
minPoint = Vector3(
maxPoint = Vector3(
# neighbour table
mntable = MNTable3D(
# block volume
box = BoxWithPlanes3D
# boundary planes
bottomPlane=
leftPlane=
frontPlane=
topPlane=
rightPlane=
backPlane=
# add them to the box
box.addPlane(
box.addPlane(
box.addPlane(
box.addPlane(
box.addPlane(
box.addPlane(
# -- setup packer --
# iteration parameters
insertFails = 10000
maxIter = 10000
tol = 1.0e-6
Particle_number_1 = 0
#generate particle at regular position
for i in range(N_X):
for j in range(N_Y):
for k in range(N_Z):
mySphere = Sphere(
mySphere.setTag (2)
mntable.
Particle_
print "Particle_number_1: ",Particle_number_1
#'''
# generate interior particle
# packer
packer = InsertGenerator3D( minRadius,
# pack particles into volume
packer.
#'''
#'''
#'''
# get ParticleList
particleList = mntable.
# remove
mntable.
Particle_Number = 0
# change the tag
for pp in particleList:
Particle_Number += 1
Pcentre = pp.Centre()
Pradius = pp.Radius()
X_Posn = Pcentre.X()
Y_Posn = Pcentre.Y()
Z_Posn = Pcentre.Z()
###
if ((Y_Posn - 1.5*minRadius) <= 0):#bottom
pp.setTag(2)
elif (Y_Posn + 1.5*minRadius>
pp.setTag(3)
elif ((X_Posn - 1.5*minRadius) <= 0):#left
pp.setTag(4)
elif ((X_Posn + 2.0*minRadius) >= xdim):#right
pp.setTag(5)
elif ((Z_Posn - 1.5*minRadius) <= 0):#back
pp.setTag(6)
elif ((Z_Posn + 1.5*minRadius) >= zdim):#front
pp.setTag(7)
else:
pp.setTag(1)
mntable.insert(pp)
###
# create bonds between neighbouring particles:
mntable.
print "Particle_Number: ", Particle_Number
#output xdim, ydim, zdim
print "xdim: ", xdim
print "ydim: ", ydim
print "zdim: ", zdim
#'''
# write a geometry file
mntable.
mntable.
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- SteffenAbe
- Solved:
- Last query:
- Last reply: