フィルターのクリア

How to apply asymptotic matching condition in bvp4c?

1 回表示 (過去 30 日間)
Day Rosli
Day Rosli 2016 年 2 月 4 日
Hi, I want to know how to write the code to apply asymptotic matching condition? In the paper, it is stated that they apply asymptotic matching condition for the range of 0.5<n=<1. The asymptotic matching condition is,
(U'(x),V'(x))=(n/(x*(n-1)))*(U(x),V(x)) as x->infinity
This is the code without the asymptotic condition.
function ScriptAA
n=0.5;
infinity=20;
solinit = bvpinit(linspace(0,infinity,30),[0 1 0 -1 0]);
sol = bvp4c(@(x,y)VK(x,y,n),@VKbc,solinit);
x = [0:2:20];
y = deval(sol,x);
figure
plot(sol.x,sol.y(1,:)); %Plot U,V,W,Theta
title('Plots of U versus x')
ylabel('U(x)')
xlabel('x')
drawnow
hold on
for i=2:6
n = n+0.1;
sol = bvp4c(@(x,y)VK(x,y,n),@VKbc,sol);
lines = {'b-','c-','r-','g-','k-','y-'};
plot(sol.x,sol.y(1,:),lines{i}); %Plot U,V,W,Theta
end
legend('n = 0.5, n = 0.6','n = 0.7','n = 0.8','n = 0.9','n = 1.0',1);
hold off
function yprime = VK(x,y,n)
a = ((1-n)/(n+1))*x;
c = (y(4)^2+y(5)^2)^((1-n)/(n+1));
b = ((c*y(4))^2+(c*y(5))^2)^((n-1)/2);
yprime = [ c*y(4) % U'
c*y(5) % V'
-2*y(1) - a*c*y(4) % W'
y(1)^2 - (y(2)+1)^2 + (y(3)+a*y(1))*c*y(4)
2*y(1)*(y(2)+1) + (y(3)+a*y(1))*c*y(5)
];
end
function res = VKbc(ya,yb)
res = [ya(1)
ya(2)
ya(3)
yb(1)
yb(2)+1
];
end
end
Thank you in advance!

回答 (0 件)

カテゴリ

Help Center および File ExchangePartial Differential Equation Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by