function pdemodel
[pde_fig,ax]=pdeinit;
pdetool('appl_cb',4);
set(ax,'DataAspectRatio',[1 0.6428571428571429 1]);
set(ax,'PlotBoxAspectRatio',[3.5 2.333333333333333 1]);
set(ax,'XLim',[-1 6]);
set(ax,'YLim',[-1 2]);
set(ax,'XTick',[ -1,...
 -0.90000000000000002,...
 -0.80000000000000004,...
 -0.69999999999999996,...
 -0.59999999999999998,...
 -0.5,...
 -0.39999999999999991,...
 -0.29999999999999993,...
 -0.19999999999999996,...
 -0.099999999999999978,...
 0,...
 0.10000000000000009,...
 0.20000000000000018,...
 0.30000000000000004,...
 0.40000000000000013,...
 0.5,...
 0.60000000000000009,...
 0.70000000000000018,...
 0.80000000000000004,...
 0.90000000000000013,...
 1,...
 1.1000000000000001,...
 1.2000000000000002,...
 1.3000000000000003,...
 1.4000000000000004,...
 1.5,...
 1.6000000000000001,...
 1.7000000000000002,...
 1.8000000000000003,...
 1.9000000000000004,...
 2,...
 2.1000000000000001,...
 2.2000000000000002,...
 2.3000000000000003,...
 2.4000000000000004,...
 2.5,...
 2.5999999999999996,...
 2.6999999999999997,...
 2.7999999999999998,...
 2.8999999999999999,...
 3,...
 3.0999999999999996,...
 3.1999999999999997,...
 3.2999999999999998,...
 3.3999999999999999,...
 3.5,...
 3.5999999999999996,...
 3.6999999999999997,...
 3.7999999999999998,...
 3.8999999999999999,...
 4,...
 4.0999999999999996,...
 4.2000000000000002,...
 4.2999999999999998,...
 4.4000000000000004,...
 4.5,...
 4.5999999999999996,...
 4.7000000000000002,...
 4.7999999999999998,...
 4.9000000000000004,...
 5,...
 5.0999999999999996,...
 5.2000000000000002,...
 5.2999999999999998,...
 5.4000000000000004,...
 5.5,...
 5.5999999999999996,...
 5.7000000000000002,...
 5.7999999999999998,...
 5.9000000000000004,...
 6,...
]);
set(ax,'YTick',[ -1,...
 -0.90000000000000002,...
 -0.80000000000000004,...
 -0.69999999999999996,...
 -0.59999999999999998,...
 -0.5,...
 -0.39999999999999991,...
 -0.29999999999999993,...
 -0.19999999999999996,...
 -0.099999999999999978,...
 0,...
 0.10000000000000009,...
 0.20000000000000018,...
 0.30000000000000004,...
 0.40000000000000013,...
 0.5,...
 0.59999999999999987,...
 0.69999999999999996,...
 0.79999999999999982,...
 0.89999999999999991,...
 1,...
 1.1000000000000001,...
 1.2,...
 1.2999999999999998,...
 1.3999999999999999,...
 1.5,...
 1.6000000000000001,...
 1.7,...
 1.8,...
 1.8999999999999999,...
 2,...
]);

% Geometry description:
pdepoly([ 3.1000000000000001,...
 4.0999999999999996,...
 3.1000000000000001,...
],...
[ 0.99999999999999978,...
 -2.2204460492503131e-16,...
 -2.2204460492503131e-16,...
],...
 'P1');
pdepoly([ 0.10000000000000009,...
 0.10000000000000009,...
 0.90000000000000013,...
],...
[ 0.10000000000000009,...
 0.89999999999999991,...
 0.10000000000000009,...
],...
 'P2');
pdepoly([ 0.20000000000000018,...
 1,...
 1,...
],...
[ 0.89999999999999991,...
 0.10000000000000009,...
 0.89999999999999991,...
],...
 'P3');
pdepoly([ 1.1000000000000003,...
 1.1000000000000003,...
 1.9000000000000004,...
],...
[ 0.10000000000000009,...
 0.89999999999999991,...
 0.10000000000000009,...
],...
 'P4');
pdepoly([ 1.2000000000000002,...
 2,...
 2,...
],...
[ 0.89999999999999991,...
 0.10000000000000009,...
 0.89999999999999991,...
],...
 'P5');
pdepoly([ 2.1000000000000001,...
 2.1000000000000001,...
 2.9000000000000004,...
],...
[ 0.10000000000000031,...
 0.90000000000000013,...
 0.10000000000000031,...
],...
 'P6');
pdepoly([ 3.0999999999999996,...
 3.0999999999999996,...
 3.8999999999999999,...
],...
[ 0.10000000000000053,...
 0.90000000000000036,...
 0.10000000000000053,...
],...
 'P7');
pdepoly([ 2.2000000000000002,...
 3,...
 3,...
],...
[ 0.89999999999999991,...
 0.10000000000000009,...
 0.89999999999999991,...
],...
 'P8');
pderect([0 3.0999999999999996 0 1],'R1');
set(findobj(get(pde_fig,'Children'),'Tag','PDEEval'),'String','(R1+P1)-P2-P3-P4-P5-P6-P7-P8')

% Boundary conditions:
pdetool('changemode',0)
pdetool('removeb',[23 25 ]);
pdesetbd(26,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(25,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(24,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(23,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(22,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(21,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(20,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(19,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(18,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(17,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(16,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(15,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(14,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(13,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(12,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(11,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(10,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(9,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(8,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(7,...
'dir',...
2,...
str2mat('1','0','0','1'),...
str2mat('0','0'))
pdesetbd(6,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(5,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(4,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(3,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(2,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))
pdesetbd(1,...
'neu',...
2,...
str2mat('0','0','0','0'),...
str2mat('0','0'))

% Mesh generation:
setuprop(pde_fig,'Hgrad',1.3);
setuprop(pde_fig,'refinemethod','regular');
pdetool('initmesh')

% PDE coefficients:
pdeseteq(1,...
str2mat('2*((200E9)./(2*(1+(0.3))))+(2*((200E9)./(2*(1+(0.3)))).*(0.3)./(1-2*(0.3)))','0','(200E9)./(2*(1+(0.3)))','0','(200E9)./(2*(1+(0.3)))','2*((200E9)./(2*(1+(0.3)))).*(0.3)./(1-2*(0.3))','0','(200E9)./(2*(1+(0.3)))','0','2*((200E9)./(2*(1+(0.3))))+(2*((200E9)./(2*(1+(0.3)))).*(0.3)./(1-2*(0.3)))'),...
str2mat('0.0','0.0','0.0','0.0'),...
str2mat('0.0','(-9.81)'),...
str2mat('7850','0','0','7850'),...
'0:10',...
'0.0',...
'0.0',...
'[0 100]')
setuprop(pde_fig,'currparam',...
['200E9  ';...
'0.3    ';...
'0.0    ';...
'(-9.81)';...
'7850   '])

% Solve parameters:
setuprop(pde_fig,'solveparam',...
str2mat('0','1000','10','pdeadworst',...
'0.5','longest','0','1E-4','','fixed','Inf'))

% Plotflags and user data strings:
setuprop(pde_fig,'plotflags',[2 1 1 1 1 1 1 1 0 0 0 1 1 0 0 0 1 1]);
setuprop(pde_fig,'colstring','');
setuprop(pde_fig,'arrowstring','');
setuprop(pde_fig,'deformstring','');
setuprop(pde_fig,'heightstring','');

% Solve PDE:
pdetool('solve')
