11"""
2- HeatCapacitor(; name, C=1.0 , T_start=293.15 + 20)
2+ HeatCapacitor(; name, C, T_start=293.15 + 20)
33
44Lumped thermal element storing heat
55
@@ -11,7 +11,7 @@ Lumped thermal element storing heat
1111- `T`: [K] Temperature of element
1212- `der_T`: [K/s] Time derivative of temperature
1313"""
14- function HeatCapacitor (; name, C= 1.0 , T_start= 293.15 + 20 )
14+ function HeatCapacitor (; name, C, T_start= 293.15 + 20 )
1515 @named port = HeatPort ()
1616 @parameters C= C
1717 sts = @variables begin
@@ -29,14 +29,14 @@ function HeatCapacitor(; name, C=1.0, T_start=293.15 + 20)
2929end
3030
3131"""
32- ThermalConductor(;name, G=1.0 )
32+ ThermalConductor(;name, G)
3333
3434Lumped thermal element transporting heat without storing it.
3535
3636# Parameters:
3737- `G`: [W/K] Constant thermal conductance of material
3838"""
39- function ThermalConductor (;name, G= 1.0 )
39+ function ThermalConductor (;name, G)
4040 @named element1d = Element1D ()
4141 @unpack Q_flow, dT = element1d
4242 pars = @parameters G= G
@@ -47,14 +47,14 @@ function ThermalConductor(;name, G=1.0)
4747end
4848
4949"""
50- ThermalResistor(; name, R=1.0 )
50+ ThermalResistor(; name, R)
5151
5252Lumped thermal element transporting heat without storing it.
5353
5454# Parameters:
5555- `R`: [K/W] Constant thermal resistance of material
5656"""
57- function ThermalResistor (; name, R= 1.0 )
57+ function ThermalResistor (; name, R)
5858 @named element1d = Element1D ()
5959 @unpack Q_flow, dT = element1d
6060 pars = @parameters R= R
@@ -66,7 +66,7 @@ function ThermalResistor(; name, R=1.0)
6666end
6767
6868"""
69- ConvectiveConductor(; name, G=1.0 )
69+ ConvectiveConductor(; name, G)
7070
7171Lumped thermal element for heat convection.
7272
@@ -77,7 +77,7 @@ Lumped thermal element for heat convection.
7777- `dT`: [K] Temperature difference across the component solid.T - fluid.T
7878- `Q_flow`: [W] Heat flow rate from solid -> fluid
7979"""
80- function ConvectiveConductor (; name, G= 1.0 )
80+ function ConvectiveConductor (; name, G)
8181 @named solid = HeatPort ()
8282 @named fluid = HeatPort ()
8383 @parameters G= G
@@ -92,7 +92,7 @@ function ConvectiveConductor(; name, G=1.0)
9292end
9393
9494"""
95- ConvectiveResistor(; name, R=1.0 )
95+ ConvectiveResistor(; name, R)
9696
9797Lumped thermal element for heat convection.
9898
@@ -103,7 +103,7 @@ Lumped thermal element for heat convection.
103103- `dT`: [K] Temperature difference across the component solid.T - fluid.T
104104- `Q_flow`: [W] Heat flow rate from solid -> fluid
105105"""
106- function ConvectiveResistor (; name, R= 1.0 )
106+ function ConvectiveResistor (; name, R)
107107 @named solidport = HeatPort ()
108108 @named fluidport = HeatPort ()
109109 @parameters R= R
@@ -118,14 +118,14 @@ function ConvectiveResistor(; name, R=1.0)
118118end
119119
120120"""
121- BodyRadiation(; name, G=1.0 )
121+ BodyRadiation(; name, G)
122122
123123Lumped thermal element for radiation heat transfer.
124124
125125# Parameters:
126126- `G`: [m^2] Net radiation conductance between two surfaces
127127"""
128- function BodyRadiation (; name, G= 1.0 )
128+ function BodyRadiation (; name, G)
129129 sigma = 5.6703744191844294e-8 # Stefan-Boltzmann constant TODO : extract into physical constants module or use existing one
130130
131131 @named element1d = Element1D ()
@@ -142,13 +142,13 @@ end
142142"""
143143 ThermalCollector(; name, m=1)
144144
145- Collects m heat flows
145+ Collects `m` heat flows
146146
147147This is a model to collect the heat flows from `m` heatports to one single heatport.
148148# Parameters:
149149- `m`: Number of heat ports (e.g. m=2: `port_a1`, `port_a2`)
150150"""
151- function ThermalCollector (; name, m= 1 )
151+ function ThermalCollector (; name, m:: Integer = 1 )
152152 port_a = [HeatPort (name= Symbol (:port_a , i)) for i in 1 : m]
153153 @named port_b = HeatPort ()
154154 eqs = [
0 commit comments