Question

******ONLY MATLAB CODE NO OTHER WAY OF SOLUTION****** Consider a one-dimensional slab with conductivity 1 W/m-K....

******ONLY MATLAB CODE NO OTHER WAY OF SOLUTION******

Consider a one-dimensional slab with conductivity 1 W/m-K. The slab width is 20 cm. The left face of the slab is at 100oC and the heat flux at the right face is 1 kW/m2. The slab experiences a volumetric heat generation rate given by S = 1000 - 5T W/m3. Determine the steady-state temperature distribution in the slab, for two grid spacings with the requirement that there should be at least 20 CVs in each case.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

clc;

clear;

n=input("No of interior points");

T(1)=input("Enter Left side temperature");

l=input("Length of the plate");

k=input("Thermal conductivity of plate");

Sc=input("Heat source constant in W");

Sp=input("Heat source variable in W");

q=input("enter heat flux at right side");

dx=l/n;

d(1)=1;

b(1)=0;

a(1)=0;

c(1)=T(1);

d(n+2)=-(k/dx);

b(n+2)=k/dx;

a(n+2)=0;

c(n+2)=q;

for i=2

    b(i)=2*k/dx;

    a(i)=k/dx;

    c(i)=-Sc*dx;

  d(i)=-((a(i)+b(i))-(Sp*dx));

end

for i=3:n

    b(i)=k/dx;

    a(i)=k/dx;

    c(i)=-(Sc*dx);

    d(i)=-((a(i)+b(i))-(Sp*dx));

end

for i=n+1

    b(i)=k/dx;

    a(i)=2*k/dx;

    c(i)=-(Sc*1000)*dx;

    d(i)=-((a(i)+b(i))-(Sp*1000*dx));

end

D(1)=d(1);

C(1)=c(1);

for i=2:n+2

    D(i)=d(i)-((b(i)*a(i-1))/D(i-1));

    C(i)=c(i)-((b(i)*C(i-1))/D(i-1));

end

T(n+2)=(C(n+2)/D(n+2));

for i=n+1:-1:1

    T(i)=(C(i)-(a(i)*T(i+1)))/D(i);

end

len(1)=0;

len(2)=dx/2;

for i=3:n

    len(i)=len(i-1)+dx;

end

len(n+1)=l-(dx/2);

len(n+2)=l

disp(T)

plot2d(len,T)

Add a comment
Know the answer?
Add Answer to:
******ONLY MATLAB CODE NO OTHER WAY OF SOLUTION****** Consider a one-dimensional slab with conductivity 1 W/m-K....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Problem 2: Consider a large plane slab of semi-thickness L = 0.3 m, thermal conductivity k...

    Problem 2: Consider a large plane slab of semi-thickness L = 0.3 m, thermal conductivity k = 2.5 W/m K and surface area A = 20.0 m². Both sides of the slab is maintained at a constant wall temperature of 358°K while it is subjected to a uniform but constant heat flux of 950.0 W/m2 Evaluate the temperature distribution/profile within the wall. Calculate the heat flux and temperature at location x = 0.1m. Problem 3: Consider a 10.0 m long...

  • 20) Me Steady-state temperature distribution in the s figure. The heat flow is one-dimensional. ibution in...

    20) Me Steady-state temperature distribution in the s figure. The heat flow is one-dimensional. ibution in the sandwich of three materials (A, B, and C) is shown in the aterial B has volumetric heat generation à = 64,000 W/m. Material A has thermal conductivity of 10 W/ m K . Determine: a) The heat flux at the left side: b) The heat flux at the right side: c) The thermal conductivity of Material C: : - W/m2 W/m2 _W/mK T[deg.]...

  • Consider a pipe of length L with an inner radius r1 and outer radius r2. The...

    Consider a pipe of length L with an inner radius r1 and outer radius r2. The outer surface is thermally insulated while the inner surface is at temperature T1. The thermal conductivity of the wall is k constant. Heat is generated in the wall of the pipe with a volumetric uniform heat generation g  (W/m3 ). Assume steady and one dimensional heat transfer (b) Determine the temperature variation in the wall of the pipe and the heat flux on...

  • A very long rod of 5-mm diameter and uniform thermal conductivity k = 25 W/m-K is subjected to a heat treatment process

    A very long rod of 5-mm diameter and uniform thermal conductivity k = 25 W/m-K is subjected to a heat treatment process. The center, 30-mm-long portion of the rod within the induction heating coil experiences uniform volumetric heat generation of 7.5 x 106 W/m3. The unheated portions of the rod, which protrude from the heating coil on either side, experience convection with the ambient air at T∞ = 20 °C and h = 10 W/m2K. Assume that there is no convection...

  • A planar material can be modeled as 1-dimensional with thickness L = 2m. On one boundary...

    A planar material can be modeled as 1-dimensional with thickness L = 2m. On one boundary (x=0), the surface is held at a fixed temperature Ts = 20°C. the other boundary is perfectly insulated. There is a constant thermal conductivity k = 40 W/mK and the material is being heated internally. The system is at steady state. a) write an expression for each of the two boundary conditions b) If the volumetric heat generation is equal to q.= 10 W/m3....

  • A plane wall of thickness 2L= 30 mm and thermal conductivity k= 3 W/m·K experiences uniform...

    A plane wall of thickness 2L= 30 mm and thermal conductivity k= 3 W/m·K experiences uniform volumetric heat generation at a rate q˙, while convection heat transfer occurs at both of its surfaces  (x=-L, +L), each of which is exposed to a fluid of temperature ∞T∞= 20°C. Under steady-state conditions, the temperature distribution in the wall is of the form T(x)=a+b⁢x+c⁢x2 where a= 82.0°C, b= -210°C/m, c= -2 × 104°C/m2, and x is in meters. The origin of the x-coordinate...

  • A tube with length of 1 m is made from steel (k 15 W/m/K) having a...

    A tube with length of 1 m is made from steel (k 15 W/m/K) having a square cross section with a circular hole through the center, as shown below Calculate the steady state temperature distribution across the cross section and the total rate of heat transfer if the inner surface is held at 20 °C, and the outer surface is held at 100 °C. How does the heat rate vary with grid resolution? Consider 9 and 17 grid points across...

  • Consider liquid water flowing over a flat plate of length L = 1 m. The water has the following properties: ρ-1000 kg/m3, Cp-4000 J/kgK. 10 3 kg/ ms, k 0.6 W/m . C μ Midway through the plate at x...

    Consider liquid water flowing over a flat plate of length L = 1 m. The water has the following properties: ρ-1000 kg/m3, Cp-4000 J/kgK. 10 3 kg/ ms, k 0.6 W/m . C μ Midway through the plate at x = 0.5 m, you measure a heat flux to the surface of: 05 m 3181 W/m2 You also measure an average heat flux to the surface over the length of the plate of: "4500 W/m2 Knowing the latter, and knowing...

  • Can you please help me with this question. Much appreciated. So I have a sample code,...

    Can you please help me with this question. Much appreciated. So I have a sample code, but we need to change the code in a way that fits the problem. A planar slab of material is initially at a temperature of 300 K. At the time t=0, microwave radiation is directed at the material, leading to internal heat generation that is uniform within the material. The sides of the slab experience negligible heat losses and a water bath maintains the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT