Академический Документы
Профессиональный Документы
Культура Документы
extension
User
Inputs
Benefits of ACT:
• Get a plot which can be view as 3D like other graphical
results. User can zoom, pan, and rotate etc.
• User can select the geometry and set the mode number
interactively, can also scope to geometry/named selection
• Min and Max results are available for parameterization
• Results are available in the selected unit system
Start with
• WB project file velocity_vector_plot_ACT.wbpz
– It has all the settings done (material, loads, analysis settings etc.)
XML
• Need a button in toolbar for the
‘velocity plot’
• Details of the result object:
– Scope to Geometry or Named
Selection
Python
• Create the result object under Solution
• Collect the user inputs
1st Method: Use APDL commands
• Convert the user inputs to APDL
commands
• Start MAPDL in background and
use the APDL commands to
generate a file with the velocity
components on nodes
• Read the above file and plot the
velocity vector plot
nd
2 Method: Use Native Python APIs
Comes by default for a • Get the velocity components on
nodes
result object • Plot the velocity vector plot
7 © 2011 ANSYS, Inc. December 3, 2012
8 © 2011 ANSYS, Inc. December 3, 2012
Developing the GUI
The <details> tag encapsulates the properties that will be applied to the actual
definition of the result. These properties will be displayed in the "Details" pane
11 © 2011 ANSYS, Inc. December 3, 2012
Developing the GUI (4)
! Refer to the “Developers Guide” document for the various options for any element
result refers to the ACT result object. The user inputs can be accessed using this reference
step refers to the result set number for which results need to be evaluated.
The step value is passed from the substep/time selector in the details of the result object
In the Session-2, we have seen how to access a load via the IronPyton Console for
! debugging purpose. The result object can be accessed in the same way.
Although the 1st method [Use of APDL commands] and 2nd method [Use of Native Python APIs] used
different approaches, at the end they both update a few dictionaries with node velocities
22 © 2011 ANSYS, Inc. December 3, 2012
Callback function to plot results (for both the
options)
• Display results at node, this information comes from the xml file at location = “node”
• This function is called for each node [based on use selection of scoping]
• A node ID is passed and it returns the velocity x , y and z components from the dictionary
[already stored in the onstarteval callback] to draw the velocity vector
Custom Load
Custom Post-processing