I want to integrate this equation above with the matrix [T] already previuosly defined. Can anyone help here...?

댓글 수: 5

madhan ravi
madhan ravi 2020년 5월 10일
편집: madhan ravi 2020년 5월 10일
What’s rj? A vector? Can you upload your T matrix? How are the variables defined? Upload your code.
clear; clc; close all;
% Heat Transfer Coefficient, Material Properties, Ambient/Base Temperature
h = 150; cp = 510; rho = 7810; k = 11; Tinf = 24;
alpha = k/(rho*cp); R=0.1; T0=350;
N = 101; % Number of nodes
dt = 25e-03; % Time step, [s]
min = 1; % Number of minutes for solution end
t = 0:dt:60*min; % Skylar, I can adjust either the min = value to a fraction of a min or I can adjust the t = 60 portion to either 1s or 10 s...
M = length(t);
r = linspace(0,R,N);
dr = r(2) - r(1);
a = zeros(1,N);
b = zeros(1,N);
c = zeros(1,N);
a(1) = 0;
a(N) = 2*alpha/dr^2;
b(1) = -6*alpha/dr^2;
b(N) = (-2*alpha/dr^2) * (1+(h*dr/k) + (h*dr^2/(R*k)));
c(1) = 6*alpha/dr^2;
c(N) = 0;
for i = 2:N-1
a(i) = (alpha/dr^2) - alpha/(dr*r(i));
b(i) = -2*alpha/dr^2;
c(i) = (alpha/dr^2) + alpha/(dr*r(i));
end
Lrr = diag(a(2:N),-1) + diag(b) + diag(c(1:N-1),1);
d = zeros(N,1);
d(N) = ((2*alpha*h/(R*k)) + (2*alpha*h/(dr*k)))*Tinf;
I = eye(N);
A = I - (dt/2)*Lrr;
B = I + (dt/2)*Lrr;
invA = inv(A);
T = zeros(N,M);
Taylor Carrington
Taylor Carrington 2020년 5월 10일
rj is just one of the selected 101 nodes.
Ameer Hamza
Ameer Hamza 2020년 5월 10일
Can you show the equation of matrix T in mathematical form?
Taylor Carrington
Taylor Carrington 2020년 5월 10일

댓글을 달려면 로그인하십시오.

답변 (1개)

darova
darova 2020년 5월 11일

0 개 추천

What about this?
R = 5;
r = linspace(0,R,100);
T = rand(50,100);
rr = repmat(r,50,1); % 2d matrix r
F1 = 3/R^3*trapz(r,T.*rr.^2,2); % integrate
Is it understandable?

카테고리

질문:

2020년 5월 10일

답변:

2020년 5월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by