Solve 2D Transient Heat Conduction Problem with Convection BCs using FTCS Finite Difference Method

  Рет қаралды 11,931

Sam R

Sam R

Күн бұрын

Пікірлер
@samseleven1
@samseleven1 6 жыл бұрын
% Diffusion equation - 2D - Explicit Method % Convection boundary conditions clear clc clf % Inputs alpha = 1e-4; % Thermal diffusivity, m2/s (Heat Conduction - Ozisik & Hahn) kt = 386; % Thermal conductivity of the material, W/(m*deg.C), eg 386 h1 = 30; % Convection heat transfer coefficient at end 1, W/(m2*C), eg 30 Tinf1 = 100; % Temperature of the convection medium at end 1, deg.C, eg 100 h2 = 40; % Convection heat transfer coefficient at end 1, W/(m2*C), eg 40 Tinf2 = 200; % Temperature of the convection medium at end 1, deg.C, eg 200 h3 = 50; % Convection heat transfer coefficient at end 1, W/(m2*C), eg 50 Tinf3 = 300; % Temperature of the convection medium at end 1, deg.C, eg 300 h4 = 60; % Convection heat transfer coefficient at end 1, W/(m2*C), eg 60 Tinf4 = 400; % Temperature of the convection medium at end 1, deg.C, eg 400 t = 15; % total time, s eg. 200, 1600 nt = 300; % total no. of time steps eg. 2, 160 delta_t = t/nt; % timestep, s xlength = 1; % xlength = yheight, m nx = 4; % total no. of spatial grids eg. 4, 15 delta_x = xlength/nx; % delta_x = delta_y, m delta_y = delta_x; % delta_x = delta_y, m Tin = 0; % Initial temperature Tmax = max([Tinf1,Tinf2,Tinf3,Tinf4,Tin]); Bi1 = (h1*delta_x)/kt % Biot number Bi2 = (h2*delta_x)/kt % Biot number Bi3 = (h3*delta_x)/kt % Biot number Bi4 = (h4*delta_x)/kt % Biot number Fo = alpha*delta_t/delta_x^2 % Note: Fourier number, Fo = diffusion number, d % Solution n = ((xlength/delta_x) + 1)^2; % no. of interior points m = sqrt(n); % no. of points in a row / column r = (t/delta_t) + 1; % no. of time steps d = alpha*delta_t/delta_x^2; % diffusion number if d < 0.25 fprintf('solution stable d = %8.4f', d) else fprintf('solution unstable d = %8.4f', d) end % Creating initial and boundary conditions T = zeros(m,m,r); % Creating initial conditions for k = 1:1 for j = 1:m for i = 1:m T(i,j,k) = Tin; end end end T; %{ % Creating boundary conditions for k = 1:1 for j = 1:m for i = 1:m if (j == 1) && (i>1) && (i1) && (j1) && (i1) && (j1) && (i1) && (j1) && (i1) && (j
@kubetail12
@kubetail12 7 ай бұрын
I am curious if one can still use fictitious nodes like Neumann BCs for Convection BCs, or do you have to do this heat balance? That being said, wouldn't you still need this heat balance for, say, the corner nodes for all Neumann BCs? Edit: I guess I am confusing the energy balance and the Taylor approaches to finite differences.
@oguzklc9894
@oguzklc9894 3 жыл бұрын
Thank you for sharing this video , appreciate you. I encountered with a problem, if top side will be insulated, what will we do ?
@samseleven1
@samseleven1 3 жыл бұрын
Consider insulated boundary conditions.
@ashwinibhusari3244
@ashwinibhusari3244 3 жыл бұрын
Detailed explanation.. Thank you for the video. :-) how will this case differ with convectioin BCs using BTCS method?
@samseleven1
@samseleven1 3 жыл бұрын
Should not ..significantly
@sadHorsey13
@sadHorsey13 3 жыл бұрын
Can anyone tell me what the errors would be compared to the analytical solitaire? Where would it be higher boundary or center?
@pabloANR
@pabloANR 4 жыл бұрын
Have you the functions of Gauss elimination, SOR method, vector to matrix?
@samseleven1
@samseleven1 4 жыл бұрын
Did you check in engineering-stream.com ?
@pabloANR
@pabloANR 4 жыл бұрын
@@samseleven1 Yes, but i couldn't find it out
@pabloANR
@pabloANR 4 жыл бұрын
@@samseleven1 I found all, except gauss elimination, have you the code?
@samseleven1
@samseleven1 4 жыл бұрын
@@pabloANR gauss elimination should be there. Pls double check.
@pabloANR
@pabloANR 4 жыл бұрын
@@samseleven1 It's the only missing :c
@samseleven1
@samseleven1 5 жыл бұрын
Codes may be obtained from engineering-stream.com under Numerical Methods Section
@samseleven1
@samseleven1 3 жыл бұрын
I believe the unit for g is W/m3 so you may use the volume info to calculate g depending on how your model is set up
@abdelazizkoubabi
@abdelazizkoubabi Жыл бұрын
thank you sir please send me the programme 1D theat conduction please
@samseleven1
@samseleven1 Жыл бұрын
Pls check engineering-stream.com for the codes under Numerical methods
@agiram
@agiram 4 жыл бұрын
can I get the ppt for this one
@samseleven1
@samseleven1 4 жыл бұрын
Check into engineering-stream.com
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 40 МЛН
I Made an Electronic Chessboard Without Turns
14:32
From Scratch
Рет қаралды 1 МЛН
Transformers (how LLMs work) explained visually | DL5
27:14
3Blue1Brown
Рет қаралды 4 МЛН
The Midpoint Circle Algorithm Explained Step by Step
13:33
NoBS Code
Рет қаралды 168 М.