Mechanical DPF - how to obtain pipe and elbow APDL element type

Mateusz
Mateusz Member Posts: 11
First Anniversary Name Dropper First Comment
**

Hi,

I was trying to obtain APDL element type based on the element ID. For regular scripting I was able to obtain it using the following lines of code.

reader_PNUMENAM = reader.GetResult("PNUM")
PNUMENAM = reader_PNUMENAM.GetElementValues(element_id)[6]

I use it to differentiate what SMISC values should the script use to extract necessary input for Piping stress calculations. PIPE288,PIPE289 and ELBOW290 use different SMISC to get forces, moments or pressure values.

I could not find a way to get the data similarly to the reader above, so I've tried to create myself a dictionary that couples the element_Id and apdl_element_type... but it seems it does not recognise PIPE or ELBOW elements at all. My model consists of Beam, Pipe and Shell elements - I can obtain the element types like 181, 188, 170 but no 288, 289, 290. I know in the previous versions of Ansys, PIPE elements were not supported for SMISC extraction, but now in 2023R2 they do work fine.

import mech_dpf
import Ans.DataProcessing as dpf
analysis_id = 0
model = ExtAPI.DataModel.Project.Model
analysis = model.Analyses[analysis_id]
rst_path = r"{}file.rst".format(analysis.Solution.ResultFileDirectory)

dataSource = dpf.DataSources()
dataSource.ResultFilePath = rst_path

my_model = dpf.Model(rst_path)
my_mesh = my_model.Mesh
apdl_type = my_mesh.GetPropertyField("apdl_element_type").Data
all_element_Ids = my_mesh.ElementIds

element_dict = {}
for element_Id, apdl_element_type in zip(all_element_Ids,apdl_type):
    element_dict[element_Id] = apdl_element_type

Answers

  • Mateusz
    Mateusz Member Posts: 11
    First Anniversary Name Dropper First Comment
    **

    I've just check with 24R1. PIPE288, PIPE289 and ELBOW290 elements are still not available for DPF.

  • Pierre Thieffry
    Pierre Thieffry Member, Moderator, Employee Posts: 107
    25 Answers 10 Comments 25 Likes First Anniversary
    ✭✭✭✭

    @Mateusz Some element types are not yet available in DPF. Could you please open an issue on Github?