Coupled ODE eigenvalue problem with Chebfun
Mostrar comentarios más antiguos
Hello Everyone.
I am trying to solve an eigenvalue problem with Chebfun but I getting an error. My code is attached below.
dom = [0,1];
opr = chebop(@(y,u,b,s) [-10*4^2*(1+y*0)^(-1.495)*5^2.*s./(50^2*0.001)...
+4^2*u+(1.495*0^2.*u./(1+y*0).^2)-(1.495^2*0^2*u./(1+y*0).^2)...
+1j*4^2*2*1.495*0*(1+y*0)^(-1.495)*50^2.*u./(4*2*50*0.001*(1+y*0))...
+4^2*(1+y*0).^(-2*1.495)*5^4.*u./(50^2*0.001^2)...
-2*1.495*0*diff(u,1)./(1+y*0)-1j*4^3*(1+y*0)^(-1.495)*5^2.*diff(u,1)/(4*2*50*0.001)...
+1j*4*2*(1+y*0)^(-1.495)*5^2.*diff(u,1)/(2*50*0.001)...
+1j*2*2*(1+y*0)^(-1.495)*5^2.*diff(u,1)/(2*50*0.001)-diff(u,2);...
0.001*b+1j*5*2*u+0.001*diff(b,2)/4^2;-u./(1+y*0)+...
1e-5*(-4^2.*s+1j*(1+1.495)*0.*s./(1+y*0)+diff(s,2))], dom);
oprlam = chebop(@(y,u,b,s) [(-1j*4^2*(1+y*0)^(-2*1.495)*5^4.*b/(5*2*50^2*0.001^2)...
-4^2*u/0.001);b;s], dom);
opr.bc = @(y,u,b,s) [u(0); b(0); s(0);u(1);b(1);s(1)];
[V, D] = eigs(opr, oprlam);
D = diag(D);
The error that I am getting is "Dimensions of matrices being concatenated are notconsistent". I am not sure how to get rid of the error. Please help me here. Thank you.
6 comentarios
Hiro Yoshino
el 11 de Jul. de 2022
what is chebop like?
GAURAV
el 11 de Jul. de 2022
You will have to write your first equation as two first-order differential equations and split your equations in real and imaginary parts such that you have 6 boundary conditions for 6 equations. At the moment, you have 6 boundary conditions for 2 equations - and that's a setting the solver doesn't like.
GAURAV
el 11 de Jul. de 2022
Torsten
el 11 de Jul. de 2022
I don't know if CHEBFUN can handle complex-valued ODEs. You will have to look into the documentation or test with a simple example.
GAURAV
el 11 de Jul. de 2022
Respuestas (0)
Categorías
Más información sobre Numeric Solvers en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!