def _debye_parameter_B(temperature='25 degC'): ''' Return the constant B used in the extended Debye-Huckel equation Parameters ---------- temperature : str Quantity, optional String representing the temperature of the solution. Defaults to '25 degC' if not specified. Notes ----- The parameter B is equal to: [#]_ .. math:: B = ( {8 \\pi N_A e^2 \\over 1000 \\epsilon k T} ) ^ {1 \\over 2} .. [#] Bockris and Reddy. /Modern Electrochemistry/, vol 1. Plenum/Rosetta, 1977, p.210. Examples -------- >>> _debye_parameter_B() #doctest: +ELLIPSIS 0.3291... ''' # TODO - fix this and resolve units param_B = ( 8 * math.pi * unit.avogadro_number * unit.elementary_charge ** 2 / (h2o.water_density(unit(temperature)) * unit.epsilon_0 * h2o.water_dielectric_constant(unit(temperature)) * unit.boltzmann_constant * unit(temperature)) )** 0.5 return param_B.to_base_units()
def _debye_parameter_activity(temperature="25 degC"): """ Return the constant A for use in the Debye-Huckel limiting law (base 10) Parameters ---------- temperature : str Quantity, optional String representing the temperature of the solution. Defaults to '25 degC' if not specified. Returns ------- Quantity The parameter A for use in the Debye-Huckel limiting law (base e) Notes ----- The parameter A is equal to: [#]_ .. math:: A^{\\gamma} = {e^3 ( 2 \\pi N_A {\\rho})^{0.5} \\over (4 \\pi \\epsilon_o \\epsilon_r k T)^{1.5}} Note that this equation returns the parameter value that can be used to calculate the natural logarithm of the activity coefficient. For base 10, divide the value returned by 2.303. The value is often given in base 10 terms (0.509 at 25 degC) in older textbooks. References ---------- .. [#] Archer, Donald G. and Wang, Peiming. "The Dielectric Constant of Water \ and Debye-Huckel Limiting Law Slopes." /J. Phys. Chem. Ref. Data/ 19(2), 1990. Examples -------- >>> _debye_parameter_activity() #doctest: +ELLIPSIS 1.17499... See Also -------- _debye_parameter_osmotic """ debyeparam = ( unit.elementary_charge ** 3 * (2 * math.pi * unit.avogadro_number * h2o.water_density(unit(temperature))) ** 0.5 / ( 4 * math.pi * unit.epsilon_0 * h2o.water_dielectric_constant(unit(temperature)) * unit.boltzmann_constant * unit(temperature) ) ** 1.5 ) logger.info("Computed Debye-Huckel Limiting Law Constant A^{\\gamma} = %s at %s" % (debyeparam, temperature)) return debyeparam.to("kg ** 0.5 / mol ** 0.5")
def _debye_parameter_activity(temperature="25 degC"): """ Return the constant A for use in the Debye-Huckel limiting law (base 10) Parameters ---------- temperature : str Quantity, optional String representing the temperature of the solution. Defaults to '25 degC' if not specified. Returns ------- Quantity The parameter A for use in the Debye-Huckel limiting law (base e) Notes ----- The parameter A is equal to: [#]_ .. math:: A^{\\gamma} = {e^3 ( 2 \\pi N_A {\\rho})^{0.5} \\over (4 \\pi \\epsilon_o \\epsilon_r k T)^{1.5}} Note that this equation returns the parameter value that can be used to calculate the natural logarithm of the activity coefficient. For base 10, divide the value returned by 2.303. The value is often given in base 10 terms (0.509 at 25 degC) in older textbooks. References ---------- .. [#] Archer, Donald G. and Wang, Peiming. "The Dielectric Constant of Water \ and Debye-Huckel Limiting Law Slopes." /J. Phys. Chem. Ref. Data/ 19(2), 1990. Examples -------- >>> _debye_parameter_activity() #doctest: +ELLIPSIS 1.17499... See Also -------- _debye_parameter_osmotic """ debyeparam = (unit.elementary_charge**3 * (2 * math.pi * unit.avogadro_constant * h2o.water_density(unit(temperature)))**0.5 / (4 * math.pi * unit.epsilon_0 * h2o.water_dielectric_constant(unit(temperature)) * unit.boltzmann_constant * unit(temperature))**1.5) logger.info( "Computed Debye-Huckel Limiting Law Constant A^{\\gamma} = %s at %s" % (debyeparam, temperature)) return debyeparam.to("kg ** 0.5 / mol ** 0.5")