81 views

Uploaded by Martike Kharmagas

- Radiation,+Conduction,+Convection
- Rt 32035042017
- MODULE 2
- Mid Term Igcse Physics Grade 10 Sem 1 2014 Soal - Revisi
- Dec.designing Computers Digital Systems Using Pdp-16 Register Transfer Modules
- Fortran 77 for Beginners
- Week 10.pdf
- thermal contact resistance.pdf
- Unit 1 Conduction
- Heat Transfer
- 73118568-GeAS
- 2d
- Cahier Tech 145 Thermal Study of LV Electric Switchboards.pdf
- ME4413
- 2.Syllabus EME-504 HMT
- AIChEJ11
- CH02_Conduction_aman.pptx
- Lec2
- Simulations of Gas Channel Temperatures During
- Mechanical

You are on page 1of 4

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Trans_ID.m - script to demostrate a transient one dimesnional heat % transfer problem with convection on one side % Note: Script includes some fancy plotting along with normal plotting. % Fancy plotting subdivides a specified color map and also automatically % pulls out the time stamp for the plotted lines. % Disclaimer: % This is an example script to provide insight into programming; it is not to % be used for life safety calculations or any other formal calculations for % industry or academia. Under no circumstances will the author be liable in % any way for this scripts use, including but not limited to, any errors or % omissions in any content, or for any loss or damage of any kind incurred % as a result of the use of any content posted, e-mailed, transmitted or % otherwise made available through the use of this script.

%%%%%%%%%%%%%%%%%%%%%%%%%%%% inputs %%%%%%%%%%%%%%%%%%%%%%%%%%%%% %L -m Length of 1D space %n -"" Number of nodes % del_i -m Spacing of nodes % % T_hg -K Temperature of Hot gas % T_cg -K Temperature of Cold gas % T_2 -K Temperature of Cold side % t_2 -Seconds Stopping time %k -W/(m K) Thermal conductivity - conduction ciefficient % rho -kg.m^3 Density % Cp -J/kg K Spefic heat constant pressure % alpha -m^2/s Diffusivity %h -W/m^2 K Convection coefficient % pt_spc -"" Number of iterations betweem lines plotted % del_t -seconds Change in time each iteration % t(1) -seconds Initial time

%%%%%%%%%%%%%%%%%%%%%%%%%%%% Outputs %%%%%%%%%%%%%%%%%%%%%%%%%%%% % plots the transient temperature profiles vs. position % Prints the number of iterations used to command window

%%%%%%%%%%%%%%%%%%%%%%%%%%%% Example %%%%%%%%%%%%%%%%%%%%%%%%%%%% %L = 0.1 ; %m Length of 1D space %n = 50 ; %"" Number of nodes % del_i = L/(n-1) ; %m Spacing of nodes % % T_hg = 500 ; %K Temperature of Hot gas % T_cg = 250 ; %K Temperature of Cold gas % T_2 = 293 ; %K Temperature of Cold side % t_2 = 100 ; %Seconds Stopping time % % % properties for steel %k = 45.8 ; %W/(m K) Thermal conductivity - conduction ciefficient % rho = 7850 ; %kg.m^3 Density % Cp = 640 ; %J/kg K Spefic heat constant pressure % alpha = 1.26e-5 ; %m^2/s Diffusivity %h = 20 ; %W/m^2 K Convection coefficient % % pt_spc = 150 ; %"" Number of iterations betweem lines plotted % % for stabiltiy fround number should be less than 1/2

% del_t % t(1)

= 0.5*del_i^2/alpha =0

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Written by % 8 January 2008 % last modified 8 Janaury 2008 % Clear memory, close figures, clear command window for every run %Gets rid of old error messages, old figures, and doesn't leave extranius %variables to mess up the script clear all close all clc % Define input variables L = 0.1 n = 50 del_i = L/(n-1) T_hg T_cg T_2 t_2 = 500 = 250 = 293 = 100 ; %m Length of 1D space ; %"" Number of nodes ; %m Spacing of nodes ; %K Temperature of Hot gas ; %K Temperature of Cold gas ; %K Temperature of Cold side ; %Seconds Stopping time ; %W/(m K) Thermal conductivity - conduction ciefficient ; %kg.m^3 Density ; %J/kg K Spefic heat constant pressure ; %m^2/s Diffusivity ; %W/m^2 K Convection coefficient ; %"" Number of iterations betweem lines plotted

% properties for steel k = 45.8 rho = 7850 Cp = 460 alpha = 1.26e-5 h = 20 pt_spc = 150

% for stabiltiy fround number should be less than 1/2 del_t = 0.5*del_i^2/alpha ; %seconds Change in time each iteration t(1) =0 ; %seconds Initial time %Generate Storage matricies (Greatly increases run speed) T(1:n,1) = T_2 ; % Loop to generate x position matrix for j = 1:n x(j) = del_i*(j-1) end % Initiaze iteration variables m =1 mm =1 %Start While loop to run until convergence it met while t(m) < t_2 %Loop to calculate updated temperature based on governing equation for i = 1:n %Hot external surface if i == 1 T(i,m+1) = T(i,m) + h*del_t/(rho*Cp*del_i)*(T_hg - 2*T(i,m) + T_2); %Cold External Surface elseif i == n T(i,m+1) = T(i,m) + h*del_t/(rho*Cp*del_i)*(T_cg - 2*T(i,m) + T_2);

%Internal nodes else T(i,m+1) = T(i,m) + k*del_t/(rho*Cp*del_i^2)*(T(i-1,m)-2*T(i,m)+T(i+1,m)); end % (if statement) end %(i loop) t(m+1) = t(m) + del_t ; %seconds Time

%Important to put all the (m+1) variables before the m = m +1 line m =m+1 ; %"" Update check counter mm = mm + 1 ;% plot counter %Conditional statement to check and make sure while loop does not run %indefinitely (Use Control C to stop infinite loop) if m == 20001 fprintf('Autobreak') %Print notice to announce auto stopping break end % (Check loop) end %( While loop) %Print the number of iteration used to command window fprintf('Number of Iterations was %0.2f \n\n',m)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Normal People plotting % Generate figure and plot results % figure(1) % plot(x,T(:,1:pt_spc:end)) % xlabel('Position - m') % ylabel('Temperature - K') % title('Temperatuer vs. Position') % % legend('Time = 0 s','Time = 24.8 s','Time = 49.6 s','Time = 74.4 s','Time = 99.165 s')

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Fancy Plotting :) figure(1) hold on c h s % Color data C cc matter kk = round(length(t)/pt_spc)+1 = zeros(1, c) = cell(1, c) = colormap(jet) = round(length(C)/(c+1)) =1

; % find number of lines being plotted adding 1 for the zero tim ; % Handle storage ; % Prepare the string cell array

; %Set colormap ; %divide the color map into the number of lines being plotted p ; %counter

% Plot graphs for mmm = 1:pt_spc:length(t) h(kk) = plot(x, T(:,mmm), 'Color', C(kk*cc, :)) ; %plot graphs and store handle s{kk} = sprintf('Time = %0.2f', (kk-1)*pt_spc*del_t) ; %create text string of time stamp for each plotted line kk = kk+1 ; %update counter end % Create legend for the selected plots

- Radiation,+Conduction,+ConvectionUploaded byshabbir626
- Rt 32035042017Uploaded byAsheesh Kumar
- MODULE 2Uploaded byKumar Samrat
- Mid Term Igcse Physics Grade 10 Sem 1 2014 Soal - RevisiUploaded byJoshuaUntung
- Dec.designing Computers Digital Systems Using Pdp-16 Register Transfer ModulesUploaded byJorge Leandro
- Fortran 77 for BeginnersUploaded byJoshua Rosenkrantz
- Week 10.pdfUploaded byAsadullah Khan Ghalib
- thermal contact resistance.pdfUploaded byfahrgeruste3961
- Unit 1 ConductionUploaded byxljleninjudes
- Heat TransferUploaded byHafizh Daru
- 73118568-GeASUploaded byCoronia GeMzon Neil
- 2dUploaded bysagarchawla13
- Cahier Tech 145 Thermal Study of LV Electric Switchboards.pdfUploaded byAbhijit Mandal
- ME4413Uploaded byHeriberto Saldivar Massimi
- 2.Syllabus EME-504 HMTUploaded bydearsaswat
- AIChEJ11Uploaded bysonu
- CH02_Conduction_aman.pptxUploaded byfrost 00
- Lec2Uploaded byAvijit Karmakar
- Simulations of Gas Channel Temperatures DuringUploaded byIshit Dhada
- MechanicalUploaded byAshok Pradhan
- PHY2_Jun06_QUESUploaded byapi-3743896
- LoopsUploaded byCruxader
- Heat TransferUploaded byUmar Asim
- Programming C++Uploaded bylmisara
- ABAP for Power Users ExercisesUploaded byYesenia Bayve
- Handout 2Uploaded byHilmi Ölmez
- Hmt Solved QbUploaded byNaveen Prabhu
- abapUploaded byMallikArjun
- Newtons Law of CoolingUploaded byMassimonkey
- Loops in C++.docxUploaded byPragya Pandya

- Completion DesignUploaded byMartike Kharmagas
- Bornemann Subsea BrochureUploaded byMartike Kharmagas
- 200962255122906Uploaded byMartike Kharmagas
- Die neue DIN 18014-2014Uploaded byMartike Kharmagas
- H05942Uploaded bymkhalidjatoi
- Worm Optimization PaperUploaded byMartike Kharmagas
- Variation Analysis of Involute SplineUploaded byLuiz Gustavo Medeiros
- CFD Course Notes v14Uploaded byNikhil Mulik

- 035999Uploaded bymgarciam_tm_peru
- Document(3)Uploaded byMadan Chaturvedi
- HOLLY LISLE One-Pass Manuscript Revision From First Draft to Last in One Cycle _ Holly Lisle Official Author HomepageUploaded byuser20nov13
- Performance Tuning DBA Release 2.pdfUploaded byelouahabi1
- Bob Pease Lab Notes Part 6Uploaded byoscarmeyer
- Clustering Sentence-Level Text Using a Novel Fuzzy Relational Clustering AlgorithmUploaded byUniq Manju
- 1794-FLEX IO High-Density Analog ModulesUploaded byBenavides Nestor
- Bharti AirtelUploaded byAnkita Agrawal
- Using RaiserrorUploaded byzkemsdk
- Relative Advantage of Technology Integration Into Content Area LearningUploaded byryanosweiler
- 8.1.4.6 Lab - Calculating IPv4 SubnetsUploaded byMiriam Arista
- 42 Rules of Product Management WPUploaded byzghanem
- Fm 200 Novec1230 Inergen Fire Suppression SystemsUploaded byCarmen Butnareanu
- RTS qpUploaded bybalajibs203285
- Customer Relationship Management CRM of Hypercity FinalUploaded byGarvit Nahta
- Guidelines+for+the+Development+and+Validation+of+Spreadsheets (1).pdfUploaded byraj kumar chaudhary
- vectorworks architectureUploaded byaaa29
- Buck ConverterUploaded bybalak144
- 1-Viva Voce DatesUploaded byNithya Mano
- Airtel MktgUploaded byPallavi Pradeepkumar
- Performance Monitoring Best PracticeUploaded byChakradhar Kaveri
- 25346-Procure to Pay Cycle.docUploaded bySAlah MOhammed
- 18-00204 E GoodpracticesUploaded bythangave2000
- Third Party Technical Guidelines - All PlatformsUploaded bymocxe
- dm - qaUploaded bymm8871
- An Introduction to Rfid TechnologyUploaded bySaurabh Agarwal
- Finite Element Analysis on Crane Girder With Variable Cross Sections Based on ANSYSUploaded byPhanHatham
- VSeries Systems Hardware Maintenance GuideUploaded bypramodmore29
- TL - LayUploaded byFelipe López Garduza
- Operation Management FULL Without Cutting MarkUploaded byvenugopal_6684