I am just trying to plot the distance x v. Temp function below. I want it to take the x values from 0 to 0.15. Thank you!

1 view (last 30 days)
clear all;
close all;
clc;
% Fin Configuration: A
T_s = 500; % [K]
T_inf = 350; % [K]
L = 0.2; % [m]
ST_k = 14.9; % [W/m*K]
U_inf = 10; % [m/s]
D = 0.002; % [m]
nu = 29.4*10^-6; % [m^2/s]
Pr = 0.688; % no units
Re = (U_inf*D)/(nu); % no units
h = ((((0.664*(Re)^(1/2))*((Pr)^(1/3)))*(ST_k))/(L)); % [W/m^2*K]
P = pi*D; % [m]
A = pi*D*L; % [m^2]
m = sqrt((h*P)/(ST_k*A)); % [1/m]
x = 0:0.15; % [0 to 15cm] or [0 to 0.15m]
Q = sqrt(h*P*ST_k*A)*(T_s - T_inf)*tanh(m*L); % [W] or [J/s]
T = 6.3763*cosh(m*(L-x))+350; % [K]
%figure('Name','Fin A Temp. v. Length')
plot(x,T);

Accepted Answer

KSSV
KSSV on 9 Jul 2022
Presently in your code x is a single number 0. You need to change that line.
clc; clear all ;
clear all;
close all;
clc;
% Fin Configuration: A
T_s = 500; % [K]
T_inf = 350; % [K]
L = 0.2; % [m]
ST_k = 14.9; % [W/m*K]
U_inf = 10; % [m/s]
D = 0.002; % [m]
nu = 29.4*10^-6; % [m^2/s]
Pr = 0.688; % no units
Re = (U_inf*D)/(nu); % no units
h = ((((0.664*(Re)^(1/2))*((Pr)^(1/3)))*(ST_k))/(L)); % [W/m^2*K]
P = pi*D; % [m]
A = pi*D*L; % [m^2]
m = sqrt((h*P)/(ST_k*A)); % [1/m]
x =linspace(0,0.15); %<-----changed here % [0 to 15cm] or [0 to 0.15m]
Q = sqrt(h*P*ST_k*A)*(T_s - T_inf)*tanh(m*L); % [W] or [J/s]
T = 6.3763*cosh(m*(L-x))+350; % [K]
%figure('Name','Fin A Temp. v. Length')
plot(x,T);

More Answers (0)

Categories

Find more on Polar Plots in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!