Skip to content

Commit 5cee1cd

Browse files
committed
Worked on making heat transfer formulations more consistent
This closes #150.
1 parent e4bc357 commit 5cee1cd

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ This file collects the significant changes to the book since its initial public
2626
various functions/operators (issue
2727
[#187](https://github.com/xogeny/ModelicaBook/pull/187)
2828

29+
* Used a consistent heat transfer formulation throughout the book (issue
30+
[#150](https://github.com/xogeny/ModelicaBook/pull/150)
31+
2932
### Version 0.3.2
3033

3134
#### Enhancements

ModelicaByExample/Components/BlockDiagrams/Examples/MultiDomainControl.mo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ model MultiDomainControl
55
import Modelica.SIunits.Conversions.from_degC;
66

77
parameter Real h = 0.7 "Convection coefficient";
8+
parameter Real A = 1.0 "Area";
89
parameter Real m = 0.1 "Thermal maass";
910
parameter Real c_p = 1.2 "Specific heat";
1011
parameter Real T_inf = from_degC(25) "Ambient temperature";
@@ -20,8 +21,7 @@ model MultiDomainControl
2021
HeatTransfer.ThermalCapacitance cap(C=m*c_p, T0 = from_degC(90))
2122
"Thermal capacitance component"
2223
annotation (Placement(transformation(extent={{-30,-30},{-10,-10}})));
23-
HeatTransfer.Convection
24-
convection2(h=h)
24+
HeatTransfer.Convection convection2(h=h*A)
2525
annotation (Placement(transformation(extent={{10,-30},{30,-10}})));
2626
HeatTransfer.AmbientCondition
2727
amb(T_amb(displayUnit="K") = T_inf)

ModelicaByExample/Components/BlockDiagrams/Examples/MultiDomainControl.svg

Lines changed: 1 addition & 1 deletion
Loading

ModelicaByExample/Components/BlockDiagrams/Examples/NewtonCooling.mo

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ within ModelicaByExample.Components.BlockDiagrams.Examples;
22
model NewtonCooling "Newton cooling system modeled with blocks"
33
import Modelica.SIunits.Conversions.from_degC;
44
parameter Real h = 0.7 "Convection coefficient";
5+
parameter Real A = 1.0 "Area";
56
parameter Real m = 0.1 "Thermal mass";
67
parameter Real c_p = 1.2 "Specific heat";
78
parameter Real T_inf = from_degC(25) "Ambient temperature";
@@ -13,7 +14,7 @@ model NewtonCooling "Newton cooling system modeled with blocks"
1314
annotation (Placement(transformation(extent={{10,-40},{30,-20}})));
1415
Components.Sum sum(nin=2)
1516
annotation (Placement(transformation(extent={{52,-20},{72,0}})));
16-
Components.Gain gain1(k=h/(m*c_p))
17+
Components.Gain gain1(k=h*A/(m*c_p))
1718
annotation (Placement(transformation(extent={{-70,-10},{-50,10}})));
1819
equation
1920
connect(T.y, gain.u) annotation (Line(

ModelicaByExample/Components/BlockDiagrams/Examples/NewtonCooling.svg

Lines changed: 1 addition & 1 deletion
Loading

text/source/components/components/block_comps.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ revisit the equation associated with this example:
259259
.. todo:: this and some following expressions involving T are not being rendered
260260
correctly using https://book-preview.herokuapp.com
261261

262-
.. math:: m c_p \dot{T} = h (T_{\infty}-T)
262+
.. math:: m c_p \dot{T} = h A (T_{\infty}-T)
263263

264264
The following block diagram will solve for the temperature profile,
265265
:math:`T`:

0 commit comments

Comments
 (0)