Skip to content

Commit

Permalink
#546 do fix for #547
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinsulzer committed Jul 23, 2019
1 parent b85f455 commit ba4dee3
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,33 @@

def graphite_mcmb2528_diffusivity_Dualfoil(sto, T, T_inf, E_D_s, R_g):
"""
Graphite MCMB 2528 diffusivity as a function of stochiometry, in this case the
diffusivity is taken to be a constant. The value is taken from Dualfoil [1].
References
----------
.. [1] http://www.cchem.berkeley.edu/jsngrp/fortran.html
Parameters
----------
sto: :class: `numpy.Array`
Electrode stochiometry
T: :class: `numpy.Array`
Dimensional temperature
T_inf: double
Reference temperature
E_D_s: double
Solid diffusion activation energy
R_g: double
The ideal gas constant
Returns
-------
: double
Solid diffusivity
Graphite MCMB 2528 diffusivity as a function of stochiometry, in this case the
diffusivity is taken to be a constant. The value is taken from Dualfoil [1].
References
----------
.. [1] http://www.cchem.berkeley.edu/jsngrp/fortran.html
Parameters
----------
sto: :class: `numpy.Array`
Electrode stochiometry
T: :class: `numpy.Array`
Dimensional temperature
T_inf: double
Reference temperature
E_D_s: double
Solid diffusion activation energy
R_g: double
The ideal gas constant
Returns
-------
: double
Solid diffusivity
"""

D_ref = 3.9 * 10 ** (-14)
arrhenius = np.exp(E_D_s / R_g * (1 / T_inf - 1 / T))

correct_shape = 0 * sto

return D_ref * arrhenius + correct_shape

return D_ref * arrhenius
52 changes: 25 additions & 27 deletions input/parameters/lithium-ion/lico2_diffusivity_Dualfoil.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,33 @@

def lico2_diffusivity_Dualfoil(sto, T, T_inf, E_D_s, R_g):
"""
LiCo2 diffusivity as a function of stochiometry, in this case the
diffusivity is taken to be a constant. The value is taken from Dualfoil [1].
References
----------
.. [1] http://www.cchem.berkeley.edu/jsngrp/fortran.html
Parameters
----------
sto: :class: `numpy.Array`
Electrode stochiometry
T: :class: `numpy.Array`
Dimensional temperature
T_inf: double
Reference temperature
E_D_s: double
Solid diffusion activation energy
R_g: double
The ideal gas constant
Returns
-------
: double
Solid diffusivity
LiCo2 diffusivity as a function of stochiometry, in this case the
diffusivity is taken to be a constant. The value is taken from Dualfoil [1].
References
----------
.. [1] http://www.cchem.berkeley.edu/jsngrp/fortran.html
Parameters
----------
sto: :class: `numpy.Array`
Electrode stochiometry
T: :class: `numpy.Array`
Dimensional temperature
T_inf: double
Reference temperature
E_D_s: double
Solid diffusion activation energy
R_g: double
The ideal gas constant
Returns
-------
: double
Solid diffusivity
"""

D_ref = 1 * 10 ** (-13)
arrhenius = np.exp(E_D_s / R_g * (1 / T_inf - 1 / T))

correct_shape = 0 * sto

return D_ref * arrhenius + correct_shape
return D_ref * arrhenius

0 comments on commit ba4dee3

Please sign in to comment.