Untitled
unknown
plain_text
10 months ago
622 B
4
Indexable
%Plottare la funzione f(V)
R=0.08206;
A0=16.6037;
B0=0.2354;
a=0.11171;
b=0.07697;
c=3*1e6;
T=408;
P=36;
beta=R*T*B0-A0-(R*c)/T^2;
delta=(R*B0*b*c)/T^2;
gamma=-R*T*B0*b+a*A0-(R*c*B0)/T^2;
fun=@(V) ((R*T + beta/V + gamma/V^2 + delta/V^3)*1/P -V);
V0=2;
sol = fsolve(fun, V0);
fprintf('V= %.4f L\n', sol);
V_vals = linspace(1, 5, 100); % Genera 100 valori di V tra 1 e 5
F_vals = arrayfun(fun, V_vals); % Calcola i valori della funzione per ogni V
figure;
plot(V_vals, F_vals, 'b-', 'LineWidth', 1.5);
hold on;
xlabel('Volume (L)');
ylabel('F(V) ');
title('Tank Temperature');
legend('Variazione volume');
grid on;
Editor is loading...
Leave a Comment