Guide on how to parameterise Altair EDEM API preference files with Altair Hyperstudy

Stephen Cole
Stephen Cole
Altair Employee
edited December 2023 in Altair HyperWorks

Calibration or the use of calibrated models is an important component of any Altair® EDEM™ simulation. Often a user many want to write a custom model, in which case the inputs are often added as an additional text file.  This article highlights the use of EDEM API files with Altair® HyperStudy®.  It is a follow-on from the YouTube video on the same topic:

EDEM API Calibration with HyperStudy (Video)

The YouTube video was created using EDEM and Hyperstudy versions 2022.1 and this guide uses versions 2022.3, there are some slight differences in approach with the 2022.3 version.

Prerequisites:

Downloads

To use:

  1. Unzip CustomModel.zip into a processing folder (e.g. C:\processing\EDEMHyperstudy\tutorial)
    • This contains the EDEM simulation files already setup with a wear model API that takes input from Archard_Wear_prefs.txt.  
  2. Open Hyperstudy 2022.3 and create a new study to save in the same tutorial folder
  3. Under Define Models > Add Model > Parameterized File > OK

image

    • Under Resource click 'ABC' and in the window that opens Select Archard_Wear_prefs.txt

image

    • Select Yes to Parameterize a copy of the file

image

    • Select the value after Deflector (default 2e-8) which is the Archard Wear input for the Deflector geometry and choose 'Create' to set the lower bound to be 1.0e-9, nominal 1.0e-8 and upper bound 2.0e-8 > OK

image

    • Set the solver execution script to None
    • Under Model Resources > Run Directory Preview change the extension for the Archard_Wear_prefs.tpl file to .txt > Close

image

    • Under Conditions > Add Conditions change Type to Ignore Dependencies

image

  1. Select Import Variables > Next
    • Here you can see the lower, nominal and upper bound values that have been defined

image

    • Select Next > Run Definition to write out the modified file
    • To verify go to Show in Explorer > choose the location \....\approaches\setup_1-def\run__00001\m_1 check .txt file is written.
  1. Return to Define Models > Add Model and choose EDEM

image

    • Under Resources Select the EDEM .dem file
    • Choose import Variables to open up the EDEM Hyperstudy Connector
    • De-select All as in this case we are not mofiying any of the in-built inputs

image

    • Choose Export to Hyperstudy (top left icon) to register the EDEM solver
  1. Next configure the model resources.  In Defined Models go to Model Resources 
    • Select parameterized file 1 > Add Resource > Add Output File and choose Archard_Wear_prefs.txt in \approaches\setup_1-def\run__00001\m_1
    • Select EDEM 1 > Add Resource > Add Link and choose Archard_Wear_prefs.txt under Parameterized File 1
    • Select EDEM 1 > Add Resource > Add Input File and choose the .dll and .cu files and set as Copy 
    • Close the resources dialogue box

image

  1. Move forwards to Test Models > Run Definition and select Overwrite when prompted and allow a minute or two for the simulation to run, the simulation is setup to run and export a .csv file (wear.csv) containing the wear amount on the geometry section.  This is our chosen measure for optimisation.
  2. Move to Define Output Response > Add Output Response > Expression > Data Sources > Add Data Source > File 
    • Under Select a File choose Wear.csv under \approaches\setup_1-def\run__00001\m_2 and choose OK.  If prompted select OK to switch to ASCII extraction.
    • Tick the keyword box and write in "1.00003," and length 5 to pick out the wear value to 3 decimal places > OK

image

  • Add ds_1[0] to the expression builder

image

  • Select OK and Evaluate
  1. Moving to Next you can add a DOE with the definition from setup.  
    • Leaving all as default run through to specifications and select Apply > Next
    • Under Evaluation Tasks you can evaluate, if you want to confirm the .txt file is written correctly you can de-select execute analysis and extract output responses to just write the file otherwise run the DOE

For further details on calibration with Hyperstudy see