├── simulation_framework
├── sim_BTMS.slx
├── .SimulinkProject
│ ├── Project.xml
│ ├── Root.type.Files
│ │ ├── coolprop.type.File.xml
│ │ ├── functions_BTMS_sim.type.File.xml
│ │ ├── BTMS_simulation_results.type.File.xml
│ │ ├── functions_sys_config.type.File.xml
│ │ ├── input_and_parameters.type.File.xml
│ │ ├── battery_system_simulation.type.File.xml
│ │ ├── coolprop.type.File
│ │ │ └── 1.type.DIR_SIGNIFIER.xml
│ │ ├── functions_BTMS_sim.type.File
│ │ │ ├── 1.type.DIR_SIGNIFIER.xml
│ │ │ ├── expand_config.m.type.File.xml
│ │ │ ├── sim_module.m.type.File.xml
│ │ │ ├── sim_system.m.type.File.xml
│ │ │ ├── calc_alpha_channel.m.type.File.xml
│ │ │ ├── check_results_mod.m.type.File.xml
│ │ │ ├── check_results_sys.m.type.File.xml
│ │ │ ├── save_sim_result.m.type.File.xml
│ │ │ ├── SysPara_DeviationMap.m.type.File.xml
│ │ │ ├── get_BTMS_channel_length.m.type.File.xml
│ │ │ ├── get_IDs_cells_channels.m.type.File.xml
│ │ │ ├── main_create_BTMS_config.m.type.File.xml
│ │ │ ├── starting_layers_mod_in.m.type.File.xml
│ │ │ ├── calc_heat_transfer_matrix.m.type.File.xml
│ │ │ ├── calc_total_A_heat_transfer.m.type.File.xml
│ │ │ ├── create_channel_def_matrix.m.type.File.xml
│ │ │ ├── get_fluid_params_coolprop.m.type.File.xml
│ │ │ ├── plot_system_architecture.m.type.File.xml
│ │ │ ├── get_BTMS_channel_cross_section.m.type.File.xml
│ │ │ └── special_heat_transfer_positons.m.type.File.xml
│ │ ├── BTMS_simulation_results.type.File
│ │ │ └── 1.type.DIR_SIGNIFIER.xml
│ │ ├── functions_sys_config.type.File
│ │ │ ├── 1.type.DIR_SIGNIFIER.xml
│ │ │ ├── append_configs.m.type.File.xml
│ │ │ ├── epe_distribution.m.type.File.xml
│ │ │ ├── get_cell_mass.m.type.File.xml
│ │ │ ├── get_config_ID.m.type.File.xml
│ │ │ ├── mod_test_energy.m.type.File.xml
│ │ │ ├── sys_test_energy.m.type.File.xml
│ │ │ ├── append_configs_step_1.m.type.File.xml
│ │ │ ├── calc_cell_surface.m.type.File.xml
│ │ │ ├── join_passed_structs.m.type.File.xml
│ │ │ ├── test_dimensions_BTMS.m.type.File.xml
│ │ │ ├── check_feasible_configs.m.type.File.xml
│ │ │ ├── check_for_failed_tests.m.type.File.xml
│ │ │ ├── check_validity_BTMS_config.m.type.File.xml
│ │ │ ├── preallocate_configs_2_mod.m.type.File.xml
│ │ │ ├── preallocate_configs_3_sys.m.type.File.xml
│ │ │ ├── preallocate_configs_4_sys.m.type.File.xml
│ │ │ ├── preallocate_configs_5_BTMS.m.type.File.xml
│ │ │ ├── preallocate_configs_6_BTMS.m.type.File.xml
│ │ │ ├── mod_test_dimensions_no_BTMS.m.type.File.xml
│ │ │ ├── preallocate_configs_1_mod_all.m.type.File.xml
│ │ │ └── sys_test_dimensions_no_BTMS.m.type.File.xml
│ │ ├── input_and_parameters.type.File
│ │ │ ├── 01_cell_data.type.File.xml
│ │ │ ├── 1.type.DIR_SIGNIFIER.xml
│ │ │ ├── 02_system_data.type.File.xml
│ │ │ ├── 03_BTMS_config.type.File.xml
│ │ │ ├── 04_system_specifications.type.File.xml
│ │ │ ├── 01_cell_data.type.File
│ │ │ │ ├── 1.type.DIR_SIGNIFIER.xml
│ │ │ │ ├── Cyl_18650.m.type.File.xml
│ │ │ │ ├── Cyl_21700.m.type.File.xml
│ │ │ │ ├── Pouch_74Ah.m.type.File.xml
│ │ │ │ ├── Pris_BEV2.m.type.File.xml
│ │ │ │ ├── Pris_PHEV2.m.type.File.xml
│ │ │ │ └── scale_BatPara.m.type.File.xml
│ │ │ ├── 02_system_data.type.File
│ │ │ │ ├── 1.type.DIR_SIGNIFIER.xml
│ │ │ │ └── system_para_BTMS_sim.m.type.File.xml
│ │ │ ├── 03_BTMS_config.type.File
│ │ │ │ ├── 1.type.DIR_SIGNIFIER.xml
│ │ │ │ ├── liquid_bottom.m.type.File.xml
│ │ │ │ ├── liquid_bottom_xdir.m.type.File.xml
│ │ │ │ ├── liquid_full_system.m.type.File.xml
│ │ │ │ └── liquid_inside_xyz_dir.m.type.File.xml
│ │ │ └── 04_system_specifications.type.File
│ │ │ │ ├── 1.type.DIR_SIGNIFIER.xml
│ │ │ │ ├── system_specifcations_Pris_BEV2.m.type.File.xml
│ │ │ │ ├── system_specifcations_cyl_Pouch.m.type.File.xml
│ │ │ │ └── system_specifcations_Pris_PHEV2.m.type.File.xml
│ │ ├── battery_system_simulation.type.File
│ │ │ ├── 1.type.DIR_SIGNIFIER.xml
│ │ │ ├── parameters.type.File.xml
│ │ │ ├── subroutines.type.File.xml
│ │ │ ├── parameters.type.File
│ │ │ │ ├── 1.type.DIR_SIGNIFIER.xml
│ │ │ │ └── cell_parameters_NCR18650PF.m.type.File.xml
│ │ │ └── subroutines.type.File
│ │ │ │ ├── 1.type.DIR_SIGNIFIER.xml
│ │ │ │ └── deviations_stat.m.type.File.xml
│ │ ├── sim_BTMS.slx.type.File.xml
│ │ ├── main_sim_BTMS_1_system_setup.m.type.File.xml
│ │ └── main_sim_BTMS_2_system_simulation.m.type.File.xml
│ ├── ProjectData.type.Info.xml
│ ├── uuid-9c6b8ba4-db12-4534-98c9-637a8600cf92.xml
│ ├── Root.type.Categories
│ │ ├── FileClassCategory.type.Category
│ │ │ ├── design.type.Label.xml
│ │ │ ├── none.type.Label.xml
│ │ │ ├── other.type.Label.xml
│ │ │ ├── test.type.Label.xml
│ │ │ ├── artifact.type.Label.xml
│ │ │ ├── derived.type.Label.xml
│ │ │ └── convenience.type.Label.xml
│ │ └── FileClassCategory.type.Category.xml
│ ├── Root.type.ProjectPath
│ │ ├── d7bc00dd-486c-4c4f-8908-0f7ec49a1764.type.Reference.xml
│ │ ├── cb6c7542-0c4e-4c10-ad5a-b6fb7cccb769.type.Reference.xml
│ │ ├── b1d6f92e-9f91-4ff2-9504-a1bc95925006.type.Reference.xml
│ │ ├── 10dd7840-d1ae-432e-abd9-7d8aaa6395be.type.Reference.xml
│ │ ├── 7460d3ea-b824-4271-bc81-c32403fc3954.type.Reference.xml
│ │ ├── d3ab7a4d-ec9f-43ee-89fc-09cbe2615b73.type.Reference.xml
│ │ ├── f9e77881-69b9-4568-9bc7-63ba9c0a6c25.type.Reference.xml
│ │ ├── 1d14a10c-76b3-4562-bd39-37520eaa6f79.type.Reference.xml
│ │ ├── 21d971dc-559a-4209-8f61-fabba3eaf72c.type.Reference.xml
│ │ ├── c0ffe6a8-d714-4e92-a8ad-63211f5ef43d.type.Reference.xml
│ │ ├── c9df657b-97ab-4ab8-8fa3-e10514f22919.type.Reference.xml
│ │ ├── cc59fa76-3771-43bc-99a2-f7de887f811c.type.Reference.xml
│ │ └── 55cf8928-b2e3-430f-9a5d-ba6af04452df.type.Reference.xml
│ └── Extensions.type.Root
│ │ └── DependencyAnalysis.type.Extension
│ │ └── ExternalFiles.type.Extension.xml
├── coolprop
│ └── .gitignore
├── BTMS_simulation_results
│ └── .gitignore
├── functions_BTMS_sim
│ ├── plot_system_architecture.m
│ ├── calc_heat_transfer_matrix.m
│ ├── get_fluid_params_coolprop.m
│ ├── expand_config.m
│ ├── calc_total_A_heat_transfer.m
│ ├── get_BTMS_channel_length.m
│ ├── starting_layers_mod_in.m
│ ├── get_BTMS_channel_cross_section.m
│ ├── create_channel_def_matrix.m
│ ├── save_sim_result.m
│ ├── SysPara_DeviationMap.m
│ ├── special_heat_transfer_positons.m
│ ├── check_results_mod.m
│ ├── calc_alpha_channel.m
│ ├── get_IDs_cells_channels.m
│ ├── check_results_sys.m
│ ├── sim_module.m
│ ├── sim_system.m
│ └── main_create_BTMS_config.m
├── input_and_parameters
│ ├── 01_cell_data
│ │ ├── Cyl_18650.m
│ │ ├── Cyl_21700.m
│ │ ├── Pris_BEV2.m
│ │ ├── Pouch_74Ah.m
│ │ ├── Pris_PHEV2.m
│ │ └── scale_BatPara.m
│ ├── 04_system_specifications
│ │ ├── system_specifcations_Pris_BEV2.m
│ │ ├── system_specifcations_Pris_PHEV2.m
│ │ ├── system_specifcations_cyl_Pouch.m
│ │ ├── system_specifcations_cyl_inside.m
│ │ └── system_specifcations_Pouch_inside.m
│ ├── 02_system_data
│ │ └── system_para_BTMS_sim.m
│ └── 03_BTMS_config
│ │ ├── liquid_full_system.m
│ │ ├── liquid_bottom.m
│ │ ├── liquid_bottom_xdir.m
│ │ ├── liquid_inside_xyz_dir.m
│ │ ├── liquid_inside_18650.m
│ │ ├── liquid_inside_21700.m
│ │ └── liquid_inside_Pouch.m
├── Sim_BTMS.prj
├── battery_system_simulation
│ ├── parameters
│ │ └── cell_parameters_NCR18650PF.m
│ └── subroutines
│ │ └── deviations_stat.m
├── functions_sys_config
│ ├── check_for_failed_tests.m
│ ├── preallocate_configs_4_sys.m
│ ├── preallocate_configs_6_BTMS.m
│ ├── get_config_ID.m
│ ├── check_validity_BTMS_config.m
│ ├── preallocate_configs_2_mod.m
│ ├── check_feasible_configs.m
│ ├── join_passed_structs.m
│ ├── preallocate_configs_5_BTMS.m
│ ├── calc_cell_surface.m
│ ├── preallocate_configs_3_sys.m
│ ├── append_configs_step_1.m
│ ├── preallocate_configs_1_mod_all.m
│ ├── get_cell_mass.m
│ ├── append_configs.m
│ ├── sys_test_energy.m
│ ├── epe_distribution.m
│ ├── sys_test_dimensions_no_BTMS.m
│ ├── mod_test_dimensions_no_BTMS.m
│ ├── mod_test_energy.m
│ └── test_dimensions_BTMS.m
├── main_sim_BTMS_2_system_simulation.m
└── main_sim_BTMS_1_system_setup.m
├── .gitignore
├── .gitattributes
├── LICENSE
└── README.md
/simulation_framework/sim_BTMS.slx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUMFTM/sim_BTMS/HEAD/simulation_framework/sim_BTMS.slx
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/coolprop.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/coolprop/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore everything in this folder for the git commits.
2 | *
3 | */
4 | !.gitignore
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/ProjectData.type.Info.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/uuid-9c6b8ba4-db12-4534-98c9-637a8600cf92.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/BTMS_simulation_results.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # ignore all autosave files
2 | *.autosave
3 | *.asv
4 | *.original
5 |
6 | # ignore Simulink simulation data
7 |
8 | slprj/
9 | *.slxc
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/battery_system_simulation.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/coolprop.type.File/1.type.DIR_SIGNIFIER.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File/1.type.DIR_SIGNIFIER.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/BTMS_simulation_results.type.File/1.type.DIR_SIGNIFIER.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/1.type.DIR_SIGNIFIER.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/01_cell_data.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/1.type.DIR_SIGNIFIER.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/battery_system_simulation.type.File/1.type.DIR_SIGNIFIER.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/battery_system_simulation.type.File/parameters.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/battery_system_simulation.type.File/subroutines.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/02_system_data.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/03_BTMS_config.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/BTMS_simulation_results/.gitignore:
--------------------------------------------------------------------------------
1 | # This is a results folder. Ignore everything in this folder for the git commits.
2 | *
3 | */
4 | !.gitignore
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/04_system_specifications.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/01_cell_data.type.File/1.type.DIR_SIGNIFIER.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/functions_BTMS_sim/plot_system_architecture.m:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUMFTM/sim_BTMS/HEAD/simulation_framework/functions_BTMS_sim/plot_system_architecture.m
--------------------------------------------------------------------------------
/simulation_framework/input_and_parameters/01_cell_data/Cyl_18650.m:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUMFTM/sim_BTMS/HEAD/simulation_framework/input_and_parameters/01_cell_data/Cyl_18650.m
--------------------------------------------------------------------------------
/simulation_framework/input_and_parameters/01_cell_data/Cyl_21700.m:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUMFTM/sim_BTMS/HEAD/simulation_framework/input_and_parameters/01_cell_data/Cyl_21700.m
--------------------------------------------------------------------------------
/simulation_framework/input_and_parameters/01_cell_data/Pris_BEV2.m:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUMFTM/sim_BTMS/HEAD/simulation_framework/input_and_parameters/01_cell_data/Pris_BEV2.m
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/battery_system_simulation.type.File/parameters.type.File/1.type.DIR_SIGNIFIER.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/battery_system_simulation.type.File/subroutines.type.File/1.type.DIR_SIGNIFIER.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/02_system_data.type.File/1.type.DIR_SIGNIFIER.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/03_BTMS_config.type.File/1.type.DIR_SIGNIFIER.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/functions_BTMS_sim/calc_heat_transfer_matrix.m:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUMFTM/sim_BTMS/HEAD/simulation_framework/functions_BTMS_sim/calc_heat_transfer_matrix.m
--------------------------------------------------------------------------------
/simulation_framework/functions_BTMS_sim/get_fluid_params_coolprop.m:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUMFTM/sim_BTMS/HEAD/simulation_framework/functions_BTMS_sim/get_fluid_params_coolprop.m
--------------------------------------------------------------------------------
/simulation_framework/input_and_parameters/01_cell_data/Pouch_74Ah.m:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUMFTM/sim_BTMS/HEAD/simulation_framework/input_and_parameters/01_cell_data/Pouch_74Ah.m
--------------------------------------------------------------------------------
/simulation_framework/input_and_parameters/01_cell_data/Pris_PHEV2.m:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUMFTM/sim_BTMS/HEAD/simulation_framework/input_and_parameters/01_cell_data/Pris_PHEV2.m
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/design.type.Label.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/none.type.Label.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/other.type.Label.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/test.type.Label.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/04_system_specifications.type.File/1.type.DIR_SIGNIFIER.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.ProjectPath/d7bc00dd-486c-4c4f-8908-0f7ec49a1764.type.Reference.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/artifact.type.Label.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/derived.type.Label.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.ProjectPath/cb6c7542-0c4e-4c10-ad5a-b6fb7cccb769.type.Reference.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/convenience.type.Label.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.ProjectPath/b1d6f92e-9f91-4ff2-9504-a1bc95925006.type.Reference.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.ProjectPath/10dd7840-d1ae-432e-abd9-7d8aaa6395be.type.Reference.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.ProjectPath/7460d3ea-b824-4271-bc81-c32403fc3954.type.Reference.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.ProjectPath/d3ab7a4d-ec9f-43ee-89fc-09cbe2615b73.type.Reference.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.ProjectPath/f9e77881-69b9-4568-9bc7-63ba9c0a6c25.type.Reference.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.ProjectPath/1d14a10c-76b3-4562-bd39-37520eaa6f79.type.Reference.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/Sim_BTMS.prj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/simulation_framework/battery_system_simulation/parameters/cell_parameters_NCR18650PF.m:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUMFTM/sim_BTMS/HEAD/simulation_framework/battery_system_simulation/parameters/cell_parameters_NCR18650PF.m
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.ProjectPath/21d971dc-559a-4209-8f61-fabba3eaf72c.type.Reference.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.ProjectPath/c0ffe6a8-d714-4e92-a8ad-63211f5ef43d.type.Reference.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.ProjectPath/c9df657b-97ab-4ab8-8fa3-e10514f22919.type.Reference.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.ProjectPath/cc59fa76-3771-43bc-99a2-f7de887f811c.type.Reference.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.ProjectPath/55cf8928-b2e3-430f-9a5d-ba6af04452df.type.Reference.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/sim_BTMS.slx.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/check_for_failed_tests.m:
--------------------------------------------------------------------------------
1 | function bool = check_for_failed_tests(passed)
2 |
3 | % Check if any tests is 'false'
4 |
5 | bool = size(cell2mat(struct2cell(passed)), 1) > sum(cell2mat(struct2cell(passed)));
--------------------------------------------------------------------------------
/simulation_framework/input_and_parameters/04_system_specifications/system_specifcations_Pris_BEV2.m:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUMFTM/sim_BTMS/HEAD/simulation_framework/input_and_parameters/04_system_specifications/system_specifcations_Pris_BEV2.m
--------------------------------------------------------------------------------
/simulation_framework/input_and_parameters/04_system_specifications/system_specifcations_Pris_PHEV2.m:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUMFTM/sim_BTMS/HEAD/simulation_framework/input_and_parameters/04_system_specifications/system_specifcations_Pris_PHEV2.m
--------------------------------------------------------------------------------
/simulation_framework/input_and_parameters/04_system_specifications/system_specifcations_cyl_Pouch.m:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUMFTM/sim_BTMS/HEAD/simulation_framework/input_and_parameters/04_system_specifications/system_specifcations_cyl_Pouch.m
--------------------------------------------------------------------------------
/simulation_framework/input_and_parameters/04_system_specifications/system_specifcations_cyl_inside.m:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUMFTM/sim_BTMS/HEAD/simulation_framework/input_and_parameters/04_system_specifications/system_specifcations_cyl_inside.m
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/preallocate_configs_4_sys.m:
--------------------------------------------------------------------------------
1 | function configs = preallocate_configs_4_sys
2 |
3 | configs = preallocate_configs_3_sys; % Include old structure
4 | configs.Tests_sys = []; % Results of the system tests
--------------------------------------------------------------------------------
/simulation_framework/input_and_parameters/04_system_specifications/system_specifcations_Pouch_inside.m:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TUMFTM/sim_BTMS/HEAD/simulation_framework/input_and_parameters/04_system_specifications/system_specifcations_Pouch_inside.m
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/main_sim_BTMS_1_system_setup.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/preallocate_configs_6_BTMS.m:
--------------------------------------------------------------------------------
1 | function configs = preallocate_configs_6_BTMS
2 |
3 | configs = preallocate_configs_5_BTMS; % Include old structure
4 | configs.Tests_BTMS = []; % Results of the system tests
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/main_sim_BTMS_2_system_simulation.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/get_config_ID.m:
--------------------------------------------------------------------------------
1 | function ID = get_config_ID
2 |
3 | persistent ID_pers
4 |
5 | if isempty(ID_pers)
6 | ID_pers = 1;
7 | else
8 | ID_pers = ID_pers + 1;
9 | end
10 |
11 | ID = ID_pers;
12 |
13 | end
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File/expand_config.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File/sim_module.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File/sim_system.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File/calc_alpha_channel.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File/check_results_mod.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File/check_results_sys.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File/save_sim_result.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/append_configs.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/epe_distribution.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/get_cell_mass.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/get_config_ID.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/mod_test_energy.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/sys_test_energy.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File/SysPara_DeviationMap.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File/get_BTMS_channel_length.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File/get_IDs_cells_channels.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File/main_create_BTMS_config.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File/starting_layers_mod_in.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/append_configs_step_1.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/calc_cell_surface.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/join_passed_structs.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/test_dimensions_BTMS.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File/calc_heat_transfer_matrix.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File/calc_total_A_heat_transfer.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File/create_channel_def_matrix.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File/get_fluid_params_coolprop.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File/plot_system_architecture.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/check_feasible_configs.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/check_for_failed_tests.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/check_validity_BTMS_config.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/preallocate_configs_2_mod.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/preallocate_configs_3_sys.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/preallocate_configs_4_sys.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/preallocate_configs_5_BTMS.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/preallocate_configs_6_BTMS.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File/get_BTMS_channel_cross_section.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_BTMS_sim.type.File/special_heat_transfer_positons.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/mod_test_dimensions_no_BTMS.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/preallocate_configs_1_mod_all.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/functions_sys_config.type.File/sys_test_dimensions_no_BTMS.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/01_cell_data.type.File/Cyl_18650.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/01_cell_data.type.File/Cyl_21700.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/01_cell_data.type.File/Pouch_74Ah.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/01_cell_data.type.File/Pris_BEV2.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/01_cell_data.type.File/Pris_PHEV2.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/01_cell_data.type.File/scale_BatPara.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/check_validity_BTMS_config.m:
--------------------------------------------------------------------------------
1 | function check_validity_BTMS_config(config)
2 |
3 | % This function checks the validity of a given BTMS config.
4 |
5 | % Check for validity of air cooling data
6 |
7 | warning('TODO: This function is empty')
8 |
9 | end
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/03_BTMS_config.type.File/liquid_bottom.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/battery_system_simulation.type.File/subroutines.type.File/deviations_stat.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/02_system_data.type.File/system_para_BTMS_sim.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/03_BTMS_config.type.File/liquid_bottom_xdir.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/03_BTMS_config.type.File/liquid_full_system.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/03_BTMS_config.type.File/liquid_inside_xyz_dir.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/battery_system_simulation.type.File/parameters.type.File/cell_parameters_NCR18650PF.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/preallocate_configs_2_mod.m:
--------------------------------------------------------------------------------
1 | function configs = preallocate_configs_2_mod
2 |
3 | configs = preallocate_configs_1_mod_all; % Include old structure
4 | configs.ModInfo = []; % Infos about the module configuration
5 | configs.Tests_mod = []; % Results of module tests
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/04_system_specifications.type.File/system_specifcations_Pris_BEV2.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/04_system_specifications.type.File/system_specifcations_cyl_Pouch.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Root.type.Files/input_and_parameters.type.File/04_system_specifications.type.File/system_specifcations_Pris_PHEV2.m.type.File.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/check_feasible_configs.m:
--------------------------------------------------------------------------------
1 | function check_feasible_configs(configs)
2 |
3 | num_of_configs = size(configs, 2);
4 |
5 | if isnan(configs(1).mod_ID)
6 | error('No feasible concepts in %s!', inputname(1))
7 | else
8 | fprintf('There are %i concepts in %s.\n', num_of_configs ,inputname(1))
9 | end
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/join_passed_structs.m:
--------------------------------------------------------------------------------
1 | function passed_joined = join_passed_structs(passed_1, passed_2)
2 |
3 | passed_joined = passed_1;
4 |
5 | length_joined = length(passed_joined);
6 |
7 | f = fieldnames(passed_2);
8 |
9 | for jj = 1:length(f)
10 | passed_joined.(f{jj}) = passed_2.(f{jj});
11 | end
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/preallocate_configs_5_BTMS.m:
--------------------------------------------------------------------------------
1 | function configs = preallocate_configs_5_BTMS
2 |
3 | configs = preallocate_configs_4_sys;
4 | configs.BTMSConfig = [];
5 | configs.BTMS_ID = [];
6 |
7 | % Arrrange fields (move BTMS name to the beginning)
8 |
9 | permutation_vec = [1 2 3 13 4 5 6 7 8 9 10 11 12];
10 | configs = orderfields(configs, permutation_vec);
11 |
12 |
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/calc_cell_surface.m:
--------------------------------------------------------------------------------
1 | function [A_x, A_y, A_z, A] = calc_cell_surface(BatPara)
2 |
3 |
4 | %% Get cell surface areas in the spacial dimensions
5 |
6 | A_x = BatPara.physical.dim_y * BatPara.physical.dim_z;
7 | A_y = BatPara.physical.dim_x * BatPara.physical.dim_z;
8 | A_z = BatPara.physical.dim_x * BatPara.physical.dim_y;
9 |
10 | A = 2* (A_x + A_y + A_z);
11 |
12 | end
13 |
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/preallocate_configs_3_sys.m:
--------------------------------------------------------------------------------
1 | function configs = preallocate_configs_3_sys
2 |
3 | configs = preallocate_configs_2_mod; % Include old structure
4 | configs.sys_ID = NaN; % Unique system ID
5 | configs.SysInfo = []; % Infos about the system tests
6 |
7 | % Arrange field order (move 'sys_config_no' to first position)
8 |
9 | permutation_vec = [9 1 2 3 4 5 6 7 8 10];
10 | configs = orderfields(configs, permutation_vec);
--------------------------------------------------------------------------------
/simulation_framework/functions_BTMS_sim/expand_config.m:
--------------------------------------------------------------------------------
1 | function [sys_ID, mod_ID, SysSpec, BatPara, SysPara, BTMSPara, ModInfo, SysInfo, BTMSConfig] = expand_config(config)
2 |
3 | sys_ID = config.sys_ID;
4 | mod_ID = config.mod_ID;
5 | SysSpec = config.SysSpec;
6 | BatPara = config.BatPara;
7 | SysPara = config.SysPara;
8 | BTMSPara = config.BTMSPara;
9 | ModInfo = config.ModInfo;
10 | SysInfo = config.SysInfo;
11 | BTMSConfig = config.BTMSConfig;
12 |
13 | end
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.mlx -crlf -diff -merge
2 | *.mat -crlf -diff -merge
3 | *.fig -crlf -diff -merge
4 | *.p -crlf -diff -merge
5 | *.slx -crlf -diff -merge
6 | *.mdl -crlf -diff -merge
7 |
8 |
9 | *.mdlp -crlf -diff -merge
10 | *.slxp -crlf -diff -merge
11 | *.sldd -crlf -diff -merge
12 | *.mexa64 -crlf -diff -merge
13 | *.mexw64 -crlf -diff -merge
14 | *.mexmaci64 -crlf -diff -merge
15 | *.xlsx -crlf -diff -merge
16 | *.docx -crlf -diff -merge
17 | *.pdf -crlf -diff -merge
18 | *.jpg -crlf -diff -merge
19 | *.png -crlf -diff -merge
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/append_configs_step_1.m:
--------------------------------------------------------------------------------
1 | function configs = append_configs_step_1(BatPara, BTMSPara, SysPara, SysSpec, configs)
2 |
3 | % Check if first run in this simulation. If first run write at first array
4 | % position, otherwise append data to already existing data.
5 |
6 | persistent first_run
7 |
8 | if isempty(first_run)
9 | index = 1;
10 | first_run = false;
11 | else
12 | index = size(configs,2)+1;
13 | end
14 |
15 | configs(index).mod_ID = index;
16 | configs(index).cell_ID = BatPara.name;
17 | configs(index).BatPara = BatPara;
18 | configs(index).BTMSPara = BTMSPara;
19 | configs(index).SysPara = SysPara;
20 | configs(index).SysSpec = SysSpec;
21 |
22 | end
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/preallocate_configs_1_mod_all.m:
--------------------------------------------------------------------------------
1 | function configs = preallocate_configs_1_mod_all
2 |
3 | % Create an empty structure
4 |
5 | dummy_field = cell(1);
6 |
7 | configs = struct(...
8 | 'mod_ID', NaN, ... % Unique module configuration ID
9 | 'cell_ID', NaN, ... % Cell name taken from cell_data m-File
10 | 'SysSpec', dummy_field, ... % Specified system parameters (target specs for the algorithm)
11 | 'BatPara', dummy_field, ... % Battery parameters (for battery config and simulation)
12 | 'SysPara', dummy_field, ... % System parameters (for system config and simulation)
13 | 'BTMSPara', dummy_field); % BTMS parameters (for BTMS config and simulation)
14 |
15 |
--------------------------------------------------------------------------------
/simulation_framework/functions_BTMS_sim/calc_total_A_heat_transfer.m:
--------------------------------------------------------------------------------
1 | function A_heat_transfer = calc_total_A_heat_transfer(channel_num_adj_cells, channel_orientation, A_dir)
2 |
3 | num_channels = length(channel_num_adj_cells);
4 |
5 | A_heat_transfer = NaN(num_channels, 1);
6 |
7 | A_x = A_dir(1);
8 | A_y = A_dir(2);
9 | A_z = A_dir(3);
10 |
11 | for ii = 1:num_channels
12 | switch channel_orientation(ii)
13 | case 'x'
14 | A_heat_transfer(ii) = A_x * channel_num_adj_cells(ii);
15 | case 'y'
16 | A_heat_transfer(ii) = A_y * channel_num_adj_cells(ii);
17 | case 'z'
18 | A_heat_transfer(ii) = A_z * channel_num_adj_cells(ii);
19 | otherwise
20 | error('Wrong orientation given!')
21 | end
22 | end
23 |
24 | end
--------------------------------------------------------------------------------
/simulation_framework/functions_BTMS_sim/get_BTMS_channel_length.m:
--------------------------------------------------------------------------------
1 | function channel_length = get_BTMS_channel_length(orientation, ratio, dim_x_sys, dim_y_sys, dim_z_sys)
2 |
3 | channel_length = NaN(length(orientation), 1);
4 |
5 | %% Get channel length in spacial direction
6 |
7 | % Battery system top view: x dir: Bottom to top, y dir: right to left
8 | % _______
9 | % | |
10 | % | |
11 | % | | <---- flow direction for 'y' channels
12 | % | |
13 | % |_______|
14 | %
15 | % ^-- Flow direction for 'x' and '
16 |
17 | for ii = 1:length(orientation)
18 |
19 | switch orientation(ii)
20 | case 'x'
21 | channel_length(ii) = dim_y_sys;
22 | case 'y'
23 | channel_length(ii) = dim_x_sys;
24 | case 'z'
25 | channel_length(ii) = dim_x_sys;
26 | end
27 |
28 | end
29 |
30 | channel_length = channel_length * ratio;
31 |
32 |
33 | end
34 |
--------------------------------------------------------------------------------
/simulation_framework/functions_BTMS_sim/starting_layers_mod_in.m:
--------------------------------------------------------------------------------
1 | function layers_out = starting_layers_mod_in(layers, cells_mod_dim, mods_sys_dim)
2 |
3 | % Determine layers for BTMS inside modules for a given battery system
4 |
5 | %% Check feasibilty of input
6 |
7 | % 'layers' must not be 0 or cells_mod_dim --> that would be the outside of
8 | % the module and this type of cooling is specified with the 'sys_inside_*'
9 | % variables.
10 |
11 | if (sum( layers == 0 )) || (sum( layers == cells_mod_dim ))
12 | error('Wrong definition of starting layers inside module! Check mod_inside_*_layers variables!')
13 | end
14 |
15 |
16 |
17 | %% Get starting layers
18 |
19 | module_index = [];
20 |
21 | for ii = 0:mods_sys_dim-1
22 |
23 | module_index = [module_index, repmat(ii, 1, length(layers))];
24 |
25 | end
26 |
27 | layers_mod = repmat(layers, 1, mods_sys_dim);
28 |
29 | layers_out = layers_mod + (module_index * cells_mod_dim);
30 |
31 |
32 | end
--------------------------------------------------------------------------------
/simulation_framework/functions_BTMS_sim/get_BTMS_channel_cross_section.m:
--------------------------------------------------------------------------------
1 | function channel_crosss = get_BTMS_channel_cross_section(orientation, ratio, dim_x_sys, dim_y_sys, dim_z_sys, channel_width)
2 |
3 | channel_crosss = NaN(length(orientation), 1);
4 |
5 | %% Get channel height in spacial direction
6 |
7 | % Battery system top view: x dir: Bottom to top, y dir: right to left
8 | % _______
9 | % | |
10 | % | |
11 | % | | <---- flow direction for 'y' channels
12 | % | |
13 | % |_______|
14 | %
15 | % ^-- Flow direction for 'x' and '
16 |
17 | for ii = 1:length(orientation)
18 |
19 | switch orientation(ii)
20 | case 'x'
21 | channel_crosss(ii) = dim_z_sys;
22 | case 'y'
23 | channel_crosss(ii) = dim_z_sys;
24 | case 'z'
25 | channel_crosss(ii) = dim_y_sys;
26 | end
27 |
28 | end
29 |
30 | % Caculate cross section including ratio
31 |
32 | channel_crosss = channel_crosss * channel_width * ratio;
33 |
34 |
35 | end
36 |
--------------------------------------------------------------------------------
/simulation_framework/.SimulinkProject/Extensions.type.Root/DependencyAnalysis.type.Extension/ExternalFiles.type.Extension.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulation_framework/functions_BTMS_sim/create_channel_def_matrix.m:
--------------------------------------------------------------------------------
1 | function channel_mat = create_channel_def_matrix(ranges)
2 |
3 | % Create the matrix with the BTMS channel ranges for Simulink.
4 |
5 | % Based on create_sensor_def_matrix from 'https://github.com/TUMFTM/sim_battery_system'
6 |
7 | % This function takes the sensor definitions in the cell array 'ranges' and
8 | % puts them in a matrix. To account for different numbers of cells
9 | % affecting the different sensors the matrix gets filled with zeros.
10 |
11 | % Example:
12 | % ranges = {[1 2 3 4], [5 6], [7]}
13 | % sensor_mat = [1 2 3 4; 5 6 0 0; 7 0 0 0]
14 |
15 |
16 | % Get max numbers of cells in a sensor
17 | [~, sizes] = cellfun(@size, ranges);
18 | max_range = max(sizes);
19 |
20 | % Get number of sensors
21 | num_sensors = size(ranges, 2);
22 |
23 |
24 | % Preallocate sensor matrix
25 | channel_mat = zeros(num_sensors, max_range);
26 |
27 | % Write values in matrix
28 | for ii = 1:num_sensors
29 | channel_mat(ii,1:size(ranges{ii},2)) = ranges{ii};
30 | end
31 |
32 |
33 | end
34 |
35 |
--------------------------------------------------------------------------------
/simulation_framework/functions_BTMS_sim/save_sim_result.m:
--------------------------------------------------------------------------------
1 | function save_sim_result(results, test_results, name_prefix, sys_lvl, status)
2 |
3 | % Save results from module or system simulation
4 |
5 | %% Expand struct
6 |
7 | mod_ID = results.mod_ID;
8 | SysPara = results.SysPara;
9 | I_cell = results.I_cell;
10 | I_load = results.I_load;
11 | SOC = results.SOC;
12 | U_Pack = results.U_Pack;
13 | U_cell = results.U_cell;
14 |
15 | if strcmp(sys_lvl, 'sys')
16 | sys_ID = results.sys_ID;
17 | T_cell = results.T_cell;
18 | T_cell_gradient = results.T_cell_gradient;
19 | T_BTMS_out_max = results.T_BTMS_out_max;
20 | end
21 |
22 |
23 | %% Create save name
24 |
25 | name = strcat('BTMS_simulation_results/', name_prefix, '_', sys_lvl, '_ID_', '%i_', status);
26 |
27 | switch sys_lvl
28 | case 'mod'
29 | name = sprintf(name, mod_ID);
30 | case 'sys'
31 | name = sprintf(name, sys_ID);
32 | otherwise
33 | error('Wrong sys_lvl option given!')
34 | end
35 |
36 | %% Save results
37 |
38 | save(name, '-regexp', '^(?!(name|name_prefix|results|status|sys_lvl)$).', '-v7.3')
39 |
40 |
41 | end
--------------------------------------------------------------------------------
/simulation_framework/functions_BTMS_sim/SysPara_DeviationMap.m:
--------------------------------------------------------------------------------
1 | function Map = SysPara_DeviationMap(BatPara, p, s)
2 |
3 | % Calculate the normal distributed parameter deviations using the values
4 | % defined in parameters\cell_parameters_XXXX.m. Optionally also specific
5 | % deviation can be assigned to each cell.
6 |
7 | % Based on 'deviations_stat.m' from 'https://github.com/TUMFTM/sim_battery_system'
8 |
9 | Map.C_A = 1 + randn(p,s)*BatPara.variances.electrical.C_A;
10 | Map.R_0 = 1 + randn(p,s)*BatPara.variances.electrical.R_0;
11 | Map.C1 = 1 + randn(p,s)*BatPara.variances.electrical.C1;
12 | Map.C2 = 1 + randn(p,s)*BatPara.variances.electrical.C2;
13 | Map.C3 = 1 + randn(p,s)*BatPara.variances.electrical.C3;
14 | Map.C4 = 1 + randn(p,s)*BatPara.variances.electrical.C4;
15 | Map.R1 = 1 + randn(p,s)*BatPara.variances.electrical.R1;
16 | Map.R2 = 1 + randn(p,s)*BatPara.variances.electrical.R2;
17 | Map.R3 = 1 + randn(p,s)*BatPara.variances.electrical.R3;
18 | Map.R4 = 1 + randn(p,s)*BatPara.variances.electrical.R4;
19 |
20 | Map.m = 1 + randn(p,s)*BatPara.variances.physical.m;
21 | Map.c = 1 + randn(p,s)*BatPara.variances.thermal.c;
22 | Map.EnCo = 1 + randn(p,s)*BatPara.variances.thermal.EnCo;
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/get_cell_mass.m:
--------------------------------------------------------------------------------
1 | function [m] = get_cell_mass(dim_x, dim_y, dim_z, rho, cell_type)
2 |
3 | % This function calculates the cell's mass from its dimensions, type and
4 | % density 'rho'
5 |
6 | dim_vec = [dim_x, dim_y, dim_z];
7 |
8 | if strcmp(cell_type, 'Pouch') || strcmp(cell_type, 'Pris')
9 | % Pouch and prismatic cell
10 | m = prod(dim_vec) * rho;
11 |
12 | elseif strcmp(cell_type, 'Cyl')
13 | % Cylindrical cell.
14 |
15 | %First we need to find out what is the length and what the diameter
16 | dim_unique = unique(dim_vec); % Reduce vector to unique elements and sort it, starting with the smallest value (we assume this is always the diameter)
17 |
18 | if length(dim_unique) == 1 % Length and diameter are the same
19 | l_cyl = dim_unique;
20 | r_cyl = dim_unique/2;
21 | elseif length(dim_unique) == 2 % Length > diameter
22 | l_cyl = dim_unique(2);
23 | r_cyl = dim_unique(1)/2;
24 | else % User provided wrong values...
25 | error('Wrong dimensions for cylindrical cell! Two of the dim_x, dim_y & dim_z values must be identical')
26 | end
27 |
28 | % Calculate cell mass
29 | m = r_cyl^2 * pi * l_cyl * rho;
30 |
31 | else
32 | error('Unknown cell type!')
33 | end
34 |
35 | end
36 |
37 |
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/append_configs.m:
--------------------------------------------------------------------------------
1 | function configs = append_configs(configs, config_append, passed, status)
2 |
3 | persistent first_run_fail
4 | persistent first_run_pass
5 |
6 | % Check if first run in this simulation. If first run write at first array
7 | % position, otherwise append data to already existing data.
8 |
9 | switch nargin
10 | case 2
11 | if isempty(first_run_fail)
12 | first_run_fail = false;
13 | first_run_pass = false;
14 | index = 1;
15 | else
16 | index = size(configs,2)+1;
17 | end
18 |
19 | case 4
20 | if isempty(first_run_fail) && strcmp(status, 'fail')
21 | index = 1;
22 | first_run_fail = false;
23 | elseif isempty(first_run_pass) && strcmp(status, 'pass')
24 | index = 1;
25 | first_run_pass = false;
26 | else
27 | index = size(configs,2)+1;
28 | end
29 |
30 | if isfield(configs, 'Tests_BTMS')
31 | config_append.Tests_BTMS = passed;
32 | elseif isfield(configs, 'Tests_sys')
33 | config_append.Tests_sys = passed;
34 | elseif isfield(configs, 'Tests_mod')
35 | config_append.Tests_mod = passed;
36 | end
37 |
38 | otherwise
39 | error('Wrong number of input arguments!')
40 | end
41 |
42 | configs(index) = config_append;
--------------------------------------------------------------------------------
/simulation_framework/functions_BTMS_sim/special_heat_transfer_positons.m:
--------------------------------------------------------------------------------
1 | function [layer, dir, alpha] = special_heat_transfer_positons(alpha_mod_gap, ModInfo, SysInfo)
2 |
3 | num_mod_x = ModInfo.num_serial_cells_mod;
4 | num_mod_y = ModInfo.num_parallel_cells_per_layer_mod;
5 | num_mod_z = ModInfo.num_layers_mod;
6 |
7 | num_sys_x = SysInfo.num_serial_mods_sys;
8 | num_sys_y = SysInfo.num_parallel_mods_per_layer_sys;
9 | num_sys_z = SysInfo.num_layers_sys;
10 |
11 | %% x-dir
12 |
13 | layer_x = find_layers(num_mod_x, num_sys_x);
14 | dir_x = dirs(layer_x, 'x');
15 | alpha_x = dirs(layer_x, alpha_mod_gap);
16 |
17 |
18 | %% x-dir
19 |
20 | layer_y = find_layers(num_mod_y, num_sys_y);
21 | dir_y = dirs(layer_y, 'y');
22 | alpha_y = dirs(layer_y, alpha_mod_gap);
23 |
24 |
25 | %% x-dir
26 |
27 | layer_z = find_layers(num_mod_z, num_sys_z);
28 | dir_z = dirs(layer_z, 'z');
29 | alpha_z = dirs(layer_z, alpha_mod_gap);
30 |
31 |
32 | %% Put everything together and create output.
33 |
34 | layer = [layer_x, layer_y, layer_z];
35 | dir = [dir_x, dir_y, dir_z];
36 | alpha = [alpha_x, alpha_y, alpha_z];
37 |
38 |
39 | end
40 |
41 | function layer_dir = find_layers(mod, sys)
42 |
43 | layer_dir = mod .* (1:sys);
44 | layer_dir = layer_dir(1:end-1); % remove last element, because that is at the outside of the system
45 |
46 | end
47 |
48 | function dir = dirs(layer_dir, dir_in)
49 |
50 | dir = repmat(dir_in, 1, length(layer_dir));
51 |
52 | end
53 |
--------------------------------------------------------------------------------
/simulation_framework/functions_BTMS_sim/check_results_mod.m:
--------------------------------------------------------------------------------
1 | function [res, passed] = check_results_mod(res, config)
2 |
3 | % Check electrical simulation results
4 |
5 |
6 | %% Get relevant params
7 |
8 | I_max_cell = config.BatPara.electrical.I_max;
9 | U_min_cell = config.BatPara.electrical.U_min;
10 | U_max_cell = config.BatPara.electrical.U_max;
11 |
12 |
13 | %% Check for overload
14 |
15 | I_max_mod = max(max(max(res.I_cell.Data)));
16 | SOC_max_mod = max(max(max(res.SOC.Data)));
17 | SOC_min_mod = min(min(min(res.SOC.Data)));
18 | U_min_mod = min(min(min(res.U_cell.Data)));
19 | U_max_mod = max(max(max(res.U_cell.Data)));
20 |
21 |
22 | %% Create test matrix
23 |
24 | passed.I_max = false;
25 | passed.U_min = false;
26 | passed.U_max = false;
27 | passed.SOC_max = false;
28 | passed.SOC_min = false;
29 |
30 | if I_max_mod <= I_max_cell
31 | passed.I_max = true;
32 | end
33 |
34 | if U_min_mod >= U_min_cell
35 | passed.U_min = true;
36 | end
37 |
38 | if U_max_mod <= U_max_cell
39 | passed.U_max = true;
40 | end
41 |
42 | if SOC_max_mod <= 1
43 | passed.SOC_min = true;
44 | end
45 |
46 | if SOC_min_mod >= 0
47 | passed.SOC_max = true;
48 | end
49 |
50 |
51 | %% Append results to res struct
52 |
53 | res.Tests_mod_el.I_max = passed.I_max;
54 | res.Tests_mod_el.SOC_max = passed.SOC_max;
55 | res.Tests_mod_el.SOC_min = passed.SOC_min;
56 | res.Tests_mod_el.U_min = passed.U_min;
57 | res.Tests_mod_el.U_max = passed.U_max;
58 |
59 |
60 | end
--------------------------------------------------------------------------------
/simulation_framework/input_and_parameters/02_system_data/system_para_BTMS_sim.m:
--------------------------------------------------------------------------------
1 | %% System parameters
2 |
3 | SysPara.name = mfilename; % Get config name from filename (for better overview)
4 |
5 |
6 | %% Electrical Interconnection
7 |
8 | SysPara.p = p; % Number of parallel cells --> Get from external value
9 | SysPara.s = s; % Number of serial cells --> Get from external value
10 |
11 |
12 | %% Cell balancing parameters
13 |
14 | % Simple dissipate Balancing. Model assumption: Every individual cell has
15 | % own balancing resistor. This allows individual balancing resistances per cell.
16 | % To represent one resistor per parallel connection use R_bal/BatSys.p
17 |
18 | SysPara.Balancing.R = 33 / SysPara.p; % Balancing resistance per cell in Ohm
19 | SysPara.Balancing.U_Delta = 0.05; % Minimum voltage difference between cells to start balancing in V
20 | SysPara.Balancing.U_Limit = 3.8; % Lower voltage limit to allow balancing
21 | SysPara.Balancing.I_Limit = SysPara.p * 0.5; % Upper limit of battery system furrent load to allow balancing in A
22 |
23 | SysPara.Balancing.t_Start = 0; % Specify simulation time after witch balancing is allowed. Set to 'inf' to disable balancing
24 |
25 |
26 | %% Thermal system parameters
27 |
28 | % Found in 'functions_BTMS_sim/sim_system', so they can be be tuned once
29 | % you have an idea, how the system will look like
--------------------------------------------------------------------------------
/simulation_framework/input_and_parameters/01_cell_data/scale_BatPara.m:
--------------------------------------------------------------------------------
1 | function [BatPara_scaled] = scale_BatPara(BatPara, target_capacity)
2 |
3 | % Approximate the dynamic behavior of cells with a different capacity from
4 | % a sample parameter set.
5 |
6 | % Note: This can be used for an INITIAL ASSESSMENT of the impact of
7 | % different cell sizes on the battery system and BTMS concept. Of course,
8 | % in reality there are other, non neglectable influences on dynamic cell
9 | % behavior that must not be neglected. If you use this framework for
10 | % anything other that basic comparisons you must provide your own cell
11 | % data!
12 |
13 | scaling_factor = BatPara.electrical.C_A / target_capacity;
14 |
15 | BatPara.electrical.dyn.R_0 = BatPara.electrical.dyn.R_0 * scaling_factor;
16 | BatPara.electrical.dyn.R1 = BatPara.electrical.dyn.R1 * scaling_factor;
17 | BatPara.electrical.dyn.R2 = BatPara.electrical.dyn.R2 * scaling_factor;
18 | BatPara.electrical.dyn.R3 = BatPara.electrical.dyn.R3 * scaling_factor;
19 | BatPara.electrical.dyn.R4 = BatPara.electrical.dyn.R4 * scaling_factor;
20 |
21 | BatPara.electrical.dyn.C1 = BatPara.electrical.dyn.C1 / scaling_factor;
22 | BatPara.electrical.dyn.C2 = BatPara.electrical.dyn.C2 / scaling_factor;
23 | BatPara.electrical.dyn.C3 = BatPara.electrical.dyn.C3 / scaling_factor;
24 | BatPara.electrical.dyn.C4 = BatPara.electrical.dyn.C4 / scaling_factor;
25 |
26 | BatPara.electrical.C_A = BatPara.electrical.C_A / scaling_factor;
27 |
28 | BatPara_scaled = BatPara;
29 |
30 | end
31 |
32 |
--------------------------------------------------------------------------------
/simulation_framework/battery_system_simulation/subroutines/deviations_stat.m:
--------------------------------------------------------------------------------
1 | % Calculate the normal distributed parameter deviations using the values
2 | % defined in parameters\cell_parameters_XXXX.m. Optinally also specific
3 | % deviation can be assigned to each cell.
4 |
5 | disp('Calculate statistic deviations.')
6 |
7 | SysPara.DeviationMap.C_A = 1 + randn(SysPara.p,SysPara.s)*BatPara.variances.electrical.C_A;
8 | SysPara.DeviationMap.R_0 = 1 + randn(SysPara.p,SysPara.s)*BatPara.variances.electrical.R_0;
9 | SysPara.DeviationMap.C1 = 1 + randn(SysPara.p,SysPara.s)*BatPara.variances.electrical.C1;
10 | SysPara.DeviationMap.C2 = 1 + randn(SysPara.p,SysPara.s)*BatPara.variances.electrical.C2;
11 | SysPara.DeviationMap.C3 = 1 + randn(SysPara.p,SysPara.s)*BatPara.variances.electrical.C3;
12 | SysPara.DeviationMap.C4 = 1 + randn(SysPara.p,SysPara.s)*BatPara.variances.electrical.C4;
13 | SysPara.DeviationMap.R1 = 1 + randn(SysPara.p,SysPara.s)*BatPara.variances.electrical.R1;
14 | SysPara.DeviationMap.R2 = 1 + randn(SysPara.p,SysPara.s)*BatPara.variances.electrical.R2;
15 | SysPara.DeviationMap.R3 = 1 + randn(SysPara.p,SysPara.s)*BatPara.variances.electrical.R3;
16 | SysPara.DeviationMap.R4 = 1 + randn(SysPara.p,SysPara.s)*BatPara.variances.electrical.R4;
17 | SysPara.DeviationMap.m = 1 + randn(SysPara.p,SysPara.s)*BatPara.variances.thermal.m;
18 | SysPara.DeviationMap.c = 1 + randn(SysPara.p,SysPara.s)*BatPara.variances.thermal.c;
19 | SysPara.DeviationMap.EnCo = 1 + randn(SysPara.p,SysPara.s)*BatPara.variances.thermal.EnCo;
20 | SysPara.DeviationMap.A = 1 + randn(SysPara.p,SysPara.s)*BatPara.variances.thermal.A;
--------------------------------------------------------------------------------
/simulation_framework/functions_BTMS_sim/calc_alpha_channel.m:
--------------------------------------------------------------------------------
1 | function alpha_channel = calc_alpha_channel(FluidPara, w_fluid, ch_width, ch_length, channel_inside)
2 | % Calculate the heat transfer coefficient inside the cooling channels
3 |
4 | % Assumption: Laminar flow
5 |
6 | % Refer to paper linked in respository for further information
7 |
8 |
9 | %% Get fluid parameters out of structure
10 |
11 | kin_vis = FluidPara.kin_vis; % kinematic viscosity in[m^2/s]
12 | lambda = FluidPara.lambda; % Thermal conductivity in [W/mK]
13 | Pr = FluidPara.Pr; % Prandtl number
14 |
15 |
16 | %% Get system info and preallocate variable
17 |
18 | num_channels = length(w_fluid);
19 | alpha_channel = NaN(num_channels, 1);
20 |
21 |
22 |
23 | % Iterate through the channels
24 | for ii = 1:num_channels
25 |
26 |
27 | %% Reynolds number (using approximation for planar channels)
28 |
29 | d_h = 2 * ch_width; % Hydraulic diameter
30 |
31 | Re = (d_h * w_fluid(ii)) / kin_vis;
32 |
33 |
34 | %% Mean Nusselt number in the channel
35 |
36 | % Distinction of cases between channels at the outside of the system (heated
37 | % from one side) and modules at the inside of the system (heated from both
38 | % sides).
39 |
40 | switch channel_inside(ii)
41 | case true
42 | Nu_1 = 7.541;
43 | otherwise
44 | Nu_1 = 4.861;
45 | end
46 |
47 | Nu_2 = 1.841 * nthroot(Re * Pr * (d_h / ch_length(ii)), 3);
48 |
49 | Nu_mean = nthroot(Nu_1^3 + Nu_2^3 , 3);
50 |
51 |
52 | %% Heat transfer coefficient
53 |
54 | alpha_channel(ii) = (Nu_mean * lambda) / d_h;
55 |
56 | end
57 |
58 | end
59 |
60 |
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/sys_test_energy.m:
--------------------------------------------------------------------------------
1 | function [config, passed] = sys_test_energy(config)
2 |
3 | % This function tests the energy in kWh of a pack and compares it to the
4 | % specifications made in 'system_specifications'
5 |
6 |
7 |
8 | %% Get relevant data out of the structure
9 |
10 |
11 | % Module data
12 |
13 | C_mod = config.ModInfo.C_mod; % Module capacity in Ah
14 | U_nom_mod = config.ModInfo.U_nom_mod; % Nominal module voltage in V
15 |
16 | U_min_mod = config.ModInfo.U_min_mod; % Minimum module voltage in V
17 | U_max_mod = config.ModInfo.U_max_mod; % Maximum module voltage in V
18 |
19 |
20 | % Electrical pack connection data
21 |
22 | p = config.SysInfo.num_parallel_mods_sys; % Total number of parallel modules
23 | s = config.SysInfo.num_mods_sys; % Total number of serial modules
24 |
25 |
26 |
27 | %% Calculate some module info and module energy
28 |
29 | C_sys = C_mod * p; % Module capacity Ah
30 | U_nom_sys = U_nom_mod * s; % Nominal module voltage in V
31 |
32 | E_sys = C_sys * U_nom_sys * 1e-3; % Module energy in kWh
33 |
34 | U_min_sys = U_min_mod * s; % Minimum module voltage in V
35 | U_max_sys = U_max_mod * s; % Maximum module voltage in V
36 |
37 |
38 |
39 | %% Test system against criteria
40 |
41 | passed = struct('energy_sys',false);
42 |
43 | if E_sys >= config.SysSpec.E_sys_min
44 | passed.energy_sys = true;
45 | end
46 |
47 |
48 | %% Write system info
49 |
50 | config.SysInfo.C_sys = C_sys;
51 | config.SysInfo.E_sys = E_sys;
52 | config.SysInfo.U_nom_sys = U_nom_sys;
53 | config.SysInfo.U_min_sys = U_min_sys;
54 | config.SysInfo.U_max_sys = U_max_sys;
55 |
--------------------------------------------------------------------------------
/simulation_framework/functions_BTMS_sim/get_IDs_cells_channels.m:
--------------------------------------------------------------------------------
1 | function IDs = get_IDs_cells_channels(layer, orientation, e_sys, pe_sys, s_sys)
2 | % Get IDs of cells adjacent to a cooling channel.
3 |
4 | %% Info
5 |
6 | % Input:
7 |
8 | % layer layer the BTMS channel is in (scalar value 0-*sys)
9 | % orientation spacial direction the layer is perpendicular to ('x', 'y' or 'z')
10 | % *_sys number of cells in the respective direction
11 | % e: z-direction
12 | % pe: y-direction
13 | % e: x-direction
14 |
15 | % Output
16 |
17 | % IDs vector with cell IDs adjacent to the channel
18 |
19 |
20 | %% Get cell IDs of system
21 |
22 | p_sys = e_sys * pe_sys; % Number of parallel cells
23 | n_sys = p_sys * s_sys; % Total number of cells
24 |
25 | cell_IDs = 1:n_sys;
26 |
27 | % Structure with cell IDs that corresponds to system geometry
28 |
29 | ID_3d = reshape(cell_IDs, [pe_sys, e_sys, s_sys]);
30 |
31 |
32 | %% Test if requested layer is outside of system
33 |
34 | if layer == 0
35 |
36 | % Outside beginning (one layer of cells)
37 | index = 1;
38 |
39 | elseif (layer == s_sys && orientation == 'x') || (layer == pe_sys && orientation == 'y') || (layer == e_sys && orientation == 'z')
40 |
41 | % Outside end (one layer of cells)
42 | index = layer;
43 |
44 | else
45 |
46 | % Inside (between two layers of cells)
47 | index = [layer, layer+1];
48 |
49 | end
50 |
51 |
52 | %% Get cell IDs
53 |
54 | switch orientation
55 | case 'x'
56 | IDs_mat = ID_3d(:,:,index);
57 | case 'y'
58 | IDs_mat = ID_3d(index,:,:);
59 | case 'z'
60 | IDs_mat = ID_3d(:,index,:);
61 | end
62 |
63 | %% Create output vector
64 |
65 | IDs = reshape(IDs_mat,1,numel(IDs_mat));
66 |
67 | end
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/epe_distribution.m:
--------------------------------------------------------------------------------
1 | function [epe] = epe_distribution(p_in, num_higher_p, min_e, max_e)
2 |
3 | % This function determine the e*pe connection for a number of p cells/modules
4 | % connected in parallel. The connection is chosen in such a way that the
5 | % cells/modules form a uniform rectangle with no gaps.
6 |
7 | % Example for p=6:
8 | % e*pe = 1*6 or 2*3
9 |
10 | % Check if p is a prime number. If so no suitable distributions will be
11 | % found. In this case also consider p+1. We don't iterate higher here
12 | % because we don't want to oversize the battery system.
13 |
14 | % Do the same if there is a set num_higher_p --> more distributions will
15 | % be found
16 |
17 | if or(isprime(p_in), num_higher_p)
18 | if num_higher_p == 0 % p_in is prime and num_higher_p is 0 --> Try p_in+1
19 | num_higher_p = 1;
20 | end
21 |
22 | p_in_vec = [p_in, nan(1, num_higher_p)]; % Array with all p_in
23 |
24 | for ii = 2:1:(1 + num_higher_p)
25 | p_in_vec(ii) = p_in_vec(1)+ (ii-1);
26 | end
27 |
28 | p_in = p_in_vec;
29 | end
30 |
31 | % Preallocate epe-structure
32 |
33 | epe = struct('p', cell(1,length(p_in)), ...
34 | 'pe', cell(1,length(p_in)), ...
35 | 'e', cell(1,length(p_in)));
36 |
37 | % Write possible p-e-pe configurations in structure
38 |
39 | for ii = 1:1:length(p_in)
40 | divisors_p = divisors(p_in(ii));
41 | epe(ii).p = p_in(ii);
42 | epe(ii).pe = flip(divisors_p);
43 | epe(ii).e = divisors_p;
44 |
45 | % Remove configs violating the max/min layers condition
46 | epe(ii) = rem_layer_violation(epe(ii), min_e, max_e);
47 |
48 | end
49 |
50 | end
51 |
52 | function epe_out = rem_layer_violation(epe, min_e, max_e)
53 |
54 | min_violation = epe.e < min_e;
55 | max_violation = epe.e > max_e;
56 | violation = logical(double(min_violation) + double(max_violation));
57 |
58 | if sum(violation) > 0
59 | epe.pe(violation) = [];
60 | epe.e(violation) = [];
61 | end
62 |
63 | epe_out = epe;
64 |
65 | end
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/sys_test_dimensions_no_BTMS.m:
--------------------------------------------------------------------------------
1 | function [config, passed] = sys_test_dimensions_no_BTMS(config)
2 |
3 | % This function tests the dimension of the pack and compares it to the
4 | % specifications made in 'system_specifications'
5 |
6 |
7 |
8 | %% Get relevant data out of the structure
9 |
10 | % Module data
11 |
12 | mass_mod = config.ModInfo.mass_mod;
13 |
14 | dim_x_mod = config.ModInfo.dim_x_mod;
15 | dim_y_mod = config.ModInfo.dim_y_mod;
16 | dim_z_mod = config.ModInfo.dim_z_mod;
17 |
18 |
19 |
20 | % interconnection data
21 |
22 | tot = config.SysInfo.num_mods_sys; % Total number of modules
23 | s = config.SysInfo.num_serial_mods_sys; % Total number of serial modules
24 | pe = config.SysInfo.num_parallel_mods_per_layer_sys; % Total number of parallel cells on one level
25 | e = config.SysInfo.num_layers_sys; % Total number of levels
26 |
27 |
28 | % Correction and safety factors
29 |
30 | sf_dim_sys = 1 + config.SysSpec.sf_dim_sys; % Safety factor for module dimensions (x,y,z)
31 | sf_mass_sys = 1 + config.SysSpec.sf_mass_sys; % Safety factor for module mass
32 |
33 |
34 |
35 | %% Calculate system mass and dimensions
36 |
37 | % We always assume the same orientation of the modules inside the system.
38 |
39 | mass_sys = mass_mod * tot * sf_mass_sys;
40 |
41 | dim_x_sys = dim_x_mod * s * sf_dim_sys;
42 | dim_y_sys = dim_y_mod * pe * sf_dim_sys;
43 | dim_z_sys = dim_z_mod * e * sf_dim_sys;
44 |
45 |
46 | %% Test system against criteria
47 |
48 | passed = struct('mass_sys',false, 'dim_x_sys',false, 'dim_y_sys',false, 'dim_z_sys',false);
49 |
50 | if mass_sys <= config.SysSpec.m_sys_max
51 | passed.mass_sys = true;
52 | end
53 |
54 | if dim_x_sys <= config.SysSpec.dim_x_sys_max
55 | passed.dim_x_sys = true;
56 | end
57 |
58 | if dim_y_sys <= config.SysSpec.dim_y_sys_max
59 | passed.dim_y_sys = true;
60 | end
61 |
62 | if dim_z_sys <= config.SysSpec.dim_z_sys_max
63 | passed.dim_z_sys = true;
64 | end
65 |
66 |
67 |
68 | %% Write system info
69 |
70 | config.SysInfo.mass_sys = mass_sys;
71 | config.SysInfo.dim_x_sys = dim_x_sys;
72 | config.SysInfo.dim_y_sys = dim_y_sys;
73 | config.SysInfo.dim_z_sys = dim_z_sys;
74 |
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/mod_test_dimensions_no_BTMS.m:
--------------------------------------------------------------------------------
1 | function [config, passed] = mod_test_dimensions_no_BTMS(config)
2 |
3 | % This function tests the dimension of the module and compares it to the
4 | % specifications made in 'system_specifications'
5 |
6 |
7 |
8 | %% Get relevant data out of the structure
9 |
10 | % Cell data
11 |
12 | m_cell = config.BatPara.physical.m;
13 |
14 | dim_x = config.BatPara.physical.dim_x;
15 | dim_y= config.BatPara.physical.dim_y;
16 | dim_z = config.BatPara.physical.dim_z;
17 |
18 |
19 | % Electrical connection data
20 |
21 | p = config.SysPara.p_mod; % Total number of parallel cells
22 | s = config.SysPara.s_mod; % Total number of serial cells
23 | pe = config.SysPara.pe_mod; % Total number of parallel cells on one level
24 | e = config.SysPara.e_mod; % Total number of levels
25 |
26 |
27 | % Correction and safety factors
28 |
29 | sf_mod_dim = 1 + config.SysSpec.sf_dim_mod; % Safety factor for module dimensions (x,y,z)
30 | sf_mod_mass = 1 + config.SysSpec.sf_mass_mod; % Safety factor for module mass
31 |
32 |
33 |
34 | %% Calculate module mass and dimensions
35 |
36 | % We distinguish between pouch/primatic and cylidrical cells.
37 | % Pouch/Prismatic is considered as 'standing' in the module, cylindrical
38 | % cells are considered as 'horizontal'.
39 |
40 | mass_mod = m_cell * s * p * sf_mod_mass; % Total module mass
41 |
42 | dim_x_mod = dim_x * s * sf_mod_dim;
43 | dim_y_mod = dim_y * pe * sf_mod_dim;
44 | dim_z_mod = dim_z * e * sf_mod_dim;
45 |
46 |
47 |
48 |
49 | %% Test module against criteria
50 |
51 | passed = struct('mass_mod',false, 'dim_x_mod',false, 'dim_y_mod',false, 'dim_z_mod',false);
52 |
53 | if mass_mod <= config.SysSpec.m_mod_max
54 | passed.mass_mod = true;
55 | end
56 |
57 | if dim_x_mod <= config.SysSpec.dim_x_mod_max
58 | passed.dim_x_mod = true;
59 | end
60 |
61 | if dim_y_mod <= config.SysSpec.dim_y_mod_max
62 | passed.dim_y_mod = true;
63 | end
64 |
65 | if dim_z_mod <= config.SysSpec.dim_z_mod_max
66 | passed.dim_z_mod = true;
67 | end
68 |
69 |
70 |
71 | %% Write module info
72 |
73 | config.ModInfo.mass_mod = mass_mod;
74 | config.ModInfo.dim_x_mod = dim_x_mod;
75 | config.ModInfo.dim_y_mod = dim_y_mod;
76 | config.ModInfo.dim_z_mod = dim_z_mod;
77 |
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/mod_test_energy.m:
--------------------------------------------------------------------------------
1 | function [config, passed] = mod_test_energy(config)
2 |
3 | % This function tests the energy in kWh of a module and compares it to the
4 | % specifications made in 'system_specifications'
5 |
6 |
7 |
8 | %% Get relevant data out of the structure
9 |
10 | % Cell data
11 |
12 | C_A_cell = config.BatPara.electrical.C_A; % Cell capacity in Ah
13 | U_nom_cell = config.BatPara.electrical.U_nom; % Nominal cell voltage in Ah
14 |
15 | U_min_cell = config.BatPara.electrical.U_min; % Minimum cell voltage in Ah
16 | U_max_cell = config.BatPara.electrical.U_max; % Maximum cell voltage in Ah
17 |
18 | I_max_cell = config.BatPara.electrical.I_max; % Maximum cell current in A
19 |
20 | % Electrical connection data
21 |
22 | p = config.SysPara.p_mod; % Total number of parallel cells
23 | s = config.SysPara.s_mod; % Total number of serial cells
24 |
25 |
26 |
27 | %% Calculate some module info and module energy
28 |
29 | C_mod = C_A_cell * p; % Module capacity Ah
30 | U_nom_mod = U_nom_cell * s; % Nominal module voltage in V
31 |
32 | E_mod = C_mod * U_nom_mod * 1e-3; % Module energy in kWh
33 |
34 | U_min_mod = U_min_cell * s; % Minimum module voltage in V
35 | U_max_mod = U_max_cell * s; % Maximum module voltage in V
36 |
37 | I_max_mod = I_max_cell * p; % Maximum module current in A
38 |
39 |
40 |
41 | %% Test module against criteria
42 |
43 | passed = struct('energy_mod',false);
44 |
45 | if E_mod >= config.SysSpec.E_mod_min
46 | passed.energy_mod = true;
47 | end
48 |
49 |
50 | %% Write module info
51 |
52 | config.ModInfo.C_mod = C_mod;
53 | config.ModInfo.E_mod = E_mod;
54 | config.ModInfo.U_nom_mod = U_nom_mod;
55 | config.ModInfo.U_min_mod = U_min_mod;
56 | config.ModInfo.U_max_mod = U_max_mod;
57 | config.ModInfo.I_max_mod = I_max_mod;
58 |
59 |
60 | %% Also include information about the electrical interconnection
61 |
62 | % This is also included in config.SysSpec (as a later simulation input),
63 | % but we also include it to config.ModInfo so all relevant info can be
64 | % gathered in first sight.
65 |
66 | config.ModInfo.num_cells_mod = p * s;
67 | config.ModInfo.num_serial_cells_mod = s;
68 | config.ModInfo.num_parallel_cells_mod = p;
69 | config.ModInfo.num_layers_mod = config.SysPara.e_mod;
70 | config.ModInfo.num_parallel_cells_per_layer_mod = config.SysPara.pe_mod;
71 |
--------------------------------------------------------------------------------
/simulation_framework/functions_BTMS_sim/check_results_sys.m:
--------------------------------------------------------------------------------
1 | function [res, passed] = check_results_sys(res, config)
2 |
3 | % Check electrical and thermal simulation results
4 |
5 |
6 | %% Get relevant params
7 |
8 | I_max_cell = config.BatPara.electrical.I_max;
9 | U_min_cell = config.BatPara.electrical.U_min;
10 | U_max_cell = config.BatPara.electrical.U_max;
11 |
12 | T_grad_max = config.SysSpec.T_grad_max ;
13 | T_max = config.SysSpec.T_max ;
14 | T_fluid_out_max = config.SysSpec.T_fluid_out_max;
15 |
16 |
17 | %% Check for overload (electric)
18 |
19 | I_max_sys = max(max(max(res.I_cell.Data)));
20 | SOC_max_sys = max(max(max(res.SOC.Data)));
21 | SOC_min_sys = min(min(min(res.SOC.Data)));
22 | U_min_sys = min(min(min(res.U_cell.Data)));
23 | U_max_sys = max(max(max(res.U_cell.Data)));
24 |
25 |
26 | %% Check for overload (thermal)
27 |
28 | T_max_sys = max(max(max(res.T_cell.Data)));
29 | T_grad_max_sys = max(max(max(res.T_cell_gradient.Data)));
30 | T_BTMS_out_max = max(max(max(res.T_BTMS_out_max.Data)));
31 |
32 |
33 | %% Create test matrix
34 |
35 | passed.I_max = false;
36 | passed.SOC_max = false;
37 | passed.SOC_min = false;
38 | passed.U_max = false;
39 | passed.U_min = false;
40 | passed.U_max = false;
41 | passed.U_max = false;
42 | passed.U_max = false;
43 | passed.T_BTMS_out_max = false;
44 | passed.T_max = false;
45 | passed.T_grad_max = false;
46 |
47 | if I_max_sys <= I_max_cell
48 | passed.I_max = true;
49 | end
50 |
51 | if U_min_sys >= U_min_cell
52 | passed.U_min = true;
53 | end
54 |
55 | if U_max_sys <= U_max_cell
56 | passed.U_max = true;
57 | end
58 |
59 | if SOC_max_sys <= 1
60 | passed.SOC_min = true;
61 | end
62 |
63 | if SOC_min_sys >= 0
64 | passed.SOC_max = true;
65 | end
66 |
67 | if T_grad_max_sys <= T_grad_max
68 | passed.T_BTMS_out_max = true;
69 | end
70 |
71 | if T_max_sys <= T_max
72 | passed.T_max = true;
73 | end
74 |
75 | if T_BTMS_out_max <= T_fluid_out_max
76 | passed.T_grad_max = true;
77 | end
78 |
79 |
80 | %% Append results to res struct
81 |
82 | res.Tests_sys.I_max = passed.I_max;
83 | res.Tests_sys.SOC_max = passed.SOC_max;
84 | res.Tests_sys.SOC_min = passed.SOC_min;
85 | res.Tests_sys.U_min = passed.U_min;
86 | res.Tests_sys.U_max = passed.U_max;
87 |
88 | res.Tests_sys.T_BTMS_out_max = passed.T_grad_max;
89 | res.Tests_sys.T_max = passed.T_max;
90 | res.Tests_sys.T_grad_max = passed.T_BTMS_out_max;
91 |
92 |
93 | end
--------------------------------------------------------------------------------
/simulation_framework/functions_sys_config/test_dimensions_BTMS.m:
--------------------------------------------------------------------------------
1 | function [config, passed] = test_dimensions_BTMS(config)
2 |
3 | % This function tests the dimension of the pack and compares it to the
4 | % specifications made in 'system_specifications'
5 |
6 |
7 |
8 | %% Get relevant data out of the structure
9 |
10 | % Module and system dimensions without BTMS
11 |
12 | dim_x_sys_no_BTMS = config.SysInfo.dim_x_sys;
13 | dim_y_sys_no_BTMS = config.SysInfo.dim_y_sys;
14 | dim_z_sys_no_BTMS = config.SysInfo.dim_z_sys;
15 |
16 | dim_x_mod_no_BTMS = config.ModInfo.dim_x_mod;
17 | dim_y_mod_no_BTMS = config.ModInfo.dim_y_mod;
18 | dim_z_mod_no_BTMS = config.ModInfo.dim_z_mod;
19 |
20 |
21 | % BTMS info
22 |
23 | num_x_dim_mod = config.BTMSConfig.info.num_channels_inside_mod_x_dir;
24 | num_y_dim_mod = config.BTMSConfig.info.num_channels_inside_mod_y_dir;
25 | num_z_dim_mod = config.BTMSConfig.info.num_channels_inside_mod_z_dir;
26 |
27 | num_x_dim_sys = config.BTMSConfig.info.num_channels_inside_sys_x_dir + num_x_dim_mod + config.BTMSPara.enable_sys_frontback * 2;
28 | num_y_dim_sys = config.BTMSConfig.info.num_channels_inside_sys_y_dir + num_y_dim_mod + config.BTMSPara.enable_sys_leftright * 2;
29 | num_z_dim_sys = config.BTMSConfig.info.num_channels_inside_sys_z_dir + num_z_dim_mod + config.BTMSPara.enable_sys_top + config.BTMSPara.enable_sys_bottom;
30 |
31 |
32 | %% Calculate module and system dimensions
33 |
34 | dim_x_sys_BTMS = get_dim(dim_x_sys_no_BTMS, num_x_dim_sys, config.BTMSPara.ch_width, config.BTMSPara.wt);
35 | dim_y_sys_BTMS = get_dim(dim_y_sys_no_BTMS, num_y_dim_sys, config.BTMSPara.ch_width, config.BTMSPara.wt);
36 | dim_z_sys_BTMS = get_dim(dim_z_sys_no_BTMS, num_z_dim_sys, config.BTMSPara.ch_width, config.BTMSPara.wt);
37 |
38 | dim_x_mod_BTMS = get_dim(dim_x_mod_no_BTMS, num_x_dim_mod, config.BTMSPara.ch_width, config.BTMSPara.wt);
39 | dim_y_mod_BTMS = get_dim(dim_y_mod_no_BTMS, num_y_dim_mod, config.BTMSPara.ch_width, config.BTMSPara.wt);
40 | dim_z_mod_BTMS = get_dim(dim_z_mod_no_BTMS, num_z_dim_mod, config.BTMSPara.ch_width, config.BTMSPara.wt);
41 |
42 |
43 | %% Test system against criteria
44 |
45 | passed = struct('dim_x_sys_BTMS',false, 'dim_y_sys_BTMS',false, 'dim_z_sys_BTMS',false, ...
46 | 'dim_x_mod_BTMS',false, 'dim_y_mod_BTMS',false, 'dim_z_mod_BTMS',false);
47 |
48 | % System level
49 |
50 | if dim_x_sys_BTMS <= config.SysSpec.dim_x_sys_max
51 | passed.dim_x_sys_BTMS = true;
52 | end
53 |
54 | if dim_y_sys_BTMS <= config.SysSpec.dim_y_sys_max
55 | passed.dim_y_sys_BTMS = true;
56 | end
57 |
58 | if dim_z_sys_BTMS <= config.SysSpec.dim_z_sys_max
59 | passed.dim_z_sys_BTMS = true;
60 | end
61 |
62 | % Module level
63 |
64 | if dim_x_mod_BTMS <= config.SysSpec.dim_x_mod_max
65 | passed.dim_x_mod_BTMS = true;
66 | end
67 |
68 | if dim_y_mod_BTMS <= config.SysSpec.dim_y_mod_max
69 | passed.dim_y_mod_BTMS = true;
70 | end
71 |
72 | if dim_z_mod_BTMS <= config.SysSpec.dim_z_mod_max
73 | passed.dim_z_mod_BTMS = true;
74 | end
75 |
76 |
77 |
78 | %% Write module and system info
79 |
80 | config.SysInfo.dim_x_sys_BTMS = dim_x_sys_BTMS;
81 | config.SysInfo.dim_y_sys_BTMS = dim_y_sys_BTMS;
82 | config.SysInfo.dim_z_sys_BTMS = dim_z_sys_BTMS;
83 |
84 | config.ModInfo.dim_x_mod_BTMS = dim_x_mod_BTMS;
85 | config.ModInfo.dim_y_mod_BTMS = dim_y_mod_BTMS;
86 | config.ModInfo.dim_z_mod_BTMS = dim_z_mod_BTMS;
87 |
88 | end
89 |
90 | function dim_BTMS = get_dim(dim, num, ch_width, ch_wt)
91 | % Calc system size
92 |
93 | dim_BTMS = dim + num*(ch_width + 2*ch_wt);
94 |
95 | end
96 |
97 |
--------------------------------------------------------------------------------
/simulation_framework/main_sim_BTMS_2_system_simulation.m:
--------------------------------------------------------------------------------
1 | %% Info
2 |
3 | % Part 2 of the BTMS configuration: Analyze and simulate the systems
4 |
5 | % To create the configurations refer to 'main_sim_BTMS_1_system_setup'.
6 |
7 |
8 | %% Initialization
9 |
10 | clearvars
11 | close all
12 | clc
13 |
14 |
15 | %% User Input: Select simulation modes
16 |
17 | modes.plot_sys = false; % Plot the system configuration
18 | modes.sim_module = false; % Electrical simulation of modules
19 | modes.sim_sys = true; % Electrical an thermal simulation of the whole system
20 |
21 | config_file_mod_sim = 'configs_6_BTMS_passed_system_simulation_Pouch_inside_cooling'; % Select the mat-File with the configs for module simulation
22 | config_file_sys_sim = 'configs_6_BTMS_passed_system_simulation_Pouch_inside_cooling'; % Select the mat-File with the configs for module simulation
23 |
24 | % Note: The steps above will be performed for all configs in the provided
25 | % mat-file and therefore may take a long time!
26 |
27 | % For further system specifications and simulation parameters go to:
28 | % - functions_BTMS_sim/sim_module
29 | % - functions_BTMS_sim/sim_module
30 |
31 |
32 | %% Plotting of systems
33 |
34 | if modes.plot_sys == true
35 |
36 | load(config_file_mod_sim)
37 |
38 | for ii = 1:1:size(configs_6_BTMS_passed, 2)
39 |
40 | config = configs_6_BTMS_passed(ii);
41 | plot_system_architecture(config);
42 |
43 | end
44 |
45 | end
46 |
47 |
48 | %% Electrical simulation and evaluation on module level
49 |
50 | clear sim_module % Clear persistent variable
51 |
52 | if modes.sim_module == true
53 |
54 | load(config_file_mod_sim)
55 |
56 | for ii = 1:1:size(configs_6_BTMS_passed, 2)
57 |
58 | config = configs_6_BTMS_passed(ii);
59 |
60 | results = sim_module(config);
61 |
62 | if isempty(results) == false
63 |
64 | [results, passed_mod] = check_results_mod(results, config);
65 |
66 | if check_for_failed_tests(passed_mod)
67 |
68 | save_sim_result(results, passed_mod, 'results_7', 'mod', 'failed')
69 | fprintf('Warning: The module with mod_ID %i failed the electrical tests and should be excluded from further consideration.\n\n', results.mod_ID)
70 |
71 | else
72 |
73 | save_sim_result(results, passed_mod, 'results_7', 'mod', 'passed')
74 |
75 | end
76 | end
77 | end
78 |
79 | disp('Module simulation finished.')
80 | clearvars results config t_* SimPara ii passed_mod
81 |
82 | end
83 |
84 |
85 | %% Electrical and thermal simulation and evaluation on system level
86 |
87 | clear sim_system % Clear persistent variable
88 |
89 | if modes.sim_sys == true
90 |
91 | load(config_file_sys_sim)
92 |
93 | for ii = 1:1:size(configs_6_BTMS_passed, 2)
94 |
95 | config = configs_6_BTMS_passed(ii);
96 |
97 | results = sim_system(config);
98 |
99 | if isempty(results) == false
100 |
101 | [results, passed_sys] = check_results_sys(results, config);
102 |
103 | if check_for_failed_tests(passed_sys)
104 |
105 | save_sim_result(results, passed_sys, 'results_8', 'sys', 'failed')
106 | fprintf('Warning: The system with sys_ID %i failed the electrical tests and should be excluded from further consideration.\n\n', results.sys_ID)
107 |
108 | else
109 |
110 | save_sim_result(results, passed_sys, 'results_8', 'sys', 'passed')
111 |
112 | end
113 | end
114 | end
115 |
116 | disp('System simulation finished.')
117 | clearvars results config t_* SimPara ii passed_sys
118 |
119 | end
120 |
121 | clearvars config_* modes
--------------------------------------------------------------------------------
/simulation_framework/functions_BTMS_sim/sim_module.m:
--------------------------------------------------------------------------------
1 | function results = sim_module(config)
2 |
3 | [~, mod_ID, SysSpec, BatPara, SysPara, ~, ~, ~, BTMSConfig] = expand_config(config);
4 |
5 |
6 | %% Check if this module was already simulated during this run
7 |
8 | % If yes: No simulation
9 |
10 | persistent mod_ID_tracker
11 |
12 | if isempty(mod_ID)
13 | mod_ID_tracker = mod_ID;
14 | else
15 | if isempty( mod_ID_tracker( mod_ID_tracker == mod_ID ) )
16 | mod_ID_tracker = cat(2, mod_ID_tracker, mod_ID);
17 | else
18 | results = [];
19 | return
20 | end
21 | end
22 |
23 | fprintf('Starting module simulation of mod_ID %i\n', mod_ID);
24 |
25 |
26 | %% Setting up the simulation (user input)
27 |
28 | % Refer to 'https://github.com/TUMFTM/sim_battery_system' for an
29 | % explanation of what all of this means
30 |
31 | SimPara.t_step = 0.01;
32 | SimPara.t_sim = 3*3600;
33 | SimPara.LoggingOutput = true;
34 | SimPara.OutputDataType = 'single';
35 | SimPara.OutputDecimation = 100;
36 | SimPara.LoadSpectra_enable = false;
37 |
38 | SysPara.I_charge_min = 10; % Stop charging when charging current drops below this value in A
39 | SysPara.SOC_charge_max = 0.98; % Stop charging when any cell SOC in the battery system is over this value
40 |
41 |
42 | % Worst-Case: No heat exchange of battery with environment
43 | % Note this is only valid for the case of cooling if T_ambient < T_battery!
44 |
45 | SysPara.thermal.T_cell_ambient = 25;
46 | SysPara.thermal.alpha_cell_ambient = 0;
47 |
48 |
49 | %% Providing the system parameters for the simulation
50 |
51 | SysPara.p = SysPara.p_mod;
52 | SysPara.s = SysPara.s_mod;
53 |
54 | SysPara.I_charge = SysSpec.I_mod_max;
55 | SysPara.U_charge_target = interp1(BatPara.electrical.OCV.SOC, BatPara.electrical.OCV.U, SysPara.SOC_charge_max, 'linear', 'extrap');
56 |
57 |
58 | SysPara.DeviationMap = SysPara_DeviationMap(BatPara, SysPara.p, SysPara.s);
59 |
60 |
61 | %% Initial State
62 |
63 | % Initial state of every individual cell insode the system (hence the
64 | % 'ones(BatSys.p,BatSys.s)'). This allows the adaption to measurement data or to induce
65 | % initial load imbalances or thermal gradients.
66 |
67 | SysPara.BatStateInit.electrical.SOC = ones(SysPara.p,SysPara.s) * 0.05;
68 | SysPara.BatStateInit.electrical.U_hyst = ones(SysPara.p,SysPara.s) * 0;
69 | SysPara.BatStateInit.electrical.U_RC1 = ones(SysPara.p,SysPara.s) * 0;
70 | SysPara.BatStateInit.electrical.U_RC2 = ones(SysPara.p,SysPara.s) * 0;
71 | SysPara.BatStateInit.electrical.U_RC3 = ones(SysPara.p,SysPara.s) * 0;
72 | SysPara.BatStateInit.electrical.U_RC4 = ones(SysPara.p,SysPara.s) * 0;
73 | SysPara.BatStateInit.electrical.I_cell = ones(SysPara.p,SysPara.s) * 0;
74 |
75 | % Thermal initialization. Even if you don't use the thermal submodel you
76 | % must specify something!
77 |
78 | SysPara.BatStateInit.thermal.T_cell = ones(SysPara.p,SysPara.s) * 25;
79 |
80 |
81 | %% Setting up the simulation
82 |
83 | % We only want to simulation the electrical side so all thermal simulation
84 | % is deactivated
85 |
86 | SimPara.thermal_sim_enable = false;
87 | SimPara.heat_exchange_enable = false;
88 | SimPara.TempSensors_enable = false;
89 | SimPara.BTMS_sim_enable = false;
90 |
91 |
92 | %% Remove incompatible fields
93 |
94 | % Those are fields containing data-types which will lead to an error in
95 | % Simulink and aren't needed for simulation anyway.
96 |
97 | BTMSConfig = rmfield(BTMSConfig,'info');
98 | BatPara = rmfield(BatPara,{'name', 'cell_type'});
99 | SysPara = rmfield(SysPara,'name');
100 |
101 |
102 | %% Starting the simulation
103 |
104 | % Write variables to model workspace
105 |
106 | model = 'sim_BTMS';
107 |
108 | load_system(model);
109 | mod_wrksp = get_param(model,'ModelWorkspace');
110 | assignin(mod_wrksp,'SysPara',SysPara)
111 | assignin(mod_wrksp,'BatPara',BatPara)
112 | assignin(mod_wrksp,'BTMSConfig',BTMSConfig)
113 |
114 | % SimPara must be assigned to base workspace because of limitation of
115 | % Simulink Variant Subsystem configuration
116 | assignin('base','SimPara',SimPara)
117 |
118 | simOut = sim(model);
119 |
120 |
121 | %% Clear model workspace
122 |
123 | clear(mod_wrksp)
124 | close_system(model)
125 |
126 |
127 | %% Clear unneeded variables
128 |
129 | results.mod_ID = mod_ID;
130 |
131 | results.SysPara = SysPara;
132 | results.I_cell = simOut.I_cell;
133 | results.I_load = simOut.I_load;
134 | results.SOC = simOut.SOC;
135 | results.U_Pack = simOut.U_Pack;
136 | results.U_cell = simOut.U_cell;
137 |
138 | end
--------------------------------------------------------------------------------
/simulation_framework/functions_BTMS_sim/sim_system.m:
--------------------------------------------------------------------------------
1 | function results = sim_system(config)
2 |
3 | [sys_ID, mod_ID, SysSpec, BatPara, SysPara, ~, ModInfo, SysInfo, BTMSConfig] = expand_config(config);
4 |
5 |
6 | %% Check if this system was already simulated during this run
7 |
8 | % If yes: No simulation
9 |
10 | persistent sys_ID_tracker
11 |
12 | if isempty(sys_ID)
13 | sys_ID_tracker = sys_ID;
14 | else
15 | if isempty( sys_ID_tracker( sys_ID_tracker == sys_ID ) )
16 | sys_ID_tracker = cat(2, sys_ID_tracker, sys_ID);
17 | else
18 | results = [];
19 | return
20 | end
21 | end
22 |
23 | fprintf('Starting system simulation of sys_ID %i\n', sys_ID);
24 |
25 |
26 | %% Setting up the simulation (user input)
27 |
28 | % Refer to 'https://github.com/TUMFTM/sim_battery_system' for an
29 | % explanation of what all of this means
30 |
31 | SimPara.t_step = 0.01;
32 | SimPara.t_sim = 3*3600;
33 | SimPara.LoggingOutput = true;
34 | SimPara.OutputDataType = 'single';
35 | SimPara.OutputDecimation = 1000;
36 | SimPara.LoadSpectra_enable = false;
37 |
38 | SysPara.I_charge_min = 10; % Stop charging when charging current drops below this value in A
39 | SysPara.SOC_charge_max = 1; % Stop charging when any cell SOC in the battery system is over this value
40 |
41 |
42 | % All thermal resistances and heat transfer effects between the cells are
43 | % combined in a thermal transmittance alpha for each spacial direction.
44 | % Set so zero if there is no heat transfer in one or more spacial
45 | % directions.
46 |
47 | SysPara.thermal.transfer.alpha_x = 1000; % thermal transmittance between the cells in x-direction in W/(m^2*K)
48 | SysPara.thermal.transfer.alpha_y = 1000; % thermal transmittance between the cells in y-direction in W/(m^2*K)
49 | SysPara.thermal.transfer.alpha_z = 1000; % thermal transmittance between the cells in z-direction in W/(m^2*K)
50 |
51 | SysPara.thermal.transfer.alpha_mod_gap = 100; % heat transfer coefficient between the cells in all direction between different modules in W/(m^2*K)
52 |
53 |
54 | % Worst-Case: No heat exchange of battery with environment
55 | % Note this is only valid for the case of cooling if T_ambient < T_battery!
56 |
57 | SysPara.thermal.T_cell_ambient = 25;
58 | SysPara.thermal.alpha_cell_ambient = 0;
59 |
60 |
61 | %% Optional: Overwrite parameter deviations
62 |
63 | % Use this option to set parameter deviation to zero. This allows you to
64 | % compare the influence of different BTMS architectures without any other
65 | % influences.
66 |
67 | overwrite_parameter_dev = true;
68 |
69 |
70 | %% Providing the system parameters for the simulation
71 |
72 | SysPara.p = SysPara.p_sys;
73 | SysPara.s = SysPara.s_sys;
74 |
75 | SysPara.I_charge = SysSpec.I_sys_max;
76 | SysPara.U_charge_target = interp1(BatPara.electrical.OCV.SOC, BatPara.electrical.OCV.U, SysPara.SOC_charge_max, 'linear', 'extrap');
77 |
78 | if overwrite_parameter_dev
79 | BatPara.variances.electrical.C_A = 0;
80 | BatPara.variances.electrical.R_0 = 0;
81 | BatPara.variances.thermal.c = 0;
82 | end
83 |
84 | SysPara.DeviationMap = SysPara_DeviationMap(BatPara, SysPara.p, SysPara.s);
85 |
86 |
87 | %% Providing the thermal system parameters for simulation
88 |
89 | % Get position, spacial direction and heat transfer coefficient of gaps between modules
90 | % We assume the same value for all spacial directions and positions.
91 |
92 | [SysPara.thermal.transfer.layer, SysPara.thermal.transfer.dir, SysPara.thermal.transfer.alpha] = special_heat_transfer_positons(SysPara.thermal.transfer.alpha_mod_gap, ModInfo, SysInfo);
93 |
94 | % Caluclate the heat transfer matrix
95 |
96 | SysPara.thermal.transfer.K_transfer = calc_heat_transfer_matrix(SysPara.pe_sys, SysPara.e_sys, SysPara.s_sys,... % System interconnection info
97 | SysPara.thermal.transfer.A_x, SysPara.thermal.transfer.A_y, SysPara.thermal.transfer.A_z,... % Heat conducting surfaces in all spacial directions
98 | SysPara.thermal.transfer.alpha_x, SysPara.thermal.transfer.alpha_y, SysPara.thermal.transfer.alpha_z,... % Heat transfer coefficients between cells in all spacial directions
99 | SysPara.thermal.transfer.layer, SysPara.thermal.transfer.alpha, SysPara.thermal.transfer.dir); % Position, spacial direction and heat transfer coefficient of gaps between modules
100 |
101 |
102 | %% Initial State
103 |
104 | % Initial state of every individual cell insode the system (hence the
105 | % 'ones(BatSys.p,BatSys.s)'). This allows the adaption to measurement data or to induce
106 | % initial load imbalances or thermal gradients.
107 |
108 | % In our example, there is a inbalance of SOC, represented as a normal
109 | % distribution randn(BatSys.p,BatSys.s).
110 |
111 | SysPara.BatStateInit.electrical.SOC = ones(SysPara.p,SysPara.s) * 0.05;
112 | SysPara.BatStateInit.electrical.U_hyst = ones(SysPara.p,SysPara.s) * 0;
113 | SysPara.BatStateInit.electrical.U_RC1 = ones(SysPara.p,SysPara.s) * 0;
114 | SysPara.BatStateInit.electrical.U_RC2 = ones(SysPara.p,SysPara.s) * 0;
115 | SysPara.BatStateInit.electrical.U_RC3 = ones(SysPara.p,SysPara.s) * 0;
116 | SysPara.BatStateInit.electrical.U_RC4 = ones(SysPara.p,SysPara.s) * 0;
117 | SysPara.BatStateInit.electrical.I_cell = ones(SysPara.p,SysPara.s) * 0;
118 |
119 | % Thermal initialization. Even if you don't use the thermal submodel you
120 | % must specify something!
121 |
122 | SysPara.BatStateInit.thermal.T_cell = ones(SysPara.p,SysPara.s) * 25;
123 |
124 |
125 | %% Setting up the simulation
126 |
127 | % We only want to simulation the electrical side so all thermal simulation
128 | % is deactivated
129 |
130 | SimPara.thermal_sim_enable = true;
131 | SimPara.heat_exchange_enable = true;
132 | SimPara.TempSensors_enable = false;
133 | SimPara.BTMS_sim_enable = true;
134 |
135 |
136 | %% Remove incompatible fields
137 |
138 | % Those are fields containing data-types which will lead to an error in
139 | % Simulink and aren't needed for simulation anyway.
140 |
141 | BTMSConfig = rmfield(BTMSConfig,'info');
142 | BatPara = rmfield(BatPara,{'name', 'cell_type'});
143 | SysPara = rmfield(SysPara,'name');
144 |
145 |
146 | %% Starting the simulation
147 |
148 | % Write variables to model workspace
149 |
150 | model = 'sim_BTMS';
151 |
152 | load_system(model);
153 | mod_wrksp = get_param(model,'ModelWorkspace');
154 | assignin(mod_wrksp,'SysPara',SysPara)
155 | assignin(mod_wrksp,'BatPara',BatPara)
156 | assignin(mod_wrksp,'BTMSConfig',BTMSConfig)
157 |
158 | % SimPara must be assigned to base workspace because of limitation of
159 | % Simulink Variant Subsystem configuration
160 | assignin('base','SimPara',SimPara)
161 |
162 | simOut = sim(model);
163 |
164 |
165 | %% Clear model workspace
166 |
167 | clear(mod_wrksp)
168 | close_system(model)
169 |
170 |
171 | %% Clear unneeded variables
172 |
173 | results.sys_ID = sys_ID;
174 | results.mod_ID = mod_ID;
175 |
176 | results.SysPara = SysPara;
177 | results.I_cell = simOut.I_cell;
178 | results.I_load = simOut.I_load;
179 | results.SOC = simOut.SOC;
180 | results.U_Pack = simOut.U_Pack;
181 | results.U_cell = simOut.U_cell;
182 |
183 | results.T_cell = simOut.T_cell;
184 | results.T_cell_gradient = simOut.T_cell_gradient;
185 | results.T_BTMS_out_max = simOut.T_BTMS_out_max;
186 |
187 | end
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU LESSER GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 |
9 | This version of the GNU Lesser General Public License incorporates
10 | the terms and conditions of version 3 of the GNU General Public
11 | License, supplemented by the additional permissions listed below.
12 |
13 | 0. Additional Definitions.
14 |
15 | As used herein, "this License" refers to version 3 of the GNU Lesser
16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU
17 | General Public License.
18 |
19 | "The Library" refers to a covered work governed by this License,
20 | other than an Application or a Combined Work as defined below.
21 |
22 | An "Application" is any work that makes use of an interface provided
23 | by the Library, but which is not otherwise based on the Library.
24 | Defining a subclass of a class defined by the Library is deemed a mode
25 | of using an interface provided by the Library.
26 |
27 | A "Combined Work" is a work produced by combining or linking an
28 | Application with the Library. The particular version of the Library
29 | with which the Combined Work was made is also called the "Linked
30 | Version".
31 |
32 | The "Minimal Corresponding Source" for a Combined Work means the
33 | Corresponding Source for the Combined Work, excluding any source code
34 | for portions of the Combined Work that, considered in isolation, are
35 | based on the Application, and not on the Linked Version.
36 |
37 | The "Corresponding Application Code" for a Combined Work means the
38 | object code and/or source code for the Application, including any data
39 | and utility programs needed for reproducing the Combined Work from the
40 | Application, but excluding the System Libraries of the Combined Work.
41 |
42 | 1. Exception to Section 3 of the GNU GPL.
43 |
44 | You may convey a covered work under sections 3 and 4 of this License
45 | without being bound by section 3 of the GNU GPL.
46 |
47 | 2. Conveying Modified Versions.
48 |
49 | If you modify a copy of the Library, and, in your modifications, a
50 | facility refers to a function or data to be supplied by an Application
51 | that uses the facility (other than as an argument passed when the
52 | facility is invoked), then you may convey a copy of the modified
53 | version:
54 |
55 | a) under this License, provided that you make a good faith effort to
56 | ensure that, in the event an Application does not supply the
57 | function or data, the facility still operates, and performs
58 | whatever part of its purpose remains meaningful, or
59 |
60 | b) under the GNU GPL, with none of the additional permissions of
61 | this License applicable to that copy.
62 |
63 | 3. Object Code Incorporating Material from Library Header Files.
64 |
65 | The object code form of an Application may incorporate material from
66 | a header file that is part of the Library. You may convey such object
67 | code under terms of your choice, provided that, if the incorporated
68 | material is not limited to numerical parameters, data structure
69 | layouts and accessors, or small macros, inline functions and templates
70 | (ten or fewer lines in length), you do both of the following:
71 |
72 | a) Give prominent notice with each copy of the object code that the
73 | Library is used in it and that the Library and its use are
74 | covered by this License.
75 |
76 | b) Accompany the object code with a copy of the GNU GPL and this license
77 | document.
78 |
79 | 4. Combined Works.
80 |
81 | You may convey a Combined Work under terms of your choice that,
82 | taken together, effectively do not restrict modification of the
83 | portions of the Library contained in the Combined Work and reverse
84 | engineering for debugging such modifications, if you also do each of
85 | the following:
86 |
87 | a) Give prominent notice with each copy of the Combined Work that
88 | the Library is used in it and that the Library and its use are
89 | covered by this License.
90 |
91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license
92 | document.
93 |
94 | c) For a Combined Work that displays copyright notices during
95 | execution, include the copyright notice for the Library among
96 | these notices, as well as a reference directing the user to the
97 | copies of the GNU GPL and this license document.
98 |
99 | d) Do one of the following:
100 |
101 | 0) Convey the Minimal Corresponding Source under the terms of this
102 | License, and the Corresponding Application Code in a form
103 | suitable for, and under terms that permit, the user to
104 | recombine or relink the Application with a modified version of
105 | the Linked Version to produce a modified Combined Work, in the
106 | manner specified by section 6 of the GNU GPL for conveying
107 | Corresponding Source.
108 |
109 | 1) Use a suitable shared library mechanism for linking with the
110 | Library. A suitable mechanism is one that (a) uses at run time
111 | a copy of the Library already present on the user's computer
112 | system, and (b) will operate properly with a modified version
113 | of the Library that is interface-compatible with the Linked
114 | Version.
115 |
116 | e) Provide Installation Information, but only if you would otherwise
117 | be required to provide such information under section 6 of the
118 | GNU GPL, and only to the extent that such information is
119 | necessary to install and execute a modified version of the
120 | Combined Work produced by recombining or relinking the
121 | Application with a modified version of the Linked Version. (If
122 | you use option 4d0, the Installation Information must accompany
123 | the Minimal Corresponding Source and Corresponding Application
124 | Code. If you use option 4d1, you must provide the Installation
125 | Information in the manner specified by section 6 of the GNU GPL
126 | for conveying Corresponding Source.)
127 |
128 | 5. Combined Libraries.
129 |
130 | You may place library facilities that are a work based on the
131 | Library side by side in a single library together with other library
132 | facilities that are not Applications and are not covered by this
133 | License, and convey such a combined library under terms of your
134 | choice, if you do both of the following:
135 |
136 | a) Accompany the combined library with a copy of the same work based
137 | on the Library, uncombined with any other library facilities,
138 | conveyed under the terms of this License.
139 |
140 | b) Give prominent notice with the combined library that part of it
141 | is a work based on the Library, and explaining where to find the
142 | accompanying uncombined form of the same work.
143 |
144 | 6. Revised Versions of the GNU Lesser General Public License.
145 |
146 | The Free Software Foundation may publish revised and/or new versions
147 | of the GNU Lesser General Public License from time to time. Such new
148 | versions will be similar in spirit to the present version, but may
149 | differ in detail to address new problems or concerns.
150 |
151 | Each version is given a distinguishing version number. If the
152 | Library as you received it specifies that a certain numbered version
153 | of the GNU Lesser General Public License "or any later version"
154 | applies to it, you have the option of following the terms and
155 | conditions either of that published version or of any later version
156 | published by the Free Software Foundation. If the Library as you
157 | received it does not specify a version number of the GNU Lesser
158 | General Public License, you may choose any version of the GNU Lesser
159 | General Public License ever published by the Free Software Foundation.
160 |
161 | If the Library as you received it specifies that a proxy can decide
162 | whether future versions of the GNU Lesser General Public License shall
163 | apply, that proxy's public statement of acceptance of any version is
164 | permanent authorization for you to choose that version for the
165 | Library.
166 |
--------------------------------------------------------------------------------
/simulation_framework/input_and_parameters/03_BTMS_config/liquid_full_system.m:
--------------------------------------------------------------------------------
1 | %% Disclaimer
2 |
3 | % This data is for testing and debugging purposes only!
4 | % The data is mainly used to test the model so it may have been randomly changed
5 | % meaning it has nothing to do with reality.
6 |
7 | % Use at your own risk!
8 |
9 |
10 |
11 | %% Info
12 |
13 | % Specify details of physical BTMS configuration on the cell, module and
14 | % system level. There are many different possibilities and if you select
15 | % everything the configuration and simulation may take a very long time!
16 | % It is recommended to slowly iterate through the different possibilities.
17 |
18 | % There are several options for cooling your battery system.
19 |
20 | % On the system level:
21 | % Bottom cooling of the modules (bottom layer only) --> sys_bottom
22 | % Top cooling of the modules (top layer only) --> sys_top
23 | % Cooling the left/right side of the battery system (all outside modules) --> sys_leftright
24 | % Cooling the front/back side of the battery system (all outside modules) --> sys_frontback
25 | % Cooling the module sides inside of the battery system
26 | % perpendicular to the x, y and z axis --> sys_inside_x, sys_inside_y, sys_inside_z,
27 | %
28 | % On the module level:
29 | % Cooling of the outer cells of a module (gets implied via system-level definitions)
30 | % Cooling of the cells inside the module
31 | % perpendicular to the x, y and z axis --> mod_inside_x, mod_inside_y, mod_inside_z
32 |
33 | % For air as cooling medium it is always assumed that all cells/modules are
34 | % in the airflow if internal cooling is selected. In this case the parameter
35 | % sys_inside_x determine the direction of the airflow. Note that only one
36 | % sys_inside_* may be set true in this case!
37 |
38 | % For the case of liquid cooling, setting more than one *_inside_* value to
39 | % true will lead to a "crossing" of cooling channels. The model assumes
40 | % this doesn't lead to any thermal interaction or even mixing of the
41 | % fluids. Every cooling channel is simulated independently.
42 |
43 | % For the simulation you provide the overall fluid mass flow as well as the
44 | % width and the height of the cooling channels of each method. The
45 | % individual mass flow is calculated according to the number of all cooling
46 | % channels inside the config. This is necessary, because we don't now yet
47 | % how the models and the battery pack looks like and therefore cannot
48 | % determine the number of cooling channels.
49 |
50 |
51 |
52 | %% Basic information
53 |
54 | BTMSPara.name = mfilename; % Get config name from filename (for better overview)
55 |
56 | BTMSPara.T_fluid_in = 20; % Inlet temperature of cooling fluid in �C
57 | BTMSPara.Vdot_fluid = 0.0045; % Overall fluid mass flow in m^3/s % Value for air cooling: 0.0625
58 | BTMSPara.ref_pressure = 101325; % Reference pressure in Pa
59 |
60 | BTMSPara.FluidType = 'INCOMP::MEG-50%'; % Specify fluid type for CoolProp (see: http://www.coolprop.org/) (Water with 50% ethylenglycol)
61 |
62 | BTMSPara.lambda_wall = 236; % Thermal conductivity of the material of the cooling installation in W/m*K (copper)
63 | BTMSPara.wt = 0.00015; % Wall thickness of the cooling installation in m
64 |
65 | BTMSPara.ch_width = 0.003; % Width of cooling channels in m
66 | BTMSPara.ch_ratio_sys = 0.95; % Ratio of channel size relative to x,y or z dimensions of battery system
67 | BTMSPara.ch_ratio_cell = 0.90; % Ratio of channel size relative to x,y or z dimensions of battery system
68 |
69 |
70 | %% Natural convection around cells
71 |
72 | % The framework disregards heat dissipation of the battery system to the
73 | % environment due to natural convection to comply with the worst-case
74 | % assumption used to design the BTMS.
75 | % If required this can easily been added to the simulation framework by
76 | % adding the heat transfer coefficient and the environmental temperature to
77 | % the signals 'T_cell_ambient' and 'alpha_cell_ambient'. Refer to the
78 | % subsystem 'Create BTMS input' to see how those values are scaled to
79 | % incorporate more than one heat transfer path.
80 |
81 |
82 |
83 | %% System-level: Bottom cooling
84 |
85 | % Assumes all modules are standing on a cooling plate with uniform temperature.
86 | % Fluid flow along x-dim of battery system.
87 | % This only affects the bottom layer of modules in the battery system. So
88 | % all module with a num_layers_sys >= 2 won't be directly affected by this
89 | % option.
90 |
91 | BTMSPara.enable_sys_bottom = true;
92 |
93 |
94 | %% System-level: Top cooling
95 |
96 | % Assumes a cooling plate with uniform temperature on top of the battery system.
97 | % Fluid flow along x-dim of battery system.
98 | % This only affects the top layer of modules in the battery system.
99 |
100 | BTMSPara.enable_sys_top = true;
101 |
102 |
103 | %% System-level: Cooling of left/right of battery system
104 |
105 | % Assumes a cooling plate with uniform temperat%%ure on the left and right of the battery system.
106 | % Fluid flow along x-dim of battery system.
107 | % This only affects the outer left and right modules.
108 |
109 | BTMSPara.enable_sys_leftright = true;
110 |
111 |
112 | %% System-level: Cooling of front/back
113 |
114 | % Assumes a cooling plate with uniform temperature on the front and back of the battery system.
115 | % Fluid flow along x-dim of battery system.
116 | % This only affects the outer left and right modules.
117 |
118 | BTMSPara.enable_sys_frontback = true;
119 |
120 |
121 | %% System-level: Cooling between the modules in the spacial directions
122 |
123 | % Assumes a cooling plate with uniform temperature between the modules.
124 |
125 | % Fluid flow perpendicular to x-dim of battery system.
126 |
127 | BTMSPara.enable_sys_inside_x = true;
128 |
129 |
130 | % Fluid flow perpendicular to y-dim of battery system.
131 |
132 | BTMSPara.enable_sys_inside_y = true;
133 |
134 |
135 | % Fluid flow perpendicular to z-dim of battery system
136 |
137 | BTMSPara.enable_sys_inside_z = true;
138 |
139 |
140 |
141 | %% About cooling inside of the battery system
142 |
143 | % Every '*_inside_*' option will place cooling channels in the specified
144 | % spacial direction on the module level. This is specified by a vector
145 | % specifying the position of the cooling plates relative to the cell count
146 | % inside the module.
147 |
148 | % Example for a 4s module:
149 |
150 | % 4s --> Only cells in x-direction
151 |
152 | % Legend: o = cell, | = cooling plate
153 |
154 | % Design 1: o o o o mod_inside_x_layers = [] (same as enable_sys_inside_* = false)
155 | % Design 2: o o|o o mod_inside_x_layers = [2]
156 | % Design 3: o|o o|o mod_inside_x_layers = [1,3]
157 | % Design 4: o|o|o|o mod_inside_x_layers = [1,2,3]
158 |
159 | % To only cool the outside of module use 'enable_sys_between_*' above.
160 |
161 | % Some hints:
162 | % - This requires information about the module design (number of cells in
163 | % all directions). It is recommended to first do a rough design without
164 | % this option and only turn this option one once you have an idea how
165 | % your modules will look like and know you really need cooling inside the
166 | % modules
167 | % - In 'mod_inside_*_layers' only numbers from 1 to the number of cells in
168 | % the spacial direction within the module -1 is supported. Everything else
169 | % will throw an error in the BTMS configuration.
170 | % - There is a possibility to plot your system design for better
171 | % visualisation. Run the configuration 'main_sim_BTMS_1_system_setup' and
172 | % refer to 'main_sim_BTMS_2_system_simulation'.
173 |
174 |
175 | %% Module-level: Cooling inside modules perpendicular to x-direction
176 |
177 | BTMSPara.enable_mod_inside_x = false;
178 | BTMSPara.mod_inside_x_layers = [];
179 |
180 |
181 | %% Module-level: Cooling inside modules perpendicular to y-direction
182 |
183 | BTMSPara.enable_mod_inside_y = false;
184 | BTMSPara.mod_inside_y_layers = [];
185 |
186 |
187 | %% Module-level: Cooling inside modules perpendicular to z-direction
188 |
189 | BTMSPara.enable_mod_inside_z = false;
190 | BTMSPara.mod_inside_z_layers = [];
191 |
192 |
--------------------------------------------------------------------------------
/simulation_framework/input_and_parameters/03_BTMS_config/liquid_bottom.m:
--------------------------------------------------------------------------------
1 | %% Disclaimer
2 |
3 | % This data is for testing and debugging purposes only!
4 | % The data is mainly used to test the model so it may have been randomly changed
5 | % meaning it has nothing to do with reality.
6 |
7 | % Use at your own risk!
8 |
9 |
10 |
11 | %% Info
12 |
13 | % Specify details of physical BTMS configuration on the cell, module and
14 | % system level. There are many different possibilities and if you select
15 | % everything the configuration and simulation may take a very long time!
16 | % It is recommended to slowly iterate through the different possibilities.
17 |
18 | % There are several options for cooling your battery system.
19 |
20 | % On the system level:
21 | % Bottom cooling of the modules (bottom layer only) --> sys_bottom
22 | % Top cooling of the modules (top layer only) --> sys_top
23 | % Cooling the left/right side of the battery system (all outside modules) --> sys_leftright
24 | % Cooling the front/back side of the battery system (all outside modules) --> sys_frontback
25 | % Cooling the module sides inside of the battery system
26 | % perpendicular to the x, y and z axis --> sys_inside_x, sys_inside_y, sys_inside_z,
27 | %
28 | % On the module level:
29 | % Cooling of the outer cells of a module (gets implied via system-level definitions)
30 | % Cooling of the cells inside the module
31 | % perpendicular to the x, y and z axis --> mod_inside_x, mod_inside_y, mod_inside_z
32 |
33 | % For air as cooling medium it is always assumed that all cells/modules are
34 | % in the airflow if internal cooling is selected. In this case the parameter
35 | % sys_inside_x determine the direction of the airflow. Note that only one
36 | % sys_inside_* may be set true in this case!
37 |
38 | % For the case of liquid cooling, setting more than one *_inside_* value to
39 | % true will lead to a "crossing" of cooling channels. The model assumes
40 | % this doesn't lead to any thermal interaction or even mixing of the
41 | % fluids. Every cooling channel is simulated independently.
42 |
43 | % For the simulation you provide the overall fluid mass flow as well as the
44 | % width and the height of the cooling channels of each method. The
45 | % individual mass flow is calculated according to the number of all cooling
46 | % channels inside the config. This is necessary, because we don't now yet
47 | % how the models and the battery pack looks like and therefore cannot
48 | % determine the number of cooling channels.
49 |
50 |
51 |
52 | %% Basic information
53 |
54 | BTMSPara.name = mfilename; % Get config name from filename (for better overview)
55 |
56 | BTMSPara.T_fluid_in = 20; % Inlet temperature of cooling fluid in �C
57 | BTMSPara.Vdot_fluid = 0.0045; % Overall fluid mass flow in m^3/s % Value for air cooling: 0.0625
58 | BTMSPara.ref_pressure = 101325; % Reference pressure in Pa
59 |
60 | BTMSPara.FluidType = 'INCOMP::MEG-50%'; % Specify fluid type for CoolProp (see: http://www.coolprop.org/) (Water with 50% ethylenglycol)
61 |
62 | BTMSPara.lambda_wall = 236; % Thermal conductivity of the material of the cooling installation in W/m*K (copper)
63 | BTMSPara.wt = 0.00015; % Wall thickness of the cooling installation in m
64 |
65 | BTMSPara.ch_width = 0.003; % Width of cooling channels in m
66 | BTMSPara.ch_ratio_sys = 0.95; % Ratio of channel size relative to x,y or z dimensions of battery system
67 | BTMSPara.ch_ratio_cell = 0.90; % Ratio of channel size relative to x,y or z dimensions of battery system
68 |
69 |
70 | %% Natural convection around cells
71 |
72 | % The framework disregards heat dissipation of the battery system to the
73 | % environment due to natural convection to comply with the worst-case
74 | % assumption used to design the BTMS.
75 | % If required this can easily been added to the simulation framework by
76 | % adding the heat transfer coefficient and the environmental temperature to
77 | % the signals 'T_cell_ambient' and 'alpha_cell_ambient'. Refer to the
78 | % subsystem 'Create BTMS input' to see how those values are scaled to
79 | % incorporate more than one heat transfer path.
80 |
81 |
82 |
83 | %% System-level: Bottom cooling
84 |
85 | % Assumes all modules are standing on a cooling plate with uniform temperature.
86 | % Fluid flow along x-dim of battery system.
87 | % This only affects the bottom layer of modules in the battery system. So
88 | % all module with a num_layers_sys >= 2 won't be directly affected by this
89 | % option.
90 |
91 | BTMSPara.enable_sys_bottom = true;
92 |
93 |
94 | %% System-level: Top cooling
95 |
96 | % Assumes a cooling plate with uniform temperature on top of the battery system.
97 | % Fluid flow along x-dim of battery system.
98 | % This only affects the top layer of modules in the battery system.
99 |
100 | BTMSPara.enable_sys_top = false;
101 |
102 |
103 | %% System-level: Cooling of left/right of battery system
104 |
105 | % Assumes a cooling plate with uniform temperat%%ure on the left and right of the battery system.
106 | % Fluid flow along x-dim of battery system.
107 | % This only affects the outer left and right modules.
108 |
109 | BTMSPara.enable_sys_leftright = false;
110 |
111 |
112 | %% System-level: Cooling of front/back
113 |
114 | % Assumes a cooling plate with uniform temperature on the front and back of the battery system.
115 | % Fluid flow along x-dim of battery system.
116 | % This only affects the outer left and right modules.
117 |
118 | BTMSPara.enable_sys_frontback = false;
119 |
120 |
121 | %% System-level: Cooling between the modules in the spacial directions
122 |
123 | % Assumes a cooling plate with uniform temperature between the modules.
124 |
125 | % Fluid flow perpendicular to x-dim of battery system.
126 |
127 | BTMSPara.enable_sys_inside_x = false;
128 |
129 |
130 | % Fluid flow perpendicular to y-dim of battery system.
131 |
132 | BTMSPara.enable_sys_inside_y = false;
133 |
134 |
135 | % Fluid flow perpendicular to z-dim of battery system
136 |
137 | BTMSPara.enable_sys_inside_z = false;
138 |
139 |
140 |
141 | %% About cooling inside of the battery system
142 |
143 | % Every '*_inside_*' option will place cooling channels in the specified
144 | % spacial direction on the module level. This is specified by a vector
145 | % specifying the position of the cooling plates relative to the cell count
146 | % inside the module.
147 |
148 | % Example for a 4s module:
149 |
150 | % 4s --> Only cells in x-direction
151 |
152 | % Legend: o = cell, | = cooling plate
153 |
154 | % Design 1: o o o o mod_inside_x_layers = [] (same as enable_sys_inside_* = false)
155 | % Design 2: o o|o o mod_inside_x_layers = [2]
156 | % Design 3: o|o o|o mod_inside_x_layers = [1,3]
157 | % Design 4: o|o|o|o mod_inside_x_layers = [1,2,3]
158 |
159 | % To only cool the outside of module use 'enable_sys_between_*' above.
160 |
161 | % Some hints:
162 | % - This requires information about the module design (number of cells in
163 | % all directions). It is recommended to first do a rough design without
164 | % this option and only turn this option one once you have an idea how
165 | % your modules will look like and know you really need cooling inside the
166 | % modules
167 | % - In 'mod_inside_*_layers' only numbers from 1 to the number of cells in
168 | % the spacial direction within the module -1 is supported. Everything else
169 | % will throw an error in the BTMS configuration.
170 | % - There is a possibility to plot your system design for better
171 | % visualisation. Run the configuration 'main_sim_BTMS_1_system_setup' and
172 | % refer to 'main_sim_BTMS_2_system_simulation'.
173 |
174 |
175 | %% Module-level: Cooling inside modules perpendicular to x-direction
176 |
177 | BTMSPara.enable_mod_inside_x = false;
178 | BTMSPara.mod_inside_x_layers = [];
179 |
180 |
181 | %% Module-level: Cooling inside modules perpendicular to y-direction
182 |
183 | BTMSPara.enable_mod_inside_y = false;
184 | BTMSPara.mod_inside_y_layers = [];
185 |
186 |
187 | %% Module-level: Cooling inside modules perpendicular to z-direction
188 |
189 | BTMSPara.enable_mod_inside_z = false;
190 | BTMSPara.mod_inside_z_layers = [];
191 |
192 |
--------------------------------------------------------------------------------
/simulation_framework/input_and_parameters/03_BTMS_config/liquid_bottom_xdir.m:
--------------------------------------------------------------------------------
1 | %% Disclaimer
2 |
3 | % This data is for testing and debugging purposes only!
4 | % The data is mainly used to test the model so it may have been randomly changed
5 | % meaning it has nothing to do with reality.
6 |
7 | % Use at your own risk!
8 |
9 |
10 |
11 | %% Info
12 |
13 | % Specify details of physical BTMS configuration on the cell, module and
14 | % system level. There are many different possibilities and if you select
15 | % everything the configuration and simulation may take a very long time!
16 | % It is recommended to slowly iterate through the different possibilities.
17 |
18 | % There are several options for cooling your battery system.
19 |
20 | % On the system level:
21 | % Bottom cooling of the modules (bottom layer only) --> sys_bottom
22 | % Top cooling of the modules (top layer only) --> sys_top
23 | % Cooling the left/right side of the battery system (all outside modules) --> sys_leftright
24 | % Cooling the front/back side of the battery system (all outside modules) --> sys_frontback
25 | % Cooling the module sides inside of the battery system
26 | % perpendicular to the x, y and z axis --> sys_inside_x, sys_inside_y, sys_inside_z,
27 | %
28 | % On the module level:
29 | % Cooling of the outer cells of a module (gets implied via system-level definitions)
30 | % Cooling of the cells inside the module
31 | % perpendicular to the x, y and z axis --> mod_inside_x, mod_inside_y, mod_inside_z
32 |
33 | % For air as cooling medium it is always assumed that all cells/modules are
34 | % in the airflow if internal cooling is selected. In this case the parameter
35 | % sys_inside_x determine the direction of the airflow. Note that only one
36 | % sys_inside_* may be set true in this case!
37 |
38 | % For the case of liquid cooling, setting more than one *_inside_* value to
39 | % true will lead to a "crossing" of cooling channels. The model assumes
40 | % this doesn't lead to any thermal interaction or even mixing of the
41 | % fluids. Every cooling channel is simulated independently.
42 |
43 | % For the simulation you provide the overall fluid mass flow as well as the
44 | % width and the height of the cooling channels of each method. The
45 | % individual mass flow is calculated according to the number of all cooling
46 | % channels inside the config. This is necessary, because we don't now yet
47 | % how the models and the battery pack looks like and therefore cannot
48 | % determine the number of cooling channels.
49 |
50 |
51 |
52 | %% Basic information
53 |
54 | BTMSPara.name = mfilename; % Get config name from filename (for better overview)
55 |
56 | BTMSPara.T_fluid_in = 20; % Inlet temperature of cooling fluid in �C
57 | BTMSPara.Vdot_fluid = 0.0045; % Overall fluid mass flow in m^3/s % Value for air cooling: 0.0625
58 | BTMSPara.ref_pressure = 101325; % Reference pressure in Pa
59 |
60 | BTMSPara.FluidType = 'INCOMP::MEG-50%'; % Specify fluid type for CoolProp (see: http://www.coolprop.org/) (Water with 50% ethylenglycol)
61 |
62 | BTMSPara.lambda_wall = 236; % Thermal conductivity of the material of the cooling installation in W/m*K (copper)
63 | BTMSPara.wt = 0.00015; % Wall thickness of the cooling installation in m
64 |
65 | BTMSPara.ch_width = 0.003; % Width of cooling channels in m
66 | BTMSPara.ch_ratio_sys = 0.95; % Ratio of channel size relative to x,y or z dimensions of battery system
67 | BTMSPara.ch_ratio_cell = 0.90; % Ratio of channel size relative to x,y or z dimensions of battery system
68 |
69 |
70 | %% Natural convection around cells
71 |
72 | % The framework disregards heat dissipation of the battery system to the
73 | % environment due to natural convection to comply with the worst-case
74 | % assumption used to design the BTMS.
75 | % If required this can easily been added to the simulation framework by
76 | % adding the heat transfer coefficient and the environmental temperature to
77 | % the signals 'T_cell_ambient' and 'alpha_cell_ambient'. Refer to the
78 | % subsystem 'Create BTMS input' to see how those values are scaled to
79 | % incorporate more than one heat transfer path.
80 |
81 |
82 |
83 | %% System-level: Bottom cooling
84 |
85 | % Assumes all modules are standing on a cooling plate with uniform temperature.
86 | % Fluid flow along x-dim of battery system.
87 | % This only affects the bottom layer of modules in the battery system. So
88 | % all module with a num_layers_sys >= 2 won't be directly affected by this
89 | % option.
90 |
91 | BTMSPara.enable_sys_bottom = true;
92 |
93 |
94 | %% System-level: Top cooling
95 |
96 | % Assumes a cooling plate with uniform temperature on top of the battery system.
97 | % Fluid flow along x-dim of battery system.
98 | % This only affects the top layer of modules in the battery system.
99 |
100 | BTMSPara.enable_sys_top = false;
101 |
102 |
103 | %% System-level: Cooling of left/right of battery system
104 |
105 | % Assumes a cooling plate with uniform temperat%%ure on the left and right of the battery system.
106 | % Fluid flow along x-dim of battery system.
107 | % This only affects the outer left and right modules.
108 |
109 | BTMSPara.enable_sys_leftright = false;
110 |
111 |
112 | %% System-level: Cooling of front/back
113 |
114 | % Assumes a cooling plate with uniform temperature on the front and back of the battery system.
115 | % Fluid flow along x-dim of battery system.
116 | % This only affects the outer left and right modules.
117 |
118 | BTMSPara.enable_sys_frontback = false;
119 |
120 |
121 | %% System-level: Cooling between the modules in the spacial directions
122 |
123 | % Assumes a cooling plate with uniform temperature between the modules.
124 |
125 | % Fluid flow perpendicular to x-dim of battery system.
126 |
127 | BTMSPara.enable_sys_inside_x = true;
128 |
129 |
130 | % Fluid flow perpendicular to y-dim of battery system.
131 |
132 | BTMSPara.enable_sys_inside_y = false;
133 |
134 |
135 | % Fluid flow perpendicular to z-dim of battery system
136 |
137 | BTMSPara.enable_sys_inside_z = false;
138 |
139 |
140 |
141 | %% About cooling inside of the battery system
142 |
143 | % Every '*_inside_*' option will place cooling channels in the specified
144 | % spacial direction on the module level. This is specified by a vector
145 | % specifying the position of the cooling plates relative to the cell count
146 | % inside the module.
147 |
148 | % Example for a 4s module:
149 |
150 | % 4s --> Only cells in x-direction
151 |
152 | % Legend: o = cell, | = cooling plate
153 |
154 | % Design 1: o o o o mod_inside_x_layers = [] (same as enable_sys_inside_* = false)
155 | % Design 2: o o|o o mod_inside_x_layers = [2]
156 | % Design 3: o|o o|o mod_inside_x_layers = [1,3]
157 | % Design 4: o|o|o|o mod_inside_x_layers = [1,2,3]
158 |
159 | % To only cool the outside of module use 'enable_sys_between_*' above.
160 |
161 | % Some hints:
162 | % - This requires information about the module design (number of cells in
163 | % all directions). It is recommended to first do a rough design without
164 | % this option and only turn this option one once you have an idea how
165 | % your modules will look like and know you really need cooling inside the
166 | % modules
167 | % - In 'mod_inside_*_layers' only numbers from 1 to the number of cells in
168 | % the spacial direction within the module -1 is supported. Everything else
169 | % will throw an error in the BTMS configuration.
170 | % - There is a possibility to plot your system design for better
171 | % visualisation. Run the configuration 'main_sim_BTMS_1_system_setup' and
172 | % refer to 'main_sim_BTMS_2_system_simulation'.
173 |
174 |
175 | %% Module-level: Cooling inside modules perpendicular to x-direction
176 |
177 | BTMSPara.enable_mod_inside_x = false;
178 | BTMSPara.mod_inside_x_layers = [];
179 |
180 |
181 | %% Module-level: Cooling inside modules perpendicular to y-direction
182 |
183 | BTMSPara.enable_mod_inside_y = false;
184 | BTMSPara.mod_inside_y_layers = [];
185 |
186 |
187 | %% Module-level: Cooling inside modules perpendicular to z-direction
188 |
189 | BTMSPara.enable_mod_inside_z = false;
190 | BTMSPara.mod_inside_z_layers = [];
191 |
192 |
--------------------------------------------------------------------------------
/simulation_framework/input_and_parameters/03_BTMS_config/liquid_inside_xyz_dir.m:
--------------------------------------------------------------------------------
1 | %% Disclaimer
2 |
3 | % This data is for testing and debugging purposes only!
4 | % The data is mainly used to test the model so it may have been randomly changed
5 | % meaning it has nothing to do with reality.
6 |
7 | % Use at your own risk!
8 |
9 |
10 |
11 | %% Info
12 |
13 | % Specify details of physical BTMS configuration on the cell, module and
14 | % system level. There are many different possibilities and if you select
15 | % everything the configuration and simulation may take a very long time!
16 | % It is recommended to slowly iterate through the different possibilities.
17 |
18 | % There are several options for cooling your battery system.
19 |
20 | % On the system level:
21 | % Bottom cooling of the modules (bottom layer only) --> sys_bottom
22 | % Top cooling of the modules (top layer only) --> sys_top
23 | % Cooling the left/right side of the battery system (all outside modules) --> sys_leftright
24 | % Cooling the front/back side of the battery system (all outside modules) --> sys_frontback
25 | % Cooling the module sides inside of the battery system
26 | % perpendicular to the x, y and z axis --> sys_inside_x, sys_inside_y, sys_inside_z,
27 | %
28 | % On the module level:
29 | % Cooling of the outer cells of a module (gets implied via system-level definitions)
30 | % Cooling of the cells inside the module
31 | % perpendicular to the x, y and z axis --> mod_inside_x, mod_inside_y, mod_inside_z
32 |
33 | % For air as cooling medium it is always assumed that all cells/modules are
34 | % in the airflow if internal cooling is selected. In this case the parameter
35 | % sys_inside_x determine the direction of the airflow. Note that only one
36 | % sys_inside_* may be set true in this case!
37 |
38 | % For the case of liquid cooling, setting more than one *_inside_* value to
39 | % true will lead to a "crossing" of cooling channels. The model assumes
40 | % this doesn't lead to any thermal interaction or even mixing of the
41 | % fluids. Every cooling channel is simulated independently.
42 |
43 | % For the simulation you provide the overall fluid mass flow as well as the
44 | % width and the height of the cooling channels of each method. The
45 | % individual mass flow is calculated according to the number of all cooling
46 | % channels inside the config. This is necessary, because we don't now yet
47 | % how the models and the battery pack looks like and therefore cannot
48 | % determine the number of cooling channels.
49 |
50 |
51 |
52 | %% Basic information
53 |
54 | BTMSPara.name = mfilename; % Get config name from filename (for better overview)
55 |
56 | BTMSPara.T_fluid_in = 20; % Inlet temperature of cooling fluid in �C
57 | BTMSPara.Vdot_fluid = 0.0045; % Overall fluid mass flow in m^3/s % Value for air cooling: 0.0625
58 | BTMSPara.ref_pressure = 101325; % Reference pressure in Pa
59 |
60 | BTMSPara.FluidType = 'INCOMP::MEG-50%'; % Specify fluid type for CoolProp (see: http://www.coolprop.org/) (Water with 50% ethylenglycol)
61 |
62 | BTMSPara.lambda_wall = 236; % Thermal conductivity of the material of the cooling installation in W/m*K (copper)
63 | BTMSPara.wt = 0.00015; % Wall thickness of the cooling installation in m
64 |
65 | BTMSPara.ch_width = 0.003; % Width of cooling channels in m
66 | BTMSPara.ch_ratio_sys = 0.95; % Ratio of channel size relative to x,y or z dimensions of battery system
67 | BTMSPara.ch_ratio_cell = 0.90; % Ratio of channel size relative to x,y or z dimensions of battery system
68 |
69 |
70 | %% Natural convection around cells
71 |
72 | % The framework disregards heat dissipation of the battery system to the
73 | % environment due to natural convection to comply with the worst-case
74 | % assumption used to design the BTMS.
75 | % If required this can easily been added to the simulation framework by
76 | % adding the heat transfer coefficient and the environmental temperature to
77 | % the signals 'T_cell_ambient' and 'alpha_cell_ambient'. Refer to the
78 | % subsystem 'Create BTMS input' to see how those values are scaled to
79 | % incorporate more than one heat transfer path.
80 |
81 |
82 |
83 | %% System-level: Bottom cooling
84 |
85 | % Assumes all modules are standing on a cooling plate with uniform temperature.
86 | % Fluid flow along x-dim of battery system.
87 | % This only affects the bottom layer of modules in the battery system. So
88 | % all module with a num_layers_sys >= 2 won't be directly affected by this
89 | % option.
90 |
91 | BTMSPara.enable_sys_bottom = true;
92 |
93 |
94 | %% System-level: Top cooling
95 |
96 | % Assumes a cooling plate with uniform temperature on top of the battery system.
97 | % Fluid flow along x-dim of battery system.
98 | % This only affects the top layer of modules in the battery system.
99 |
100 | BTMSPara.enable_sys_top = true;
101 |
102 |
103 | %% System-level: Cooling of left/right of battery system
104 |
105 | % Assumes a cooling plate with uniform temperat%%ure on the left and right of the battery system.
106 | % Fluid flow along x-dim of battery system.
107 | % This only affects the outer left and right modules.
108 |
109 | BTMSPara.enable_sys_leftright = true;
110 |
111 |
112 | %% System-level: Cooling of front/back
113 |
114 | % Assumes a cooling plate with uniform temperature on the front and back of the battery system.
115 | % Fluid flow along x-dim of battery system.
116 | % This only affects the outer left and right modules.
117 |
118 | BTMSPara.enable_sys_frontback = true;
119 |
120 |
121 | %% System-level: Cooling between the modules in the spacial directions
122 |
123 | % Assumes a cooling plate with uniform temperature between the modules.
124 |
125 | % Fluid flow perpendicular to x-dim of battery system.
126 |
127 | BTMSPara.enable_sys_inside_x = true;
128 |
129 |
130 | % Fluid flow perpendicular to y-dim of battery system.
131 |
132 | BTMSPara.enable_sys_inside_y = true;
133 |
134 |
135 | % Fluid flow perpendicular to z-dim of battery system
136 |
137 | BTMSPara.enable_sys_inside_z = true;
138 |
139 |
140 |
141 | %% About cooling inside of the battery system
142 |
143 | % Every '*_inside_*' option will place cooling channels in the specified
144 | % spacial direction on the module level. This is specified by a vector
145 | % specifying the position of the cooling plates relative to the cell count
146 | % inside the module.
147 |
148 | % Example for a 4s module:
149 |
150 | % 4s --> Only cells in x-direction
151 |
152 | % Legend: o = cell, | = cooling plate
153 |
154 | % Design 1: o o o o mod_inside_x_layers = [] (same as enable_sys_inside_* = false)
155 | % Design 2: o o|o o mod_inside_x_layers = [2]
156 | % Design 3: o|o o|o mod_inside_x_layers = [1,3]
157 | % Design 4: o|o|o|o mod_inside_x_layers = [1,2,3]
158 |
159 | % To only cool the outside of module use 'enable_sys_between_*' above.
160 |
161 | % Some hints:
162 | % - This requires information about the module design (number of cells in
163 | % all directions). It is recommended to first do a rough design without
164 | % this option and only turn this option one once you have an idea how
165 | % your modules will look like and know you really need cooling inside the
166 | % modules
167 | % - In 'mod_inside_*_layers' only numbers from 1 to the number of cells in
168 | % the spacial direction within the module -1 is supported. Everything else
169 | % will throw an error in the BTMS configuration.
170 | % - There is a possibility to plot your system design for better
171 | % visualisation. Run the configuration 'main_sim_BTMS_1_system_setup' and
172 | % refer to 'main_sim_BTMS_2_system_simulation'.
173 |
174 |
175 | %% Module-level: Cooling inside modules perpendicular to x-direction
176 |
177 | BTMSPara.enable_mod_inside_x = false;
178 | BTMSPara.mod_inside_x_layers = [];
179 |
180 |
181 | %% Module-level: Cooling inside modules perpendicular to y-direction
182 |
183 | BTMSPara.enable_mod_inside_y = false;
184 | BTMSPara.mod_inside_y_layers = [];
185 |
186 |
187 | %% Module-level: Cooling inside modules perpendicular to z-direction
188 |
189 | BTMSPara.enable_mod_inside_z = false;
190 | BTMSPara.mod_inside_z_layers = [];
191 |
192 |
--------------------------------------------------------------------------------
/simulation_framework/input_and_parameters/03_BTMS_config/liquid_inside_18650.m:
--------------------------------------------------------------------------------
1 | %% Disclaimer
2 |
3 | % This data is for testing and debugging purposes only!
4 | % The data is mainly used to test the model so it may have been randomly changed
5 | % meaning it has nothing to do with reality.
6 |
7 | % Use at your own risk!
8 |
9 |
10 |
11 | %% Info
12 |
13 | % Specify details of physical BTMS configuration on the cell, module and
14 | % system level. There are many different possibilities and if you select
15 | % everything the configuration and simulation may take a very long time!
16 | % It is recommended to slowly iterate through the different possibilities.
17 |
18 | % There are several options for cooling your battery system.
19 |
20 | % On the system level:
21 | % Bottom cooling of the modules (bottom layer only) --> sys_bottom
22 | % Top cooling of the modules (top layer only) --> sys_top
23 | % Cooling the left/right side of the battery system (all outside modules) --> sys_leftright
24 | % Cooling the front/back side of the battery system (all outside modules) --> sys_frontback
25 | % Cooling the module sides inside of the battery system
26 | % perpendicular to the x, y and z axis --> sys_inside_x, sys_inside_y, sys_inside_z,
27 | %
28 | % On the module level:
29 | % Cooling of the outer cells of a module (gets implied via system-level definitions)
30 | % Cooling of the cells inside the module
31 | % perpendicular to the x, y and z axis --> mod_inside_x, mod_inside_y, mod_inside_z
32 |
33 | % For air as cooling medium it is always assumed that all cells/modules are
34 | % in the airflow if internal cooling is selected. In this case the parameter
35 | % sys_inside_x determine the direction of the airflow. Note that only one
36 | % sys_inside_* may be set true in this case!
37 |
38 | % For the case of liquid cooling, setting more than one *_inside_* value to
39 | % true will lead to a "crossing" of cooling channels. The model assumes
40 | % this doesn't lead to any thermal interaction or even mixing of the
41 | % fluids. Every cooling channel is simulated independently.
42 |
43 | % For the simulation you provide the overall fluid mass flow as well as the
44 | % width and the height of the cooling channels of each method. The
45 | % individual mass flow is calculated according to the number of all cooling
46 | % channels inside the config. This is necessary, because we don't now yet
47 | % how the models and the battery pack looks like and therefore cannot
48 | % determine the number of cooling channels.
49 |
50 |
51 |
52 | %% Basic information
53 |
54 | BTMSPara.name = mfilename; % Get config name from filename (for better overview)
55 |
56 | BTMSPara.T_fluid_in = 20; % Inlet temperature of cooling fluid in �C
57 | BTMSPara.Vdot_fluid = 0.0045; % Overall fluid mass flow in m^3/s % Value for air cooling: 0.0625
58 | BTMSPara.ref_pressure = 101325; % Reference pressure in Pa
59 |
60 | BTMSPara.FluidType = 'INCOMP::MEG-50%'; % Specify fluid type for CoolProp (see: http://www.coolprop.org/) (Water with 50% ethylenglycol)
61 |
62 | BTMSPara.lambda_wall = 236; % Thermal conductivity of the material of the cooling installation in W/m*K (copper)
63 | BTMSPara.wt = 0.00015; % Wall thickness of the cooling installation in m
64 |
65 | BTMSPara.ch_width = 0.003; % Width of cooling channels in m
66 | BTMSPara.ch_ratio_sys = 0.95; % Ratio of channel size relative to x,y or z dimensions of battery system
67 | BTMSPara.ch_ratio_cell = 0.90; % Ratio of channel size relative to x,y or z dimensions of battery system
68 |
69 |
70 | %% Natural convection around cells
71 |
72 | % The framework disregards heat dissipation of the battery system to the
73 | % environment due to natural convection to comply with the worst-case
74 | % assumption used to design the BTMS.
75 | % If required this can easily been added to the simulation framework by
76 | % adding the heat transfer coefficient and the environmental temperature to
77 | % the signals 'T_cell_ambient' and 'alpha_cell_ambient'. Refer to the
78 | % subsystem 'Create BTMS input' to see how those values are scaled to
79 | % incorporate more than one heat transfer path.
80 |
81 |
82 |
83 | %% System-level: Bottom cooling
84 |
85 | % Assumes all modules are standing on a cooling plate with uniform temperature.
86 | % Fluid flow along x-dim of battery system.
87 | % This only affects the bottom layer of modules in the battery system. So
88 | % all module with a num_layers_sys >= 2 won't be directly affected by this
89 | % option.
90 |
91 | BTMSPara.enable_sys_bottom = false;
92 |
93 |
94 | %% System-level: Top cooling
95 |
96 | % Assumes a cooling plate with uniform temperature on top of the battery system.
97 | % Fluid flow along x-dim of battery system.
98 | % This only affects the top layer of modules in the battery system.
99 |
100 | BTMSPara.enable_sys_top = false;
101 |
102 |
103 | %% System-level: Cooling of left/right of battery system
104 |
105 | % Assumes a cooling plate with uniform temperat%%ure on the left and right of the battery system.
106 | % Fluid flow along x-dim of battery system.
107 | % This only affects the outer left and right modules.
108 |
109 | BTMSPara.enable_sys_leftright = false;
110 |
111 |
112 | %% System-level: Cooling of front/back
113 |
114 | % Assumes a cooling plate with uniform temperature on the front and back of the battery system.
115 | % Fluid flow along x-dim of battery system.
116 | % This only affects the outer left and right modules.
117 |
118 | BTMSPara.enable_sys_frontback = false;
119 |
120 |
121 | %% System-level: Cooling between the modules in the spacial directions
122 |
123 | % Assumes a cooling plate with uniform temperature between the modules.
124 |
125 | % Fluid flow perpendicular to x-dim of battery system.
126 |
127 | BTMSPara.enable_sys_inside_x = false;
128 |
129 |
130 | % Fluid flow perpendicular to y-dim of battery system.
131 |
132 | BTMSPara.enable_sys_inside_y = false;
133 |
134 |
135 | % Fluid flow perpendicular to z-dim of battery system
136 |
137 | BTMSPara.enable_sys_inside_z = false;
138 |
139 |
140 |
141 | %% About cooling inside of the battery system
142 |
143 | % Every '*_inside_*' option will place cooling channels in the specified
144 | % spacial direction on the module level. This is specified by a vector
145 | % specifying the position of the cooling plates relative to the cell count
146 | % inside the module.
147 |
148 | % Example for a 4s module:
149 |
150 | % 4s --> Only cells in x-direction
151 |
152 | % Legend: o = cell, | = cooling plate
153 |
154 | % Design 1: o o o o mod_inside_x_layers = [] (same as enable_sys_inside_* = false)
155 | % Design 2: o o|o o mod_inside_x_layers = [2]
156 | % Design 3: o|o o|o mod_inside_x_layers = [1,3]
157 | % Design 4: o|o|o|o mod_inside_x_layers = [1,2,3]
158 |
159 | % To only cool the outside of module use 'enable_sys_between_*' above.
160 |
161 | % Some hints:
162 | % - This requires information about the module design (number of cells in
163 | % all directions). It is recommended to first do a rough design without
164 | % this option and only turn this option one once you have an idea how
165 | % your modules will look like and know you really need cooling inside the
166 | % modules
167 | % - In 'mod_inside_*_layers' only numbers from 1 to the number of cells in
168 | % the spacial direction within the module -1 is supported. Everything else
169 | % will throw an error in the BTMS configuration.
170 | % - There is a possibility to plot your system design for better
171 | % visualisation. Run the configuration 'main_sim_BTMS_1_system_setup' and
172 | % refer to 'main_sim_BTMS_2_system_simulation'.
173 |
174 |
175 | %% Module-level: Cooling inside modules perpendicular to x-direction
176 |
177 | BTMSPara.enable_mod_inside_x = false;
178 | BTMSPara.mod_inside_x_layers = [];
179 |
180 |
181 | %% Module-level: Cooling inside modules perpendicular to y-direction
182 |
183 | BTMSPara.enable_mod_inside_y = false;
184 | BTMSPara.mod_inside_y_layers = [];
185 |
186 |
187 | %% Module-level: Cooling inside modules perpendicular to z-direction
188 |
189 | BTMSPara.enable_mod_inside_z = true;
190 | BTMSPara.mod_inside_z_layers = [1, 2];
191 |
192 |
--------------------------------------------------------------------------------
/simulation_framework/input_and_parameters/03_BTMS_config/liquid_inside_21700.m:
--------------------------------------------------------------------------------
1 | %% Disclaimer
2 |
3 | % This data is for testing and debugging purposes only!
4 | % The data is mainly used to test the model so it may have been randomly changed
5 | % meaning it has nothing to do with reality.
6 |
7 | % Use at your own risk!
8 |
9 |
10 |
11 | %% Info
12 |
13 | % Specify details of physical BTMS configuration on the cell, module and
14 | % system level. There are many different possibilities and if you select
15 | % everything the configuration and simulation may take a very long time!
16 | % It is recommended to slowly iterate through the different possibilities.
17 |
18 | % There are several options for cooling your battery system.
19 |
20 | % On the system level:
21 | % Bottom cooling of the modules (bottom layer only) --> sys_bottom
22 | % Top cooling of the modules (top layer only) --> sys_top
23 | % Cooling the left/right side of the battery system (all outside modules) --> sys_leftright
24 | % Cooling the front/back side of the battery system (all outside modules) --> sys_frontback
25 | % Cooling the module sides inside of the battery system
26 | % perpendicular to the x, y and z axis --> sys_inside_x, sys_inside_y, sys_inside_z,
27 | %
28 | % On the module level:
29 | % Cooling of the outer cells of a module (gets implied via system-level definitions)
30 | % Cooling of the cells inside the module
31 | % perpendicular to the x, y and z axis --> mod_inside_x, mod_inside_y, mod_inside_z
32 |
33 | % For air as cooling medium it is always assumed that all cells/modules are
34 | % in the airflow if internal cooling is selected. In this case the parameter
35 | % sys_inside_x determine the direction of the airflow. Note that only one
36 | % sys_inside_* may be set true in this case!
37 |
38 | % For the case of liquid cooling, setting more than one *_inside_* value to
39 | % true will lead to a "crossing" of cooling channels. The model assumes
40 | % this doesn't lead to any thermal interaction or even mixing of the
41 | % fluids. Every cooling channel is simulated independently.
42 |
43 | % For the simulation you provide the overall fluid mass flow as well as the
44 | % width and the height of the cooling channels of each method. The
45 | % individual mass flow is calculated according to the number of all cooling
46 | % channels inside the config. This is necessary, because we don't now yet
47 | % how the models and the battery pack looks like and therefore cannot
48 | % determine the number of cooling channels.
49 |
50 |
51 |
52 | %% Basic information
53 |
54 | BTMSPara.name = mfilename; % Get config name from filename (for better overview)
55 |
56 | BTMSPara.T_fluid_in = 20; % Inlet temperature of cooling fluid in �C
57 | BTMSPara.Vdot_fluid = 0.0045; % Overall fluid mass flow in m^3/s % Value for air cooling: 0.0625
58 | BTMSPara.ref_pressure = 101325; % Reference pressure in Pa
59 |
60 | BTMSPara.FluidType = 'INCOMP::MEG-50%'; % Specify fluid type for CoolProp (see: http://www.coolprop.org/) (Water with 50% ethylenglycol)
61 |
62 | BTMSPara.lambda_wall = 236; % Thermal conductivity of the material of the cooling installation in W/m*K (copper)
63 | BTMSPara.wt = 0.00015; % Wall thickness of the cooling installation in m
64 |
65 | BTMSPara.ch_width = 0.003; % Width of cooling channels in m
66 | BTMSPara.ch_ratio_sys = 0.95; % Ratio of channel size relative to x,y or z dimensions of battery system
67 | BTMSPara.ch_ratio_cell = 0.90; % Ratio of channel size relative to x,y or z dimensions of battery system
68 |
69 |
70 | %% Natural convection around cells
71 |
72 | % The framework disregards heat dissipation of the battery system to the
73 | % environment due to natural convection to comply with the worst-case
74 | % assumption used to design the BTMS.
75 | % If required this can easily been added to the simulation framework by
76 | % adding the heat transfer coefficient and the environmental temperature to
77 | % the signals 'T_cell_ambient' and 'alpha_cell_ambient'. Refer to the
78 | % subsystem 'Create BTMS input' to see how those values are scaled to
79 | % incorporate more than one heat transfer path.
80 |
81 |
82 |
83 | %% System-level: Bottom cooling
84 |
85 | % Assumes all modules are standing on a cooling plate with uniform temperature.
86 | % Fluid flow along x-dim of battery system.
87 | % This only affects the bottom layer of modules in the battery system. So
88 | % all module with a num_layers_sys >= 2 won't be directly affected by this
89 | % option.
90 |
91 | BTMSPara.enable_sys_bottom = false;
92 |
93 |
94 | %% System-level: Top cooling
95 |
96 | % Assumes a cooling plate with uniform temperature on top of the battery system.
97 | % Fluid flow along x-dim of battery system.
98 | % This only affects the top layer of modules in the battery system.
99 |
100 | BTMSPara.enable_sys_top = false;
101 |
102 |
103 | %% System-level: Cooling of left/right of battery system
104 |
105 | % Assumes a cooling plate with uniform temperat%%ure on the left and right of the battery system.
106 | % Fluid flow along x-dim of battery system.
107 | % This only affects the outer left and right modules.
108 |
109 | BTMSPara.enable_sys_leftright = false;
110 |
111 |
112 | %% System-level: Cooling of front/back
113 |
114 | % Assumes a cooling plate with uniform temperature on the front and back of the battery system.
115 | % Fluid flow along x-dim of battery system.
116 | % This only affects the outer left and right modules.
117 |
118 | BTMSPara.enable_sys_frontback = false;
119 |
120 |
121 | %% System-level: Cooling between the modules in the spacial directions
122 |
123 | % Assumes a cooling plate with uniform temperature between the modules.
124 |
125 | % Fluid flow perpendicular to x-dim of battery system.
126 |
127 | BTMSPara.enable_sys_inside_x = false;
128 |
129 |
130 | % Fluid flow perpendicular to y-dim of battery system.
131 |
132 | BTMSPara.enable_sys_inside_y = false;
133 |
134 |
135 | % Fluid flow perpendicular to z-dim of battery system
136 |
137 | BTMSPara.enable_sys_inside_z = false;
138 |
139 |
140 |
141 | %% About cooling inside of the battery system
142 |
143 | % Every '*_inside_*' option will place cooling channels in the specified
144 | % spacial direction on the module level. This is specified by a vector
145 | % specifying the position of the cooling plates relative to the cell count
146 | % inside the module.
147 |
148 | % Example for a 4s module:
149 |
150 | % 4s --> Only cells in x-direction
151 |
152 | % Legend: o = cell, | = cooling plate
153 |
154 | % Design 1: o o o o mod_inside_x_layers = [] (same as enable_sys_inside_* = false)
155 | % Design 2: o o|o o mod_inside_x_layers = [2]
156 | % Design 3: o|o o|o mod_inside_x_layers = [1,3]
157 | % Design 4: o|o|o|o mod_inside_x_layers = [1,2,3]
158 |
159 | % To only cool the outside of module use 'enable_sys_between_*' above.
160 |
161 | % Some hints:
162 | % - This requires information about the module design (number of cells in
163 | % all directions). It is recommended to first do a rough design without
164 | % this option and only turn this option one once you have an idea how
165 | % your modules will look like and know you really need cooling inside the
166 | % modules
167 | % - In 'mod_inside_*_layers' only numbers from 1 to the number of cells in
168 | % the spacial direction within the module -1 is supported. Everything else
169 | % will throw an error in the BTMS configuration.
170 | % - There is a possibility to plot your system design for better
171 | % visualisation. Run the configuration 'main_sim_BTMS_1_system_setup' and
172 | % refer to 'main_sim_BTMS_2_system_simulation'.
173 |
174 |
175 | %% Module-level: Cooling inside modules perpendicular to x-direction
176 |
177 | BTMSPara.enable_mod_inside_x = false;
178 | BTMSPara.mod_inside_x_layers = [];
179 |
180 |
181 | %% Module-level: Cooling inside modules perpendicular to y-direction
182 |
183 | BTMSPara.enable_mod_inside_y = false;
184 | BTMSPara.mod_inside_y_layers = [];
185 |
186 |
187 | %% Module-level: Cooling inside modules perpendicular to z-direction
188 |
189 | BTMSPara.enable_mod_inside_z = true;
190 | BTMSPara.mod_inside_z_layers = [1, 3];
191 |
192 |
--------------------------------------------------------------------------------
/simulation_framework/input_and_parameters/03_BTMS_config/liquid_inside_Pouch.m:
--------------------------------------------------------------------------------
1 | %% Disclaimer
2 |
3 | % This data is for testing and debugging purposes only!
4 | % The data is mainly used to test the model so it may have been randomly changed
5 | % meaning it has nothing to do with reality.
6 |
7 | % Use at your own risk!
8 |
9 |
10 |
11 | %% Info
12 |
13 | % Specify details of physical BTMS configuration on the cell, module and
14 | % system level. There are many different possibilities and if you select
15 | % everything the configuration and simulation may take a very long time!
16 | % It is recommended to slowly iterate through the different possibilities.
17 |
18 | % There are several options for cooling your battery system.
19 |
20 | % On the system level:
21 | % Bottom cooling of the modules (bottom layer only) --> sys_bottom
22 | % Top cooling of the modules (top layer only) --> sys_top
23 | % Cooling the left/right side of the battery system (all outside modules) --> sys_leftright
24 | % Cooling the front/back side of the battery system (all outside modules) --> sys_frontback
25 | % Cooling the module sides inside of the battery system
26 | % perpendicular to the x, y and z axis --> sys_inside_x, sys_inside_y, sys_inside_z,
27 | %
28 | % On the module level:
29 | % Cooling of the outer cells of a module (gets implied via system-level definitions)
30 | % Cooling of the cells inside the module
31 | % perpendicular to the x, y and z axis --> mod_inside_x, mod_inside_y, mod_inside_z
32 |
33 | % For air as cooling medium it is always assumed that all cells/modules are
34 | % in the airflow if internal cooling is selected. In this case the parameter
35 | % sys_inside_x determine the direction of the airflow. Note that only one
36 | % sys_inside_* may be set true in this case!
37 |
38 | % For the case of liquid cooling, setting more than one *_inside_* value to
39 | % true will lead to a "crossing" of cooling channels. The model assumes
40 | % this doesn't lead to any thermal interaction or even mixing of the
41 | % fluids. Every cooling channel is simulated independently.
42 |
43 | % For the simulation you provide the overall fluid mass flow as well as the
44 | % width and the height of the cooling channels of each method. The
45 | % individual mass flow is calculated according to the number of all cooling
46 | % channels inside the config. This is necessary, because we don't now yet
47 | % how the models and the battery pack looks like and therefore cannot
48 | % determine the number of cooling channels.
49 |
50 |
51 |
52 | %% Basic information
53 |
54 | BTMSPara.name = mfilename; % Get config name from filename (for better overview)
55 |
56 | BTMSPara.T_fluid_in = 20; % Inlet temperature of cooling fluid in �C
57 | BTMSPara.Vdot_fluid = 0.0045; % Overall fluid mass flow in m^3/s % Value for air cooling: 0.0625
58 | BTMSPara.ref_pressure = 101325; % Reference pressure in Pa
59 |
60 | BTMSPara.FluidType = 'INCOMP::MEG-50%'; % Specify fluid type for CoolProp (see: http://www.coolprop.org/) (Water with 50% ethylenglycol)
61 |
62 | BTMSPara.lambda_wall = 236; % Thermal conductivity of the material of the cooling installation in W/m*K (copper)
63 | BTMSPara.wt = 0.00015; % Wall thickness of the cooling installation in m
64 |
65 | BTMSPara.ch_width = 0.003; % Width of cooling channels in m
66 | BTMSPara.ch_ratio_sys = 0.95; % Ratio of channel size relative to x,y or z dimensions of battery system
67 | BTMSPara.ch_ratio_cell = 0.90; % Ratio of channel size relative to x,y or z dimensions of battery system
68 |
69 |
70 | %% Natural convection around cells
71 |
72 | % The framework disregards heat dissipation of the battery system to the
73 | % environment due to natural convection to comply with the worst-case
74 | % assumption used to design the BTMS.
75 | % If required this can easily been added to the simulation framework by
76 | % adding the heat transfer coefficient and the environmental temperature to
77 | % the signals 'T_cell_ambient' and 'alpha_cell_ambient'. Refer to the
78 | % subsystem 'Create BTMS input' to see how those values are scaled to
79 | % incorporate more than one heat transfer path.
80 |
81 |
82 |
83 | %% System-level: Bottom cooling
84 |
85 | % Assumes all modules are standing on a cooling plate with uniform temperature.
86 | % Fluid flow along x-dim of battery system.
87 | % This only affects the bottom layer of modules in the battery system. So
88 | % all module with a num_layers_sys >= 2 won't be directly affected by this
89 | % option.
90 |
91 | BTMSPara.enable_sys_bottom = false;
92 |
93 |
94 | %% System-level: Top cooling
95 |
96 | % Assumes a cooling plate with uniform temperature on top of the battery system.
97 | % Fluid flow along x-dim of battery system.
98 | % This only affects the top layer of modules in the battery system.
99 |
100 | BTMSPara.enable_sys_top = false;
101 |
102 |
103 | %% System-level: Cooling of left/right of battery system
104 |
105 | % Assumes a cooling plate with uniform temperat%%ure on the left and right of the battery system.
106 | % Fluid flow along x-dim of battery system.
107 | % This only affects the outer left and right modules.
108 |
109 | BTMSPara.enable_sys_leftright = false;
110 |
111 |
112 | %% System-level: Cooling of front/back
113 |
114 | % Assumes a cooling plate with uniform temperature on the front and back of the battery system.
115 | % Fluid flow along x-dim of battery system.
116 | % This only affects the outer left and right modules.
117 |
118 | BTMSPara.enable_sys_frontback = true;
119 |
120 |
121 | %% System-level: Cooling between the modules in the spacial directions
122 |
123 | % Assumes a cooling plate with uniform temperature between the modules.
124 |
125 | % Fluid flow perpendicular to x-dim of battery system.
126 |
127 | BTMSPara.enable_sys_inside_x = false;
128 |
129 |
130 | % Fluid flow perpendicular to y-dim of battery system.
131 |
132 | BTMSPara.enable_sys_inside_y = false;
133 |
134 |
135 | % Fluid flow perpendicular to z-dim of battery system
136 |
137 | BTMSPara.enable_sys_inside_z = false;
138 |
139 |
140 |
141 | %% About cooling inside of the battery system
142 |
143 | % Every '*_inside_*' option will place cooling channels in the specified
144 | % spacial direction on the module level. This is specified by a vector
145 | % specifying the position of the cooling plates relative to the cell count
146 | % inside the module.
147 |
148 | % Example for a 4s module:
149 |
150 | % 4s --> Only cells in x-direction
151 |
152 | % Legend: o = cell, | = cooling plate
153 |
154 | % Design 1: o o o o mod_inside_x_layers = [] (same as enable_sys_inside_* = false)
155 | % Design 2: o o|o o mod_inside_x_layers = [2]
156 | % Design 3: o|o o|o mod_inside_x_layers = [1,3]
157 | % Design 4: o|o|o|o mod_inside_x_layers = [1,2,3]
158 |
159 | % To only cool the outside of module use 'enable_sys_between_*' above.
160 |
161 | % Some hints:
162 | % - This requires information about the module design (number of cells in
163 | % all directions). It is recommended to first do a rough design without
164 | % this option and only turn this option one once you have an idea how
165 | % your modules will look like and know you really need cooling inside the
166 | % modules
167 | % - In 'mod_inside_*_layers' only numbers from 1 to the number of cells in
168 | % the spacial direction within the module -1 is supported. Everything else
169 | % will throw an error in the BTMS configuration.
170 | % - There is a possibility to plot your system design for better
171 | % visualisation. Run the configuration 'main_sim_BTMS_1_system_setup' and
172 | % refer to 'main_sim_BTMS_2_system_simulation'.
173 |
174 |
175 | %% Module-level: Cooling inside modules perpendicular to x-direction
176 |
177 | BTMSPara.enable_mod_inside_x = true;
178 | BTMSPara.mod_inside_x_layers = [4, 7, 10];
179 |
180 |
181 | %% Module-level: Cooling inside modules perpendicular to y-direction
182 |
183 | BTMSPara.enable_mod_inside_y = false;
184 | BTMSPara.mod_inside_y_layers = [];
185 |
186 |
187 | %% Module-level: Cooling inside modules perpendicular to z-direction
188 |
189 | BTMSPara.enable_mod_inside_z = false;
190 | BTMSPara.mod_inside_z_layers = [];
191 |
192 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # sim_BTMS
4 |
5 | A framework for the design and simulation of lithium-ion battery systems including the consideration of battery thermal management systems (BTMS).
6 |
7 | **Developed at:** [Institute of Automotive Technology](https://www.ftm.mw.tum.de/en/home/), [Technical University of Munich](https://www.tum.de/nc/en/).
8 | **Contact:** [Christoph Reiter](mailto:christoph.reiter@tum.de)
9 |
10 |
11 | * * *
12 |
13 |
14 | ## What does this framework do?
15 |
16 | This framework aims to facilitate the complex process of developing a feasible concept for a battery system for an electric vehicle.
17 |
18 | The algorithms takes the target specifications and constraints of the full battery system as input and then tries to find a feasible solution from different available lithium-ion battery (LIB) cells and different approaches for the battery thermal management (BTMS). The idea is to build the system from the bottom up with the following steps:
19 |
20 | 1. ***User Input:* Specify LIB model and corresponding BTMS method.** Any number of different LIB parameter set and BTMS methods and combinations thereof is possible.
21 | 2. ***User Input:* Specify the required module and pack parameters.** These include values like capacity, max. current and constraints like dimensions or max weight.
22 | 3. **Calculate the number of serial and parallel cells and their three dimensional geometric arrangement in a module.**
23 | 4. **Test the feasibilty of the modules.** The modules are tested for compliance to the requirements and constraints by the user. Excluded modules are saved together with information which criteria they did not meet.
24 | 5. **Build a battery system from the modules.** The number of serial and parallel and their three dimensional geometric arrangement in the battery pack is calculated.
25 | 6. **Test the feasibility of the battery system architecture.** The battery packs built from the modules are tested for compliance to the requirements and constraints by the user. Excluded battery packs are saved together with information which criteria they did not meet.
26 | 7. **Design the BTMS on the module level.** According to the user input different BTMS architectures are created and again the compliance to the requirements is tested.
27 | 8. **Coupled electrical and thermal simulation of the BTMS on the module level.** All feasible BTMS solutions are simulated for a fast-charging load cycle (if needed also other load cycles can be used) to check the electrical and thermal load for every individual LIB in the module.
28 | 9. If needed: **Coupled electrical and thermal simulation of the BTMS on the pack level.** Simulate the complete battery system.
29 |
30 | Further information about the modelling approach and the validation of the model can be found in the following publication:
31 |
32 | *Reiter Et al.: Finding the ideal automotive battery concept: A model-based approach on cell selection, modularization and thermal management. In: Forsch Ingenieurwes (2019) [https://doi.org/10.1007/s10010-019-00316-x](https://doi.org/10.1007/s10010-019-00316-x)*
33 |
34 | Also available at [Springer Link](https://link.springer.com/article/10.1007/s10010-019-00316-x) and [ResearchGate](https://www.researchgate.net/publication/333181648_Finding_the_ideal_automotive_battery_concept_A_model-based_approach_on_cell_selection_modularization_and_thermal_management).
35 |
36 |
37 | * * *
38 |
39 |
40 | ## Features
41 |
42 | Here is a list of everything already included and features planned for the future.
43 |
44 | - [x] Specify different cell models (cylindrical, prismatic, pouch) and their physical, thermal and electric parameters (static and dynamic) and implications for the system level
45 | - [x] Specifying different basic BTMS configurations and their thermal properties (liquid, air cooling)
46 | - [x] Comprehensive way of defining different LIB/BTMS combinations from which the algorithm will try to build a battery system
47 | - [x] Determination of serial and parallel cell interconnection and three-dimensional arrangement of the cells within a battery module
48 | - [x] Basic testing on the module level (dimensions, weight, energy, capacity, ...)
49 | - [x] Determination of serial and parallel module interconnection and three-dimensional arrangement of the modules within a battery pack
50 | - [x] Basic testing on the pack level (dimensions, weight, energy, capacity, ...)
51 | - [x] Implementing an approach to keep track of the configurations and if and why they got excluded from the solution space.
52 | - [x] Create BTMS architecture on the module level
53 | - [x] Basic testing on the module and pack level with included BTMS
54 | - [x] Electrical and thermal simulation of the modules including the BTMS
55 | - [x] Electrical and thermal simulation of the pack including the BTMS
56 |
57 |
58 | * * *
59 |
60 |
61 | ## Use and expansion of the framework
62 |
63 | We are very happy is you choose this framework for your projects and research! We are looking forward to hear your feedback and kindly ask you to share bugfixes, improvements and updates in this repository.
64 |
65 | **Please cite the [paper above](https://doi.org/10.1007/s10010-019-00316-x) if you use the framework for your publications!**
66 |
67 | The model is released under the GNU LESSER GENERAL PUBLIC LICENSE Version 3 (29 June 2007). Please refer to the license file for any further questions about incorporating this framework into your projects.
68 |
69 |
70 | * * *
71 |
72 |
73 | ## Requirements
74 |
75 |
76 | ### Matlab
77 |
78 | The model was created with **MATLAB 2018b**. If you want to commit an updated version using another toolbox please give us a short heads-up.
79 |
80 | Required Toolboxes:
81 | - Simulink 9.2
82 | - DSP Systems Toolbox 9.7
83 | - Simulink Coder 9.0
84 |
85 | The insitute usually follows the 'b' releases of Mathworks, so the framework may get updated to 2019b in the future.
86 |
87 |
88 | ### Other open-source software
89 |
90 | The electrical and thermal simulation on the cell level build upon the Simulink framework **[sim_battery_system](https://github.com/TUMFTM/sim_battery_system)** by some of the same authors and also created at [Institute of Automotive Technology](https://www.ftm.mw.tum.de/en/home/).
91 |
92 |
93 | * * *
94 |
95 |
96 | ## How To Use
97 |
98 |
99 | ### Disclamer
100 |
101 | All cell, system, and BTMS data *currently included* in this release is for debugging and testing purposes only and has nothing to do with the real world. Use at your own risk! **To get valid results out of this framework you have to provide your own data!**
102 |
103 |
104 | ### Basic steps
105 |
106 | - Open *Sim_BTMS.prj* to add all relevant folders and subfolders to the path and to enable dependency analysis if you change or delete something.
107 |
108 | - All the individual steps get called from the script *main_sim_BTMS_1_system_setup.m* and also are documented there.
109 |
110 | - During the simulation some info is written to the command window. This looks like this (except):
111 | ```
112 | There are 26 configuratons in configs_1_mod_all.
113 | There are 7 configuratons in configs_2_mod_passed.
114 | There are 28 configuratons in configs_3_sys_all.
115 | There are 3 configuratons in configs_4_sys_passed.
116 | ```
117 | Use this to see how many different configurations are found during each step. A short description of what the subscrits mean:
118 | - **_all* is everything created in a step without any tests applied. E.g. the line `There are 28 configuratons in configs_3_sys_all.` Shows there were 28 different possible battery pack configurations created from the different feasible module configurations of the last step.
119 | - **_passed* are all configurations from **_all* that passed all tests. E.g. the line `There are 3 configuratons in configs_4_sys_passed.` means that only 3 of the 28 configs in `configs_3_sys_all` met all criteria in our example.
120 |
121 | - If your criteria are too strict it also may be the case that no valid concepts are found. Then the output looks something like this:
122 | ```
123 | There are 14 concepts in configs_1_mod_all.
124 | There are 2 concepts in configs_2_mod_passed.
125 | There are 8 concepts in configs_3_sys_all.
126 | Warning: No feasible concepts in configs_4_sys_passed!
127 | ```
128 |
129 | - After every step the configurations found are saved to *BTMS_simulation_results\*. The folder may look like this:
130 |
131 | | Variable name | Explanation |
132 | | -- | -- |
133 | | `configs_1_mod_all.mat` | <-- Created from user input |
134 | | `configs_2_mod_failed.mat` | <-- Excluded configs because one or more critera were not met |
135 | | **`configs_2_mod_passed.mat`** | **<-- Will get used for the next step** |
136 | | `configs_3_mod_all.mat` | <-- Created using the configs in `configs_2_mod_passed.mat` |
137 | | `configs_4_mod_failed.mat` | <-- Excluded configs because one or more critera were not met |
138 | | **`configs_4_mod_passed.mat`** | **<-- Will get used for the next step** |
139 |
140 |
141 | - Every `*_passed.mat` includes everything needed for the next step, so you don't have to run the full algorithm everytime. Use "Run section" in Matlab to pick up where you left off.
142 |
143 | - One the complete system and BTMS setup is complete and valid configs have been found (this is the case it a `configs_6_BTMS_passed.mat`) exits you can move over to *main_sim_BTMS_1_system_simulation.m* to test your systems with an electrical and/or thermal simulation.
144 |
145 | - In those simulation a CCCV charge cycle is applied to see if the system can withstand those stresses. Especially the coupled electricl and thermal simulation of the whole system takes a lot of time so take it easy and don't test too many systems at once. Refer to *main_sim_BTMS_1_system_simulation.m* and *functions_BTMS_sim/sim_module.m* or *functions_BTMS_sim/sim_system.m* for further information.
146 |
147 |
148 | ### How to adapt the framework to your LIBs and battery system
149 |
150 | - Provide your cell dataset(s) in *input_and_parameters\01_cell_data*. Refer to the documentation in the dummy data already provided in this folder or see the documentation at [sim_battery_system](https://github.com/TUMFTM/sim_battery_system). Of course you can specify more than one LIB. Every dataset needs its own script/MAT-File since they will be called individually during the configuration process. This is also valid for the other steps in this list.
151 | - Provide basic system information in *input_and_parameters\02_system_data*.
152 | - Provide information about the BTMS strategy/-ies you want to use in *input_and_parameters\03_BTMS_configs*.
153 | - Provide the required system specifications in *input_and_parameters\04_system_specifications\*.
154 |
155 |
156 | * * *
157 |
158 |
159 | ## Authors and Maintainers
160 |
161 | - [Christoph Reiter](mailto:christoph.reiter@tum.de)
162 | - Idea, structure, underlying concepts and algorithms except where noted otherwise.
163 | - Supervision of the underlying student's theses.
164 | - Final implementation, revision and benchmarking.
165 |
166 |
167 | * * *
168 |
169 |
170 | ## Contributions
171 |
172 | - [Lars-Eric Schlereth](Lars.Schlereth@hotmail.de)
173 | - Initial implementation in MATLAB/Simulink
174 | - Research of theoretical background of thermal BTMS simulation
175 | - Test and discussion of the algorithm as part of his master's thesis.
176 |
--------------------------------------------------------------------------------
/simulation_framework/functions_BTMS_sim/main_create_BTMS_config.m:
--------------------------------------------------------------------------------
1 | function [BTMSConfig] = main_create_BTMS_config(BTMSPara, SysPara, SysInfo, ModInfo)
2 | %CREATE_BTMS_ARCHITECTURE Create the BTMS configs
3 |
4 |
5 | %% Get system and module architecture
6 |
7 | pe_mod = ModInfo.num_parallel_cells_per_layer_mod;
8 | e_mod = ModInfo.num_layers_mod;
9 | s_mod = ModInfo.num_serial_cells_mod;
10 |
11 | pe_mod_sys = SysInfo.num_parallel_mods_per_layer_sys;
12 | e_mod_sys = SysInfo.num_layers_sys;
13 | s_mod_sys = SysInfo.num_serial_mods_sys;
14 |
15 | pe_sys = pe_mod * pe_mod_sys;
16 | e_sys = e_mod * e_mod_sys;
17 | s_sys = s_mod * s_mod_sys; % TODO: Assignment auf SysPara
18 |
19 | dim_x_sys = SysInfo.dim_x_sys;
20 | dim_y_sys = SysInfo.dim_y_sys;
21 | dim_z_sys = SysInfo.dim_z_sys;
22 |
23 | A_transf_x = SysPara.thermal.transfer.A_x;
24 | A_transf_y = SysPara.thermal.transfer.A_y;
25 | A_transf_z = SysPara.thermal.transfer.A_z;
26 |
27 |
28 | %% Get desired BTMS config
29 |
30 | sys_b = BTMSPara.enable_sys_bottom;
31 | sys_t = BTMSPara.enable_sys_top;
32 | sys_lr = BTMSPara.enable_sys_leftright;
33 | sys_fb = BTMSPara.enable_sys_frontback;
34 |
35 | sys_x = BTMSPara.enable_sys_inside_x;
36 | sys_y = BTMSPara.enable_sys_inside_y;
37 | sys_z = BTMSPara.enable_sys_inside_z;
38 |
39 | mod_x = BTMSPara.enable_mod_inside_x;
40 | mod_y = BTMSPara.enable_mod_inside_y;
41 | mod_z = BTMSPara.enable_mod_inside_z;
42 |
43 | x_layers = BTMSPara.mod_inside_x_layers;
44 | y_layers = BTMSPara.mod_inside_y_layers;
45 | z_layers = BTMSPara.mod_inside_z_layers;
46 |
47 |
48 | %% Physical fluid and channel definitions
49 |
50 | Vdot_BTMS = BTMSPara.Vdot_fluid;
51 | T_fluid = BTMSPara.T_fluid_in;
52 |
53 | ch_width = BTMSPara.ch_width;
54 | ch_ratio_sys_length = BTMSPara.ch_ratio_sys;
55 | ch_ratio_cell = BTMSPara.ch_ratio_cell;
56 |
57 | wall_thickness = BTMSPara.wt;
58 | lambda_wall = BTMSPara.lambda_wall;
59 |
60 | ref_pressure = BTMSPara.ref_pressure;
61 | fluid_type = BTMSPara.FluidType;
62 |
63 |
64 | %% Get number, starting layer and orientation of cooling channels
65 |
66 | % Sort enabled systems after type
67 | enable_vec_sys_out = [sys_b, sys_t, sys_lr, sys_fb];
68 | enable_vec_sys_in = [sys_x, sys_y, sys_z];
69 | enable_vec_mod_in = [mod_x, mod_y, mod_z];
70 |
71 | enable_vec = [enable_vec_sys_out, enable_vec_sys_in, enable_vec_mod_in];
72 |
73 | % Number of channels outside of system
74 | num_sys_outside = sum(enable_vec_sys_out(1:2)) + 2*enable_vec_sys_out(3) + 2*enable_vec_sys_out(4);
75 |
76 | % Number of channels inside of system
77 | num_sys_inside_x = sum(enable_vec_sys_in(1) * (s_mod_sys - 1));
78 | num_sys_inside_y = sum(enable_vec_sys_in(2) * (pe_mod_sys - 1));
79 | num_sys_inside_z = sum(enable_vec_sys_in(3) * (e_mod_sys - 1));
80 |
81 | num_sys_inside = sum([num_sys_inside_x, num_sys_inside_y, num_sys_inside_z]);
82 |
83 | % Number of channels inside of modules
84 | num_mod_inside_x = sum(enable_vec_mod_in(1) * (length(x_layers) * s_mod_sys));
85 | num_mod_inside_y = sum(enable_vec_mod_in(2) * (length(y_layers) * pe_mod_sys));
86 | num_mod_inside_z = sum(enable_vec_mod_in(3) * (length(z_layers) * e_mod_sys));
87 |
88 | num_mod_inside = sum([num_mod_inside_x, num_mod_inside_y, num_mod_inside_z]);
89 |
90 | % Total number of channels
91 | num_channels = sum([num_sys_outside, num_sys_inside, num_mod_inside]);
92 |
93 | % Preallocate vectors
94 | ch_orient_sys_out = NaN(1,num_sys_outside);
95 | ch_orient_sys_in = NaN(1,num_sys_inside);
96 | ch_orient_mod_in = NaN(1,num_mod_inside);
97 |
98 | % We work on the cell level, so every layer is the cell level of the whole
99 | % system!
100 |
101 | ch_start_layer_sys_out = NaN(1,num_sys_outside);
102 | ch_start_layer_sys_in = NaN(1,num_sys_inside);
103 | ch_start_layer_mod_in = NaN(1,num_mod_inside);
104 |
105 | % Variables to count the feasible configurations
106 | c_out = 1;
107 | c_in = 1;
108 | c_m_in = 1;
109 |
110 | % Iterate through the possible BTMS types
111 | for ii = 1:length(enable_vec)
112 |
113 | if enable_vec(ii) == true % See if variant is enabled, otherwise do nothing
114 |
115 | switch ii % Choose different actions for the different variants
116 |
117 | % System out
118 | case 1 % sys_b
119 |
120 | idx = c_out;
121 |
122 | ch_start_layer_sys_out(idx) = 0;
123 | ch_orient_sys_out(idx) = 'z';
124 |
125 | c_out = c_out + 1;
126 |
127 |
128 | case 2 % sys_t
129 |
130 | idx = c_out;
131 |
132 | ch_start_layer_sys_out(idx) = e_sys;
133 | ch_orient_sys_out(idx) = 'z';
134 |
135 | c_out = c_out + 1;
136 |
137 |
138 | case 3 % sys_lr
139 |
140 | idx = c_out : c_out+1;
141 |
142 | ch_start_layer_sys_out(idx) = [0, pe_sys];
143 | ch_orient_sys_out(idx) = 'y';
144 |
145 | c_out = c_out + 2;
146 |
147 |
148 | case 4 % sys_fb
149 |
150 | idx = c_out : c_out+1;
151 |
152 | ch_start_layer_sys_out(idx) = [0, s_sys];
153 | ch_orient_sys_out(idx) = 'x';
154 |
155 | c_out = c_out + 2;
156 |
157 |
158 |
159 | % System in
160 | case 5 % sys_x
161 |
162 | idx = c_in : c_in+num_sys_inside_x-1;
163 |
164 | ch_start_layer_sys_in(idx) = s_mod * (1:(s_mod_sys-1));
165 | ch_orient_sys_in(idx) = 'x';
166 |
167 | c_in = c_in + num_sys_inside_x;
168 |
169 |
170 | case 6 % sys_y
171 |
172 | idx = c_in : c_in+num_sys_inside_y-1;
173 |
174 | ch_start_layer_sys_in(idx) = pe_mod * (1:(pe_mod_sys-1));
175 | ch_orient_sys_in(idx) = 'y';
176 |
177 | c_in = c_in + num_sys_inside_y;
178 |
179 |
180 | case 7 % sys_z
181 |
182 | idx = c_in : c_in+num_sys_inside_z-1;
183 |
184 | ch_start_layer_sys_in(idx) = e_mod * (1:(e_mod_sys-1));
185 | ch_orient_sys_in(idx) = 'z';
186 |
187 | c_in = c_in + num_sys_inside_z;
188 |
189 |
190 |
191 | % Module in
192 | case 8 % mod_x
193 |
194 | idx = c_m_in : c_m_in+num_mod_inside_x-1;
195 |
196 | ch_start_layer_mod_in(idx) = starting_layers_mod_in(x_layers, s_mod, s_mod_sys);
197 | ch_orient_mod_in(idx) = 'x';
198 |
199 | c_m_in = c_m_in + num_mod_inside_x;
200 |
201 |
202 | case 9 % mod_y
203 |
204 | idx = c_m_in : c_m_in+num_mod_inside_y-1;
205 |
206 | ch_start_layer_mod_in(idx) = starting_layers_mod_in(y_layers, pe_mod, pe_mod_sys);
207 | ch_orient_mod_in(idx) = 'y';
208 |
209 | c_m_in = c_m_in + num_mod_inside_y;
210 |
211 |
212 | case 10 % mod_z
213 |
214 | idx = c_m_in : c_m_in+num_mod_inside_z-1;
215 |
216 | ch_start_layer_mod_in(idx) = starting_layers_mod_in(z_layers, e_mod, e_mod_sys);
217 | ch_orient_mod_in(idx) = 'z';
218 |
219 | c_m_in = c_m_in + num_mod_inside_z;
220 |
221 |
222 |
223 | otherwise
224 |
225 | error('Option not defined. Did you add another BTMS type?')
226 |
227 | end
228 | end
229 | end
230 |
231 |
232 | %% Define channel types
233 |
234 | % Needed for calculation of heat transfer coefficient. 'true' for a channel
235 | % inside of the battery system (heated from both sides), 'false' for a
236 | % channel outside of the battery system
237 |
238 | ch_type_sys_out = false(1,num_sys_outside);
239 | ch_type_sys_in = true(1, num_sys_inside);
240 | ch_type_mod_in = true(1, num_mod_inside);
241 |
242 |
243 | %% Sort layer and type vectors according to dimension
244 |
245 | start_layers_unsorted = [ch_start_layer_sys_out, ch_start_layer_sys_in, ch_start_layer_mod_in];
246 | channel_inside_unsorted = [ch_type_sys_out, ch_type_sys_in, ch_type_mod_in];
247 | ch_orient_unsorted = [ch_orient_sys_out, ch_orient_sys_in, ch_orient_mod_in];
248 |
249 | start_layers_x_dir = start_layers_unsorted( ch_orient_unsorted == 'x' );
250 | start_layers_y_dir = start_layers_unsorted( ch_orient_unsorted == 'y' );
251 | start_layers_z_dir = start_layers_unsorted( ch_orient_unsorted == 'z' );
252 |
253 | ch_inside_x_dir = channel_inside_unsorted( ch_orient_unsorted == 'x' );
254 | ch_inside_y_dir = channel_inside_unsorted( ch_orient_unsorted == 'y' );
255 | ch_inside_z_dir = channel_inside_unsorted( ch_orient_unsorted == 'z' );
256 |
257 | ch_start_layers = [start_layers_x_dir, start_layers_y_dir, start_layers_z_dir];
258 | ch_inside = [ch_inside_x_dir, ch_inside_y_dir, ch_inside_z_dir];
259 | ch_orient = ['x' * ones(1,length(start_layers_x_dir)), 'y' * ones(1,length(start_layers_y_dir)), 'z' * ones(1,length(start_layers_z_dir))];
260 |
261 |
262 | %% Get cell IDs of cells adjacent to each channel
263 |
264 | % Defintion of channels as cell array (good readability)
265 | ch_def = cell(1, num_channels);
266 |
267 | % Iterate trough the channels
268 | for ii = 1:num_channels
269 |
270 | ch_def{ii} = get_IDs_cells_channels(ch_start_layers(ii), ch_orient(ii), e_sys, pe_sys, s_sys);
271 |
272 | end
273 |
274 | % Definition of channels in matrix form (input for simulation model)
275 | ch_def_mat = create_channel_def_matrix(ch_def);
276 |
277 |
278 | %% Calculate some physical infos about the BTMS
279 |
280 | % Length of channels in m
281 | ch_length = get_BTMS_channel_length(ch_orient, ch_ratio_sys_length, dim_x_sys, dim_y_sys, dim_z_sys);
282 |
283 | % Number of cells adjacent to a cooling channel
284 | [~, ch_num_adj_cells] = cellfun(@size, ch_def);
285 |
286 | % Total heat tranferring area of cells adjacent to cooling channel in m^2
287 | ch_A_heat = calc_total_A_heat_transfer(ch_num_adj_cells, ch_orient, [A_transf_x, A_transf_y, A_transf_z] * ch_ratio_cell);
288 |
289 | % Cross-section of the cooling channels in m^2
290 | ch_crosss = get_BTMS_channel_cross_section(ch_orient, ch_ratio_sys_length, dim_x_sys, dim_y_sys, dim_z_sys, ch_width);
291 |
292 | % Ratio of channel cross-sections
293 | ch_crosss_ratio = ch_crosss/sum(ch_crosss);
294 |
295 |
296 | %% Calculate fluid properties
297 |
298 | % Done once because we are assuming constant inlet temperatures. Move this
299 | % function to 'Create BTMS input' in the simulation model to dynamically
300 | % compute the heat transfer coefficient during runtime.
301 |
302 | fluid_para = get_fluid_params_coolprop(T_fluid, ref_pressure, fluid_type);
303 |
304 |
305 | %% Volume, mass flow and flow speed for the channels
306 |
307 | % Volume flow through each channel in m^3/s
308 | ch_Vdot = Vdot_BTMS .* ch_crosss_ratio;
309 |
310 | % Mass flow through each channel in kg/s
311 | ch_mdot = ch_Vdot .* fluid_para.rho;
312 |
313 | % Flow speed of fluid in each channel in m/s
314 | ch_w = ch_Vdot ./ ch_crosss;
315 |
316 |
317 | %% Calculate heat transfer coefficient for each channel
318 |
319 | % Done once because we are assuming constant volume flow. Move this
320 | % function to 'Create BTMS input' in the simulation model to dynamically
321 | % compute the heat transfer coefficient during runtime.
322 |
323 | ch_alpha = calc_alpha_channel(fluid_para, ch_w, ch_width, ch_length, ch_inside);
324 |
325 |
326 |
327 | %% Output BTMSConfig structure for simulation
328 |
329 | % Check if there is any BTMS included in the config
330 |
331 | if isempty(ch_def_mat) == false
332 | BTMSConfig.BTMS_included = true;
333 | else
334 | BTMSConfig.BTMS_included = false;
335 | end
336 |
337 | % Everything needed for the simulation
338 |
339 | BTMSConfig.T_fluid = T_fluid;
340 | BTMSConfig.Vdot_BTMS = Vdot_BTMS;
341 |
342 | BTMSConfig.channel_def_mat = ch_def_mat;
343 | BTMSConfig.channel_num_adj_cells = ch_num_adj_cells;
344 | BTMSConfig.num_channels = num_channels;
345 | BTMSConfig.channel_length = ch_length;
346 | BTMSConfig.channel_mdot = ch_mdot;
347 | BTMSConfig.fluid_para = fluid_para;
348 | BTMSConfig.lambda_wall = lambda_wall;
349 | BTMSConfig.channel_alpha = ch_alpha;
350 | BTMSConfig.channel_orientation = ch_orient;
351 |
352 |
353 | % Further information about the BTMS architecture
354 |
355 | BTMSConfig.info.num_channels_outside = num_sys_outside;
356 |
357 | BTMSConfig.info.num_channels_inside_sys_x_dir = num_sys_inside_x;
358 | BTMSConfig.info.num_channels_inside_sys_y_dir = num_sys_inside_y;
359 | BTMSConfig.info.num_channels_inside_sys_z_dir = num_sys_inside_z;
360 |
361 | BTMSConfig.info.num_channels_inside_sys = num_sys_inside;
362 |
363 | BTMSConfig.info.num_channels_inside_mod_x_dir = num_mod_inside_x;
364 | BTMSConfig.info.num_channels_inside_mod_y_dir = num_mod_inside_y;
365 | BTMSConfig.info.num_channels_inside_mod_z_dir = num_mod_inside_z;
366 |
367 | BTMSConfig.info.num_channels_inside_mod = num_mod_inside;
368 |
369 | BTMSConfig.info.channel_start_layers = ch_start_layers;
370 |
371 | BTMSConfig.info.channel_definition_cell = ch_def;
372 |
373 | BTMSConfig.info.channel_cross_sections = ch_crosss;
374 | BTMSConfig.info.channel_chross_section_ratio = ch_crosss_ratio;
375 |
376 | BTMSConfig.info.channel_heat_tranfer_surface_cells = ch_A_heat;
377 |
378 | BTMSConfig.info.channel_flow_speed = ch_w;
379 | BTMSConfig.info.channel_volume_flow = ch_Vdot;
380 |
381 | BTMSConfig.info.channel_wall_thickness = wall_thickness;
382 |
383 |
384 | end
385 |
--------------------------------------------------------------------------------
/simulation_framework/main_sim_BTMS_1_system_setup.m:
--------------------------------------------------------------------------------
1 | %% Info
2 |
3 | % Part 1 of the BTMS configuration: Creation of the battery systems and
4 | % BTMS concepts
5 |
6 | % For analysis and simulation of the systems refer to 'main_sim_BTMS_2_system_simulation'.
7 |
8 |
9 | %% Initialation
10 |
11 | clearvars
12 | close all
13 | clc
14 |
15 |
16 | %% User Input: Cells and BTMS-method combinations in cosideration
17 |
18 | % Specify LIB parameters and corresponding BTMS method in the following format:
19 |
20 | % configurations = {
21 | % 'Cell_1', 'SysInfo_1', 'BTMS_1';
22 | % 'Cell_2', 'SysInfo_2', 'BTMS_2';
23 | % 'Cell_3', 'SysInfo_3', 'BTMS_3';
24 | % 'Cell_4', 'SysInfo_4', 'BTMS_4';
25 | % 'Cell_5', 'SysInfo_5', 'BTMS_5';
26 | % };
27 |
28 | % Every row corresponds to a variant that gets considered for the battery
29 | % system configuration. The input data should be saved in
30 | % 'input_and_parameters/01_cell_data', '/02_BTMS_configs' and '/03_system_data', respectively.
31 |
32 |
33 | % % Cylindric and Pouch
34 | %
35 | % input_configs = {
36 | % 'Cyl_18650', 'system_para_BTMS_sim', 'liquid_bottom'; ...
37 | % 'Cyl_21700', 'system_para_BTMS_sim', 'liquid_bottom'; ...
38 | % 'Pouch_74Ah', 'system_para_BTMS_sim', 'liquid_bottom'; ...
39 | % 'Cyl_18650', 'system_para_BTMS_sim', 'liquid_bottom_xdir'; ...
40 | % 'Cyl_21700', 'system_para_BTMS_sim', 'liquid_bottom_xdir'; ...
41 | % 'Pouch_74Ah', 'system_para_BTMS_sim', 'liquid_bottom_xdir'; ...
42 | % 'Cyl_18650', 'system_para_BTMS_sim', 'liquid_full_system'; ...
43 | % 'Cyl_21700', 'system_para_BTMS_sim', 'liquid_full_system'; ...
44 | % 'Pouch_74Ah', 'system_para_BTMS_sim', 'liquid_full_system'; ...
45 | % };
46 | %
47 | % % Provide the requested system specification
48 | % run input_and_parameters\04_system_specifications\system_specifcations_cyl_Pouch.m;
49 |
50 |
51 | % % Prismatic (PHEV2)
52 | %
53 | % % Two parallel serial module interconnections
54 | %
55 | % input_configs = {
56 | % 'Pris_PHEV2', 'system_para_BTMS_sim', 'liquid_bottom'; ...
57 | % 'Pris_PHEV2', 'system_para_BTMS_sim', 'liquid_bottom_xdir'; ...
58 | % 'Pris_PHEV2', 'system_para_BTMS_sim', 'liquid_full_system'; ...
59 | % };
60 | %
61 | % % Provide the requested system specification
62 | % run input_and_parameters\04_system_specifications\system_specifcations_Pris_PHEV2.m;
63 |
64 |
65 | % % Prismatic (BEV2)
66 | %
67 | % % Three parallel serial module interconnections
68 | %
69 | % input_configs = {
70 | % 'Pris_BEV2', 'system_para_BTMS_sim', 'liquid_bottom'; ...
71 | % 'Pris_BEV2', 'system_para_BTMS_sim', 'liquid_bottom_xdir'; ...
72 | % 'Pris_BEV2', 'system_para_BTMS_sim', 'liquid_full_system'; ...
73 | % };
74 | %
75 | % % Provide the requested system specification
76 | % run input_and_parameters\04_system_specifications\system_specifcations_Pris_BEV2.m;
77 |
78 |
79 | % % Cylindric (inside cooling)
80 | %
81 | % % Module simulation with cooing inside the module
82 | %
83 | % input_configs = {
84 | % 'Cyl_18650', 'system_para_BTMS_sim', 'liquid_inside_18650'; ...
85 | % 'Cyl_21700', 'system_para_BTMS_sim', 'liquid_inside_21700'; ...
86 | % };
87 | %
88 | % % Provide the requested system specification
89 | % run input_and_parameters\04_system_specifications\system_specifcations_cyl_inside.m;
90 |
91 |
92 | % Pouch (inside cooling)
93 |
94 | % Module simulation with cooing inside the module
95 |
96 | input_configs = {
97 | 'Pouch_74Ah', 'system_para_BTMS_sim', 'liquid_inside_Pouch'; ...
98 | };
99 |
100 | % Provide the requested system specification
101 | run input_and_parameters\04_system_specifications\system_specifcations_Pouch_inside.m;
102 |
103 |
104 |
105 | %% Step 1: Creating the modules
106 |
107 | % This section iterates through each configuration and creates the basic
108 | % information about the modules. In the next step the modules are tested
109 | % against the relevant criteria.
110 |
111 | % Every possible configuration is stored in an array with all auxilary data
112 | % needed for simulation. This is course creates somewhat of an overhead,
113 | % but makes it easier to just pick up a configuration and start simulating.
114 |
115 | clear append_configs_step_1 % Clear persistent variable in function
116 | configs_1_mod_all = preallocate_configs_1_mod_all; % Preallocating the cell-array with all possible configurations
117 |
118 |
119 | % Iterate through the configurations
120 |
121 | for ii = 1:size(input_configs, 1)
122 |
123 | % Load cell data.
124 |
125 | % This works, because we only provide the name of the dataset in
126 | % input_configs, so the parameters are loaded with a script.
127 |
128 | run(input_configs{ii,1});
129 |
130 | % Determine max size serial connection on module level
131 |
132 | % Take minimum of either specified maximum number of serially connected
133 | % cells or the maximum inplied by nominal module and nom. cell voltage
134 |
135 | s_mod_raw = min(SysSpec.s_mod_max, ceil(SysSpec.U_mod_nom / BatPara.electrical.U_nom));
136 |
137 | % We only want to consider an even number of cells as an option -->
138 | % Round to the next even integer.
139 |
140 | s_mod = 2*ceil(s_mod_raw/2);
141 |
142 |
143 | % Determine min size of parallel connection
144 |
145 | % This is either defined by the max. individual cell current and the
146 | % requested fast-charging capability (including 10% safety) or the module capacity.
147 |
148 | p_min_mod = max(ceil(SysSpec.I_mod_max * (1+SysSpec.sf_parallel) / BatPara.electrical.I_max), ceil(SysSpec.C_mod_min / BatPara.electrical.C_A));
149 |
150 |
151 | % Spatial arrangement of the parallel connection
152 |
153 | % We not only can arrange the cells in a simple one dimensional 's*p'
154 | % grid, but can arrange the cells in all three dimensions. Therefore in
155 | % this step we create an 'e*pe' connection from the p cells in
156 | % parallel so that p = e*pe. Those are arranged next to each other so
157 | % the total number of cells in the module is n = e*pe*s.
158 |
159 | epe_mod = epe_distribution(p_min_mod, SysSpec.num_higher_p_mod, SysSpec.mod_min_e, SysSpec.mod_max_e);
160 |
161 | % Load BTMS data
162 |
163 | % This works, because we only provide the name of the dataset in
164 | % input_configs, so the parameters are loaded with a script.
165 |
166 | run(input_configs{ii,3});
167 |
168 |
169 | % More parallel connections may be considered for a given configuration
170 | % --> Interrate through all p's
171 |
172 | for jj = 1:1:size(epe_mod,2)
173 |
174 | % To comply to https://github.com/TUMFTM/sim_battery_system as much
175 | % as possible we resuse the specifications of the serial and
176 | % parallel connection in 'system_data'
177 |
178 | % Load system data
179 |
180 | % Create 'p' and 's' fields to comply to naming convention from
181 | % 'sim_battery_system'.
182 |
183 | p = epe_mod(jj).p;
184 | s = s_mod;
185 |
186 | run(input_configs{ii,2});
187 |
188 | % Delete 'p' and 's', we name them 'p_mod' and 's_mod' from now on,
189 | % to help with distinction from the system level.
190 |
191 | SysPara = rmfield(SysPara, {'p','s'});
192 |
193 | SysPara.p_mod = p;
194 | SysPara.s_mod = s;
195 |
196 | % Calc additional thermal cell parameters
197 |
198 | [SysPara.thermal.transfer.A_x, SysPara.thermal.transfer.A_y, SysPara.thermal.transfer.A_z, ...
199 | BatPara.thermal.A] = calc_cell_surface(BatPara);
200 |
201 | % For every p several combinations of e-pe may be found. --> We
202 | % iterate through them as well
203 |
204 | for kk = 1:1:size(epe_mod(jj).pe, 2)
205 |
206 | SysPara.pe_mod = epe_mod(jj).pe(kk);
207 | SysPara.e_mod = epe_mod(jj).e(kk);
208 |
209 | configs_1_mod_all = append_configs_step_1(BatPara, BTMSPara, SysPara, SysSpec, configs_1_mod_all); % Save everything in a cell-array
210 | end
211 | end
212 | end
213 |
214 |
215 | % Check if feasible configurations have been found
216 |
217 | check_feasible_configs(configs_1_mod_all)
218 |
219 |
220 | % Save resuls of this step
221 |
222 | save('BTMS_simulation_results\configs_1_mod_all', 'configs_1_mod_all') % Save all possible configurations of this run in a MAT-File
223 |
224 | clearvars -except configs* % Clear everything instead the array with the configs.
225 |
226 |
227 |
228 | %% Step 2: Basic testing on module-level
229 |
230 | % In this step we take the configurations from the last sections and test
231 | % them for some basic critera. Here we only perform basic tests to decrease
232 | % the solutions space as much as possible before we start with the
233 | % computationally heavier stuff.
234 |
235 | clear append_configs % Clear persistent variable in function
236 | load('configs_1_mod_all'); % Load the configurations from last step if not already in workspace
237 |
238 | configs_2_mod_passed = preallocate_configs_2_mod; % Preallocating the cell-array with all configuations that passed the module tests
239 | configs_2_mod_failed = preallocate_configs_2_mod; % Preallocating the cell-array with all configuations that failed the module tests
240 |
241 |
242 | % Iterate through the configurations
243 |
244 | for ii = 1:1:size(configs_1_mod_all, 2)
245 |
246 | config = configs_1_mod_all(ii);
247 |
248 | % Exclude Configs that violate the max. dimensions (without consideration of BTMS)
249 |
250 | [config, passed_dim] = mod_test_dimensions_no_BTMS(config);
251 |
252 |
253 | % Exclude Configs that violate the energy content criteria
254 |
255 | [config, passed_energy] = mod_test_energy(config);
256 |
257 |
258 | % Create joint structure of criteria
259 |
260 | passed_mod = join_passed_structs(passed_dim, passed_energy);
261 |
262 |
263 | % Exclude configs that did not pass the tests from further consideration,
264 | % pass on working configs to the next steps.
265 |
266 | if check_for_failed_tests(passed_mod) % Test if any test has failed
267 | configs_2_mod_failed = append_configs(configs_2_mod_failed, config, passed_mod, 'fail');
268 |
269 | else % Those configurations have passed
270 | configs_2_mod_passed = append_configs(configs_2_mod_passed, config, passed_mod, 'pass');
271 | end
272 | end
273 |
274 |
275 | % Check if feasible configurations have been found
276 |
277 | check_feasible_configs(configs_2_mod_passed);
278 |
279 |
280 | % Save results of this step
281 |
282 | save('BTMS_simulation_results\configs_2_mod_passed', 'configs_2_mod_passed') % Save all possible configurations of this run in a MAT-File
283 | save('BTMS_simulation_results\configs_2_mod_failed', 'configs_2_mod_failed') % Save all failed configurations of this run in a MAT-File
284 |
285 | clearvars -except configs* % Clear everything instead the array with the configs.
286 |
287 |
288 | %% Step 3: Building a battery pack from the modules
289 |
290 | % Now we combine the module configuration that passed the prior step to a
291 | % battery pack. Basically the strategy is the same as in step 1: First we
292 | % determine the number of serial and parallel module connections, then the
293 | % arrange the modules connected in parallel spatially.
294 |
295 | % Note we don't have the BTMS heat-sinks included in the modules yet. Doing
296 | % so would massively increase the number of possible configurations, so we
297 | % first creates the possible battery packs and then check with which of our
298 | % modules we can fulfill our specified battery pack dimensions and energy
299 | % criteria. What remains will be provided with a BTMS.
300 |
301 | clear append_configs % Clear persistent variable in function
302 | clear get_config_ID % Clear persistent variable in function
303 | load('configs_2_mod_passed'); % Load the feasible configurations from last step if not already in workspace
304 |
305 | configs_3_sys_all = preallocate_configs_3_sys; % Preallocating the cell-array with all configuations that passed the module tests
306 |
307 |
308 | % Iterate through the configurations
309 |
310 | for ii = 1:size(configs_2_mod_passed, 2)
311 |
312 | config = configs_2_mod_passed(ii);
313 |
314 | % Determine number of modules connected in serial inside the battery system
315 |
316 | % This depends on the nominal module voltage and the specified nominal
317 | % system voltage.
318 |
319 | s_sys = ceil(config.SysSpec.U_sys_nom / config.ModInfo.U_nom_mod);
320 |
321 |
322 | % Determine number of modules connected in parallel inside the battery system
323 |
324 | p_sys_raw = max(ceil(config.SysSpec.I_sys_max / config.ModInfo.I_max_mod), ceil(config.SysSpec.C_sys_min / config.ModInfo.C_mod));
325 |
326 |
327 | % Spatial arrangement of the parallel connection
328 |
329 | % We not only can arrange the modules in a simple one dimensional 's*p'
330 | % grid, but can arrange the modules in all three dimensions. Therefore in
331 | % this step we create an 'e*pe' connection from the p_sys modules in
332 | % parallel so that p = e*pe. Those are arranged next to each other so
333 | % the total number of modules in the battery system is n = e*pe*s.
334 |
335 | epe_sys = epe_distribution(p_sys_raw, config.SysSpec.num_higher_p_sys, config.SysSpec.sys_min_e, config.SysSpec.sys_max_e);
336 |
337 | % More parallel connections may be considered for a given configuration
338 | % --> Interrate through all p's
339 |
340 | for jj = 1:1:size(epe_sys,2)
341 |
342 | p_sys = epe_sys(jj).p;
343 |
344 | % For every p several combinations of e-pe may be found. --> We
345 | % iterate through them as well
346 |
347 | for kk = 1:1:size(epe_sys(jj).pe, 2)
348 |
349 | config.SysInfo.num_mods_sys = s_sys * p_sys;
350 | config.SysInfo.num_serial_mods_sys = s_sys;
351 | config.SysInfo.num_parallel_mods_sys = p_sys;
352 | config.SysInfo.num_layers_sys = epe_sys(jj).e(kk);
353 | config.SysInfo.num_parallel_mods_per_layer_sys = epe_sys(jj).pe(kk);
354 |
355 | config.SysPara.p_sys = p_sys * config.SysPara.p_mod;
356 | config.SysPara.s_sys = s_sys * config.SysPara.s_mod;
357 | config.SysPara.pe_sys = epe_sys(jj).pe(kk) * config.SysPara.pe_mod;
358 | config.SysPara.e_sys = epe_sys(jj).e(kk) * config.SysPara.e_mod;
359 |
360 | config.sys_ID = get_config_ID; % Assign a unique ID to this config
361 |
362 | configs_3_sys_all = append_configs(configs_3_sys_all, config); % Save everything in a cell-array
363 | end
364 | end
365 | end
366 |
367 | % Check if feasible configurations have been found
368 |
369 | check_feasible_configs(configs_3_sys_all)
370 |
371 |
372 | % Save resuls of this step
373 |
374 | save('BTMS_simulation_results\configs_3_sys_all', 'configs_3_sys_all') % Save all possible configurations of this run in a MAT-File
375 |
376 | clearvars -except configs* % Clear everything instead the array with the configs.
377 |
378 |
379 | %% Step 4: Basic testing on pack-level
380 |
381 | % Similar to step 2 we test the battery packs we created in the last step
382 | % for basic compliance with mass, dimension and energy critera to sort out
383 | % all unfeasible configurations.
384 |
385 | clear append_configs % Clear persistent variable in function
386 | load('configs_3_sys_all'); % Load the feasible configurations from last step if not already in workspace
387 |
388 | configs_4_sys_passed = preallocate_configs_4_sys; % Preallocating the cell-array with all configuations that passed the module tests
389 | configs_4_sys_failed = preallocate_configs_4_sys; % Preallocating the cell-array with all configuations that failed the module tests
390 |
391 |
392 | % Iterate through the configurations
393 |
394 | for ii = 1:1:size(configs_3_sys_all, 2)
395 |
396 | config = configs_3_sys_all(ii);
397 |
398 | % Exclude Configs that violate the max. dimensions (without consideration of BTMS)
399 |
400 | [config, passed_dim] = sys_test_dimensions_no_BTMS(config);
401 |
402 |
403 | % Exclude Configs that violate the energy content criteria
404 |
405 | [config, passed_energy] = sys_test_energy(config);
406 |
407 |
408 | % Create joint structure of criteria
409 |
410 | passed_sys = join_passed_structs(passed_dim, passed_energy);
411 |
412 |
413 | % Exclude configs that did not pass the tests from further consideration,
414 | % pass on working configs to the next steps.
415 |
416 | if check_for_failed_tests(passed_sys) % Test if any test has failed
417 | configs_4_sys_failed = append_configs(configs_4_sys_failed, config, passed_sys, 'fail');
418 |
419 | else % Those configurations have passed
420 | configs_4_sys_passed = append_configs(configs_4_sys_passed, config, passed_sys, 'pass');
421 | end
422 | end
423 |
424 |
425 | % Check if feasible configurations have been found
426 |
427 | check_feasible_configs(configs_4_sys_passed);
428 |
429 |
430 | % Save results of this step
431 |
432 | save('BTMS_simulation_results\configs_4_sys_passed', 'configs_4_sys_passed') % Save all possible configurations of this run in a MAT-File
433 | save('BTMS_simulation_results\configs_4_sys_failed', 'configs_4_sys_failed') % Save all failed configurations of this run in a MAT-File
434 |
435 | clearvars -except configs* % Clear everything instead the array with the configs.
436 |
437 |
438 |
439 | %% Step 5: Add the BTMS to the modules and system
440 |
441 | % Now we have found module and pack configurations that may work from a
442 | % data-sheet based point of view. In this step we take those systems and
443 | % include a BTMS configuration.
444 |
445 | clear append_configs % Clear persistent variable in function
446 | load('configs_4_sys_passed'); % Load the feasible configurations from last step if not already in workspace
447 |
448 | configs_5_BTMS_all = preallocate_configs_5_BTMS; % Preallocating the cell-array with all configuations that passed the module tests
449 |
450 |
451 | % Iterate through the configurations
452 |
453 | for ii = 1:1:size(configs_4_sys_passed, 2)
454 |
455 | config = configs_4_sys_passed(ii);
456 |
457 | % Determine BTMS architecture
458 |
459 | config.BTMSConfig = main_create_BTMS_config(config.BTMSPara, config.SysPara, config.SysInfo, config.ModInfo);
460 | config.BTMS_ID = config.BTMSPara.name;
461 |
462 | % Calculate thermal system properties depending on module and BTMS config
463 |
464 | %%%%%%%%%%%%%% TODO for simulation: config.SysPara.thermal = calc_thermal_system_properties(config.BTMSConfig, config.SysPara.thermal);
465 |
466 | configs_5_BTMS_all = append_configs(configs_5_BTMS_all, config);
467 |
468 | end
469 |
470 |
471 | % Check if feasible configurations have been found
472 |
473 | check_feasible_configs(configs_5_BTMS_all);
474 |
475 |
476 | % Save results of this step
477 |
478 | save('BTMS_simulation_results\configs_5_BTMS_all', 'configs_5_BTMS_all') % Save all possible configurations of this run in a MAT-File
479 |
480 | clearvars -except configs* % Clear everything instead the array with the configs.
481 |
482 |
483 | %% Step 6: Basic tests of the full system
484 |
485 | % Similar to step 4 we test the battery packs for basic compliance with
486 | % mass, dimension and energy critera - this time with the BTMS included - to
487 | % sort out all unfeasible configurations.
488 |
489 | clear append_configs % Clear persistent variable in function
490 | load('configs_5_BTMS_all'); % Load the feasible configurations from last step if not already in workspace
491 |
492 | configs_6_BTMS_passed = preallocate_configs_6_BTMS; % Preallocating the cell-array with all configuations that passed the module tests
493 | configs_6_BTMS_failed = preallocate_configs_6_BTMS; % Preallocating the cell-array with all configuations that failed the module tests
494 |
495 |
496 | % Iterate through the configurations
497 |
498 | for ii = 1:1:size(configs_5_BTMS_all, 2)
499 |
500 | config = configs_5_BTMS_all(ii);
501 |
502 | % Exclude Configs that violate the max. dimensions (with consideration of BTMS)
503 |
504 | [config, passed_BTMS] = test_dimensions_BTMS(config);
505 |
506 | % Exclude configs that did not pass the tests from further consideration,
507 | % pass on working configs to the next steps.
508 |
509 | if check_for_failed_tests(passed_BTMS) % Test if any test has failed
510 | configs_6_BTMS_failed = append_configs(configs_6_BTMS_failed, config, passed_BTMS, 'fail');
511 |
512 | else % Those configurations have passed
513 | configs_6_BTMS_passed = append_configs(configs_6_BTMS_passed, config, passed_BTMS, 'pass');
514 | end
515 | end
516 |
517 |
518 | % Check if feasible configurations have been found
519 |
520 | check_feasible_configs(configs_6_BTMS_passed);
521 |
522 |
523 | % Save results of this step
524 |
525 | save('BTMS_simulation_results\configs_6_BTMS_passed', 'configs_6_BTMS_passed') % Save all possible configurations of this run in a MAT-File
526 | save('BTMS_simulation_results\configs_6_BTMS_failed', 'configs_6_BTMS_failed') % Save all failed configurations of this run in a MAT-File
527 |
528 | clearvars -except configs* % Clear everything instead the array with the configs.
529 |
530 |
531 | %% Next steps
532 |
533 | % Refer to 'main_sim_BTMS_2_system_simulation'
534 |
--------------------------------------------------------------------------------