ODE45 can solve Implicit function ?

조회 수: 9 (최근 30일)
영주 김
영주 김 2022년 3월 17일
답변: Kartik Saxena 2023년 12월 8일
d(x1)/dt=f(t,x1,P,Pb)
d(x2)/dt=f(t,x2,P,Pb)
dP/dt = f(t,P,dP/dt)
d(Pb)/dt=f(t,Pb,d(Pb)/dt)
this function can solve ODE45?
and How can solve this function
  댓글 수: 2
Davide Masiello
Davide Masiello 2022년 3월 17일
I would recommend ode15i for this kind of system.
Torsten
Torsten 2022년 3월 17일
... or you can solve eqn (3) and (4) for dP/dt and dPb/dt, respectively.

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

답변 (1개)

Kartik Saxena
Kartik Saxena 2023년 12월 8일
Hi,
The system of equations you've provided appears to involve both ordinary differential equations (ODEs) and differential-algebraic equations (DAEs). The presence of 'dP/dt' and 'd(Pb)/dt' on the right-hand side of their own derivatives suggests that there are algebraic constraints in your system.
MATLAB's 'ode45' solver is designed for solving explicit ODEs where all derivatives are given directly as functions of 't' and the state variables. It cannot directly handle equations where the derivatives are implicit functions of themselves, as is the case with your 'dP/dt' and 'd(Pb)/dt' equations.
For such systems, you can use 'ode15i', which is designed to handle implicit differential equations and DAEs. The 'ode15i' solver requires you to provide a function that computes the residuals of your differential equations for given values of 't', the state variables, and their derivatives.
You can refer to the following MathWorks documentation link for more information about 'ode15i':
I hope this resolves your issue.

카테고리

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