public GasMix RemoveGasReturn(Gas gas, float moles) { Gases[gas] -= moles; Recalculate(); return(this); }
public GasMix AddGasReturn(Gas gas, float moles) { Gases[gas] += moles; Recalculate(); return(this); }
public void AddGas(Gas gas, float moles) { Gases[gas] += moles; Recalculate(); }
/// <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(); }
public float GetMoles(Gas gas) { return(Gases[gas]); }
public float GetPressure(Gas gas) { return(Moles > 0 ? Pressure * Gases[gas] / Moles : 0); }