-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should single pendulum and double pendulum include NewDEModel? #2901
Comments
Yes, I think all of our DEs should use New DEModel (unless I'm misunderstanding your question). |
That's great! And once we've converted all of them to use the new version of DE Model, we should remove the old variant (which is a great contribution to #2371 😄 ). |
@smiths My apology, I didn't update the description before. The single pendulum example doesn't have any DEs Model in its original SRS. So I was wondering if it could fit in |
@cd155, the single pendulum does have an ODE in it, but you are correct that none of the chunks include an ODE. I just had a look through the SRS and the ODEs come up in the derivations. This seems odd to me, but I don't think you should make a change at this time. I anticipate a reorganization of all of the examples once we move to our new approach of refining theories. (I haven't had time to start the process, but this is something that I will be looking into.) For now, the single pendulum example shouldn't include the new DE model. This will likely change in the future. For your question about the solution for the ODE for a simple harmonic motion, I agree that not enough detail has been provided. The solution is correct, but the details are not given. An explanation for solving simple harmonic motion is provided on-line here: http://scipp.ucsc.edu/~haber/ph5B/sho09.pdf You'll see at the end there is a pendulum example that shows why phi (in their general solution) is zero. (This is why we don't have phi (phase shift) in our solution. Can you please create an issue for adding the details of the derivation to the solution to the single pendulum example? |
No problem, the new issue be created A follow-up question about the simple harmonic motion @smiths Sorry if I wrong, but it seems to me the following equation is not an ODE Most other examples will have an ODE equation in their Instance Model, but not the single pendulum. An ODE solver can only solve an ODE equation, but once we simplify the simple harmonic motion to x(t) = A cos(ωt + φ), it is no longer an ODE anymore. In this case, should we use its form (contained second order ODE) in its Instance Model, rather than reforming it all the way to x(t) = A cos(ωt + φ) ? |
You are correct that x(t) = A cos(ωt + φ) is not an ODE. It is the solution to an ODE. As I said above, the single pendulum document does have an ODE (the ODE that is solved to get the solution for x(t)), but the ODE is part of a derivation, rather than a chunk (instance model or otherwise). In the simple pendulum example the ODE is solved in closed-form, so the ODE does not appear in an instance model. The instance models are instead directly using the solution to the ODE. When we revise the examples to consistently use theories throughout refinement from background to final theories, my guess is that the ODE will appear in an earlier chunk, even if it doesn't appear in the IM. For now though, we don't need to add an ODE chunk to the single pendulum example. |
Sorry for keeping asking questions, I have one last question before closing this ticket. @smiths For the double pendulum example, it eventually gets two second-order ODEs, θ1'' and θ2'' I think the equation of θ1'' and the equation of θ2'' belong to two Instance Models. Am I right? |
Sorry I missed that part of your question @cd155. In the future, if you split your issues into separate parts, it helps to prevent parts getting missed. 😄 If possible, I would prefer the two ODEs to be together because they form a system of second order ODEs. The two ODEs are coupled because the solution for one depends on the other. Solving the double pendulum example will involve turning each of the second order ODEs into two first order ODEs, for a final system of 4 first order ODEs. This problem was solved manually (outside of Drasil) by a former CAS 741 student. (I think I've pointed you to the original example in the past, but I can find it again if you need me to.) You might want to look at that previous student's work. |
@smiths Thanks so much. I think I still have the link, and I will take a look at it. That's all my questions. |
1. Should single pendulum include NewDEModel in its IM?
It's a little bit odd to ask this question. Should the single pendulum and double pendulum example use NewDEModel in their Instance Model?
In the single pendulum example, the IM start with Newton's second law for rotational motion,
then eventually reduce
Finally, get
The IM has an equation that comes from an ODE, but the equation itself is not an ODE. The single pendulum doesn't have any DEs Model in its original SRS, so I was wondering whether it should fit in
NewDEModel
.2. Questions about steps in single Pendulum
I also have some trouble understanding how to get from
to
I feel there are some disconnections. Here is the whole derivation
If you don't mind, could you explain how to get the simple harmonic motion in the highlight red box?
3. Questions about double Pendulum
I was wondering what are equations in IM, should they be
If yes, there should be two instance models in the IM, am I right?
The text was updated successfully, but these errors were encountered: