Modeling the Trebuchet
at Warwick Castle

4 May 2016

The world’s largest trebuchet

Counterweight mass = 6000 kg

Top speed of a 15 kg stone = 150 mph (250 km/h).

Hamster wheel diameter = 4 m

Approach

Lagrangian mechanics

Trough supporting stone handled with Lagrange undetermined multiplier

Physical constants estimated from photograph and available web data

Expressions left symbolic; constants applied via set of rules

consts = {
g->9.8, (* m/(s^2)*)
h -> 8.5, (* elevation of fulcrum, m *)
b -> 1.7, (* fulcrum to point of suspension of the counterweight, m *)
(* etc. *)

Showing the trebuchet

BoomWidth[z_]:=wboom-(wboom-minwboom)(z/lboom) 
BoomMass[]:=ρwood Integrate[((BoomWidth[z])^2),{z,0,lboom}];
BoomCM[]:=ρwood Integrate[((BoomWidth[z])^2)z,{z,0,lboom}]/BoomMass[]; (* from thick end *)
BoomI[] := ρwood Integrate[((BoomWidth[z])^2) (z^2),{z,0,lboom}] - BoomMass[] ((BoomCM[])^2);consts = {
g->9.8, (* m/(s^2)*)
h -> 8.5, (* elevation of fulcrum, m *)
b -> 1.7, (* fulcrum to point of suspension of the counterweight, m *)
w -> 3.25, (* suspension to CM of counterweight, m *)
l -> 11, (* fulcrum to end of boom, m *)
mcwt ->  6000, (* counterweight mass, kg *)
mstone->15, (* kg *)
s -> 8.6, (* length of the net, m *)
lboom -> 13.8, (* total length of boom, m *)
rfulcrum->lboom - l, (* distance from thick end of boom to fulcrum *)
wboom->0.75, (* m, width of boom at the base *)
minwboom->0.25, (* m, width of boom at the far end *)
ρwood->850, (* kg/(m^3), density of the wood of the boom *)
mboom->BoomMass[],
rcmboom->BoomCM[]-(lboom-l), (* m, distance from fulcrum to CM of the boom *)
Iboom->BoomI[] + mboom (rcmboom^2), (* kg (m^2), for rotation about the fulcrum *)

wcwt -> 2, (* m, half-width of the counterweight *)
hcwt->1, (* m, half-height of the counterweight *)
Icwt->(mcwt/12)((wcwt^2)+(hcwt^2)) (* kg (m^2), moment of cwt about its cm *),
startingθ->2.453923001678671`
};
pivot = {0,h};
CMBoom[θθ_] := pivot + rcmboom{Sin[θθ],Cos[θθ]};
AttachSling[θθ_]:= pivot + l {Sin[θθ],Cos[θθ]}; (* l is the distance from fulcrum to boom end *)
AttachCWT[θθ_]:=pivot - b{Sin[θθ],Cos[θθ]}; (* b is the distance from fulcrum to attachment *)
CMCWT[θθ_, ϕϕ_]:= AttachCWT[θθ] - w{Sin[ϕϕ],Cos[ϕϕ]} ;
FreeStone[θθ_,ψψ_]:=AttachSling[θθ] - s{Sin[ψψ],Cos[ψψ]};
(* assuming trough height is 0 *)
GroundPsi[θθ_]:=Module[{p = AttachSling[θθ] - GroundStone[θθ]},
ArcTan[p[[2]],p[[1]]]
];
Constraint[θθ_,ψψ_]:=h+l Cos[θθ]-s Cos[ψψ]; (* the vertical position of the stone *)ShowTrebuchet[{θθ_, ϕϕ_, ψψ_}]:= Module[{pivot,boom, rot, gboom, gbackground,gcwt, attachcwt,cmcwt,cwtdims,
attachsling,stone,gsling},
pivot = {0,h} //.consts;
attachcwt = AttachCWT[θθ]//. consts;
cmcwt = CMCWT[θθ,ϕϕ] //.consts ;
cwtdims={wcwt,hcwt} //.consts;
gcwt = Graphics[{Darker[Brown],Thick, Line[{attachcwt, cmcwt}],
Rotate[Rectangle[cmcwt-cwtdims,cmcwt+cwtdims],-ϕϕ,cmcwt],
Black,Disk[attachcwt,0.1]
 }];

attachsling = AttachSling[θθ] //.consts;
stone = FreeStone[θθ, ψψ]//.consts;
gsling = Graphics[{Line[{attachsling,stone}],Disk[stone,0.15]}];

boom = { {((-wboom)/2),0},{(wboom/2),0},{(minwboom/2),lboom},{((-minwboom)/2),lboom}} //.consts;
gbackground = Graphics[{RGBColor[0.9,0.9,0.9],Rectangle[{-24,-2},{12,24}],White,Disk[{0,0},0.25],
Line[{{-8,h},{8,h}}]}] //. consts;
(* Now rotate the boom through θ *)
rot = RotationTransform[-θθ,{0,rfulcrum}] //.consts;
gboom = Graphics[Translate[
 GeometricTransformation[{Brown,Polygon[boom], Black, Disk[{0,rfulcrum},0.2],
Red, Disk[{0,rfulcrum+rcmboom},0.15]},rot],{0,h-rfulcrum}]] //.consts;
Show[{gbackground,gboom,gcwt,gsling}]
];

Manipulate[ShowTrebuchet[{θ °, ϕ °, ψ °}], {{θ, -130}, -180, 180, Appearance -> "Open"}, {{ϕ, 0}, -180, 180, Appearance -> "Open"}, {{ψ, -90}, -180, 180, Appearance -> "Open"}]

Calculating the Lagrangian

We express the position of the counterweight and stone in terms of the boom angle θ(t), counterweight angle ϕ(t), and sling angle ψ(t)

Express kinetic and potential energies from positions and derivatives

Apply constraint: Constraint[θθ_,ψψ_]:=h+l Cos[θθ]-s Cos[ψψ]

LagrangianFree = KineticEnergyFree - PotentialEnergyFree; LagrangianGround = LagrangianFree - λ[t] Constraint[θ[t], ψ[t]];

Animation of the initial motion

Animate[Evaluate[ShowTrebuchet[{θ[t], ϕ[t], ψ[t]}/.GroundSol/.t->tt]],{tt,0,2.12}]