40 likes | 209 Views
A transient problem. With. Derivation. Heat balance on arbitrary FIXED area in domain. Net rate of heat in = rate of increase in area. r density c specific heat. divergence. Fixed area. =. With scaling. And noting arbitrary nature of area.
E N D
A transient problem With Derivation Heat balance on arbitrary FIXED area in domain Net rate of heat in = rate of increase in area r density c specific heat divergence Fixed area = With scaling And noting arbitrary nature of area
Control Volume Solution—Start from the balance on area A Associate A with a control volume USE scalings A Mid point Rule (Area A = D2) Node i Approximate with finite difference 3 possibilities are Backward in time (explicit) Forward in time (implicit) Central difference in time Crank Nicolson Where “new” indicates evaluation at time t = current + dt
Consider implicit scheme Data structure + physics (same as steady state problem) Or rearranging in a form suitable for an iterative solution Old time OR So with previous steady state code on modifying the ai coeff and source bi We can arrive at a solution fro the value of the nodal T’s at time t+dt based on the known T’s at time t MATLAB CODE data coefficient—modified fro tran terms and new boundary conditions (Set dt And nodal T’s=0) for jtim=1:100 solve (For Tnew initial setting Tnew=T) (store Thist(itim) at 61) (set T=Tnew) end plot Thist HOMEWORK BY NEXT CLASS Do this I just need the plot handed in
Now Consider the Explicit Case Or rearranging in a form suitable for an iterative solution NO EQUATION TO SOLVE--EXPLICIT But must choose Such that Solution strategy **Calculate the coefficients using the steady state code ** choose time step and calculate **Set T = 0 for i = 1:500 for i = 1:n %nodes % solve Eq(1)—essentially similar code to one it of solve code T=Tnew store Thist end end Code this also And compare Temp hist at Mid point With imp sol