Temperature-dependent thermal properties

3 views (last 30 days)
Patrick Frey
Patrick Frey on 17 Dec 2019
Answered: Star Strider on 17 Dec 2019
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

Answers (1)

Star Strider
Star Strider on 17 Dec 2019
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))

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!