using System;

namespace FluidSim.Utils
{
    public static class Units
    {
        public const double mm = 1e-3;
        public const double cm = 1e-2;
        public const double inch = 0.0254;
        public const double mm2 = 1e-6;
        public const double cm2 = 1e-4;
        public const double mL = 1e-6;
        public const double L = 1e-3;
        public const double Pa = 1.0;
        public const double kPa = 1e3;
        public const double bar = 1e5;
        public const double atm = 101325.0;
        public const double psi = 6894.76;
        public const double g = 1e-3;
        public const double lb = 0.453592;

        public static double Celsius(double tC) => tC + 273.15;

        public static double AreaFromRadius(double radius) =>
            Math.PI * (radius) * (radius);

        public static double AreaFromDiameter(double diameter) =>
            Math.PI * 0.25 * (diameter) * (diameter);
    }
}