Ansys APDL and WB
Ansys APDL and WB
48
Best of Both Worlds:
Combining APDL with
ANSYS Workbench for
Structural Simulations
using ANSYS Workbench techniques with APDl delivers
the most benefit from ANSYS structural mechanics solutions.
By Pierre Thieffry, Lead Product Manager, ANSYS, Inc.
Whether you are a longtime ANSYS
Mechanical APDl user wondering,
What is so good about ANSYS
Workbench that everyone suggests I
use it? or an ANSYS Workbench user
thinking, I cant find the button, so
how can I use this feature? you can
make better use of ANSYS mech-
anical solutions by combining all of
the available technologies. Doing so
will allow you to achieve process
compression while performing more-
advanced simulations.
APDl ANSYS Parametri c
Design language is the primary
l anguage used to communi cate
with the ANSYS Mechanical APDl
solver. This scripting language can be
used to automate common tasks or
even to build a parametric model.
APDl encompasses a wide range of
other features, such as if-then-else
constructs, do-loops, and vector and
matrix operations.
The ANSYS Workbench platform
allows users to create new, faster
processes and to efficiently interact
with external tools such as CAD
systems. It provides a foundation for
easy multiphysics simulation and
enhanced company-wide communi-
cation of simulation results. Those
performing a structural simulation use
a graphi cal i nterface (cal l ed the
ANSYS Workbench Mechani cal
application) that employs a tree-like
navigation structure to define all
parts of their simulation: geometry,
connections, mesh, loads, boundary
conditions and results.
By utilizing the ANSYS Workbench
platform, the user saves time in many
of the tasks required to perform a
simulation. The bidirectional links
with all major CAD systems offer a
very efficient way to update CAD
geometries along with the design
parameters. The meshi ng tool s
available in ANSYS Workbench are
based on some of the best algor-
ithms ANSYS has developed for
example, structural users can now
benefit from technologies that once
were available only to CFD users, and
vice versa. The ANSYS Workbench
Mechanical application has proven
to be a very efficient way to quickly
set up mechanical analyses. Auto-
mated contact detection is probably
the most noticeable advantage as
compared to the l ong-standi ng
ANSYS Mechanical APDl interface.
ANSYS Workbench includes auto-
mation capabilities in addition to those
provided by APDl. For example, when
looking at design variations, a user can
easily perform geometric variations
by directly modifying the parametric
CAD models. In the case of coupled
analyses such as thermalstress or
prestressed modal analyses, all data
shared among the various simulations
are handled automatically, allowing the
user to focus on designing a better
product rather than having to worry
about file management.
As an ANSYS Wor kbench
Mechanical application user, you may
TIPS AND TRICKS
ANSYS Advantage Volume IV, Issue 1, 2010 www.ansys.com 49
wish to perform tasks that are not
nati vel y avai l abl e. For exampl e,
consider that you want to use a
material model not available from
engineering data, to use a contact
option not available from the menus,
or even to perform a more-complex
t ask, such as a submodel i ng
analysis. The solution is to insert
APDL Commands objects to send
additional instructions to the solver.
When you click on the Solve icon,
the ANSYS Workbench Mechanical
appl i cat i on adds t hese APDL
commands to the input file for the
ANSYS Mechanical APDL solver. The
Commands objects (also referred to
as sni ppets) can be i ncl uded at
the Geometry level for modifying
element types or material properties
(Figure 1). At the Connections
level, additional contact options or
non-linear spring definitions can
be introduced. Commands inserted
under the analysis branch provide
the flexibility to add pre-processing
act i ons, l oads and boundar y
condition definitions, or solution
settings. When used under Solution,
commands allow accessing the APDL
post-processors and could be used,
for example, to perform complex
operations on results or to export
data to an external tool. Commands
objects can be edited manually, or
exi sti ng macros can be di rectl y
imported. The Named Selections in
ANSYS Workbench Mechanical are a
key companion feature to Commands
objects, as they are converted to
nodal or element components that
can be referenced.
If you are an ANSYS Mechanical
APDL user and your company has
created and validated APDL macros
for many years, these scripts can be
reused directly or with slight changes.
The current version of the ANSYS
Wor kbench proj ect schemat i c
contains a Mechanical APDL system
that can be linked to a structural
analysis (Figure 2). You can then use
Figure 1. APDL commands for defining
additional material properties
Figure 2. Applying APDL scripts to a base
ANSYS Workbench model
macros to operate on the model or
the results of the ANSYS Workbench
Mechanical analysis. The ANSYS
Mechanical APDL system will accept
a list of APDL files to be executed
sequenti al l y on any data that i s
provided by the upstream analysis.
Furthermore, you can define input and
output parameters from the variables
of your APDL script and combine them
with other parameters in the project.
For example, APDL variables can be
mi xed wi th CAD di mensi ons to
perform design variations. All standard
solver options, such as job definition
and licensing options, are defined with
Figure 3. Multiple scripts applied to a model
and solver option definitions
the ANSYS Mechanical APDL system
(Figure 3).
It is likely that users will not be
able to convert all their existing
procedures at once, but you can start
with the processes that will most
benefit from the advantages of the
ANSYS Workbench platform. And if
you have an entire procedure scripted
in APDL that does not require any
user interface, you probably dont
need to use ANSYS Workbench for
that specific case.
ANSYS Mechanical APDL users
may want to take a l ook at the
benefits of the ANSYS Workbench
platform to see how much time can be
saved on geometry import and modifi-
cations, meshing, contact detection
and general model setup. If you are
an ANSYS Workbench user and have
found you need functionality that is not
available as a button or menu, then
learning APDL is definitely worth
investing the small amount of time that
can result in huge dividends. n
TIPS AND TRICKS
ANSYS is the true test of product readiness. Go to www.ansys.com to learn more.
Or call us at 1 (866) 267 9724. Smart products require smart design tools.
The chances of jamming this blender with oranges are probably fewer than
jamming it from crosstalk emitted by other electronics all around us.
Electromagnetic Interference. EMI. A prime suspect in recent auto and aircraft
safety issues. And the hidden culprit in what may be the most daunting
engineering challenge of our time.
Todays most innovative and quality-driven companies are just beginning to
understand the domino effect of modern products bursting with ingredients.
Electronics and a cacophony of other interconnected systems and physical
components each one talking over the other.
This new era of smart products doesnt seem so smart if you try to design things
the same old way. Product design leaders rely on ANSYS engineering simulation
software for analyzing the interplay of electromagnetic emissions, structural
mechanics and fluid dynamics.
Are you talking to me?