Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
how to enter If cases in COMSOL
Posted 2016年6月16日 GMT-4 06:03 Version 4.3, Version 4.4, Version 5.0, Version 5.1, Version 5.2 1 Reply
Please login with a confirmed email address before reporting spam
Some parameters vary with respect to temperature. Is it possible to enter such things in comsol, Kindly do help.
eg:
if(T(j,1)<800)
A=31.995;
B=11.54;
C=41.322;
D=37.6127;
elseif (T(j,1)>=800 && T(j,1)<1025)
A= 94.7509;
B= 0;
C= 72.1439;
D= 0;
elseif (T(j,1)>=1025 && T(j,1)<1175)
A= -439.488;
B= 0;
C= 835.878;
D=377.668;
else (T(j,1)>=1175 && T(j,1)<1500)
A=-22.6774;
B=0;
C=57.1977;
D=16.5732;
end
Kfe=A+((B*1000)/T(j,1))+((C*T(j,1))/1000)+(D*(T(j,1)^2))/(10^6);
eg:
if(T(j,1)<800)
A=31.995;
B=11.54;
C=41.322;
D=37.6127;
elseif (T(j,1)>=800 && T(j,1)<1025)
A= 94.7509;
B= 0;
C= 72.1439;
D= 0;
elseif (T(j,1)>=1025 && T(j,1)<1175)
A= -439.488;
B= 0;
C= 835.878;
D=377.668;
else (T(j,1)>=1175 && T(j,1)<1500)
A=-22.6774;
B=0;
C=57.1977;
D=16.5732;
end
Kfe=A+((B*1000)/T(j,1))+((C*T(j,1))/1000)+(D*(T(j,1)^2))/(10^6);
1 Reply Last Post 2016年6月21日 GMT-4 16:43