JacquesCarette / Drasil

Generate all the things (focusing on research software)
https://jacquescarette.github.io/Drasil
BSD 2-Clause "Simplified" License
140 stars 26 forks source link

Projectile Problem: Mix of 2D and 1D vectors in the same equation #3189

Closed smiths closed 1 year ago

smiths commented 1 year ago

In the general definitions for projectile, we have an equation that mixes 2D and 1D vectors. Specifically for GD:rectVel we have the equation:

image

On the left-hand side of the equation, we have a bold v, which suggests a 2D vector, but the right-hand side of the equation is for a 1D vector. The equation shouldn't have a 2D vector, both sides of the equation should be 1D. The equation is for a 1D problem (motion in a straight line).

@JacquesCarette I'll assign the issue to you since we (you, me and @balacij) were just talking about it, but you may want to reassign it to someone else.

JacquesCarette commented 1 year ago

This is tricky, as I think what's going on is the the lhs uses the generic 'velocity' notion which is a vector, and the rhs implicitly assumes the situation is 1D. We might need to 'specialize' velocity (i.e. create a new chunk) that is 1D to get this to work properly.

Question for @smiths : should that be done locally in Projectile, or should 1D velocity be in our 'base' database of concepts?

smiths commented 1 year ago

I vote for 1D velocity to be in our base database of concepts. The concept of rectilinear motion comes up in many cases other than projectile motion. Actually, any time we have a velocity vector, we still have 1D velocity, in the form of each of the components of the vector which are 1D velocities in the direction of the corresponding coordinate axis.

When I looked at what would be involved in modifying projectile to capture the falling sack example, I saw that the theories related to 1D rectilinear motion would be reused. This further suggests that the concept should be in our base database of concepts.

If it is an issue with naming, we could call 1D velocity speed, instead of calling it velocity. Speed acts in one dimension, with the sign specifying which direction (forward or reverse) in the dimension. We usually think of the coordinate system as a Cartesian coordinate system, but this would work in a general curvilinear coordinate direction.

JacquesCarette commented 1 year ago

That seems like a reasonable way forward (have speed as 1D velocity in our base concepts). We should have a way to know that it is a specialization, but we don't (yet).

smiths commented 1 year ago

@ManvendraJani I'm going to assign you to this issue, since you sorted out the g_vect problem. I believe that we can sort this issue out by distinguishing speed (1D) from velocity in our base concepts. Closing this issue will potentially be helpful because many of our projects (like @samm82's thesis) are building on projectile.

janim2-2004 commented 1 year ago

@smiths This issue might have been fixed as a result of #3432 image Linear velocity used to be represented as vector, we changed it to be a scalar. Although I am not sure if the definition is what we want. I was thinking it should say velocity instead of speed, as saying 1-D speed doesn't really make sense. image

smiths commented 1 year ago

Yes! I thought this had been sorted out, but this issue was still open. Great that we can close it.

I agree that 1D speed sounds awkward, but the solution is probably to drop the 1D and just say speed. Looking at your table above, I see there is already a speed, in addition to a 1D speed. Is there a distinction between the two in the SRS? I wonder if we should just have v(t). If the speed is constant (that is doesn't depend on speed), we would want to use the symbol v^c for it, as for constant acceleration. I don't think we are using the concept of constant velocity in the projectile problem though. I think when we write v, we mean v(t). (Engineers and scientists often don't include the arguments to a function when they are assumed.)

@ManvendraJani can you check where we use v versus v(t)? If we should change the v's to v(t)'s, then please create another issue for this.

We'll close this issue once our discussion is over.

janim2-2004 commented 1 year ago

Looking through the SRS the only uses for speed (not as a function of time) were in these cases; In the derivation of rectilinear position:
image

In the definition of magnitude: image

I believe both can be replaced with v(t)

janim2-2004 commented 1 year ago

I agree that 1D speed sounds awkward, but the solution is probably to drop the 1D and just say speed

I think that might cause some issues with conflicting variables, unless you want to get rid of 'v' completely form the entire code. A possible alternative could be 'Speed as a function of time' but that seems inconsistent with the other descriptions.

smiths commented 1 year ago

I want to get rid of "v" completely from the entire code. Your examples show that every instance of v could (and for rigour should) by v(t). Do we do the same thing with p and p(t)? My guess is that we do, based on the equation above defining velocity.

janim2-2004 commented 1 year ago

made a new issue regarding p(t) and v(t) #3486