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 (최근 30일)
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
Abhishek Cherukara
Abhishek Cherukara 2021년 2월 17일
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?

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

답변 (1개)

darova
darova 2021년 2월 17일
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;

카테고리

Help CenterFile Exchange에서 Stress and Strain에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by