# Pressure Vessels Design Assignment Help Online

Get to submit impressive solutions today by hiring our pressure vessels assignment help using MATLAB. We mean every promises that we make. If you hire our top-rated MATLAB assignment experts, you will not only beat your deadline but also score a decent grade. Our pressure vessels homework help service is offered by experienced and highly qualified tutors who draft all assignments from scratch. As a result, you need not to worry about plagiarized work.

## Pressure Vessels Applications

Pressure vessels have applications in many engineering sectors. These structures are normally made of high strength alloys and are subjected to an internal pressure higher than the ambient pressure.
Pressure vessel design summary
In design of pressure vessels to operate at an internal pressure of π(in Pa) with a capacity of πΆ(in
m3) the designer needs to find the dimensions and material of the vessel such that the von Mises
stress (πβ²) is less than the allowable stress (π) and the internal volume (π) is equal to the desired capacity πΆ. Normally, there are constraints on the overall size of the vessel πΏπand π».

## Design Model Summary

Table 1 shows a number of common materials used for cylindrical pressure vessels. These materials have different manufacturing cost. The last column in the table (cost factor) is a parameter identifying how expensive (per unit volume) is a material compared to the first material in the table.

Table 1-Materials

 Material Sy (MPa) Thickness (mm) Cost factor CF 1 170 2,4,6,8,10,20,30 1 2 280 1,2,3,4,6,8,10,12,14,16,18,20 1.37 3 180 2,4,6,10,20 0.88 4 300 2,4,6,10,20 1.47 5 190 2,4,6,10,20 0.93 6 320 2,4,6,10,20 1.57 7 220 2,4,6,10,20 1.08 8 370 1,2,3,4,6,7,8,9,10,12,14,16 1.81 9 210 2,4,6,8,10,14,16,20,30,40 1.03 10 390 1,2,3,4,6,8,10,12,14,16,18,20 1.91 11 260 2,4,6,8,10,12,16,20,30,40,50 1.27 12 440 2,4,6,8,10 2.16 13 270 1,2,3,4,5,6,7,8,9,10 1.32 14 460 1,2,3,4,5,6,7,8,9,10 2.25 15 290 2,4,6,8,10,12,18,20,30 1.42 16 490 1,2,3,4,5,6,7,8,9,10 2.4 17 310 1,2,3,4,5,6,7,8,9,10 1.52 18 530 10,20,30 2.6 19 340 4,5,8,14,20 1.67 20 580 2,4,6,8,10 2.84 21 370 2,4,6,8,10,15,18,20 1.81 22 420 2,4,6,8,10,12,14 2.06 23 460 1,2,4,6,8,10,12 2.25

## Designing a Standard Optimization Problem

Formulate the design problem above in the form of a standard optimization problem. Include constraints on the overall size of the vessel (LT and H):
β’ Identify design variables
β’ Identify design qualities
β’ Select optimization objective
β’ State constraints
β’ Explain how you deal with equality constraints (if there is any)
Note: Marks will be deducted for missing/wrongly identified/not justified design variables, design qualities, objective, constraints and not reporting the optimization problem in standard format.

## Optimization Program with a Graphical User Interface

Write an optimization program with a graphical user interface that gets the following inputs:
β’ internal pressure π(in bars), capacity πΆ(in liters), a desired factor of safety ππand the
constrained values for πΏπand π»( in meters)
β’ search parameter(s)
and then finds and shows:
β’ the optimal size (π, L and t), the optimum material (from Table 1 above), and the type of
the optimal solution (thin-walled or thick-walled), as well as
β’ allowable stress, von Mises stress, volume of the material, cost index, the overall
dimensionsπΏπand π».
Note: Marks will be deducted if the programme does not find or show the right results, if GUI does not show all requested parameters, if outputs are not rounded to a reasonable engineering precision, and for missing parameter name or unit on the GUI, for missing unit in the optimiser, for missing definition/ necessary comment in the optimiser, for unclear programme structure, and for uncaptured output error.
Report
A word-processed report including the following essential parts:
β’ Signed Plagiarism Cover Sheet
β’ Maximum 2 pages on the optimisation problem formulations and the optimisation method (Task 1).
π
β’ Two legible screenshots of the GUI of the programme for two optimisation problems:
o Problem 1: π = 400 πππ /(93.7); π = 1400 πππ‘πππ  Γ (93.7) ;
π
o Problem 2: π = 45 πππ Γ (93.7); π = 700 πππ‘πππ /(93.7) ;
ππ=2; π»β€3.5π; πΏπβ€7π
ππ=2; π»β€3.5π; πΏπβ€11π
ππππππππππ = 93.7
For both problems, use an increment (grid size) of 5 mm for ππ
β’ Programme listing; copy the m-files from the MATLAB editor (keep the MATLAB original formatting and the text colours but use a font size of 10) and paste them in this section of your report as text (not image).
MATLAB Script Output
You should just run script βmain1β in MATLAB
Another example
After run
##### MATLAB Script
function main1()
% A GUI for Pressure Vessel Design
% Create a figure and axes
f = figure('Resize','off', 'NumberTitle','off', 'Name','Pressure Vessel Design',...
axes('Units','pixels', 'Visible','off');
aPos = get(gca, 'Position'); set(gca, 'Position',[0 aPos(2:4)])
gPos = get(gcf, 'Position'); set(gcf, 'Position',[1 1 1.3 1.3].*gPos)
movegui(gcf, 'center')
gPos = get(gcf, 'Position');
aPos = get(gca, 'Position');
aPos(2) = 15 + (gPos(4) - aPos(4))/2; set(gca, 'Position', aPos)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
a = get(gca, 'Position'); g = get(gcf, 'Position');
ytxt = a(2)+a(4)+ (100:-35:-320) -50;
% yedt = ytxt - 20;
%% Inputs
% Create static text box for labeling
uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[50 ytxt(1)-15 150 45],...
'String','Inputs', 'FontSize',20, 'FontWeight','bold');
% internal pressure, P
uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[50 ytxt(2) 150 20],...
'String','Internal Pressure, P :', 'FontSize',12);
h.edit1 = uicontrol('Parent',f,'Style', 'edit',...
'String','10', 'FontSize',12,...
'Position', [195 ytxt(2) 100 20],...
'Callback', @P_Callback);
uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[300 ytxt(2) 100 20],...
'String','bars', 'FontSize',12);
% capacity [litres]
uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[50 ytxt(3) 150 20],...
'String','Capacity, C :', 'FontSize',12);
h.edit2 = uicontrol('Parent',f,'Style', 'edit',...
'String','20000', 'FontSize',12,...
'Position', [195 ytxt(3) 100 20],...
'Callback', @C_Callback);
uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[300 ytxt(3) 100 20],...
'String','litres', 'FontSize',12);
% desired Factor of Safety
uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[50 ytxt(4) 150 20],...
'String','Factor of Safety, nd :', 'FontSize',12);
h.edit3 = uicontrol('Parent',f,'Style', 'edit',...
'String','2', 'FontSize',12,...
'Position', [195 ytxt(4) 100 20],...
'Callback', @nd_Callback);
% constraint on LT [m]
uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[50 ytxt(5) 150 20],...
'String','Max of LT :', 'FontSize',12);
h.edit4 = uicontrol('Parent',f,'Style', 'edit',...
'String','20', 'FontSize',12,...
'Position', [195 ytxt(5) 100 20],...
'Callback', @LTMax_Callback);
uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[300 ytxt(5) 100 20],...
'String','m', 'FontSize',12);
% constraint on H [m]
uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[50 ytxt(6) 150 20],...
'String','Max of H :', 'FontSize',12);
h.edit5 = uicontrol('Parent',f,'Style', 'edit',...
'String','8', 'FontSize',12,...
'Position', [195 ytxt(6) 100 20],...
'Callback', @HMax_Callback);
uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[300 ytxt(6) 100 20],...
'String','m', 'FontSize',12);
%% Create push button for ruuning
push_run = uicontrol('Style', 'pushbutton', 'String','Run',...
'Position',[a(3)-320 a(2)+80 80 45], 'FontSize',20, 'FontWeight','bold',...
'Callback', @push_run_Callback);
%% Ouputs
% Create static text box for labeling
uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[a(3) ytxt(1)-15 380 45],...
'String','Outputs', 'FontSize',20, 'FontWeight','bold');
% optimal ri
ri = [];
h.txt1 = uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[a(3) ytxt(2) 380 20],...
'String',mynum2str('Optimal ri',ri,'m'), 'FontSize',12);
% optimal L
L = [];
h.txt2 = uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[a(3) ytxt(3) 380 20],...
'String',mynum2str('Optimal L',L,'m'), 'FontSize',12);
% optimal t
t = [];
h.txt3 = uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[a(3) ytxt(4) 380 20],...
'String',mynum2str('Optimal t',t,'mm'), 'FontSize',12);
% the optimum material (from Table 1)
im = [];
h.txt4 = uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[a(3) ytxt(5) 380 20],...
'String',mynum2str('Optimmum material',im,[]'), 'FontSize',12);
% the type of the optimal solution (thin-walled or thick-walled)
walType = [];
h.txt5 = uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[a(3) ytxt(6) 380 20],...
'String',mynum2str('Type',walType,[]), 'FontSize',12);
% allowable stress
Sall = [];
h.txt6 = uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[a(3) ytxt(7) 380 20],...
'String',mynum2str('Allowable stress',Sall,'MPa'), 'FontSize',12);
% von Mises stress
Svm = [];
h.txt7 = uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[a(3) ytxt(8) 380 20],...
'String',mynum2str('von Mises stress',Svm,'MPa'), 'FontSize',12);
% volume of the material
Vmat = [];
h.txt8 = uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[a(3) ytxt(9) 380 20],...
'String',mynum2str('volume of the material',Vmat,'m^3'), 'FontSize',12);
% cost index
CI = [];
h.txt9 = uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[a(3) ytxt(10) 380 20],...
'String',mynum2str('Cost index',CI,[]), 'FontSize',12);
% the overall dimension LT
LT = [];
h.txt10 = uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[a(3) ytxt(11) 380 20],...
'String',mynum2str('LT',LT,'m'), 'FontSize',12);
% the overall dimension H
H = [];
h.txt11 = uicontrol('Style','text','HorizontalAlignment','left',...
'Position',[a(3) ytxt(12) 380 20],...
'String',mynum2str('H',H,'m'), 'FontSize',12);
% Make figure visble after adding all components
set(f,'Visible','on')
%% Callback functions -----------------------------------------------------
functionP_Callback(source,callbackdata) %#ok
end
functionC_Callback(source,callbackdata) %#ok
end
functionnd_Callback(source,callbackdata) %#ok
end
functionLTMax_Callback(source,callbackdata) %#ok
end
functionHMax_Callback(source,callbackdata) %#ok
end
functionpush_run_Callback(source,callbackdata) %#ok
% read the input data from GUI
P = str2double(get(h.edit1,'String'));
C = str2double(get(h.edit2,'String'));
nd = str2double(get(h.edit3,'String'));
LTMax = str2double(get(h.edit4,'String'));
HMax = str2double(get(h.edit5,'String'));
% read data of Table 1
mat.im = (1 : 23)';
% unit conversion
P = P*1e5; % bar to Pa
C = C*1e-3; % liter to m^3
mat.Sy = mat.Sy*1e6;% MPa to Pa
% optimization
LB = [1 1 0 ];% lower bounds
UB = [23 12 HMax];% upper bounds
opts = gaoptimset(@ga);
opts = gaoptimset(opts, 'PopulationSize',100,...
'Generations',1000,...
'TolFun',1e-10,...
'TolCon',1e-5);
[x,f] = ga(@(x) objF(x,P,C,nd,mat), 3, [],[],[],[],LB,UB,...
@(x) nLinConstr(x,P,C,nd,LTMax,mat),1:2,opts);
c = nLinConstr(x,P,C,nd,LTMax,mat);
if any(c > 0)
fprintf('The question has no solution; change the inputs.\n')
return
else
im = x(1);
it = x(2);
H = x(3);% [m]
ro = H/2;% [m]
t = mat.t{im}; t = textscan(t,'%n %*c'); t = t{1}; t = t(it)*1e-3;% [m]
ri = ro - t;% [m]
L = (C - 4*pi*ri^3/3)/(pi*ri^2);% [m]
if t/ri< 0.05
walType = 'thin-walled';
else % t/ri>= 0.05
walType = 'thick-walled';
end
Sy = mat.Sy(im);% [Pa]
Sall = Sy/nd;% allowable stress [Pa]
[St,Sr,Sl] = pvstress(P,ri,t);% [Pa]
Svm = sqrt(((St - Sr)^2 + (St - Sl)^2 + (Sl - Sr)^2)/2);% von Mises stress [Pa]
Vmat = 2*pi*ri*t*L + 4*pi*ri^2*t;
CF = mat.CF(im);
CI = Vmat*CF;
LT = L + 2*ro;% [m]
end
% update the outputs
set(h.txt1, 'String',mynum2str('Optimal ri',ri,'m','%.3f'));
set(h.txt2, 'String',mynum2str('Optimal L',L,'m','%.3f'));
set(h.txt3, 'String',mynum2str('Optimal t',t*1e3,'mm'));
set(h.txt4, 'String',mynum2str('Optimmum material',im,[]'));
set(h.txt5, 'String',mynum2str('Type',walType,[]));
set(h.txt6, 'String',mynum2str('Allowable stress',Sall*1e-6,'MPa'));
set(h.txt7, 'String',mynum2str('von Mises stress',Svm*1e-6,'MPa'));
set(h.txt8, 'String',mynum2str('volume of the material',Vmat,'m^3','%.3f'));
set(h.txt9, 'String',mynum2str('Cost index',CI,[]));
set(h.txt10, 'String',mynum2str('LT',LT,'m','%.3f'))
set(h.txt11, 'String',mynum2str('H',H,'m','%.3f'))
end
end