using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Converters
{
    public static class Convertion
    {
        #region Pressures
        #region Convert mbar
        /// <summary>
        /// Converts pressure in mbar to pressure in Torr
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Pressure_mbar_to_Torr(double value)
        {
            return (value * 0.75006375541921);
        }

        /// <summary>
        /// Converts pressure in mbar to pressure in Pascal
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Pressure_mbar_to_Pascal(double value)
        {
            return (value * 100);
        }
        /// <summary>
        /// Converts pressure in mbar to pressure in mTorr
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Pressure_mbar_to_mTorr(double value)
        {
            return (value * 750);
        }
        #endregion
        #region Convert Torr
        /// <summary>
        /// Converts pressure in Torr to pressure in mbar
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Pressure_Torr_to_mbar(double value)
        {
            return (value * 1.33322);
        }
        /// <summary>
        /// Converts pressure in Torr to pressure in Pascal
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Pressure_Torr_to_Pascal(double value)
        {
            return (value * 133.322368);
        }
        /// <summary>
        /// Converts pressure in Torr to pressure in mTorr
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Pressure_Torr_to_mTorr(double value)
        {
            return (value * 1000);
        }
        #endregion
        #region Convert Pascal
        /// <summary>
        /// Converts pressure in Pascal to pressure in mbar
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Pressure_Pascal_to_mbar(double value)
        {
            return (value * 0.01);
        }
        /// <summary>
        /// Converts pressure in Pascal to pressure in Torr
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Pressure_Pascal_to_Torr(double value)
        {
            return (value * 0.00750061683);
        }
        /// <summary>
        /// Converts pressure in Pascal to pressure in mTorr
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Pressure_Pascal_to_mTorr(double value)
        {
            return (value * 7.5);
        }
        #endregion
        #region Convert mTorr
        /// <summary>
        /// Converts pressure in mTorr to pressure in mbar
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Pressure_mTorr_to_mbar(double value)
        {
            return (value * 0.0013);
        }
        /// <summary>
        /// Converts pressure in mTorr to pressure in Torr
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Pressure_mTorr_to_Torr(double value)
        {
            return (value * 0.001);
        }
        /// <summary>
        /// Converts pressure in mTorr to pressure in Pascal
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Pressure_mTorr_to_Pascal(double value)
        {
            return (value * 0.13);
        }
        #endregion
        #region Convert uTorr
        /// <summary>
        /// Converts pressure in mTorr to pressure in mbar
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Pressure_uTorr_to_mbar(double value)
        {
            return (value * 0.0000013);
        }
        /// <summary>
        /// Converts pressure in mTorr to pressure in Torr
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Pressure_uTorr_to_Torr(double value)
        {
            return (value * 0.000001);
        }
        /// <summary>
        /// Converts pressure in mTorr to pressure in Pascal
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Pressure_uTorr_to_Pascal(double value)
        {
            return (value * 0.00013);
        }
        #endregion
        #endregion

        #region Leakrates
        #region Convert mbar
        /// <summary>
        /// Converts leakrate in mbar l/s to leakrate in atm cc/s
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Leak_mbar_to_ATM(double value)
        {
            return value;
        }
        /// <summary>
        /// Converts leakrate in mbar l/s to leakrate in Pascal m3/s
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Leak_mbar_to_Pascal(double value)
        {
            return (value * 0.1);
        }
        /// <summary>
        /// Converts leakrate in mbar l/s to leakrate in Torr l/s
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Leak_mbar_to_Torr(double value)
        {
            return (value * 0.76);
        }
        /// <summary>
        /// Converts leakrate in mbar to leakrate in cubic feet per year
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Leak_mbar_to_Cubicyear(double value)
        {
            return 0;
        }
        #endregion
        #region convert ATM
        /// <summary>
        /// Converts leakrate in atm cc/s to leakrate mbar l/s
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Leak_ATM_to_mbar(double value)
        {
            return value;
        }
        /// <summary>
        /// Converts leakrate in atm cc/s to leakrate Pascal m3/s
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Leak_ATM_to_Pascal(double value)
        {
            return (value * 0.1);
        }
        /// <summary>
        /// Converts leakrate in atm cc/s to leakrate Torr l/s
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Leak_ATM_to_Torr(double value)
        {
            return (value * 0.76);
        }
        /// <summary>
        /// Converts leakrate in atm cc/s to leakrate cubic feet per year
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Leak_ATM_to_Cubicyear(double value)
        {
            return 0;
        }
        #endregion
        #region Covnert Pascal
        /// <summary>
        /// Converts leakrate in Pascal m3/s to leakrate in mbar l/s
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Leak_Pascal_to_mbar(double value)
        {
            return (value * 10);
        }
        /// <summary>
        /// Converts leakrate in Pascal m3/s to leakrate in Torr l/s
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Leak_Pascal_to_Torr(double value)
        {
            return (value * 7.5);
        }
        /// <summary>
        /// Converts leakrate in Pascal m3/s to leakrate in atm cc/s
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Leak_Pascal_to_ATM(double value)
        {
            return (value * 10);
        }
        /// <summary>
        /// Converts leakrate in Pascal m3/s to leakrate in cubic feet per year
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Leak_Pascal_to_Cubicyear(double value)
        {
            return 0;
        }
        #endregion
        #region Convert Torr
        /// <summary>
        /// Converts leakrate in Torr l/s to leakrate in mbar l/s
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Leak_Torr_to_mbar(double value)
        {
            return (value * 1.3);
        }
        /// <summary>
        /// Converts leakrate in Torr l/s to leakrate in Pascal m3/s
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Leak_Torr_to_Pascal(double value)
        {
            return (value * 0.13);
        }
        /// <summary>
        /// Converts leakrate in Torr l/s to leakrate in atm cc/s
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Leak_Torr_to_ATM(double value)
        {
            return (value * 1.3);
        }
        /// <summary>
        /// Converts leakrate in Torr l/s to leakrate in cubic feet per year
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static double Leak_Torr_to_Cubicyear(double value)
        {
            return 0;
        }

        #endregion
        #region Convert Cubicft/year
        public static double Leak_Cubicyear_to_mbar(double value)
        {
            return 0;
        }
        public static double Leak_Cubicyear_to_ATM(double value)
        {
            return 0;
        }
        public static double Leak_Cubicyear_to_Pascal(double value)
        {
            return 0;
        }
        public static double Leak_Cubicyear_to_Torr(double value)
        {
            return 0;
        }
        #endregion
        #endregion
    }
}
