Model.createsolverkeyword#

Model.createsolverkeyword(keyword, type=EntityFullType(), includeFile='')#

This function creates an entity that has a mapped solver keyword by just specifying the keyword. The keywords are sourced from the solver browser.

Parameters:
  • keyword (hwString) – The string specifying the keyword.

  • type (EntityFullType) – Specifies the entity type if the mapping is predetermined. If the same keyword is featured in two different entity types, then the entity type can be specified.

  • includeFile (hwString) – Specifies the include file name in which this keyword is to be created. If include file name is not specified it will be created in current include.

Example#

Create CONTACT entity in OptiStruct#
import hm
import hm.entities as ent

model = hm.Model()

model.createsolverkeyword(keyword="CONTACT")
Create *SURFACE INTERACTION in Abaqus#
import hm
import hm.entities as ent

model = hm.Model()

model.createsolverkeyword(keyword="*SURFACE INTERACTION")
Create *NSET in Abaqus in include “load_data”#
import hm
import hm.entities as ent

model = hm.Model()

model.createsolverkeyword(keyword="*NSET", includeFile="load_data")