2d temperature in a plate using Matrix Inversion and MATLAB

In summary, the conversation is about a user needing help with solving a heat transfer problem using MATLAB. They are trying to develop a code that computes the two-dimensional temperature distribution in a rectangular plate. They have solved the problem in one dimension and are struggling to combine two dimensions into one matrix. The user eventually figures out how to solve the problem and plans to share their solution later.
  • #1
jackfrost1031
4
0
Hi,

I think i should have posted here instead of where I posted before. I don't know how I missed the homework help section... anyway

Well, I'm required to solve this heat transfer problem.

Develop a MATLAB code that computes the two-dimensional
temperature distribution in the rectangular plate. Load coefficients
into a matrix array of the form [A][T] = [C] where [A] is an M by
N matrix containing the leading coefficients of the temperature
nodes derived from the energy balance procedure of Task 1.

Solve the system of equations using MATLAB’s routine [T]= [A ]^-1*[C]

20fw9b7.jpg


T1 is 25c and q'' is 100w/m2

Ok, so I can get it to do it in 1 dimension and my numbers are correct based upon past work done in Excel (checked by Prof). I am not sure how to combine two dimensions into one matrix.

Currently my code is as follows:

Code:
%{
Zach Cross
7-17-2010
Computes 2D temperature distribution in a rectangular plate
%}

clear all; close all; format short g
%boundaries
T1 = 25;
TE = T1;
TS = T1;
TW = T1;
%degrees C

q = 100;
%w/m^2

L = 0.2;
W = 0.1;
% meter

k = 0.1;
%W/(m*K)

%size of matrix
i = 5;
j = 5;
dx = L/i;
dy = W/j;

%set some helpful constants
dx_ = dx/dy;
dy_ = dy/dx;
d1 = (3*k*dx_ + 3*k*dy_);
d2 = (3*k*dx_ + 2*k*dy_);
d3 = (2*k*dx_ + 3*k*dy_);
d4 = (2*k*dx_ + 2*k*dy_);

%west interior node going from north to south (not accounting for 25c west boundary condition)
A1 = [1, -1, 0, 0, 0, 0, 0;
      -2*k*dx_/d1, 1, -k*dx_/d1, 0, 0, 0, 0;
      0, -k*dx_/d3, 1, -k*dx_/d3, 0, 0, 0;
      0, 0, -k*dx_/d3, 1, -k*dx_/d3, 0, 0;
      0, 0, 0, -k*dx_/d3, 1, -k*dx_/d3, 0;
      0, 0, 0, 0, -k*dx_/d1, 1, -2*k*dx_/d1;
      0, 0, 0, 0, 0, 0, 1];
C1 = [q*dy/(2*k);
    0;
    0;
    0;
    0;
    0;
    TS];
T1 = inv(A1)*C1

T1 comes out to

T1 =

25.901
15.901
7.8263
5.6215
7.6328
15.369
25

which is precisely what it should be [if this were a 1D problem].

I realize that it's stuck at the current size and I can work on making it capable of whatever size later; right now I want a 5x5 mesh plus the boundaries so, really 7x7.

I have derived equations from an energy balance for all the different types of nodes (corner, interior, boundary, etc) but I'm unsure how to get them to work together in this scheme. I can do it iteratively but it's not what he wants.

Could someone help me out a little here? Do I need to have a 7x7 solution matrix? (ugh, please not!)
 
Physics news on Phys.org
  • #2
Well, I figured it out. I'll post up how later as I have time. Thanks!
 

1. How does Matrix Inversion work in determining 2d temperature in a plate?

Matrix Inversion is a mathematical process used in solving systems of linear equations. In the context of 2d temperature in a plate, it involves using a matrix of temperature values and their corresponding positions on the plate to create a system of equations. This system is then solved using Matrix Inversion to find the temperature values at all points on the plate.

2. What is the role of MATLAB in analyzing 2d temperature in a plate?

MATLAB is a powerful software tool that allows scientists and engineers to perform complex mathematical and scientific calculations. In the context of 2d temperature in a plate, it is used to input the matrix of temperature values and their positions, perform the Matrix Inversion process, and output the resulting temperature values on the plate.

3. Can Matrix Inversion and MATLAB accurately predict temperature in a real-world scenario?

Yes, when used correctly and with accurate input data, Matrix Inversion and MATLAB can provide accurate predictions of temperature in a 2d plate. However, it is important to note that these predictions are based on the assumptions and limitations of the mathematical models used and may not always reflect the exact temperature in a real-world scenario.

4. How can I validate the accuracy of the 2d temperature predictions using Matrix Inversion and MATLAB?

One way to validate the accuracy of the predictions is to compare them with real-world temperature measurements. This can be done by collecting temperature data at different points on the plate and comparing it with the predicted values. Additionally, sensitivity analysis can also be performed to assess the impact of changing input parameters on the predictions.

5. Are there any limitations to using Matrix Inversion and MATLAB for analyzing 2d temperature in a plate?

Yes, there are some limitations to using Matrix Inversion and MATLAB for this purpose. For instance, the accuracy of the predictions may be affected by factors such as the quality of input data, the assumptions made in the mathematical model, and the complexity of the temperature distribution on the plate. It is important to carefully consider these limitations and their potential impact on the results when using these tools for analysis.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
6
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
955
  • Engineering and Comp Sci Homework Help
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
888
  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
824
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
3K
Back
Top