User:RA2lover/Sandbox/Thermodynamics machinery notes/Stirling Engine
From Stationeers Community Wiki
More actions
Data Values
"maxPressureDelta": 11000,
"SurfaceArea": 8.499227,
"SurfaceAreaScale": 1,
"ThermodynamicsScale": 0.15,
"PistonVolume": 5,
"InternalVolume": 54,
"HotSideHeatExchangerArea": 2,
"ColdSideHeatExchangerArea": 3.5,
"HeatExchangerAtmosphereVolume": 10,
"MachineEfficiency": {
"m_Curve": [
{
"time": 0,
"value": 0,
"inSlope": 1.796615E-05,
"outSlope": 1.796615E-05,
"tangentMode": 0,
"weightedMode": 3,
"inWeight": 0,
"outWeight": 0.6607394
},
{
"time": 300,
"value": 1,
"inSlope": -0.00015339075,
"outSlope": -0.00015339075,
"tangentMode": 0,
"weightedMode": 3,
"inWeight": 0.6217494,
"outWeight": 0.27148464
},
{
"time": 1000,
"value": 0,
"inSlope": -0.00020273405,
"outSlope": Infinity,
"tangentMode": 0,
"weightedMode": 1,
"inWeight": 0.63547474,
"outWeight": 0
},
{
"time": 3000,
"value": 0,
"inSlope": 0,
"outSlope": 0,
"tangentMode": 0,
"weightedMode": 0,
"inWeight": 0,
"outWeight": 0
}
],
"m_PreInfinity": 2,
"m_PostInfinity": 2,
"m_RotationOrder": 4
},
"MaxRpm": 400,
"maxPower": 8000,
"IdealPressureDifferential": 2500,
"ExplosionForce": 1850
On Initialization
- Set Hot piston atmosphere volume to Piston volume (5 L).
- Set Cold piston atmosphere volume to Piston volume (5 L).
- Set Hot Input Atmosphere volume to Heat exchanger atmosphere volume (10 L).
On Atmospherics Tick
- Check if device is powered off.
- If so, generate no energy and move contents of hot side, cold side, and internal atmospheres to canister if one is present.
- Check if no canister (or a broken canister) is attached.
- If so, vent contents of hot side, and internal atmospheres, generate no power, and abort.
- Check if device is operable, has input and output pipe networks connected and an internal atmosphere initialized.
- If not, generate no power and abort.
- Check if connected canister has any contents.
- If so, move them to internal atmosphere.
- Mix internal atmosphere gases with hot piston atmosphere.
- Mix internal atmosphere gases with cold piston atmosphere.
- Because only gases are mixed, liquids can be trapped inside the cold piston through condensation and subcritical temperatures, increasing cold piston energy, so long as they remain in gas state on the internal atmosphere. Hydrochloric Acid and Nitrous Oxide are good candidates for this.
- Up to 4 L of liquids can be trapped without affecting cold piston pressure.
- Mix Hot Input Atmosphere with input network atmosphere.
- Exchange heat via convection between hot input and hot piston (100W/K * 2*Clamp01(hot input pressure in atm)m² over a tick, linearly scaling down at lower pressures).
- Heat exchange past equilibrium temperature is forced into equilibrium temperature.
- Because of the limited hot side heat exchanger volume (10L) and high heat exchange area (2 m²), it's possible to have a significant amount of control over the hot side temperature by adjusting the input pressure(effectively "throttling" the stirling engine).
- Heat exchange past equilibrium temperature is forced into equilibrium temperature.
- Mix hot side heat exchanger atmosphere with output network atmosphere.
- If a grid atmosphere is present, exchange heat via convection between grid atmosphere and piston (100W/K * 3.5*Clamp01(grid pressure in atm)m² ).
- Less control is available because of the much higher grid volume, but grid compositions with a higher SHC(such as a grid submerged in water) may provide a marginal benefit.
- Calculate the difference in energy between hot and cold pistons.
- Calculate the Environment Operating efficiency based on the cold piston's temperature (1 if operating in a vacuum).
- Calculate the Pressure Differential Efficiency: Clamp01( (Hot Piston Pressure-Cold Piston Pressure) / 2500 kPa)
- Calculate the Working Gas Efficiency by checking the efficiency of gases inside the cold chamber.
- Calculate generated energy: Hot-Cold piston energy difference * Working gas efficiency * Pressure differential efficiency * Environment operating efficiency (capped to 8kJ/tick)
- Remove generated energy from hot piston.
- Run explosive pressure check on internal atmosphere:
- If the pressure delta between internal and external atmospheres exceeds 11 MPa, roll a random number between 1 and the pressure delta.
- If the roll exceeds the pressure delta, create an explosion with an explosion force of 1850*(Factor by which the pressure rating was exceeded) and an explosion radius of Clamp(2*(Exceeded Factor), 0, 4)m.
- If the pressure delta between internal and external atmospheres exceeds 11 MPa, roll a random number between 1 and the pressure delta.