HM-8090: Create an OptiStruct PSHELL Property
In this tutorial you will create an OptiStruct PSHELL property.
- Prompts you for a property name and thickness
- Creates the property collector
- Assigns the OptiStruct PSHELL card image to the property collector
- Assigns the thickness value to the property
The Tcl command if will be used to add logic to the script. The commands *dictionaryload and *attributeupdatedouble are used to assign information to the property collector.
Solver-specific data created from the HyperMesh template system is stored in card images. Each piece of data that defines a card image has a text string (data name) and a numeric attribute ID. An example is the Young’s Modulus for a material.
Templates exist for each solver supported by HyperMesh and are located in sub-folders under the <altair_home>\templates\feoutput directory. These templates define every solver-specific attribute including data names, attribute IDs, card image formats, and the format of the data upon export. The *defineattribute command is used to define attribute data names and IDs in a template file.
In order to determine the commands required to create template-specific data, it is best to run through the process inHyperMesh and to review the commands that are written to the command file.
Property collectors can be created and edited using the Model Browser. Simply right-click in the Model Browser and select to create one. To change the name, color, or card image of a property collector, right-click on the property name in the Model Browser and select Edit.
Define the Process
In this step, you will define the process.
- Prompt you to enter a name and a thickness value.
- Make sure a property collector with the supplied name does not already exist.
- Create the new property collector.
- Assign the PSHELL card image to the property.
- Assign the thickness to the PSHELL card.
Delete the Existing Command File
In this step you will delete the existing command file.
The current command file is located in the current working directory. When first opening HyperMesh, the file is created in the directory HyperMesh is launched from. As soon as you begin working in HyperMesh, all executed commands are written to the command file. If the file already exists, the commands are appended to the file. Deleting the file allows HyperMesh to create a new file and allows you to easily find the relevant commands.
- Locate the existing command.tcl file in the working directory.
- Delete the file.
Perform the Operations
In this step you will execute the process within HyperMesh.
Every command issued in HyperMesh appears in the order executed and is reflected in the command file.
- If the OptiStruct user profile is not currently loaded, load it now.
- Right-click in the Model Browser and select .
- Leave Type set to all and in the Name field, type a name for the property.
- For card image=, select PSHELL.
- Check the option for Card edit property upon creation.
- Click Create.
- Activate the T field and type a thickness value.
- Click return.
Extract Commands
In this step you will extract commands from the command file.
- Open the command file using any text editor.
- Select and copy all lines in the file.
Convert Commands to Tcl Format
In this step you will create a Tcl script by converting the commands to Tcl format and modifying as necessary.
Test the Script
In this step you will test the script.