Automotive Assessment Workflow Tool

The automotive assessment tool allows the user to tag a model in PRIMER with details about the crash test type and the occupants in the model.

These details are used in T/HIS to carry out assessments on the occupants following the rules from different regulations.

This document describes how the tool works in T/HIS and how the code is organised. The documentation for PRIMER can be found here.

Introduction

In T/HIS the tool is used to assess the occupants according to the rules from different regulations. It plots curves for each assessment with datums showing allowable limits where appropriate. In addition, relevant values are printed in the main window.

How to use the Workflow Tool

Assuming a model has been tagged with the required data in PRIMER, the workflow menu should be displayed automatically with the option to run the automotive assessments workflow. Clicking on this will open a window that allows the user to select the regulation by which to assess a body part of an occupant in the model.

THIS menus

Select the regulation from the first drop down menu.

THIS menus

If we support multiple versions of the regulations, select the one you want to use.

THIS menus

Select the occupants from the occupants list box.

THIS menus

Select the body parts from the body parts list box.

THIS menus

Select the assessments to do from the assessments list box.

THIS menus

Press the Plot button and T/HIS will carry out assessments according to the selected regulation and display curves for each assessment and any relevant output values.

THIS menus

THIS menus

THIS menus

How the code works

GUI

The GUI is imported from the post_automotive_assessment_gui.jsi file written out from the GUI Builder. It has been slightly modified to include a call to export the gui object so that it can be imported as a module into the main post_automotive_assessment.js file (rather than using the Use() function), which is where all the GUI processing is done.

The data required to populate the occupant drop down menu is read from the JSON file written out from PRIMER (or from the post *END data written to the master keyword file).

The data required to populate the regulations, versions, body part and assessment type widgets is obtained from the classes defined in the modules/shared directory. Each class is described below.

The assessments are carried out using the classes defined in the modules/post directory. Each class is described below.

THisHelper Class

The THisHelper class contains a number of helper functions to do things in T/HIS, like read in data, blank curves and datums, scale graphs and set curve properties. These are used when plotting the results for each assessment.

Regulation Class

The Regulation class contains constants and helper functions to do with regulations, e.g. CNCAP, IIHS.

The class method Regulation.GetAll()) is used to get a list of all the different regulations we support and populate the drop down menu.

AssessmentType Class

The AssessmentType class contains constants and helper functions to do with assessment types, e.g. HEAD_HIC, NECK_AXIAL.

The class method AssessmentType.GetAll()) is used to get a list of all the different assessment types we support.

ProtocolDatum Class

The ProtocolDatum class is used to hold the data required to plot a single datum on a graph.

Essentially it is a wrapper for the T/HIS API Datum class, but it has some extra methods to make it easier to plot on graphs and get the min and max values to scale the graph axes.

AssessmentDatums Class

The AssessmentDatums class is used to hold the data required to plot an array of ProtocolDatum instances for a particular assessment, e.g. a neck shear exceedence assessment.

It also has helper functions to plot all the ProtocolDatums it holds for a particular assessment, as well as methods to get the min and max values to scale the graph axes.

Protocol Class

The Protocol class is used to hold data about each regulation and crash test we want to support.

It has class constants for the different assessment types that we support, e.g. HEAD_HIC, NECK_NIJ, NECK_SHEAR_EXCEEDENCE, etc. and these are used to tag the AssessmentDatums instances that are created for each assessment.

T/HIS uses the class method Protocol.CreateDefaultProtocol() to create a Protocol instance for the selected regulation and crash test type and populate it with the required AssementDatums for all the assessments that need to be carried out for that combination of regulation and crash test type.

The AssessmentDatums for each assessment are a particular assessment are returned from the instance method Protocol.GetDatumsByAssessment().

The class method Protocol.Versions()) is used to get a list of the different versions we support for a given regulation and crash test type and populate the drop down menu.

ProtocolAssessment Class

The ProtocolAssessment class inherits from the Protocol class.

It extends the Protocol class by adding instance methods to do assessments on occupants in ProtocolAssessment.DoOccupantAssessment. This calls the various Read{BodyPart}{AssessmentType}() functions that carry out the assessments for a particular body part and assessment type.

WorkflowOccupant Class

The WorkflowOccupant class is used to hold data about an occupant. In T/HIS it uses the helper functions like WorkflowOccupant.ReadHeadAccelerations to read in curves for a particular body type.

This diagram shows how the classes fit together:

Classes

And this shows in pseudo code how T/HIS uses them:

// In the GUI:
// ==========

// Create a new ProtocolAssessment instance for the selected regulation and crash test type
// This will be populated with the required AssessmentDatums
let protocol = ProtocolAssessment.CreateDefaultProtocol(regulation, crashTestType);

// Do some assessments on some occupants
let results = protocol.DoOccupantAssessment([occupant1, occupant2], [AssessmentType.NECK_AXIAL, AssessmentType.NECK_SHEAR]);
// The DoOccupantAssessment() method essentially loops over each occupant
// and each assessment type and calls the Read{BodyPart}{AssessmentType}()
// functions to plot curves and get values from them.

// Object to return key values
let results = {};

// Do each assessment
for (let assessment_type of assessment_types) {
   // Get AssessmentDatums
   let assessment_datums = this.GetDatumsByAssessment(assessment_type);

   // Asssess each occupant
   for (let occupant of occupants) {
      // Do the assessment
      if (assessment_type == AssessmentTypes.NECK_EXTENSION) {
         // Carry out operations to do the neck extension assessment
         // Curves and values like min and max are returned
         output = this.ReadNeckBending(model, occupant, unit_system);
      }
      else if(assessment_type == AssessmentType.NECK_NIJ) {
         output = this.ReadNeckNIJ(model, occupant, unit_system);
      }
      // ... Other assessment types

      // Add curves and datums to graphs

      // Add the curve values to the results object

   }
}

return results;

How to add a new regulation

If a new regulation is required, the following steps need to be taken:

  1. Add a new class constant to the Regulation class for the name of the regulation. For an example search for EuroNCAP.
  2. Add it to the array returned by the class method Regulation.Regulations().
  3. Add logic to the instance method Protocol.OccupantAssessmentTypes() to return the list of assessment types for the regulation, version, each crash test and each body part.
  4. Add default datum files to the datums/{regulation}/{crash_test}/{assessment_type} folder so the class method Protocol.CreateDefaultAssessmentDatums() can return a list of AssessmentDatums for each crash test and each assessment type in the new protocol.

How to add a new version of a regulation

A new version string is automatically added by extracting the values from the "version" property of the protocol json files. If the version requires some specific assessment type logic that differs from the previous version(s) then step 1 is required. Otherwise step 2 is sufficient:

  1. Add logic (if required) to the instance method Protocol.OccupantAssessmentTypes() to return the list of assessment types for the regulation, version, each crash test and each body part.
  2. Add default datum files to the datums/{regulation}/{crash_test}/{version}/{assessment_type} folder so the class method Protocol.CreateDefaultAssessmentDatums() can return a list of AssessmentDatums for each crash test and each assessment type in the new protocol.

How to add a new crash test

If a new crash test is required, the following steps need to be taken:

  1. Add a new class constant to the CrashTest class for the name of the crash test. For an example search for ODB.
  2. Add it to the array returned by the class method CrashTest.CrashTests().
  3. Add logic to Regulation.CrashTests() for any regulations that use it.
  4. Add logic to the instance method Protocol.OccupantAssessmentTypes() to return the list of assessment types for the new crash test for each regulation and crash test that uses it.
  5. Add default datum files to the datums/{regulation}/{crash_test}/{assessment_type} folder so the class method Protocol.CreateDefaultAssessmentDatums() can return a list of AssessmentDatums for each crash test and each assessment type in the new protocol.

How to add a new assessment type

If a new assessment type is required, the following steps need to be taken:

  1. Add a new class constant to AssessmentType class for the name of the assessment type. For an example search for HEAD_HIC.
  2. Add it to the array returned by the class method AssessmentType.GetAll().
  3. Add logic to the instance method Protocol.OccupantAssessmentTypes() to return the new assessment type for each regulation/crash test that uses it.
  4. Add default.json files to the 'datums' directory to define the default AssessementDatums for each regulation/crash test that uses the assessment type, e.g. the datums for the CHEST_COMPRESSION assessment for the CNCAP ODB crash test needs to go in the datums/CNCAP/ODB/CHEST_COMPRESSION directory.

The folder structure is datums/{regulation}/{crash_test}/{version}/{assessment_type}, where

  • {regulation} is the name of the regulation and must match the value of one of the constants in the Regulation class
  • {crash_test} is the name of the crash test and must match the value of one of the constants in the CrashTest class
  • {version} is the name of the version and must match the value of one of the versions in the protocol json files Protocol.Versions class
  • {assessment_type} is the name of the assessment type and must match the value of one of the constants in the AssessmentType class

These files are read by the class method Protocol.CreateDefaultAssessmentDatums() to return the list of AssessmentDatums for the new assessment type and each regulation and crash test that it applies to.

  1. In the ProtocolAssessment class add a Read{BodyPart}{Assessment}() method for the new assessment type, e.g. ReadNeckAxial(). It should contain logic to deal with all relevant occupant types and should return a list of curves to be plotted on a single graph and pertinent values for the assessment type, like min and max values.
  2. Add the method to the ProtocolAssessment.DoOccupantAssessment() function to do the assessment and return the results.