Skip to main content

Class: TemperatureSystem

A closed heat system with temperature sources contributing to a volume.

Constructors

constructor

new TemperatureSystem(capacity): TemperatureSystem

Creates an instance of a TemperatureSystem.

Parameters

NameTypeDescription
capacitynumberThe heat capacity of the system, in joules per kelvin.

Returns

TemperatureSystem

Defined in

src/sdk/math/TemperatureSystem.ts:36

Accessors

value

get value(): Subscribable<number>

Gets the system's output value.

Returns

Subscribable<number>

The system's output temperature value, in degrees Celsius.

Defined in

src/sdk/math/TemperatureSystem.ts:28

Methods

addSource

addSource(source): number

Adds a temperature source.

Parameters

NameTypeDescription
sourceTemperatureSourceThe temperature source.

Returns

number

The index of the added temperature source.

Defined in

src/sdk/math/TemperatureSystem.ts:51


set

set(value): void

Directly sets the current temperature value.

Parameters

NameTypeDescription
valuenumberThe temperature value, in degrees Celsius.

Returns

void

Defined in

src/sdk/math/TemperatureSystem.ts:42


setCapacity

setCapacity(capacity): void

Sets the heat capacity of the system.

Parameters

NameTypeDescription
capacitynumberThe heat capacity of the system, in joules per kelvin.

Returns

void

Defined in

src/sdk/math/TemperatureSystem.ts:83


setSourceConductivity

setSourceConductivity(index, conductivity): void

Sets the conductivity of a temperature source.

Parameters

NameTypeDescription
indexnumberThe index of the source.
conductivitynumberThe conductivity to set to, in watts per meter-kelvin.

Returns

void

Defined in

src/sdk/math/TemperatureSystem.ts:72


setSourceTemp

setSourceTemp(index, temperature): void

Sets the temperature of a temperature source.

Parameters

NameTypeDescription
indexnumberThe index of the source.
temperaturenumberThe temperature to set to, in degrees Celsius.

Returns

void

Defined in

src/sdk/math/TemperatureSystem.ts:60


update

update(deltaTime): void

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

NameTypeDescription
deltaTimenumberThe elapsed time, in milliseconds.

Returns

void

Defined in

src/sdk/math/TemperatureSystem.ts:93