From ed267247f44b14868239d917c695b14efb8f0d02 Mon Sep 17 00:00:00 2001 From: Felix MARSOLLIER <fm4b8dfn@dsp1027505> Date: Wed, 12 Oct 2022 15:00:43 +0200 Subject: [PATCH] Improvement: Adding an absolute value to avoid a negative value (possible with steady state initialisation) --- HeatTransfer/Functions/Radiation/h_rad.mo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HeatTransfer/Functions/Radiation/h_rad.mo b/HeatTransfer/Functions/Radiation/h_rad.mo index 746a021..7e944bd 100644 --- a/HeatTransfer/Functions/Radiation/h_rad.mo +++ b/HeatTransfer/Functions/Radiation/h_rad.mo @@ -15,7 +15,7 @@ algorithm // the expression bellow is non recursive //h_rad := 1 / R_th * Modelica.Constants.sigma * (T_A^3 + T_A * T_B^2 + T_B * T_A^2 + T_B^3) ; - h_rad := Modelica.Constants.sigma * (T_A + T_B) * (T_A^2 + T_B^2) / R_th ; + h_rad := abs(Modelica.Constants.sigma * (T_A + T_B) * (T_A^2 + T_B^2) / R_th) ; annotation(Documentation( info = " <html> -- GitLab