Bonjour,
J’aurais besoin d’un petit coup de pouce pour résoudre le problème suivant :
d2c/dx2=P*[c^a*exp(b/2)*coth(c^a*exp(b/2))-1]
avec les conditions suivantes :
pour x=0 => c=1
pour x=1 => dc/dx=0
sur le domaine x=[0 :1]
Mon problème est le suivant :
Je sais résoudre ce système (voir code) mais avec des conditions initiales c'est-à-dire c(0)=.. et c(0)=.. mais comment fais ton avec c(0)=.. et c(1)=
? est-ce possible ? Si oui comment ?
Merci d’avance pour votre aide !
1 2 3 4 5 6
| ...
c0=[1;0];
xstep=0.01;
xs=[0:xstep:1];
[x,c]=ode15s(@solver,xs,c0);
... |
1 2 3 4 5 6 7 8 9
| function dc_dx = model( x, c)
global P a b;
% in order to share the variables with the main script
dc_dx= zeros(2,1); %in order to obtain the correct vector size
%differential equation:
dc_dx(1)=c(2);
dc_dx(2)=P*(c(1)^a*exp(b/2)*coth(c(1)^a*exp(b/2))-1);
end |
Partager