How to write and solve system of differential equations?
2 次查看(过去 30 天)
显示 更早的评论
I have the following two equations that describe how drug "d" is released from a sphere of radius "r" made of a polymer that diodegrades into "m" monomers: (you can see the equations in the jpg file).
I want to feed matlab with the equations so that I can extract a release time result. Need help with how to present the equations in matlab, which solver to use and any feedback that can make the system clear to my understanding.
FYI: (1.) a: most probably will be 1, (2.) Dm / Dd / k_DH: constants, (3.) the second term of both equations (v_r * (∂C_d)/∂r ) could be omitted at first
0 个评论
回答(2 个)
Lateef Adewale Kareem
2017-1-23
This is a pde. To solve this problem, I suggest you use method of lines. Discretize the equation in space. let the solution at each point in space be represented by a member of a vector. then write the equation for each member as a function of such member, its neighbors and time (use boundary condition to account for neighbours of most extreme members. then pass the problem to ODE45.
Although you are calling an ode solver, but the solution to the system is actually the solution to the pde and you can animate the Concentration versus r plot over time.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!