How do I get the SURF node and element numbers for a particular pressure load object in mechanical?

Options
Vishnu
Vishnu Member, Employee Posts: 214
Name Dropper First Anniversary Solution Developer Community of Practice Member First Comment
edited June 2023 in Structures

You can get the element and nodes corresponding to a particular pressure object in mechanical.

You can replicate the same procedure for obtaining SURF elements of pressure, radiation,...etc in a similar way

Tagged:

Answers

  • Vishnu
    Vishnu Member, Employee Posts: 214
    Name Dropper First Anniversary Solution Developer Community of Practice Member First Comment
    Answer ✓
    Options

    first solve the model as the surface elements are created during the solve.

    firstsolution = ExtAPI.DataModel.Project.Model.GetChildren(DataModelObjectCategory.Solution,True)[0]
    solverdata= firstsolution.SolverData
    pressureobject = ExtAPI.DataModel.GetObjectsByName('Pressure')[0]
    pressureobjectdata = solverdata.GetObjectData(pressureobject)
    surf_elem_type = pressureobjectdata.SurfaceEffectElementTypeId
    surf_elem_nodes = solverdata.NodeIdsByMaterialId(str(surf_elem_type))
    surf_elem_elems = solverdata.ElementIdsByMaterialId(str(surf_elem_type))
    

    surf_elem_nodes and surf_elem_elems would correspond to SURF154 nodes and elements of a pressure load called "Pressure" in the mechanical object