How to extract Joint Forces in Mechanical using DPF.?
Comments
-
@Pernelle Marone-Hitz
@Ayush Kumar
@George Tzortzopoulos
@Rajesh Meena
could you please help me?0 -
@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]
1 -
Thanks @Ayush Kumar
0 -
@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.
0 -
@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/issues0 -
@Ayush Kumar Thank you...!!
1 -
Just to add to the solution, the below code can be used to directly extract the joint element id from the Joint object (using the name) in Mechanical Tree.
analysis = DataModel.AnalysisList[0] solution = analysis.Solution jointObj = DataModel.GetObjectsByName("Fixed - 3blocks\Solid1 To 3blocks\Solid")[0] jointElemId = solution.SolverData.GetObjectData(jointObj).ElementId
1 -
@Rohith Patchigolla Thanks for alternate solution.
1