Exemplo n.º 1
0
        private bool ParseMagneticSusceptibility(string s, Qualities q)
        {
            s = StringEx.RemoveReferences(s);
            double d;

            if (DoubleValue.TryParseScientific(s, out d))
            {
                q.MagneticSusceptibility = new UnitValue(d, "cm3/mol");
                return(true);
            }
            return(false);
        }
Exemplo n.º 2
0
        private bool ParseThermalConductivity(string s, Qualities q)
        {
            const string   UNIT = "W/(m·K)", EST = "est.";
            ValueQualifier vq = ValueQualifier.None;

            if (s.StartsWith(EST))
            {
                vq = ValueQualifier.Estimated;
                s  = s.Substring(EST.Length).Trim();
            }
            int n = s.IndexOf(UNIT);

            if (n > 0)
            {
                s = s.Substring(0, n - 1).Trim();
                double d;
                if (DoubleValue.TryParseScientific(s, out d) || UnitValue.TryParse(s, out d))
                {
                    q.ThermalConductivity = new UnitValue(d, UNIT, vq);
                    return(true);
                }
            }
            return(false);
        }