Вы находитесь на странице: 1из 14

Workshop 16a

Workshop 16a: Command Snippets


Goal:
Use Command Snippets to:
o o

Apply offset nodal coupling for static cyclic symmetry. Generate an expanded solution image in Mechanical.

9/28/2009 SimuTech/ROI Proprietary

Workshop 16a: Command Snippets

Workshop 16a
1. Launch ANSYS Workbench (Start -> All Programs -> ANSYS 12.0 -> Workbench) 2. Import the file Complex Cut Sector.mechdat 3. RMB click the Setup Cell and choose Edit to launch Mechanical.

9/28/2009 SimuTech/ROI Proprietary

Workshop 16a: Command Snippets

Workshop 16a
Model Description:
The model is a single sector that has matching complex non-planar radial cuts on the low and high sides. We want to analyze the single sector undergoing a static rotational velocity of 5000 RPM. The Mesh, Loading and BCs have been predefined. However, we need to apply proper boundary conditions at the radial cuts as planar symmetry is NOT appropriate (recall the discussion from Chapter 6: Loading & Solution). As there is currently no direct way to achieve the boundary conditions required from the WB Mechanical GUI, we will use a Command Snippet and APDL to do so.
9/28/2009 SimuTech/ROI Proprietary

Workshop 16a: Command Snippets

Workshop 16a
Model Description contd:
Recall that for non-planar radial cuts, we need to Couple the nodal DOFs at the cut boundaries w.r.t. a cylindrical coordinate system. To achieve this, we need to have matching nodal patterns on the cut boundaries (i.e. the low and high cut boundaries).

Fortunately, WB Mechanical has a mesh method that achieves this very requirement called Match Control. Review the predefined definition.

9/28/2009 SimuTech/ROI Proprietary

Workshop 16a: Command Snippets

Workshop 16a
Define the Cyclic Symmetry BCs via Command Snippet:
We want to select the nodes on the cut boundaries. To do so, create a Named Selection of these two faces.
Select the two cut boundary faces. 2. RMB click in the graphics window and choose Create Named Selection. 3. Enter the name Cut_Faces (creates an ANSYS nodal component of the same name)
1.

2
9/28/2009 SimuTech/ROI Proprietary

Workshop 16a: Command Snippets

Workshop 16a
Define the Cyclic Symmetry BCs via Command Snippet contd:
Insert a Command Snippet in the Environment branch.
Select the Environment branch Static Structural Rotational Velocity and from the Context Sensitive Toolbar insert a Command Snippet. 2. Select the Command Snippet object and Import the file CP_SECTOR.MAC.
1.
1

9/28/2009 SimuTech/ROI Proprietary

Workshop 16a: Command Snippets

Workshop 16a
Review the contents of the Command Snippet:
1.

Notice that we need to be in the Preprocessor (/PREP7) to perform the coupling operation. Since we are at the Environment level, we must switch this back to the Solution processor (/SOLU) at the end of the script. Failing to do so will cause a general error in Mechanical.

2.

The CPCYC command is used to couple the offset nodes (refer to the Mechanical APDL online help for syntax). Notice that we have specified a 45 degree offset w.r.t. local cylindrical coordinate system #12. This has been predefined in Mechanical with manual numbering.
Workshop 16a: Command Snippets

9/28/2009 SimuTech/ROI Proprietary

Workshop 16a
Create a static image of the Expanded Total Displacement:
Insert a Command Snippet in the Solution branch.
Select the Solution branch and from the Context Sensitive Toolbar insert a Command Snippet. 2. Select the Command Snippet object and Import the file EXPAND_SECTOR.MAC.
1.
1

9/28/2009 SimuTech/ROI Proprietary

Workshop 16a: Command Snippets

Workshop 16a
Review the contents of the Command Snippet:
1.

At first glance this set of commands may look complicated, but really is not. Most of the commands are for model orientation, background color, window legend setup, and image pixel resoltion. The /EXPAND command is used in conjunction with local cylindrical system 12 to expand the image to the full model. The /SHOW,PNG command block is used to generate the image to file. This static image is automatically imported to Mechanical as a child object to the Command Snippet. Notice that we turn OFF the expansion via /EXPAND,0 at the end of the script so as not to interfere with WB Mechanical processes.

2.

3.

4.

3 4
9

9/28/2009 SimuTech/ROI Proprietary

Workshop 16a: Command Snippets

Workshop 16a
Verify the nodal coupling operation in Mechanical APDL:
1. 2.

Go to the WB GUI. From the WB GUI, drag and drop a Mechanical APDL Component system onto the Setup Cell of the Structural System. RMB click on the Linked Setup Cell and choose Update.
4 2

3.

4.

RMB click on the Analysis Cell of the Mechanical APDL Component system and choose Edit in Mechanical APDL
Workshop 16a: Command Snippets 10

9/28/2009 SimuTech/ROI Proprietary

Workshop 16a
Verify the nodal coupling operation in Mechanical APDL contd:
1.

The model should now be open in Mechanical APDL. If you cant see the model, just perform a Fit View. If required, turn ON BC Symbols. Offset nodal coupling shows up as green links on node pairs from the low to high side. Plot nodes for clarity.
HINT: A more definitive check is that the total number of nodes in the coupled sets generated should match the number associated with both cut faces. Verify that the number of selected nodes is equal for:
1. 2.

2.

Select nodes by component: CMSEL,S,Cut_Faces


Select nodes by coupled set: NSEL,S,CP,,ALL

Use /STAT,GLOBAL to list the current selection status after each command.
9/28/2009 SimuTech/ROI Proprietary

Workshop 16a: Command Snippets

11

Workshop 16a
Solve the Model and view the results:
1. 2.

Go back to the Mechanical GUI. Select the Solution branch and RMB click to Solve.
2

3.

Review the results. Be sure to click on the static image generated by the command snippet in Solution!

9/28/2009 SimuTech/ROI Proprietary

Workshop 16a: Command Snippets

12

Workshop 16a
Time permitting, suppress the Command Snippet with the nodal coupling definition and rerun:
1.

RMB click on the Command Snippet under the Environment and choose Suppress.
Select the Solution branch, RMB click to Solve, and review the results.
1

2.

Notice the differences in the response from the original run, particularly the boundary mismatch in the expanded plot. This is totally incorrect!

9/28/2009 SimuTech/ROI Proprietary

Workshop 16a: Command Snippets

13

Workshop 16a
Time permitting, use the advanced CYCLIC command in a Command snippet and rerun:
1.

Insert a new Command Snippet under the Environment and type in the commands as shown.
Select the Solution branch, RMB click to Solve, and review the results.

2.

Notice that results are identical to our original setup, all via a single command! The CYCLIC command automatically finds and correctly sets up the required sector boundary conditions. Now thats powerful! This is available for Structural licenses and above.

9/28/2009 SimuTech/ROI Proprietary

Workshop 16a: Command Snippets

14

Вам также может понравиться