Vous êtes sur la page 1sur 11

Workshop 5a: Select Logic

15.0 Release

Introduction to Mechanical
APDL (MAPDL)
1 © 2015 ANSYS, Inc. March 30, 2015
Select Logic
Read in input file “select_logic.inp” to create and solve the model shown below.
Two plates are joined by 3 tubes. The outer perimeter of the lower plate is fixed.
Pressure loads are applied to the edges of the upper plate. A contour plot of the
Von Mises stress is produced. The model runs in about 1 minute.
Objective: use select logic to create another Von Mises stress contour plot of only
the weld fillets at the joints between the tubes and the lower plate.

2 © 2015 ANSYS, Inc. March 30, 2015


Select Logic
Plot lines and zoom in for better visibility of the volumes we will select next

3 © 2015 ANSYS, Inc. March 30, 2015


Select Logic
Use the Select Entities dialogue. Use LMB to pick the conical weld fillet volumes
on-by-one (without using the Ctrl button) as shown.

4 © 2015 ANSYS, Inc. March 30, 2015


Select Logic
Once all the weld fillet volumes have been selected, choose OK and use the Sele
Belo button to select the elements comprising the mesh of these volumes and
replot.

5 © 2015 ANSYS, Inc. March 30, 2015


Select Logic
Another line plot will be produced, but this time you should only see those lines
used by the volumes you selected. Use the Main Menu to create a new contour
plot of the Von Mises stresses.

6 © 2015 ANSYS, Inc. March 30, 2015


Select Logic
This is what you should see... objective achieved.

7 © 2015 ANSYS, Inc. March 30, 2015


Select Logic
Now select the entire model and replot.

8 © 2015 ANSYS, Inc. March 30, 2015


Select Logic
Click on the WELDS button in the Toolbar. This calls a macro that automatically
selects the weld volumes and elements and creates the replot.

9 © 2015 ANSYS, Inc. March 30, 2015


Select Logic
How was the macro created, how does it work, and how was the toolbar button
that calls it added to the toolbar?
First, note that the input file contains the following lines to create a cylindrical
coordinate system on the centerline of each tube. Note parameters “n_tubes”
(the number of tubes joining the plates) and “r_major” (the major radius upon
which all the tube centerlines reside). The model is fully parameterized.

10 © 2015 ANSYS, Inc. March 30, 2015


Select Logic
The input file also contains the lines shown below. The *CREATE command
redirects all commands that follow it to a file (“select_welds.mac”, in this case)
until a *END command is reached. The APDL sent to the macro uses the
coordinate systems created by the code on the preceding slide and select logic
commands that reference parameters defining model dimensions to do the
selection. The last 3 lines create the an abbreviation (“WELDS”) for
“select_welds” – the name of the macro, and place the abbreviation on the
toolbar.

11 © 2015 ANSYS, Inc. March 30, 2015

Vous aimerez peut-être aussi