Exemple #1
0
 public GasMix RemoveGasReturn(Gas gas, float moles)
 {
     Gases[gas] -= moles;
     Recalculate();
     return(this);
 }
Exemple #2
0
 public GasMix AddGasReturn(Gas gas, float moles)
 {
     Gases[gas] += moles;
     Recalculate();
     return(this);
 }
Exemple #3
0
 public void AddGas(Gas gas, float moles)
 {
     Gases[gas] += moles;
     Recalculate();
 }
Exemple #4
0
 /// <summary>
 /// Set the moles value of a gas inside of a GasMix.
 /// </summary>
 /// <param name="gas">The gas you want to set.</param>
 /// <param name="moles">The amount to set the gas.</param>
 public void SetGas(Gas gas, float moles)
 {
     Gases[gas] = moles;
     Recalculate();
 }
Exemple #5
0
 public float GetMoles(Gas gas)
 {
     return(Gases[gas]);
 }
Exemple #6
0
 public float GetPressure(Gas gas)
 {
     return(Moles > 0 ? Pressure * Gases[gas] / Moles : 0);
 }