def ordinary_diffusion(target, pore_diffusivity="pore.diffusivity", throat_diffusivity="throat.diffusivity", size_factors="throat.diffusive_size_factors"): r""" Calculates the diffusive conductance of conduits in network. A conduit is defined as (1/2 pore - full throat - 1/2 pore). Parameters ---------- target : GenericPhysics Physics object with which this model is associated. pore_diffusivity : str Dictionary key of the pore diffusivity values. throat_diffusivity : str Dictionary key of the throat diffusivity values. size_factors: str Dictionary key of the conduit diffusive size factors' values. Returns ------- ndarray Array containing diffusive conductance values for conduits in the geometry attached to the given physics object. """ return _poisson_conductance(target=target, pore_conductivity=pore_diffusivity, throat_conductivity=throat_diffusivity, size_factors=size_factors)
def series_resistors(target, pore_thermal_conductivity='pore.thermal_conductivity', throat_thermal_conductivity='throat.thermal_conductivity', size_factors='throat.diffusive_size_factors'): r""" Calculate the thermal conductance of conduits in network, where a conduit is (1/2 pore - full throat - 1/2 pore). See the notes section. Parameters ---------- target : GenericPhysics The object which this model is associated with. This controls the length of the calculated array, and also provides access to other necessary properties. pore_conductivity : str Dictionary key of the pore thermal conductivity values throat_conductivity : str Dictionary key of the throat thermal conductivity values size_factors: str Dictionary key of the conduit diffusive size factors' values. Returns ------- g : ndarray Array containing thermal conductance values for conduits in the geometry attached to the given physics object. Notes ----- This function requires that all the necessary phase properties already be calculated. """ return _poisson_conductance( target=target, pore_conductivity=pore_thermal_conductivity, throat_conductivity=throat_thermal_conductivity, size_factors=size_factors)
def poisson(target, pore_permittivity='pore.permittivity', throat_permittivity='throat.permittivity', size_factors='throat.diffusive_size_factors'): r""" Calculate the ionic conductance of conduits in network (using the Poisson equation for charge conservation), where a conduit is (1/2 pore - full throat - 1/2 pore). See the notes section. Parameters ---------- target : GenericPhysics Physics object with which this model is associated. pore_permittivity : str Dictionary key of the pore permittivity values. throat_permittivity : str Dictionary key of the throat permittivity values. size_factors: str Dictionary key of the conduit size factors' values. Returns ------- g : ndarray Array containing ionic conductance values for conduits in the geometry attached to the given physics object. Notes ----- This function requires that all the necessary phase properties already be calculated. """ epsilon0 = 8.854187817e-12 tmp = _poisson_conductance(target=target, pore_conductivity=pore_permittivity, throat_conductivity=throat_permittivity, size_factors=size_factors) return tmp * epsilon0
def mixed_diffusion(target, pore_diameter="pore.diameter", throat_diameter="throat.diameter", pore_diffusivity="pore.diffusivity", throat_diffusivity="throat.diffusivity", pore_temperature="pore.temperature", throat_temperature="throat.temperature", molecular_weight="pore.molecular_weight", size_factors="throat.diffusive_size_factors"): r""" Calculates the diffusive conductance of conduits in network with Knudsen correction. A conduit is defined as (1/2 pore - full throat - 1/2 pore). See Notes section for the limitations of this method. Parameters ---------- target : GenericPhysics Physics object with which this model is associated. pore_diameter : str Dictionary key of the pore diameter values. throat_diameter : str Dictionary key of the throat diameter values. pore_diffusivity : str Dictionary key of the pore diffusivity values. throat_diffusivity : str Dictionary key of the throat diffusivity values. pore_temperature : str Dictionary key of the pore temperature values. throat_temperature : str Dictionary key of the throat temperature values. molecular_weigth : str Dictionary key of the pore molecular weight values. size_factors: str Dictionary key of the conduit diffusive size factors' values. Returns ------- ndarray Array containing diffusive conductance values for conduits in the geometry attached to the given physics object. Notes ----- This function is ONLY suitable for dilute mixtures and NOT those with concentrated species. This function requires that all the necessary phase properties already be calculated. """ # Fetch GenericPhysicss network = target.network phase = target.project.find_phase(target) # Fetch model parameters Dp = phase[pore_diffusivity] Dt = phase[throat_diffusivity] dp = network[pore_diameter] dt = network[throat_diameter] MWp = phase[molecular_weight] MWt = phase.interpolate_data(propname=molecular_weight) Tp = phase[pore_temperature] Tt = phase[throat_temperature] # Calculate Knudsen contribution DKp = dp / 3 * (8 * _const.R * Tp / (_const.pi * MWp))**0.5 DKt = dt / 3 * (8 * _const.R * Tt / (_const.pi * MWt))**0.5 # Calculate mixed diffusivity Dp_eff = (1 / DKp + 1 / Dp)**-1 Dt_eff = (1 / DKt + 1 / Dt)**-1 return _poisson_conductance(target=target, pore_conductivity=Dp_eff, throat_conductivity=Dt_eff, size_factors=size_factors)