示例#1
0
# dimensions:
pp = 2.  # pin pitch
rr = 0.9  # pin radius
Np = 3  # number of pin rows and columns in the assembly

# assembly bundle
a = Bundle.box(ll=(0, 0), ur=(pp * (Np - 1), pp * (Np - 1)), r=1.3 * rr)
a.wt = 1.
a.color = 'blue'

# channel
ch = Bundle.box(ll=(1, 1), ur=(3.1, 3.0), r=0.1)
ch.color = 'green'
ch.wt = 0.2
rc = Relation()
rc.x = 0
rc.y = 0
a.interior.append((ch, rc))

# insert fuel pins into the assembly
Imin = -1
Imax = 1
for i in range(Imin, Np + Imax):
    x = pp * i
    for j in range(Imin, Np + Imax):
        if (i, j) != (-10, -10):
            y = pp * j
            r = Relation()
            r.x = x + uniform(-0.1 * rr, 0.1 * rr)
            r.y = y + uniform(-0.1 * rr, 0.1 * rr)
            p = Rod()
示例#2
0
Np = 10 # number of pin rows and columns in the assembly

points_on_walls = False # True


# assembly bundle
a = Bundle.box(ll=(0,0), ur=(pp*(Np-1), pp*(Np-1)), r=1.3*r) 
a.wt =1.
a.color = 'blue'

# channel
ch = Bundle.box(ll=(0, 0), ur=(2*pp, 3*pp), r=0.8*r)
ch.color = 'green'
ch.wt = 0.2
rc = Relation()
rc.x = 5*pp
rc.y = 3*pp
a.interior.append((ch, rc))

# fuel pin master model
p = Rod()   
p.radius = r
p.color = 'red'

# insert fuel pins into the assembly
chsh = a.shapely([0])
if points_on_walls:
    Imin = 0
    Imax = 0
else:
    Imin = -1