gxi_stiffplate_caemodel.py
#
# Getting Started with ABAQUS
#
# Script for stiffened plate example
#
from abaqus import *
from abaqusConstants import *
session.viewports['Viewport: 1'].makeCurrent()
session.viewports['Viewport: 1'].maximize()
session.journalOptions.setValues(replayGeometry=COORDINATE,
recoverGeometry=COORDINATE)
from caeModules import *
from driverUtils import executeOnCaeStartup
executeOnCaeStartup()
Mdb()
s = mdb.models['Model-1'].ConstrainedSketch(name='__profile__', sheetSize=5.0)
g, v, d, c = s.geometry, s.vertices, s.dimensions, s.constraints
s.setPrimaryObject(option=STANDALONE)
s.Line(point1=(-1.0, 0.0), point2=(1.0, 0.0))
s.HorizontalConstraint(entity=g.findAt((0.0, 0.0)))
s.Line(point1=(-0.557407379150391, 0.0), point2=(-0.557407379150391, 0.2))
s.VerticalConstraint(entity=g.findAt((-0.557407, 0.1)))
s.PerpendicularConstraint(entity1=g.findAt((0.0, 0.0)),
entity2=g.findAt((-0.557407, 0.1)))
s.CoincidentConstraint(entity1=v.findAt((-0.557407, 0.0)),
entity2=g.findAt((0.0, 0.0)))
s.Line(point1=(0.0, 0.0), point2=(0.0, 0.2))
s.VerticalConstraint(entity=g.findAt((0.0, 0.1)))
s.PerpendicularConstraint(entity1=g.findAt((0.0, 0.0)),
entity2=g.findAt((0.0, 0.1)))
s.CoincidentConstraint(entity1=v.findAt((0.0, 0.0)),
entity2=g.findAt((0.0, 0.0)))
s.Line(point1=(0.6, 0.0), point2=(0.6, 0.2))
s.VerticalConstraint(entity=g.findAt((0.6, 0.1)))
s.PerpendicularConstraint(entity1=g.findAt((0.0, 0.0)),
entity2=g.findAt((0.6, 0.1)))
s.CoincidentConstraint(entity1=v.findAt((0.6, 0.0)),
entity2=g.findAt((0.0, 0.0)))
s.EqualLengthConstraint(entity1=g.findAt((-0.557407, 0.1)),
entity2=g.findAt((0.0, 0.1)))
s.EqualLengthConstraint(entity1=g.findAt((0.0, 0.1)),
entity2=g.findAt((0.6, 0.1)))
s.ObliqueDimension(vertex1=v.findAt((-0.557407, 0.0)),
vertex2=v.findAt((-0.557407, 0.2)),
textPoint=(-0.368518471717834, 0.0573917105793953), value=0.1)
s.breakCurve(curve1=g.findAt((0.0, 0.0)),
point1=(-0.849999964237213, -0.00555403158068657),
curve2=g.findAt((-0.557407, 0.05)),
point2=(-0.561111092567444, 0.0573917105793953))
s.breakCurve(curve1=g.findAt((0.221296, 0.0)),
point1=(-0.375925898551941, 0.00185135018546134),
curve2=g.findAt((0.0, 0.05)),
point2=(-0.00555553054437041, 0.0647970959544182))
s.breakCurve(curve1=g.findAt((0.5, 0.0)),
point1=(0.190740764141083, 0.00925673171877861),
curve2=g.findAt((0.6, 0.05)),
point2=(0.598148167133331, 0.0573917105793953))
s.FixedConstraint(entity=v.findAt((-1.0, 0.0)))
s.EqualLengthConstraint(entity1=g.findAt((-0.778704, 0.0)),
entity2=g.findAt((-0.278704, 0.0)))
s.EqualLengthConstraint(entity1=g.findAt((-0.336111, 0.0)),
entity2=g.findAt((0.185185, 0.0)))
s.EqualLengthConstraint(entity1=g.findAt((0.106482, 0.0)),
entity2=g.findAt((0.527778, 0.0)))
s.HorizontalDimension(vertex1=v.findAt((-1.0, 0.0)),
vertex2=v.findAt((0.77037, 0.0)),
textPoint=(0.757407426834106, -0.224012792110443), value=2.0)
mdb.models['Model-1'].sketches['__profile__'].sketchOptions.setValues(
gridFrequency=2)
p = mdb.models['Model-1'].Part(name='Plate', dimensionality=THREE_D,
type=DEFORMABLE_BODY)
p = mdb.models['Model-1'].parts['Plate']
p.BaseShellExtrude(sketch=s, depth=2.0)
s.unsetPrimaryObject()
del mdb.models['Model-1'].sketches['__profile__']
session.viewports['Viewport: 1'].setValues(displayedObject=p)
session.viewports['Viewport: 1'].partDisplay.setValues(renderStyle=SHADED)
mdb.models['Model-1'].Material('Steel')
mdb.models['Model-1'].materials['Steel'].Density(table=((7800.0, ), ))
mdb.models['Model-1'].materials['Steel'].Elastic(table=((210.0E9, 0.3), ))
mdb.models['Model-1'].materials['Steel'].Plastic(table=((300.0E6, 0.0),
(350.0E6, 0.025), (375.0E6, 0.1), (394.0E6, 0.2), (400.0E6, 0.35)))
mdb.models['Model-1'].HomogeneousShellSection(name='PlateSection',
preIntegrate=OFF, material='Steel', thickness=0.025,
poissonDefinition=DEFAULT, temperature=GRADIENT,
integrationRule=SIMPSON, numIntPts=5)
mdb.models['Model-1'].HomogeneousShellSection(name='StiffSection',
preIntegrate=OFF, material='Steel', thickness=0.0125,
poissonDefinition=DEFAULT, temperature=GRADIENT,
integrationRule=SIMPSON, numIntPts=5)
f = p.faces
faces = f.findAt(((-0.833333, 0.0, 1.333333), ),
((-0.333333, 0.0, 1.333333), ),
((0.166667, 0.0, 1.333333), ),
((0.666667, 0.0, 1.333333), ))
region =(None, None, faces, None)
p.SectionAssignment(region=region, sectionName='PlateSection', offset=-0.5)
faces = f.findAt(((-0.5, 0.033333, 1.333333), ),
((0.5, 0.033333, 1.333333), ),
((0.0, 0.033333, 1.333333), ))
region =(None, None, faces, None)
p.SectionAssignment(region=region, sectionName='StiffSection')
a = mdb.models['Model-1'].rootAssembly
session.viewports['Viewport: 1'].setValues(displayedObject=a)
a.DatumCsysByDefault(CARTESIAN)
a.Instance(name='Plate-1', part=p, dependent=ON)
session.viewports['Viewport: 1'].assemblyDisplay.setValues(renderStyle=SHADED)
p = mdb.models['Model-1'].parts['Plate']
e = p.edges
edges =(e.findAt(coordinates=(0.0, 0.0, 1.5)), )
p.PartitionEdgeByParam(edges=edges, parameter=0.5)
v = a.instances['Plate-1'].vertices
verts = v.findAt(((0.0, 0.0, 1.0), ))
a.Set(vertices=verts, name='Center')
e = a.instances['Plate-1'].edges
edges = e.findAt(((-0.875, 0.0, 2.0), ), ((-0.375, 0.0, 2.0), ), ((0.125,
0.0, 2.0), ), ((0.625, 0.0, 2.0), ), ((1.0, 0.0, 1.5), ), ((0.875, 0.0,
0.0), ), ((0.375, 0.0, 0.0), ), ((-0.125, 0.0, 0.0), ), ((-0.625, 0.0,
0.0), ), ((-1.0, 0.0, 1.5), ))
a.Set(edges=edges, name='Edge')
session.viewports['Viewport: 1'].assemblyDisplay.setValues(loads=OFF, bcs=OFF,
predefinedFields=OFF)
mdb.models['Model-1'].ExplicitDynamicsStep(name='Blast', previous='Initial',
description='Apply blast loading', timePeriod=0.05, adiabatic=OFF,
timeIncrementationMethod=AUTOMATIC_GLOBAL, scaleFactor=1,
maxIncrement=None, massScaling=PREVIOUS_STEP, linearBulkViscosity=0.06,
quadBulkViscosity=1.2)
regionDef=a.sets['Center']
mdb.models['Model-1'].steps['Blast'].Monitor(dof=2, node=regionDef)
mdb.models['Model-1'].fieldOutputRequests['F-Output-1'].setValues(
numIntervals=25)
mdb.models['Model-1'].historyOutputRequests['H-Output-1'].setValues(
numIntervals=500)
regionDef=mdb.models['Model-1'].rootAssembly.sets['Center']
mdb.models['Model-1'].HistoryOutputRequest(name='Center-U2',
createStepName='Blast', variables=('U2', ), numIntervals=500,
region=regionDef)
session.viewports['Viewport: 1'].assemblyDisplay.setValues(loads=ON, bcs=ON,
predefinedFields=ON)
region = a.sets['Edge']
mdb.models['Model-1'].EncastreBC(name='Fix edges', createStepName='Initial',
region=region)
mdb.models['Model-1'].TabularAmplitude(name='Blast', timeSpan=STEP,
smooth=0.25, data=((0.0, 0.0), (0.001, 7.0E5), (0.01, 7.0E5),
(0.02, 0.0), (0.05, 0.0)))
s = a.instances['Plate-1'].faces
side1Faces = s.findAt(((-0.833333333333333, 0.0, 1.33333333333333), ),
((-0.166666666666667, 0.0, 1.66666666666667), ),
((0.166666666666667, 0.0, 1.66666666666667), ),
((0.666666666666667, 0.0, 1.33333333333333), ))
region = regionToolset.Region(side1Faces=side1Faces)
mdb.models['Model-1'].Pressure(name='Pressure load', createStepName='Blast',
region=region, magnitude=1.0, amplitude='Blast')
session.viewports['Viewport: 1'].assemblyDisplay.setValues(mesh=ON)
session.viewports['Viewport: 1'].assemblyDisplay.meshOptions.setValues(
meshTechnique=ON)
p.seedPart(size=0.1)
e = p.edges
edges =(e.findAt(coordinates=(-0.5, 0.025, 2.0)), e.findAt(coordinates=(
0.0, 0.025, 2.0)), e.findAt(coordinates=(0.5, 0.025, 2.0)), e.findAt(
coordinates=(-0.5, 0.075, 0.0)), e.findAt(coordinates=(0.0, 0.075,
0.0)), e.findAt(coordinates=(0.5, 0.075, 0.0)))
p.seedEdgeByNumber(edges=edges, number=2)
elemType1 = mesh.ElemType(elemCode=S4R, elemLibrary=EXPLICIT,
hourglassControl=RELAX_STIFFNESS)
elemType2 = mesh.ElemType(elemCode=S3, elemLibrary=EXPLICIT)
f = p.faces
faces = f.findAt(((0.5, 0.0333333333333, 0.666666666667), (-1.0, 0.0, 0.0)),
((0.666666666667, 0.0, 0.666666666667), (0.0, 1.0, 0.0)),
((0.0, 0.0333333333333, 0.666666666667), (-1.0, 0.0, 0.0)),
((0.416666666667, 0.0, 1.33333333333), (0.0, 1.0, 0.0)),
((-0.5, 0.0333333333333, 0.666666666667), (-1.0, 0.0, 0.0)),
((-0.166666666667, 0.0, 1.33333333333), (0.0, 1.0, 0.0)),
((-0.666666666667, 0.0, 1.33333333333), (0.0, 1.0, 0.0)))
regions =(None, None, faces, None)
p.setElementType(regions=regions, elemTypes=(elemType1, elemType2))
p.generateMesh()
session.viewports['Viewport: 1'].assemblyDisplay.setValues(renderStyle=SHADED)
mdb.Job(name='BlastLoad', model='Model-1')
mdb.jobs['BlastLoad'].setValues(description='Blast load on a flat plate with stiffeners: S4R elements (20x20 mesh) Normal stiffeners (20x2)')
a.regenerate()
mdb.saveAs('StiffPlate')