필터 지우기
필터 지우기

Solving multi-variable ODE

조회 수: 5 (최근 30일)
진욱 강
진욱 강 2023년 2월 17일
편집: Torsten 2023년 2월 17일
Hello, I am having a hard time solving an ODE. Any help witll be grealy appreciated.
Below is the ODE i am trying to solve.
As you can see, I am trying to solve for η, and , and are just constants.
The problem is that v(r) is a function of r which is defined over r= [0 1]. (and same for )
And of course i only need to solve η for r = [0 1].
I looked at many examples, but i could not find any that resembles my equation.
The initial conditions are η=0, and r 0.
Before you tell me that I can just solve it by integrating it both sides, I have solved it that way, but i just want to learn how to solve such ODEs without integrating it.
Thanks in advance!!

답변 (2개)

Torsten
Torsten 2023년 2월 17일
편집: Torsten 2023년 2월 17일
If nu(r) is known, you have to insert the expressions for nu(r) and dnu/dr in your equation for eta.
If nu(r) is unknown, you must solve an additional equation for it.
And then you can apply ode45 to solve one equation for eta or two equations for eta and nu.
  댓글 수: 1
진욱 강
진욱 강 2023년 2월 17일
Hello torsten, yes v or as you mentioned nu, (it's actually velocity) is known and well defined for r=[0 1].
But i am not sure what you mean by insert the expression for into the equation for eta.
V is an array so do i simply put the array into the ODE and plug it into ode45?
thanks!

댓글을 달려면 로그인하십시오.


Torsten
Torsten 2023년 2월 17일
편집: Torsten 2023년 2월 17일
Use interp1 to interpolate the vector values for v and dv/dr to the values r requested by the solver.
The example
ODE with Time-Dependent Terms
under
shows you how to proceed.

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by