Can someone help me solve this different equation on matlab?

4 次查看(过去 30 天)
Hi everyone, I am trying to solve the following equation: 1/r * d/dr(r*dS/dr) + c1(S) - c2(S) = 0 I am trying to solve to find the value of “S”, r is the radius, and c1 and c2 are properties with values depending on S, how can I solve this on matlab? I tried using bvp4c but I probably put the wrong ode and wrong initial guesses so it wasn’t converging

回答(1 个)

Star Strider
Star Strider 2024-2-18
Perhaps this —
% 1/r * d/dr(r*dS/dr) + c1 - c2
syms r S(r) c1 c2 S0 DS0
Eqn = 1/r * diff(r*diff(S),r) + c1 - c2
Eqn(r) = 
S = dsolve(Eqn, S(0) == S0)
S = 
.
  6 个评论
Jad
Jad 2024-2-18
编辑:Jad 2024-2-18
Thank you everyone for the comments, Sam, the problem actually is related to plasma physics, i am trying to solve the Elenbaas Heller equation, which is the energy balance all function of what we call the heat flux, denoted as “S”. Basically, the differential equation I am trying to solve is the following: 1/r * d/dr(r*dS/dr) + sigma(S)*E^2 - 4*pi*epsilon(S) = 0 E is the electric field which is given (i’ll actually have to use a for loop to solve for several E values to draw a graph, but it is given not calculated), sigma(S) is the electric conductivity function of S, and epsilon(S) is a radiation parameter also function of S. r is the radius of the plasma, and i need to solve the differential equation to find the heat flux “S”
I know boundary conditions: S(r=0)=0 and dS(r=rmax)/dr=0
Torsten
Torsten 2024-2-18
It would be easiest if you include your attempt where you (unsuccessfully) used "bvp4c".

请先登录,再进行评论。

类别

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