Create/Edit Checks and Corrections
Create new checks and corrections, and edit default checks and corrections.
HyperMesh supports default checks and corrections in the Model Checker. You can use the Check and Correction entities to create new checks and corrections.
Create New Tcl Checks
Create new Tcl checks in the Model Checker.
Overview
- HM::ModelCheck::LsDyna for LS-DYNA specific procedures
- HM::ModelCheck::Nastran for Nastran specific procedures
- HM::ModelCheck::OptiStruct for OptiStruct specific procedures
- HM::ModelCheck::RadiossBlock for Radioss specific procedures
- HM::ModelCheck::Abaqus for Abaqus specific procedures
- HM::ModelCheck::Ansys for ANSYS specific procedures
- HM::ModelCheck::Permas for Permas specific procedures
Key Points
- The check name should be unique.
- Config should be set to “TclCheck.”
- Entity type should match the type of entity on which check is performed.
- A level should be associated with check.
- Function name should include the entire name of the Tcl procedure with namespace.
- The Tcl file name can either be a relative path from the checks configuration file or the absolute path of the Tcl file containing the Tcl procedure.
Optional Method
There is an optional way to set the path of the custom Tcl file using environment variables.
The HM_MODELCHECKER_TCLPATH_$profile_name environment variable should be used per solver user profile. When this is set, only the Tcl file name in the “Tcl File” field is needed.
By default, this environment variable points to the path of the checks configuration file. If the Tcl file and config file are in same location then you do not need to specify the path. Only the name of the file in “Tcl file” field is required.
*createmark mats 1 $failed_id_list
hm_setmodelcheckresultentids $checkDisplayname 1
When there are no failed entities found, it is a good practice to update an empty list on the check using the same two lines above.
Sample Tcl Procedure
proc :: HM::ModelCheck::Nastran::CheckPropsUnused { checkDisplayname } {
set entitytype [hm_getmodelcheckenttype $checkDisplayname];
if { $entitytype ne "Props" } { return; }
set lsProps [hm_propertylist id];
if {[llength $lsProps] == 0} {
hm_setmodelcheckcheckstatus $checkDisplayname 3;
return;
}
*EntityPreviewUnused properties 1;
set lsProps [hm_getmark props 1];
set lsFailed {};
foreach prop_id $lsProps {
lappend lsFailed $prop_id;
}
eval *createmark $entitytype 1 "by id" $lsFailed;
if { [hm_marklength $entitytype 1] } {
hm_setmodelcheckresultentids $checkDisplayname 1;
} else {
hm_setmodelcheckresultentids $checkDisplayname 1;
}
};
Create Checks
Create Corrections
Generic Checks
Some pre-defined checks are available in the Model Checker that can be easily customized. The config of these checks is “GenericCheck.”
Overview
- Use a unique check name
- The entity type should be set to the type of entity on which the check is to be performed
- A level should be associated with the check
- Function names that can be customized are listed below
- Define filter definitions, value definitions, and references as applicable
- Filter definitions:
- Filter Attribute – “CARD”, “CONFIG”, “TYPE”, “GROUPTYPE” or name of attribute as defined in template
- Filter Value – Filter to pass (attribute name or value). Even status of the attribute can be checked in some of the above functions using “STATUS_OFF”
- Filter Criteria – PASS, FAIL, EQ, NE, LT, LE, GT, GE. PASS and FAIL usually used for STATUS_OFF filter
- Value definitions:
- Value Attribute – Dataname or attribute name as defined in template as applicable to the functions above
- Value Limit – The acceptable value limits
- Value Criteria – EQ, NE, LT, LE, GT, GE
- Reference definitions:
- References – Dataname or attribute name as defined in template
Function Names that can be Customized
After checks are added, right-click in Model Checker Browser and click Save config file to write out the checks to an .xml config file that can be accessed later.