Skip to content

Commit 2607dce

Browse files
committed
reverted previous commit
1 parent d80aaf9 commit 2607dce

File tree

1 file changed

+3
-35
lines changed

1 file changed

+3
-35
lines changed

source/mixture.f90

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,6 @@ recursive function mixture_init(thermo, species_names, element_names, reactant_n
227227

228228
! Add the info from the ReactantInput
229229
if (present(input_reactants)) then
230-
if (size(input_reactants) /= ns) then
231-
call abort('mixture_init: input_reactants size mismatch')
232-
end if
233230
! Loop over each reactant, checking if any additional info is provided
234231
do i = 1, size(input_reactants)
235232
if (.not. found_db(i) .and. .not. allocated(input_reactants(i)%formula)) then
@@ -276,8 +273,7 @@ recursive function mixture_init(thermo, species_names, element_names, reactant_n
276273
! Validate formulas before building the element list
277274
do i = 1, ns
278275
if (.not. allocated(self%species(i)%formula)) then
279-
call abort('mixture_init: Missing formula for species '//trim(self%species_names(i))// &
280-
' (check thermo.lib build)')
276+
call abort('mixture_init: Missing formula for species '//trim(self%species_names(i)))
281277
end if
282278
if (.not. allocated(self%species(i)%formula%elements)) then
283279
call abort('mixture_init: Missing formula elements for species '//trim(self%species_names(i)))
@@ -328,9 +324,6 @@ recursive function mixture_init(thermo, species_names, element_names, reactant_n
328324

329325
! Move "E" to the end of the element list if present
330326
if (self%ions) then
331-
if (size(self%element_names) == 0) then
332-
call abort('mixture_init: empty element list for ionized problem')
333-
end if
334327
self%element_names = [ &
335328
pack(self%element_names, .not. self%element_names == 'E'), &
336329
pack(self%element_names, self%element_names == 'E') &
@@ -458,6 +451,7 @@ function mixture_get_products(self, thermo, omit) result(product_names)
458451
! Exclude "omit" names
459452
! TODO: pop omit name every time it is found to speed up search
460453
if (present(omit)) then
454+
call check_name_list_len(omit, snl, 'mixture_get_products omit')
461455
is_omitted = .false.
462456
do j = 1, size(omit)
463457
if (names_match(thermo%product_name_list(i), omit(j))) then
@@ -530,7 +524,6 @@ function mixture_chem_eq_ratio_to_of_ratio(self, oxidant_weights, fuel_weights,
530524
! Locals
531525
real(dp) :: vm(self%num_elements), vp(self%num_elements) ! Valences (m = minus, p = plus)
532526
real(dp) :: b0_ox(self%num_elements), b0_fu(self%num_elements)
533-
!real(dp) :: mw(self%num_species) ! Molecular weights
534527
real(dp) :: vm_fu, vp_fu, vm_ox, vp_ox ! Total fuel and oxidant valences (m = minus, p = plus)
535528

536529
call check_array_len(size(oxidant_weights), self%num_species, 'mixture_chem_eq_ratio_to_of_ratio oxidant_weights')
@@ -1252,16 +1245,6 @@ function get_species(thermo, name, found) result(species)
12521245
candidate => thermo%product_thermo(i)
12531246
if (names_match(name, candidate%name)) then
12541247
species = candidate
1255-
! Ensure formula components are present even if allocatable assignment is incomplete.
1256-
if (allocated(candidate%formula)) then
1257-
if (.not. allocated(species%formula)) allocate(species%formula)
1258-
if (allocated(candidate%formula%elements)) then
1259-
species%formula%elements = candidate%formula%elements
1260-
end if
1261-
if (allocated(candidate%formula%coefficients)) then
1262-
species%formula%coefficients = candidate%formula%coefficients
1263-
end if
1264-
end if
12651248
if (present(found)) found = .true.
12661249
return
12671250
end if
@@ -1272,27 +1255,12 @@ function get_species(thermo, name, found) result(species)
12721255
candidate => thermo%reactant_thermo(i)
12731256
if (names_match(name, candidate%name)) then
12741257
species = candidate
1275-
! Ensure formula components are present even if allocatable assignment is incomplete.
1276-
if (allocated(candidate%formula)) then
1277-
if (.not. allocated(species%formula)) allocate(species%formula)
1278-
if (allocated(candidate%formula%elements)) then
1279-
species%formula%elements = candidate%formula%elements
1280-
end if
1281-
if (allocated(candidate%formula%coefficients)) then
1282-
species%formula%coefficients = candidate%formula%coefficients
1283-
end if
1284-
end if
12851258
if (present(found)) found = .true.
12861259
return
12871260
end if
12881261
end do
12891262

1290-
species%name = name
1291-
species%i_phase = 0
1292-
species%num_intervals = 0
1293-
species%molecular_weight = empty_dp
1294-
species%enthalpy_ref = 0.0d0
1295-
species%T_ref = 0.0d0
1263+
! call log_info('Species '//trim(name)//' not found in ThermoDB')
12961264

12971265
end function
12981266

0 commit comments

Comments
 (0)