Pressure regulators will now be able to transfer gas into a vacuum (#10595)

This commit is contained in:
mikomyazaki
2020-11-19 22:44:58 +00:00
committed by GitHub
parent 381dc4bd95
commit 830fcd344b
2 changed files with 42 additions and 1 deletions
@@ -79,7 +79,7 @@
//Figure out how much gas to transfer to meet the target pressure.
switch (regulate_mode)
if (REGULATE_INPUT)
transfer_moles = min(transfer_moles, calculate_transfer_moles(air2, air1, pressure_delta, (network1)? network1.volume : 0))
transfer_moles = min(transfer_moles, air1.total_moles*(pressure_delta/input_starting_pressure))
if (REGULATE_OUTPUT)
transfer_moles = min(transfer_moles, calculate_transfer_moles(air1, air2, pressure_delta, (network2)? network2.volume : 0))