How to extract Joint Forces in Mechanical using DPF.?

Options
Naveen Kumar Begari
Naveen Kumar Begari Member Posts: 14
First Comment Name Dropper Photogenic
edited May 22 in Structures

I want to get joint force reactions using dpf.

Tagged:

Comments

  • Naveen Kumar Begari
    Naveen Kumar Begari Member Posts: 14
    First Comment Name Dropper Photogenic
    edited May 22
    Options
  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 414
    First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
    Options

    @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: 14
    First Comment Name Dropper Photogenic
    edited May 24
    Options

    Thanks @Ayush Kumar

  • Naveen Kumar Begari
    Naveen Kumar Begari Member Posts: 14
    First Comment Name Dropper Photogenic
    edited May 24
    Options

    @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: 414
    First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
    edited May 27
    Options

    @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: 14
    First Comment Name Dropper Photogenic
    Options

    @Ayush Kumar Thank you...!!