Customization and Automation of Simulation Workflow PDF
Customization and Automation of Simulation Workflow PDF
Baseline Optimized
Design Design
Data-integrated applications
– Share data and parameters with Workbench,
native applications, and other data-integrated
applications
– Independent UI, window
– E.g., Mechanical, Mechanical APDL,
CFX, FLUENT, DesignModeler
– Scripting Language: JScript, Scheme, APDL …
5 © 2011 ANSYS, Inc. June 21, 2012
Workbench Scripting Overview
Application-level Scripting
• For task automation at the application level
– Mechanical, DM, Meshing: JScript
– CFX: CCL
– FLUENT: Scheme
– MAPDL: APDL
Workbench Scripting
• For task automation at project level
– Creating project, performing parameters simulations,
optimization etc.
• Works “hand-in-hand” with scripting in DIAs
– Can embed JScript, CCL, Scheme, APDL
Node coupling
Sub-modeling simulation in Mechanical
Acoustics simulation in Mechanical
Custom result – “Contact Force Vectors”
2D Convection Load extension
Clamp and Displace extension
Third party solver connection
Speaker
Underwater
/prep7
thickness = 0.001
film_coefficient = 200.
temperature = 120
cmsel,s,component
*GET,n_el,ELEM,0,num,max
*GET,mat1, ELEM,n_el,ATTR,MAT
et,100,152
keyop,100,8,2.
et,1001,131
keyo,1001,3,2
sectype,1001,shell
secdata,thickness,mat1
secoff,mid
emodif,all,type,1001
emodif,all,secnum,1001
type,100
esurf
fini
alls
/solu
esel,s,type,,100
nsle
sf,all,conv,film_coefficient,temperature
allsel, all APDL WB Mechanical
18 © 2011 ANSYS, Inc. June 21, 2012
Clamp and Displace extension
LS-1 LS-2
LS-3
LS 2
LS 3
Optimal design
Verification
25 © 2011 ANSYS, Inc. June 21, 2012
Using ACT extensions
Extension Manager to
Load / Unload
available extensions
Functions list
Info window
Output window
Geometry
XML definition Pre-Processing Python
object scripts Mesh
Simulation data
Post-Processing
Results
object
UI Events
• Solution:
– A new script is written for this automation
– This solution works fine on all versions on Mechanical (R11 to R14)
• Solution:
– A script is written for this automation
– A macro enabled Excel file helps user to provide correct inputs
– An additional script is also provided to rename contacts appropriately (not generated
from Excel file)
• WB Python journal is used for getting inputs from MS Excel, performing the simulation
and publishing results back to MS Excel
• Similarly other simulations (FLUENT, HFSS etc.) can be done
Provide the
Parameters for
the Design Point
study
Both the DPs areissolved,
WB simulation startedProject
in is
DP1saved.
simulation is done.
the background.
DP1 simulation is
DP2Pressure
Updating…
Updating…drop values from those
analysis are updated in Excel
• WB Python journal is used for getting inputs from MS Excel, performing the
simulation and publishing results back to MS Excel
• Similarly other simulations (Mechanical, HFSS etc.) can be done
• Generate the
Mixing Tank
interactively
• Geometry
Parameters are
exposed in WB
for design point
studies
• Different
analyses can be
combined easily
• An unified
customized
report can be
generated
37 © 2011 ANSYS, Inc. June 21, 2012
Using the Excel Component in WB
L = 30
d=3
• Generate the
Mixing Tank
interactively
• Geometry
Parameters are
exposed in WB
for design point
studies
• Different
analyses can be
combined easily
• An unified
customized
report can be
generated
40 © 2011 ANSYS, Inc. June 21, 2012
Other possibilities
(Common)