Trying to build an 11x9 matrix from another 11x9 matrix and other elements

2 Ansichten (letzte 30 Tage)
I am writing a program that compares different heat exchangers in order to select the best one for the application. I have successfully built an 11x9 array for the overall heat transfer coefficient (U), but now I am trying to build another 11x9 matrix for the log mean temperature difference (delTlm), and I am getting errors or answers that don't make sense. For example, when I did get an output for the delTlm matrix, every row had all values as the same. Here is the code that I have so far.
A = [2.4; 4.3; 7.4; 4.3; 7.4; 9.1; 2.4; 4.3; 7.4;].*0.0929; %m^2
%From problem 1, the exit temperature curves significantly flatten out
%after an NTU of 3 (returns diminish quickly). I will run the program from
%2.5 NTU to 3.5 NTU
NTU = (2.5:0.1:3.5).';
for i = 1:length(NTU)
%Calculating the effectiveness using the HE_effectiveness program
eff(i) = effectiveness(NTU(i), c, 'One Shell Pass');
%Finding the actual heat transfer from Qmax and the effectiveness
Q = (eff.*Qmax); %kW
%Finding the overall transfer coefficient
U = (NTU.*Cmin)./A.'; %kW/m^2*deg C
%Finding the log mean temperature difference
deltaTlm = Q./U.*A.'
end
  3 Kommentare
Michael Costa
Michael Costa am 2 Nov. 2020
%The HE is adiabatic.
%Specific heat capacity of water at 60 deg C
C_c = 4.185*m4; %kJ/s*deg C
%The brine is modelled as pure water.
C_h = 4.185*m13; %kJ/s*deg C
%Solution
%---------
%Finding Cmin, Cmax, Qmax, and c
Cmin = min(C_c, C_h); %kJ/s*deg C
Cmax = max(C_c, C_h); %kJ/s*deg C
Qmax = Cmin*(T13 - T4); %kW
c = Cmin/Cmax;
Michael Costa
Michael Costa am 2 Nov. 2020
As I said in the question, I have successfully built the U matrix (thanks to another guy on here)...so you shouldn't have to worry about the c variable or the effectiveness function. Do you see either one of those in the calculation of the matrix that I am asking about? Maybe you have misunderstood my question.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Mathieu NOE
Mathieu NOE am 2 Nov. 2020
hello
there were only a few minor indexing issues in your main code.
also I recommend not using i or j as index var names as they are reserved for imaginary / complex numbers
so , here main code fixed :
%The HE is adiabatic.
%Specific heat capacity of water at 60 deg C
C_c = 4.185*m4; %kJ/s*deg C
%The brine is modelled as pure water.
C_h = 4.185*m13; %kJ/s*deg C
%Solution
%---------
%Finding Cmin, Cmax, Qmax, and c
Cmin = min(C_c, C_h); %kJ/s*deg C
Cmax = max(C_c, C_h); %kJ/s*deg C
Qmax = Cmin*(T13 - T4); %kW
c = Cmin/Cmax;
A = [2.4; 4.3; 7.4; 4.3; 7.4; 9.1; 2.4; 4.3; 7.4;].*0.0929; %m^2
%From problem 1, the exit temperature curves significantly flatten out
%after an NTU of 3 (returns diminish quickly). I will run the program from
%2.5 NTU to 3.5 NTU
NTU = (2.5:0.1:3.5)';
for ci = 1:length(NTU)
%Calculating the effectiveness using the HE_effectiveness program
eff(ci) = effectiveness(NTU(ci), c, 'One Shell Pass');
%Finding the actual heat transfer from Qmax and the effectiveness
Q = (eff(ci).*Qmax); %kW
%Finding the overall transfer coefficient
U = (NTU(ci).*Cmin)./A.'; %kW/m^2*deg C
%Finding the log mean temperature difference
deltaTlm(ci,:) = Q./U.*A';
end

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by