Class: TemperatureSystem
Defined in: src/sdk/math/TemperatureSystem.ts:20
A closed heat system with temperature sources contributing to a volume.
Constructors
Constructor
new TemperatureSystem(
capacity
):TemperatureSystem
Defined in: src/sdk/math/TemperatureSystem.ts:36
Creates an instance of a TemperatureSystem.
Parameters
Parameter | Type | Description |
---|---|---|
capacity | number | The heat capacity of the system, in joules per kelvin. |
Returns
TemperatureSystem
Accessors
value
Get Signature
get value():
Subscribable
<number
>
Defined in: src/sdk/math/TemperatureSystem.ts:28
Gets the system's output value.
Returns
Subscribable
<number
>
The system's output temperature value, in degrees Celsius.
Methods
addSource()
addSource(
source
):number
Defined in: src/sdk/math/TemperatureSystem.ts:51
Adds a temperature source.
Parameters
Parameter | Type | Description |
---|---|---|
source | TemperatureSource | The temperature source. |
Returns
number
The index of the added temperature source.
set()
set(
value
):void
Defined in: src/sdk/math/TemperatureSystem.ts:42
Directly sets the current temperature value.
Parameters
Parameter | Type | Description |
---|---|---|
value | number | The temperature value, in degrees Celsius. |
Returns
void
setCapacity()
setCapacity(
capacity
):void
Defined in: src/sdk/math/TemperatureSystem.ts:83
Sets the heat capacity of the system.
Parameters
Parameter | Type | Description |
---|---|---|
capacity | number | The heat capacity of the system, in joules per kelvin. |
Returns
void
setSourceConductivity()
setSourceConductivity(
index
,conductivity
):void
Defined in: src/sdk/math/TemperatureSystem.ts:72
Sets the conductivity of a temperature source.
Parameters
Parameter | Type | Description |
---|---|---|
index | number | The index of the source. |
conductivity | number | The conductivity to set to, in watts per meter-kelvin. |
Returns
void
setSourceTemp()
setSourceTemp(
index
,temperature
):void
Defined in: src/sdk/math/TemperatureSystem.ts:60
Sets the temperature of a temperature source.
Parameters
Parameter | Type | Description |
---|---|---|
index | number | The index of the source. |
temperature | number | The temperature to set to, in degrees Celsius. |
Returns
void
update()
update(
deltaTime
):void
Defined in: src/sdk/math/TemperatureSystem.ts:93
Updates the temperature of this system following a period of elapsed time. This method assumes that this system's sources, their temperatures and conductivities, and this system's heat capacity at the time this method is called all remained constant throughout the time elapsed.
Parameters
Parameter | Type | Description |
---|---|---|
deltaTime | number | The elapsed time, in milliseconds. |
Returns
void