1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Linux Package to Simulate Mechanical Systems

  1. Dec 19, 2011 #1
    I want to start modeling mechanical systems, something say on the order of a motor, input torque only needed, driving a crankshaft that drives a piston. I'm looking to examine the forces generated in the crank, connecting rod and piston. I was wondering what open source Linux packages are available to do this. Would z88 do? I have years of experience with SPICE modeling, so I guess I'm looking for a mechanical equivalent.
  2. jcsd
  3. Dec 19, 2011 #2

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper

    Military grade solid-modelling package.
    I don't know how complete it is....

    In repos I see mostly physics engines for computer programmers.
  4. Dec 19, 2011 #3
    That looks awesome. I've been looking for a CAD program for a long time. I actually stopped looking for a free one because they were so difficult to learn and different from each other. BRL-CAD looks worthy of the time and effort to climb up it's learning curve.

    If I may ask some clueless questions: In general how does a constructive solid geometry modeling system differ from a finite element analysis system? Do they serve different purposes? Can they both do dynamic force analysis?
  5. Dec 19, 2011 #4

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper

    You'll see there is an offshoot specialized to simulate munitions.

    Whenever someone says "there are no good free/libre-software CAD systems" this is my goto model. The objections then tend to center around the lack of a GUI because what they really mean is that their personal favorite CAD system is not free software.

    CGS modelling is a computational convenience from it's original purpose in modelling munitions.
    The military application is central to the development - lots of the libs will be irrelevant to designing and analyzing an engine.

    But if you want details, I'm afraid you'll have to ask the devs.
    There is a lot of info on the site and tutorials around the place.
    It is a very long time since I've used anything like it, so I'm sure it is quite different now.

    If you have Ubuntu or derivatives, there is always:
    sudo apt-get install varkon*

    From the package description:

    VARKON is a high level development tool for applications in the
    area of Engineering, Computer Aided Design and Product Modelling.

    VARKON can be used as a traditional CAD-system with drafting,
    modelling and visualisation if you want to but the real power of
    VARKON is in parametric modelling and CAD applications development.
    VARKON includes interactive parametric modelling in 2D or 3D but also
    the unique MBS programming language integrated in the graphical

    There's actually quite a few - search for CAD in synaptic.
    Most are specialized - like architecture or sailmaking. Nature of Open Source dev.

    I've never had to model more than the shape of something so I have no experience using CAD packages for analysis.
    Last edited: Dec 19, 2011
  6. Dec 19, 2011 #5
    I've been reading up on this a little. I'm still looking for how to do dynamic analysis. The testing I've seen so far has to do with static forces and material strength rather then dynamic loading during operation.

    Anyway I can do the dynamic modeling crudely with math and make an animation with Blender, which I have used before, until I figure something else out.


  7. Dec 19, 2011 #6

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper

    That's largely what I do yeah.

    Why not ask them? I see BRL-CAD will do movement, so presumably you can apply a series of instantaneous models to get a dynamic result a la numerical methods. You can't be the first person to want to do what you want to do so ask.

    Similarly with Varkon, one of the tutorials is supposed to have an example of an engine model.

    I doubt you'll find any CAD system which does general dynamical analysis ... so you'll need to be specific. Good luck and happy hacking.
  8. Dec 19, 2011 #7


    User Avatar
    Science Advisor
    Homework Helper

    There are a whole range of different "levels" of dynamic analysis that you could do on your type of structure. Probably a good place to start would be with software aimed at modeling robot arms and such like, which will treat your structure as a set of rigid parts with mass and inertia properties, jointed together. That will be able to calculate the accelerations of the parts through the complete rotation cycle, and the forces between them.

    If you then want to do a detailed analysis of an individual part (for example finding the stresses in the connecting rod bearings) you could take the forces and accelerations from your dynamics model and apply them to a detailed finite element model of just that part. The point of doing that is to reduce the dynamics analysis to equivalent static stress analyses on the various parts (each one at the worst loading conditions for that particular part, which will probably occur at different times in the rotation of the crank system), whcih is much cheaper than trying to run a dynamics analysis on a complete detailed model.

    There may be some manual iterations required here, because if you decide to change the shape of a part when you see the stresses, the change in mass will affect the loads in ALL the parts, not just the part you changed.

    To do the analysis "all in one go" you would need the sort of software that is used to do car crash simulations etc. But that is almost certainly overkill since (presumably) your crank system is not going to have any permanent plastic deformation, and running large models is time consuming. At work, we run those type of models on seriously large multi-CPU systems (e.g. 64 processors), and some of the models run for literally weeks. That's probably not the place you want to start from!
  9. Dec 20, 2011 #8

    That sounds like just what I'm wanting.

    That would be overkill at this point.

    So you do car crash testing, huh?

    A few decades ago I almost go a job at Breed Corp in NJ as a fortran programmer back twhen they were using UNIVACs 6000s I think. The girl who was doing the hiring said she didn't want to hire anyone smarter then herself. Looking back, it was rather dumb of me to play the smart one... :)
  10. Dec 20, 2011 #9
    I've downloaded the four BRL-CAD tutorials. I'll have to dig into that a bit. I'll look at the VARKON stuff too.
  11. Dec 20, 2011 #10
    I believe all the CAD apps mentioned lack what's called a physics engine, which is what I heed to do the dynamic modeling. I did find out that Blender, which is really for 3d animation does have a physics engine. So. it looks that that will do.
  12. Dec 20, 2011 #11
    By the way I did find another app, Working Model 4, made by Autodesk that would do, although being made by that company it as to cost BIG $$$.
  13. Dec 20, 2011 #12


    User Avatar
    Science Advisor
    Homework Helper

    The general term is "multi body dynamics" if you want to do a web search. "Physics engines" are a subset of that - often developed for computer games where accuracy may be less important than speed, provided the answers don't "look obviously wrong".
  14. Dec 20, 2011 #13
    I've been doing searching. There are some possibilities, although I think I'm looking at a substantial learning curve for what ever I end up using.

    Since I lack the funds to build a real prototype, the next best thing is to show somebody a simulation right?

    People just look at my math, and then say I'd like to see one work before anything else. So what else have I to do except build a simulation model.


    Hey Aleph,

    I found an app called Step that looks like it will be fairly easy with which to get going. I just hope it has the capability to do what I want.

    Last edited: Dec 20, 2011
  15. Dec 20, 2011 #14

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper

    What are you trying to simulate?
  16. Dec 21, 2011 #15
    Basically it's a mass the rotates about a axis with an angular position that is a function of time.

    Step is too simplistic. Arbitrary rotation is beyond it. I might be able to use it's core library and code something myself, although I wonder how I would visualize it.



    I'm having much better results searching for 'Mulitbody Dynamics' their are a number of packages that will do.
    Last edited: Dec 21, 2011
  17. Dec 21, 2011 #16

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper

    A windmill? I gyroscope? An overbalanced wheel?
    That could describe anything!

    You know the result you get from whatever package you pick will only be as good as the numbers you put into it?

    Oh this is your thruster?
    pm me.
  18. Jan 4, 2012 #17
    If all else fails use WINE + Windoze software...
  19. Jan 4, 2012 #18

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper

    Yeah - even linux geeks can enjoy malware-ridden windows freeware xD

    There are plenty of packages - it's just that there are fewer niche programs - some may start out that way, but if they are any good they get added to until they are general. Proprietary development benefits from restricting use with the side effect that a high demand area will have a program that does almost exactly what you want right away.

    I've seen people go to Windows for quickie stuff and back to some gnu/linux when they want a workhorse. But mostly you use what you got.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook