FEA - Abaqus Scripting Interface
Muhammad Farhan
MRAeS | MIEAust | Aeronautical Engineer @ Qantas Airways | Airbus A350 | Airbus A330 | Project Management | Aviation Enthusiast | Tech Savvy
Abaqus Scripting Interface (ASI) is a Python-based scripting platform for Abaqus/CAE. Using this, you can simulate an entire problem, create macros, or create add-on modules. Generally Abaqus’s GUI is quite intuitive and we don’t think of working with ASI. However, when performing multiple scenarios and making use of complex assemblies - file size is one of the many benefits that ASI can help you with.
An example would be simulating mixed mode loading conditions using Arcan fixture and butterfly specimen. The specimen is required to be tested at different angles (different loading conditions), however overall setup remains the same. Now I can “save as” multiple instances of simulation results, each file may be about 20-30 MB each depending on the result variables selected.
In ASI I can create variables for each loading condition and simply edit the variable in the text file, then run the simulation. Text files are 2-3 KB each. Some of the benefits you will receive when using ASI are:
An example of a butterfly specimen is given below using aluminium alloy AA2219. Note that this is for ASI demonstration purposes only, accuracy of the results is not verified here. Here are the steps to test the given script:
################### CODE STARTS HERE ###################
from abaqus import*
from abaqusConstants import*
from caeModules import*
myModel = mdb.Model(name=’Arcan’)
import part
mySketch=myModel.ConstrainedSketch(name=’Profile’,sheetSize=62.5)
mySketch.Line(point1=(0,0), point2=(0,46))
mySketch.Line(point1=(0,46), point2=(62.5,46))
mySketch.Line(point1=(62.5,46), point2=(27.42893219,7.071067812))
mySketch.ArcByCenterEnds(center=(34.5,0),point1=(24.5,0),point2=(27.42893219,7.071067812),direction=CLOCKWISE)
mySketch.Line(point1=(24.5,0), point2=(0,0))
myArcan=myModel.Part(name=’arcan_sample’,dimensionality=THREE_D,type=DEFORMABLE_BODY)
myArcan.BaseSolidExtrude(sketch=mySketch,depth=5.0)
import material
myAluminium = myModel.Material(name=’AA2219′,description=’AA2219 from matweb.com’)
elasticProperties = (68.9E3,0.33)
myAluminium.Elastic(table=(elasticProperties,))
mdb.models['Arcan'].materials['AA2219'].Plastic(table=(
(138.07, 0.00),
(152.28, 0.01),
(175.66, 0.04),
(190.40, 0.07),
(202.35, 0.10),
(210.90, 0.12),
领英推荐
(217.50, 0.15),
(219.48, 0.16))?????????)
import section
mySection = myModel.HomogeneousSolidSection(name=’arcansection’,material=’AA2219′)
region = (myArcan.cells,)
myArcan.SectionAssignment(region=region,sectionName=’arcansection’)
import assembly
myAssembly = myModel.rootAssembly
myInstance = myAssembly.Instance(name=’arcanInstance’,part=myArcan,dependent=OFF)
import step
myModel.StaticStep(name=’Step1′,previous=’Initial’,timePeriod=1,initialInc=0.1)
import load
endFaceCenter = (10,0,2.5)
endFace = myInstance.faces.findAt((endFaceCenter,))
endRegion = (endFace,)
myModel.DisplacementBC(name=’Fixed’,createStepName=’Step1′,region=endRegion,u1=0.0,u2=0.0,u3=0.0)
topFaceCenter=(30,46,2.5)
topFace = myInstance.faces.findAt((topFaceCenter,))
topSurface = ((topFace,SIDE1),)
myModel.Pressure(name=’Pressure’,createStepName=’Step1′,region=topSurface,magnitude=-20)
import mesh
region=(myInstance.cells,)
elemType=mesh.ElemType(elemCode=C3D20R,elemLibrary=STANDARD)
myAssembly.setElementType(regions=region,elemTypes=(elemType,))
myAssembly.seedPartInstance(regions=(myInstance,),size=4.0)
myAssembly.generateMesh(regions=(myInstance,))
import job
jobName=’quarter_90_deg’
myJob=mdb.Job(name=jobName,model=’Arcan’)
myJob.submit()
myJob.waitForCompletion()
################### CODE ENDS HERE ###################