Group Abstract Group Abstract

Message Boards Message Boards

0
|
9.8K Views
|
9 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Modeling a brick subjected to gravity with SystemModeler?

Posted 10 years ago

Most of the questions on this forum are of way higher level than those I need to ask, but I haven't found any other place, so here they come.

As my first (and only so far) achievement with SystemModeler, I was able to design a brick and have it subjected to gravity.

But when the simulation starts, it goes straight through the ground.

1) Why doesn't my brick simply lie on the ground ?

2) How do I apply a constant force on my brick in a chosen direction ? I found a relatively close example but it involves several models I don't understand and can't adapt to what I intend to do.

3) I saw several animations in which it was possible to change the value of a parameter (say, the brick's mass, the force applied,...) with a slider, but all had been designed exclusively with Mathematica. Is it available in SM also ? (and where ?)

Thank you for helping a free-lance amateur.

POSTED BY: Ch' Prof
9 Replies
Posted 9 years ago

Also, I'm struggling over how to set values in an array using Mathematica sliders.

enter image description here

POSTED BY: Ch' Prof
Posted 9 years ago

Thank you Patrik,

As you can see, my first model is soon finished :

enter image description here

But nevertheless, here comes a new question.

I would like to add a checkerboard ground to my simulation, like in this model.

enter image description here

I haven't been able to see how it's been done. Could you explain it ?

POSTED BY: Ch' Prof
Attachments:
POSTED BY: Patrik Ekenberg
Posted 9 years ago

I need some other information though :

  1. What does "Frame in which input force is resolved" mean ? enter image description here

  2. Also, is there an option somewhere to have forces vectors "nose out" ?

  3. Can I setup the initial position of the camera ?

  4. I would like to have sliders to easily setup my simulation, just like in this demonstration. Are they available in SM as in Mathematica ?

enter image description here

POSTED BY: Ch' Prof
Posted 9 years ago

I resumed practicing with SM this afternoon and thanks to your explanations, got it now. I made huge progress.

Here is what I'm trying to design : a very simple simulation that allows me to explain Newton's 1st and 2nd laws, and show why we use integration to go from acceleration to speed then to position :

enter image description here

You setup masses, velocities and forces on 2 different mobiles, and compare their evolutions.

Thanks again Patrik !

POSTED BY: Ch' Prof
POSTED BY: Patrik Ekenberg
Posted 10 years ago

Anyone ?

POSTED BY: Ch' Prof
Posted 10 years ago
POSTED BY: Ch' Prof

Hi and welcome to the SystemModeler community!

I am assuming you used the Modelica MultiBody library for modelling your brick. I was looking for good introductory examples that explained the basic concepts of the MultiBody but did not find anything that I was satisfied with so I decided to write a tutorial.

I tried to make it general so that it could be useful for others also so I did not answer your questions directly there. I separated the instructions into 5 steps, and in the file that I attached you will find a model for each of the steps. Your first question (“Why doesn't my brick simply lie on the ground?”) will be answered in step/model 2 (BouncingSurface2). Your second question I will try and answer in step/model 3 (BouncingSurface3). Some of these things you might be familiar with already, so you can possibly skip ahead to step 2 and 3, or read it from the beginning.

Or if you just prefer the short answers: 1) Because you haven't yet added any equations or components that keep it up from falling through the ground and by there is be default a gravitational pull in the negative y-direction. You can remove the gravitational pull by changing the g parameter in the world component to 0. 2) You can for example use the Modelica.Mechanics.MultiBody.Forces.WorldForce block. To see how you can connect it up to your object, see model 3 (BouncingSurface3).

I attached the tutorial and the model to this post. I am thinking about refining it and making it a post here in the community, so if you decide to read it, and there is anything that you find that is unclear please let me know so I can polish it!

Cheers, Patrik!

Attachments:
POSTED BY: Patrik Ekenberg
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard