-
-
August 3, 2023 at 12:00 am
Cheyenne Hua
SubscriberI have a model with some joints (bushings to ground). I have several analyses in this model, in each analysis I have some joint probes that are telling me the joint force. I want to print the joint forces to a text file using scripting. First I was trying to just print the joint forces to the shell. I found this example to base my code on: https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v221/en/act_script/act_script_examples_evaluate_spring_reaction_forces.html
EXAMPLE:
# Get access to solver data analysis = Model.Analyses[0] solver_data = analysis.Solution.SolverData # Get access to result reader with analysis.GetResultsData() as reader: spring_results = reader.GetResult("SPRING") # Get a list of all springs springs = Model.Connections.GetChildren(DataModelObjectCategory.Spring, False) for spring in springs: print(spring.Name) spring_data = solver_data.GetObjectData(spring) element_id = spring_data.ElementId fForce = spring_results.GetElementValues(element_id) print(fForce[0])
But it's for springs. Trying to change it to work for bushing joints, I don't know what to put here: reader.GetResult("SPRING") I tried "reader.GetResult("JOINT") but that does not compile. It does run if I keep it as "SPRING" but the results are nonsense. Please help! I could not find any documentation on the GetResult function.
Here is my code so far:
# Get access to solver data
analysis = Model.Analyses[0]
solver_data = analysis.Solution.SolverData
# Get access to result reader
with analysis.GetResultsData() as reader:
joint_results = reader.GetResult("SPRING")
# Get a list of all joints
joints = Model.Connections.GetChildren(DataModelObjectCategory.Joint, True)
for joint in joints:
print(joint.Name)
joint_data = solver_data.GetObjectData(joint)
element_id = joint_data.ElementId
print(element_id)
fForce = joint_results.GetElementValues(element_id)
print(fForce[0])I am using 2022 R1
-
August 3, 2023 at 6:27 pm
mjmiddle
Ansys EmployeeYou can show all available solution quantities using:
reader.ResultNames
A bushing can be chosen as MPC or bushing formulation. The MPC type produces MPC184 element and the bushing formulation produces a COMBI250 element.
For MPC type, you'll get these solution quantities from the bushing:
'BOLT', 'BOLTTOOL', 'BOLT_MPC184', 'CONTAREA', 'CONTDEBOND', 'CONTFNODE', 'CONTHNODE', 'CONTPNUM', 'ELEMENTAL_REAL', 'JF', 'JFL', 'JM', 'JML', 'JOINT_ACC', 'JOINT_DOMG', 'JOINT_OMG', 'JOINT_ROT', 'JOINT_U', 'JOINT_VEL', 'JR', 'JU', 'M', 'R', 'REULER'
Use "JF" to report the joint forces on the bushing:
jf = reader.GetResult("JF")
You can report the component types with jf.Components which returns ['X', 'Y', 'Z'].
When you use jf.GetElementValues(element_id), the values will be in global coordinate system. You can compare to a joint probe set to "Total Force" except this will report in the joint reference coordinate system.
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Solver Pivot Warning in Beam Element Model
- Saving & sharing of Working project files in .wbpz format
- Understanding Force Convergence Solution Output
- User manual
- An Unknown error occurred during solution. Check the Solver Output…..
- What is the difference between bonded contact region and fixed joint
- The solver engine was unable to converge on a solution for the nonlinear problem as constrained.
- whether have the difference between using contact and target bodies
- Defining rigid body and contact
- Colors and Mesh Display
-
7658
-
4472
-
2957
-
1433
-
1322
© 2023 Copyright ANSYS, Inc. All rights reserved.