PyGamLab package

Submodules

PyGamLab.Constants module

@author: Ali Pilehvar Meibody (Alipilehvar1999@gmail.com)

@Director of Gamlab: Professor M. Naderi (Mnaderi@aut.ac.ir)

@Graphene Advanced Material Laboratory: https://www.GamLab.Aut.ac.ir

class PyGamLab.Constants.Ag_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Al_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Ar_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.As_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Au_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.B_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Ba_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Be_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Bi_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Br_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.C_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Ca_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Cd_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Ce_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Cl_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Co_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Cr_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Cs_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Cu_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Dy_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Element(symbol, atomic_number, atomic_mass, density, melting_point, electronegativity, thermal_conductivity, electrical_conductivity, atomic_radius)[source]

Bases: object

A class representing a chemical element with key physical and atomic properties.

Attributes: - symbol (str): The chemical symbol of the element (e.g., “H” for Hydrogen). - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Er_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Eu_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.F_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Fe_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Ga_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Gd_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Ge_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.H_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.He_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Hf_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Hg_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Ho_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.I_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.In_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Ir_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.K_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Kr_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.La_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Li_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Lu_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Mg_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Mn_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Mo_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.N_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Na_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Nb_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Nd_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Ne_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Ni_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.O_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Os_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.P_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Pb_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Pd_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Pm_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Pr_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Pt_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Rb_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Re_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Rh_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Ru_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.S_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Sb_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Sc_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Se_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Si_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Sm_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Sn_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Sr_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Ta_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Tb_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Tc_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Ti_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Tl_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Tm_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.V_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.W_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Xe_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Y_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Yb_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Zn_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

class PyGamLab.Constants.Zr_Type[source]

Bases: Element

Attributes: - symbol (str): The chemical symbol of the element. - atomic_number (int): The number of protons in the element’s nucleus. - atomic_mass (float): The atomic mass in unified atomic mass units (u). - density (float): The density of the element in g/cm³. - melting_point (float): The melting point of the element in Kelvin (K). - electronegativity (float): The electronegativity of the element, a measure of its ability to attract electrons. - thermal_conductivity (float): The thermal conductivity in W/(m·K). - electrical_conductivity (float): The electrical conductivity in MS/m. - atomic_radius (float): The atomic radius in picometers (pm).

PyGamLab.Constants.electrical_conductivity = {'Ag': 62.1, 'Al': 37.7, 'As': 0.8, 'Au': 45.2, 'B': 0.0001, 'Ba': 3.7, 'Be': 25, 'Bi': 0.77, 'Br': 1e-11, 'C': 1e-05, 'Ca': 29.8, 'Cd': 13, 'Ce': 1.4, 'Co': 17.1, 'Cr': 7.9, 'Cs': 5.5, 'Cu': 59.6, 'Dy': 1.1, 'Er': 1.1, 'Fe': 10, 'Ga': 7.1, 'Gd': 1.0, 'Ge': 2.0, 'Hf': 3.1, 'Hg': 10.4, 'Ho': 1.2, 'I': 1e-10, 'In': 11.5, 'Ir': 18.7, 'K': 14, 'La': 1.7, 'Li': 10.7, 'Lu': 2.2, 'Mg': 22.7, 'Mn': 0.62, 'Mo': 18.7, 'Na': 21, 'Nb': 6.7, 'Nd': 1.1, 'Ni': 14.3, 'Os': 10.6, 'P': 1e-09, 'Pb': 4.55, 'Pd': 9.5, 'Pt': 9.43, 'Rb': 7.9, 'Re': 5.6, 'Rh': 22.8, 'Ru': 14.1, 'S': 5e-13, 'Sb': 2.5, 'Sc': 18.4, 'Se': 1e-09, 'Si': 0.000156, 'Sm': 1.2, 'Sn': 8.7, 'Sr': 7.7, 'Ta': 7.9, 'Tb': 0.85, 'Tc': 5.8, 'Te': 0.5, 'Ti': 2.38, 'Tl': 5.8, 'Tm': 1.1, 'U': 3.57, 'V': 5, 'W': 18.2, 'Y': 7.1, 'Yb': 3.5, 'Zn': 16.6, 'Zr': 2.4}

The Element class is a Python class used to represent the properties of a chemical element. It holds attributes for various properties that define each element in terms of its atomic structure, physical properties, and electrical behavior. The class is initialized with the following parameters:

Parameters:

symbol: (str) The chemical symbol of the element (e.g., “H” for Hydrogen, “O” for Oxygen). atomic_number: (int) The atomic number of the element, which represents the number of protons in the nucleus of an atom. atomic_mass: (float) The atomic mass of the element, typically given in unified atomic mass units (u). density: (float) The density of the element, given in grams per cubic centimeter (g/cm³). melting_point: (float) The temperature at which the element changes from a solid to a liquid, given in Kelvin (K). electronegativity: (float) The electronegativity of the element, which measures the ability of an atom to attract electrons towards itself when it forms a bond. thermal_conductivity: (float) The ability of the element to conduct heat, expressed in watts per meter per Kelvin (W/(m·K)). electrical_conductivity: (float) The ability of the element to conduct electricity, given in MegaSiemens per meter (MS/m). atomic_radius: (float) The average distance from the nucleus to the outermost electron shell of the atom, measured in picometers (pm). Methods:

__repr__: This method defines a string representation for the element object, which is useful when inspecting or printing the object. It provides a readable format for displaying the properties of the element.

PyGamLab.Convertors module

@author: Ali Pilehvar Meibody (Alipilehvar1999@gmail.com)

@Director of Gamlab: Professor M. Naderi (Mnaderi@aut.ac.ir)

@Graphene Advanced Material Laboratory: https://www.GamLab.Aut.ac.ir

@Co-authors:

PyGamLab.Convertors.Angstrom_To_Meter(A)[source]

Convert the given value in angstroms to meters.

Parameters:

A (float) – The value in angstroms to be converted.

Returns:

The equivalent value in meters.

Return type:

float

PyGamLab.Convertors.Angstrom_To_Micrometer(A)[source]

Convert the given value in angstroms to micrometers.

Parameters:

A (float) – The value in angstroms to be converted.

Returns:

The equivalent value in micrometers.

Return type:

float

PyGamLab.Convertors.Angstrom_To_Millimeter(A)[source]

Convert the given value in angstroms to millimeters.

Parameters:

A (float) – The value in angstroms to be converted.

Returns:

The equivalent value in millimeters.

Return type:

float

PyGamLab.Convertors.Angstrom_To_Nanometer(Angstrom_value)[source]

This function converts Angstroms to Nanometers.

Parameters:

Angstrom_value (int or Float) – Value in angstroms (Å).

Returns:

Nanometer_value – Equivalent value in Nanometers (nm).

Return type:

int or Float

PyGamLab.Convertors.Annual_To_Monthly_Loss(annual_loss)[source]
Parameters:

annual_loss (int) – the annual loss of an Economic enterprise.

Returns:

the monthly loss of an Economic enterprise.

PyGamLab.Convertors.Atmosphere_To_Pascal(atm)[source]

Convert the given value in atmospheres to pascals.

Parameters:

atm (float) – The value in atmospheres to be converted.

Returns:

The equivalent value in pascals.

Return type:

float

PyGamLab.Convertors.Bar_To_Pascal(bar)[source]

Converts bar to pascal.

Parameters:

bar (float) – bar.

Returns:

Pa – pascal

Return type:

float

PyGamLab.Convertors.Brinell_To_Rockwell(hb)[source]

convert Brinell hardness (HB) to Rockwell hardness (HRB)

Parameters:
  • hb (float) – hardness in Brinell scale.

  • float (Returns)

PyGamLab.Convertors.Byte_To_Kilobyte(b)[source]

Convert the given value in bytes to kilobytes.

Parameters:

b (int) – The value in bytes to be converted.

Returns:

The equivalent value in kilobytes.

Return type:

float

PyGamLab.Convertors.CC_per_Second_To_Liter_per_Minute_Welding_Gas_Flow_Rate_Converter(CC_per_Second)[source]

This function converts the Welding Gas Flow Rate from CC per Second to Liter per Minute.

Parameters:

CC_per_Second (float) – CC_per_Second is a unit for gas flow rate in welding.

Return type:

Liter_per_Minute is a unit for gas flow rate in welding.

PyGamLab.Convertors.Calories_To_Joules(cal)[source]
Parameters:

cal (float) – Calories.

Returns:

J – Converts calories to joules.

Return type:

float

PyGamLab.Convertors.Celcius_To_Kelvin(Celcius)[source]

Convert the given temperature in Celsius to Kelvin.

Parameters:

Celcius (float) – The temperature in Celsius to be converted.

Returns:

The equivalent temperature in Kelvin.

Return type:

float

Notes

The temperature in Celsius is offset by 273.15 to convert to Kelvin.

PyGamLab.Convertors.Centigrade_To_Fahrenheit(C)[source]

Convert the given temperature in Celsius (Centigrade) to Fahrenheit.

Parameters:

C (float) – The temperature in Celsius to be converted.

Returns:

The equivalent temperature in Fahrenheit.

Return type:

float

PyGamLab.Convertors.Centimeter_per_Minute_To_Meter_per_Hour_Welding_Speed_Converter(Centimeter_per_Minute)[source]

This function converts the Welding Speed from Centimeter per Minute to Meter per Hour.

Parameters:

Centimeter_per_Minute (float) – Centimeter_per_Minute is a unit for welding speed.

Return type:

Meter_per_Hour is a unit for welding speed.

PyGamLab.Convertors.CmHg_To_Pascal(P1)[source]

Convert the given pressure in centimeters of mercury to pascals.

Parameters:

P1 (float) – The pressure in centimeters of mercury to be converted.

Returns:

The equivalent pressure in pascals.

Return type:

float

PyGamLab.Convertors.Coulomb_To_Electron_volt(coulomb)[source]

Convert the given value in coulombs to electron volts.

Parameters:

coulomb (float) – The value in coulombs to be converted.

Returns:

The equivalent value in electron volts.

Return type:

float

Notes

1 coulomb = 6.24e18 electron volts.

PyGamLab.Convertors.Cubic_Meter_To_Liter(number_in_Cubic_Meter)[source]

This function converts cubic meters to liters.

Parameters:
  • number_in_Cubic_Meter (int or float) – Number per cubic meter unit.

  • Liter (int or float) – Number per liter unit.

PyGamLab.Convertors.Current_density_To_mpy(Current_density, density, masschange, valency)[source]
Current_densityfloat

Current density .(microA/cm2)

densityfloat

Material Density (g/cm3).

masschangefloat

amount of matter already corroded (g)

valencyintiger

How positive is the charge of the Material

corrosion rate in mpy

PyGamLab.Convertors.Decimal_To_Binary(Num_dec)[source]

Converts a decimal number to its binary representation.

Parameters:

Num_dec (int) – The decimal number to convert.

Returns:

The binary representation of the decimal number.

Return type:

int

PyGamLab.Convertors.Degree_To_Radian(deg)[source]

Converts values of angle from degree to radian.

Parameters:

deg (float) – The angle value in degrees.

Returns:

The angle value in radians.

Return type:

float

PyGamLab.Convertors.Electron_volt_To_Coulomb(electron_volt)[source]

Converts energy value from electronvolts to coulombs (assuming it refers to charge equivalent). Note: This conversion is based on the elementary charge.

Parameters:

electron_volt (float) – The energy value in electronvolts.

Returns:

The equivalent charge value in coulombs.

Return type:

float

PyGamLab.Convertors.Electronvolt_To_Joule(e_v)[source]

Converts energy value from electronvolts to joules.

Parameters:

e_v (float) – The energy value in electronvolts.

Returns:

The energy value in joules.

Return type:

float

PyGamLab.Convertors.Fabric_GSM_to_GLM(Fabric_Weight, Fabric_Width)[source]

This function converts fabric weight in GSM unit to GLM unit.

Fabric_Weightint or float

fabric weight per GSM.

Fabric_Widthint or float

width of fabric per inches.

Fabric_GLMint or float

Result.

PyGamLab.Convertors.Fahrenheit_To_Centigrade(F)[source]

Converts a temperature value from Fahrenheit to Centigrade (Celsius).

Parameters:

F (float) – The temperature value in Fahrenheit.

Returns:

The temperature value in Centigrade (Celsius).

Return type:

float

PyGamLab.Convertors.Foot_Pound_To_Newton(Foot_Pounds)[source]

# This Conventor convert ft-lbs to Nm

Parameters:
  • Foot_Pound (a unit of torque equal to the force of 1 lb acting perpendicularly to)

  • foot.(ft-lbs) (an axis of rotation at a distance of 1)

Returns:

Newton_Meters

Return type:

The newton-metre is the unit of torque.(Nm)

PyGamLab.Convertors.Foot_To_Mile(ft)[source]

Converts a length value from feet to miles.

Parameters:

ft (float) – The length value in feet.

Returns:

The length value in miles.

Return type:

float

PyGamLab.Convertors.Force_CGS_To_SI(Force_in_CGS)[source]
Parameters:

Force_In_CGS (float) – give your force value in CGS system.

Returns:

SI – return your force value in SI system.

Return type:

float

PyGamLab.Convertors.Force_SI_To_CGS(Force_in_SI)[source]
Parameters:

Force_in_SI (float) – give your force value in SI system.

Returns:

CGS – return your force value in CGS system.

Return type:

float

PyGamLab.Convertors.Gram_To_Mole(g, MW)[source]

This function calaculates the eqivalent amount of substance of a compound in mole(s) base on mass in gram(s).

Parameters:
  • g (float) – g is the mass of a compound in gram(s).

  • MW (float) – MW is the Molecular weight of a compound (gram/mol).

Returns:

Mole – Mole is the eqivalent amount of substance of a compound in mole(s).

Return type:

float

PyGamLab.Convertors.Hertz_To_Rpm(a, /)[source]

A converter machine to convert frequency in Hertz(Hz) to frequency in rpm. :type a: :param a: frequency, Hertz(Hz). :type a: int or float :param Returns: :param b: :type b: int or float :param frequency: :param revolution per minute (rpm):

PyGamLab.Convertors.Horsepower_To_Watt(Horsepower)[source]
Parameters:

Horsepower (float) – give number in horsepower.

Returns:

watt – return your number in watt.

Return type:

float

PyGamLab.Convertors.Hour_To_Sec(t)[source]

Converts a time value from hours to seconds.

Parameters:

t (float) – The time value in hours.

Returns:

The time value in seconds.

Return type:

float

PyGamLab.Convertors.Inch_To_Centimeter(Inch)[source]
Parameters:

Inch (float or int) – ne inch is equal to 2.54 centimeters. number per Inch unit.

Returns:

Centimeter – number per Centimeter unit.

Return type:

float

PyGamLab.Convertors.Inch_To_Meter(In)[source]

Converts a length value from inches to meters.

Parameters:

In (float) – The length value in inches.

Returns:

The length value in meters.

Return type:

float

PyGamLab.Convertors.Joules_Per_Minute_To_Kilowatt(Joules_Per_Minute)[source]
Parameters:

Joules_Per_Minute (float) – number per Joules unit.

Returns:

Kilowatt – number per Kilowatt unit.

Return type:

float

PyGamLab.Convertors.Joules_To_Calories(J)[source]
Parameters:

J (float) – Joules.

Returns:

cal – Converts joules to calories.

Return type:

float

PyGamLab.Convertors.Kelvin_to_Celcius(Kelvin)[source]

This function is used to convert Kelvin to Celsius. The temperature in Celsius is different from the temperature in Kelvin by 273.15.

Parameters:

Kelvin (float) – The temperature value in Kelvin.

Returns:

The temperature value in Celsius.

Return type:

float

PyGamLab.Convertors.Kg_To_Lbm(Kg)[source]

Converts a mass value from kilograms to pounds (lbm).

Parameters:

Kg (float) – The mass value in kilograms.

Returns:

The mass value in pounds (lbm).

Return type:

float

PyGamLab.Convertors.Kg_To_Ton(Kg)[source]

Converts a mass value from kilograms to metric tons.

Parameters:

Kg (float) – The mass value in kilograms.

Returns:

The mass value in metric tons.

Return type:

float

PyGamLab.Convertors.KiloMeter_To_LightYear(km)[source]

Converts a distance value from kilometers to light-years.

Parameters:

km (float) – The distance value in kilometers.

Returns:

The distance value in light-years.

Return type:

float

PyGamLab.Convertors.Kilobyte_To_Byte(kb)[source]

Converts a data size value from kilobytes to bytes.

Parameters:

kb (float) – The data size value in kilobytes.

Returns:

The data size value in bytes.

Return type:

float

PyGamLab.Convertors.Kilogeram_Per_Cubic_Meter_To_Pounds_Per_Cubic_Inch(KgPerCubicMeter)[source]

Converts a density value from kilograms per cubic meter to pounds per cubic inch.

Parameters:

KgPerCubicMeter (float) – The density value in kilograms per cubic meter.

Returns:

The density value in pounds per cubic inch.

Return type:

float

PyGamLab.Convertors.Kilogram_To_Pound(number_in_kilogram)[source]

This function converts the desired number from kilograms to pounds.

Parameters:

number_in_kilogram (int) – Number per kilogram.

Returns:

pound – Number per pound.

Return type:

int

PyGamLab.Convertors.Kilometer_Per_Hour_To_Meter_Per_Second(kph)[source]

Converts a speed value from kilometers per hour to meters per second.

Parameters:

kph (float) – The speed value in kilometers per hour.

Returns:

The speed value in meters per second.

Return type:

float

PyGamLab.Convertors.Kmph_To_Mps(V1)[source]

This function is used to convert kilometers per hour to meters per second.

Parameters:

V1 (float) – The speed value in kilometers per hour.

Returns:

The speed value in meters per second.

Return type:

float

PyGamLab.Convertors.Lbm_To_Kg(Lbm)[source]

Converts a mass value from pounds (lbm) to kilograms.

Parameters:

Lbm (float) – The mass value in pounds (lbm).

Returns:

The mass value in kilograms.

Return type:

float

PyGamLab.Convertors.LightYear_To_KiloMeter(ly)[source]

Converts a distance value from light-years to kilometers.

Parameters:

ly (float) – The distance value in light-years.

Returns:

The distance value in kilometers.

Return type:

float

PyGamLab.Convertors.Liter_To_Cubic_Meter(number_in_Liter)[source]

This function converts liters to cubic meters.

Parameters:
  • number_in_Liter (int or float) – Number per liter unit.

  • Cubic_Meter (int or float) – Number per cubic meter unit.

PyGamLab.Convertors.Liter_per_Minute_To_CC_per_Second_Welding_Gas_Flow_Rate_Converter(Liter_per_Minute)[source]

This function converts the Welding Gas Flow Rate from Liter per Minute to CC per Second.

Parameters:

Liter_per_Minute (float) – Liter_per_Minute is a unit for gas flow rate in welding.

Return type:

CC_per_Second is a unit for gas flow rate in welding.

PyGamLab.Convertors.Mass_To_Mole(Mass, Molar_Mass)[source]
Parameters:
  • Mass (float) – The mass of substance(g).

  • Molar_Mass (float) – The mass of one mole of substance (g/mol).

Returns:

Mole

Return type:

int

PyGamLab.Convertors.Megapascal_To_Pascal(Megapascal)[source]

#This Conventor Convert Megapascal to Pascal

Parameters:

Megapascal (1 Megapascal equals 1,000,000 Pascals.)

Returns:

Pascal

Return type:

the unit of pressure or stress in SI.

PyGamLab.Convertors.Meter_Per_Second_To_Kilometer_Per_Hour(mps)[source]
Parameters:
  • mps (float) – number in meter per second

  • kph (float) – number in kilometer per hour

PyGamLab.Convertors.Meter_To_Angstrom(m)[source]

Converts a length value from meters to Angstroms.

Parameters:

m (float) – The length value in meters.

Returns:

The length value in Angstroms.

Return type:

float

PyGamLab.Convertors.Meter_To_MilliMeter(meter)[source]
Parameters:

meter (int) – enter the length in meter.

Returns:

milimeter – This function converts meter into milimeter.

Return type:

int

PyGamLab.Convertors.Meter_To_inch(m)[source]

Converts a length value from meters to inches.

Parameters:

m (float) – The length value in meters.

Returns:

The length value in inches.

Return type:

float

PyGamLab.Convertors.Meter_per_Hour_To_Centimeter_per_Minute_Welding_Speed_Converter(Meter_per_Hour)[source]

This function converts the Welding Speed from Meter per Hour to Centimeter per Minute.

Parameters:

Meter_per_Hour (float) – Meter_per_Hour is a unit for welding speed.

Return type:

Centimeter_per_Minute is a unit for welding speed.

PyGamLab.Convertors.Micrometer_To_Angstrom(um)[source]

Converts a length value from micrometers to Angstroms.

Parameters:

um (float) – The length value in micrometers.

Returns:

The length value in Angstroms.

Return type:

float

PyGamLab.Convertors.Micrometer_To_Nanometer(micrometer)[source]

converting micrometer to nanometer

Parameters:

micrometer (float,dimension) – DESCRIPTION. The default is 1.

Returns:

Nanometer – unit(nm)

Return type:

float,dimension

PyGamLab.Convertors.Mile_To_Foot(mi)[source]

Converts a length value from miles to feet.

Parameters:

mi (float) – The length value in miles.

Returns:

The length value in feet.

Return type:

float

PyGamLab.Convertors.Milimeter_To_Angstrom(mm)[source]

Converts a length value from millimeters to Angstroms.

Parameters:

mm (float) – The length value in millimeters.

Returns:

The length value in Angstroms.

Return type:

float

PyGamLab.Convertors.Miller_To_Millerbrove(u, v, w)[source]

this function converts miller index to miller_brove index

1. u: int Intersection with axis a1

2. v: int Intersection with axis a2

3. w: int Intersection with axis z

Returns –> (miller_brove indexes)

1. l: int Intersection with axis a1

2. m: int Intersection with axis a2

3. n: int Intersection with axis a3

4. o: int Intersection with axis z

PyGamLab.Convertors.Millerbrove_To_Miller(l, m, n, o)[source]

this function converts miller_brove index to miller index

Parameters: (miller_brove indexes)

  1. l: int

Intersection with axis a1

2. m: int Intersection with axis a2

3. n: int Intersection with axis a3

4. o: int Intersection with axis z

Returns –> (miller indexes)

1. u: int Intersection with axis a1

2. v: int Intersection with axis a2

3. w: int Intersection with axis z

PyGamLab.Convertors.MilliMeter_To_Meter(milimeter)[source]
Parameters:

milimeter (int) – enter the length in milimeter.

Returns:

meter – This function converts milimeter into meter.

Return type:

int

PyGamLab.Convertors.Mils_year_To_Mm_year(mpy)[source]

Converts a corrosion rate from mils per year (mpy) to millimeters per year (mm/yr). 1 mm/yr = 39.37 mpy

Parameters:

mpy (float) – The corrosion rate in mils per year.

Returns:

The corrosion rate in millimeters per year.

Return type:

float

PyGamLab.Convertors.Minute_To_Second(Minute)[source]

This function converts minutes to seconds

Parameters:
  • Minute (int) – units of time in minute

  • Returns

  • int – Minute_to_Second

PyGamLab.Convertors.Mm_year_To_Mils_year(milpy)[source]

Converts a corrosion rate from millimeters per year (mm/yr) to mils per year (mpy). 1 mm/yr = 39.37 mpy

Parameters:

milpy (float) – The corrosion rate in millimeters per year.

Returns:

The corrosion rate in mils per year.

Return type:

float

PyGamLab.Convertors.Molarity_To_Normality(Molarity, n)[source]
Parameters:
  • Molarity (float)

  • n (int) – Number of moles.

Return type:

Normality.

PyGamLab.Convertors.Mole_To_Gram(mol, MW)[source]

This function calaculates the eqivalent mass of a compound in gram(s) base on amount of substance in mole(s).

Parameters:
  • mol (float) – mol is the eqivalent amount of substance of a compound in mole(s).

  • MW (float) – MW is the Molecular weight of a compound (gram/mole).

Returns:

g – g is the eqivalent mass in of a compound in in gram(s).

Return type:

float

PyGamLab.Convertors.Mole_To_Mass(Mole, Molar_Mass)[source]
Parameters:
  • Mole (int)

  • Molar_Mass (float) – The mass of one mole of substance (g/mol).

Returns:

Mass (g)

Return type:

Float.

PyGamLab.Convertors.Mpa_To_Psi(Num_Mpa, /)[source]
Parameters:

Num_Mpa (float) – Megapascals=Newton per square millimetre

Returns:

Psi – Psi=Pounds force per square inch

Return type:

float

PyGamLab.Convertors.Mps_To_Kmph(V1)[source]

This function is used to convert meter per second to kilometer per hour.

Parameters:

V1 (float) – The speed value in meters per second.

Returns:

The speed value in kilometers per hour.

Return type:

float

PyGamLab.Convertors.Mpy_To_current_density(mpy, density, masschange, valency)[source]
Parameters:
  • mpy (float) – corrosion rate in mpy

  • density (float) – materails density

  • masschange (float) – amount of mass corroded

  • valency (int) – how positive is the charge

Return type:

Current density

PyGamLab.Convertors.Nanometer_To_Angstrom(Nanometer_value)[source]

This function converts Nanometers to Angstroms. 1 Nanometer(nm)= 10 Angstroms(Å)

Parameters:

Nanometer_value (int or float) – Value in Nanometers(nm).

Returns:

Angstrom_value – Equivalent value in Angstroms(Å).

Return type:

int or float

PyGamLab.Convertors.Nanometer_To_Micrometer(nanometer)[source]

converting nanometer to micrometer

Parameters:

nanometer (float,dimension) – unit (nm) DESCRIPTION. The default is 1.

Returns:

Micrometer

Return type:

float,dimension

PyGamLab.Convertors.Newton_TO_Pound_Force(Newton)[source]
PyGamLab.Convertors.Newton_To_Foot_Pound(Newton_Meters)[source]

# This Conventor convert Nm to ft-lbs

Parameters:

Newton_Meters (The newton-metre is the unit of torque.(Nm))

Returns:

  • Foot_Pound (a unit of torque equal to the force of 1 lb acting perpendicularly to)

  • an axis of rotation at a distance of 1 foot.(ft-lbs)

PyGamLab.Convertors.Normality_To_Molarity(Normality, n)[source]
Parameters:
  • Normality (float)

  • n (int) – Number of moles.

Return type:

Molarity.

PyGamLab.Convertors.Pascal_To_Atmosphere(Pa)[source]

Converts a pressure value from Pascals to atmospheres.

Parameters:

Pa (float) – The pressure value in Pascals.

Returns:

The pressure value in atmospheres.

Return type:

float

PyGamLab.Convertors.Pascal_To_Bar(Pa)[source]
Parameters:

Pa (float) – Pascal.

Returns:

bar – Converts pascal to bar.

Return type:

float

PyGamLab.Convertors.Pascal_To_CmHg(P1)[source]

This function is used to convert Pascal to centimeter mercury.

Parameters:

P1 (float) – The pressure value in Pascals.

Returns:

The pressure value in centimeters of mercury (cmHg).

Return type:

float

PyGamLab.Convertors.Pascal_To_Megapascal(Pascal)[source]

# This Conventor Convert Pascal to Megapascal

Parameters:

Pascal (the unit of pressure or stress in SI.)

Returns:

Megapascal

Return type:

1 Megapascal equals 1,000,000 Pascals.

PyGamLab.Convertors.Pascal_To_Torr(pa)[source]

This function converts Pascal to Torr.

Parameters:

pa (float) – The pressure value in Pascals.

Returns:

The pressure value in Torr.

Return type:

float

PyGamLab.Convertors.Pascal_to_mmHg(p)[source]

This function convert pascal to mmHg

Parameters:

p (float) – pressure (Pa).

Return type:

None.

PyGamLab.Convertors.Percent_To_Ppm(a)[source]

Converts a concentration value from percent to parts per million (ppm).

Parameters:

a (float) – The ion percent in brine.

Returns:

The ion concentration in ppm in brine.

Return type:

float

PyGamLab.Convertors.Percentages_To_Moles(total, percentages)[source]

Calculates the number of moles of each component in a mixture given their percentages by weight and the total weight.

Parameters:
  • total (float) – The total weight of the mixture.

  • percentages (dict) – A dictionary where keys are the names of the materials and values are their weight percentages.

Returns:

A dictionary where keys are the names of the materials and values are their corresponding number of moles.

Return type:

dict

PyGamLab.Convertors.Pound_Force_To_Newton(Pound_Force)[source]
PyGamLab.Convertors.Pound_To_Kilogram(number_in_pound)[source]

This function converts the desired number from pounds to kilograms.

Parameters:

number_in_pound (int) – Number per pound.

Returns:

kilogram – Number per kilogram.

Return type:

int

PyGamLab.Convertors.Pounds_Per_Cubic_Inch_To_Kilogeram_Per_Cubic_Meter(LbPerCubicInch)[source]

Converts a density value from pounds per cubic inch to kilograms per cubic meter.

Parameters:

LbPerCubicInch (float) – The density value in pounds per cubic inch.

Returns:

The density value in kilograms per cubic meter.

Return type:

float

PyGamLab.Convertors.Ppm_To_Percent(a)[source]

Converts a concentration value from parts per million (ppm) to percent.

Parameters:

a (float) – The ion concentration in ppm in brine.

Returns:

The ion percent in brine.

Return type:

float

PyGamLab.Convertors.Psi_To_Mpa(Num_Psi, /)[source]
Parameters:

Num_Psi (float) – Psi = Pounds force per square inch

Returns:

Mpa – Megapascals=Newton per square millimetre

Return type:

float

PyGamLab.Convertors.Radians_To_Degrees(num)[source]

This function is used to convert radians to degrees.

Parameters:

num (float) – The angle value in radians.

Returns:

The angle value in degrees.

Return type:

float

PyGamLab.Convertors.Rpm_To_Hertz(b, /)[source]
A converter machine to convert frequency in rpm to frequency in Herta(Hz).
bint or float

frequency, revolution per minute (rpm).

Returns a, frequency, Hertz(Hz)

PyGamLab.Convertors.Sec_To_Hour(t)[source]

Converts a time value from seconds to hours.

Parameters:

t (float) – The time value in seconds.

Returns:

The time value in hours.

Return type:

float

PyGamLab.Convertors.Second_To_Minute(Second)[source]
This function converts seconds to minutes

Parameters

Secondint

units of time in seconds

Returns int

Second_to_Minute

PyGamLab.Convertors.Square_Cm_To_Square_meter(a)[source]
Parameters:
  • a (int) – Square_Cm

  • -------

  • c (int) – Square_Meter

PyGamLab.Convertors.Square_Meter_To_Square_Cm(b)[source]
Parameters:
  • b (int) – Square_meter

  • -------

  • c (int) – Square_Cm

PyGamLab.Convertors.Torr_To_Pascal(torr)[source]

This function converts Torr to Pascal.

Parameters:

torr (float) – The pressure value in Torr.

Returns:

The pressure value in Pascals.

Return type:

float

PyGamLab.Convertors.Viscosity_To_Pas(poise)[source]

Converts dynamic viscosity from Poise (P) to Pascal-seconds (Pa·s).

Parameters:

poise (float) – The dynamic viscosity in Poise.

Returns:

The dynamic viscosity in Pascal-seconds.

Return type:

float

PyGamLab.Convertors.Viscosity_To_Poise(pa_s)[source]

Converts dynamic viscosity from Pascal-seconds (Pa·s) to Poise (P).

Parameters:

pa_s (float) – The dynamic viscosity in Pascal-seconds.

Returns:

The dynamic viscosity in Poise.

Return type:

float

PyGamLab.Convertors.Watt_To_Horsepower(Watt)[source]
Parameters:

Watt (float) – give number in Watt.

Returns:

Horsepower – return number in Horsepower.

Return type:

float

PyGamLab.Convertors.Weightpercent_To_ppm(num)[source]

This function is used to convert weight percent to ppm (parts per million).

Parameters:

num (float) – The concentration in weight percent.

Returns:

The concentration in ppm.

Return type:

float

PyGamLab.Convertors.Yarn_Count_Converter(Yarn_Count, Current_System='tex', Desired_System='den')[source]

This function converts yarn count values in different systems.

Parameters:
  • Yarn_Count (int or float) – Number of yarn count.

  • Current_System (str, optional) – Current yarn count system. The default is ‘tex’.

  • Desired_System (str, optional) – Expected yarn count system. The default is ‘den’.

  • Yarn_Count – Result.

PyGamLab.Functions module

@author: Ali Pilehvar Meibody (Alipilehvar1999@gmail.com)

@Director of Gamlab: Professor M. Naderi (Mnaderi@aut.ac.ir)

@Graphene Advanced Material Laboratory: https://www.GamLab.Aut.ac.ir

PyGamLab.Functions.Activation_Energy(k, k0, T)[source]

Calculates the activation energy (Ea) using the Arrhenius equation.

Parameters:
  • k (float) – The rate constant at temperature T.

  • k0 (float) – The pre-exponential factor (frequency factor).

  • T (float) – The temperature in Kelvin.

Returns:

The activation energy (Ea) in Joules per mole (J/mol).

Return type:

float

PyGamLab.Functions.Activity_Coef(wB, wC, wD, eBB, eCB, eDB)[source]
Parameters:
  • wB (float) – Weight percent of B

  • wC (float) – Weight percent of C

  • wD (float) – Weight percent of D

  • eBB (float) – Interaction coefficient of B and B

  • eCB (float) – Interaction coefficient of C and B

  • eDB (float) – Interaction coefficient of D and B

Returns:

fB – Activity coefficient of B

Return type:

float

PyGamLab.Functions.Aeroscope_Stress_Concentration(max_stress, nominal_stresss)[source]

Calculates the stress concentration factor.

Parameters:
  • max_stress (float) – The maximum stress experienced by the material.

  • nominal_stresss (float) – The nominal stress applied to the material.

Returns:

The stress concentration factor (K).

Return type:

float

PyGamLab.Functions.Arithmetic_Sequence(start_num, common_difference, n)[source]
An arithmetic sequence is an ordered set of numbers that have a common difference between each consecutive term.
start_numint

the first term in the sequence.

common_differenceint

the common difference between terms.

nint

number of terms.

a_n :int

the nᵗʰ term in the sequence

PyGamLab.Functions.Atomic_Packing_Factor(radius, crystal_structure)[source]
Parameters:
  • crystal_structure (Type of the crystal (Fccc , Bcc or ...))

  • (float) (radiuse)

  • Returns

  • SC (Atomic packing factor for)

  • BCC

  • FCC

PyGamLab.Functions.Atomic_Percentage(n_1, n_2, n_3, n_4, Entry, output, m_1, m_2, m_3, m_4, M_1, M_2, M_3, M_4, w_1, w_2, w_3, w_4)[source]
Parameters:
  • n_1 (float) – The number of moles of the first atom.

  • n_2 (float) – The number of moles of the second atom.

  • n_3 (float) – The number of moles of the third atom.

  • n_4 (float) – The number of moles of the fourth atom.

  • Entry (str) – what type of entery you have?

  • output (str) – The atomic percentage is based on which atom?

  • m_1 (float) – The mass of the first atom.

  • m_2 (float) – The mass of the second atom.

  • m_3 (float) – The mass of the third atom.

  • m_4 (float) – The mass of the fourth atom.

  • M_1 (float) – The atomic mass of the first atom.

  • M_2 (float) – The atomic mass of the second atom.

  • M_3 (float) – The atomic mass of the third atom.

  • M_4 (float) – The atomic mass of the fourth atom.

  • w_1 (float) – The weight percentage of the first atom.

  • w_2 (float) – The weight percentage of the second atom.

  • w_3 (float) – The weight percentage of the third atom.

  • w_4 (float) – The weight percentage of the fourth atom.

Returns:

It will return the atomic percentage based on the given inputs.

Return type:

float

PyGamLab.Functions.Austenite_Martensite_VC(C)[source]

This function calaculates the volume change of a unit cell in Austenite to Marteniste transformation.

Parameters:

C (float) – C is the percentage of carbon in chemical composition of steel.

Returns:

VC – VC is the percentage of volume change of a unit cell in Austenite to Marteniste transformation.

Return type:

float

PyGamLab.Functions.BMI_Calculation(W, H)[source]

This function calculates body mass index :type W: :param W: Weight in kilograms :type W: float :type H: :param H: height in meters :type H: float :param Returns: :param float: :param BMI_Calculation:

PyGamLab.Functions.Beer_Lambert_Law(a, l, I0)[source]

This function caclculate the output light intensity when a light pass through a material :type a: :param a: absorption coefficient. :type a: float :type l: :param l: length. :type l: float :type I0: :param I0: incomming light intensity. :type I0: float

Returns:

I – output light intensity.

Return type:

float

PyGamLab.Functions.Binomial_Probability(n, k, p)[source]
Parameters:
  • p (float) – ehtemal voghoo beyn 0ta 1

  • n (int) – tedad dafat azmayesh

  • K (int) – tedad dafaat bord

  • pishamadi(bord (return ehtemal rokh dadan pishamad dar fazaye do) – ba tedad n azmayesh va tedad k bord

  • shekast) – ba tedad n azmayesh va tedad k bord

PyGamLab.Functions.Biomaterial_Degredation_Rate(W1, W2, T)[source]

This function calculates the degradation rate of biomaterials

W1int

initial mass

W2int

final mass

Tint

time of degredation

Returns int

Biomaterial_Degredation_Rate

PyGamLab.Functions.Bouyancy_Force(d, V)[source]

Calculates the buoyant force acting on an object submerged in a fluid.

Parameters:
  • d (float) – The density of the fluid (e.g., in kg/m^3).

  • V (float) – The volume of the fluid displaced by the object (e.g., in m^3).

Returns:

The buoyant force in Newtons (N).

Return type:

float

PyGamLab.Functions.Bragg_Law(h, k, l, a, y)[source]

This function calculate the diffraction angle of a incidence wavelenght through a crytal special plate

Parameters:
  • h (int) – x direction of the plate.

  • k (int) – y direction of the plate.

  • l (int) – z direction of the plate.

  • a (float) – Unit Cell.

  • y (float) – incidence wavelenght.

PyGamLab.Functions.Brinell_Hardness_Calculation(d1, d2, D, p)[source]

this function is utilized for calculating Brinell hardness. characterizes the indentation hardness of materials through the scale of penetration of an indenter, loaded on a material test-piece. It is one of several definitions of hardness in materials science. In this method, steel ball indentor is used.

1. d1: float d1 represents diameter of impress of indentor.

2. d2 : float d2 represents diameter of impress of indentor

3. D : float diameter of indenter

3. p : int applied load

Returns –> BHN (Brinell Hardness Number)

PyGamLab.Functions.Burning_Rate(L, t)[source]

Calculates the burning rate according to the ASTM D3801 UL-94 test.

Parameters:
  • L (float) – The burning length in millimeters (mm).

  • t (float) – The burning time in seconds (sec).

Returns:

The burning rate in millimeters per minute (mm/min).

Return type:

float

PyGamLab.Functions.Calculate_ECB(chi, Ee, Eg)[source]

This function calculates the conduction band edge energy (ECB) of a semiconductor using Mulliken electronegativity theory.

Parameters:
  • chi (float) – The absolute electronegativity of the semiconductor (eV), calculated as the geometric mean of the absolute electronegativity of the constituent elements. For ZnO, chi=sqrt(chi_Zn*chi_O)=5.79 eV.

  • Ee (float) – The energy of free electrons on the standard hydrogen electrode (SHE) scale (eV). For standard scale, Ee=4.5 eV.

  • Eg (float) – The bandgap energy of the semiconductor (eV). For ZnO, Eg=3.23 eV.

Returns:

ECB – The conduction band edge energy (eV).

Return type:

float

PyGamLab.Functions.Calculate_Pipe_Heat_Transfer(mu, muW, rho, Cp, Pr, K, u, d, l, Tw, Tb1)[source]
Parameters:
  • mu (float) – Fluid dynamic viscosity (pa.s).

  • muW (float) – Dynamic viscosity at wall temperature (pa.s).

  • rho (float) – fluid density (kg/m³).

  • Cp (float) – DESCRIPTION.

  • Pr (float) – Prantel number.

  • K (flout) – Thermal conductivity(W/m.K).

  • u (float) – fluid velocity (m/s).

  • d (float) – Pipe diameter (m).

  • L (float) – Pipe length (m).

  • Tw (float) – Pipe wall temperature.

  • Tb1 (float) – Average fluid temperature().

  • Returns

  • number (Nusselt)

  • number

  • coefficient (convective heat transfer)

  • transfer (total heat)

  • temperature. (and outlet)

  • -------

  • None.

PyGamLab.Functions.Carnot_Efficiency(T_c, T_h)[source]
Parameters:
  • (float) (T_cold)

  • (float)

  • Returns

  • float (Efficiency of the cycle)

PyGamLab.Functions.Change_In_Pressure_Of_a_Mercury_OR_Water_Column_Manometer(Type_Of_Fluid, h, g=9.81)[source]

Calculates the change in pressure in Pascals (Pa) for a mercury or water column manometer.

Parameters:
  • Type_Of_Fluid (str) – The type of fluid in the manometer (‘water’ or ‘mercury’). Case-insensitive.

  • h (float) – The height difference in the manometer column in meters (m).

  • g (float, optional) – The acceleration due to gravity in meters per second squared (m/s^2). Defaults to 9.81.

Returns:

The change in pressure (Delta_P) in Pascals (Pa).

Return type:

float

Raises:

ValueError – If the Type_Of_Fluid is not ‘water’ or ‘mercury’.

PyGamLab.Functions.Circle_Area(radius)[source]
Parameters:

radius (int) – radius of circle.

Returns:

circle_area – area of circle.

Return type:

int

PyGamLab.Functions.Circle_Perimeter(radius)[source]
Parameters:

radius (int) – radius of circle.

Returns:

circle_perimeter – perimeter of circle.

Return type:

int

PyGamLab.Functions.Cohen(m, r, /)[source]

Cohen equation is used to predict the yield stress of a polymeric blend containing a rubbery dispersion phase.

mint or float

The yield stress of polymeric matrix, N/m^2 or Pa or …

rfloat

Volume fraction of rubbery phase, 0<r<1.

b : int or float The yield stress of polymeric blend, N/m^2 or Pa or …

PyGamLab.Functions.Component(a, b)[source]
alist

multi-dimensional vector

blist

multi-dimensional vector

cfloat

The component of b on a

PyGamLab.Functions.Concentration_Calculator(CA1, unit_CA1, CA2, unit_CA2, Q1, unit_Q1, Q2, unit_Q2)[source]
Parameters:
  • CA1 (float) – Concentratoion of the first flow

  • unit_CA1 (str) – Unit of concentratoion of the first flow

  • CA2 (float) – DESCRIPTION.Concentratoion of the second flow

  • unit_CA2 (str) – Unit of concentratoion of the second flow

  • Q1 (float) – Molar volume of the first flow

  • unit_Q1 (str) – Unit of molar volume of the first flow

  • Q2 (float) – Molar volume of the second flow

  • unit_Q2 (str) – Unit of molar volume of the second flow

Return type:

Flowrate and concentration of the output flow

PyGamLab.Functions.Contact_Angle(num1, num2, num3)[source]
Parameters:
  • num1 (float) – a solid and atmospher surface tenssion.

  • num2 (float) – a liquid and atmospher surface tension.

  • num3 (float) – a solid and liquid boundary tension.

  • Returns

  • degrees

PyGamLab.Functions.Convective_Heat_Transfer_Internal_Flow_Dittus_Boelter(Re, Pr, fluid_thermal_conductivity, hydraulic_diameter, delta_T, length, heating=True)[source]

Calculates the convective heat transfer rate for fully developed turbulent flow inside a smooth circular tube using the Dittus-Boelter correlation. This is a widely used empirical correlation in heat exchanger design and thermal analysis of internal flows.

Parameters:
  • Re (float) – The Reynolds number of the flow (dimensionless, Re > 10000 for turbulent flow).

  • Pr (float) – The Prandtl number of the fluid (dimensionless).

  • fluid_thermal_conductivity (float) – The thermal conductivity of the fluid (in W/(m*K)).

  • hydraulic_diameter (float) – The hydraulic diameter of the tube (in meters). For a circular tube, this is simply the inner diameter.

  • delta_T (float) – The temperature difference between the surface and the bulk fluid (in Kelvin).

  • length (float) – The length of the tube over which heat transfer occurs (in meters).

  • heating (bool, optional) – A boolean indicating whether the fluid is being heated (True) or cooled (False). This affects the exponent of the Prandtl number. Defaults to True (heating).

Returns:

The convective heat transfer rate (in Watts).

Return type:

float

PyGamLab.Functions.Convert_Gas_Constant(gas_constant, from_unit, to_unit)[source]

Converts the gas constant from one unit to another.

Parameters:
  • gas_constant (float) – The value of the gas constant in the initial unit.

  • from_unit (str) – The initial unit of the gas constant (e.g., “J/mol.K”, “cal/mol.K”, “atm.L/mol.K”, “cm^3.atm/mol.K”).

  • to_unit (str) – The desired unit for the gas constant (e.g., “J/mol.K”, “cal/mol.K”, “atm.L/mol.K”, “cm^3.atm/mol.K”).

Returns:

The converted value of the gas constant in the desired unit, or “Invalid” if the units are not recognized.

Return type:

float or str

PyGamLab.Functions.Copolymer_Type(Copolymer, Polymer_num=2)[source]

Copolymer: str Unit types are shown by charachters which are seperated by a space Example: ‘polymer_A polymer_A polymer_B polymer_A polymer_A polymer_B’

Polymer_num: int It represents the number of polymers in this structure which could be 2 or 3 default = 2

PyGamLab.Functions.Corrosion_Rate(W, D, A, t)[source]
Parameters:
  • W (int or float) – The change in weight of specimen (mg)

  • D (int or float) – The density of specimen (g/cm^3)

  • A (int or float) – The surface area of specimen (in^2)

  • t (int or float) – The time(h)

Returns:

CR – The corrosion rate (mpy)

Return type:

int or float

PyGamLab.Functions.Cost_Indicators(ac, ev)[source]

Calculates the Cost Variance (CV) and Cost Performance Index (CPI).

Parameters:
  • ac (float) – The Actual Cost of Work Performed (ACWP).

  • ev (float) – The Earned Value (EV).

Returns:

A tuple containing the Cost Variance (cv) and Cost Performance Index (cpi).

Return type:

tuple

PyGamLab.Functions.Critical_Diameter(d, r, /)[source]

This equation predicts the critical diameter of rubber particles toughening a polymeric matrix. :type d: :param d: critical distance between rubbery particles, angstrom or mm or nm or ….. :type d: int or float :type r: :param r: Volume fraction of rubbery phase, 0<r<1. :type r: float

Returns:

  • dc (int or float)

  • the critical diameter of rubber particles

PyGamLab.Functions.Crystal_Percent(H, W, H100)[source]

Calculates the percentage of crystallinity in a polymer.

Parameters:
  • H (float) – The enthalpy of the polymer in milliJoules (mJ).

  • W (float) – The weight of the polymer in milligrams (mg).

  • H100 (float) – The enthalpy for a 100% crystalline polymer in Joules per gram (J/g).

Returns:

The crystallinity of the polymer in percent (%).

Return type:

float

PyGamLab.Functions.Debye_Temperature_Heat_Capacity(T, TD)[source]

Calculates the dimensionless heat capacity according to the Debye model, a solid-state physics model that approximates the contribution of phonons (lattice vibrations) to the specific heat of a solid.

Parameters:
  • T (float) – The absolute temperature in Kelvin (K).

  • TD (float) – The Debye temperature of the material in Kelvin (K), a characteristic temperature related to the material’s lattice vibrations.

Returns:

The dimensionless heat capacity (Cv / (9 * n * k_B)), where n is the number of atoms and k_B is the Boltzmann constant. To get the actual heat capacity, this value needs to be multiplied by 9 * n * k_B.

Return type:

float

PyGamLab.Functions.Defect_Density(Beta, Theta, K=0.9, Landa=1.5406)[source]
Parameters:
  • Beta (Float) – Full width at half maximum (FWHM).

  • Theta (Float) – Bragg’s Diffraction Angle.

  • K (Float, optional) – Scherrer Constant. The default = 0.9.

  • Landa (Float, optional) – X-ray Wavelength. The default = 1.5406.

Returns:

  • D (Float) – Crystallite size (nm)

  • Delta (Float) – Density of defect for crystallite structures from XED crystallography calculated from reverse the Scherrer Equation.

PyGamLab.Functions.Degradation_Percentage(C0, Ct)[source]

This function calculates the degradation percentage of a pollutant solution in a photocatalytic process.

Parameters:
  • C0 (float) – Initial concentration of the pollutant solution (mg/L)

  • Ct (float) – Concentration of the pollutant solution at a certain time interval (mg/L)

Returns:

Percentage – The degradation percentage (%) of the pollutant solution.

Return type:

float

PyGamLab.Functions.Density(m, V)[source]

It’s the formula for obtaining density.

Parameters:

mfloat

Mass

V: float

volume

PyGamLab.Functions.Diffusion_Coefficient_Calculator(Peak_Current, A, C, Scan_Rate, n, is_reversible)[source]
Parameters:
  • Peak_Current (Float) – Peak of current (A).

  • A (Float) – Electrode area (cm**2).

  • C (Float) – Concentration of electroactive species (mol/L).

  • Scan_Rate (Float)

  • (mV/s)

  • n (int)

  • electron (number of transfered)

  • is_reversible (bool) – Type of reaction. ‘True’ is reversible, ‘False’ is irreversible

Returns:

Diffusion Coefficient calculates from Randles-Sevcik aquation. type

Return type:

float

PyGamLab.Functions.Diffusion_in_Gases(Diffusion_Type, Diffusivity, Separate_Panels_Distance, Pressure_in_Panel_A, Pressure_in_Panel_B, PressureBM, Gas_Constant, Total_Pressure=101299.99999999999)[source]

Calculates the molar flux (N_A) for diffusion in gases under different conditions.

Parameters:
  • Diffusion_Type (str) – The type of diffusion: ‘Two_way_equimolal_diffusion’ or ‘one-way_diffusion’.

  • Diffusivity (str) – A key representing the gas pair for which the diffusivity is known (e.g., ‘H2_CH4’).

  • Separate_Panels_Distance (float) – The distance between the two panels or points of measurement (in meters, m).

  • Pressure_in_Panel_A (float) – The partial pressure of component A at point 1 (in Pascals, Pa).

  • Pressure_in_Panel_B (float) – The partial pressure of component A at point 2 (in Pascals, Pa).

  • PressureBM (float) – The log mean pressure of the non-diffusing component B (in Pascals, Pa) - used for one-way diffusion.

  • Gas_Constant (float) – The ideal gas constant (in J/(mol·K)).

  • Total_Pressure (float, optional) – The total pressure of the system (in Pascals, Pa). Defaults to 1.013 * 10**5.

Returns:

The molar flux of component A (N_A) in mol/(m^2·s).

Return type:

float

PyGamLab.Functions.Diffusivity(MA, MB, T, rAB, K, εAB, f, Pt=101299.99999999999)[source]

Calculates the binary gas-phase diffusivity using a modified Chapman-Enskog equation. Note: The formula seems to have a sign issue based on typical diffusivity calculations.

Parameters:
  • MA (str) – The chemical symbol or identifier for gas A (must be a key in the ‘M’ dictionary).

  • MB (str) – The chemical symbol or identifier for gas B (must be a key in the ‘M’ dictionary).

  • T (float) – The temperature in Kelvin (K).

  • rAB (float) – The average collision diameter between molecules A and B (in Angstroms, Å).

  • K (float) – A dimensionless collision integral parameter (related to the Lennard-Jones potential).

  • εAB (float) – The Lennard-Jones energy parameter for the pair A-B (in Kelvin, K).

  • f (float) – A correction factor (dimensionless).

  • Pt (float, optional) – The total pressure in Pascals (Pa). Defaults to 1.013 * 10**5 (1 atm).

Returns:

The binary gas-phase diffusivity (DAB) in m^2/s, or “Invalid inputs” if MA or MB are not recognized.

Return type:

float or str

PyGamLab.Functions.Distance(x, y, z, a, b, c, d)[source]

The formula of the distance between a point and a plane in three-dimensional space is as follows:

D=(abs(a*x+b*y+c*z+d))/sqrt(a**2+b**2+c**2)

xint

The x-axis component.

yint

The y-axis component.

zint

The z-axis component.

aint

The coefficient of x in the plane equation.

bint

The coefficient of y in the plane equation.

cint

The coefficient of z in the plane equation.

dint

The constant in the plane equation.

Dfloat

The distance of point-to-plane

ExampleDistnace between (1,-2,4) and the plane 13*x-6*y-5*z+3=0

is 0.527

PyGamLab.Functions.Drag_Force(Velocity, Fluid_Coefficent, Fluid_Density, cross_sectional_area)[source]

Calculates the drag force acting on an object moving through a fluid.

Parameters:
  • Velocity (float) – The velocity of the object relative to the fluid (e.g., in m/s).

  • Fluid_Coefficent (float) – The drag coefficient (dimensionless).

  • Fluid_Density (float) – The density of the fluid (e.g., in kg/m^3).

  • cross_sectional_area (float) – The cross-sectional area of the object perpendicular to the direction of motion (e.g., in m^2).

Returns:

The drag force acting on the object (e.g., in Newtons).

Return type:

float

PyGamLab.Functions.Electrical_Resistance(v, i)[source]
Parameters:
  • i (int)

  • R (It represents electrical resistance.)

  • v (int) – Voltage or potential difference between two points

  • i – I is the electric current that passes through a circuit

  • R

PyGamLab.Functions.Encapsulation_Efficiency(W1, W2)[source]

This function calculates the percentage of drug loaded in the carrier during drug delivery

W1float

weight of free drug

W2float

weight of total drug

Returns float Encapsulation_Efficiency

PyGamLab.Functions.Error_Function(z)[source]
Parameters:

z (int or float) – Error function argument

Returns:

erf – error function value

Return type:

float

PyGamLab.Functions.Euler_Diff_Solver(a, b, xf, h, x0=0, y0=0)[source]
This function solve linear differential equation of the following form:

yprim = dy/dx = f(x,y) = a*x^2 + b*x

by the Euler’s method that is a numerical method for approximating differential equations.

Parameters:
  • a (float) – Polynomial coefficient..

  • b (float) – Polynomial coefficient.

  • xf (float) – Independent variable’s final value.

  • h (float) – Step size.

  • x0 (float, optional) – Independent variable’s initial value. The default is 0.

  • y0 (float, optional) – Initial function value at x0 (y0 = y(x0)). The default is 0.

Raises:

TypeError – The quadratic coefficient of the equation should not be zero.

Returns:

y – Returns function value at desired point (xf) or y(xf).

Return type:

float

PyGamLab.Functions.Euler_Method(a, b, h, x0, y0)[source]

Euler’s method law: y = y0 + h *yprim

Parameters:
  • a (float) – Polynomial coefficient.

  • b (float) – polynomial coefficient.

  • x0 (float) – Initial value.

  • y(x0) (y0 =) – function value.

  • h (float) – Step size.

Return type:

This function returns function value (y) at specific value (x).

PyGamLab.Functions.Fabric_Drape_Coefficient(fabric_weight, fabric_thickness, bending_length)[source]

This function estimates the drape coefficient of fabric according to 3 factors:

Parameters:
  • fabric_weight (int or float) – weight of fabric.

  • fabric_thickness (int or float) – thickness of fabric.

  • bending_length (int or float) – the length difference.

  • Drape_Coefficient (int or float) – Result.

PyGamLab.Functions.Fabric_GSM(Warp, Weft, Warp_Count_Nm, Weft_Count_Nm, Shrinkage_Percent=5)[source]

This function calculates weight fabric in GSM unit.

Parameters:
  • Warp (int or float) – The number of warps in 1 cm.

  • Weft (int or float) – The number of wefts in 1 cm.

  • Warp_Count_Nm (int or float) – Warp yarn metric count.

  • Weft_Count_Nm (int or float) – Weft yarn metric count.

  • Shrinkage_Percent (int or float, optional) – The percentage difference in the length of woven and non-woven yarn. The default is 5.

  • Fabric_GSM (int or float) – Result.

PyGamLab.Functions.Fabric_Porosity(air_volume, total_volume)[source]
Parameters:
  • air_volume (int) – enter the volume of pores in fabric in mm^3.

  • total_volume (int) – Enter the total volume of fabric in mm^3.

Returns:

Fabric_porosity – This function calculates the fabric porosity in mm^3.

Return type:

int

PyGamLab.Functions.Fabric_weight(density, area)[source]
Parameters:
  • density (int) – enter the density of fabric in g/mm^2.

  • area (int) – Enter the area of fabric in mm^2.

Returns:

Fabric_weight – This function calculates the fabric weight in g.

Return type:

int

PyGamLab.Functions.Factorial(a)[source]

The product of all positive integers less than or equal to a given positive integer.

Parameters:

a (int)

Returns:

factorial – the product of all positive integers less than or equal to a given positive integer .

Return type:

int

PyGamLab.Functions.Faraday_Corrosion(current_density, time, atomic_weight, density, valence)[source]

calculate penetration depth from corrosion

current_density: A/m² time:hour atomic_weight: g/mol density: g/cm³ valence

PyGamLab.Functions.Fibonachi_Sequence(N)[source]

Generates a Fibonacci sequence up to the N-th term.

Parameters:

N (int) – The number of Fibonacci numbers to generate. Must be a positive integer.

Returns:

A list containing the first N Fibonacci numbers.

Return type:

list

PyGamLab.Functions.Fick_Sec_Thin(Thickness, Diffusion_coefficient, Time, Thin_layer_Consistency, Position, Thin_Layer_Metal, Second_metal)[source]

Fick’s second law predicts how diffusion causes the concentration to change with respect to time. In the case where a thin film of a different metal is placed between two thick films of another metal, and due to heat and a certain time, the amount of penetration of the first metal into the second metal will be investigated. :type Thickness: :param Thickness: The thickness of the thin layer metal is used. use cm for input :type Thickness: float :type Diffusion_coefficient: :param Diffusion_coefficient: It shows the diffusion coefficient of the metal placed in the middle compared to the metal on its side. use cm^2/seconds for input :type Diffusion_coefficient: float :type Time: :param Time: It shows the duration of the diffusion check. use seconds for input :type Time: float :type Thin_layer_Consistency: :param Thin_layer_Consistency: It shows the initial concentration of thin metal. use gr/cm^3 for input :type Thin_layer_Consistency: float :type Position: :param Position: Indicates the location required to check the concentration. use cm for input :type Position: float :type Thin_Layer_Metal: :param Thin_Layer_Metal: What is the material of the thin layer used? :type Thin_Layer_Metal: str :type Second_metal: :param Second_metal: What is the metal material in which the primary metal should penetrate?. :type Second_metal: str

Returns:

C_x_t – It shows the concentration of the metal separated from the thin layer and moved in a certain time in the desired location. output will be gr/cm^3

Return type:

float

PyGamLab.Functions.Filler_Weight(M, FR1, FR2, FR3)[source]

Calculates the weight percentages of three fillers in a polymer matrix.

Parameters:
  • M (float) – The weight of the polymer matrix in grams (gr).

  • FR1 (float) – The weight of the first flame retardant in grams (gr).

  • FR2 (float) – The weight of the second flame retardant in grams (gr).

  • FR3 (float) – The weight of the third flame retardant in grams (gr).

Returns:

A tuple containing three lists, representing the weight percentages of FR1, FR2, and FR3, respectively.

Return type:

tuple

PyGamLab.Functions.Final_Temp_Irreversible_Adiabatic(Initial_temperature, External_pressure, Internal_pressure, C_V, C_P, R, Unit_of_measurement, Number_of_gas_atoms)[source]
Initial_temperaturefloat

Initial temperature of an ideal gas.

External_pressurefloat

The pressure that enters the system from the environment.

Internal_pressurefloat

The pressure that enters the system wall from the inside.

C_Vfloat

The ideal gas constant-pressure specific heat.

C_Pfloat

The ideal gas constant-pressure specific heat..

Rfloat

The molar gas constant or ideal gas constant.

Unit_of_measurementstr

DESCRIPTION.

Number_of_gas_atomsstr

DESCRIPTION.

Returns:

Final_Temp – Outputs the final temperature if the system operates adiabatically irreversible.

Return type:

float

PyGamLab.Functions.First_Row_Pascal_Triangle(k)[source]

Calculates the factorial of a non-negative integer k, which corresponds to the (k+1)-th row’s first and last element in Pascal’s Triangle (if rows start from 0).

Parameters:

k (int) – A non-negative integer.

Returns:

The factorial of k (k!).

Return type:

int

PyGamLab.Functions.Fracture_Toughness(s, c, location)[source]

this function calculates fracture toughness based on applied stress, crack length, and location

fracture toghness formula:

K1C = a*s* (math.sqrt(3.14* c))

where:

K1C is the fracture toughness, a is a geometric factor, s is the applied stress, c is the crack length.

Parameters:
  • s (1.) – applied stress

  • c (2.) – crack length

  • location (3.) – represents the location of crack

  • toughness) (Returns --> K1C (fracture)

PyGamLab.Functions.Friction_Law(mass, angle, /, MOTCS, moving)[source]

This function calculates the friction force on the object by taking the mass of the desired object, the material of the two contact surfaces, the angle of the contact surface with the horizon and the movement state of the object.

Parameters:
  • mass (int) – The mass of the desired object (KG).

  • angle (int) – The angle of the contact surface with respect to the horizon (RAD).

  • MOTCS (str) – Material of two contact surfaces. The contact surfaces considered : STEEL ON STEEL STEEL ON ALUMINUM STEEL ON COPPER COPPER ON CAST IRON COPPER ON GLASS GLASS ON GLASS RUBBER ON DRY CONCRETE RUBBER ON WET CONCRETE TEFLON ON TEFLON

  • moving (str) – Is the desired object moving? (YES OR NO).

Returns:

F – Frictional force applied to the target object (N).

Return type:

float

PyGamLab.Functions.Geometric_Sequence(first_variable, second_variable)[source]

This function obtains the result of a geometric progression

Parameters:
  • first_variable (int) – The value of the first variable.

  • second_variable (int) – The value of the second variable.

Returns:

gives the result of the geometric exponential function.

Return type:

int

PyGamLab.Functions.Gibs_free_energy(H0, T, S0)[source]
Parameters:
  • H0 (float) – Enthalpy of material in the pressure of 1atm in pure state. The number should be in terms of joul or kilojoul. It must have the same unit as entropy.

  • T (float) – Temperature of material. The temperature should be in terms of Kelvin.

  • S0 (float) – Entropy of material. The number should be in terms of joul or kilojoul. It must have the same unit as enthalpy.

Returns:

G – This function give us the amount of Gibs free energy of the material at the pressure of 1atm. The terms of this function is joul or kilojoul.

Return type:

float

PyGamLab.Functions.Gravitational_force(G, FT)[source]
Parameters:
  • G (float) – The gravitational force is a force that attracts any two objects with mass.

  • FT (float) – The force of gravity varies with latitude and increases from about 9.780 m/s2 at the Equator to about 9.832 m/s2 at the poles.

Returns:

F – The force of gravity is also called as Newton’s law of gravitation. Mathematically, F = GMmr2. where F = force of gravity, G = gravitational constant, M = mass of one object, m = mass of other object, r = distance between two objects.

Return type:

float

PyGamLab.Functions.Gravitational_force_formula(g, m_mars, m_sun, r_mars_sun)[source]
Parameters:
  • g (float) – The gravitational force is a force that attracts any two objects with mass.

  • m_mars (float) – Mars’ mass is 6.42 x 1023 kilograms, about 10 times less than Earth. This affects the force of gravity. Gravity on Mars is 38 percent of Earth’s gravity, so a 100-pound person on Earth would weigh 38 pounds on Mars

  • m_sun (float) – The sun has a mass of 1.9891x1030 kg = 4.384x1030 lb = 2.192x1027 tons, or a mass 333,000 times that of the Earth. The radius of the Sun is 696,265,000 meters = 696,265 km = 432,639 mi or a radius 109 times that of the Earth.

  • r_mars_sun (float) – Mars is about 128 million miles (206 million km) from the sun, and at its farthest distance (aphelion) Mars is about 154 million miles (249 million km) from the sun.

Returns:

F2 – The force of gravity is also called as Newton’s law of gravitation. Mathematically, F = GMmr2. where F = force of gravity, G = gravitational constant, M = mass of one object, m = mass of other object, r = distance between two objects.

Return type:

float

PyGamLab.Functions.Half_Inhibitory_Concentration(A1, A2, A3)[source]

This function determines the drug’s efficacy in biological process inhibition

A1int

absorbance of the experimental wells

A2int

absorbance of the control wells

A3int

absorbance of the blank wells

Returns
float

Half _Inhibitory_Concentration

PyGamLab.Functions.Hall_Petch(d_grain, sigma0, k)[source]

calculate yield strengh with grain size in Hall Petch k(float) = MPa·√m Hall Petch constant d_grain = size of grain according to meter

PyGamLab.Functions.Hall_Petch_Relationship(grain_size, yield_strength_boundary, k_hp)[source]

Calculates the yield strength of a polycrystalline material based on its grain size using the Hall-Petch relationship. This fundamental concept in materials science explains how reducing grain size generally increases the strength of a material by increasing the number of grain boundaries that impede dislocation motion.

Parameters:
  • grain_size (float) – The average grain size of the polycrystalline material (typically in micrometers or millimeters).

  • yield_strength_boundary (float) – The yield strength of a single crystal of the material (or a material with infinitely large grains), representing the intrinsic strength (in MPa or equivalent units).

  • k_hp (float) – The Hall-Petch coefficient, a material-specific constant that reflects the strength of grain boundaries in impeding dislocation motion (in MPa * sqrt(length unit)).

Returns:

The yield strength of the polycrystalline material (in the same units as yield_strength_boundary).

Return type:

float

PyGamLab.Functions.Hardness_vickers(F, d)[source]
Parameters:
  • F (float) – Applied force in terms of kilogram.

  • d (float) – Medium diameter of indentor effect in terms of milimeter.

Returns:

HV – This function give us the amount of hardness of material that evaluated by vickers hardness tester. The terms of this is Kg/mm2.

Return type:

Vickers hardness

PyGamLab.Functions.Heat_Capacity(m, c, T1, T2)[source]

This function caclulate the amount of heat capacity of a mass :type m: :param m: mass. :type m: Float :type c: :param c: specific heat coefficient. :type c: float :type T1: :param T1: primary temperature. :type T1: float :type T2: :param T2: secondary temperature. :type T2: float

PyGamLab.Functions.Heat_Exchanger_Transfer(U, Th1, Th2, Tc1, Tc2, C, dot_m)[source]
Parameters:
  • U (float) – Overall heat transfer coefficient.

  • Th1 (float) – Hot fluid inlet temperature.

  • Th2 (float) – Hot fluid outlet temperature.

  • Tc1 (float) – Cold fluid inlet temperature.

  • Tc2 (float) – Cold fluid outlet temperature.

  • C (float) – Special heat.

  • dot_m (float) – Debbie Jeremy.

Returns(delta_T_LMTD,Q,A)

None.

PyGamLab.Functions.Heat_Transfer_Rate(Thermal_conductivity, area, tempreture_difference)[source]

This function is used to calculate heat transfer rate by using thermal conductivity, area of transformation, and tempreture of to sides of transformation. In this formula, heat transfer rate is in Btu/(hr*square ft*F), area is in square ft, and tempreture difference is in F.

PyGamLab.Functions.HeatـTransferـCoefficient(k, A, t1, t2, d)[source]
Parameters:
  • k (int)

  • A (int)

  • t1 (int)

  • t2 (int)

  • Q (int)

  • Q – It indicates the rate of heat transfer.

  • k – Heat transfer coefficient

  • A – is the heat transfer coefficient.

  • t1 – The area of ​​the surface from which heat is transferred.

  • t2 – Initial temperature

  • d (int) – Secondary temperature

PyGamLab.Functions.Hooke(strain, young_modulus)[source]

Calculates stress using Hooke’s Law for elastic materials under uniaxial loading.

Parameters:
  • strain (float) – The dimensionless strain (change in length divided by original length).

  • young_modulus (float) – The Young’s modulus (elastic modulus) of the material (in Pascals or equivalent units).

Returns:

The stress experienced by the material (in Pascals or equivalent units).

Return type:

float

PyGamLab.Functions.Ideal_Gas_low_with_unit(R='(L.atm) / (K.mol)', V=1, n=1, T=0)[source]

It calculate the Pressure of ideal gas.

Parameters:

Pfloat

Pressure

Vfloat

The amount of Volume

n : float

The amount of substance

Tfloat

Temperature

Rfloat

ideal gas constant

PyGamLab.Functions.Income_Tax(a)[source]
Parameters:
  • a (float) – daramad fard dar yek mah

  • iran (Returns maliyat bar daramad fard dar yek mah dar)

  • -------

PyGamLab.Functions.Incompressible_Fluids_Pressure(d, h)[source]

Calculates the pressure at a certain depth in an incompressible fluid.

Parameters:
  • d (float) – The density of the incompressible fluid (in kg/m^3).

  • h (float) – The depth below the surface of the fluid (in meters).

Returns:

The absolute pressure (P) at the specified depth in Pascals (Pa).

Return type:

float

PyGamLab.Functions.Indeterminate_degree_of_truss(m, j)[source]

This function calculates the degree of indeterminacy of the truss by taking ‘m’ number of truss members and ‘j’ number of nodes.

Parameters:
  • m (int) – Number of members truss.

  • j (int) – Number truss node members.

Returns:

n – The indeterminate degree of truss.

if n=0 : The truss is determinate. if n>0 : The truss is statically unstable. if n<0 : The truss is indeterminate.

Return type:

float

PyGamLab.Functions.Insertion_Sort(non_sorted_list)[source]

Sorts a list of elements in-place using the Insertion Sort algorithm.

Parameters:

non_sorted_list (list) – The list of elements to be sorted.

Returns:

The sorted list (the original list is modified in-place).

Return type:

list

PyGamLab.Functions.Latice_Parameter(structure, r)[source]

this function calculates Latice parameter based on crystal structure.

Parametrs

1. structure : str structure includes crystal structures such as FCC, BCC, SC, HCP, and DC.

FCC: face centered cubic BCC: body centered cubic SC: simple cubic HCP: hexagonal close pack DC: diamond cubic

2. r: float —> (nm) r represents atomic radius.

Returns –> latice parameter (a)

PyGamLab.Functions.Lattice_Parameter(r, structure)[source]
Parameters:
  • r (float) – r is atomic radius of material. It is in terms of angestrom.

  • structure (str) – Structure of material is face center cubic or body center cubic.

Returns:

a – a is lattice parameter of material in unit cell. It is in terms of angestrom.

Return type:

float

PyGamLab.Functions.Lennard_Jones_Potential(r, sigma, epsilon)[source]

Calculates the Lennard-Jones potential energy between two non-bonding atoms or molecules as a function of the distance ‘r’ between them. This potential models the balance between short-range repulsive forces (Pauli repulsion) and long-range attractive forces (van der Waals forces).

Parameters:
  • r (float) – The distance between the two atoms or molecules (in Angstroms or other length units).

  • sigma (float) – The distance at which the potential energy is zero (related to the size of the particles).

  • epsilon (float) – The depth of the potential well, representing the strength of the attraction.

Returns:

The Lennard-Jones potential energy (in energy units like Joules or electronvolts, depending on the units of epsilon).

Return type:

float

PyGamLab.Functions.Lorentz_Lorenz_Constant(n, ro)[source]

n(float)= refrective index ro(float)=density g/cm3 or kg/m3

Retuen:

R=(float) constant related to light properties of materials(polymers, plstics,…)

PyGamLab.Functions.Mandaliof_Properties(E)[source]
Parameters:

E (string) – The chemical symbol of the Element

Return type:

Nothing

PyGamLab.Functions.Mass_Of_Rubber_In_Internal_Mixer(filler_percentage, type_of_rotors, V)[source]

Estimates the mass of rubber in an internal mixer based on filler percentage, rotor type, and mixer volume.

Parameters:
  • filler_percentage (float) – The percentage of filler in the rubber compound.

  • type_of_rotors (str) – The type of rotors in the internal mixer (‘tangential’ or ‘intermix’). Case-sensitive.

  • V (float) – The volume of the internal mixer. The unit of volume will determine the unit of the returned mass (assuming a consistent density factor).

Returns:

The estimated mass of rubber in the internal mixer. The unit will depend on the unit of V.

Return type:

float

PyGamLab.Functions.Mass_Transfer_Intensity(result_1, size_of_the_surface)[source]

Calculates the Mass Transfer Intensity (MTI).

Parameters:
  • result_1 (float) – A mass transfer related result (the units of this parameter will determine the units of MTI).

  • size_of_the_surface (float) – The size (area) of the surface where mass transfer occurs (in square meters, m^2).

Returns:

The Mass Transfer Intensity (MTI_ἠ). The units will be the units of result_1 multiplied by square meters.

Return type:

float

PyGamLab.Functions.Mc_Cabe(F, Zf, Xd, Xw, R, alpha, q)[source]

This function is used for Mc-Cabe calculation in Distillation Towers F : Feed Rate Zf : volatile composition in Feed Xd : volatile composition in Distillate Xw : volatile composition in Waste R : Reflux alpha : Volatility coefficient q : the quantity of liquid in feed Returns the number of tray

PyGamLab.Functions.Miner_Rule_Fatigue(n, N)[source]
Parameters:
  • n (list) – number of cycles at stress level

  • N (list) – number of cycles to failure at stress level

Returns:

sigma

Return type:

float

PyGamLab.Functions.Mtt_Test(C1, C2)[source]

This function measures the metabolic activity of the cell

C1int

viable cells

C2int

total cells

Returns float

Mtt_Test

PyGamLab.Functions.Nanoparticle_Aspect_Ratio(lenght=1, width=1, height=1)[source]

Calculating the Nanoparticle_Aspect_Ratio

Parameters:
  • lenght (int) – lenght of a nanoparticle DESCRIPTION. The default is 1. unit(nm)

  • width (int) – width of a nanoparticle DESCRIPTION. The default is 1. unit(nm)

  • height (int) – height of a nanoparticle DESCRIPTION. The default is 1. unit(nm)

Returns:

Nanoparticle_Aspect_Ratio – the ratio of maximum dimention of a nanoparticle to minimum dimention of it.

Return type:

float

PyGamLab.Functions.Nanoparticle_Surface_Area(Shape, Diameter=0, a=0)[source]

Calculating the surface area of nanoparticle by determinig the shape

Parameters:
  • Shape (str)

  • (sphere

  • tetrahedron) (cube or)

  • Diameter (int)

  • 0. (DESCRIPTION. The default is)

  • nanoparticles) ((it is needed for cubic or tetragonal)

  • unit(nm)

  • a (int)

  • dimention

  • unit(nm)

  • 0.

  • nanoparticles)

  • unit(nm)

Returns:

  • Nanoparticle_Surface_Area (int)

  • unit(nm^2)

PyGamLab.Functions.Nanoparticle_Volume(Shape, Diameter=0, a=0)[source]

Calculating the Volume of a nanoparticle by determinig the shape

Parameters:
  • Shape (str)

  • (sphere

  • tetrahedron) (cube or)

  • Diameter (int)

  • 0. (DESCRIPTION. The default is)

  • nanoparticles) ((it is needed for cubic or tetragonal)

  • unit(nm)

  • a (int)

  • dimention

  • unit(nm)

  • 0.

  • nanoparticles)

  • unit(nm)

Returns:

  • Nanoparticle_Volume (int)

  • unit(nm^3)

PyGamLab.Functions.PengRobinson(T=None, P=None, Tc=None, Pc=None, w=None, MW=None, Phases=None)[source]

PengRobinson.m : calculates the compressibility factor,fugacity coefficient and density of a pure compound with the Peng Robinson equation of state (PR EOS)

Parameters:
  • T (float) – Temperature [=] K

  • P (float) – Presure [=] Pa

  • Tc (float) – Critical temperature [=] K

  • Pc (float) – Critical presure [=] Pa

  • w (float) – Accentic factor

  • MW (float) – Molar weigth [=] kg/mol.

  • Phases (int) – if Phases == 1, then calculates liquid fugacity; if Phases == 0 then calculates vapor fugacity

Returns:

  • Z (flout) – Compressibility factor

  • fhi (float) – Fugacity coefficient

  • density (float) – Density

PyGamLab.Functions.Planks_Fix(y, R, r)[source]

This formula is used to calculate the wall pressure of bleeding in the veins This function receives the variables y, r, R and returns the variable p p:It indicates the pressure of the bleeding wall. y:Surface coefficient is surface tension R:is the inner radius of the vessel. r:is the thickness of the vessel wall.

PyGamLab.Functions.Polygonal_Diameters(n)[source]
Parameters:
  • n (int) – tedad azlae chand zelei(az 2 ta bishtar).

  • zelei (Returns tedad ghotrhaye chand)

  • -------

PyGamLab.Functions.Power_Factor(i, v)[source]
Parameters:
  • i (int)

  • P (v and returns the variable)

  • i – It is an electric current that passes through a circuit

  • v (int) – It is an electric current that passes through a circuit

  • p (int) – It indicates the power used or produced.

PyGamLab.Functions.Principal_Stress(Sx, Sy, Sz, Txy, Tyz, Txz)[source]

make sure stress value is less than 1000 :type Sx: :param Sx: Normal stress along x :type Sx: (int or float) :type Sy: :param Sy: Normal stress along y :type Sy: (int or float) :type Sz: :param Sz: Normal stress along z :type Sz: (int or float) :type Txy: :param Txy: Shear stress along xy :type Txy: (int or float) :type Tyz: :param Tyz: Shear stress along yz :type Tyz: (int or float) :type Txz: :param Txz: Shear stress along xz :type Txz: (int or float)

Returns:

S_P – Principal stresses

Return type:

[S1,S2,S3]

PyGamLab.Functions.Print_Time(Print_speed, Volume, Printer_efficiency)[source]

volume(float)= usually Cm3

print_speed(float)= and is speed of print usually cm3 per hour)

Printer_efficience(float)= and between 0 -1)

Retuen:

Print_time=(float) the time of print in hour

PyGamLab.Functions.Pythagorean(side1, side2)[source]

It should be an orthogonal triangle and this function gives you hypotenuse

Parameters:
  • side1 (int) – side of “orthogonal triangle”.

  • side2 (int) – side of “orthogonal triangle”.

Returns:

hypotenuse – hypotenuse of “orthogonal triangle”.

Return type:

int

PyGamLab.Functions.Quadratic_Equation(a, b, c)[source]

This function find “x” in equation ax^2 + bx + c = 0

aint

known number.

bint

known number.

cint

known number.

The Quadratic Equation mostly have two answers!
x1 ,x2int

the unknown.

PyGamLab.Functions.Quantum_Harmonic_Oscillator_Energy(n, hbar, omega)[source]

Calculates the energy levels of a quantum harmonic oscillator, a fundamental model in quantum mechanics that describes systems undergoing oscillatory motion, such as vibrations of atoms in a molecule or lattice.

Parameters:
  • n (int) – The quantum number of the energy level (n = 0, 1, 2, …). n=0 is the ground state, and higher values represent excited states.

  • hbar (float) – The reduced Planck constant (h / 2π).

  • omega (float) – The angular frequency of the oscillator (in radians per second).

Returns:

The energy of the n-th quantum energy level of the harmonic oscillator (in Joules or electronvolts, depending on the units of hbar and omega).

Return type:

float

PyGamLab.Functions.Rectangle_Area(length, width)[source]

This function calculate the area of square too!

Parameters:
  • length (int) – length of rectangle.

  • width (int) – width of rectangle.

Returns:

rectangle_area – area of rectangle.

Return type:

int

PyGamLab.Functions.Rectangle_Perimeter(length, width)[source]

This function calculate the perimeter of square too!

Parameters:
  • length (int) – length of rectangle.

  • width (int) – width of rectangle.

Returns:

rectangle_perimeter

Return type:

int

PyGamLab.Functions.Rejection(CF, CP)[source]

Calculates the rejection rate (%) of a membrane based on pollutant concentrations.

Parameters:
  • CF (float) – The pollutant concentration in the feed solution (g/l).

  • CP (float) – The pollutant concentration in the permeate solution (g/l).

Returns:

The membrane rejection rate in percent (%).

Return type:

float

PyGamLab.Functions.Reynolds_Number_Pipe(d, u, vis, D_H)[source]

Calculates the Reynolds number for flow in a pipe.

Parameters:
  • d (float) – The density of the fluid (e.g., in kg/m^3).

  • u (float) – The average velocity of the fluid (e.g., in m/s).

  • vis (float) – The dynamic viscosity of the fluid (e.g., in Pa·s).

  • D_H (float) – The hydraulic diameter of the pipe (e.g., in meters).

Returns:

The Reynolds number (Re), a dimensionless quantity.

Return type:

float

PyGamLab.Functions.Rolling_Parameters_Calculator(roller_radius, flow_stress, sample_width, wanted_thickness_reduction, coefficient_of_friction=None)[source]
Parameters:
  • roller_radius (float) – roller radius in term of meter.

  • flow_stress (float) – flow stress of your sample in term of Pascal.

  • sample_width (float) – sample width in meter.

  • wanted_thickness_reduction (float) – wanted thickness reduciton (delta h) in terms of meter.

  • coefficient_of_friction (floea, optional) –

    coefficient of friction between the roller and your sample. notice :

    if you give nothing for friction of coefficeint, function assumed that this coefficient is 0.2 and didnt include the role of friction in the rolling force formula. (* 1.2) but if you enter a value for this, function include the role of friction in the process and multiplies the rolling force by 1.2

Returns:

  • delta_h_max (float) – the maximum thickness reduction that can be reached in terms of meter.

  • h_min (float) – minimum thickness that can be reached in terms of meters.

  • rolling_force (float) – the required force for rolling in terms of Newton.

### important : this function give all output in scientific notation.

PyGamLab.Functions.Sample_Size_Calculation(N, e)[source]

This function estimates the number of evaluable subjects required for achieving desired statistical significance for a given hypothesis.

Nint

population of the study

efloat

margin error

Returns int

Sample_Size_Calculation

PyGamLab.Functions.Shear_Rate(Q, p, r, n)[source]

Calculates the shear rate for a power-law fluid flowing in a pipe. Note: The variable ‘p’ is unusual in standard shear rate formulas for pipe flow. Assuming it might be pi.

Parameters:
  • Q (float) – The volumetric flow rate (e.g., in m^3/s).

  • p (float) – Likely intended to be pi (π ≈ 3.14159).

  • r (float) – The radius of the pipe (e.g., in meters).

  • n (float) – The flow behavior index for a power-law fluid (dimensionless).

Returns:

The shear rate (γ̇) at the pipe wall (e.g., in s^-1).

Return type:

float

PyGamLab.Functions.Shear_Stress(F, A)[source]

Calculates the shear stress acting on a surface.

Parameters:
  • F (float) – The shear force acting parallel to the surface (e.g., in Newtons).

  • A (float) – The area of the surface over which the shear force acts (e.g., in square meters).

Returns:

The shear stress (τ) (e.g., in Pascals).

Return type:

float

PyGamLab.Functions.Solidification_Front_Composition(partition_coefficient, alloy_composition, solid_fraction, law_type='lever')[source]
Parameters:
  • partition_coefficient (float) – a non-dimensional value that describe the scope of liquidus line.

  • alloy_composition (float) – initial composition of your alloy in terms of Wt % of left element in phase diagram.

  • solid_fraction (float) – how much of your alloy solidified.

  • law_type (str, optional) – you can choose two different model for solidification. lever and scheil. The default is ‘lever’.

Returns:

  • solid_front_massfraction (float) – solid mass fraction in solidification front in terms of Wt % of left element in phase diagram.

  • liquid_front_conc (float) – liquid mass fraction in solidification front in terms of Wt % of left element in phase diagram .

notice :

This function round answers to two decimals.

PyGamLab.Functions.Solubility(a, b, c, T, T_unit, T_end)[source]

Parameters

bfloat

Constant.

cfloat

Constant.

Tfloat

Temperature.

T_unit:str

Unit of temperature.

T_end: float

Final temperature

Return type:

Determination solubility at different temperatures upto solubility< 1

PyGamLab.Functions.Sphere_Area(R)[source]
PyGamLab.Functions.Sphere_Surface_Area(radius)[source]
Parameters:

radius (int) – radius of sphere.

Returns:

sphere_surface_area – surface area of sphere .

Return type:

int

PyGamLab.Functions.Sphere_Volume(radius)[source]
Parameters:

radius (int) – radius of sphere.

Returns:

sphere_volume – volume of sphere.

Return type:

int

PyGamLab.Functions.Standard_Deviation(a)[source]

This function calculates the standard deviation of a list of numbers.

Parameters:

a (list) – a is a list of numbers.

Returns:

SD – SD is the standard deviation of a list of numbers.

Return type:

float

PyGamLab.Functions.Stress(strain, young_modulus)[source]

#The Young’s modulus (E) is a property of the material that tells us how easily it can stretch and deform and is defined as the ratio of tensile stress (σ=S) to tensile strain (ε=Ts)

Parameters:
  • strain (tensile strain (ε))

  • young_modulus (Modulus of Elasticity (N/m2))

Returns:

S

Return type:

tensile stress (σ)

PyGamLab.Functions.Stress_Intensity_Factor(stress, crack_length, crack_type)[source]

Calculate the stress intensity factor (K) based on the type of crack. K = crack_type * stress * (sqrt(pi * crack_length)) :type stress: :param stress: applied stress (sigma). :type stress: float :type crack_length: :param crack_length: lenght of the crack (a). :type crack_length: float :type crack_type: :param crack_type: there are 3 types of crack ‘surface’, ‘circular’, ‘internal’. :type crack_type: str :param Returns: Stress intensity factor (K). :type Returns: float

PyGamLab.Functions.TB(P, N)[source]

This function is used for bubble temp calculation in mixed solution P : pressure (mmhg) N : number of component Returns bubble temp

PyGamLab.Functions.TD(P, N)[source]

This function is used for dew temp calculation in mixed solution P : pressure (mmhg) N : number of component Returns bubble temp

PyGamLab.Functions.Tensile_Strength(f, a)[source]
Parameters:
  • f (int) – force required to break

  • a (int) – cross sectional area

  • -------

  • c (int) – Tensile_Strength

PyGamLab.Functions.Total_Solidification_Time_of_Casting(volume, surface_area, Cm, n, /)[source]
Parameters:
  • volume (float) – DESCRIPTION.

  • surface_area (float) – DESCRIPTION.

  • Cm (float) – It’s amount varies depending on the type of material

  • n (float) – It’s amount varies depending on the type of material but is usually equal to 2

Returns:

Total_Solidification_Time

Return type:

float

PyGamLab.Functions.Transient_Heat_Conduction_Semi_Infinite_Solid(T_s, T_i, alpha, x, t)[source]

Calculates the temperature at a depth ‘x’ and time ‘t’ in a semi-infinite solid initially at a uniform temperature ‘T_i’, whose surface temperature is suddenly changed to ‘T_s’. This solution is derived from the heat diffusion equation and is applicable when the solid is thick enough that the temperature change has not yet reached the opposite boundary.

Parameters:
  • T_s (float) – The constant surface temperature applied at t=0.

  • T_i (float) – The initial uniform temperature of the solid.

  • alpha (float) – The thermal diffusivity of the solid material (in m^2/s).

  • x (float) – The depth from the surface where the temperature is to be calculated (in meters).

  • t (float) – The time elapsed since the surface temperature change (in seconds).

Returns:

The temperature at depth ‘x’ and time ‘t’ (in the same units as T_s and T_i).

Return type:

float

PyGamLab.Functions.Trapezium_Area(Base1, Base2, Height)[source]

Parameters

Base2int

base of trapezium

Heightint

height of trapezium

Returns:

Area – Area of trapezium

Return type:

int

PyGamLab.Functions.Trapezium_Perimeter(Base1, Base2, Side1, Side2)[source]
Parameters:
  • Base1 (int) – base of trapezium.

  • Base2 (int) – base of trapezium.

  • Side1 (int) – side of trapezium.

  • Side2 (int) – side of trapezium.

Returns:

Perimeter – perimeter of trapezium

Return type:

int

PyGamLab.Functions.Tresca_Yield_For_Biaxial_Tension(c, hardness, sigma_xx, sigma_yy, tau_xy, /)[source]
Parameters:
  • c (float) – C is a coefficient that is between 0.3 and 0.4 depending on the type of material.

  • hardness (float) – brinell and vickers hardness.

  • sigma_y (float) – Uniaxial tensile yield strength of material.(Mpa)

  • sigma_y – Uniaxial tensile yield strength of material

  • sigma_xx (float)

  • sigma_yy (float)

  • tau_xy (float)

Returns:

Tresca – DESCRIPTION.

Return type:

TYPE

PyGamLab.Functions.Tresca_Yield_For_Principal_Stresses(c, hardness, sigma_1, sigma_2, sigma_3, /)[source]
Parameters:
  • c (float) – C is a coefficient that is between 0.3 and 0.4 depending on the type of material.

  • hardness (float) – brinell and vickers hardness.

  • sigma_y (float) – Uniaxial tensile yield strength of material.(Mpa)

  • sigma_1 (float) – Principal Stresses.

  • sigma_2 (float) – Principal Stresses.

  • sigma_3 (float) – Principal Stresses.

Returns:

Tresca – Tresca Yield(Mpa)

Return type:

float

PyGamLab.Functions.Triangle_Area(Height, rule)[source]

This function obtains the area of ​​the triangle

Parameters:
  • Height (float) – The size of the height of the triangle.

  • rule (float) – The size of the base of the triangle is.

Returns:

area – The output is the area of ​​the triangle.

Return type:

float

PyGamLab.Functions.Triangle_Environment(first_side, second_side, third_side)[source]

This function gets the perimeter of the triangle

Parameters:
  • first_side (float) – The size of the first side.

  • second_side (float) – The size of the second side.

  • third_side (float) – The size of the third side.

Returns:

Environment – The output is the perimeter of the triangle.

Return type:

float

PyGamLab.Functions.Velocity_Equation(V1, V2, a)[source]
Parameters:
  • V1 (float) – sorat avaliye moteharek.

  • V2 (float) – sorat nahayi moteharek.

  • a (floar) – shetab moteharek dar harekat ba shetab sabet.

  • sabet (Returns mizan jabejayi dar harekat ba shetab)

  • -------

PyGamLab.Functions.Vicker_Hardness_Calculation(d1, d2, p)[source]

this function is utilized for calculating Vickers hardness. in this method, pyramid shape indentor is used.

Parameters:
  • d1 (1.)

  • indentor. (d1 represents diameter of impress of)

  • d2 (2.)

  • indentor (d2 represents diameter of impress of)

  • p (3.)

  • load (applied)

  • Number) (Returns --> VHN (Vickers Hardness)

PyGamLab.Functions.Voltage_Standing_Wave_Ratio(Vmax, Vmin)[source]
Parameters:
  • Vmax (float) – the highest voltage measured in transition line

  • Vmin (float) – the lowest voltage measured in transition line

Returns:

Row – its the domain of reflection coefficient of transition line

Return type:

float

PyGamLab.Functions.WLF(T, Tg, /)[source]

The WLF equation is a procedure for shifting data for amorphous polymers obtained at elevated temperatures to a reference temperature.

Parameters:
  • T (int or float) – Temperature, K or degree celsius, Tg<T<Tg+100..

  • Tg (int or float) – Glass Transition Temperature, K or degree celsius.

Returns:

  • aT (int or float)

  • shift factor.

PyGamLab.Functions.Wear_Rate(v, f, s)[source]

this function calculates abrasive wear rate

Parametrs

1. v : float —> (mm3) v represents wear volume

2. f: int —> (nm) —> (N) f represents normal load.

3. s: float —> (m) s represents sliding distance.

Returns –> wear rate (w)

PyGamLab.Functions.Wear_rate(V, F, S)[source]
Parameters:
  • V (float) – lost volume during the wear test in terms of cubic milimeters (mm3)

  • F (float) – Applied force in terms of newton.

  • S (float) – Sliding distance in terms of meter.

Returns:

K – This function is for claculation of wear rate if material after wear test. It is in terms of (10-6 mm3/N.m)

Return type:

Wear rate

PyGamLab.Functions.Web_Service_Analyze(services, resp_times, exe_CPU_costs, exe_Mem_costs, exe_Disk_costs, exe_Net_costs)[source]
serviceslist pof str

the list of services..

resp_timeslist of int

the list of the responce times of specified web services, measured in millisecond.

exe_CPU_costslist of int

list of the percent of execution costs in case of cpu for specified web services.

exe_Mem_costslist of int

list of the percent of execution costs in case of memory for specified web services.

exe_Disk_costslist of int

list of the percent of execution costs in case of disk for specified web services.

exe_Net_costslist of int

list of the percent of execution costs in case of network for specified web services.

Returns a list of services with their useful information for easily analyze.

PyGamLab.Functions.Welding_Deposition_Rate(Deposited_Metal_Mass, Welding_Time)[source]
Parameters:
  • Deposited_Metal_Mass (flaat) – Deposited_Metal_Mass is the amount of deposited metal during welding (kg).

  • Welding_Time (float) – Welding_Time is the consumed time for welding (hr).

Return type:

Deposition_Rate is the amount of deposited metal per hour during the welding operation.

PyGamLab.Functions.Welding_Heat_Input(Efficiency, Voltage, Amperage, Speed)[source]
Parameters:
  • Efficiency (float) – Efficiency is the proportion of useful inserted heat to the total inserted heat into the weldment.

  • Voltage (float) – Voltage is the electrical potential of the welding arc (V).

  • Amperage (float) – Amperage is the amount of electrical current in welding (A).

  • Speed (float) – Speed is the velocity of the welding tool (cm/min).

Return type:

Heat_Input is the useful heat inserted into the weldment.

PyGamLab.Functions.Young_Modulus(stress, strain)[source]

Calculates Young’s modulus (elastic modulus) of a material under uniaxial tension or compression.

Parameters:
  • stress (float) – The stress experienced by the material (force per unit area, e.g., in Pascals).

  • strain (float) – The dimensionless strain (change in length divided by original length).

Returns:

The Young’s modulus (E) of the material (in Pascals or equivalent units).

Return type:

float

PyGamLab.Functions.archimedes_principle(density_fluid, volume_displaced, gravitational_acceleration)[source]

Calculates the buoyant force acting on an object submerged in a fluid, based on Archimedes’ principle.

Parameters:
  • density_fluid (float) – The density of the fluid in which the object is submerged (e.g., kg/m^3).

  • volume_displaced (float) – The volume of the fluid displaced by the object (e.g., m^3).

  • gravitational_acceleration (float) – The acceleration due to gravity (e.g., m/s^2).

Returns:

The buoyant force acting on the object (e.g., in Newtons).

Return type:

float

PyGamLab.Functions.boltzmann_distribution(energy, temperature, boltzmann_constant)[source]

Calculates the probability of a particle being in a specific energy state according to the Boltzmann distribution.

Parameters:
  • energy (float) – The energy of the specific state.

  • temperature (float) – The temperature of the system in Kelvin.

  • boltzmann_constant (float) – The Boltzmann constant (approximately 1.380649 × 10^-23 J/K).

Returns:

The probability of the particle being in the specified energy state.

Return type:

float

PyGamLab.Functions.boyles_law(initial_volume, initial_pressure, final_volume)[source]

Calculates the final pressure based on Boyle’s Law (assuming constant temperature).

Parameters:
  • initial_volume (float) – The initial volume of the gas.

  • initial_pressure (float) – The initial pressure of the gas.

  • final_volume (float) – The final volume of the gas.

Returns:

The final pressure of the gas.

Return type:

float

PyGamLab.Functions.calculate_debye_temperature(velocity, atomic_mass, density, n_atoms)[source]

Estimate the Debye temperature (θ_D) of a solid material.

Parameters:
  • velocity (float) – Average sound velocity in m/s.

  • atomic_mass (float) – Atomic mass of the element (in g/mol).

  • density (float) – Density of the material (in kg/m^3).

  • n_atoms (int) – Number of atoms per formula unit.

Returns:

Debye temperature in Kelvin (K).

Return type:

float

PyGamLab.Functions.calculate_hardness_from_young_and_poisson(E, nu)[source]

Estimate Vickers hardness (HV) from Young’s modulus and Poisson’s ratio.

Parameters:
  • E (float) – Young’s modulus (GPa).

  • nu (float) – Poisson’s ratio (dimensionless).

Returns:

Estimated Vickers hardness (HV) in GPa.

Return type:

float

PyGamLab.Functions.coulombs_law(charge1, charge2, distance)[source]

Calculates the electrostatic force between two point charges using Coulomb’s Law.

Parameters:
  • charge1 (float) – The magnitude of the first charge (in Coulombs).

  • charge2 (float) – The magnitude of the second charge (in Coulombs).

  • distance (float) – The distance between the two charges (in meters).

Returns:

The electrostatic force between the charges (in Newtons).

Return type:

float

PyGamLab.Functions.darcys_law(flow_rate, permeability, area, pressure_difference)[source]

Calculates the value related to Darcy’s Law for flow through a porous medium. Note: The formula provided returns the difference, not a direct calculation of a single variable.

Parameters:
  • flow_rate (float) – The volumetric flow rate of the fluid through the medium.

  • permeability (float) – The permeability of the porous medium.

  • area (float) – The cross-sectional area through which the fluid is flowing.

  • pressure_difference (float) – The pressure difference across the porous medium.

Returns:

The result of the expression: (permeability * area * pressure_difference) - flow_rate. To solve for a specific variable, rearrange this equation.

Return type:

float

PyGamLab.Functions.doppler_effect(observed_frequency, source_frequency, velocity_observer, velocity_source, speed_of_sound)[source]

Calculates the observed frequency of a wave due to the Doppler effect.

Parameters:
  • observed_frequency (float) – The frequency of the wave as perceived by the observer.

  • source_frequency (float) – The frequency of the wave emitted by the source.

  • velocity_observer (float) – The velocity of the observer relative to the medium (positive if moving towards the source).

  • velocity_source (float) – The velocity of the source relative to the medium (positive if moving away from the observer).

  • speed_of_sound (float) – The speed of the wave in the medium.

Returns:

The calculated observed frequency.

Return type:

float

PyGamLab.Functions.elastic_potential_energy(spring_constant, displacement)[source]

Calculates the elastic potential energy stored in a spring.

Parameters:
  • spring_constant (float) – The spring constant (in Newtons per meter).

  • displacement (float) – The displacement of the spring from its equilibrium position (in meters).

Returns:

The elastic potential energy stored in the spring (in Joules).

Return type:

float

PyGamLab.Functions.entropy_change(heat_transfer, temperature)[source]

Calculates the change in entropy of a system.

Parameters:
  • heat_transfer (float) – The amount of heat transferred to or from the system (in Joules).

  • temperature (float) – The absolute temperature at which the heat transfer occurs (in Kelvin).

Returns:

The change in entropy (in Joules per Kelvin).

Return type:

float

PyGamLab.Functions.faradays_law(induced_emf, time, magnetic_flux)[source]

Calculates a value based on Faraday’s Law of induction. Note: The provided formula returns the difference, not a direct calculation of a single variable.

Parameters:
  • induced_emf (float) – The induced electromotive force (in Volts).

  • time (float) – The time interval over which the change in magnetic flux occurs (in seconds).

  • magnetic_flux (float) – The change in magnetic flux (in Webers).

Returns:

The result of the expression: induced_emf - (time * magnetic_flux). To solve for a specific variable, rearrange this equation based on Faraday’s Law: induced_emf = - d(magnetic_flux) / dt (the negative rate of change of magnetic flux).

Return type:

float

PyGamLab.Functions.gauss_law(electric_field, surface_area, electric_flux)[source]

Calculates a value related to Gauss’s Law for electricity. Note: The provided formula returns the difference, not a direct calculation of a single variable.

Parameters:
  • electric_field (float) – The magnitude of the electric field (e.g., in N/C).

  • surface_area (float) – The area of the closed surface through which the electric field passes (e.g., in m^2).

  • electric_flux (float) – The electric flux through the closed surface (e.g., in N·m^2/C).

Returns:

The result of the expression: (electric_field * surface_area) - electric_flux. According to Gauss’s Law, the electric flux through a closed surface is proportional to the enclosed electric charge: electric_flux = enclosed_charge / permittivity_of_free_space. For a uniform electric field perpendicular to a surface, electric_flux = electric_field * surface_area. To solve for a specific variable, rearrange the appropriate form of Gauss’s Law.

Return type:

float

PyGamLab.Functions.hadamard_product(matrix1, matrix2)[source]

Calculates the Hadamard product (element-wise product) of two matrices.

Parameters:
  • matrix1 (numpy.ndarray) – The first matrix.

  • matrix2 (numpy.ndarray) – The second matrix. Note: The dimensions of matrix1 and matrix2 must be the same for element-wise multiplication.

Returns:

The Hadamard product of the two matrices.

Return type:

numpy.ndarray

PyGamLab.Functions.heat_transfer(thermal_conductivity, area, temperature_difference, thickness)[source]

Calculates the rate of heat transfer through a material by conduction using Fourier’s Law.

Parameters:
  • thermal_conductivity (float) – The thermal conductivity of the material (e.g., in W/(m·K)).

  • area (float) – The cross-sectional area through which heat is transferred (e.g., in m^2).

  • temperature_difference (float) – The temperature difference across the thickness of the material (e.g., in Kelvin).

  • thickness (float) – The thickness of the material through which heat is transferred (e.g., in meters).

Returns:

The rate of heat transfer (in Watts).

Return type:

float

PyGamLab.Functions.hookes_law(spring_constant, displacement)[source]

Calculates the force exerted by a spring according to Hooke’s Law.

Parameters:
  • spring_constant (float) – The spring constant (in Newtons per meter).

  • displacement (float) – The displacement of the spring from its equilibrium position (in meters).

Returns:

The force exerted by the spring (in Newtons).

Return type:

float

PyGamLab.Functions.ideal_diode_equation(current, saturation_current, thermal_voltage)[source]

Calculates a value based on the Ideal Diode Equation (Shockley diode equation). Note: The provided formula returns the difference, not a direct calculation of the voltage across the diode.

Parameters:
  • current (float) – The current flowing through the diode (in Amperes).

  • saturation_current (float) – The reverse saturation current of the diode (in Amperes).

  • thermal_voltage (float) – The thermal voltage (Vt = kT/q), typically around 26 mV at room temperature (in Volts).

Returns:

The result of the expression: current - (saturation_current * (math.exp(current / thermal_voltage) - 1)). The standard form of the Ideal Diode Equation is: current = saturation_current * (exp(voltage / thermal_voltage) - 1). To solve for the voltage across the diode, rearrange this standard equation.

Return type:

float

PyGamLab.Functions.ideal_gas_law(pressure, volume, temperature)[source]

Calculates a value based on the Ideal Gas Law. Note: The provided formula returns the difference, not a direct calculation of the number of moles.

Parameters:
  • pressure (float) – The pressure of the gas (in Pascals).

  • volume (float) – The volume of the gas (in cubic meters).

  • temperature (float) – The temperature of the gas (in Kelvin).

Returns:

The result of the expression: (pressure * volume) - (gas_constant * temperature). According to the Ideal Gas Law: pressure * volume = number_of_moles * gas_constant * temperature. To solve for a specific variable (like the number of moles), rearrange this equation.

Return type:

float

PyGamLab.Functions.is_Pythagorean(a, b, c)[source]
Parameters:
  • a (float) – tool zele aval.

  • b (float) – tool zele dovom.

  • c (float) – tool zele sevom.

  • bedan (Returns be ma mige in adad mitoonan mosalas ghaem alazviye tashkil)

  • nemishe" (ba "mosalas ghaemalzaviye mishe" va" mosalas ghaemalzaviye)

  • -------

PyGamLab.Functions.kinetic_energy(mass, velocity)[source]

Calculates the kinetic energy of an object.

Parameters:
  • mass (float) – The mass of the object (in kilograms).

  • velocity (float) – The velocity of the object (in meters per second).

Returns:

The kinetic energy of the object (in Joules).

Return type:

float

PyGamLab.Functions.lorentz_force(charge, velocity, magnetic_field)[source]

Calculates the magnetic force component of the Lorentz force acting on a moving charged particle.

Parameters:
  • charge (float) – The electric charge of the particle (in Coulombs).

  • velocity (numpy.ndarray) – A 3D vector representing the velocity of the particle (in meters per second).

  • magnetic_field (numpy.ndarray) – A 3D vector representing the magnetic field (in Teslas).

Returns:

A 3D vector representing the magnetic force acting on the particle (in Newtons).

Return type:

numpy.ndarray

PyGamLab.Functions.mass_energy_equivalence(mass)[source]

Calculates the energy equivalent of a given mass using Einstein’s mass-energy equivalence principle (E=mc^2).

Parameters:

mass (float) – The mass (in kilograms).

Returns:

The equivalent energy (in Joules).

Return type:

float

PyGamLab.Functions.maxwells_equations(electric_field, magnetic_field, charge_density, current_density)[source]

Represents a simplified form of two of Maxwell’s equations: Gauss’s law for electricity and Ampère-Maxwell’s law. Note: This function assumes that the div() and curl() methods are defined for the input field objects and returns a tuple representing the differences from zero as stated by the laws in a vacuum (no free charges or currents). For the full equations in media, permittivity and permeability would need to be considered.

Parameters:
  • electric_field (object) – An object representing the electric field, assumed to have a div() method.

  • magnetic_field (object) – An object representing the magnetic field, assumed to have a curl() method.

  • charge_density (float) – The electric charge density (in Coulombs per cubic meter).

  • current_density (object) – An object representing the current density, assumed to be involved in Ampère-Maxwell’s law.

Returns:

A tuple containing two values: - The result of the divergence of the electric field minus the charge density (related to Gauss’s law). - The result of the curl of the magnetic field minus the current density (related to Ampère-Maxwell’s law, neglecting the displacement current term for simplicity as per the input).

Return type:

tuple

PyGamLab.Functions.newtons_second_law(force, mass, acceleration)[source]

Calculates a value based on Newton’s second law of motion. Note: The provided formula returns the difference, not a direct calculation of a single variable.

Parameters:
  • force (float) – The net force acting on the object (in Newtons).

  • mass (float) – The mass of the object (in kilograms).

  • acceleration (float) – The acceleration of the object (in meters per second squared).

Returns:

The result of the expression: force - (mass * acceleration). According to Newton’s second law: force = mass * acceleration. To solve for a specific variable, rearrange this equation.

Return type:

float

PyGamLab.Functions.ohms_law(voltage, current, resistance)[source]

Calculates a value based on Ohm’s law. Note: The provided formula returns the difference, not a direct calculation of a single variable.

Parameters:
  • voltage (float) – The voltage across the conductor (in Volts).

  • current (float) – The current flowing through the conductor (in Amperes).

  • resistance (float) – The resistance of the conductor (in Ohms).

Returns:

The result of the expression: voltage - (current * resistance). According to Ohm’s law: voltage = current * resistance. To solve for a specific variable, rearrange this equation.

Return type:

float

PyGamLab.Functions.pH_Which(pH)[source]

Determines if a solution is acidic, neutral, or basic based on its pH value and prints the result.

Parameters:

pH (float) – The pH value of the solution.

Returns:

This function prints the classification of the solution and does not return a value.

Return type:

None

PyGamLab.Functions.photoelectric_effect(kinetic_energy, photon_energy, work_function)[source]

Calculates a value related to the photoelectric effect. Note: The provided formula returns the difference, not a direct calculation of a single variable.

Parameters:
  • kinetic_energy (float) – The kinetic energy of the emitted electron (in Joules or eV).

  • photon_energy (float) – The energy of the incident photon (in Joules or eV).

  • work_function (float) – The minimum energy required to remove an electron from the surface of the material (in Joules or eV).

Returns:

The result of the expression: kinetic_energy - (photon_energy - work_function). According to the photoelectric effect equation: kinetic_energy_max = photon_energy - work_function. To solve for a specific variable, rearrange this equation.

Return type:

float

PyGamLab.Functions.poisson(transverse_strain, axial_strain)[source]

Calculates Poisson’s ratio of a material under axial stress.

Parameters:
  • transverse_strain (float) – The strain in the direction perpendicular to the applied force (dimensionless).

  • axial_strain (float) – The strain in the direction of the applied force (dimensionless).

Returns:

Poisson’s ratio (v), a dimensionless material property.

Return type:

float

PyGamLab.Functions.predict_phase_from_gibbs(g1, g2, temp)[source]

Predict which phase is thermodynamically favored at a given temperature.

Parameters:
  • g1 (callable) – Gibbs free energy function for phase 1: G(T) in J/mol

  • g2 (callable) – Gibbs free energy function for phase 2: G(T) in J/mol

  • temp (float) – Temperature in Kelvin.

Returns:

Name of the stable phase (“Phase 1”, “Phase 2”, or “Both”).

Return type:

str

PyGamLab.Functions.pythagorean_theorem(a, b)[source]

Calculates the length of the hypotenuse of a right-angled triangle using the Pythagorean theorem.

Parameters:
  • a (float) – The length of one of the shorter sides of the triangle.

  • b (float) – The length of the other shorter side of the triangle.

Returns:

The length of the hypotenuse.

Return type:

float

PyGamLab.Functions.rayleigh_scattering(intensity, wavelength, particle_size)[source]

Calculates a value related to the intensity of Rayleigh scattering. Note: The provided formula returns the difference, not the scattered intensity.

Parameters:
  • intensity (float) – The initial intensity of the incident light.

  • wavelength (float) – The wavelength of the incident light.

  • particle_size (float) – The size of the scattering particles.

Returns:

The result of the expression: intensity - (particle_size / wavelength)**4. The intensity of Rayleigh scattering is actually proportional to (1/wavelength)^4 and the size of the particle. The provided formula doesn’t directly represent the scattered intensity.

Return type:

float

PyGamLab.Functions.root_degree2(a, b, c)[source]

Calculates the real roots of a quadratic equation of the form ax^2 + bx + c = 0.

Parameters:
  • a (float) – The coefficient of the x^2 term.

  • b (float) – The coefficient of the x term.

  • c (float) – The constant term.

Returns:

A tuple containing two real roots (may be equal if delta == 0), or None if no real roots exist.

Return type:

tuple or None

PyGamLab.Functions.rydberg_formula(wavelength, rydberg_constant, principal_quantum_number)[source]

Calculates a value related to the Rydberg formula for the wavelengths of spectral lines of hydrogen-like atoms. Note: The provided formula returns the difference, not the inverse of the wavelength.

Parameters:
  • wavelength (float) – The wavelength of the emitted photon.

  • rydberg_constant (float) – The Rydberg constant for the atom.

  • principal_quantum_number (float) – The principal quantum number of the energy level.

Returns:

The result of the expression: (1 / wavelength) - (rydberg_constant * principal_quantum_number**2). The standard Rydberg formula is: 1/wavelength = Rydberg_constant * (1/n1^2 - 1/n2^2), where n1 and n2 are principal quantum numbers.

Return type:

float

PyGamLab.Functions.uncertainty_principle(delta_position, delta_momentum, hbar)[source]

Calculates a value related to the Heisenberg uncertainty principle. Note: The provided formula returns the difference, not a direct evaluation of whether the principle is satisfied.

Parameters:
  • delta_position (float) – The uncertainty in the position of a particle.

  • delta_momentum (float) – The uncertainty in the momentum of the particle.

  • hbar (float) – The reduced Planck constant (h / 2π).

Returns:

The result of the expression: (delta_position * delta_momentum) - (hbar / 2). The Heisenberg uncertainty principle states that the product of the uncertainty in position and the uncertainty in momentum must be greater than or equal to hbar / 2: delta_position * delta_momentum >= hbar / 2. This function calculates the left-hand side minus the right-hand side. A non-negative result indicates that the principle is satisfied (within the limits of equality).

Return type:

float

PyGamLab.Functions.wavelength_frequency_relation(speed_of_light, wavelength, frequency)[source]

Calculates a value based on the relationship between the speed of light, wavelength, and frequency of an electromagnetic wave. Note: The provided formula returns the difference, not a direct calculation of one of the variables.

Parameters:
  • speed_of_light (float) – The speed of light in the medium (e.g., approximately 3e8 m/s in a vacuum).

  • wavelength (float) – The wavelength of the electromagnetic wave (e.g., in meters).

  • frequency (float) – The frequency of the electromagnetic wave (e.g., in Hertz).

Returns:

The result of the expression: speed_of_light - (wavelength * frequency). The actual relationship is: speed_of_light = wavelength * frequency. To solve for a specific variable, rearrange this equation.

Return type:

float

PyGamLab.Functions.youngs_modulus(stress, strain)[source]

Calculates a value based on the difference between stress and strain. Note: This is not the standard formula for Young’s modulus.

Parameters:
  • stress (float) – The stress experienced by the material.

  • strain (float) – The strain of the material.

Returns:

The difference between stress and strain.

Return type:

float

PyGamLab.Data_Analysis module

@author: Ali Pilehvar Meibody (Alipilehvar1999@gmail.com)

888 888

.d8888b .d88b. 88888b.d88b. 888 .d88b. 888

d88P” d88””88b 888 “888 “88b 888 d88””88b 88888PP 888 8888 888 888 888 888 888 888 888 888 888 888 Y88b. 88 Y88..88PP. 888 888 888 888…… Y88..88PP. 888 888

“Y8888P8 “Y88P8888 888 888 888 888888888 “Y88P8888 88888888

@Director of Gamlab: Professor M. Naderi (Mnaderi@aut.ac.ir)

@Graphene Advanced Material Laboratory: https://www.GamLab.Aut.ac.ir

@Co-authors:

PyGamLab.Data_Analysis.Blood_Pressure(data1, operation)[source]

Blood is divided into two main values: systolic blood pressure and diastolic blood pressure. Systolic blood pressure represents the blood pressure at the moment the heart muscle contracts, while diastolic blood pressure represents the blood pressure at the moment the heart muscle relaxes.

This function gives us their average systolic and diastolic blood pressure And it shows us the blood pressure chart of 40-year-old Balinese people

data1int

systolic,diastolic

operation : strig operator Returns ——- None.

PyGamLab.Data_Analysis.Brain_Data_example()[source]

This function prompts the user to input values for sudiom and potasiom along with time increments, creates a DataFrame with the provided data, and returns it.

PyGamLab.Data_Analysis.Brain_Plot_3D(df)[source]

This function takes a DataFrame containing sudiom, potasiom, and time data and plots them in both 2D and 3D. It also compares the mean values of sudiom and potasiom to decide which one to plot in 3D.

PyGamLab.Data_Analysis.CV(data=None, Application=None, is_reversible=None)[source]
Parameters:
  • data (DataFrame) – Enter your .csv format file as pd.DataFrame. Data is the potential vs. current density expoted from the potentiostate device to study electrochemical of your fabricated electrode. To use this function correctly, the potential column should named as ‘P’ and your current density column should named as ‘C’

  • Application (str) – Please enter the application you want to do for your data, including: plot, maxcurrent, peakpotential, charge, and Diffusion-coefficient.

  • is_reversible (bool, optional) – If your reaction id reversible please enter ‘True’, and if the reaction is irreversible enter ‘False’ to calculate the Diffusion coefficient for your reaction.

  • potential) (Application=plot (type=plot)--> Plot a cyclic voltammogram (current density vs.)

  • maximum. (Application= maxcurrent (type=float)--> the function returns the peak of current that the current density id)

  • current. (Application= peakpotential (type=float)--> the function returns the potential which attributed to maxmum current or peak)

  • plot. (Application=charge (type=float)--> The function returns the charge corresponding to the integration of the)

  • reaction. (Application=Diffusion_coefficient (type=float)--> The function returns the value according the andles-Sevcik aquation depends on reversiblly of irreversibly of)

PyGamLab.Data_Analysis.Color_Feature(filee, kar)[source]
Parameters:
  • filee (DataFrame) – data from excel.

  • kar (str) – plot or calculate?

  • Returns

  • delta_E (a number as a)

PyGamLab.Data_Analysis.Compression_Test(Data, Operator, Sample_Name, Density=0)[source]
Parameters:
  • Data (DataFrame) – Compression test data including stress and strain.

  • Operator (str) – The action that needs to be done on the data (plot or S_max). plot: Plots a stress-strain diagram.

  • Sample_Name (str) – Sample name.

  • Density (float, optional) – Density of the sample. The default is 0.

Returns:

If the operator is given S_max, it returns maximum strength. If the operator is given S_max/Density, it returns specific maximum strength.

Return type:

float

PyGamLab.Data_Analysis.Conversion(data, app)[source]

This program is related to a chemical reaction laboratory, which has been measured in a table at a certain temperature, pressure and time, with a one-second interval,and gives you the highest conversion percentage at a given temperature and pressure. It also draws graphs of conversion percentage, temperature and pressure in terms of time.

Parameters:
  • data (DataFrame of pandas or array of numpy) – please be careful about the inputs: your table should contain about 100 index and 4 columns.

  • app (str) – Only write “PLOT_TEMP” if you want to draw the figure tempreturre over time,else if you want to draw pressure on time write ‘PLOT_pressure’ or write ‘PLOT_CONVERSION’ if you want the conversion on time figure. or write “MAXIMUM CONVERSION” if you want the maximum number of conversions at a specific temperature and pressure. Otherwise, you will see the error message below.

  • TypeError – The datas or application is not entered correctly

Returns:

index_max_conv – this will gives you the highest convertion index.

Return type:

str

PyGamLab.Data_Analysis.DMTA_Test(Data2, Operator, Sample_Name)[source]
Parameters:
  • Data (DataFrame) – DMTA test data including storage modulus, loss modulus and tanδ.

  • Operator (str) – The action that needs to be done on the data (storage_max, loss_max, tan_max, plot_storage, plot_loss or plot_tan).

  • Sample_Name (str) – Sample name.

Returns:

If the operator is given storage_max, it returns maximum storage modulus. If the operator is given loss_max, it returns maximum loss modulus. If the operator is given Tan_max, it returns maximum Tanδ.

Return type:

float

PyGamLab.Data_Analysis.Desulfurization_Rate(Data, application)[source]
Parameters:
  • Data (Data Frame) – experimental data (excel).

  • application – 1.plot 2.Max_Removal_With_Ultrasonic 3.Max_Removal_Without_Ultrasonic

  • Returns

PyGamLab.Data_Analysis.Diabetes_Dataset(f, work)[source]

Reads a diabetes dataset from a CSV file

Parameters:
  • f (str) – The file path of the CSV file containing the diabetes dataset.

  • work (str) – The task to perform. Supported values are: - ‘has_diabetes’: Counts the number of individuals who have diabetes. - ‘percent_has_diabetes_25’: Calculates the percentage of individuals under 25 who have diabetes. - ‘percent_has_diabetes_25_to_30’: Calculates the percentage of individuals between 25 to 30 who have diabetes. - ‘percent_has_diabetes_30_to_40’: Calculates the percentage of individuals between 30 to 40 who have diabetes. - ‘percent_has_diabetes_40_and_50’: Calculates the percentage of individuals between 40 to 50 who have diabetes. - ‘percent_has_diabetes_20_to_40’: Calculates the percentage of individuals between 20 to 40 who have diabetes. - ‘percent_has_diabetes_30_to_50’: Calculates the percentage of individuals between 30 to 50 who have diabetes. - ‘percent_has_diabetes_50_80’: Calculates the percentage of individuals between 50 to 80 who have diabetes. - ‘rel_bmi_to_diabetes_30_to_40’: Calculates the percentage of individuals with BMI between 30 to 40 who have diabetes. - ‘rel_bmi_to_diabetes_20_to_30’: Calculates the percentage of individuals with BMI between 20 to 30 who have diabetes. - ‘histo’: Plots a histogram of ages. - ‘max_age’: Finds the maximum age in the dataset. - ‘min_age’: Finds the minimum age in the dataset. - ‘max_age_has_diabetes’: Finds the individuals with the maximum age who have diabetes. - ‘min_age_has_diabetes’: Finds the individuals with the minimum age who have diabetes.

PyGamLab.Data_Analysis.Echelon_Matrix(data, ap)[source]

یک ماتریس 90در 200 داریم که مثلا 200 مولفه را در مورد سلامت نود نفر جمع آوری کردیم و حالا میخواهیم ببینیم که کدوم یکی از این مولفه ها اضافی هستند و اطلاعات خوبی از سلامتی افراد نمیده. هدفمون اینه که ماتریس را به صورت سطری پلکانی در آوریم یعنی بالا مثلثیش کنیم و مولفه های مهم رو پیدا کنیم. :type data: :param data: This is a matrix with more than 50 rows and columns. :type data: float :type ap: :param ap: plot agar bashe, rasm mikoneh, ertebat sotoone 10 , 50 ro ba ham va agar

up bood matrix ra be soorat satri pelekani mikonad.

Returns:

A – This is a triangular matrix.

Return type:

float

PyGamLab.Data_Analysis.Energie(input_file, which)[source]

This is a function to drawing a plot or to calculating the amount of Energie of a Motor to (open/close) a Valve in a cycle, which takes 2.7 secound to open and to close.

whichint

draw : Drawing a Plot calculate : Calculate the Consupmtion Energie in [mWs] please say which work we do ( 1 or 2).

PyGamLab.Data_Analysis.Energie2(input_file, which)[source]

This is a function to drawing a plot or to calculating the amount of Energie of a Motor to (open/close) a Valve in a cycle, which takes 2.7 secound to open and to close.

whichint

1 : Drawing a Plot 2 : Calculate the Consupmtion Energie in [mWs] please say which work we do ( 1 or 2).

PyGamLab.Data_Analysis.FTIR(data1, application, prominence=0.5, distance=10, save=False)[source]
PyGamLab.Data_Analysis.Fatigue_Test_Analysis(data, application)[source]
Parameters:
  • data (data is the exel file with the two columns (stress_amplitude column and number_of_cycles column))

  • application (plot , max stress amplitude , fatigue strength , fatigue life , stress in one cycle , Sa ,) – fatigue limit , std stress , std cycles

Returns:

  • plot (S-N plot)

  • fatigue strength (استحکام خستگی)

  • fatigue life (عمر خستگی)

  • stress in one cycle (Basquin’s equation to define B constant.The B is the value of the stress at one cycle.)

  • Sa (max stress amplitude in cycle.)

  • fatigue limit (The time of cycle that stress no change.)

  • std stress (انحراف معیار تنش‌ها)

  • std cycles (انحراف معیارا سیکل‌ها)

PyGamLab.Data_Analysis.Find_Max_Vertical_Velocity(data)[source]

This function gets the data results of flow velocity simulation for natural convection of a molten in a cavity. and as the output, it shows the plot of flow velocity vs x and also it returns the maximum velocity and the location where that velocity belogs to.

PyGamLab.Data_Analysis.Gradient_descent(dataset, which, alpha=0.001)[source]
Parameters:
  • dataset (str) – path of your data set .

  • which (str) – plot or cost(calculuates how much error is there in the prediction).

  • alpha (float, optional) – the learning rate(the size of the baby step that we will take for each of the variables). The default is 0.001.

PyGamLab.Data_Analysis.Imerssion_Test(data, application)[source]
Parameters:
  • data (.excel .csv)

  • name (columns)

  • application – plot:drawing the changes of weight(%) on time(days) More_Bioactive: the sample with more weight gain in result more bioactive Less_Bioactive: the sample with more weight loss in result less bioactive

PyGamLab.Data_Analysis.Import_Data(File_Directory=None)[source]
PyGamLab.Data_Analysis.Income_Developer(file, work)[source]

Reads income data from a CSV file and displays graphs based on the specified task.

Parameters:
  • file (str) – The file path of the CSV file containing the income dataset.

  • work (str) – The task to perform. Supported values are:

  • 'plot_data' (-) – Displays a line plot of income over age for Python and JavaScript developers.

  • 'bar_data' (-) – Displays a bar plot of income over age for Python and JavaScript developers.

  • 'max_salary_data' (-) – Displays a bar plot showing the maximum income for Python and JavaScript developers.

  • 'plot_bar_data' (-) – Displays both bar and line plots of income over age for Python and JavaScript developers.

  • 'max_salary_data_by_age' (-) – Displays a bar plot showing the maximum income for Python and JavaScript developers based on age.

  • 'alph_data' (-) – Displays a bar plot with different alpha values for Python and JavaScript developers.

  • 'show_by_side_by_side_data' (-) – Displays two bar plots side by side for Python and JavaScript developers with age on the x-axis and income on the y-axis.

PyGamLab.Data_Analysis.LN_S_E(df, operation)[source]

This function plots the ELASTIC part of the true stress-strain curve and can also calculate the Young’s Modulus(E). ———- df : DataFrame

It has 2 columns: DL(which is length in mm) & F (which is the force in N).

operation :

It tells the function to whether Plot the curve or calculate the Young’s Modulus(E).

Return type:

The elastic part of the true stress-strain curve or the amount of E

PyGamLab.Data_Analysis.Load_Position_Convertor(Data, Operation, Area, Length)[source]

This function receives an input file containing Load-Position data, as well as the cross-sectional area and gauge length of the part, and according to the user’s needs, it can: 1-Load-Position Curve (LPC) 2-Stress-Strain Calculation (SSCal) 3-Stress-Strain Curve (SSC) 4-Normalized Stress-Strain Calculation (NSSCal) 5-Normalized Stress-Strain Curve (NSSC) 6-Energy Absorption Density Calculation (EADCal)

Parameters:
  • Data (xlsx) – Need two columns containing Load-Position information.

  • Operation (str) – It specifies the process that should be performed on the entered information.

  • Area (float) – The surface examined in the tensile or compression test.

  • Length (TYPE) – Gauge length checked in tension or compression test.

Returns:

EAD – Energy absorption desity of meta-materials such as metal foams.

Return type:

float

PyGamLab.Data_Analysis.Membrane_Rejection(Experimental_Datas)[source]
PyGamLab.Data_Analysis.New_Case_Corona_Propotion(data, operation)[source]
Parameters:
  • data (Csv File) – data hayi darbare amar corona virus dar keshvar haye mokhtalef

  • operation (az beyn "plot" va "nesbat" yeki ra mitavanid entekhab konid) – in tabe nesbat new case haye coronavirus be case haye ghabli ra ba “plot” rasm mikonad va ba “nesbat” return mikonad

PyGamLab.Data_Analysis.Oxygen_Heat_Capacity_Analysis(file_path)[source]

This function reads the temperature and heat capacity information from the Excel file and then calculates the enthalpy and entropy values and draws their graphs.

Parameters: T: Oxygen temperature Cp: Heat capacity at constant pressure in different oxygen temperature ranges

Return: The values of enthalpy, entropy and their graph according to temperature Heat capacity graph according to temperature

PyGamLab.Data_Analysis.Particles_Size(filee1, kar1)[source]
Parameters:
  • filee1 (DataFrame) – Data from excel.

  • kar1 (str) – plot or calculation.

  • Returns

  • diagram. (a number as an average size or plot a)

PyGamLab.Data_Analysis.Polarization(b, work)[source]

d: dadehaye azmayeshgah shmele ghegaliye jaryan va potansiel hastand.

PyGamLab.Data_Analysis.Pore_Size(g_loc, A, P, Vis=0.0008900000000000001)[source]

A=shows the membrane effective surface area (m2)

P : indicates the utilized operational pressure (Pa)

Vis : represents the water viscosity (Pa⋅s). The default is 8.9*1e-4.

Returns the Pore Size of membranes in nm

PyGamLab.Data_Analysis.Porosity(e_loc, Density=1)[source]

Ww : weight of wet samples (g)

Wd : weight of dry samples (g)

V : denotes the sample volume (cm3)

Density : is the water density (g/cm3).The default is 1.

Returns the porosity of membranes

PyGamLab.Data_Analysis.Price_BTC(Data, application)[source]
Parameters:
  • Data (int) – This function needs an excel with two columns (Price and Date)

  • application (str) –

    These are some ways you can use this function :

    plot Max_Price Max_Date Min_Price Min_Price

Returns:

plot of price per date Date of Maximum and minimum Price

Return type:

Plot and int

PyGamLab.Data_Analysis.Price_Change(data, operation)[source]
Parameters:
  • data (Csv File) – data ha darbare vizhegi haye gheymat yek saham dar yek rooz mibashad

  • descrription

  • operation (az beyn "mohasebe" va "plot"yeki ra entekhab konid)

  • migirad (in function bishtarin va kamtarin gheymat saham dar yek rooz ra)

  • "mohasebe" (va damane taghyirat gheymat ra ba "plot"rasm mikonad va ba)

  • mikonad (return)

PyGamLab.Data_Analysis.Product_Of_Vectors(data, app)[source]

do bordar (two vectors) be onvane voroodi migirad, va anha ra baham zarb mikonad.

Parameters:
  • data (float) – yek matrix ba do sotoon ast ke sotoone aval, bordar avval, va digari bordar dovvom.

  • app (str) – plot agar bashe, rasm mikoneh, ertebat do bordar ro ba ham va agar calculate bood zarb dakheli bordar avval ba tranahadeh bordar dovvom ra mohasebeh mikonad.

Returns:

output – Production of vectors.

Return type:

float

PyGamLab.Data_Analysis.Pulse(data2, operation)[source]

This function gives us the maximum and minimum pulse of people over forty years old in the test and draws the pulse graph of people. And by using the frequency of the pulses, it is obtained

Parameters:
  • data2 (int) – Pulse

  • operation (string) – operator

Return type:

None.

PyGamLab.Data_Analysis.SI_Calculation(f_loc, P, PC, Density=1)[source]

This function is used for Separation Index Calculation

P : Pressure (bar)

Density : Feed Density(g/cm3)

PC : Pollutant concentration in Feed (g/L)

Returns Separation Index and Flux & Rejection & Rejection Charts

PyGamLab.Data_Analysis.Sakhti_ab(data)[source]
Parameters:

data (exel) – شامل تمامی داده های مورد نیاز برای بررسی سختی آب میباشد.

Returns:

  • data (plot) – plot mizan sakhti ab dar nemoone ha.

  • arraye – jadval nahayi.

PyGamLab.Data_Analysis.Signal_To_Noise_Ratio(data, application)[source]
Parameters:
  • data (DataFrame) –

    consists of your experimental data in 3 columns:

    1- location: the place you’ve measured signal and noise 2- signal strength: the power of signal in dbm 3- noise power: the power of noise in dbm

  • application (string) –

    there is 3 application available:

    1- plot signal: plots signal column 2- plot noise: plots noise column 3- plot SNR: plots the signal-to-noise ratio

Returns:

mx – the maximum signal-to-noise ratio in dbm

Return type:

float

PyGamLab.Data_Analysis.Solidification_Start(data, Temp_sol)[source]

This function gets the temperature values of a molten along with its solidus temperature as inputs, and if the solidification process has started it returns true and if not it returns false. it also plots the temperature values in the center line. note that this function has simplified the problem and many other parameters should be taken into consideration.

PyGamLab.Data_Analysis.Statitical_Analysis(data, operation)[source]

this function calculate quantile, IQR, min, max, median,and zscore for each features of data set. also it is presented plot. ———————————————————– :type data: :param data: :type data: data frame :param opertaion: possible values:.

  1. statistics

  2. histogram

3. correlation 4.pairplot

Returns:

  • 1. quantile

  • 2. min

  • 3. max

  • 4. median

  • 5. zscore

  • 6. determined plot

PyGamLab.Data_Analysis.Stress_Strain1(df, operation, L0=90, D0=9)[source]

This function gets data and an operation . It plots Stress-Strain curve if the oepration is plot and finds the UTS value (which is the ultimate tensile strength) otherwise. —————————— :type df: :param df: It has 2 columns: DL(which is length in mm) & F (which is the force in N). :type df: DataFrame :type operation: :param operation: It tells the function to whether PLOT the curve or find the UTS valu.

L0: initial length of the sample D0: initial diameter of the sample

Return type:

The Stress-Strain curve or the amount of UTS

PyGamLab.Data_Analysis.Stress_Strain2(input_file, which, count)[source]

This function claculates the stress and strain Parameters from load and elongation data ———- input_file : .csv format

the file must be inserted in csv.

whcihstr

please say which work we do ( plot or calculate?).

count: int

please enter the yarn count in Tex

remember: gauge length has been set in 250 mm

PyGamLab.Data_Analysis.Stress_Strain3(input_data, action)[source]
PyGamLab.Data_Analysis.Stress_Strain4(file_path, D0, L0)[source]

This function uses the data file that contains length and force, calculates the engineering, true and yielding stress and strain and also draws a graph of these.

Parameters: D0(mm): First Qatar to calculate stress L0(mm): First Length to canculate strain F(N): The force applied to the object during this test DL(mm): Length changes

Returns: Depending on the operation selected, it returns calculated values, plots, advanced analysis, or saves results.

PyGamLab.Data_Analysis.Stress_Strain5(input_data, action)[source]
PyGamLab.Data_Analysis.Stress_Strain6(data, application)[source]

this function converts F and dD to Stress and Strain by thickness(1.55mm), width(3.2mm) and parallel length(35mm).

Parameters:
  • data (DataFrame) – this DataFrame contains F(N) and dD(mm) received from the tensil test machine.

  • application (str) – application determines the expected output of Stress_Strain function.

Returns:

return may be elongation at break, strength or a plot.

Return type:

int, float or plot

PyGamLab.Data_Analysis.Tensile_Analysis(dataframe, gauge_length=1, width=1, thickness=1, application='plot-force', save=False)[source]

Parameters: - dataframe: raw data from Excel (Force vs Displacement) - gauge_length: Initial length of the sample in mm - width: Width of the sample in mm - thickness: Thickness of the sample in mm - application: ‘plot-force’ or ‘plot-stress’ - save: True to save the plot - show_peaks: True to annotate peaks (e.g. UTS) - fname: Filename to save if save=True

PyGamLab.Data_Analysis.Tortuosity(e_loc)[source]

Returns the Pore Tortuosity of membranes

PyGamLab.Data_Analysis.Wear_Bar(list_1, work='bar')[source]
PyGamLab.Data_Analysis.Wear_Rate(w, work, S, F)[source]

w : dataframe contains 2 columns bayad shamele 2 soton bashad ke dar yek soton vazn nemoone ghabl az test andazegiri shavad , dar yek soton vazne nemone pas az etmame test.

S haman masate laghzesh hine azmone sayesh ast. S bayad bar hasbe metr bashad.

F barabare niroyee ast ke be pin vared shode ast , azmon ba an anjam shode ast. F bayad bar hasbe newton bashad

PyGamLab.Data_Analysis.XRD4(data, application)[source]

This function plots the XRD curve .

Parameters:
  • data (DataFrame) – data is XRD data include Intensity (a.u.) and 2θ (degree).

  • application (str) –

    application is the function that you want to apply to your data:
    • plot : ُPlot the XRD curve

    • maxintensity : Determining the maximum intensity.

    • meantheta : Determining the mean of theta angles.

Return type:

plot, maxintensity, meantheta

PyGamLab.Data_Analysis.XRD_Analysis(file, which, peak=0)[source]
Parameters:
  • file (str) – the variable in which you saved the .cvs file path

  • which (str) – which operation you want to perform on the file

  • peak (float, optional) – 2θ for the peak you want to analyse. The default is 0.

Returns:

fwhm – value of FWHM for the peak you specified.

Return type:

float

PyGamLab.Data_Analysis.XRD_Analysis2(file, which, peak=0)[source]
Parameters:
  • file (str) – the variable in which you saved the .cvs file path

  • which (str) – which operation you want to perform on the file

  • peak (float, optional) – 2θ for the peak you want to analyse. The default is 0.

Returns:

fwhm – value of FWHM for the peak you specified.

Return type:

float

PyGamLab.Data_Analysis.XRD_ZnO(XRD, application)[source]
Parameters:
  • XRD (DataFrame) – Data containing XRD data.

  • application (str) – Type of application ‘plot’,’FWHM’,’Scherrer’. plot:To draw the figure. FWHM:Width at Half Maximum. Scherrer:To calculate the crystallite size.

  • Returns

  • FWHM

  • Scherrer

  • -------

  • None.

PyGamLab.Data_Analysis.Xrd_Analysis(data, operation)[source]

XRD is a nondestructive technique that provides detailed information about the crystallographic structure, chemical ———————————————————– composition, and physical properties of a material this function return max intensity of xrd pattern and degree of difraction. also based on user requierment return specified plot. statistics analysis is presented too. ———————————————————- :type data: :param data:

data set include tow features:
  1. degree (2* degree of difraction)

  2. intensity

Parameters:

operation (str) –

determine an operation which apply on data possible values:

max intensity scatter plot line graph line graph fill between

Returns:

  • max intensity and degree of max intensity

  • or

  • plot

PyGamLab.Data_Analysis.aerospace2(CSV, which)[source]

this function has the ability to convert your datas into answers that you need your datas should be in Newton and M**2 format in this program we will be using presure as the output data if you want to make a sketch Use === Plot if you want to check the max_presure use === MaxPer

PyGamLab.Data_Analysis.aerospace_analysis(CSV, which)[source]

this function has the ability to convert your datas into answers that you need your datas should be in Newton and M**2 format in this program we will be using presure as the output data if you want to make a sketch Use === Plot if you want to check the max_presure use === MaxPer

PyGamLab.Data_Analysis.fatigue(f_loc, which)[source]
PyGamLab.Data_Analysis.polarization_control(Data, Application)[source]
Parameters:
  • Data (DataFrame : The results of the polymerization of a polymer control laboratory are given) –

    that included four columns: time, temperature, pressure,

    and reaction percentage of the polymer product.

    DESCRIPTION.

  • Application (float) – Six applications are done in this function. 1) Application = ‘temp_time’ : Temperature is plotted according to time. 2) Application = ‘pressure_time’ : Pressure is plotted according to time. 3) Application = ‘Percent_time’ : The percentage of reaction is plotted over time. 4) Application = ‘100% reaction’: If the percentage of polymerization reaction proceed to 100, the temperature and pressure of polymerization is printed and returned. 5) Application = ‘Max_pressyre’: It returns maximum pressure of process. 6) Application = ‘Max_temp’: It returns maximum temperature of process.

Returns:

It returns temperature and pressure of process according to related application.

Return type:

float

PyGamLab.Data_Analysis.pressure_volume_ideal_gases(file, which)[source]

By using this function, the relationship between pressure and volume of ideal gases in thermodynamic will be shown.

input_file.csv format

*the file must be inserted in csv.

whhch: str

what do you want this function to do?

Module contents

@author: Ali Pilehvar Meibody (Alipilehvar1999@gmail.com)

888 888

.d8888b .d88b. 88888b.d88b. 888 .d88b. 888

d88P” d88””88b 888 “888 “88b 888 d88””88b 88888PP 888 8888 888 888 888 888 888 888 888 888 888 888 Y88b. 88 Y88..88PP. 888 888 888 888…… Y88..88PP. 888 888

“Y8888P8 “Y88P8888 888 888 888 888888888 “Y88P8888 88888888

@Director of Gamlab: Professor M. Naderi (Mnaderi@aut.ac.ir)

@Graphene Advanced Material Laboratory: https://www.GamLab.Aut.ac.ir