Skip to content

Commit

Permalink
fixing syntax bug with initializing concentration matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
bhargavakula01 committed Dec 22, 2024
1 parent 40a85e0 commit 8e84a51
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def initial_concentration_matrix(self):
try:
if(self.polymer is not None and self.surfactant is not None and self.water_saturation is not None):
s_0 = self.init_water_saturation_scalar
c_0 = self.polymer.concentration
c_0 = self.polymer.initial_concentration
g_0 = self.surfactant.concentration
self.water_saturation = np.zeros((self.mesh.m + 1, self.mesh.n + 1))
self.polymer.vec_concentration = np.copy(self.water_saturation)
Expand Down
13 changes: 12 additions & 1 deletion tests/test_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,18 @@ def test_get_phi_value():


def test_initialize_concentration():
"""
This function will be use test the initialization of surfactant and polymer concentrations
at the injection site
"""
#intializing simulation object
test_sim_object = initializing_simulation()

#determining intial concentration matrix
concentration_matrix = test_sim_object.initial_concentration_matrix()

print(concentration_matrix)

pass

def test_compute_viscosity():
Expand All @@ -106,4 +117,4 @@ def test_solving_saturation_equations():


if __name__ == "__main__":
test_get_phi_value()
test_initialize_concentration()

0 comments on commit 8e84a51

Please sign in to comment.