Temperature-dependent thermal properties
5 ビュー (過去 30 日間)
古いコメントを表示
Hi, I trying to implement temperature-dependent properties such as the thermal conductivity. Unfortunatley I have to implement the following temperature-dependent thermal conductivity.
![Unbenannt.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/254824/Unbenannt.png)
So I tried the following code. There is no error but it seems it is not working the correct way. So can you help me where is the problem and how I can fix it? I guess the problem is the if and esleif part in the function...
...
k = @(location,state) k_temp(location, state);
thermalProperties(thermalmodel,'ThermalConductivity',k)
function H = k_temp(location, state)
F = 2;
Temp = state.u-273.15;
if (Temp < 100)
H = (1.7455 + 0.1163 * F + 0.001628 .* (state.u-273.15-20) * F);
elseif (Temp < 700)
H = (1.7455 - 0.000872 .* (state.u-273.15-100));
else
H = 1.23;
end
end
Many thanks for any help you can give me. Regards. Patrick
0 件のコメント
回答 (1 件)
Star Strider
2019 年 12 月 17 日
I am not certain what you want. (I cannot run your code, since I do not know what the arguments to the function should be.)
Note that ‘(Temp < 700)’ includes ‘(Temp < 100)’. Perhaps this is what you intend:
elseif ((Temp >= 100) & (Temp < 700))
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!