Skip to content

Commit

Permalink
fixed error in discretization
Browse files Browse the repository at this point in the history
  • Loading branch information
lightningclaw001 committed Aug 23, 2022
1 parent 0222cc4 commit f76687a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions bin/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ def run(test_outputs, testDir, tests=None):
# Generate a list of tests from the directories in ref_outputs
ref_outputs = osp.join(dirDict["suite"],"ref_outputs")
_, directories, _ = next(walk(osp.join(ref_outputs)))
tests = directories
tests.sort()
tests = sorted(directories)

runInfoAnalyt = {
"testAnalytCylDifn": (defs.testAnalytCylDifn, defs.analytCylDifn),
Expand Down Expand Up @@ -57,7 +56,7 @@ def main():

run(args.output_dir,args.test_dir, args.tests)

return(args)
return (args)


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion mpet/electrolyte/Doyle96_EC_DMC_1_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def sigma(c, T):
r4 = 1.3605e-3
r5 = 1.1724e-4
k0 = r1 + r2*c - r3*c**2 + r4*c**3 - r5*c**4 # S/cm
return(100*k0)
return (100*k0)

Dref = D(constants.c_ref, 1)

Expand Down
2 changes: 1 addition & 1 deletion mpet/electrolyte/Doyle96_EC_DMC_2_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def sigma(c, T):
r4 = 1.5094e-3
r5 = 1.6018e-4
k0 = r1 + r2*c - r3*c**2 + r4*c**3 - r5*c**4 # S/cm
return(100*k0)
return (100*k0)

Dref = D(constants.c_ref, 1)

Expand Down
2 changes: 1 addition & 1 deletion mpet/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def get_elyte_disc(Nvol, L, poros, BruggExp, k_h):
dxtmp = np.hstack((out["dxvec"][0], out["dxvec"], out["dxvec"][-1]))
out["dx"] = dxtmp
out["dxd1"] = utils.mean_linear(dxtmp)
out["dxd2"] = utils.mean_linear(out["dxd1"]) # for thermal finite differences
out["dxd2"] = dxtmp[1:-1] # for thermal finite differences

# The porosity vector
out["porosvec"] = utils.get_asc_vec(poros, Nvol)
Expand Down
2 changes: 1 addition & 1 deletion mpet/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def mean_harmonic(a):


def weighted_harmonic_mean(a, wt):
return((wt[1:]+wt[:-1])/(wt[1:]/a[1:]+wt[:-1]/a[:-1]))
return ((wt[1:]+wt[:-1])/(wt[1:]/a[1:]+wt[:-1]/a[:-1]))


def get_cell_Ntot(Nvol):
Expand Down

0 comments on commit f76687a

Please sign in to comment.