Professional Documents
Culture Documents
Cme 455 Project 3 Part 2
Cme 455 Project 3 Part 2
m 1 of 6
clear all
thermalConductivityExchanger = 45 %W/(m*K)
flowrateShell = 25 %kg/s
initialTempShell = 200+273 %K
finalTempShell = 95+273 %K
densityShell = 730 %kg/m3
heatCapacityShell = 2470 %J/(kg*K)
viscosityShell = 4.0*10^(-4) %N*s/m2
thermalConductivityShell = 0.132 %W/(m*K)
foulingCoeffShell = 5000; %W/(m2*K)
cValueShell =0.023 %nonviscous fluid
numberPassesShell = 1
%% Assumed parameters
velocityTube = 1 %m/s
velocityShell = 0.5 %m/s
initialTubeLength = 6 %m
%pitch factor
%1 for triangular and diagonal square pitch
%0.85 for in-line square pitch
fp =0.85
%% Additional parameters
%leakage factor
%0.9 for straight-tube bundle
%0.85 for U-tube bundle
%0.8 for floating-head bundle
fL = 0.8
pCF = 1
xp = 0.9
display('*******************************************************************')
%% PART B
%Use inputs for part A and desired pressure drops to calculate needed
%velocities and other parameters
display('*******************************************************************')
display('PART B')
%% Vary velocities to obtain values for fixed pressure drops
display('*******************************************************************')
display('This part of the script calculates velocities, geometry, and heat transfer
characteristics for desired pressure drops.')
12/23/19 9:25 PM C:...\CME455Project3ParametersandPart2.m 4 of 6
display('Initial guesses for velocities are taken to be the velocities inputed for part
A')
objectivePressureTube = input('Enter desired pressure drop for the tube side (N/m2):')
objectivePressureShell = input('Enter desired pressure drop for the shell side:
(N/m2):')
display('Script Running....')
%setinitialguesses
vt(1) = velocityTube;
vs(1) = velocityShell;
n = 2;
error = (pressureDropTubeSide - objectivePressureTube)^2 + (pressureDropShellSide-
objectivePressureShell)^2;
%% Tube side
if pressureDropTubeSide - objectivePressureTube > 0
vt(n) = vt(n-1);
else
end
%% Shell side
if pressureDropShellSide - objectivePressureShell > 0
vs(n) = vs(n-1)-(1/(n))*vs(n-1);
vs(n) = vs(n-1);
else
end
velocityTube = vt(n);
velocityShell = vs(n);
%call function
[combinedResults, numberTubes, numberBaffles, pressureDropTubeSide,
pressureDropShellSide, areaEstimate, baffleSpacing, ds, tubeLength] =
CME455Project3Part1(densityTube, velocityTube, viscosityTube, heatCapacityTube,
thermalConductivityTube, initialTubeLength, dI, dNTinlet, numberPassesTube, do,
velocityShell, viscosityShell, fp, fL, js, thermalConductivityShell, heatCapacityShell,
densityShell, bc, flowrateShell, pT, pCF, cde, allowableVelocity, foulingCoeffShell,
thermalConductivityExchanger, foulingCoeffTube, flowrateTube, dNSinlet,initialTempShell,
finalTempShell, initialTempTube, finalTempTube, xp, runMethod, c, dNToutlet, ftc, fsc,
pc, dNSoutlet, cl, ctp);
pressureDropShellSide;
pressureDropTubeSide;
%% Reset
n = n + 1;
if n>10000
error = 0;
else
error = (pressureDropTubeSide - objectivePressureTube)^2 +
(pressureDropShellSide-objectivePressureShell)^2;
end
end
format short
combinedResults
numberTubes
numberBaffles
baffleSpacingPerDiameter = baffleSpacing/ds;
areaEstimate = sprintf('%.2f',areaEstimate)%m2
lengthPerDiameter = tubeLength/ds;
12/23/19 9:25 PM C:...\CME455Project3ParametersandPart2.m 6 of 6
display('*******************************************************************')
display('SCRIPT COMPLETE')
display('*******************************************************************')