How to extract Joint Forces in Mechanical using DPF.?

Naveen Kumar Begari
Naveen Kumar Begari Member Posts: 28
10 Comments Photogenic Name Dropper
**
edited May 22 in Structures

I want to get joint force reactions using dpf.

Tagged:

Comments

  • Naveen Kumar Begari
    Naveen Kumar Begari Member Posts: 28
    10 Comments Photogenic Name Dropper
    **
    edited May 22
  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 444
    250 Likes Solution Developer Community of Practice Member Ansys Employee First Anniversary
    ✭✭✭✭

    @Naveen Kumar Begari joint forces can be extracted as SMISC forces. You need to scope the joint element id. Below is an example code for for the IronPython API.

    import mech_dpf
    import Ans.DataProcessing as dpf
    mech_dpf.setExtAPI(ExtAPI)
    
    #Get data source
    dataSource = mech_dpf.GetDataSources(1)
    my_model = dpf.Model(dataSource)
    my_elemental_scoping = dpf.MeshScopingFactory.ElementalScoping([2431])
    
    joint_force_x = dpf.Operator("mapdl::smisc")
    joint_force_x.Connect(4,dataSource)
    joint_force_x.Connect(1,my_elemental_scoping)
    joint_force_x.Connect(10,1)
    jf_x_fields = joint_force_x.GetOutputAsFieldsContainer(0)
    jf_x_field = jf_x_fields[0]
    
  • Naveen Kumar Begari
    Naveen Kumar Begari Member Posts: 28
    10 Comments Photogenic Name Dropper
    **
    edited May 24

    Thanks @Ayush Kumar

  • Naveen Kumar Begari
    Naveen Kumar Begari Member Posts: 28
    10 Comments Photogenic Name Dropper
    **
    edited May 24

    @Ayush Kumar
    Here, Forces along X directions are getting in 'Newtons-(N)' , where as Forces along y and z directions are showing unit system in 'mJ' units instead of 'N' units but the values are same. Can I get help over here.?

    As well as, In the below script, what are those numbers 4,1,10,1 digits represents.

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 444
    250 Likes Solution Developer Community of Practice Member Ansys Employee First Anniversary
    ✭✭✭✭
    edited May 27

    @Naveen Kumar Begari sounds like a bug. If the values are correct you can force set the units of field by field.unit = "N"
    Please report this on GitHub so that this bug can be reviewed and correct.
    https://github.com/ansys/pydpf-core/issues

  • Naveen Kumar Begari
    Naveen Kumar Begari Member Posts: 28
    10 Comments Photogenic Name Dropper
    **

    @Ayush Kumar Thank you...!!