Door

%DOOR.M  Example 2.8, Opening a door closed by pneumatic cylinder.
%       This is an example of nonlinear mechanical system.
%       To print the graphs delete the comment signs, %,
%       preceding the print statements.

a = 0.8;        % m, door width
b = 0.25;       % m, piston arm
A = pi*0.04^2;  % m^2, piston sectional area
p0 = 0.1*10^5;  % N/m^2, 10^5 N/m^2 equals 1 bar
l0 = 0.50;      % m, open cylinder length
chi = 1.4;      % adiabatic exponent
alpha = 0: pi/90: pi/6; % opening angle
c = b*tan(alpha);
p = p0*(l0*ones(size(alpha))./(l0 – c)).^chi;
P = 25;         % N, hand force
left = P*a*cos(alpha).^2;  % left-hand side of equilibrium equation

right = b*A*p;  % right-hand side of equilibrium equation
angle = 180*alpha/pi;
plot(angle, left, angle, right); grid
xlabel(‘angle’)
ylabel(‘Moments, Nm’)
text(4, 13, ‘Righting moment’)
text(4, 20.2, ‘Opening moment’)
% print
pause
plot(angle, p); grid
xlabel(‘angle, deg’)
ylabel(‘Cylinder pressure, N/m^2’)
% print