Model a ball in a moving circular bowl using Cartesian coordinates

  • #1
joey_ra
10
2
Thread moved from the technical forums to the schoolwork forums
TL;DR Summary: Ball in a moving circular bowl. No friction. Assume the mass has no effect to bowl acceleration. Ball is modeled as a pointmass (no rolling). Cartesian coordinates

Hey :)
I have a question regarding a mechanical problem. I want to simulate a ball in a moving circular bowl. The dynamics of a ball in a circular bowl that is not moving can be derived in cartesian coordinates (unfortunately I need it in cartesian coordinates) via lagrangian multiplier like shown here on the last slide: https://users.physics.ox.ac.uk/~harnew/lectures/lecture26-mechanics-handout.pdf

to sum it up:
x_ddot = -(lambda/m) * (x/r)
y_ddot = -(lambda/m) * (y/r) - g

where lambda is the normal force that basically constraints the ball to stay on the bowl, g is gravity, r is the radius of the bowl and m is the mass of the ball.

Now that my bowl is moving I added a tangent acceleration to x_ddot and y_ddot due to the acceleration of the bowl like this:

x_ddot = -(lambda/m) * (x/r) - [(Fx * y + Fy * x) / r] * (y/r) // this is the acceleration of the ball
y_ddot = -(lambda/m) * (y/r) - [(Fx * y + Fy * x) / r] * (x/r) - g

where Fx and Fy can be seen as the force acting on the bowl to push it. I'm modeling it like the mass of ball has no effect on the bowl acceleration so Fx and Fy is equal to the acceleration of the bowl (assuming the Mass M of the bowl is 1). Here I only take into account the tangent acceleration of the ball due to the bowl movement. I'm running an optimal control problem where I constraint the ball to stay on the bowl. I introduced lambda as an optimization variable so the optimizer finds the correct normal force such that the ball stays on the bowl. Therefore I don't model an additional normal force on the ball based on the bowl acceleration cause this is in lambda integrated (so i only added the tangent acceleration).

The results in the simulation look good but I want to have a second opinion from some experts on my approach ;)
Because I think there is a better way to model the problem.

not that x/r = cos(phi), y/r = sin(phi) the phi is the angle between y axis and ball position.
 
Physics news on Phys.org
  • #2
Hi, and :welcome: !

I have trouble imagining a circular bowl. Is it the lower half of a spherical shell ?

Your coordinates are with respect to what reference ?

Perhaps a picture can enlighten us ??

And: learn some ##\LaTeX## to present your equations and make life a little easier for those trying to help you ! Then your

x_ddot = -(lambda/m) * (x/r)
y_ddot = -(lambda/m) * (y/r) - g

written as

$$
\
end{align*}begin{align*}
\ddot x &= -{\lambda \over m}\cdot {x\over r}\\\
\ddot y &= -{\lambda \over m}\cdot {y\over r}-g
\end{align*}
$$

becomes
$$\begin{align*}
\ddot x &= -{\lambda \over m}\cdot {x\over r}\\
\ddot y &= -{\lambda \over m}\cdot {y\over r}-g
\end{align*}$$

and we can all wonder about this :smile:

(tutorial under the button at lower left:
1732297386548.png
)

##\ ##
 
  • Like
Likes berkeman
  • #3
  1. I can open the link but I cannot find the bowl example. What I see stops at the pendulum example 26.3.2.
  2. The title of this thread, "Ball in moving bowl", implies that the bowl is moving. Is that what you meant to say? If so, how is the bowl moving?
  3. When you say "I want to simulate a ball in a moving circular bowl", what exactly are you looking for that you can use to construct your simulation? Is it the trajectory of the ball in the bowl given a set of initial conditions?
 
  • #4
Hey :) thanks for your replies!

I should have been more specific. For now I'm modelling a 2d halfcircle in which the ball moves. this should be similar to a mass attached to a pendulum. Therefore the dynamics of the bowl and the pendulum are equal, right?

If the bowl is not moving the dynamics are then given by the orange marked equations. I'm assuming the force Fx and Fy on the bowl is equal to the bowl acceleration and I have full control on these forces (in my optimal control problem they are my control inputs).

imagine the ball lies in the equilibrium position (x=0, y=-r) I want to excite the the ball through the movement of the bowl to leave the bowl at the edges and be in freefall (to receive a juggling motion). I'm using the complementarity constraints g(x, y, alpha) * lambda to switch between the dynamics (first the ball is constrained by the normal force lambda to stay on the bowl and when it leaves the bowl there is only freefall dynamics). This is the reason why I need it in cartesian coordinates because the optimizer has problems with switches.

My general question is if my added terms to the ball acceleration x_ddot and y_ddot are correct or if I'm missing some other effects like coriolis forces, relative kinematics ect.

Unbenanntes Notizbuch-23.jpg
 
  • #5
joey_ra said:
I should have been more specific.
I agree

joey_ra said:
For now I'm modelling a 2d halfcircle in which the ball moves.
Ok. The conventional way to approach this is that you set up a Lagrangian. Do you know how to do that ?

##\ ##
 
  • #6
Here is my current approach. Idea is to apply the lagrangian multiplier method. The radial constraint is the the circle equation where the center x_c and y_c are moving.

I'll insert the momentum equations in the second derivative of the radial constraint to determine the lambda.

What do you think about this?


Unbenanntes Notizbuch-22.jpg
 
  • #7
joey_ra said:
Idea is to apply the lagrangian multiplier method.
To what ?

joey_ra said:
The radial constraint is the the circle equation where the center x_c and y_c are moving.
That's a lot of variables. Are ##x_c## and ##y_c## degrees of freedom, or are they prescribed ? (i.e. does the ball move the bowl?)

BvU said:
The conventional way to approach this is that you set up a Lagrangian. Do you know how to do that ?

##\ ##
Meaning you choose generalized coordinates and build an expression for the Lagrangian ##{\mathcal L}=T-V## in tems of those. Do you know how to do that ?

joey_ra said:
I'll insert the momentum equations in the second derivative of the radial constraint to determine the lambda.

What do you think about this?
Don't understand what you are trying to do. What path to what goal?

##\ ##
 
  • #8
I would absolutely use spherical coordinates instead of Cartesian to set up the lagrangian.

Also is the bowl rotating with constant angular velocity?
 
  • #9
PhDeezNutz said:
I would absolutely use spherical coordinates instead of Cartesian to set up the lagrangian.

Also is the bowl rotating with constant angular velocity?
I’m guessing the question is about a semi-circular track (no need for a bowl) translating in the xy plane with no z-motion or rotation. The ball behaves as a pendulum, sliding back/forth along the track.

If that’s correct, the problem is quite easily solved using the equivalence principle – the apparent gravitational field in the frame of reference of the accelerating track can be found from the earth’s field strength (g) and the track’s acceleration. Then you can claim to have solved the problem using General Relativity!
 
  • Like
Likes PhDeezNutz
  • #10
Steve4Physics said:
I’m guessing the question is about a semi-circular track (no need for a bowl) translating in the xy plane with no z-motion or rotation. The ball behaves as a pendulum, sliding back/forth along the track.

If that’s correct, the problem is quite easily solved using the equivalence principle – the apparent gravitational field in the frame of reference of the accelerating track can be found from the earth’s field strength (g) and the track’s acceleration. Then you can claim to have solved the problem using General Relativity!
Can you specify this a bit more?
 
  • Like
Likes Steve4Physics
  • #11
PhDeezNutz said:
I would absolutely use spherical coordinates instead of Cartesian to set up the lagrangian.

Also is the bowl rotating with constant angular velocity?
But I need it in cartesian coordinates.

the bowl is not rotating. Only xy-translation is possible
 
  • #12
joey_ra said:
But I need it in cartesian coordinates.
Don't understand. It's easy to convert an answer in generalized coordinates to Cartesian coordinates. What's the problem ?

joey_ra said:
the bowl is not rotating. Only xy-translation is possible
Possible ? Is it prescribed or does it have to come from solving equations of motion for the bowl ?

Could you please formulate a complete problem statement for what you want to do ?

##\ ##
 
  • Like
Likes PhDeezNutz
  • #13
Steve4Physics said:
I’m guessing the question is about a semi-circular track (no need for a bowl) translating in the xy plane with no z-motion or rotation. The ball behaves as a pendulum, sliding back/forth along the track.

If that’s correct, the problem is quite easily solved using the equivalence principle – the apparent gravitational field in the frame of reference of the accelerating track can be found from the earth’s field strength (g) and the track’s acceleration. [Edit - see *Note] Then you can claim to have solved the problem using General Relativity!
joey_ra said:
Can you specify this a bit more?
I can - but I won't! Not until you:

a) Confirm my 'guess' above (outline description of the setup) is correct. And provide all other necessary information.

b) Tell us exactly what you are trying to find. E.g. is is just x(t) and y(t) for the ball?

You have already been asked for this but have not yet provided it.

Edit. *Note - this approach can be used if the track has constant acceleration.
 
Last edited:
  • Like
Likes BvU
  • #14
I'm trying to find a function in matlab for an ODE-solver

so the function looks like this:

function [dYdt, N, theta] = fcn_pointmass_in_movable_bowl_cart(~, Y, r, g, u)
% Unpack state variables
x = Y(1); % Bowl center in x
y = Y(2); % Bowl center in y
x_c = Y(3); % Ball position in x
y_c = Y(4); % Ball position in y
x_dot = Y(5); % Bowl velocity in x
y_dot = Y(6); % Bowl velocity in y
x_c_dot = Y(7); % Ball velocity in x
y_c_dot = Y(8); % Ball velocity in y

% Unpack control inputs
Fx = u(1);
Fy = u(2);

% Bowl accelerations
x_c_ddot = Fx;
y_c_ddot = Fy;

% Cartesian accelerations of Ball relative to bowl
x_ddot = ...
y_ddot = ...

% Pack derivatives
dYdt = [x_dot; y_dot; x_c_dot; y_c_dot; x_ddot; y_ddot; x_c_ddot; y_c_ddot];
end

therefore I need to know how to compute the x_ddot and y_ddot.
 
  • #15
BvU said:
Don't understand. It's easy to convert an answer in generalized coordinates to Cartesian coordinates. What's the problem ?


Possible ? Is it prescribed or does it have to come from solving equations of motion for the bowl ?

Could you please formulate a complete problem statement for what you want to do ?

##\ ##
okay I can try but I'm not sure if I'm able to rotate to cartesian coordinates. Maybe I need some help there. I'm going to derive the equations and share them :)
 
  • #16
Steve4Physics said:
I can - but I won't! Not until you:

a) Confirm my 'guess' above (outline description of the setup) is correct. And provide all other necessary information.

b) Tell us exactly what you are trying to find. E.g. is is just x(t) and y(t) for the ball?

You have already been asked for this but have not yet provided it.

Edit. *Note - this approach can be used if the track has constant acceleration.
ah okay, but then it makes no sense for my problem because the acceleration is not constant as it is my controlinput of the system.

yes you can put it like this (b). I want to find x(t) and y(t) when the bowl accelerates. So I need to know how the acceleration of the bowl affects the ball, by knowing the dynamics function
 
  • #17
joey_ra said:
ah okay, but then it makes no sense for my problem because the acceleration is not constant as it is my controlinput of the system.

Fair enough, but I'd say you still haven't specified the setup well enough. In Post #9 I said:
Steve4Physics said:
I’m guessing the question is about a semi-circular track (no need for a bowl) translating in the xy plane with no z-motion or rotation. The ball behaves as a pendulum, sliding back/forth along the track.
Is that correct or not? Or is there some reason you don't want to tell us?!!!

The problem with a 'bowl' is that it is 3D. At least In principle, the ball could move perpendicular to the xy plane making the problem much more complicated.

Also, in your Post #4 diagram, Fx (applied as shown) will produce a torque about the bowl's centre of mass, causing the bowl to acquire angular momentum about the z-axis - unless there is some constraint to prevent this.
 
Last edited:
  • #18
I would love to help (if I can) but I still haven’t heard an exact problem statement. Now we’re moving onto numerical solutions that we must analyze before even knowing what we’re trying to analyze.

I’m bowing out of this thread.
 
  • Like
Likes Steve4Physics
  • #19
Steve4Physics said:
Fair enough, but I'd say you still haven't specified the setup well enough. In Post #9 I said:

Is that correct or not? Or is there some reason you don't want to tell us?!!!

The problem with a 'bowl' is that it is 3D. At least In principle, the ball could move perpendicular to the xy plane making the problem much more complicated.

Also, in your Post #4 diagram, Fx (applied as shown) will produce a torque about the bowl's centre of mass, causing the bowl to acquire angular momentum about the z-axis - unless there is some constraint to prevent this.
Yes, your guess is basically correct. If it's easier for you to see it as a pendulum thats also fine. But this is only valid if the the y coordinate is smaller then 0. Otherwise the ball leaves the bowl and should be in freefall. Because of this I think it's better to stay with the bowl. I also said that you can see the bowl as a 2D problem where the bowl is constrained to not rotate. So you can assume that the forces are applied to the Center of Mass of the bowl.

I'm sorry that all this was a bit confusing. This is my first question in this forum and I'm not really sure what you mean by problem statement. Should I summarize all the infos, assumptions and so on to the problem?
 
  • #20
Frame it as best as a homework type question as you can. As if you were a professor asking your students a question.

This is what I'm getting from your posts, please correct me and or fill in the gaps.

"Derive the equations of motion of a ball (radius ##r##) in hemispherical bowl (of radius ##R##and where ##R \gg r##) where the hemispherical bowl itself is moving. Assume the motion of the ball within the bowl does not effect the motion of the bowl itself. There is a gravitational field present directed downwards."

My confusion:

- how is the hemispherical bowl itself moving (with constant velocity in a straight line?)

Please tell us everything you want us to assume and everything you want to know.

I'm guessing you want to know about constraint forces and under what conditions will the ball lose contact with the bowl?
 
  • #21
I'd written this befoe I noticed @PhDeezNutz has written Post #20. So I'm posting it anyway.

joey_ra said:
Yes, your guess is basically correct. If it's easier for you to see it as a pendulum thats also fine. But this is only valid if the the y coordinate is smaller then 0. Otherwise the ball leaves the bowl and should be in freefall. Because of this I think it's better to stay with the bowl. I also said that you can see the bowl as a 2D problem where the bowl is constrained to not rotate.
Even if the bowl itself does not rotate, there is the possibility that the ball could ‘orbit’ around the bowl's vertical axis. It sounds like you want the ball to move only in the xy plane - effectively the ball is constrained to the lower half of a 'great circle’ of the bowl, in the xy plane. To avoid misunderstanding, it would be simpler (IMO) to says there's a semi-circular track rather than
a bowl.

joey_ra said:
So you can assume that the forces are applied to the Center of Mass of the bowl.
That makes things simpler. But realise that readers of your post might not know (or assume) that - because it's not what your diagram shows.

joey_ra said:
I'm sorry that all this was a bit confusing. This is my first question in this forum and I'm not really sure what you mean by problem statement. Should I summarize all the infos, assumptions and so on to the problem?
Sorry to sound harsh but the previous posts have been wasted because there is no complete/clear description of the system - there are only fragments scattered over different posts. When asked to provide a full problem description, you haven't!

It seems there may still be unstated aspects of the problem. One that springs to mind is the nature of ##F_x(t)## and ##F_y(t)## Are these defined algebraic functions? Or piece-wise values which can (discontinuously) change at arbitrary times? Or something else?
 
  • Like
Likes PhDeezNutz
  • #22
I think you want the cup to have accelerations ##\ddot x , \ddot y## in the inertial (fixed) frame regardless of what the ball is doing in the cup. Forces ##F_x,F_y## in this case are nonsensical( you are ignoring the normal force from the ball, and the cup has no mass). I think you want to investigate 3 coordinates, and their derivatives in the Lagrangian (as has been stated). The two above and the angle ##\theta ## between one of those coordinates and a radial line through the ball since the ball is constrained to move along the arc (effectively a bead on a frictionless semicircular track). That's my interpretation.
 
Last edited:
  • Like
Likes Steve4Physics
  • #23
erobz said:
I think you want the cup to have accelerations ##\ddot x , \ddot y## in the inertial (fixed) frame regardless of what the ball is doing in the cup. Forces ##F_x,F_y## in this case are nonsensical( you are ignoring the normal force from the ball, and the cup has no mass).
To be fair to the OP, Post #1 states:
joey_ra said:
where Fx and Fy can be seen as the force acting on the bowl to push it. I'm modeling it like the mass of ball has no effect on the bowl acceleration so Fx and Fy is equal to the acceleration of the bowl (assuming the Mass M of the bowl is 1).

Anther intended assumption might be that ##m \ll M##, but there is yet no adequate problem statement (IMO).
 
  • Like
Likes erobz
  • #24
Okay so here is the Problem Statement:
A 2-dimensional circular half-bowl of mass M and radius r is shown in the figure. Inside the bowl lies a point mass m that can move frictionlessly along the inner surface of the bowl.

The bowl is free to move translationally in the xy-plane, but it cannot rotate. As a result, moments acting about the bowl can be neglected. Two time-dependent forces, Fx(t) and Fy(t), act on the bowl, causing it to accelerate in the x- and y-directions, respectively.

Due to the bowl's motion, the point mass inside experiences a corresponding motion. Gravitational acceleration g acts in the negative y-direction.

Tasks:
Derive the equations of motion for both the point mass m and the bowl M. Represent the dynamics entirely in Cartesian coordinates (x, y) for both objects.

Determine the expression for the normal force N acting on the point mass m from the bowl's surface.
Unbenanntes Notizbuch-30.jpg
 
  • Like
Likes PhDeezNutz
  • #25
Well, if you are ignoring the normal force on the cup ( which you probably would be better off doing as a first draft ) I think you just need to give say the c.o.m of the bowl has velocities ## \dot x_c, \dot y_c ## and write the Largangian for the ball as a first step ( I don't think you can go directly to ##N## without going through what you have labeled ##\alpha##).
 
Back
Top