Actions

Difference between revisions of "Furnace temperature and pressure math"

From Unofficial Stationeers Wiki

Line 1: Line 1:
''The data used was collected in version 0.2.2800. It was obtained with regular furnaces only, the '''advanced furnace is untested''' ..I play at my own pace, okay?''
+
''The data used was collected in version 0.2.2800. It was obtained with regular furnaces only, the '''advanced furnace is untested''' ..I play at my own pace..''
  
 
=== Furnace behaviour ===
 
=== Furnace behaviour ===
Line 52: Line 52:
  
 
*P(after) = P(before) * T(after) * ( 1 + 5.7*min(ratio(O2), ratio(H2)*0.5) ) / T(before)
 
*P(after) = P(before) * T(after) * ( 1 + 5.7*min(ratio(O2), ratio(H2)*0.5) ) / T(before)
**this expression comes from two sets of PV=nRT, one after and one before combustion. The reaction formula say that each mol combusted O2 turns into 6 mol gas, this creates a link between the equations, n(after) = n(before)*(1+min(ratio(O2), ratio(H2)*0.5)*6), then include the 0.95 efficiency
+
**this expression comes from two sets of PV=nRT, one after and one before combustion. The reaction formula say that for each mol consumed O2 we gain 6 mol gas (9-3), this creates a link between the equations, n(after) = n(before)*(1+min(ratio(O2), ratio(H2)*0.5)*6), then include the 0.95 efficiency as well
  
  
Line 61: Line 61:
 
small batch, oxite first
 
small batch, oxite first
 
*Adding 1 oxite + 1 volatile, in that order
 
*Adding 1 oxite + 1 volatile, in that order
**Temperature: 2222K, Pressure: 2.03MPa, moles of O2/H2 combusted: 11/21, Combustion ratio (H2 limited): 95%
+
**Temperature: 2222K, Pressure: 2.03MPa, moles of O2/H2 combusted: 11/21, Combustion efficiency (H2 limited): 95%
 
*Adding 1 oxite + 2 volatiles, in that order
 
*Adding 1 oxite + 2 volatiles, in that order
**Temperature: 2514K, Pressure: 4.13MPa, moles of O2/H2 combusted: 22/43, Combustion ratio (H2 limited): 98%
+
**Temperature: 2514K, Pressure: 4.13MPa, moles of O2/H2 combusted: 22/43, Combustion efficiency (H2 limited): 98%
  
 
small batch, volatiles first
 
small batch, volatiles first
 
*Adding 1 volatile + 1 oxite, in that order
 
*Adding 1 volatile + 1 oxite, in that order
**Temperature: 2224K, Pressure: 2.03MPa, moles of O2/H2 combusted: 11/21, Combustion ratio (H2 limited): 95%
+
**Temperature: 2224K, Pressure: 2.03MPa, moles of O2/H2 combusted: 11/21, Combustion efficiency (H2 limited): 95%
 
*Adding 2 volatiles + 1 oxite, in that order
 
*Adding 2 volatiles + 1 oxite, in that order
**Temperature: 2432K, Pressure: 3.93MPa, moles of O2/H2 combusted: 21/42, Combustion ratio (H2 limited): 95%
+
**Temperature: 2432K, Pressure: 3.93MPa, moles of O2/H2 combusted: 21/42, Combustion efficiency (H2 limited): 95%
  
 
large batch, oxite first
 
large batch, oxite first
 
*Adding 5 oxite + 10 volatiles, in that order
 
*Adding 5 oxite + 10 volatiles, in that order
**Temperature: 2463K, Pressure: 18.76MPa, moles of O2/H2 combusted: 96/190, Combustion ratio (H2 limited): 86%
+
**Temperature: 2463K, Pressure: 18.76MPa, moles of O2/H2 combusted: 96/190, Combustion efficiency (H2 limited): 86%
 
*Adding 8 oxite + 16 volatiles, in that order
 
*Adding 8 oxite + 16 volatiles, in that order
**Temperature: 2537K, Pressure: 33.28MPa, moles of O2/H2 combusted: 172/344, Combustion ratio (H2 limited): 98%
+
**Temperature: 2537K, Pressure: 33.28MPa, moles of O2/H2 combusted: 172/344, Combustion efficiency (H2 limited): 98%
  
  
The difference in combustion efficiency is a mystery. Fuel temperature doesn't seem to matter (seen by furnace tests with 2:1 gas on both Mars and Europa). One possibility is that this deviation is a result of multiple consecutive ignitions. Whatever the reason, using ice in a furnace creates some unpredictability.
+
The difference in combustion efficiency is a mystery. One possibility is that this deviation is a result of multiple consecutive ignitions during the same game tick as the second ice is added, and then the gassy products are added on the following tick. Whatever the reason, using ice in a furnace creates some unpredictability, which give calculations a certain degree of error. So instead of using math, it seems better to write down a table of temperatures and pressure resulting from different amounts of ice.
  
  

Revision as of 09:24, 29 March 2021

The data used was collected in version 0.2.2800. It was obtained with regular furnaces only, the advanced furnace is untested ..I play at my own pace..

Furnace behaviour

  • Only the gas inside the furnace have temperature, the furnace itself do not, nor does it take any energy from the gas.
  • Combustion will consume 95% of the limiting ingredient, O2 or H2 (if there is 10 mol O2, and excess H2, 0.5 mol O2 will remain afterwards)
  • For a combustion to occur, there must be at least 5% of both O2 or H2
  • Reaction formula: 1 O2 + 2 H2 -> 6 CO2 + 3 X + 595kJ
  • No side reactions with other gases have been observed so far
  • The inlet pipe will only allow gas to enter the furnace, and it will only do so if the pressure in the pipe is higher than the pressure inside the furnace. This behaviour is similar to that of the pressure regulator.
  • The outlet pipe acts like an extension of the furnace, increasing it's volume by 100L per pipe section, and it can be used as an alternative inlet point if so desired. A larger furnace volume have no impact on the ignition temperature or pressure of the furnace, the only effect is a higher fuel consumption, +10% more mols for each unsealed pipe section attached to it. The number of junctions on a pipe doesn't matter, the volume is always 100L. Removing the pipe directly attached to the furnace makes the gas inside of it vanish or move to neighbouring pipes, it does not go into the furnace.


Using perfect 2:1 fuel

Temperature peak

  • T(after) = ( T(before)*61.9 + 565250 ) / 234.515
    • T(after) is the temperature in Kelvin after ignition
    • T(before) is the temperature in Kelvin before ignition
    • The 565250 value is because of the 95% combustion efficiency, the full 595kJ isn't released
    • 61.9 is the heat capacity for 1 mol O2 and 2 mol H2, the sum of their specific heat values, the mol amounts comes from the reaction formula
    • 234.515 is the heat capacity for the gas obtained when 1 mol O2 and 2 mol H2 combusts with 95% efficiency (243.6 * 0.95 + 61.9 * 0.05)
  • The number of moles combusted doesn't actually matter for the temperature, it will always reach the same value. More fuel will however release more total energy which means it takes longer for the furnace to cool down.

Pressure peak

  • P(after) = 2.9 * P(before) * T(after) / T(before)
    • P(after) is the pressure in Pa after ignition
    • P(before) is the pressure in Pa before ignition
    • T(after) is the temperature in Kelvin after ignition
    • T(before) is the temperature in Kelvin before ignition
    • 2.9 is the multiple of the number of mol inside the furnace after combustion with 95% efficiency based on the reaction formula


Using diluted fuel

Unreactive gases can be added before the ignition to increase pressure and decrease temperature. An excess of either O2 or H2 also counts as unreactive.

Temperature peak

  • T(after) = ( T(before) * sum(specific heat * ratio(gas)(before)) + min(ratio(O2), ratio(H2) * 0.5) * 0.95 * 595000 ) / ( sum(specific heat * ratio(gas)(before)) + min(ratio(O2), ratio(H2)*0.5) * 0.95 * 181.7)
    • T(after) is the temperature in Kelvin after ignition
    • T(before) is the temperature in Kelvin before ignition
    • sum(x*y) is the sum of all x*y products, one product for every gas in the mix, before ignition
    • specific heat is the value given for each gas, it's how much energy is needed to increase the temperature by 1K/mol
    • ratio(gas)(before) is the molecular ratio, given by the tablet as % values for each gas in the mix, before ignition
    • min(x,y) returns the smallest value of x and y
    • 181.7 comes from 243.6-61.9, the change in heat capacity when 1 mol of O2 and 2 mol of H2 is combusted to 100%

Pressure peak

  • P(after) = P(before) * T(after) * ( 1 + 5.7*min(ratio(O2), ratio(H2)*0.5) ) / T(before)
    • this expression comes from two sets of PV=nRT, one after and one before combustion. The reaction formula say that for each mol consumed O2 we gain 6 mol gas (9-3), this creates a link between the equations, n(after) = n(before)*(1+min(ratio(O2), ratio(H2)*0.5)*6), then include the 0.95 efficiency as well


Using Ice(Oxite) and Ice(Volatiles)

There is a minor difference between which ice is added first. One can also observe a fluctuation in the combustion efficiency compared to when a furnace is fueled with gas. The end result also matters a little bit on how fast the ignition button is pressed when the first ice type is added while doing larger batches.

small batch, oxite first

  • Adding 1 oxite + 1 volatile, in that order
    • Temperature: 2222K, Pressure: 2.03MPa, moles of O2/H2 combusted: 11/21, Combustion efficiency (H2 limited): 95%
  • Adding 1 oxite + 2 volatiles, in that order
    • Temperature: 2514K, Pressure: 4.13MPa, moles of O2/H2 combusted: 22/43, Combustion efficiency (H2 limited): 98%

small batch, volatiles first

  • Adding 1 volatile + 1 oxite, in that order
    • Temperature: 2224K, Pressure: 2.03MPa, moles of O2/H2 combusted: 11/21, Combustion efficiency (H2 limited): 95%
  • Adding 2 volatiles + 1 oxite, in that order
    • Temperature: 2432K, Pressure: 3.93MPa, moles of O2/H2 combusted: 21/42, Combustion efficiency (H2 limited): 95%

large batch, oxite first

  • Adding 5 oxite + 10 volatiles, in that order
    • Temperature: 2463K, Pressure: 18.76MPa, moles of O2/H2 combusted: 96/190, Combustion efficiency (H2 limited): 86%
  • Adding 8 oxite + 16 volatiles, in that order
    • Temperature: 2537K, Pressure: 33.28MPa, moles of O2/H2 combusted: 172/344, Combustion efficiency (H2 limited): 98%


The difference in combustion efficiency is a mystery. One possibility is that this deviation is a result of multiple consecutive ignitions during the same game tick as the second ice is added, and then the gassy products are added on the following tick. Whatever the reason, using ice in a furnace creates some unpredictability, which give calculations a certain degree of error. So instead of using math, it seems better to write down a table of temperatures and pressure resulting from different amounts of ice.


Furnace cooling rate (unfinished)

unknown

Observations

  • the rate of cooling is temperature dependent, hotter cools faster (furnace temp - surrounding temp? how do vaccum behave?)
  • the rate of cooling is time dependent (game tick speed is once per 0.5 seconds)
  • the rate of cooling is mol dependent (small amounts cool faster)
  • pipes attached to the exhaust effect the cooling rate, and since they effectively increase the volume of the furnace the amount of mol of hot gas will be different too
  • adding ores decreases the temperature (do melting cost energy? or is this just from heating the trapped gases inside the ore?)

Possible experimental setup to measure dT/dt

  • Hold a tablet with an atmos cartridge in the right hand (so it can be read when the game is paused). Aim the tablet against the furnace and pause with ESC, double tap ESC to move the game forward one tick, record the temperatures.
  • Remember to record the total amount of moles as well


Resetting the furnace

Since only gas have temperature, evacuating all gas means resetting the temperature.


Calculating how to reach a desired Temperature and Pressure on ignition

To freely control the temperature and pressure, the fuel must be diluted with a non-combustable gas. This can be added either before or after ignition, doing so before ignition makes it alot easier to predict, since doing so after ignition is more of an art than a science. The method prefered here is to add the non-combustable gas before ignition. It is possible to add gas into the furnace via the exhaust pipe, so it's not necessary to dilute the fuel inside the fuelpipes to do this.

There are only 4 variables required for this calculation.

  1. Intial fuel mix temperature (furnace temperature before ignition)
  2. Desired temperature on ignition (you choose)
  3. Desired pressure on ignition (you choose)
  4. The specific heat value of the gas used to dilute the fuel (if a mix of gases is used, the specific heat to use is the average specific heat per mol, example calculation below)


The equations will give these results

  1. The ratio(fuel) in the fuel-dilutant mix. (0.75 means 75% perfect 1:2 fuel mols (O2 and H2 added together)†, the other 25% will be dilutant gas mols, making it a 1:2:1 mix of O2:H2:dilutant)
  2. The total pressure of the fuel-dilutant mix inside the furnace before ignition

†It's helpful to separate out the fuel part like this since everyone should be using pre-mixed fuel, it makes the diluting easier and has a lower risk to cause confusion when using either O2 or H2 to be the dilutant gas

The dilution can be double checked by using the tablet and looking at the mol% values for the fuel mix. The ratio(fuel) calculated below can be converted into %H2=100%*ratio(fuel)*2/3 and %O2=100%*ratio(fuel)/3 which are the %-values seen on the tablet.

Calculating the fuel ratio

  • ratio(fuel) = n(fuel)/(n(fuel)+n(dilutant)) = s*(T(after) - T(before)) / ( T(before)*(61.9/3-s) + (0.95*595000/3) - T(after)*(61.9-s) - T(after)*(0.95*181.7/3) )
    • s = specific heat of diluting gas
      • if the dilutant is a mix of gases, calculate the average specific heat in that mix per mol
      • example: 15% N2 and 85% CO2 as dilutant -> specific heat = 0.15*20.6 + 0.85*28.2 = 27.06
    • n(fuel) = total mols of fuel = n(O2)+n(H2) together (always in the perfect 1:2 ratio, if either O2 or H2 are in excess the extra amount is considered a dilutant)
    • n(dilutant) = total mols of non-combusting gas (this can be an excess of O2 or H2 if that is used as dilutant)
    • ratio(fuel), 1 = 100% fuel = 33.3% O2 and 66.7% H2, no dilutant present
  • If you wonder how the equation from Using diluted fuel turned into this, its because
    • ratio(fuel) was introduced (which is 3 times higher than min(ratio(O2),ratio(H2)*0.5), I think it helps if O2 or H2 is used to dilute the fuel later, and 1 being 100% fuel is more intutive than 0.333 being 100% fuel
    • the dilutant (even a mix) can be treated as a single gas, which turns sum(specific heat * mol of gas (before)) into ratio(fuel)*(specific heat(O2)+2*specific heat(H2) )/3 + (1-ratio(fuel))*specific heat(dilutant)
    • 61.9/3 is the specific heat for the 2:1 fuel per mol fuel, the 181.7 value was explained under Using diluted fuel above
    • min(ratio(O2),ratio(H2)*0.5) will now always output ratio(fuel)/3, so it can be replaced with that

Calculating the pressure before ignition

  • P(before) = P(after)*T(before) / ( T(after) * (1 + ratio(fuel)*2*0.95) )
    • ratio(fuel) is the result from the temperature calculation above
    • P(after) = desired value, in Pa
    • T(before) = temperature of fuel mix in the furnace before ignition
    • T(after) = the chosen value used in the temperature calculation above

Diluting the fuel inside the furnace

Mixing gas is temperature sensitive. This is because pressure is used as an indirect measure of the amount of mols (n=PV/(RT)). But when the temperatures are different, this is no longer the case. It is however possible to get around this issue with a bit of math.

Same temperature of fuel and dilutant

  • First add the fuel to an empty furnace
    • fuel pressure in furnace = ratio(fuel) * P(before)
  • Then add the dilutant via the exhaust pipe until the pressure inside the furnace reaches P(before) (if the fuel pipe is re-used, the remaining fuel must first be removed before introducing the dilutant)

Different temperature of fuel and dilutant

  • temperature in Kelvin
  • Thermal energy of gas mix per mol = sum(temperature (before mixing) * specific heat (each gas) * mol ratio (after mixing for each gas))
  • specific heat of gas mix per mol = sum(specific heat (each gas) * mol ratio (after mixing for each gas))
  • Temperature after mixing = Thermal energy of gas mix per mol / specific heat of gas mix per mol
  • Calculate ratio(fuel) and P(before) based on Temperature after mixing
  • When adding the fuel, the temperature difference must be compensated for
    • fuel pressure in furnace = ratio(fuel) * P(before) * T(fuel) / (Temperature after mixing)
  • Add dilutant through the exhaust pipe until the furnace pressure reaches P(before)
  • The furnace temperature should now be the same as the calculated Temperature after mixing, unless there was warming or cooling of the gases during the mixing process

Double-checking the fuel-dilutant mix

Use the tablet with the amtospherics cartridge and compare the measured mol% with one of the following equations. If neither O2 nor H2 is used as dilutant, they will both give the same result.

  • When O2 is in excess
    • ratio(H2) = ratio(fuel)*2/3
  • When H2 is in excess
    • ratio(O2) = ratio(fuel)/3


Example calculation

It's a warm and sunny day on Europa and a stationeer wants to make some invar. The desired temperature and pressure will be chosen as be the upper limit for invar, so 1500K and 20MPa. Adding ore to the furnace will reduce its temperature and increase the amount of gas (and pressure) inside of it, but the stationeer hopes that 100g of invar will be too little to have much of an effect. The furnace is exposed to the atmosphere and will be loosing temperature and pressure fairly fast which could be an issue, but making the alloy should be quick enough. The dilutant gas will be pure O2 from the atmosphere, which has a specific heat value of 21.1. The starting temperature of the fuel and the atmosphere are both at -140°C.

  • ratio(fuel) = s*(T(after) - T(before)) / ( T(before)*(61.9/3-s) + (0.95*595000/3) - T(after)*(61.9-s) - T(after)*(0.95*181.7/3) )
    • s = specific heat of the dilutant = 21.1
    • T(after) = 1500K (this is the chosen value)
    • T(before) = -140C = 133K (temperature inside the furnace before ignition)
  • ratio(fuel) = 0.281

The necessary pressure of the pre-ignition fuel mix inside the furnace will be

  • P(before) = P(after)*T(before) / ( T(after) * (1 + ratio(fuel)*2*0.95) )
    • ratio(fuel) = 0.281
    • P(after) = 20MPa (this is the chosen value)
    • T(before) = -140C = 133K
    • T(after) = 1500K (this is the chosen value used in the temperature calculation)
  • P(before) = 1156.5kPa

Dilution calculations

  • The needed pressure of pure fuel inside the furnace will be
    • P(fuel) = ratio(fuel) * P(before) = 0.281 * 1156.6kPa = 325kPa
  • The dilutant will then be added to the furnace to reach the P(before) pressure at 1.16MPa
  • The ratio of H2 inside the furnace before ignition can be checked with the tablet, it should be
    • ratio(H2) = 0.281 * 2/3 = 0.187 = 19%

Making 100g of invar this way works. The added ores will reduce the temperature and increase the pressure a bit, pushing the pressure above 20MPa and out of the needed range. But after waiting for the pressure to drop back down, the temperature was still high enough to produce the desired alloy. Choosing 20MPa was a bit of a mistake, but luckily the alloy could be made anyway.


Experiment used to determine the amount of released energy from combustion (so it can be verified later if needed)

  1. Place a frame, build a furnace partially inside the frame, complete the frame. The furnace is now perfectly insulated and will no longer loose temperature (unless ore is added) nor explode from high pressure
  2. Add fuel (perfect 2:1 is not required) via a pipe, use over 1000 mol of O2, remove the pipe attached to the furnace
  3. Record all mol amounts and temp with a tablet (atmos cartridge), convert temp to K (add +273)
  4. Ignite furnace, record all mol amounts and temp with tablet, convert temp to K
  5. Calculate moles of combusted O2 (= moles before - moles after)
  6. Calculate the Thermal energy in the gas, before and after (Thermal energy = Temp * sum(mol of each gas * specific heat)
  7. Calculate energy released per mol of combusted O2 (= TE.after - TE.before) / moles of combusted O2)
  8. Deconstruct the furnace completely to disarm it safely, or connect a single pipe so it can burst and act as a vent
  9. Alternatively: A circuit could maybe also be used to capture the temperature and pressure at the point of ignition... before the furnace explodes (the pressure will be around 200MPa)