0 edit function – MTS Fracture Analyzer User Manual
Page 87
Description
Item
Show the user-defined type of functions. Functions created in the Geometry
Specimen Editor fall into the Geometry category. Functions created in the
Function Editor fall into the Test Definition category.
Category
Describe the function.
Description
Open the Edit Function window to create a new function.
Add
Confirm your request to delete the selected function.
Delete
Change the function’s definition using the Edit Function window.
Edit
Copy the function’s definition to a new function. Select the function and click
Copy.
Copy
Update all geometric-specific functions. This button removes existing functions
and copies all functions defined in all geometries in the domain.
Update All
Close the Functions window.
Close
7.7.1.0 Edit Function
Use the Edit Function window to create user-defined functions using the Python programming language. The
Edit Function window lets you do the following:
•
Create multi-line calculations and use them across test runs and analyses.
•
Enter If statements, Loop statements, and other statements as supported in Python for more complex
calculations.
•
Assign multiple variables to a function.
•
Interact with other external sources.
•
Validate statement syntax.
The validation section provides the result of the syntax check. The validation does not check for variable
scope or interaction with other functions and calculations. It is your responsibility to debug your functions and
ensure that they perform the calculations and results that you require.
You can enter the code in other editors and paste them into the Python Code work area.
Properties
Edit Function Properties
Description
Item
Shows the function name. A name that is unique within the test is prefilled in
the Function Name box. When you enter a function name in the work area,
Function Name
MTS TestSuite™ Fracture Analyzer User Guide 87
7.0 Variable Analysis