77
88values = {
99 "Initial SoC" : 0.5 ,
10- "Initial cell temperature [degC]" : 25 ,
11- "Initial jig temperature [degC]" : 25 ,
10+ "Initial temperature [K]" : 25 + 273.15 ,
1211 "Cell capacity [A.h]" : 100 ,
1312 "Nominal cell capacity [A.h]" : 100 ,
14- "Ambient temperature [degC ]" : 25 ,
13+ "Ambient temperature [K ]" : 25 + 273.15 ,
1514 "Current function [A]" : 100 ,
1615 "Upper voltage cut-off [V]" : 4.2 ,
1716 "Lower voltage cut-off [V]" : 3.2 ,
@@ -49,15 +48,19 @@ def test_init_parameters(self):
4948 (param .current_with_time , "Current function [A]" ),
5049 (param .dimensional_current_density_with_time , "Current function [A]" ),
5150 (param .initial_soc , "Initial SoC" ),
52- (param .initial_T_cell , "Initial cell temperature [degC]" ),
53- (param .initial_T_jig , "Initial jig temperature [degC]" ),
5451 ]
5552
5653 for symbol , key in simpled_mapped_parameters :
5754 value = parameter_values .evaluate (symbol )
5855 expected_value = values [key ]
5956 self .assertEqual (value , expected_value )
6057
58+ value = parameter_values .evaluate (param .initial_T_cell )
59+ self .assertEqual (value , values ["Initial temperature [K]" ] - 273.15 )
60+
61+ value = parameter_values .evaluate (param .initial_T_jig )
62+ self .assertEqual (value , values ["Initial temperature [K]" ] - 273.15 )
63+
6164 compatibility_parameters = [
6265 (param .I_typ , 1 ),
6366 (param .n_electrodes_parallel , 1 ),
@@ -75,7 +78,6 @@ def test_function_parameters(self):
7578 sym = pybamm .Scalar (1 )
7679
7780 mapped_functions = [
78- (param .T_amb (sym ), "Ambient temperature [degC]" ),
7981 (param .ocv (sym ), "Open circuit voltage [V]" ),
8082 (param .rcr_element ("R0 [Ohm]" , sym , sym , sym ), "R0 [Ohm]" ),
8183 (param .rcr_element ("R1 [Ohm]" , sym , sym , sym ), "R1 [Ohm]" ),
@@ -89,6 +91,8 @@ def test_function_parameters(self):
8991 expected_value = values [key ]
9092 self .assertEqual (value , expected_value )
9193
94+ value = parameter_values .evaluate (param .T_amb (sym ))
95+ self .assertEqual (value , values ["Ambient temperature [K]" ] - 273.15 )
9296
9397if __name__ == "__main__" :
9498 print ("Add -v for more debug output" )
0 commit comments