FEA - Abaqus Scripting Interface

FEA - Abaqus Scripting Interface

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:

  • Significantly smaller file size
  • Quick variable changes compared to changes made using GUI
  • Fewer distractions
  • Quicker simulation times (compared to number of clicks required when using GUI)

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:

  • Step 1: copy and paste the code in a word editor i.e. notepad
  • Step 2: save the file with .py extension i.e. arcan.py
  • Step 3: open Abaqus/CAE
  • Step 4: click on File Menu
  • Step 5: click on Run Script
  • Step 6: find and select the file you just saved i.e. arcan.py
  • Step 7: it will start the script and solve


################### 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 ###################

要查看或添加评论,请登录

Muhammad Farhan的更多文章

  • CI: Kaizen Day

    CI: Kaizen Day

    INTRODUCTION Manufacturing companies run like clockwork, there is no time to waste, day shifts, night shifts, rework…

    1 条评论
  • CI: Learning Huddle

    CI: Learning Huddle

    INTRODUCTION We have all been there where the team we work in is dysfunctional – people are not treated with respect…

    1 条评论
  • How Volcanoes affect the Aircrafts?

    How Volcanoes affect the Aircrafts?

    Volcanic Activity Volcano is a natural phenomenon and it is caused by converging and diverging tectonic plates of the…

  • Which CAE Software is better?

    Which CAE Software is better?

    Introduction One of the burning questions among engineers is "which is better?" when comparing different software…

    2 条评论
  • Importance of 2D Drafting for a Design Engineer

    Importance of 2D Drafting for a Design Engineer

    When we started working with 3D models in CAD programs like SolidWorks, Inventor or Creo, 2D drafting such as AutoCAD…

  • Sheetmetal Design - Lessons from Experience

    Sheetmetal Design - Lessons from Experience

    Flat-Pattern and DXF Files When working with sheetmetal, the most important aspects are the flat pattern and DXF file…

    1 条评论
  • Parametric Modelling - Lessons from Experience

    Parametric Modelling - Lessons from Experience

    Variables Variables in CAD modelling are becoming more popular and the reason is time saving when a model is changed…

  • Graduated... now what?

    Graduated... now what?

    I have mentored several graduates and early professionals during my professional career. Drawing from my own…

    4 条评论

社区洞察

其他会员也浏览了