Upload
duonglien
View
215
Download
0
Embed Size (px)
Citation preview
© 2011 CAE Associates
ANSYS Customization
Mechanical and Mechanical APDL
Presented by
Eric Stamper
2
Introduction
l CAE Associates Inc.— Engineering consulting firm since 1981.— ANSYS consulting, custom software development and training.— Sales and support network for ANSYS.
• One of the first 5 support distributors of ANSYS.— Headquartered in Middlebury, CT.
l Website: www.caeai.com.
3
Customization Options
l This presentation includes examples by CAE Associates.
l ANSYS customization examples are provided in the areas below:
l Mechanical APDL— Running ANSYS through Excel— GUI Customization— User Elements— User Material Laws
l Workbench— Project Page— Mechanical GUI
© 2011 CAE Associates
Mechanical APDL Customization
Running ANSYS from Excel
5
Mechanical APDL Customization
l Customer is not familiar with ANSYS, but wants to run ANSYS analyses.l Excel interface drives design inputs and post-processes ANSYS results.l ANSYS & Excel Communication
Excel interface
Call Visual BasicWrite out ANSYS
input file
VBA runs ANSYS and monitors process
ANSYS writes out results data
to a text file.
VBA reads in ANSYS data after process ends
Provide Inputs in Excel
Press Run Button in Excel
6
Mechanical APDL Customization
l Stand alone Excel sheet uses embedded Visual Basic and APDL scripts to run the design and analysis process.
— The Excel sheet can be used to force a user to follow a QA process where the analysis setup and results were checked against specific criteria.
Design Inputs
Run ANSYS
Analysis Settings & Material Properties
7
Mechanical APDL Customization
l ANSYS runs are recorded within Excel.l Desired results written out by ANSYS and summarized in Excel.l Seamless communication between Excel and ANSYS data.
ANSYS Results
ANSYS Results
© 2011 CAE Associates
Mechanical APDL Customization
SAP Translator GUI
9
Building Collapse Simulation
y
z
SAP ANSYS
l An analysis of the World Trade Center collapse was to be performed in ANSYS; however all the models were in SAP (a general FEA code used in the civil industry).
l A translator was written entirely in Tcl-Tk due to the way it handles array information matching closely to the format of a SAP file.
l Translates the cross sections with offsets, end releases, shells and model data into ANSYS.
10
Mechanical APDL Customization
SAP Model
Translated ANSYS Model
l Legacy SAP model translation into ANSYS
© 2011 CAE Associates
Mechanical APDL Customization
User Defined Failure Elements
12
Mechanical APDL Customization
l The World Trade Center building model consisted of several floors, each having hundreds of member connections.
l Modeling the detail of each connection would not be reasonable, however the temperature dependent failure modes and sequences of members and connections in a floor needed to be included.
13
Mechanical APDL Customization
l ANSYS does not have an element capable of capturing these types of failure modes
l Custom elements were created to simulate the loss of connection resistance after failure either from exceeding the connection force capacity or from exceeding the allowable deformation (for example, truss walking off the seat).
© 2011 CAE Associates
Mechanical APDL Customization
Custom Material Law
15
Mechanical APDL Customization
l Bone remodeling is a natural, lifelong process in which old bone is absorbed and replenished by new bone.
l The bone density is strongly influenced by the level of mechanical stimulus it receives.
l A lack of stimulus will weaken the bone, therefore after an implant is in place, the load should be evenly distributed.
l Customized finite element simulations were developed to evaluate long term, bone-implant interaction by characterizing bone density changes in hip and knee replacement.
l Initial conditions of bone density obtained from patient DEXA (dual energy x-ray absorptiometry) scans.
16
Mechanical APDL Customization
l CAE Associates incorporated a bone remodeling algorithm into ANSYS via the USERMAT material model user-subroutine.
l This algorithm is a material law that characterizes how bone density changes over time as a result of load path changes between the pre and post-operative stress/strain state in the bone.
— This nonlinear, iterative approach uses a remodeling signal based on the strain energy density to predict changes in bone density as a function of position and time.
— The modulus of each element was changed each iteration, resulting in varying strain energy and bone density over time.
l One output generated by the bone remodeling analysis procedure included the ability to perform “virtual DEXA” plots of the bone density at a given time to facilitate direct bone density comparisons to clinical data
17
DEXA Plot
l A DEXA plot is a grayscale 2D contour plot that represents the average density of the bone.
18
DEXA Plot
l DEXA plot example via ANSYS bone remodeling analysis.
Bone model shown with 3D density contour.
DEXA plot using 2 mm grid, 100 points along rays.
© 2011 CAE Associates
Mechanical Customization
Material Import GUI
20
Workbench Customization
l Users that have ANSYS APDL formatted material properties may want to be able to import them into Workbench in an automated way.
l A python script was used to convert the data from APDL into a XML formatted file. The XML file is then imported into WB.
21
Workbench Customization
l The material import script is called from a Project Page button.l APDL material libraries are read in from a directory and listed.
22
Workbench Customization
l Data will be added to the Engineering Data of the currently highlighted system.
— If an Engineering Data item does not exist for the System or no System is currently selected, a new Engineering Data Standalone system will be created.
23
Workbench Customization
l Material names and properties imported into Engineering Data
Material Properties for Ti1Ti1
© 2011 CAE Associates
Mechanical Customization
Queue Batch Solving of Mechanical Models with
External Software
25
Workbench Customization
l RSM can be used to queue and manage the solving of ANSYS jobs; however some customers may want to use their own queuing software.
l The interaction between Workbench and an external queuing software can be managed with a custom script.
26
Workbench Customization
l Submit Mechanical job to run in external batch queuing system (not RSM).
Mechanical Model File
Batch Queuing Control File and Parameters
27
Workbench Customization
l Exported Mechanical APDL model along with parameter file for batch queuing software.
l Python and Jscript automatically submits files to queuing software.
© 2011 CAE Associates
Mechanical Customization
Add Icons to GUI for Commonly Used Scripts
29
Mechanical Customization
l Custom scripts can be assigned to buttons and added into the Mechanical GUI Tool bars and Menu Bars.
— The buttons are created through a XML add-in that runs a JScript upon loading the Mechanical GUI.
— Clicking on a button calls a user created JScript.
30
Mechanical Customization
l Example: A Tool bar button is used to call script that creates named selections of all surfaces in the model.
l Used to improve geometry creation within FE Modeler.— FE Modeler can build geometry from nodal components.— A deformed mesh from a Mechanical simulation can be turned into CAD
geometry through this process.
© 2011 CAE Associates
Mechanical Customization
Combine CAD Attributes
32
Mechanical Customization
l CAD attributes are imported into Mechanical per body. The same “one” attribute name assigned in CAD therefore transfers over into multiple attributes all with the same name.
CAD attributes with repeated names
33
Mechanical Customization
l A script can be used to form one named selection of all similarly named CAD attributes
CAD attributes grouped into one named selection
© 2011 CAE Associates
Mechanical Customization
Setting User Defaults
35
Mechanical Customization
l The Mechanical GUI provides the user input to set various defaults, however not all settings within the GUI can be set.
36
Mechanical Customization
l Using scripting, any setting within the Mechanical GUI can become a user default.
l For example, the following global mesh controls are always set to:— Shape Checking = Standard Mechanical— Automatic Mesh Based Defeaturing = ON
37
Mechanical Customization
l As a best practice, it might be preferred to always use custom settings.— A customer can always start an analysis with company approved defaults.
l This can be accomplished with an add-in that calls a Jscript upon the first time Mechanical is opened.
— This example script keys off the geometry attach action to track the first time Mechanical is opened.
— A session variable is saved in the project afterwards, which ensures the script is not called again due to a geometry update.
38
Mechanical Customization
l The Jscript is attached to an action call back in Mechanical that prompts the user if they’d like to accept the custom default settings.
© 2011 CAE Associates
Thank You!