Skip to content

Commit

Permalink
made some bug fixes within the methods of the surfactant and simulati…
Browse files Browse the repository at this point in the history
…on classes
  • Loading branch information
bhargavakula01 committed Jan 17, 2025
1 parent a1a1b72 commit 0c84313
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions lib/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ def aqueous_mobility(self):
def aqueous_mobility(self, value):
self._aqueous_mobility_ = value

_IFT_ = 0
@property
def sigma(self): #TODO: Need to update to make sure that i calculate the concentration using the lambda function within the surfactant object
return self._IFT_
# print(type(self.surfactant.vec_concentration))
return self.surfactant.IFT_conc_equ(np.array(self.surfactant.vec_concentration))

@sigma.setter
def sigma(self, value):
self._IFT_ = value
# @sigma.setter
# def sigma(self, value):
# self._IFT_ = value

_is_surfactant_ = None
@property
Expand All @@ -125,7 +125,7 @@ def is_surfactant(self):
This function differentiates whether the model is SP-Flooding or just polymer flooding
"""
if(self._is_surfactant_ is None):
if(self.surfactant.initial_concentration == 0):
if(self.surfactant.concentration == 0):
self._is_surfactant_ = False
else:
self._is_surfactant_ = True
Expand Down
2 changes: 1 addition & 1 deletion lib/surfactant.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self, name, initial_concentration, IFT_conc_equ, vec_concentration
:param name: Name of the surfactant
:type name: enum 'SurfactantList'
:param concentration: Concentration in wppm of surfactant
:param concentration: Initial concentration in wppm of surfactant (scalar quantity)
:type concentration: float
:param IFT_conc_equ: expression that relates surfactant concentration to interfacial tension b/t oil and water
Expand Down
2 changes: 1 addition & 1 deletion tests/test_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ def initializing_simulation():
mesh_grid= mesh_grid,
mdl_id= mdl_type,
plt_type= plot_type,
is_surfactant= is_surfactant
)

return sim_obj_test
Expand Down Expand Up @@ -153,6 +152,7 @@ def test_compute_resid_saturations():
v = u

# Need to implement method to calculate sigma (using the IFT vs surfactant concentration relationship)
test_sim_object.initial_concentration_matrix()
test_sim_object.compres(u, v)

pass
Expand Down

0 comments on commit 0c84313

Please sign in to comment.