solve second order non-linear partial differential equation with boundaries conditions

1 visualización (últimos 30 días)
hello everyone!
I am struggling to find a way to solve this equation
=
with those boundaries condition
where a, b, pac, pev are known constants
hope someone can help me,
thank you!

Respuesta aceptada

Shashank Gupta
Shashank Gupta el 2 de Feb. de 2021
Hi Alessia,
There are many way to solve the above differential equation and some of them are well documented, refer to bvp4c function, it is really good way of solving boundary condition differential equation(@darova also recommend this function in the comments section). There are other ways to solve this, check out this example link.
I hope this references helps you.
Cheers.
  1 comentario
Alessia Nannetti
Alessia Nannetti el 6 de Feb. de 2021
thank you so much for your help!
i actually solved the problem with bvp4c function.
here there is my code
clear all
close all
clc
%stationary and rje uniform
global pac pev fi beta
rsco = 0.0024; %Reference SC resistance at h0 mmHg/(μl/min)
rje = 2.08; %mmHg/(μl/min)
rd = 0.694; %mmHg/(μl/min)
beta = rje/rsco;
pac = 15 %mmHg
pev = 9 %mmHg
n = 30; %number of CC
w = 300; %SC width μm
x0 = 1;
h0 = 1;
fi = rje/rd;
osc = (2*n*w*h0)/fi,
f = 1; %Hz frequency of ocular pulse
alpha = osc*rje*f;
pi = (pac-pev)/fi;
Hs = 1-pi*(fi/(1+fi));
options = bvpset('RelTol',1e-1,'Stats','on','NMax',10000) %needed this for tollerance errors
infinity = 1;
solinit = bvpinit(linspace(0,infinity,1000),[Hs^4 0]); %changed following equation (19)
sol = bvp4c(@fsode,@fsbc,solinit,options);
x = sol.x;
y = sol.y;
H=y(1,:).^(1/4);
dHdx=(1/4)*(y(1,:).^(-3/4).*y(2,:));
% plot of dH(x)/dx
figure(1)
plot(x,dHdx,x(end),dHdx(end),'o','linewidth',2);
grid on
title('dH/dx')
xlabel('x')
ylabel('dY^(1/4)/dx')
%plot of H(x)
figure(2)
plot(x,H,x(end),H(end),'o','linewidth',2);
grid on
title('H')
xlabel('x')
ylabel('Y^(1/4)')
Q = -(beta/alpha)*H.^3.*dHdx; %dimensionless flow rate
T = -(beta/alpha)*H.*dHdx; %dimensionless shear stress
%plot of Q(x) --> dimensionless flow rate
figure(3)
plot(x,Q,'linewidth',2)
grid on
title('dimensionless flow rate')
xlabel('x')
ylabel('Q(x)')
%plot of T(x)--> dimensionless shear stress
figure(4)
plot(x,T,'linewidth',2)
grid on
title('dimensionless shear stress')
xlabel('x')
ylabel('T(x)')
function dfdeta = fsode(x,y) %Function
global beta
dfdeta = [y(2)
(4/beta)*(y(1)^(0.25)-1)];
end
function res = fsbc(ya,yb) %Boundaries Conditions, [a,b]-->is the interval
global pac pev fi beta
res = [ya(2)
-(beta/(4*fi))*yb(2)-yb(1)^(1/4)+1+pev-pac];
end
I don't know why I got this error from Matlab:
Warning: Imaginary parts of complex X and/or Y arguments ignored.
I see that I got Imaginary parts on the solution ( sol.x and sol.y) but actually I don't want them, they need to be all real. I don't know what I am doing wrong.
Could you please help me find a solution for this problem?
Many Thanks

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Stress and Strain en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by