Example pile
From Nemesis
(Difference between revisions)
(→Auxiliary File: pile[ns].dat) |
(→Auxiliary File: pile[np].dat) |
||
| Line 197: | Line 197: | ||
=Auxiliary File: pile[np].dat= | =Auxiliary File: pile[np].dat= | ||
<pre> | <pre> | ||
| + | 210 -0.2 0 | ||
| + | 211 -0.0843 0 | ||
| + | 212 0 0 | ||
| + | 213 0.0843 0 | ||
| + | 290 0.2 0 | ||
| + | 220 -0.2 0.1121 | ||
| + | 214 -0.0843 0.1121 | ||
| + | 215 0 0.1121 | ||
| + | 216 0.0843 0.1121 | ||
| + | 280 0.2 0.1121 | ||
| + | 230 -0.2 0.2281 | ||
| + | 240 -0.0843 0.2281 | ||
| + | 250 0 0.2281 | ||
| + | 260 0.0843 0.2281 | ||
| + | 270 0.2 0.2281 | ||
</pre> | </pre> | ||
Revision as of 21:06, 18 January 2007
Contents |
Main file: pile.slv
import string
try:
nsfile = open("pile[ns].dat",'r')
npfile = open("pile[np].dat",'r')
ncfile = open("pile[nc].dat",'r')
esfile = open("pile[es].dat",'r')
epfile = open("pile[ep].dat",'r')
except IOError:
sys.exit(0)
domain.dim(3)
db.SQLite("pile")
zs=[0.,1.,2.,3.,4.,5.,6.,7.5,8.0,8.5,9.0,9.5,10.0]
zp=[0.,1.,2.,3.,4.,5.,6.,7.5,8.0,8.5,9.0,9.5,10.0,10.5,11.0,11.5,12.0]
zc=[0.,1.,2.,3.,4.,5.,6.,7.5,8.0,8.5,9.0,9.5,10.0,10.5,11.0,11.5,12.0]
###############################################################################
# nodes
###############################################################################
nd=[]
# soil nodes
temp=[]
for line in nsfile.readlines():
words=string.split(line)
temp.append([int(words[0]),float(words[1]),float(words[2])])
for i in range(len(zs)):
for j in range(len(temp)):
nd.append([(i+1)*1000+temp[j][0],temp[j][1],temp[j][2],zs[i]])
# pile nodes
temp=[]
for line in npfile.readlines():
words=string.split(line)
temp.append([int(words[0]),float(words[1]),float(words[2])])
for i in range(len(zp)):
for j in range(len(temp)):
nd.append([(i+1)*1000+temp[j][0],temp[j][1],temp[j][2],zp[i]])
# common nodes
temp=[]
for line in ncfile.readlines():
words=string.split(line)
temp.append([int(words[0]),float(words[1]),float(words[2])])
for i in range(len(zc)):
for j in range(len(temp)):
nd.append([(i+1)*1000+temp[j][0],temp[j][1],temp[j][2],zc[i]])
###############################################################################
# elems
###############################################################################
el=[]
# soil elems
temp=[]
for line in esfile.readlines():
words=string.split(line)
temp.append([int(words[0]),int(words[1]),int(words[2]),int(words[3])])
for i in range(len(zs)-1):
for j in range(len(temp)):
el.append([(i+1)*1000+temp[j][0],(i+1)*1000+temp[j][0],(i+1)*1000+temp[j][1],(i+1)*1000+temp[j][2],(i+1)*1000+temp[j][3],(i+2)*1000+temp[j][0],(i+2)*1000+temp[j][1],(i+2)*1000+temp[j][2],(i+2)*1000+temp[j][3],1])
# pile elems
temp=[]
for line in epfile.readlines():
words=string.split(line)
temp.append([int(words[0]),int(words[1]),int(words[2]),int(words[3])])
for i in range(len(zp)-1):
for j in range(len(temp)):
el.append([(i+1)*1000+temp[j][0],(i+1)*1000+temp[j][0],(i+1)*1000+temp[j][1],(i+1)*1000+temp[j][2],(i+1)*1000+temp[j][3],(i+2)*1000+temp[j][0],(i+2)*1000+temp[j][1],(i+2)*1000+temp[j][2],(i+2)*1000+temp[j][3],2])
material.plainStrainElasticIsotropic(1, 1E3, 0., 0.)
material.plainStrainElasticIsotropic(2, 1E6, 0., 0.)
for i in range(len(nd)):
node.add(nd[i][0],nd[i][1],nd[i][2],nd[i][3])
for i in range(len(el)):
element.brick8d(el[i][0],el[i][1],el[i][2],el[i][3],el[i][4],el[i][5],el[i][6],el[i][7],el[i][8],el[i][9])
###############################################################################
# constraints
###############################################################################
for i in range(len(nd)):
x=nd[i][1]
y=nd[i][2]
z=nd[i][3]
if z==0:
node.fix(nd[i][0],1)
node.fix(nd[i][0],2)
node.fix(nd[i][0],3)
elif x==-5.8 or x==5.8:
node.fix(nd[i][0],1)
elif y== 0.0 or y==6.5:
node.fix(nd[i][0],2)
###############################################################################
# loadcase
###############################################################################
lc.define(1,"horizontal")
h=len(zp)
p=10
load.node(h*1000+111,1,p)
load.node(h*1000+121,1,p)
load.node(h*1000+131,1,p)
load.node(h*1000+141,1,p)
load.node(h*1000+151,1,p)
load.node(h*1000+161,1,p)
load.node(h*1000+171,1,p)
load.node(h*1000+181,1,p)
load.node(h*1000+191,1,p)
load.node(h*1000+210,1,p)
load.node(h*1000+211,1,p)
load.node(h*1000+212,1,p)
load.node(h*1000+213,1,p)
load.node(h*1000+290,1,p)
load.node(h*1000+220,1,p)
load.node(h*1000+214,1,p)
load.node(h*1000+215,1,p)
load.node(h*1000+216,1,p)
load.node(h*1000+280,1,p)
load.node(h*1000+230,1,p)
load.node(h*1000+240,1,p)
load.node(h*1000+250,1,p)
load.node(h*1000+260,1,p)
load.node(h*1000+270,1,p)
###############################################################################
# loadcase
###############################################################################
analysis.static()
reorder.rCM()
soe.band()
analysis.run(1,1)
db.store("pile_soln")
db.exportToVtk("pile_soln")
Auxiliary File: pile[ns].dat
112 -0.8 0 113 -1.4 0 114 -2.2 0 115 -3.2 0 116 -4.4 0 117 -5.8 0 122 -0.8 0.4483 123 -1.4 0.7845 124 -2.2 1.2328 125 -3.2 1.7931 126 -4.4 2.4655 127 -5.8 3.25 132 -0.8 0.8966 133 -1.4 1.569 134 -2.2 2.4655 135 -3.2 3.5862 136 -4.4 4.931 137 -5.8 6.5 142 -0.4164 0.8966 143 -0.7504 1.569 144 -1.1958 2.4655 145 -1.7525 3.5862 146 -2.4206 4.931 147 -3.2 6.5 152 0 0.8966 153 0 1.569 154 0 2.4655 155 0 3.5862 156 0 4.931 157 0 6.5 162 0.4164 0.8966 163 0.7504 1.569 164 1.1958 2.4655 165 1.7525 3.5862 166 2.4206 4.931 167 3.2 6.5 172 0.8 0.8966 173 1.4 1.569 174 2.2 2.4655 175 3.2 3.5862 176 4.4 4.931 177 5.8 6.5 182 0.8 0.4483 183 1.4 0.7845 184 2.2 1.2328 185 3.2 1.7931 186 4.4 2.4655 187 5.8 3.25 192 0.8 0 193 1.4 0 194 2.2 0 195 3.2 0 196 4.4 0 197 5.8 0
Auxiliary File: pile[np].dat
210 -0.2 0 211 -0.0843 0 212 0 0 213 0.0843 0 290 0.2 0 220 -0.2 0.1121 214 -0.0843 0.1121 215 0 0.1121 216 0.0843 0.1121 280 0.2 0.1121 230 -0.2 0.2281 240 -0.0843 0.2281 250 0 0.2281 260 0.0843 0.2281 270 0.2 0.2281