How can I add the differential equation attached to my script to run in the loop, where n = 4 for the first value of n.

1 vue (au cours des 30 derniers jours)
clear all;
T0H = 1158;
H = 0.3; % in Degrees Kelvin/Second - Rate of Change
K0 = 1.067e17; % Pre-Exponential Factor
QH = 4.4516e+05; % in Joules/Mole using Kelvin
R = 8.314; % Gas Constant
Ft = [201];
n1 = [201];
Ft(1) = 0;
n1(1) = 4;
for i = 1159: 1 : 1358
T = i;
Kt = K0*exp(-(QH/(R*T)));
Ft(i - 1157) = 1 - exp(-(Kt*(T-T0H)/H)^n1(i-1158));
n1(i - 1157) = -((log(-log((1-(Ft(i - 1157)))))) - (log(-log((1-(Ft(i - 1158))))))/((QH/R*T) - (QH/R*(T-1))));
end
figure ('Name','Phase Fraction vs Temperature');
disp(Ft);
xs = 1158:1:1358;
ys = Ft;
plot(xs,ys);
title('Phase Fraction vs Temperature')
xlabel('Temperature in K');
ylabel('Phase Fraction of \beta ');
grid on;
hold on;
  2 commentaires
Abhishek Cherukara
Abhishek Cherukara le 17 Fév 2021
So basically the Ft is dependent on n as shown here;
But n is dependent on the Ft at each temperature T of the loop. Where Q, R and T are constants.
Does that make any sense?

Connectez-vous pour commenter.

Réponses (1)

darova
darova le 17 Fév 2021
If you have formula for you don't need diff equation
T = 1159: 1 : 1358;
fr = 1 - exp(-(K*(T-T0)/H).^n);
c1 = diff( log(-log(1-fr)) );
c2 = diff( Q./R./T );
nn = c1./c2;
  2 commentaires
Abhishek Cherukara
Abhishek Cherukara le 17 Fév 2021
Hi @darova, Unfortunately, I'm still getting an error with this? Is there anything else I could do to adjust this?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Stress and Strain dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by