Skip to content
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

Drasil Research Group Meeting Agenda, 1:30 pm, Friday May 20, 2022 (On Teams) #2984

Closed
smiths opened this issue May 18, 2022 · 6 comments
Closed

Comments

@smiths
Copy link
Collaborator

smiths commented May 18, 2022

The agenda for this coming week is as follows:

  1. Dong update
  2. Peter update
  3. Jason update
  4. Org Mode for Literate Programming
  5. Cold cases
    a. @peter-michalski SWHS Body, Hardcoded Names #1848
    b. @balacij - Allow for different authors between documents #1804
    c. @cd155 Implement "unmodular" option for code generation #1999
  6. Questions/Comments/Concerns/Discussion
@cd155
Copy link
Collaborator

cd155 commented May 20, 2022

A follow-up on today's meeting.

I think Dr.@smiths mentioned there might be some problems with solving the double pendulum example, but I didn't remember exactly what. Is that be ok to say it again, so I can re-evaluate the solution.

@cd155
Copy link
Collaborator

cd155 commented May 20, 2022

If we have the following equations, we can solve it as the initial value problem by giving four initial values, for example

θ₁ = 30 degree
ω₁= 5 degree/s
θ₂ = 60 degree
ω₂ = 25 degree/s

other values, like m₁, m₂, L₁, L₂, and g are given, so I think we have enough information.

Screenshot from 2022-05-20 14-54-00

@smiths
Copy link
Collaborator Author

smiths commented May 22, 2022

My question was about whether you depend on being able to represent the system of ODEs in matrix form. Although the system of equations above is definitely solvable using the external libraries, you cannot represent it in matrix form because the dependent variables aren't isolated. You don't have a linear ODE in this case.

As long as the matrix form is required this isn't a problem.

@cd155
Copy link
Collaborator

cd155 commented May 22, 2022

I see, thanks for bringing it up. That's certainly a problem in there because we ask users to put coefficient and dependent variables in a matrix form.

Basically, this form cannot be entered in a matrix form. In the long term, do you think is there any potential solution to this problem?

Screen Shot 2022-05-22 at 10 27 49 AM

@JacquesCarette
Copy link
Owner

Some solvers allow "black boxes" as input, to represent arbitrary functions of the dependent variables. We should be guided by the solvers themselves as to what to do here. I forget the details.

Note that for the pendulum, if the sin/cos addition laws are used, then if new variables for sin(theta_1), cos(theta_1), etc are added (and relations between them), it can be written as a large ODE system

@smiths
Copy link
Collaborator Author

smiths commented May 25, 2022

@cd155, I agree with the reply from @JacquesCarette. Writing a linear system of ODEs in matrix form is actually a fairly special case. It comes up frequently in practice, but there are also plenty of more complex examples. There are algorithms that can solve linear systems quickly and efficiently, but there are also algorithms for the more general case. As long as we can write the differential equations in an explicit form, it should be possible to solve them with one of our libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants