Solving 4th order nonlinear Differential Equation using bvp4c
Afficher commentaires plus anciens

I am new to matlab and I want to solve above equation using matlab bvp4c.
The boundary conditions are -
,
,
,
.
,
,
,
.I want to plot the following graph( only the bottom cure and not all the curves) -

But my code gives a different graph.
Can anyone please help me?
The matlav code i am trying is as follows-
function dxdy = mat4ode(~,y)
E=169e9; % YMod
w=10e-6; % Width of beam
t=2e-6; % Thickness of beam
I=(w*(t^3))/12; % Moment of intertia
V=2.3; % Voltage
e0=8.854187817e-12; % VPerm
e1 = 7.5*e0;
d1 = 20e-9;
h0=2e-6;
qx = (V^2*w/(2*E*I))*(1 + 0.65*(h0+y(1))/w)/(e0*( d1/e1 + (h0+y(1))/e0 )^2);
dxdy=[y(2)
y(3)
y(4)
qx]; %4th order equation
end
function res = mat4bc(ya,yb)
res=[ya(1) % u=0 at x=0
ya(2) % du/dx=0 at x=0
yb(3) % d2a/dx2=0 at x=L
yb(4)]; % d3a/dx3=0 at x=L
end
function mat4bvp
options = bvpset('RelTol', 1e-8, 'AbsTol', 1e-8);
i =0;
solinit = bvpinit(linspace(0,450e-6,100),[i i i i]); % Range of x and the Initial guess
sol = bvp4c(@mat4ode,@mat4bc,solinit,options);
x = linspace(0,450e-6);
y = deval(sol,x);
h = 2e-6 - y(1,:);
plot(1e6*sol.x,1e6*h);
xlim([0,450])
ylim([0,2])
end
1 commentaire
Sumit Yelpale
le 26 Avr 2021
Réponses (0)
Catégories
En savoir plus sur Optimization dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!