Add scripts and inp files.
This commit is contained in:
parent
ad937f2602
commit
e19f869a1e
390 changed files with 6580687 additions and 10 deletions
BIN
JMBBM13a/3D_Report/3D_CP_Report.docx
Normal file
BIN
JMBBM13a/3D_Report/3D_CP_Report.docx
Normal file
Binary file not shown.
58
JMBBM13a/3D_Report/Strut.f95
Normal file
58
JMBBM13a/3D_Report/Strut.f95
Normal file
|
@ -0,0 +1,58 @@
|
|||
Program Strut
|
||||
real::random@,stress_val(300),strain_val(300)
|
||||
open(unit=10,file='rnd.dat',status='unknown')
|
||||
num_thick=10
|
||||
num_long=3
|
||||
yield=350.0
|
||||
stress_low=650.0
|
||||
stress_range=100.0
|
||||
strain_low=0.15
|
||||
strain_range=0.4
|
||||
call set_seed@(1.0)
|
||||
do irun=1,5
|
||||
do i=1,300
|
||||
stress_val(i)=stress_low+stress_range*(random@())
|
||||
read(10,*)r1
|
||||
strain_val(i)=r1
|
||||
enddo
|
||||
do i=1,22
|
||||
icheck=0
|
||||
stress=350.+float(i)*2
|
||||
do j=1,num_long
|
||||
stran=0.
|
||||
do k=1,60000
|
||||
tstran=float(k)/100000.-0.00001
|
||||
tstress=0
|
||||
icheck1=0
|
||||
do m=1,num_thick
|
||||
smag=stress_val(j*num_thick-m+1)
|
||||
emag=strain_val(j*num_thick-m+1)
|
||||
if(tstran<emag)then
|
||||
tstress=tstress+(tstran/emag)*(smag-yield)+yield
|
||||
else
|
||||
tstress=tstress+0.
|
||||
endif
|
||||
enddo
|
||||
tstress=tstress/float(num_thick)
|
||||
if(tstress-0.02<stress.and.tstress+0.02>stress)then
|
||||
stran=stran+tstran
|
||||
icheck1=1
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
if(icheck1==0)then
|
||||
icheck=1
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
if(icheck==1)then
|
||||
print *,so,eo
|
||||
exit
|
||||
endif
|
||||
stran=stran/(float(num_long))
|
||||
so=stress
|
||||
eo=stran
|
||||
enddo
|
||||
enddo
|
||||
end program
|
||||
|
80
JMBBM13a/3D_Report/TrussMaker.py
Normal file
80
JMBBM13a/3D_Report/TrussMaker.py
Normal file
|
@ -0,0 +1,80 @@
|
|||
from abaqusConstants import *
|
||||
from abaqus import *
|
||||
import regionToolset
|
||||
import mesh
|
||||
#
|
||||
zModel = mdb.models['Model-1']
|
||||
zAssembly = zModel.rootAssembly
|
||||
Num_Long=25
|
||||
Num_High=10
|
||||
#
|
||||
zSketch = zModel.ConstrainedSketch(name='__profile__',sheetSize=200.0)
|
||||
zSketch.Line(point1=(0.0, 0.0), point2=(1., 0.0))
|
||||
zModel.Part(name='BaseTruss', dimensionality=TWO_D_PLANAR,type=DEFORMABLE_BODY)
|
||||
zPart = mdb.models['Model-1'].parts['BaseTruss']
|
||||
zPart.BaseWire(sketch=zSketch)
|
||||
#
|
||||
zInstances=[]
|
||||
k=0
|
||||
for i in range(0,Num_Long):
|
||||
for j in range(0,Num_High):
|
||||
label='I_L'+str(i)+'_H'+str(j)
|
||||
zAssembly.Instance(name=label, part=zPart, dependent=ON)
|
||||
zAssembly.translate(instanceList=(label, ), vector=(float(i), float(j), 0.0))
|
||||
zInstances.append([])
|
||||
zInstances[k]=zAssembly.instances[label]
|
||||
k=k+1
|
||||
zAssembly.InstanceFromBooleanMerge(name='FinalTruss', instances=zInstances, keepIntersections=ON,
|
||||
originalInstances=SUPPRESS, domain=GEOMETRY)
|
||||
#
|
||||
zPart = mdb.models['Model-1'].parts['FinalTruss']
|
||||
k=1
|
||||
for eachEdge in zPart.edges:
|
||||
label='Mat '+str(k)
|
||||
points=eachEdge.pointOn
|
||||
zEdges=zPart.edges.findAt(points)
|
||||
zModel.Material(name=label)
|
||||
zModel.TrussSection(name=label, material=label,area=1.0)
|
||||
k=k+1
|
||||
region = regionToolset.Region(edges=zEdges)
|
||||
zPart.SectionAssignment(region=region, sectionName=label, offset=0.0,
|
||||
offsetType=MIDDLE_SURFACE, offsetField='', thicknessAssignment=FROM_SECTION)
|
||||
#
|
||||
zPart.seedPart(size=1.0, deviationFactor=0.1)
|
||||
elemType1 = mesh.ElemType(elemCode=T2D2, elemLibrary=STANDARD)
|
||||
pickedRegions =(zPart.edges, )
|
||||
zPart.setElementType(regions=pickedRegions, elemTypes=(elemType1, ))
|
||||
zPart.generateMesh()
|
||||
zVerts = zAssembly.instances['FinalTruss-1'].vertices
|
||||
zModel.StaticStep(name='Step-1', previous='Initial',
|
||||
maxNumInc=10000, initialInc=0.1, minInc=1e-07, maxInc=0.1, nlgeom=ON)
|
||||
k=1
|
||||
for eachVert in zVerts:
|
||||
label='BC'+str(k)
|
||||
points=eachVert.pointOn
|
||||
zVert=zVerts.findAt(points)
|
||||
pointX=int(points[0][0])
|
||||
pointY=int(points[0][1])
|
||||
if pointY==0:
|
||||
zAssembly.Set(name='ASet'+str(pointX),vertices=zVert)
|
||||
else:
|
||||
zAssembly.Set(name='Temp',vertices=zVert)
|
||||
try:
|
||||
zAssembly.SetByMerge(name='BSet'+str(pointX), sets=(zAssembly.sets['BSet'+str(pointX)],zAssembly.sets['Temp']))
|
||||
except:
|
||||
zAssembly.Set(name='BSet'+str(pointX),vertices=zVert)
|
||||
region = regionToolset.Region(vertices=zVert)
|
||||
zModel.DisplacementBC(name=label+'_Y', createStepName='Initial',
|
||||
region=region, u1=UNSET, u2=SET, ur3=SET, amplitude=UNSET,
|
||||
distributionType=UNIFORM, fieldName='', localCsys=None)
|
||||
k=k+1
|
||||
if points[0][0]==0.:
|
||||
zModel.DisplacementBC(name=label+'_X', createStepName='Initial',
|
||||
region=region, u1=SET, u2=UNSET, ur3=UNSET, amplitude=UNSET,
|
||||
distributionType=UNIFORM, fieldName='', localCsys=None)
|
||||
if points[0][0]==float(Num_Long) and points[0][1]==0.:
|
||||
zModel.DisplacementBC(name='DISP', createStepName='Step-1',
|
||||
region=region, u1=float(Num_Long)/2., u2=UNSET, ur3=UNSET, amplitude=UNSET,
|
||||
distributionType=UNIFORM, fieldName='', localCsys=None)
|
||||
for i in range(0,Num_Long+1):
|
||||
zModel.Equation('Eq'+str(i),terms=((1.,'BSet'+str(i),1),(-1.,'ASet'+str(i),1)))
|
6
JMBBM13a/3D_Report/batgen.f90
Normal file
6
JMBBM13a/3D_Report/batgen.f90
Normal file
|
@ -0,0 +1,6 @@
|
|||
program batgen
|
||||
open(unit=10,file='run1.bat',status='unknown')
|
||||
do i=1,4
|
||||
do j=1,4
|
||||
do k=1,4
|
||||
|
1
JMBBM13a/3D_Report/batgen.for
Normal file
1
JMBBM13a/3D_Report/batgen.for
Normal file
|
@ -0,0 +1 @@
|
|||
program batgen
|
1
JMBBM13a/3D_Report/rnd.inc
Normal file
1
JMBBM13a/3D_Report/rnd.inc
Normal file
File diff suppressed because one or more lines are too long
15
JMBBM13a/3D_Report/rnd.py
Normal file
15
JMBBM13a/3D_Report/rnd.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
import random
|
||||
random.seed()
|
||||
incFile=open('rnd.inc','w')
|
||||
ystress=400.
|
||||
lower=600.
|
||||
srange=100.
|
||||
for i in range(0,10000):
|
||||
strain=random.normalvariate(0.35,0.05)
|
||||
stress=lower+random.random()*srange
|
||||
incFile.write('*Material, name=Mat %i'%(i))
|
||||
incFile.write('*Elastic')
|
||||
incFile.write('190000.,0.3')
|
||||
incFile.write('*Plastic')
|
||||
incFile.write('%i ,0.,'%(ystress))
|
||||
incFile.write('%i ,%i,'%(stress,strain))
|
10
JMBBM13a/3D_Report/rnd2.f95
Normal file
10
JMBBM13a/3D_Report/rnd2.f95
Normal file
|
@ -0,0 +1,10 @@
|
|||
program randr
|
||||
real::random@
|
||||
do i=1,100
|
||||
r1=random@()
|
||||
r2=random@()
|
||||
z=sqrt(-2.*log(r1))*cos(2.*3.1415*r2)
|
||||
print *,z
|
||||
enddo
|
||||
end program
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue