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
답변 (1개)
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 Center 및 File Exchange에서 Stress and Strain에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!