Skip to content

Commit

Permalink
Fixing bugs, adding documentation, generalizing input.
Browse files Browse the repository at this point in the history
  • Loading branch information
decaluwe committed Oct 12, 2020
1 parent 465e9da commit 6e7a66d
Show file tree
Hide file tree
Showing 7 changed files with 779 additions and 671 deletions.
1 change: 1 addition & 0 deletions functions/diffusion_coeffs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"""
# Load needed modules
import cantera as ct
import numpy as np

class dst:

Expand Down
7 changes: 4 additions & 3 deletions li_ion/li_ion_battery_p2d_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
import cantera as ct
import numpy as np
from li_ion_battery_p2d_inputs import Inputs
from li_ion_battery_p2d_init import anode as an
from li_ion_battery_p2d_init import initialize as init
an, cat, sep, solver_inputs, current, battery, anode, anode_s, elyte, cathode, cathode_s, conductor = init()

def set_state(offset, SV, ed, surf, el, conductor, ptr):

Expand Down Expand Up @@ -75,8 +76,8 @@ def dilute_flux(s1, s2, dyInv, ed, D_k, D_migr_k):
# Total molar concentration in electrolyte
C_0 = (s2['rho_el'] + s1['rho_el'])/2.

N_io_p = (- D_k*(s2['rho_el']*s2['X_k_el'] - s1['rho_el']*s1['X_k_el'])*dyInv
- D_migr_k*(z_k*F/R/T)*(s2['phi_el'] - s1['phi_el'])*dyInv)
N_io_p = (- D_k*(s2['rho_el']*s2['X_k_el'] - s1['rho_el']*s1['X_k_el'])
- D_migr_k*(z_k*F/R/T)*(s2['phi_el'] - s1['phi_el']))*dyInv

# N_io_p = (-ed.u_Li_elyte*(R*T*C_0*(s2['X_k_el'] - s1['X_k_el'])
# + Inputs.z_k_elyte*F*C_k*(s2['phi_el'] - s1['phi_el']))*dyInv)
Expand Down
Loading

0 comments on commit 6e7a66d

Please sign in to comment.