Message Boards Message Boards

5
|
25821 Views
|
28 Replies
|
30 Total Likes
View groups...
Share
Share this post:

Modeling a Trebuchet

Posted 9 years ago

While going through the Wolfram Demonstration Project site, I came across an simulation of a Trebuchet:

Optimizing the Counterweight Trebuchet

I was wondering if it is possible to animate the Trebuchet in such a way that the projectile of the trebuchet actually leaves the sling and makes impact against a wall at a certain distance say x='some constant'.

enter image description here

POSTED BY: Varun Kulkarni
28 Replies
Posted 8 years ago

Very interesting! I will be continuing to make a complete model in Mathematica including the 3 phases of the projectile,s flight: 1. The constrained sliding, 2. The slinging on the trebuchet and 3. The free flight under gravity. As mentioned before: the sliding is essential to gain projectile range and will improve substantialy your trebuchet,s efficiency. Good luck and keep on experimenting!

POSTED BY: Erik Mahieu
Posted 8 years ago
Attachments:
POSTED BY: Frederick Wu

@Frederick Wu these are some wonderful images and event looks awesome. So did you guys end up using Mathematica for building or using those trebuchets? Did it help to win?

Also I see that your PDF file is a Mathematica notebook. Could you please also attach the actual notebook in .NB format, please?

POSTED BY: Vitaliy Kaurov
Posted 8 years ago

Hi Vitaliy,

Erik's Demonstrations help us to understand the physical model and trebuchet dynamics. As a organizer, I draft a Mathematica notebook to introduce trebuchet topic for our young players. I attached notebook format, see attachment. (Sorry, only Chinese Version).

Unfortunately, Within the limited time and energy, we didn't develpe model or implement on code beyond Erik's Demonstrations. Anyway, we learned a lot through competition in this year. We would make it even better in next year, definitely.

Attachments:
POSTED BY: Frederick Wu
Posted 8 years ago

Indeed, this would avoid the constrained phase when the projectile is sliding on the floor. But this is not how the real trebuchets worked. One can prove, as Siano did, that the range and efficiency is much higher when you have this initial sliding phase. By the way yr idea of a pit to avoid the constrained sliding is the intermediary solution mentioned in Siano's paper (page 12)

enter image description here

POSTED BY: Erik Mahieu
Posted 8 years ago

@Erik, Anthor finding, after careful looking at both on your horse image and my da Leonard's drawing. It can be those ancestors, open a groove and use a slot underneath the ground, so that sling at projectile side can have more bigger effective angle.That's a simple way to break that geometry constrain limited by ground.

So that l3 neglect should be acceptable, only if the man cut a slot on ground.

POSTED BY: Frederick Wu
Posted 8 years ago

@Erik, Thanks for share the new information from Mr. Siano.

However, I am not sure if this drawing are made by da Vinci. But it looks not same style of da Vinci's drawing. I guess, it's probably an entertain idea made by others, but in da Vinci's name.

I happend to have a few image below from a book, "The Invention's of Leonardo da Vinci", Edited by Charles Gibbs-Simith and Gareth Rees, Printed by Charles Scibner's Sons, in 1978.

Leonardo improved catapult at his time, instead of trebuchet.

enter image description here enter image description here enter image description here

POSTED BY: Frederick Wu
Posted 8 years ago

I found another article by Mr. Siano: A Mathematical Model for a Trebuchet

And here is a picture of a well known application of the trebuchet. Do not try this at home!! enter image description here

POSTED BY: Erik Mahieu
Posted 8 years ago

@Erik Mahieu,

If I understand you right. You mean the 1st phase of Trebuchet, can be seperated two (1.1 and 1.2 ) in detail. http://demonstrations.wolfram.com/TrebuchetBallistics/

phase 1:

1.0 Start from all stationary state

1.1 Only two masses ( counterweight and main beam ) involved in physical with 2 DOF rotation. Becasue, sling or rope at projectile side is not straight and no force. projectile is still on ground in this phase.

1.2 Three masses ( counterweight, projectile and main beam ) involved in physical with 3 DOF rotation, sling is straight with a force to pull projectile until it released.

phase 2: the projectile is free throw with ballistic trajectory in air, with air drag. ( Air drag is clear.)

I think below factors in phase 1 might need to consider for efficiency.

  1. mass of main beam as a rigid bar;

  2. damping or friction on three axes;

  3. collision at relearing or after releasing (or the remaining energy of the system, where is it ? ) ;

I think 3rd part of energy is consumed by collision when the beam hit something as end-stop. Usually we can use the position of end-stop to control the velocity direction of projectile. See Siano's page: http://algobeautytreb.com/

enter image description here

It appears Siano uses a bar as end-stop to control the velocity direction of projectile. The moment, when main bean hit on a bar, should be the moment the projectile releasing. Maybe you have conside the 3 part in side equations ?

POSTED BY: Frederick Wu
Posted 8 years ago

@Sam Carrettie

Thank for the SystemModeler Example. However, Catapult is a little bit different design from trebuchet. Catapult is a kind of device allow elastic element, like spring, inside the system to reserve energy, then release a projectile. Trebuchet is actually anther stone projectile machine, which convert energy purely from potential energy to kinematic energy. We stay with trebuchet for our competition this time. becasure, the stiffness of spring is hard to measure and compare. Anyway, If SystemModeler can predict catapult, it should be able to predict trebuchet as well. The problem is I don't know how to best use SystemModeler and lack of know-how of trebuchet, either.

POSTED BY: Frederick Wu
Posted 8 years ago

SystemModeler is indeed a better choice for modelling this type of "machinery"

But a real trebuchet is more complicated than is depicted in all the above (including my own demonstrations!) If you look at the paper "Trebuchet Mechanics" by Donald B. Siano and at this design from the paper:

complete trebuchet model

you can see that there is a third link in the kinematic chain that was neg;acted in the above: the part indicated l3 (between {x2,y2} and {x3,y3} laying horizontally on the ground where the projectile is attached. Adding this link complicates the analysis (Siano does it at the end!) but it is essential for the trebuchet deadly efficiency since it will throw the load much further and with a higher speed! One day, when more time available, I will attempt to add tis feature but it would be a nice Mathematica/SystemModeler combined exercise.

Any volunteers?

POSTED BY: Erik Mahieu
Posted 8 years ago

Hello Erik,

Thank you very much for this helpping and guide in equations.

I am actually holding a trebuchet competition for young and junior engineers in company. It's start from building a small wood trebuchet, then predict a shooting range, then test and verification. I try to use your demo to predict shooting range. Maybe, modified a little to fit practical condition, I don't know how, so far. The small wood toy is lovely, but it after tested, It's always a low efficiency (about 10% only) to convert potential energy to kinematic. So we are struggle to improve the toy efficiency a little bit higher in the meantime.

The trebuchet competition will be hold in this weekend. So far, I am wondering, if any of our young engineers would make something new and useful. I would keep you informed in more details, as soon as we find something interesting.

POSTED BY: Frederick Wu

Perhaps you could make a use of System Modeler too? Take a look at Model Your Own Medieval Catapult Design.

enter image description here

enter image description here

POSTED BY: Sam Carrettie
Posted 8 years ago
Attachments:
POSTED BY: Erik Mahieu
Posted 8 years ago

Hello Erik,

Excellent job for developing two trebuchet demos ! I have two questions.

  1. Inside you notebook (Trebuchet revisited-9.nb), It state Lagrangian 3 equations, the first equation is like below. notebook equation However, in demo code, you use anther equation, code equation Which one is correctlly? Is code equations better or solvable? How you get three equations from Lagrangian?

  2. I make some approximate calucation based on your demo, see attachment notebook. Input energy ( potential energy from countermass) = mgh ; Output energy ( kinematic energy of projectile weight with released velocity) = 1/2 m v^2 ; I found, Input energy is almost same as output energy. That means the effiency of device is always 100%. Usually, a practical trebuchet effiency is about 10% - 85% (maximum) based on Donald B. Siano's paper. Is that means this demo is a perfect theoretical simulation so far, without consider energy loss (like conflict and friction)? Am I understanding right ?

If I want to add a coefficient for effiencency as engineering way, where I should put a coefficient inside the 3 Lagrangian equations? What do you suggest ?

BTW, One of your fans found you changed your logo. ^_^

Attachments:
POSTED BY: Frederick Wu
Posted 9 years ago

Hello Erik,

Apologies for the delayed response.

Many thanks for explaining all the concepts clearly and providing suggestions.

The simulation done above is a great help in understanding dynamics and how Mathematica works.

Thanks,

Varun

POSTED BY: Varun Kulkarni
Posted 9 years ago

This is a better version with some loose ends fixed.

One can experiment and see that the most critical parameter to obtain a long shooting range is the moment the projectile is released from the poach. In this Manipulate, this is set by the angle between the vertical and the sling {rlsAngle) at the moment of release. This was the most critical job of the trebuchet operator: pull a string to open the poach at the right moment to obtain the desired range. Good luck!

enter image description here

Attachments:
POSTED BY: Erik Mahieu
Posted 9 years ago

The demo is beautiful, Erik. Thank you. I love Lagrangian mechanics, and here we have additional interest in knowing these things brought the age of castles to an end!

POSTED BY: David Keith
Posted 9 years ago

This is exactly what I suggested David. here is an attempt to "glue" the two together using the trebuchet NDSolve output as the initial conditions of the projectile equations. I attach a preliminary notebook based on my previous demonstration. Still needs some refining! And here is a GIF:

Attachments:
POSTED BY: Erik Mahieu
Posted 9 years ago

Hello David,

I tried using separate projectile equations and the impact equations for the trebuchet, but I get errors like: Limiting value is not a machine sized integer. I cannot quite understand, how to use the projectile equations of motion and impact equations for the trebuchet.

I can solve impact equations separately for a 3 pendulum system which has a similar analogy to the trebuchet, so that the pendulum hits a wall at x=0.I have attached the file for reference. But when it comes to the trebuchet, I cannot seem to set up the equations properly.

Any suggestions.

Again apologies for the trivial questions and the inconvenience.

Thanks Varun

Attachments:
POSTED BY: Varun Kulkarni
Posted 9 years ago
POSTED BY: David Keith
Posted 9 years ago

Hello David,

Apologies for the delayed response.

Thank you for explaining all the concepts in detail and providing a well defined approach for problem solving and modelling.

It really helped in the understanding of different aspects and the way equations are used and solved in Mathematica.

Thanks,

Varun

POSTED BY: Varun Kulkarni
Anonymous User
Anonymous User
Posted 8 years ago

David said >

It is easier to find your way through a problem if you put each calculation in its own cell, and you evaluate and look at the result as you go along.

I had thought Mathematica 11.0 has a feature that debugs functions step by step, it has breakpoints i cannot get it to work yet. Documentation is very thin - despite setting breakpoints it never stops :)

I made the below for an earlier Mathematica (4.0). I'm unsure if it works "for complicated functions" in Mathematica 11.0 or not. It is in jutilspkg part of fNBookForm2 (orig. part of PeriodicTable` pkg). It is supposed to do what you said without all the ; editing. This allows being able to freeform work a cell at a time, then have a function made auto. It works but needs tender care, and has a help page.

Attachments:
POSTED BY: Anonymous User
Posted 9 years ago

Hi Varun,

I agree with Erik on this. The trebuchet part of the problem determines the coordinates and velocity at the point where the projectile leaves the pouch. These are the initial conditions for a second set of differential equations which describe ballistic flight. There are two ways to string these together: You can do so manually by executing them in sequence, either in separate cells or in the same cell; or they can be placed in a module, with local variables connecting them, and both solutions used for building the plot. To animate them together, they would need to be all encapsulated in the animation.

Using the impact point as an input is another matter. It is really part of the solution. The likely method here is to build the full simulation into a function which can return the impact point. A solver like FindRoot can then be used to solve for some selected input parameter being used to adjust the impact. In a simple projectile problem that might be the launch angle. This gets you to a way to specify the impact point as an input, and retrieve the parameter setting needed, as well as the full trajectory.

Before version 10, this would require that NDSolve be enclosed in the FindRoot process, which means solving the set of diffeqs many times. However, with V10 we have ParametricNDSolve, which allows us to specify an input parameter and returns a function for a solution to the diffeqs, given a value of the input parameter. This output from ParametricNDSolve can be used as an alternative to wrapping the solution process in the solve.

Best regards, David

POSTED BY: David Keith
Posted 9 years ago

I would not combine the equations but use the output (speed and direction) as the input of the projectile equations. Two separate computations.

POSTED BY: Erik Mahieu
Posted 9 years ago

Hello,

I tried solving both equations separately, but I face an error everytime saying that the limiting value is not a machine sized number and a certain replacement rule is invalid. I cannot quite figure it where that error exists.

I used the below mentioned Projectile equations as suggested for the Trebuchet, but, cannot get the projectile to leave the Trebuchet.

Manipulate[
 ParametricPlot[{{V Cos[\[Theta]] t, 
    V Sin[\[Theta]] t - 
     9.8 t^2/2}, {V vt Cos[\[Theta]]/9.8 (1 - Exp[-9.8 t/vt]), 
    vt/9.8  (V Sin[\[Theta]] + vt) (1 - Exp[-9.8 t/vt]) - vt t}}, {t, 
   0, tf}, PlotStyle -> {{Thick, Blue}, {Thick, Red}}, 
  AxesOrigin -> {0, 0}, AxesLabel -> {x, z}, 
  PlotRange -> {{0, 400}, {0, 300}}, ImageSize -> 500, 
  Epilog -> {Green, PointSize[.02], 
    Point[{{V Cos[\[Theta]] tf, 
       V Sin[\[Theta]] tf - 
        9.8 tf^2/2}, {V vt Cos[\[Theta]]/9.8 (1 - Exp[-9.8 tf/vt]), 
       vt/9.8  (V Sin[\[Theta]] + vt) (1 - Exp[-9.8 tf/vt]) - 
        vt tf}}]}], {{V, 48.8, "initial velocity"}, 1, 100, 
  Appearance -> "Labeled"}, {{\[Theta], 1.09, "angle"}, .1, \[Pi]/2, 
  Appearance -> "Labeled"}, {{vt, 100, "terminal velocity"}, .01, 300,
   Appearance -> "Labeled"}, {{tf, 8.75, "time"}, .1, 17, 
  Appearance -> "Labeled"}]

How do I separately solve for the Trebuchet and the Projectile, so that I can get an animation where the projectile actually leaves the trebuchet?

Thanks.

POSTED BY: Varun Kulkarni
Posted 9 years ago
POSTED BY: Varun Kulkarni
Posted 9 years ago

Once the projectile leaves the pouch, the trebuchet is no longer in the game. We then have a gravity (and air friction damping) only situation that can be solved by another differential equation. Have a look at another demonstration that handles this problem very well: Projectile with Air Drag It is possible to combine these two demonstrations and use the trebuchet output (speed, angular position,...) as input to the ballistic motion of the second demonstration. If you are interested, a very good article is: Trebuchet mechanics by D B Siano

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

Group Abstract Group Abstract