Foad S. Farimani
Foad S. Farimani

Reputation: 14016

OpenModelica: Translation Warning In component in relation on Real numbers is only allowed inside functions

I'm trying to model Coulomb static friction in a multi-body system based on the equations from this physics.stackexchange.com post. I have written a very primitive Modelica code to test the equations you may see in this GitHub Gist. I have two main issues:

  1. First of all I get this warning:

Translation Warning [multibody_Coulomb_static_friction: 43:3-47:9]: In component , in relation V1 == V2, == on Real numbers is only allowed inside functions.

what does it mean and how I can fix this?

  1. The simulation takes like ages to finish. why is it? does it have anything to do with this warning? is there anyway I can do the simulation faster?

P.S.1. I tried running the code in Wolfram SystemModeler, but there it doesn't even succeed to run and I got a error which I have reported here in wolfram forum!

P.S.2 I have posted similar questions here and here.

Upvotes: 0

Views: 277

Answers (1)

jrhodin
jrhodin

Reputation: 669

Looks like you're trying to re-invent the wheel. You say that you want to create a multibody model, but you are not using the Multibody library. Use that. And couple that with rotational or translational components that use friction. An example with such components: Modelica.Mechanics.Translational.Examples.Friction

Upvotes: 2

Related Questions