Skip to main content

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

ParameterTypeDescription
capacitynumberThe 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

ParameterTypeDescription
sourceTemperatureSourceThe 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

ParameterTypeDescription
valuenumberThe 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

ParameterTypeDescription
capacitynumberThe 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

ParameterTypeDescription
indexnumberThe index of the source.
conductivitynumberThe 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

ParameterTypeDescription
indexnumberThe index of the source.
temperaturenumberThe 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

ParameterTypeDescription
deltaTimenumberThe elapsed time, in milliseconds.

Returns

void