Skip to content

Commit

Permalink
edited paper
Browse files Browse the repository at this point in the history
  • Loading branch information
mtod92 committed Dec 21, 2023
1 parent f58df6e commit bbb06ab
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 46 deletions.
7 changes: 3 additions & 4 deletions equpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@
from typing import List, Tuple
from utils import eq_system_builder

# github test branch_1


class EquationSystem:
def __init__(self, equations: List[str], mass_conservation: List[str]) -> None:
self.stoichiometry, self.mass_conservation, self.species = eq_system_builder(
equations, mass_conservation
)



class ChemicalReaction:
def __init__(
self,
equation_system: EquationSystem,
eq_constants: np.ndarray,
initial_masses: List[int],
initial_masses: List[float],
):
initial_masses = np.array(initial_masses, dtype=float)
if min(initial_masses) == 0:
Expand Down Expand Up @@ -85,7 +84,7 @@ def plotter(self):


def eqsolver(
N: np.ndarray, K: np.ndarray, C: np.ndarray, S: List[int], x: float, w: float
N: np.ndarray, K: np.ndarray, C: np.ndarray, S: List[float], x: float, w: float
) -> Tuple[float, float]:
Cx = C * np.exp(x)
W = Cx / np.sum(Cx, axis=1)[:, None]
Expand Down
Loading

0 comments on commit bbb06ab

Please sign in to comment.