Skip to content

Commit

Permalink
updating branch
Browse files Browse the repository at this point in the history
  • Loading branch information
bhargavakula01 committed Dec 12, 2024
1 parent 325ca19 commit 4b9279e
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 6 deletions.
14 changes: 11 additions & 3 deletions lib/enumerations.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class SimulationConstants(Enum):
Grid_Size = 29

class PolymerList(Enum):
Xanthane = (1, 1500)
Schizophyllan = (2 , 1300)
No_Polymer = (3, 0)
Xanthane = (1, 1500, [3.05428284, -0.27294817], [1.15410398e-04, 2.04937780e+00])
Schizophyllan = (2 , 1300, [4.86265534, -0.41570227], [0.03647214, 1.32175949])
No_Polymer = (3, 0, [0,0], [0,0])

@property
def Id(self):
Expand All @@ -32,6 +32,14 @@ def Id(self):
def Density(self):
return self.value[1]

@property
def n_coeff(self):
return self.value[2]

@property
def e_coeff(self):
return self.value[3]


class SurfactantList(Enum):
Alkyl_Ether_Sulfate = 1
Expand Down
6 changes: 3 additions & 3 deletions lib/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ def compvis(self, U, V, X, Y, beta1, c0_array):
wppm = (w1 / (w1 + w2))* (10**6)

#determining the epsilon and n values for the power law equation:
e_coeff = polymer_obj.epsilon_coefficients
n_coeff = polymer_obj.n_coefficients
e_coeff = polymer_obj.e_coeff
n_coeff = polymer_obj.n_coeff

e_power_value = pow((e_coeff[0]*wppm0), e_coeff[1])
n_power_value = min(pow((n_coeff[0]*wppm0), n_coeff[1]))
Expand Down Expand Up @@ -827,7 +827,7 @@ def transport_solver(self):
using explicit formulation (Yuan Yi-Rang 1993) and implicit finite
difference method
"""

pass

def get_gradient(self, vn):
Expand Down
22 changes: 22 additions & 0 deletions tests/test_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@
This file should hold the test cases for the 'simulation.py' class
"""

from lib.simulation import Simulation
from lib.polymer import Polymer
from lib.enumerations import PolymerList

def test_initializing_simulation():
"""
This pytest will initialize the simulation object
This test will generate a simulation object for homogenous porous media,
rectilinear resevoir geometry, with 0 wppm Surfactant and
0.001 wppm injection concentration of Xanthane.
"""

sim_id = 1
polymer_object = Polymer(PolymerList.Xanthane, 0.001, PolymerList.Xanthane.e_coeff, PolymerList.Xanthane.n_coeff)

pass

def test_get_phi_value():
Expand All @@ -18,3 +32,11 @@ def test_initialize_concentration():
def test_compute_viscosity():
pass

def test_compute_resid_saturations():
pass

def test_compute_mobility():
pass

def test_solving_saturation_equations():
pass

0 comments on commit 4b9279e

Please sign in to comment.