Академический Документы
Профессиональный Документы
Культура Документы
(reuse APDL)
User
Inputs
/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
*GET,n_el,ELEM,0,num,max
*GET,mat1, ELEM,n_el,ATTR,MAT
XML
• Need a button in toolbar for
the ‘bladeLoad’
• Details of the load:
– Scope to Geometry or
Named Selection
• Only allow body selection
– Other inputs with
appropriate units
Python
• Create the load under analysis
• Insert the desired APDL
commands to ‘ds.dat’ during
runtime
1. Collect the user inputs
2. Convert the user inputs to
APDL commands
3. Reuse the APDL commands
for applying the load using
the user inputs
6 © 2011 ANSYS, Inc. December 3, 2012
7 © 2011 ANSYS, Inc. December 3, 2012
Developing the GUI
The <property>
element and its children
provide the means to
define the properties
that are required for
this load. Through this
definition, these
properties will appear
in the “Details” pane
! Refer to the “Developers Guide” document for the various options for any element
The value of the control attribute specifies the type of UI control to use
in the details view for this property.
• The text control activates a text area in which the user defines input
data.
• The select control activates a drop-down menu that contains a list of
available definitions.
• Static list using attributes
• Dynamic list using onactivate callback to manage the refresh
• The applycancel control activates an Apply/Cancel button based
on one user-defined selection. This control is the most generic
control type that can be used with callbacks to integrate a variety of
scenarios.
For any function, ExtAPI is available and represents the main entry point for all the
services provided by the Application Customization Toolkit.
[we have seen examples of this in the Session-2]
stream refers to the ANSYS DAT (ds.dat) file generated when the Solver is launched
load refers to the ACT load object. The user inputs can be accessed using this
reference
*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
20 © 2011 ANSYS, Inc. December 3, 2012
Demo the extension