A.12 Forming a channel

gsi_channel_caemodel.py

#
# Getting Started with ABAQUS
#
# Script for forming portion channel example
#
from abaqus import *
from abaqusConstants import *
session.journalOptions.setValues(replayGeometry=COORDINATE, 
    recoverGeometry=COORDINATE)
session.Viewport(name='Viewport: 1', origin=(1.3671875, 1.3671875), 
    width=201.25, height=135.625)
session.viewports['Viewport: 1'].makeCurrent()
Mdb()
mdb.models.changeKey(fromName='Model-1', toName='standard')
##
##  Switch to the part module
##
import part
import regionToolset
import displayGroupMdbToolset as dgm
##
##  Sketch profile of blank
##
s = mdb.models['standard'].Sketch(name='__profile__', sheetSize=0.25)
g, v, d = s.geometry, s.vertices, s.dimensions
s.sketchOptions.setValues(sheetSize=0.25, gridSpacing=0.005, grid=ON, 
    gridFrequency=2, constructionGeometry=ON, dimensionTextHeight=0.005, 
    decimalPlaces=3)
s.Line(point1=(-0.05, -0.005), point2=(0.05, -0.005))
s.Line(point1=(0.05, -0.005), point2=(0.05, 0.005))
s.Line(point1=(0.05, 0.005), point2=(-0.05, 0.005))
s.Line(point1=(-0.05, 0.005), point2=(-0.05, -0.005))
##
##  Dimensional annotations
##
s.HorizontalDimension(vertex1=v[6], vertex2=v[4], textPoint=(
    0.0428654626011848, 0.0324860885739326))
s.VerticalDimension(vertex1=v[6], vertex2=v[1], textPoint=(
    -0.0644329786300659, -0.00417871028184891))
s.changeDimension(dimension=d[10], value=0.001, vertexList=(v[2], v[1]))
p = mdb.models['standard'].Part(name='Blank', dimensionality=TWO_D_PLANAR, 
    type=DEFORMABLE_BODY)
p = mdb.models['standard'].parts['Blank']
p.BaseShell(sketch=s)
p = mdb.models['standard'].parts['Blank']
session.viewports['Viewport: 1'].setValues(displayedObject=p)
del mdb.models['standard'].sketches['__profile__']
##
##  Sketch profile of punch
##
s0 = mdb.models['standard'].Sketch(name='__profile__', sheetSize=0.25)
g, v, d = s0.geometry, s0.vertices, s0.dimensions
s0.sketchOptions.setValues(sheetSize=0.25, gridSpacing=0.005, grid=ON, 
    gridFrequency=2, constructionGeometry=ON, dimensionTextHeight=0.005, 
    decimalPlaces=3)
s0.Line(point1=(-0.06, 0.0), point2=(0.0, 0.0))
s0.Line(point1=(0.0, 0.0), point2=(0.0, 0.06))
s0.FilletByRadius(radius=0.005, curve1=g[3], nearPoint1=(-0.00377431511878967, 
    -0.000404391437768936), curve2=g[5], nearPoint2=(0.000269599258899689, 
    0.00363951921463013))
s0.RadialDimension(curve=g[10], textPoint=(0.0115925520658493, 
    -0.00768342986702919))
s0.HorizontalDimension(vertex1=v[1], vertex2=v[11], textPoint=(
    -0.00134796649217606, -0.0200847610831261))
s0.VerticalDimension(vertex1=v[9], vertex2=v[4], textPoint=(
    0.0253418460488319, 0.0508184805512428))
session.viewports['Viewport: 1'].view.fitView()
mdb.models['standard'].Sketch(name='Punch', objectToCopy=s0)
p = mdb.models['standard'].Part(name='Punch', dimensionality=TWO_D_PLANAR, 
    type=ANALYTIC_RIGID_SURFACE)
p = mdb.models['standard'].parts['Punch']
p.AnalyticRigidSurf2DPlanar(sketch=s0)
p = mdb.models['standard'].parts['Punch']
session.viewports['Viewport: 1'].setValues(displayedObject=p)
del mdb.models['standard'].sketches['__profile__']
#
#   Create holder
#
s = mdb.models['standard'].Sketch(name='__profile__', sheetSize=0.25)
g, v, d = s.geometry, s.vertices, s.dimensions
s.sketchOptions.setValues(sheetSize=0.25, gridSpacing=0.005, grid=ON, 
    gridFrequency=2, constructionGeometry=ON, dimensionTextHeight=0.005, 
    decimalPlaces=3)
s.setPrimaryObject(option=STANDALONE)
s.retrieveSketch(sketch=mdb.models['standard'].sketches['Punch'])
s.rotateVertices(centerPoint=(0.0, 0.0), angle=-90.0,
    vertexList=(v[4], v[5], v[6], v[7], v[8], v[9], v[10]))
s.delete(objectList=(d[13], ))
s.delete(objectList=(d[12], ))
s.HorizontalDimension(vertex1=v[9], vertex2=v[5], textPoint=(
    0.0559795647859573, -0.0283120423555374))
s.VerticalDimension(vertex1=v[4], vertex2=v[8], textPoint=(-0.0229023173451424, 
    0.00661575794219971))
p = mdb.models['standard'].Part(name='Holder', dimensionality=TWO_D_PLANAR, 
    type=ANALYTIC_RIGID_SURFACE)
p = mdb.models['standard'].parts['Holder']
p.AnalyticRigidSurf2DPlanar(sketch=s)
s.unsetPrimaryObject()
p = mdb.models['standard'].parts['Holder']
session.viewports['Viewport: 1'].setValues(displayedObject=p)
del mdb.models['standard'].sketches['__profile__']
#
#   Create die
#
s1 = mdb.models['standard'].Sketch(name='__profile__', sheetSize=0.25)
g, v, d = s1.geometry, s1.vertices, s1.dimensions
s1.sketchOptions.setValues(sheetSize=0.25, gridSpacing=0.005, grid=ON, 
    gridFrequency=2, constructionGeometry=ON, dimensionTextHeight=0.005, 
    decimalPlaces=3)
s1.setPrimaryObject(option=STANDALONE)
s1.retrieveSketch(sketch=mdb.models['standard'].sketches['Punch'])
#: Info: 3 entities copied from punch
s1.rotateVertices(centerPoint=(0.0, 0.0), angle=-180.0,
    vertexList=(v[4], v[5], v[6], v[7], v[8], v[9], v[10]))
p = mdb.models['standard'].Part(name='Die', dimensionality=TWO_D_PLANAR, 
    type=ANALYTIC_RIGID_SURFACE)
p = mdb.models['standard'].parts['Die']
p.AnalyticRigidSurf2DPlanar(sketch=s1)
s1.unsetPrimaryObject()
p = mdb.models['standard'].parts['Die']
session.viewports['Viewport: 1'].setValues(displayedObject=p)
del mdb.models['standard'].sketches['__profile__']
session.viewports['Viewport: 1'].setValues(displayedObject=p)
##
##  Add reference point to die
##
p = mdb.models['standard'].parts['Die']
e = p.edges
p.ReferencePoint(point=p.InterestingPoint(e.findAt((0.000380602337443566, 
    -0.00308658283817455, 0.0), ), CENTER))
##
##  Add reference point to holder
##
p = mdb.models['standard'].parts['Holder']
session.viewports['Viewport: 1'].setValues(displayedObject=p)
p = mdb.models['standard'].parts['Holder']
e0 = p.edges
p.ReferencePoint(point=p.InterestingPoint(e0.findAt((0.000380602337443568, 
    0.00308658283817455, 0.0), ), CENTER))
##
##  Add reference point to punch
##
p = mdb.models['standard'].parts['Punch']
session.viewports['Viewport: 1'].setValues(displayedObject=p)
p = mdb.models['standard'].parts['Punch']
e = p.edges
p.ReferencePoint(point=p.InterestingPoint(e.findAt((-0.00308658283817455, 
    0.000380602337443566, 0.0), ), CENTER))
##
##  Switch to the property module
##
import material
import section
##
##  Create material 'Steel'
##
mdb.models['standard'].Material('Steel')
mdb.models['standard'].materials['Steel'].Elastic(table=((2.1E11, 0.3), ))
mdb.models['standard'].materials['Steel'].Plastic(table=((400.E6, 0.0), (
    420.E6, 0.02), (500.E6, 0.2), (600.E6, 0.5)))
##
##  Create and assign solid section to blank
##
mdb.models['standard'].HomogeneousSolidSection(name='BlankSection', 
    material='Steel', thickness=1.0)
p = mdb.models['standard'].parts['Blank']
session.viewports['Viewport: 1'].setValues(displayedObject=p)
p0 = mdb.models['standard'].parts['Blank']
f = p0.faces
region =(None, None,f.findAt(((-0.0166666666666667, 
    0.00433333333333333, 0.0), (0.0, 0.0, 1.0)), ), None)
p0 = mdb.models['standard'].parts['Blank']
p0.SectionAssignment(region=region, sectionName='BlankSection')
##
##  Define datum coordinate system
##
p1 = mdb.models['standard'].parts['Blank']
p1.DatumCsysByDefault(coordSysType=CARTESIAN)
##
##  Assign material orientation to blank
##
p0 = mdb.models['standard'].parts['Blank']
f = p0.faces
faces = f[0:1]
region =(None, None,f.findAt(((-0.0166666666666667, 
    0.00433333333333333, 0.0), (0.0, 0.0, 1.0)), ), None)
datum = p0.datums[3]
p0.assignMaterialOrientation(region=region, localCsys=datum)
##
##  Switch to the assembly module
##
import assembly
import part
a = mdb.models['standard'].rootAssembly
session.viewports['Viewport: 1'].setValues(displayedObject=a)
##
##  Set coordinate system (done by default)
##
a = mdb.models['standard'].rootAssembly
a.DatumCsysByDefault(CARTESIAN)
##
##  Instance the blank
##
p = mdb.models['standard'].parts['Blank']
a.Instance(name='Blank-1', part=p, dependent=ON)
a = mdb.models['standard'].rootAssembly
##
##  Instance the punch
##
p = mdb.models['standard'].parts['Punch']
a.Instance(name='Punch-1', part=p, dependent=ON)
##
##  Translate the punch
##
a = mdb.models['standard'].rootAssembly
p2 = a.instances['Punch-1']
p2.translate(vector=(0.116, 0.0, 0.0))
##
##   Edge to edge constraint between punch and blank: vertical 
##
session.viewports['Viewport: 1'].view.fitView()
a = mdb.models['standard'].rootAssembly
p2 = a.instances['Punch-1']
e01 = a.instances['Punch-1'].edges
e02 = a.instances['Blank-1'].edges
p2.EdgeToEdge(movableAxis=e01.findAt((0.06975, 0.0, 0.0), ), 
    fixedAxis=e02.findAt((0.025, 0.005, 0.0), ), 
    flip=ON, clearance=0.001)
##
##  Reset the view
##
session.viewports['Viewport: 1'].view.setValues(width=0.01405, height=0.008982, 
    cameraPosition=(-0.050023, 0.0040249, 0.35302), cameraTarget=(-0.050023, 
    0.0040249, 0))
session.viewports['Viewport: 1'].view.fitView()
session.viewports['Viewport: 1'].view.setValues(width=0.21266, height=0.13595)
##
##   Edge to edge constraint between punch and blank: horizontal
##
a = mdb.models['standard'].rootAssembly
p2 = a.instances['Punch-1']
e01 = a.instances['Punch-1'].edges
e02 = a.instances['Blank-1'].edges
p2.EdgeToEdge(movableAxis=e01.findAt((0.116, 0.02475, 0.0), ), 
    fixedAxis=e02.findAt((-0.05, 0.00475, 0.0), ), 
    flip=ON, clearance=-0.05)
##
##  Instance the holder
##
a = mdb.models['standard'].rootAssembly
p = mdb.models['standard'].parts['Holder']
a.Instance(name='Holder-1', part=p, dependent=ON)
session.viewports['Viewport: 1'].view.fitView()
##
##   Edge to edge constraint between holder and punch (horizontal)
##
e1 = a.instances['Holder-1'].edges
e2 = a.instances['Punch-1'].edges
a.EdgeToEdge(movableAxis=e1.findAt(coordinates=(0.0, 0.01875, 0.0)), 
    fixedAxis=e2.findAt(coordinates=(0.0, 0.02475, 0.0)), flip=ON, 
    clearance=0.001)
##
##   Edge to edge constraint between holder and blank (vertical)
##
e1 = a.instances['Holder-1'].edges
e2 = a.instances['Blank-1'].edges
a.EdgeToEdge(movableAxis=e1.findAt(coordinates=(0.04725, 0.0, 0.0)), 
    fixedAxis=e2.findAt(coordinates=(0.025, 0.005, 0.0)), flip=ON, 
    clearance=0.0)
##
##  Instance the die
##
a = mdb.models['standard'].rootAssembly
p = mdb.models['standard'].parts['Die']
a.Instance(name='Die-1', part=p, dependent=ON)
session.viewports['Viewport: 1'].view.fitView()
##
##   Edge to edge constraint between die and blank (horizontal)
##
e1 = a.instances['Die-1'].edges
e2 = a.instances['Blank-1'].edges
a.EdgeToEdge(movableAxis=e1.findAt(coordinates=(0.0, -0.01875, 0.0)), 
    fixedAxis=e2.findAt(coordinates=(-0.05, 0.00475, 0.0)), flip=OFF, 
    clearance=-0.051)
##
##   Edge to edge constraint between die and blank (vertical)
##
e1 = a.instances['Die-1'].edges
e2 = a.instances['Blank-1'].edges
a.EdgeToEdge(movableAxis=e1.findAt(coordinates=(0.04725, 0.0, 0.0)), 
    fixedAxis=e2.findAt(coordinates=(-0.025, 0.004, 0.0)), flip=ON, 
    clearance=0.0)
##
##  Partition left vertical edge of blank and
##  create geometry set 'MidLeft'
##
p = mdb.models['standard'].parts['Blank']
e = p.edges
pickedEdges = e.findAt(((-0.05, 0.00475, 0.0), ))
p.PartitionEdgeByParam(edges=pickedEdges, parameter=0.5)
a = mdb.models['standard'].rootAssembly
v1 = a.instances['Blank-1'].vertices
a.Set(vertices=v1.findAt(((-0.05, 0.0045, 0.0),),), name='MidLeft')
##
##  Partition right vertical edge of blank and
##  create geometry set 'MidRight'
##
session.viewports['Viewport: 1'].view.fitView()
session.viewports['Viewport: 1'].view.setValues(width=0.016745, 
    height=0.010705, cameraPosition=(0.049619, 0.0054186, 0.34366), 
    cameraTarget=(0.049619, 0.0054186, 0))
p = mdb.models['standard'].parts['Blank']
e = p.edges
pickedEdges = e.findAt(((0.05, 0.00425, 0.0), ))
p.PartitionEdgeByParam(edges=pickedEdges, parameter=0.5)
a = mdb.models['standard'].rootAssembly
v1 = a.instances['Blank-1'].vertices
a.Set(name='MidRight', vertices=v1.findAt(((0.05, 0.0045, 0.0), ), ))

a = mdb.models['standard'].rootAssembly
a.regenerate()

#
#   Create geometry set RefPunch
#
a = mdb.models['standard'].rootAssembly
r1 = a.instances['Punch-1'].referencePoints
refPoints1 = (r1[2], )
a.Set(referencePoints=refPoints1, name='RefPunch')
#
#   Create geometry set RefHolder
#
a = mdb.models['standard'].rootAssembly
r1 = a.instances['Holder-1'].referencePoints
refPoints1 = (r1[2], )
a.Set(referencePoints=refPoints1, name='RefHolder')
#
#   Create geometry set RefDie
#
a = mdb.models['standard'].rootAssembly
r1 = a.instances['Die-1'].referencePoints
refPoints1 = (r1[2], )
a.Set(referencePoints=refPoints1, name='RefDie')
#
#   Reset view
#
session.viewports['Viewport: 1'].view.setValues(width=0.0066561, 
    height=0.0042551, cameraPosition=(-0.048954, 0.0037356, 0.34938), 
    cameraTarget=(-0.048954, 0.0037356, 0))
#
#   Create geometry set Center
#
a = mdb.models['standard'].rootAssembly
e = a.instances['Blank-1'].edges
edges = e.findAt(((-0.05, 0.004875, 0.0), ), ((-0.05, 0.004375, 0.0), ))
a.Set(edges=edges, name='Center')
#
#   Create surface BlankTop
#
a = mdb.models['standard'].rootAssembly
e1 = a.instances['Blank-1'].edges
a.Surface(name='BlankTop', side1Edges=e1.findAt(((0.025, 0.005, 0.0), ), ))
#
#   Create surface BlankBot
#
a = mdb.models['standard'].rootAssembly
e1 = a.instances['Blank-1'].edges
a.Surface(name='BlankBot', side1Edges=e1.findAt(((-0.025, 0.004, 0.0), ), ))

#
#   Create surface PunchSurf
#
session.viewports['Viewport: 1'].view.fitView()
a = mdb.models['standard'].rootAssembly
e1 = a.instances['Punch-1'].edges
side2Edges = e1[0:1]
a.Surface(name='PunchSurf', side2Edges=e1.findAt(((-0.04625, 0.0060, 0.0), ),))

#
#   Create surface HolderSurf
#
a = mdb.models['standard'].rootAssembly
e1 = a.instances['Holder-1'].edges
side2Edges = e1[2:3]
a.Surface(name='HolderSurf', side2Edges=e1.findAt(((0.01975, 0.005, 0.0), ), ))

#
#   Create surface DieSurf
#
a = mdb.models['standard'].rootAssembly
e1 = a.instances['Die-1'].edges
side2Edges = e1[0:1]
a.Surface(name='DieSurf', side2Edges=e1.findAt(((
    0.001, -0.04225, 0.0), ), ))
##
##  Switch to the step module
##
import step
##
##  Create five static general steps
##
mdb.models['standard'].StaticStep(name='Establish contact I', 
    previous='Initial', 
    description="""Push the blank holder and die together""", timePeriod=1, 
    adiabatic=OFF, maxNumInc=100, stabilization=None, 
    timeIncrementationMethod=AUTOMATIC, 
    initialInc=1, minInc=1e-05, maxInc=1, matrixSolver=SOLVER_DEFAULT, 
    amplitude=RAMP, extrapolation=LINEAR, fullyPlastic="", nlgeom=ON)
session.viewports['Viewport: 1'].assemblyDisplay.setValues(
    step='Establish contact I')
mdb.models['standard'].StaticStep(name='Remove right constraint', 
    previous='Establish contact I', 
    description="""Remove the middle constraint at right""", timePeriod=1, 
    adiabatic=OFF, maxNumInc=100, stabilization=None, 
    timeIncrementationMethod=AUTOMATIC, 
    initialInc=1, minInc=1e-05, maxInc=1, matrixSolver=SOLVER_DEFAULT, 
    amplitude=RAMP, extrapolation=LINEAR, fullyPlastic="")
session.viewports['Viewport: 1'].assemblyDisplay.setValues(
    step='Remove right constraint')
mdb.models['standard'].StaticStep(name='Holder force', 
    previous='Remove right constraint', 
    description="""Apply prescribed force on blank holder""", timePeriod=1, 
    adiabatic=OFF, maxNumInc=100, stabilization=None, 
    timeIncrementationMethod=AUTOMATIC, 
    initialInc=1, minInc=1e-05, maxInc=1, matrixSolver=SOLVER_DEFAULT, 
    amplitude=RAMP, extrapolation=LINEAR, fullyPlastic="")
session.viewports['Viewport: 1'].assemblyDisplay.setValues(step='Holder force')
mdb.models['standard'].StaticStep(name='Establish contact II', 
    previous='Holder force', 
    description="""Move the punch down a little while applying a small pressure to blank top""", 
    timePeriod=1, adiabatic=OFF, maxNumInc=100, stabilization=None, 
    timeIncrementationMethod=AUTOMATIC, initialInc=0.1, 
    minInc=1e-05, maxInc=1, 
    matrixSolver=SOLVER_DEFAULT, amplitude=RAMP, extrapolation=LINEAR, 
    fullyPlastic="")
session.viewports['Viewport: 1'].assemblyDisplay.setValues(
    step='Establish contact II')
mdb.models['standard'].StaticStep(name='Move punch', 
    previous='Establish contact II', 
    description="""Full extent""", timePeriod=1, 
    adiabatic=OFF, maxNumInc=1000, stabilization=None, 
    timeIncrementationMethod=AUTOMATIC, initialInc=0.0001, 
    minInc=1e-06, maxInc=1, 
    matrixSolver=SOLVER_DEFAULT, amplitude=RAMP, extrapolation=LINEAR, 
    fullyPlastic="")
session.viewports['Viewport: 1'].assemblyDisplay.setValues(
    step='Establish contact I')
##
##  Modify output requests
##
mdb.models['standard'].fieldOutputRequests['F-Output-1'].setValues(
    variables=PRESELECT, frequency=999)
session.viewports['Viewport: 1'].assemblyDisplay.setValues(
    step='Remove right constraint')
del mdb.models['standard'].historyOutputRequests['H-Output-1']
a0=mdb.models['standard'].rootAssembly
regionDef=a0.sets['RefPunch']
mdb.models['standard'].HistoryOutputRequest(name='H-Output-1', 
    createStepName='Establish contact II', 
    variables=('RF1', 'RF2', 'RF3', 'RM1', 'RM2', 'RM3'), 
    region=regionDef)
mdb.models['standard'].fieldOutputRequests['F-Output-1'].setValuesInStep(
    stepName='Move punch', variables=PRESELECT, frequency=20)
##
##  Create degree of freedom monitor
##
mdb.models['standard'].steps['Establish contact I'].Monitor(dof=2, 
    node=regionDef, frequency=1)
mdb.models['standard'].steps['Remove right constraint'].Monitor(dof=2, 
    node=regionDef, frequency=1)
mdb.models['standard'].steps['Holder force'].Monitor(dof=2, 
    node=regionDef, frequency=1)
mdb.models['standard'].steps['Establish contact II'].Monitor(dof=2, 
    node=regionDef, frequency=1)
mdb.models['standard'].steps['Move punch'].Monitor(dof=2, 
    node=regionDef, frequency=1)
##
##  Print diagnostic data for contact
##
mdb.models['standard'].steps['Establish contact I'].DiagnosticPrint(
    frequency=1, contact=ON, plasticity=OFF, residual=ON, solve=OFF)
mdb.models['standard'].steps['Remove right constraint'].DiagnosticPrint(
    frequency=1, contact=ON, plasticity=OFF, residual=ON, solve=OFF)
mdb.models['standard'].steps['Holder force'].DiagnosticPrint(frequency=1, 
    contact=ON, plasticity=OFF, residual=ON, solve=OFF)
mdb.models['standard'].steps['Establish contact II'].DiagnosticPrint(
    frequency=1, contact=ON, plasticity=OFF, residual=ON, solve=OFF)
mdb.models['standard'].steps['Move punch'].DiagnosticPrint(frequency=1, 
    contact=ON, plasticity=OFF, residual=ON, solve=OFF)
##
##  Reset view
##
session.viewports['Viewport: 1'].view.setValues(width=0.025757, 
    height=0.016466, cameraPosition=(-0.04834, 0.0033255, 0.34366), 
    cameraTarget=(-0.04834, 0.0033255, 0))
##
##  Switch to the interaction module
##
import interaction
session.viewports['Viewport: 1'].assemblyDisplay.setValues(interactions=ON)
session.viewports['Viewport: 1'].view.fitView()
session.viewports['Viewport: 1'].assemblyDisplay.setValues(step='Initial')
##
##  Create contact property 'Fric'
##
mdb.models['standard'].ContactProperty('Fric')
mdb.models['standard'].interactionProperties['Fric'].TangentialBehavior(
    formulation=PENALTY, directionality=ISOTROPIC, slipRateDependency=OFF, 
    pressureDependency=OFF, temperatureDependency=OFF, dependencies=0, 
    table=((0.1, ), ), shearStressLimit=None, maximumElasticSlip=FRACTION, 
    fraction=0.005, elasticSlipStiffness=None)
##
##  Create contact property 'NoFric'
##
mdb.models['standard'].ContactProperty('NoFric')
mdb.models['standard'].interactionProperties['NoFric'].TangentialBehavior(
    formulation=FRICTIONLESS)
##
##  Create contact interaction 'Punch-Blank'
##
a0 = mdb.models['standard'].rootAssembly
region1=a0.surfaces['PunchSurf']
a0 = mdb.models['standard'].rootAssembly
region2=a0.surfaces['BlankTop']
mdb.models['standard'].SurfaceToSurfaceContactStd(name='Punch-Blank', 
    createStepName='Establish contact I', master=region1, slave=region2,
    sliding=FINITE, interactionProperty='NoFric', adjustMethod=NONE)
##
##  Create contact interaction 'Holder-Blank'
##
a0 = mdb.models['standard'].rootAssembly
region1=a0.surfaces['HolderSurf']
a0 = mdb.models['standard'].rootAssembly
region2=a0.surfaces['BlankTop']
mdb.models['standard'].SurfaceToSurfaceContactStd(name='Holder-Blank', 
    createStepName='Establish contact I', master=region1, slave=region2,
    sliding=FINITE, interactionProperty='Fric', adjustMethod=NONE)
##
##  Create contact interaction 'Die-Blank'
##
a0 = mdb.models['standard'].rootAssembly
region1=a0.surfaces['DieSurf']
a0 = mdb.models['standard'].rootAssembly
region2=a0.surfaces['BlankBot']
mdb.models['standard'].SurfaceToSurfaceContactStd(name='Die-Blank', 
    createStepName='Establish contact I', master=region1, slave=region2,
    sliding=FINITE, interactionProperty='Fric', adjustMethod=NONE)
##
##  Switch to load module
##
import load
session.viewports['Viewport: 1'].assemblyDisplay.setValues(loads=ON, bcs=ON,
    fields=ON, interactions=OFF)
session.viewports['Viewport: 1'].view.setValues(width=0.02663, height=0.017024, 
    cameraPosition=(-0.050293, 0.0041627, 0.34366), cameraTarget=(-0.050293, 
    0.0041627, 0))
##
##
session.viewports['Viewport: 1'].view.fitView()
##
##  Create BCs in step "Establish contact"
##
session.viewports['Viewport: 1'].assemblyDisplay.setValues(
    step='Establish contact I')
a0 = mdb.models['standard'].rootAssembly
region = a0.sets['MidRight']
mdb.models['standard'].DisplacementBC(name='MidRightBC', 
    createStepName='Establish contact I', region=region, u2=0.0)
a0 = mdb.models['standard'].rootAssembly
region = a0.sets['MidLeft']
mdb.models['standard'].DisplacementBC(name='MidLeftBC', 
    createStepName='Establish contact I', region=region, u2=0.0)
a0 = mdb.models['standard'].rootAssembly
region = a0.sets['Center']
mdb.models['standard'].XsymmBC(name='CenterBC', 
    createStepName='Establish contact I', region=region)
a0 = mdb.models['standard'].rootAssembly
region = a0.sets['RefDie']
mdb.models['standard'].DisplacementBC(name='RefDieBC', 
    createStepName='Establish contact I', region=region, u1=0.0, u2=1e-08, 
    ur3=0.0)
a0 = mdb.models['standard'].rootAssembly
region = a0.sets['RefHolder']
mdb.models['standard'].DisplacementBC(name='RefHolderBC', 
    createStepName='Establish contact I', region=region, u1=0.0, u2=-1e-08, 
    ur3=0.0)
a0 = mdb.models['standard'].rootAssembly
region = a0.sets['RefPunch']
mdb.models['standard'].DisplacementBC(name='RefPunchBC', 
    createStepName='Establish contact I', region=region, 
    u1=0.0, u2=0.0, ur3=0.0)
##
##  Remove MidRight bc in step "Remove right constraint"
##
session.viewports['Viewport: 1'].assemblyDisplay.setValues(
    step='Remove right constraint')
mdb.models['standard'].boundaryConditions['MidRightBC'].deactivate(
    'Remove right constraint')
##
##  Replace holder bcs with bcs and cload in step "Holder force"
##
session.viewports['Viewport: 1'].assemblyDisplay.setValues(step='Holder force')
mdb.models['standard'].boundaryConditions['RefHolderBC'].setValuesInStep(
    stepName='Holder force', u2=FREED)
##
a0 = mdb.models['standard'].rootAssembly
region = a0.sets['RefHolder']
mdb.models['standard'].ConcentratedForce(name='RefHolderForce', 
    createStepName='Holder force', region=region, cf2=-440000.0)
##
##  Push punch down slightly, remove midleft bc, and add small 
##  pressure to top of blank in step  "Establish contact (punch and blank)"
##
session.viewports['Viewport: 1'].assemblyDisplay.setValues(
    step='Establish contact II')
mdb.models['standard'].boundaryConditions['RefPunchBC'].setValuesInStep(
    stepName='Establish contact II', u2=-1.E-3)
mdb.models['standard'].boundaryConditions['MidLeftBC'].deactivate(
    'Establish contact II')
a0 = mdb.models['standard'].rootAssembly
region = a0.surfaces['BlankTop']
mdb.models['standard'].Pressure(name='Small pressure', 
    createStepName='Establish contact II', region=region, 
    magnitude=-1000.0)
##
##  Push punch down and remove pressure in step  "Move punch"
##
session.viewports['Viewport: 1'].assemblyDisplay.setValues(step='Move punch')
mdb.models['standard'].boundaryConditions['RefPunchBC'].setValuesInStep(
    stepName='Move punch', u2=-0.031)
mdb.models['standard'].loads['Small pressure'].deactivate('Move punch')
##
##  Switch to mesh module
##
import mesh
session.viewports['Viewport: 1'].assemblyDisplay.setValues(mesh=ON, loads=OFF,
    bcs=OFF, fields=OFF)
session.viewports['Viewport: 1'].assemblyDisplay.meshOptions.setValues(
    meshTechnique=ON)
session.viewports['Viewport: 1'].view.fitView()
##
##  Assign edge seeds
##
p = mdb.models['standard'].parts['Blank']
e = p.edges
p.seedEdgeByNumber(edges=(
    e.findAt((-0.025, 0.004, 0.0), ), 
    e.findAt((0.025, 0.005, 0.0), )), 
    number=100)
p.seedEdgeByNumber(edges=(
    e.findAt((-0.05, 0.004875, 0.0), ), 
    e.findAt((-0.05, 0.004375, 0.0), ), 
    e.findAt((0.05, 0.004125, 0.0), ), 
    e.findAt((0.05, 0.004625, 0.0), )), 
    number=2)
##
##  Assign element type
##
elemType1 = mesh.ElemType(elemCode=CPE4R, elemLibrary=STANDARD, 
    secondOrderAccuracy=OFF, hourglassControl=ENHANCED, distortionControl=OFF)
elemType2 = mesh.ElemType(elemCode=CPE3, elemLibrary=STANDARD)
f = p.faces
regions=(None, None, f.findAt(((-0.0166666666666667, 0.00416666666666667, 0.0), (0.0, 0.0, 1.0)), ), None)
p.setElementType(regions=regions, elemTypes=(elemType1, elemType2))
##
##  Use structured meshing
##
f = p.faces
regions=(f.findAt((-0.0166666666666667, 0.00416666666666667, 0.0), 
    (0.0, 0.0, 1.0)), )
p.setMeshControls(regions=regions, technique=STRUCTURED)
##
##  Generate mesh
##
p.generateMesh()
session.viewports['Viewport: 1'].assemblyDisplay.geometryOptions.setValues(
    geometryEdgesInShaded=OFF, datumPoints=OFF, datumAxes=OFF, datumPlanes=OFF,
    datumCoordSystems=OFF)
##
##  Switch to job module
##
import job
session.viewports['Viewport: 1'].assemblyDisplay.setValues(mesh=OFF)
session.viewports['Viewport: 1'].assemblyDisplay.meshOptions.setValues(
    meshTechnique=OFF)
##
##  Create job
##
mdb.Job(name='Channel', model='standard', 
    description='Analysis of the forming of a channel-static')
##
##  Save model database
##
mdb.saveAs('Channel')
##

##
##  Create explicit dynamics model
##
mdb.Model(name='explicit', objectToCopy=mdb.models['standard'])
#: The model "explicit" has been created.

p = mdb.models['explicit'].parts['Blank']
session.viewports['Viewport: 1'].setValues(displayedObject=p)

##
##  add density
##
mdb.models['explicit'].materials['Steel'].Density(table=((7800.0, ), ))

p = mdb.models['explicit'].parts['Holder']
session.viewports['Viewport: 1'].setValues(displayedObject=p)

##
##  add point mass to holder
##
r = p.referencePoints
refPoints=(r[2], )
region = regionToolset.Region(referencePoints=refPoints)
mdb.models['explicit'].parts['Holder'].engineeringFeatures.PointMassInertia(
    name='mass', region=region, mass=0.1, alpha=0.0,
    composite=0.0)

a = mdb.models['explicit'].rootAssembly
session.viewports['Viewport: 1'].setValues(displayedObject=a)

##
##  remove clearance between blank and punch
##
a.features['Edge to Edge-1'].setValues(clearance=0.0)

session.viewports['Viewport: 1'].assemblyDisplay.setValues(
    step='Establish contact I')
session.viewports['Viewport: 1'].view.fitView()

##
##  delete dummy bcs
##
del mdb.models['explicit'].boundaryConditions['MidLeftBC']
del mdb.models['explicit'].boundaryConditions['MidRightBC']

##
##  move holder force to first step
##
mdb.models['explicit'].loads['RefHolderForce'].move('Holder force', 
    'Establish contact I')

##
##  delete all but first step
##
del mdb.models['explicit'].steps['Remove right constraint']
del mdb.models['explicit'].steps['Holder force']
del mdb.models['explicit'].steps['Establish contact II']
del mdb.models['explicit'].steps['Move punch']

##
##  rename first step
##
mdb.models['explicit'].steps.changeKey(fromName='Establish contact I', 
    toName='Apply holder force')
session.viewports['Viewport: 1'].assemblyDisplay.setValues(
    step='Apply holder force')

##
##  define set containing blank
##
f1 = a.instances['Blank-1'].faces
faces1 = f1.findAt(((-0.016667, 0.004167, 0.0), ))
a.Set(faces=faces1, name='blank')

##
##  replace the remaining static step with an explicit dynamics step
##
mdb.models['explicit'].ExplicitDynamicsStep(name='Apply holder force', 
    previous='Initial', maintainAttributes=TRUE, timePeriod=0.0001)

##
##  create a second explicit dynamics step
##
mdb.models['explicit'].ExplicitDynamicsStep(name='Displace punch', 
    previous='Apply holder force', timePeriod=0.007)

##
##  define mass scaling
##
regionDef=mdb.models['explicit'].rootAssembly.sets['blank']
mdb.models['explicit'].steps['Apply holder force'].setValues(massScaling=((
    SEMI_AUTOMATIC, regionDef, AT_BEGINNING, 5.0, 0.0, None, 0, 0, 0.0, 
    0.0, 0, None), ))

##
##  request RF2, U2 history output for punch reference point
##
regionDef=mdb.models['explicit'].rootAssembly.sets['RefPunch']
mdb.models['explicit'].HistoryOutputRequest(name='H-Output-2', 
    createStepName='Apply holder force', variables=('U2', 'RF2'),
    region=regionDef, sectionPoints=DEFAULT, rebar=EXCLUDE)

##
##  define smooth step amplitude curves
##
mdb.models['explicit'].SmoothStepAmplitude(name='smooth1', timeSpan=STEP,
    data=((0.0, 0.0), (0.0001, 1.0)))
mdb.models['explicit'].SmoothStepAmplitude(name='smooth2', timeSpan=STEP,
    data=((0.0, 0.0), (0.007, 1.0)))
##
##  fix the die in the 2-direction
##
session.viewports['Viewport: 1'].assemblyDisplay.setValues(
    step='Apply holder force')
mdb.models['explicit'].boundaryConditions['RefDieBC'].setValues(u2=0.0)

##
##  use smooth step amplitude for holder force
##
mdb.models['explicit'].loads['RefHolderForce'].setValues(amplitude='smooth1')

##
##  unset dof 2 for the holder (force is applied instead)
##
session.viewports['Viewport: 1'].assemblyDisplay.setValues(
    step='Displace punch')

mdb.models['explicit'].boundaryConditions['RefHolderBC'].setValues(u2=UNSET)

##
##  adjust displacement bc for punch to account for no clearance
##  use smooth step amplitude
##
mdb.models['explicit'].boundaryConditions['RefPunchBC'].setValuesInStep(
    stepName='Displace punch', u2=-0.030, amplitude='smooth2')

##
##  change element library to EXPLICIT
##
import mesh
session.viewports['Viewport: 1'].assemblyDisplay.setValues(mesh=ON)
session.viewports['Viewport: 1'].assemblyDisplay.meshOptions.setValues(
    meshTechnique=ON)
elemType1 = mesh.ElemType(elemCode=CPE4R, elemLibrary=EXPLICIT, 
    secondOrderAccuracy=OFF, hourglassControl=ENHANCED, distortionControl=OFF)
elemType2 = mesh.ElemType(elemCode=CPE3, elemLibrary=EXPLICIT)

p = mdb.models['explicit'].parts['Blank']
p.setElementType(regions=regions, elemTypes=(elemType1, elemType2))

a.regenerate()
p.generateMesh()

##
##  create job
##
mdb.Job(name='expChannel', model='explicit', 
    description='Analysis of the forming of a channel-quasistatic')

a = mdb.models['standard'].rootAssembly
a.regenerate()
a = mdb.models['explicit'].rootAssembly
a.regenerate()

mdb.save()

gsi_channel_caemodel_spring.py

#
# Getting Started with ABAQUS
#
# Script for springback portion of channel example
#
from abaqus import *
from abaqusConstants import *
session.journalOptions.setValues(replayGeometry=COORDINATE, 
    recoverGeometry=COORDINATE)
session.Viewport(name='Viewport: 1', origin=(1.3671875, 1.3671875), 
    width=201.25, height=135.625)
session.viewports['Viewport: 1'].makeCurrent()
Mdb()
a = mdb.models['Model-1'].rootAssembly
session.viewports['Viewport: 1'].setValues(displayedObject=a)
openMdb('Channel.cae')
a = mdb.models['explicit'].rootAssembly
session.viewports['Viewport: 1'].setValues(displayedObject=a)

##
##  Springback analysis model
##

mdb.Model(name='import', objectToCopy=mdb.models['explicit'])

a = mdb.models['import'].rootAssembly
session.viewports['Viewport: 1'].setValues(displayedObject=a)

a.deleteFeatures(('Punch-1', 'Holder-1', 'Die-1', ))
del mdb.models['import'].rootAssembly.sets['RefDie']
del mdb.models['import'].rootAssembly.sets['RefHolder']
del mdb.models['import'].rootAssembly.sets['RefPunch']
del mdb.models['import'].rootAssembly.surfaces['BlankBot']
del mdb.models['import'].rootAssembly.surfaces['BlankTop']
del mdb.models['import'].rootAssembly.surfaces['DieSurf']
del mdb.models['import'].rootAssembly.surfaces['HolderSurf']
del mdb.models['import'].rootAssembly.surfaces['PunchSurf']
del mdb.models['import'].steps['Displace punch']
del mdb.models['import'].steps['Apply holder force']

region = a.sets['Center']
mdb.models['import'].XsymmBC(name='BC-1', createStepName='Initial', 
    region=region)

region = a.sets['MidLeft']
mdb.models['import'].VelocityBC(name='BC-2', createStepName='Initial', 
    region=region, v1=UNSET, v2=SET, vr3=UNSET, amplitude=UNSET, 
    distribution=UNIFORM, localCsys=None)

mdb.models['import'].StaticStep(name='springback', previous='Initial', 
    initialInc=0.1, nlgeom=ON, stabilizationMagnitude=0.0002, 
    stabilizationMethod=DISSIPATED_ENERGY_FRACTION)

instances=(a.instances['Blank-1'], )
mdb.models['import'].InitialState(updateReferenceConfiguration=OFF, 
    fileName='expChannel', endStep=LAST_STEP, endIncrement=STEP_END, 
    name='Field-1', createStepName='Initial', instances=instances)

mdb.Job(name='springback', model='import', 
    description='Analysis of the forming of a channel-springback')

a = mdb.models['import'].rootAssembly
a.regenerate()

mdb.save()