%
% Tension of a plate with a hole. Only 1/4 domain modelled.
% Mixed (symmetry) boundary conditions are imposed on symmetry boundaries
%
function planestress1
[pde_fig,ax]=pdeinit;
pdetool('appl_cb',3);
set(ax,'DataAspectRatio',[1 1 1]);
set(ax,'PlotBoxAspectRatio',[2.25 1.25 1]);
set(ax,'XLim',[-0.25 4.5]);
set(ax,'YLim',[-0.25 2.5]);


% Geometry description:
pderect([0 4 0 2],'R1');
pdecirc(0,0,1,'C1');
set(findobj(get(pde_fig,'Children'),'Tag','PDEEval'),'String','R1-C1')

% Boundary conditions:
pdetool('changemode',0)
pdesetbd(5,'neu',2,str2mat('0','0','0','0'),str2mat('0','0'))
pdesetbd(4,'mix',2,str2mat('0','0','0','0'),str2mat('0','0'),str2mat('1','0'),'0')
pdesetbd(3,'mix',2,str2mat('0','0','0','0'),str2mat('0','0'),str2mat('0','1'),'0')
pdesetbd(2,'neu',2,str2mat('0','0','0','0'),str2mat('0','0'))
pdesetbd(1,'neu',2,str2mat('0','0','0','0'),str2mat('1','0'))

% Mesh generation:
pdetool('initmesh')

% % PDE coefficients:  Plane stress problem
% pdeseteq(1,...
% str2mat('2*((1E3)./(2*(1+(0.3))))+(2*((1E3)./(2*(1+(0.3)))).*(0.3)./(1-(0.3)))','0','(1E3)./(2*(1+(0.3)))','0','(1E3)./(2*(1+(0.3)))','2*((1E3)./(2*(1+(0.3)))).*(0.3)./(1-(0.3))','0','(1E3)./(2*(1+(0.3)))','0','2*((1E3)./(2*(1+(0.3))))+(2*((1E3)./(2*(1+(0.3)))).*(0.3)./(1-(0.3)))'),...
% [0;0;0;0],[0;0],[1;0;0;1],[],[],[],[])
% setappdata(pde_fig,'currparam',[1E3;0.3;0;0;1])
% 
% 
% % Solve PDE:
% pdetool('solve')
