boundary conditions at infinity

Good afternoon one and all. Good afternoon torsten sir
Sir my code is working by taking the boundary conditions as x = linspace(0,1,100) but doesnot working at x = linspace(0,Inf,100);
I request you sir please help me how to write the code for 3 sets of boundary conditions at η ≥0 , η =0 and η→∞.
I attached my equations image and my code error below.
My code :
x = linspace(0,Inf,100);
yinit = [0 1 0 1 0 1 ];
init = bvpinit(x,yinit);
options = bvpset('RelTol',1e-8,'AbsTol',1e-12);
sol = bvp4c(@odefun, @bcfun, init,options);
plot(sol.x, sol.y)
hold on
function dydx = odefun(x,y) % equations being solved
x0=1;x1=1;x2=1;x3=1;x4=1;x5=1;x6=1;s=1;Da=1;Gr=1;Gc=1;prs=1;Ra=1;Qr=1;Sc=1; Kr=1; E=1;n=1;s=1;
us = y(1);
usy = y(2);
theta = y(3);
thetay = y(4);
phi = y(5);
phiy = y(6);
dydx = zeros(6,1);
dydx(1) = usy;
dydx(2) = ((1/x0)*(x1*s*us)+(x0/Da)*us-x2*Gr*theta-x3*Gc*phi-(E/s)*(exp(-s*n)));
dydx(3) = thetay;
dydx(4) = ((1/x5)*(x4*prs*theta)+Ra*theta-Qr*theta);
dydx(5) = phiy;
dydx(6) = (Sc/x6)*(s*phi+Kr*phi);
end
function res = bcfun(yL,yR)
s=1;k=1;
res = zeros(6,1);
res(1) = yL(1)-(1/(2*1i))*(1/(s-1i*k)-1/(s+1i*k));
res(2) = yL(3)-(1/s^2)*(1-exp(-s));
res(3) = yL(5)-(1/s^2)*(1-exp(-s));
res(4)= yR(1);
res(5)= yR(3);
res(6)= yR(5);
end
ERROR:
Error using bvp4c (line 248)
Unable to solve the collocation equations -- a singular Jacobian encountered.
Error in bvpmodel (line 12)
sol = bvp4c(@odefun, @bcfun, init,options);

Respuestas (1)

Torsten
Torsten el 26 de Mzo. de 2024
Editada: Torsten el 26 de Mzo. de 2024
You must use a sufficiently large number instead of "Inf" here:
x = linspace(0,Inf,100)
x = 1x100
0 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf

7 comentarios

mallela ankamma rao
mallela ankamma rao el 26 de Mzo. de 2024
Thank you very much for your response torsten sir
I understood how did write code for remaining two set of boundary conditions sir
but i couldnot understand the first set of boundary conditions.
Sir i request you please tell me how to write code for
u1=0, θ=0 and φ =0 for η ≥0
(here u1= yL(1), θ=yL(3), φ=yL(5))
Torsten
Torsten el 26 de Mzo. de 2024
As written, I also don't understand the part u1=0, θ=0 and φ =0 for η ≥0. Maybe you could include the complete description of the problem (e.g. it is referred to (11) which is not part of your graphics).
mallela ankamma rao
mallela ankamma rao el 27 de Mzo. de 2024
Good evening sir
Sir actually after applying Laplace transform, the equations and boundary conditions ( refered as (11) ) are changed into equations (12), (13), (14) and boundary conditions changed into (15).
Please look at attached image sir.
At η =0 and η = ∞, we can write code for BCs sir
but for η ≥0, i can not understand how to write code for BCs sir
Please help me to write code for this sir
Torsten
Torsten el 27 de Mzo. de 2024
As I wrote, I don't understand this either. Maybe including (8) - (11) can shed some light on it.
mallela ankamma rao
mallela ankamma rao el 28 de Mzo. de 2024
Good evening sir
I attched the 8 to 11 equations also sir
Please help to write the code sir
Torsten
Torsten el 28 de Mzo. de 2024
I suggest solving equations (8), (9) and (10) directly using "pdepe".
mallela ankamma rao
mallela ankamma rao el 29 de Mzo. de 2024
Thank you sir. i will try in pdepe method

Iniciar sesión para comentar.

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Preguntada:

el 26 de Mzo. de 2024

Comentada:

el 29 de Mzo. de 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by