function [c ceq]=beam_cons(x)
M = 4e7; % Nmm
V = 15e4; % N 
sig_a = 10; %N/mm^2
tau_a = 2; %N/mm^2

b = x(1);
d = x(2);

c(1) = 6*M/b/d^2-sig_a;
c(2) = 3*V/2/b/d-tau_a;
ceq=[];

%% Plot
% [bb,dd]=meshgrid(0:700,0:1000);
% c1 = 6*M./bb./(dd.^2)-sig_a;
% c2 = 3*V/2./bb./dd-tau_a;
% c3 = dd-2*bb;
% contour(bb,dd,c1,[0 0],'b');text(100,500,'g1','color','b');drawnow;
% hold on 
% contour(bb,dd,c2,[0 0],'m');text(150,850,'g2','color','m');drawnow;
% hold on 
% contour(bb,dd,c3,[0 0],'y');text(400,800,'g3','color','y');drawnow;
% hold on 
% plot(x(1),x(2),'o','color','r');drawnow;
