Module:Gas/doc: Difference between revisions
More actions
Add documentation for Module:Gas/data fields. |
m →Objects |
||
| Line 55: | Line 55: | ||
Evaluates the gas's evaporation pressure curve for a given ''Pressure'', returning its corresponding evaporation temperature in kelvin. This is currently the same as ''EvaporationTemperatureUnclamped(gasTable, Pressure)''. | Evaluates the gas's evaporation pressure curve for a given ''Pressure'', returning its corresponding evaporation temperature in kelvin. This is currently the same as ''EvaporationTemperatureUnclamped(gasTable, Pressure)''. | ||
==Objects== | |||
====Gas==== | ====Gas==== | ||
A table containing data for a gas. Editing these should be done through [[Module:Gas/data]]. | A table containing data for a gas. Editing these should be done through [[Module:Gas/data]]. | ||
Revision as of 01:16, 14 March 2026
Methods
GetGas
Use: GetGas(User input)
Returns a read-only Gas object containing information for a given gas.
If no gas is found that can match the input, throws an error.
Phase change methods
Evaporation Pressure
EvaporationPressureUnclamped
Use: EvaporationPressureClamped(gasTable, Temperature)
gasTable: a table containing information for a given gas (obtainable through GetGas)
Temperature: The current gas gemperature in kelvin
Evaluates the gas's evaporation pressure curve for a given Temperature, returning its corresponding evaporation pressure in kPa. This is just the curve function without any compensation for phase change characteristics.
EvaporationPressureClamped
Use: EvaporationPressureUnclamped(gasTable, Temperature)
gasTable: a table containing information for a given gas (obtainable through GetGas)
Temperature: The current gas gemperature in kelvin
Evaluates the gas's evaporation pressure curve for a given Temperature, returning its corresponding evaporation pressure in kPa. Unlike EvaporationPressureClamped, this first clamps the input temperature to values within the range where the gas can exist as a non-frozen liquid.
EvaporationPressure
Use: EvaporationPressure(gasTable, Temperature)
gasTable: a table containing information for a given gas (obtainable through GetGas)
Temperature: The current gas gemperature in kelvin
Evaluates the gas's evaporation pressure curve for a given Temperature, returning its corresponding evaporation pressure in kPa. Unlike the other methods, this provides additional handling to return the evaporation pressure for supercooled liquids when given a liquid as input.
Evaporation Temperature
EvaporationTemperatureUnclamped
Use: EvaporationPressureUnclamped(gasTable, Pressure)
gasTable: a table containing information for a given gas (obtainable through GetGas)
Pressure: The current gas pressure in kPa
Evaluates the gas's evaporation pressure curve for a given Pressure, returning its corresponding evaporation temperature in kelvin. This is just the curve function without any compensation for phase change characteristics.
EvaporationTemperatureClamped
Use: EvaporationTemperatureClamped(gasTable, Pressure)
gasTable: a table containing information for a given gas (obtainable through GetGas)
Pressure: The current gas pressure in kPa
Evaluates the gas's evaporation pressure curve for a given Pressure, returning its corresponding evaporation temperature in kelvin. Pressure values are clamped to the range of values the gas can exist as a non-frozen, non-supercritical liquid.
EvaporationTemperature
Use: EvaporationTemperatureClamped(gasTable, Temperature)
gasTable: a table containing information for a given gas (obtainable through GetGas)
Pressure: The current gas pressure in kPa
Evaluates the gas's evaporation pressure curve for a given Pressure, returning its corresponding evaporation temperature in kelvin. This is currently the same as EvaporationTemperatureUnclamped(gasTable, Pressure).
Objects
Gas
A table containing data for a gas. Editing these should be done through Module:Gas/data.
Fields
Name
An internal name for a given gas, PascalCased. For spaces, use HumanReadableName instead.
ID
The internal mask for a given gas, as an integer value.
HumanReadableName
A human-readable name for a given gas.
HumanReadableSymbol
A community-defined symbol for a given gas. This does not necessarily match the symbol used ingame. Liquids have the same symbol as their matching gas.
MolarMass
The molar mass for a given gas in g/mol.
HeatCapacityRatio
The heat capacity ratio fot a given gas. Adiabatics is only currently used in rocket exhaust velocity calculations.
Image
An URI to an image of the gas on this wiki.
State
The gas's state. Can be either Gas or Liquid.
MolarVolume
Volume taken by 1 mol of gas in liters. Only present in Liquids.
SpecificHeat
The gas's specific heat in J/mol*K.
LatentHeat
The gas's phase change latent heat in J/mol.
CondensesInto
The Name of the liquid the gas condenses into during phase change. Only present on Gases capable of condensing into liquids.
EvaporatesInto
The Name of the gas the liquid condenses into during phase change. Only present on Liquids capable of evaporating into gases.
EvaporationRatio
Multiplier for the energy of the gas the liquid evaporates into. Used for liquids that phase change into gases with different heat capacities (Alcohol / Liquid Sodium Chloride).
TriplePressure
The gas's evaporation pressure at its triple point in kPa.
CriticalPressure
The gas's evaporation pressure at its maximum liquid temperature in kPa.
A
Evaporation Coefficient A for the gas.
B
Evaporation Coefficient B for the gas.
FreezingTemperature
Temperature in kelvin at which the gas freezes.
CriticalTemperature
Temperature in kelvin at which the gas can no longer condense regardless of pressure.
Enthalpy
Enthalpy of combustion for the gas in J/mol. 0 for non-fuels.
AutoignitionTemperature
Temperature at which autoignition occurs in Oxygen for fuels(or spontaneously for Hypergols).
IsHypergol
Boolean on whether autoignition can occur without an oxidizer. Only true in the case of Hydrazine and its liquid counterpart.
AutoignitionOffset
How far the oxidizer reduces autoignition temperatures for fuels that combust with it.
EnthalpyMultiplier
Multiplying factor for the fuel's combustion enthalpy when combusting with a fuel. 2 for Nitrous Oxide and Ozone, 1 for everything else.
ThermalEfficiency
The heat-to-energy conversion efficiency for the gas when it's used in a Stirling Engine.