Train Your Own Model

In this tutorial, you will use the PhysicsAI extension to train your own model.

Before you begin, copy the file(s) used in this tutorial to your working directory.
Note: Unzip the project hvac.zip and inspect the contents:
  • inputDataRecomp contains seven results in h3d format (Training files)
  • testDataRecomp contains two results in h3d format (Testing files)
  • newDesigns contains two files (for Prediction)
In this tutorial you will:
  • Open HyperMesh and create a project using the PhysicsAI toolbar.
  • Create two datasets separately for training and testing.
  • Train the ML model using the training dataset and view the logs.
  • Test the ML model on HVAC_Test_2 and view the results and detailed score report.
  • Predict the results on new designs HVAC_concept2_rnd.fem, HVAC_Duct_v3.x_b.

Create Project

In this step, you will open HyperMesh and create a project using the PhysicsAI toolbar.

  1. Open HyperMesh.
  2. From the menu bar, click View > Ribbons > PhysicsAI to open the PhysicsAI ribbon.
  3. From the PhysicsAI ribbon, select the Create Project tool.


    Figure 1.
    The Create Project dialog opens.
  4. For Project Name, enter Traintestdemo.
  5. For Location, click Open 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.
  6. Click OK.

Create Datasets

In this step, you will create two datasets for training and testing.

  1. From the PhysicsAI ribbon, select the Create Dataset tool.


    Figure 2.
    The Create Dataset dialog opens.
  2. For Dataset Name, enter HVAC_Train_7.
  3. For File System, click and navigate to the InputDataRecomp folder.
  4. Select and transfer all of the .h3d files.


    Figure 3.
  5. Click OK.
    The dataset is extracted and the Datasets dialog opens.
  6. Create a second dataset.
    1. Click Create Dataset to reopen the Create Dataset dialog.
    2. For name, enter HVAC_Test_2.
    3. For File System, click and navigate to the testDataRecomp folder.
    4. Select and transfer all of the .h3d files.
    5. Click OK.
      The dataset is extracted and the Datasets dialog opens.


    Figure 4.
  7. Select datasets to see the extracted datasets.


    Figure 5.
  8. Click Close.

Train Machine Learning ML Model

In this step, you will train a Machine Learning (ML) model on the training dataset and view the logs.

  1. From the PhysicsAI ribbon, select the Train an ML Model tool.


    Figure 6.
    The Train Model dialog opens.
  2. Define the following details and click Train.
    1. For Model Name, enter HVAC_Pred.
    2. For Training Data, select HVAC_Train_7.
    3. For Inputs, select cae.coord and cae.part_label.
    4. For Outputs, select pressure.


    Figure 7.
    The Model Training dialog opens.


    Figure 8.
    Tip: Once the status changes to Running, you can click Show Log view the training logs.
  3. Once the training is complete, click Set Active Model.

Test ML Models

In this step, you will use the trained model and test this ML models on HVAC_Test_2. You will also view the results and detailed score report.

  1. From the PhysicsAI ribbon, select the Test ML Model tool.


    Figure 9.
    The Test Model dialog opens.
  2. In the Models area, select HVAC_Pred.
  3. In the Datasets area, select HVAC_Test_2 and click OK.


    Figure 10.
    The Model Testing dialog opens.
  4. In the Model Testing dialog, select a Run ID and click Show Results to view the results in the modeling window.
  5. Close the Model Testing dialog.

Use Models

In this step, you will predict the results using HVAC_concept2_rnd.fem and HVAC_Duct_v3.x_b.

  1. From the newDesigns folder, drag-and-drop the HVAC_Duct_v3.x_b file into the modeling window.
  2. In the Load File dialog, click OK.


    Figure 11.
  3. In the Import Options dialog, click Open.
    The model opens in the modeling window.
  4. From the PhysicsAI ribbon, select the Predict tool.


    Figure 12.


    Figure 13.
  5. Repeat steps 1 - 3 for the HVAC_concept2_rnd.fem file.