Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

User written subroutine

User written subroutine

User written subroutine

Hi all,

I want to determine the Displacement Velocity and Acceleration of a damper under simulation to calculate the Damper Force in a user written subroutine. Descibing the part and marker statement are not supporetd by fortran compiler. Can any body give me some tips how this can be done.

This is how I have dont it at the moment

PART/01, MASS=1, IM=280.2, -567.0, 345.0 &
MARKER/0101, QP=267.0, -600.0, 180.0
! Defining upper damper mount
PART/02, MASS=1, IM=293.4, -534.0, 510.0 &
MARKER/0201 QP=307.0, -500.0, 680.0
! Determine displacement
! Determine velocity
! Determine acceleration

RE: User written subroutine

Have you read the help section on user-written subroutines? particularly SFOSUB? Which even includes an example...


Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

RE: User written subroutine

The tip you gave me for using SFOSUB as a starting point for my subroutine was really useful.

I dont understand how will the software get he valuse of PAR ( 4,5,6,7 ) or am i supposed to mention them.
PAR(1,2,3) are the co-ordinatres of the marker whoes vel./disp. is being measured in 'z' direction. Shall I mention them as well. And what if I want to measure DM?
I dont have a clue what does IPAR( 1 )  = NINT(PAR( 1 )) mean.

Can you please explain.

RE: User written subroutine

Yes, you have to explicitly pass the variables to your sub, and read the answers back in to the Solver.

The easiest example of functional code in the tutorials is the ABS controller example, which includes all the code, and it works.


Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close