🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Print Contact Force to .csv File

User: "Chayan"
Altair Employee
Updated by Chayan

Overview

This script uses a MotionSolve "Sensor_Evaluate" statement to write to a .csv file the time, x, y, z, and magnitude components of a contact force whenever the force is active at every solver time step.

Note: This is probably not a good script for sliding contact because it will create very large .csv files when the time step is small.

Usage/Installation Instructions

1) Create a sensor in MotionView

2) Check the box next to "Evaluate Expression" in the "Response" tab of the Sensor panel

3) Set the type of expression to "USER"

4) In the USER() field between the parenthesis send the function the id of the contact, the jflag of the contact, and the reference marker ID -- See "contact function for more details.

5) Go to the "Respons Dll" panel.

6) Check "Use local file and function name"

7) Find the python scrip in you directory

8) Set the function name to "write_cnct_fnc"

9) Set the "function type" to Python.

 

Functionality: API, Multi-Body Dynamics

Subfunctionality: XML format 

Interface: XML format

Find more posts tagged with

Comments

No comments on this post.

Share projects with the Community

Share your models, scripts, workspaces, and more with the Altair Community.
New Exchange Project