Skip to content

Commit

Permalink
fix bug weight mse
Browse files Browse the repository at this point in the history
  • Loading branch information
Ombrini committed May 22, 2024
1 parent 8eb20d7 commit 9c417c8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Param_estim/instructions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,29 @@

def sim_instructions():
# A lot of smalle 40nm particles with low wiring does not work
optimization_method = 'GD' # 'DE' or 'GD'
optimization_method = 'DE' # 'DE' or 'GD'

ensable_system = [
[("Conductivity", "sig_carb_c"), ["1e-3", "5e-4"]],
[("Conductivity", "E_sig_carb_c"), ["0.1", "0.4"]],
[("Conductivity", "sig_carb_c"), ["2e-4", "0.5e-4"]],
# [("Conductivity", "E_sig_carb_c"), ["0.1", "0.4"]],
# [("Electrodes", "k0_foil"), ["10","50"]],
]

ensable_cathode = [
[("Reactions", "k0"), ["5", "30"]],
# [("Reactions", "k0"), ["5", "30"]],
]

ensable_anode = []

# Define C-rates and Temperatures

# temps = [298,283,268] # K
temperatures = [298,283,268] # K
temperatures = [298] # K
# Possible protocols: 'cc', 'pitt', 'gitt'
protocols = ['cc']
# one list for each protocol and temperature
# it is important that the order of temperatures and conditions is the same
c_rates_cc = [[1],
[2],
[0.5]] # C-rates
c_rates_cc = [[0.5,2]] # C-rates
c_rates_gitt = [[1],
[1]] # C-rates
cont_volts = [[3.377, 3.351, 3.326],
Expand Down Expand Up @@ -58,6 +56,8 @@ def weight_mse(protocol, temp, applied_con):
weight_mse = 0.2
# since the current goes from 0 to 10 and the voltage from 3.5 to 2.5
# the error on the current must be reduced
else:
weight_mse = 1
return weight_mse

def c0():
Expand Down

0 comments on commit 9c417c8

Please sign in to comment.