From be0484dbd1c3ae0bdc9b7b8c176ee2b2d9da5bfc Mon Sep 17 00:00:00 2001 From: alexjamesgarza Date: Tue, 2 Apr 2024 12:38:56 -0500 Subject: [PATCH] moved where ordered arrays are computed --- src/box_model.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/box_model.py b/src/box_model.py index 29b662d3..e82df0e9 100644 --- a/src/box_model.py +++ b/src/box_model.py @@ -420,7 +420,6 @@ def solve(self, path_to_output = None): output_array.append(headers) - curr_time = 0 next_output_time = curr_time #runs the simulation at each timestep @@ -451,8 +450,7 @@ def solve(self, path_to_output = None): next_conditions = self.evolving_conditions.conditions[next_conditions_index] next_conditions_time = self.evolving_conditions.times[next_conditions_index] - ordered_concentrations = self.order_species_concentrations(curr_conditions, species_constant_ordering) - ordered_rate_constants = self.order_reaction_rates(curr_conditions, rate_constant_ordering) + #overrides concentrations if specified by conditions @@ -463,7 +461,8 @@ def solve(self, path_to_output = None): next_conditions = None - + ordered_concentrations = self.order_species_concentrations(curr_conditions, species_constant_ordering) + ordered_rate_constants = self.order_reaction_rates(curr_conditions, rate_constant_ordering) #solves and updates concentration values in concentration array musica.micm_solve(self.solver, self.box_model_options.chem_step_time, curr_conditions.temperature, curr_conditions.pressure, ordered_concentrations, ordered_rate_constants)