필터 지우기
필터 지우기

Temperature-dependent thermal properties

조회 수: 2 (최근 30일)
Patrick Frey
Patrick Frey 2019년 12월 17일
답변: Star Strider 2019년 12월 17일
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
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

답변 (1개)

Star Strider
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))

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by