Custom Inputs: Nodal Hook

Tutorial Level: Advanced In this tutorial, you will use custom nodal input variables (such as varying nodal and elemental forces, boundary loads, and so on) for training.

In HyperMesh version 2025 and later:
  • The nodal coordinates and part IDs are automatically from the .h3d (or equivalent result) files provided. The coordinates are default inputs to the PhysicsAI model. The part IDs can be enabled by selecting the box next to it.
  • If select native decks are available, the thickness and material IDs are automatically parsed. For information about supported decks, see Frequently Asked Questions.
  • A nodal property defined on select nodes such as applied forces and constraints can be input through a .csv file with the same name and in the same location as each of the .h3d files. The nodal_hook.py python script is needed to read the .csv files.

The detailed instructions for each of these cases are provided in this tutorial.

Before you begin, copy the file(s) used in this tutorial to your working directory.
Note: Unzip the project custom_inputs.zip and inspect the contents. The nodal_inputs folder contains the nodal_hook.py, .h3d, and .csv files for Use Nodal Hook.
Default Inputs Imported from h3d
If only .h3d files are provided, the nodal coordinates and part ID are imported by default. Only the nodal coordinates are enabled by default.
Figure 1. Default


Natively read in thickness and material IDs
If select native decks are available in addition to the .h3d files, the thicknesses and material IDs are automatically parsed. The native decks should share the name with the corresponding .h3d files.
For information about supported decks, see Frequently Asked Questions.

Use Nodal Hook

For properties which are applied on selected nodes (such as forces or constraints) or to all nodes with varying values (such as distributed loads) within a model, the nodal hook should be used.

  1. Open the nodal_inputs folder.
    Inside the training_files folder, there are 20 .h3d files named run__0000X_gfem_wing.h3d and 20 .csv files named run__0000X_gfem_wing.csv files. Each .csv file contains a list of nodes and the values of the four custom inputs (applied forces in the X, Y, Z directions and the single point constraints) along with a header row.
    Figure 2. Nodal Property Inputs


  2. Create a new project called nodal_inputs.
    1. From the PhysicsAI ribbon, select the Create Project tool.
      Figure 3.


    2. In the Create Project dialog, enter nodal_inputs for Project Name.
    3. For Location, click Choose and select a save location for the project.
      Note: The save location for the project contains all files created by PhysicsAI, but the original files used for training do not need to reside in the project folder.
    4. Click OK.
  3. Copy the nodal_inputs_hook.py file into the _hooks folder inside the project folder.
  4. Create a new dataset using all the samples and name it Wing.
    1. From the PhysicsAI ribbon, select the Create Dataset tool.
      Figure 4.


      The Create Dataset dialog opens.
    2. For Dataset Name, enter Wing.
    3. For File System, click and navigate to the training_files folder.
    4. Select and transfer all of the .h3d files.
    5. Select the Enable train test split check box and verify 80 is defined for Train %.
      Figure 5.


    6. Click OK.
      The dataset is extracted and the Datasets dialog opens.
    7. Click Close.
  5. Train the model.
    1. From the PhysicsAI ribbon, select the Train an ML Model tool.
      Figure 6.


      The Train Model dialog opens.
    2. For Model Name, enter Stress_predictions.
    3. For Training Data, verify Wing_train is selected.
    4. For Inputs, select cae.coord, cae.model_data.FX, cae.model_data.SPC, cae.model_data.FY and cae.model_data.FZ.
    5. For Outputs, select Element Stresses (2D & 3D).
    6. Click Train.
      Figure 7. Global Property Inputs


      The Model Training dialog opens.
      Tip: Once the status changes to Running, you can click Show Log view the training logs.
  6. Test the model.
    Ensure that the associated .csv files are also present while creating the test dataset.
  7. Once the testing is complete, set the model to active.
    Important: Setting a model as active will checkout a stacking license until the model is deactivated.
    1. From the PhysicsAI ribbon, select the Manage ML Models tool.
      Figure 8.


      The Model Training dialog opens.
    2. Click Set Active Model.
The prediction feature is available through both the HyperMesh GUI and batch mode (see Use Batch Mode). The CAD or solver deck to be used for prediction should have an associated .csv file named _predict_inp.csv which should be saved in the _hooks folder.

Note that only the nodes with one or more features defined on them are required in the .csv file. However, it is necessary that each node in the .csv file should have a value for all the input features. For example, in Figure 2, node 5110 does not have any forces defined and hence a value of 0 is used as a placeholder in columns FX, FY and FZ. In other words, the rectangular/tabular structure of the input data should be maintained.