From d4e51e4177b12bbd796c57b7a8ea2d836c19bd92 Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 3 Jul 2026 11:57:50 +0800 Subject: [PATCH] Add Explosive input controls --- src/explosive/sph_explosive.f90 | 400 ++++++++++++++++++++++++++++++++ src/input/sph_input_reader.f90 | 64 +++++ todo.md | 40 ++-- 3 files changed, 484 insertions(+), 20 deletions(-) diff --git a/src/explosive/sph_explosive.f90 b/src/explosive/sph_explosive.f90 index b12d7ab..8fe5126 100644 --- a/src/explosive/sph_explosive.f90 +++ b/src/explosive/sph_explosive.f90 @@ -1,15 +1,415 @@ module sph_explosive + use sph_precision, only: rk, SPH_NDIM + use sph_error, only: SPH_SUCCESS, SPH_ERROR_ARGUMENT, SPH_ERROR_INPUT, & + sph_error_set + use sph_database, only: SPH_MAX_MATERIALS, SPH_MAX_SECTIONS, material_count, & + material_name, material_type, material_density, section_count, & + section_material_id + use sph_gas, only: sph_gas_table_index_by_material_id, & + gas_material_eos_defined implicit none + + integer, parameter :: EXPLOSIVE_CONVERSION_NONE = 0 + integer, parameter :: EXPLOSIVE_CONVERSION_PHASE = 1 + integer, parameter :: EXPLOSIVE_CONVERSION_SOURCE = 2 + logical :: explosive_module_initialized = .false. + logical :: explosive_material_seen = .false. + integer :: explosive_material_count = 0 + integer :: explosive_material_id(SPH_MAX_MATERIALS) = 0 + character(len=64) :: explosive_material_name(SPH_MAX_MATERIALS) = ' ' + logical :: explosive_control_defined(SPH_MAX_MATERIALS) = .false. + integer :: explosive_product_material_id(SPH_MAX_MATERIALS) = 0 + character(len=64) :: explosive_product_material_name(SPH_MAX_MATERIALS) = ' ' + real(rk) :: explosive_density0(SPH_MAX_MATERIALS) = 0.0_rk + real(rk) :: explosive_detonation_velocity(SPH_MAX_MATERIALS) = 0.0_rk + real(rk) :: explosive_energy_per_mass(SPH_MAX_MATERIALS) = 0.0_rk + real(rk) :: explosive_burn_time(SPH_MAX_MATERIALS) = 0.0_rk + integer :: explosive_conversion_mode(SPH_MAX_MATERIALS) = EXPLOSIVE_CONVERSION_NONE + integer :: explosive_ignition_count = 0 + integer :: explosive_ignition_material_id(SPH_MAX_MATERIALS) = 0 + real(rk) :: explosive_ignition_x(SPH_NDIM,SPH_MAX_MATERIALS) = 0.0_rk + real(rk) :: explosive_ignition_time(SPH_MAX_MATERIALS) = 0.0_rk contains subroutine sph_explosive_initialize() explosive_module_initialized = .true. + call sph_explosive_clear_material_table() end subroutine sph_explosive_initialize subroutine sph_explosive_reset() explosive_module_initialized = .false. + call sph_explosive_clear_material_table() end subroutine sph_explosive_reset + subroutine sph_explosive_clear_material_table() + explosive_material_seen = .false. + explosive_material_count = 0 + explosive_material_id = 0 + explosive_material_name = ' ' + explosive_control_defined = .false. + explosive_product_material_id = 0 + explosive_product_material_name = ' ' + explosive_density0 = 0.0_rk + explosive_detonation_velocity = 0.0_rk + explosive_energy_per_mass = 0.0_rk + explosive_burn_time = 0.0_rk + explosive_conversion_mode = EXPLOSIVE_CONVERSION_NONE + explosive_ignition_count = 0 + explosive_ignition_material_id = 0 + explosive_ignition_x = 0.0_rk + explosive_ignition_time = 0.0_rk + end subroutine sph_explosive_clear_material_table + + subroutine sph_explosive_note_material(name, material_type_in) + character(len=*), intent(in) :: name + character(len=*), intent(in) :: material_type_in + integer :: explosive_index + + if (index(sph_explosive_upper(material_type_in), 'EXPLOSIVE') > 0) then + explosive_material_seen = .true. + explosive_index = sph_explosive_register_material(name) + end if + end subroutine sph_explosive_note_material + + subroutine sph_explosive_set_control(material_name_in, model_type, & + detonation_velocity, energy_per_mass, burn_time, & + product_material_name_in, conversion_name, ierr) + character(len=*), intent(in) :: material_name_in + character(len=*), intent(in) :: model_type + real(rk), intent(in) :: detonation_velocity + real(rk), intent(in) :: energy_per_mass + real(rk), intent(in) :: burn_time + character(len=*), intent(in) :: product_material_name_in + character(len=*), intent(in) :: conversion_name + integer, intent(out) :: ierr + integer :: explosive_index + integer :: product_index + integer :: conversion_mode + character(len=64) :: upper_model + + ierr = SPH_SUCCESS + upper_model = sph_explosive_upper(model_type) + if (len_trim(material_name_in) == 0) then + call sph_error_set(SPH_ERROR_INPUT, 'Explosive control MATERIAL is required') + ierr = SPH_ERROR_INPUT + return + end if + if (index(upper_model, 'PROGRAMMED_BURN') <= 0) then + call sph_error_set(SPH_ERROR_INPUT, 'Explosive TYPE must be PROGRAMMED_BURN') + ierr = SPH_ERROR_INPUT + return + end if + if (detonation_velocity <= 0.0_rk) then + call sph_error_set(SPH_ERROR_ARGUMENT, 'Explosive detonation velocity must be positive') + ierr = SPH_ERROR_ARGUMENT + return + end if + if (energy_per_mass < 0.0_rk) then + call sph_error_set(SPH_ERROR_ARGUMENT, 'Explosive energy must be non-negative') + ierr = SPH_ERROR_ARGUMENT + return + end if + if (burn_time < 0.0_rk) then + call sph_error_set(SPH_ERROR_ARGUMENT, 'Explosive burn time must be non-negative') + ierr = SPH_ERROR_ARGUMENT + return + end if + if (len_trim(product_material_name_in) == 0) then + call sph_error_set(SPH_ERROR_INPUT, 'Explosive PRODUCT_MATERIAL is required') + ierr = SPH_ERROR_INPUT + return + end if + call sph_explosive_prepare_material(material_name_in, explosive_index, ierr) + if (ierr /= SPH_SUCCESS) return + if (explosive_control_defined(explosive_index)) then + call sph_error_set(SPH_ERROR_INPUT, 'Explosive material control is already defined') + ierr = SPH_ERROR_INPUT + return + end if + product_index = sph_explosive_find_material(product_material_name_in) + if (product_index <= 0) then + call sph_error_set(SPH_ERROR_INPUT, 'Explosive product material is unknown') + ierr = SPH_ERROR_INPUT + return + end if + if (index(sph_explosive_upper(material_type(product_index)), 'GAS') <= 0) then + call sph_error_set(SPH_ERROR_INPUT, 'Explosive product material must be Gas') + ierr = SPH_ERROR_INPUT + return + end if + call sph_explosive_validate_product_gas(product_index, ierr) + if (ierr /= SPH_SUCCESS) return + conversion_mode = sph_explosive_conversion_id(conversion_name) + if (conversion_mode == EXPLOSIVE_CONVERSION_NONE) then + call sph_error_set(SPH_ERROR_INPUT, 'Explosive CONVERSION must be PHASE or SOURCE') + ierr = SPH_ERROR_INPUT + return + end if + explosive_control_defined(explosive_index) = .true. + explosive_product_material_id(explosive_index) = product_index + explosive_product_material_name(explosive_index) = material_name(product_index) + explosive_density0(explosive_index) = material_density(explosive_material_id(explosive_index)) + explosive_detonation_velocity(explosive_index) = detonation_velocity + explosive_energy_per_mass(explosive_index) = energy_per_mass + explosive_burn_time(explosive_index) = burn_time + explosive_conversion_mode(explosive_index) = conversion_mode + end subroutine sph_explosive_set_control + + subroutine sph_explosive_set_ignition(material_name_in, ignition_x, & + ignition_time, ierr) + character(len=*), intent(in) :: material_name_in + real(rk), intent(in) :: ignition_x(SPH_NDIM) + real(rk), intent(in) :: ignition_time + integer, intent(out) :: ierr + integer :: explosive_index + + ierr = SPH_SUCCESS + if (len_trim(material_name_in) == 0) then + call sph_error_set(SPH_ERROR_INPUT, 'Explosive ignition MATERIAL is required') + ierr = SPH_ERROR_INPUT + return + end if + if (ignition_time < 0.0_rk) then + call sph_error_set(SPH_ERROR_ARGUMENT, 'Explosive ignition time must be non-negative') + ierr = SPH_ERROR_ARGUMENT + return + end if + if (.not. sph_explosive_vector_is_finite(ignition_x)) then + call sph_error_set(SPH_ERROR_ARGUMENT, 'Explosive ignition coordinate is not finite') + ierr = SPH_ERROR_ARGUMENT + return + end if + call sph_explosive_prepare_material(material_name_in, explosive_index, ierr) + if (ierr /= SPH_SUCCESS) return + if (explosive_ignition_count >= SPH_MAX_MATERIALS) then + call sph_error_set(SPH_ERROR_INPUT, 'too many Explosive ignition records') + ierr = SPH_ERROR_INPUT + return + end if + explosive_ignition_count = explosive_ignition_count + 1 + explosive_ignition_material_id(explosive_ignition_count) = & + explosive_material_id(explosive_index) + explosive_ignition_x(:,explosive_ignition_count) = ignition_x + explosive_ignition_time(explosive_ignition_count) = ignition_time + end subroutine sph_explosive_set_ignition + + subroutine sph_explosive_validate_input(ierr) + integer, intent(out) :: ierr + integer :: explosive_index + integer :: mat_index + + ierr = SPH_SUCCESS + if (.not. explosive_material_seen) return + do explosive_index = 1, explosive_material_count + mat_index = explosive_material_id(explosive_index) + if (mat_index < 1 .or. mat_index > material_count) then + call sph_error_set(SPH_ERROR_INPUT, 'Explosive material table is invalid') + ierr = SPH_ERROR_INPUT + return + end if + if (material_density(mat_index) <= 0.0_rk) then + call sph_error_set(SPH_ERROR_INPUT, 'input is missing *DENSITY for Explosive material') + ierr = SPH_ERROR_INPUT + return + end if + if (.not. explosive_control_defined(explosive_index)) then + call sph_error_set(SPH_ERROR_INPUT, 'input is missing *SPHLITE EXPLOSIVE for Explosive material') + ierr = SPH_ERROR_INPUT + return + end if + call sph_explosive_validate_product_gas( & + explosive_product_material_id(explosive_index), ierr) + if (ierr /= SPH_SUCCESS) return + if (.not. sph_explosive_has_ignition_for_material(mat_index)) then + call sph_error_set(SPH_ERROR_INPUT, 'input is missing *SPHLITE IGNITION for Explosive material') + ierr = SPH_ERROR_INPUT + return + end if + end do + end subroutine sph_explosive_validate_input + + subroutine sph_explosive_count_unbound_materials(count) + integer, intent(out) :: count + integer :: i + + count = 0 + do i = 1, explosive_material_count + if (.not. sph_explosive_has_section_binding_for_id(explosive_material_id(i))) then + count = count + 1 + end if + end do + end subroutine sph_explosive_count_unbound_materials + + subroutine sph_explosive_prepare_material(name, explosive_index, ierr) + character(len=*), intent(in) :: name + integer, intent(out) :: explosive_index + integer, intent(out) :: ierr + integer :: mat_index + + ierr = SPH_SUCCESS + explosive_index = 0 + mat_index = sph_explosive_find_material(name) + if (mat_index <= 0) then + call sph_error_set(SPH_ERROR_INPUT, 'Explosive control references unknown material') + ierr = SPH_ERROR_INPUT + return + end if + if (index(sph_explosive_upper(material_type(mat_index)), 'EXPLOSIVE') <= 0) then + call sph_error_set(SPH_ERROR_INPUT, 'Explosive control references non-Explosive material') + ierr = SPH_ERROR_INPUT + return + end if + explosive_index = sph_explosive_register_material(name) + if (explosive_index <= 0) then + call sph_error_set(SPH_ERROR_INPUT, 'too many Explosive material records') + ierr = SPH_ERROR_INPUT + end if + end subroutine sph_explosive_prepare_material + + integer function sph_explosive_register_material(name) + character(len=*), intent(in) :: name + integer :: mat_index + integer :: explosive_index + + sph_explosive_register_material = 0 + mat_index = sph_explosive_find_material(name) + if (mat_index <= 0) return + explosive_index = sph_explosive_table_index_by_material_id(mat_index) + if (explosive_index > 0) then + sph_explosive_register_material = explosive_index + return + end if + if (explosive_material_count >= SPH_MAX_MATERIALS) return + explosive_material_count = explosive_material_count + 1 + explosive_material_id(explosive_material_count) = mat_index + explosive_material_name(explosive_material_count) = material_name(mat_index) + explosive_density0(explosive_material_count) = material_density(mat_index) + sph_explosive_register_material = explosive_material_count + end function sph_explosive_register_material + + integer function sph_explosive_table_index_by_material_id(mat_index) + integer, intent(in) :: mat_index + integer :: i + + sph_explosive_table_index_by_material_id = 0 + do i = 1, explosive_material_count + if (explosive_material_id(i) == mat_index) then + sph_explosive_table_index_by_material_id = i + return + end if + end do + end function sph_explosive_table_index_by_material_id + + integer function sph_explosive_find_material(name) + character(len=*), intent(in) :: name + integer :: i + + sph_explosive_find_material = 0 + do i = 1, material_count + if (trim(sph_explosive_upper(material_name(i))) == & + trim(sph_explosive_upper(name))) then + sph_explosive_find_material = i + return + end if + end do + end function sph_explosive_find_material + + integer function sph_explosive_conversion_id(conversion_name) + character(len=*), intent(in) :: conversion_name + character(len=64) :: upper_name + + upper_name = sph_explosive_upper(conversion_name) + if (len_trim(conversion_name) == 0 .or. index(upper_name, 'PHASE') > 0) then + sph_explosive_conversion_id = EXPLOSIVE_CONVERSION_PHASE + else if (index(upper_name, 'SOURCE') > 0) then + sph_explosive_conversion_id = EXPLOSIVE_CONVERSION_SOURCE + else + sph_explosive_conversion_id = EXPLOSIVE_CONVERSION_NONE + end if + end function sph_explosive_conversion_id + + subroutine sph_explosive_validate_product_gas(product_index, ierr) + integer, intent(in) :: product_index + integer, intent(out) :: ierr + integer :: gas_index + + ierr = SPH_SUCCESS + if (product_index < 1 .or. product_index > material_count) then + call sph_error_set(SPH_ERROR_INPUT, 'Explosive product material is unknown') + ierr = SPH_ERROR_INPUT + return + end if + if (index(sph_explosive_upper(material_type(product_index)), 'GAS') <= 0) then + call sph_error_set(SPH_ERROR_INPUT, 'Explosive product material must be Gas') + ierr = SPH_ERROR_INPUT + return + end if + gas_index = sph_gas_table_index_by_material_id(product_index) + if (gas_index <= 0 .or. .not. gas_material_eos_defined(gas_index)) then + call sph_error_set(SPH_ERROR_INPUT, 'Explosive product Gas material has no EOS') + ierr = SPH_ERROR_INPUT + end if + end subroutine sph_explosive_validate_product_gas + + logical function sph_explosive_has_section_binding_for_id(mat_index) + integer, intent(in) :: mat_index + integer :: i + + sph_explosive_has_section_binding_for_id = .false. + do i = 1, section_count + if (section_material_id(i) == mat_index) then + sph_explosive_has_section_binding_for_id = .true. + return + end if + end do + end function sph_explosive_has_section_binding_for_id + + logical function sph_explosive_has_ignition_for_material(mat_index) + integer, intent(in) :: mat_index + integer :: i + + sph_explosive_has_ignition_for_material = .false. + do i = 1, explosive_ignition_count + if (explosive_ignition_material_id(i) == mat_index) then + sph_explosive_has_ignition_for_material = .true. + return + end if + end do + end function sph_explosive_has_ignition_for_material + + logical function sph_explosive_is_finite(value) + real(rk), intent(in) :: value + + sph_explosive_is_finite = value == value .and. abs(value) < huge(value) + end function sph_explosive_is_finite + + logical function sph_explosive_vector_is_finite(values) + real(rk), intent(in) :: values(SPH_NDIM) + integer :: i + + sph_explosive_vector_is_finite = .true. + do i = 1, SPH_NDIM + if (.not. sph_explosive_is_finite(values(i))) then + sph_explosive_vector_is_finite = .false. + end if + end do + end function sph_explosive_vector_is_finite + + function sph_explosive_upper(text) result(out) + character(len=*), intent(in) :: text + character(len=len(text)) :: out + integer :: i + integer :: code + + out = text + do i = 1, len(out) + code = ichar(out(i:i)) + if (code >= ichar('a') .and. code <= ichar('z')) then + out(i:i) = char(code - ichar('a') + ichar('A')) + end if + end do + end function sph_explosive_upper + end module sph_explosive diff --git a/src/input/sph_input_reader.f90 b/src/input/sph_input_reader.f90 index 8eada95..7cc4c0c 100644 --- a/src/input/sph_input_reader.f90 +++ b/src/input/sph_input_reader.f90 @@ -16,6 +16,9 @@ module sph_input_reader use sph_gas, only: sph_gas_note_material, sph_gas_set_eos, & sph_gas_set_particle_control, sph_gas_set_body_force, & sph_gas_apply_initial_conditions, sph_gas_count_unbound_materials + use sph_explosive, only: sph_explosive_note_material, & + sph_explosive_set_control, sph_explosive_set_ignition, & + sph_explosive_validate_input, sph_explosive_count_unbound_materials use sph_neighbor, only: sph_neighbor_rebuild use sph_inp_defs, only: SPH_INPUT_LINE_LEN, SPH_INPUT_FIELD_LEN, & SPH_INPUT_MAX_FIELDS, SPH_KEY_NODE, SPH_KEY_ELEMENT, SPH_KEY_NSET, & @@ -75,6 +78,7 @@ contains subroutine sph_input_build_model(ierr) integer, intent(out) :: ierr integer :: gas_unbound_count + integer :: explosive_unbound_count ierr = SPH_SUCCESS if (npart <= 0) then @@ -103,8 +107,12 @@ contains if (ierr /= SPH_SUCCESS) return call sph_gas_apply_initial_conditions(ierr) if (ierr /= SPH_SUCCESS) return + call sph_explosive_validate_input(ierr) + if (ierr /= SPH_SUCCESS) return call sph_gas_count_unbound_materials(gas_unbound_count) input_warning_count = input_warning_count + gas_unbound_count + call sph_explosive_count_unbound_materials(explosive_unbound_count) + input_warning_count = input_warning_count + explosive_unbound_count call sph_neighbor_rebuild(ierr) end subroutine sph_input_build_model @@ -257,6 +265,7 @@ contains call sph_db_add_material(value, type_value, ierr) call sph_water_note_material(value, type_value) call sph_gas_note_material(value, type_value) + call sph_explosive_note_material(value, type_value) else if (key_id == SPH_KEY_SECTION) then input_has_section = .true. call sph_input_get_option(line, 'ELSET', section_value) @@ -289,6 +298,10 @@ contains call sph_input_parse_particle_control(line, ierr) else if (index(upper_line, 'BODY FORCE') > 0) then call sph_input_parse_body_force(line, ierr) + else if (index(upper_line, 'EXPLOSIVE') > 0) then + call sph_input_parse_explosive_control(line, ierr) + else if (index(upper_line, 'IGNITION') > 0) then + call sph_input_parse_ignition(line, ierr) else input_warning_count = input_warning_count + 1 end if @@ -484,6 +497,57 @@ contains call sph_gas_set_body_force(force, ierr) end subroutine sph_input_parse_body_force + subroutine sph_input_parse_explosive_control(line, ierr) + character(len=*), intent(in) :: line + integer, intent(out) :: ierr + character(len=SPH_INPUT_FIELD_LEN) :: material_name + character(len=SPH_INPUT_FIELD_LEN) :: model_type + character(len=SPH_INPUT_FIELD_LEN) :: product_material + character(len=SPH_INPUT_FIELD_LEN) :: conversion + real(rk) :: detonation_velocity + real(rk) :: energy + real(rk) :: burn_time + + ierr = SPH_SUCCESS + call sph_input_get_option(line, 'MATERIAL', material_name) + call sph_input_get_option(line, 'TYPE', model_type) + call sph_input_get_option(line, 'PRODUCT_MATERIAL', product_material) + call sph_input_get_option(line, 'CONVERSION', conversion) + call sph_input_get_required_real(line, 'DETONATION_VELOCITY', & + detonation_velocity, ierr) + if (ierr /= SPH_SUCCESS) return + call sph_input_get_required_real(line, 'ENERGY', energy, ierr) + if (ierr /= SPH_SUCCESS) return + call sph_input_get_required_real(line, 'BURN_TIME', burn_time, ierr) + if (ierr /= SPH_SUCCESS) return + call sph_explosive_set_control(material_name, model_type, & + detonation_velocity, energy, burn_time, product_material, & + conversion, ierr) + end subroutine sph_input_parse_explosive_control + + subroutine sph_input_parse_ignition(line, ierr) + character(len=*), intent(in) :: line + integer, intent(out) :: ierr + character(len=SPH_INPUT_FIELD_LEN) :: material_name + real(rk) :: ignition_x(SPH_NDIM) + real(rk) :: ignition_time + + ierr = SPH_SUCCESS + ignition_x = 0.0_rk + ignition_time = 0.0_rk + call sph_input_get_option(line, 'MATERIAL', material_name) + call sph_input_get_required_real(line, 'X', ignition_x(1), ierr) + if (ierr /= SPH_SUCCESS) return + call sph_input_get_required_real(line, 'Y', ignition_x(2), ierr) + if (ierr /= SPH_SUCCESS) return + call sph_input_get_required_real(line, 'Z', ignition_x(3), ierr) + if (ierr /= SPH_SUCCESS) return + call sph_input_get_required_real(line, 'TIME', ignition_time, ierr) + if (ierr /= SPH_SUCCESS) return + call sph_explosive_set_ignition(material_name, ignition_x, & + ignition_time, ierr) + end subroutine sph_input_parse_ignition + subroutine sph_input_parse_density(line, ierr) character(len=*), intent(in) :: line integer, intent(out) :: ierr diff --git a/todo.md b/todo.md index df5594a..0062166 100644 --- a/todo.md +++ b/todo.md @@ -33,26 +33,26 @@ ## 阶段 B:Explosive 输入解析、材料控制与校验 -- [ ] 为 `TYPE=EXPLOSIVE` material 增加输入识别路径。 -- [ ] 为 explosive material 数量增加集中式统计字段。 -- [ ] 为 explosive material 内部 id 增加存储字段。 -- [ ] 为 explosive material 名称增加存储字段。 -- [ ] 为 explosive 初始密度增加 material 级存储字段。 -- [ ] 为 explosive 爆速增加 material 级存储字段。 -- [ ] 为 explosive 单位质量能量增加 material 级存储字段。 -- [ ] 为 explosive 反应时间窗口增加 material 级存储字段。 -- [ ] 为 explosive product Gas material 映射增加存储字段。 -- [ ] 为 explosive conversion mode 增加存储字段。 -- [ ] 增加 explosive material 状态表初始化过程。 -- [ ] 增加 explosive material 状态表清理过程。 -- [ ] 增加按 material 名称查找 explosive material id 的过程。 -- [ ] 将 `*SPHLITE EXPLOSIVE` 解析结果绑定到 explosive material。 -- [ ] 将 `*SPHLITE IGNITION` 解析结果绑定到 explosive material。 -- [ ] 对 explosive material 缺失 `*DENSITY` 的输入报 error。 -- [ ] 对 explosive material 缺失 `*SPHLITE EXPLOSIVE` 的输入报 error。 -- [ ] 对 explosive section 未绑定 active 粒子的输入报 warning。 -- [ ] 对 product material 不是 Gas material 的输入报 error。 -- [ ] 对 product Gas material 缺失 EOS 的输入报 error。 +- [x] 为 `TYPE=EXPLOSIVE` material 增加输入识别路径。 +- [x] 为 explosive material 数量增加集中式统计字段。 +- [x] 为 explosive material 内部 id 增加存储字段。 +- [x] 为 explosive material 名称增加存储字段。 +- [x] 为 explosive 初始密度增加 material 级存储字段。 +- [x] 为 explosive 爆速增加 material 级存储字段。 +- [x] 为 explosive 单位质量能量增加 material 级存储字段。 +- [x] 为 explosive 反应时间窗口增加 material 级存储字段。 +- [x] 为 explosive product Gas material 映射增加存储字段。 +- [x] 为 explosive conversion mode 增加存储字段。 +- [x] 增加 explosive material 状态表初始化过程。 +- [x] 增加 explosive material 状态表清理过程。 +- [x] 增加按 material 名称查找 explosive material id 的过程。 +- [x] 将 `*SPHLITE EXPLOSIVE` 解析结果绑定到 explosive material。 +- [x] 将 `*SPHLITE IGNITION` 解析结果绑定到 explosive material。 +- [x] 对 explosive material 缺失 `*DENSITY` 的输入报 error。 +- [x] 对 explosive material 缺失 `*SPHLITE EXPLOSIVE` 的输入报 error。 +- [x] 对 explosive section 未绑定 active 粒子的输入报 warning。 +- [x] 对 product material 不是 Gas material 的输入报 error。 +- [x] 对 product Gas material 缺失 EOS 的输入报 error。 ## 阶段 C:Explosive 模块状态、点火与爆轰到达时间