Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
656de42
adjusting format for the ```Simulation``` class docstrings
bhargavakula01 Mar 5, 2026
278e12d
applying some changes from the water-class-debugging
bhargavakula01 Mar 6, 2026
fc0e9d7
another change with saturation matrix calcs
bhargavakula01 Mar 8, 2026
eea8496
continuing to add docstrings
bhargavakula01 Mar 11, 2026
fad121e
completed the docstrings for the ```simulation.py```
bhargavakula01 Mar 13, 2026
bb22eb8
completed the docstrings for ```water.py```
bhargavakula01 Mar 14, 2026
3df84f2
implemented docstrings for the ```polymer.py``` file
bhargavakula01 Mar 14, 2026
fb8e8f7
adding the header for the ```grid.py``` file and making some formatin…
bhargavakula01 Mar 14, 2026
64e875e
added docstrings for the ```surfactant.py```
bhargavakula01 Mar 17, 2026
553f79b
updated the docstrings on ```Grid.py```
bhargavakula01 Mar 17, 2026
dfd81bd
adjusted formating for docstrings to align better with pdocs document…
bhargavakula01 Mar 17, 2026
ea0a97a
syncing branch
bhargavakula01 Mar 17, 2026
b43b3fb
adding getters and setters into classes to improve formating of docum…
bhargavakula01 Mar 22, 2026
cad0456
updated the documentation in the surfactant, water, and enumeration f…
bhargavakula01 Mar 22, 2026
ddd8768
updated docstrings for the simulation class and generated a docs/ fol…
bhargavakula01 Mar 23, 2026
fede9a4
commented this code to be able to generate the documentation
bhargavakula01 Mar 23, 2026
d871f82
added some documentation to grid.py. Also ended up deleting the ```se…
bhargavakula01 Mar 25, 2026
fde8e4b
updating the requirements.txt for version 1.0.0
bhargavakula01 Apr 4, 2026
cf9432a
reverted from using variable sar to swr in water.py (will switch it o…
bhargavakula01 Apr 5, 2026
88751d5
fixed issue with simulation not running due to variable ``sar``
bhargavakula01 Apr 5, 2026
90a9cf9
removed homogenous setting in gui.py and updated the documentations page
bhargavakula01 Apr 5, 2026
aa43b5c
added exported function to run method
bhargavakula01 Apr 5, 2026
b71be55
updated documentation page
bhargavakula01 Apr 5, 2026
9d2e8f2
fixed issue with writing to COC, ProdRate, and CROIP
bhargavakula01 Apr 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=./lib.html"/>
</head>
</html>
265 changes: 265 additions & 0 deletions docs/lib.html

Large diffs are not rendered by default.

567 changes: 567 additions & 0 deletions docs/lib/Exceptions.html

Large diffs are not rendered by default.

1,533 changes: 1,533 additions & 0 deletions docs/lib/enumerations.html

Large diffs are not rendered by default.

2,862 changes: 2,862 additions & 0 deletions docs/lib/grid.html

Large diffs are not rendered by default.

2,189 changes: 2,189 additions & 0 deletions docs/lib/polymer.html

Large diffs are not rendered by default.

4,132 changes: 4,132 additions & 0 deletions docs/lib/simulation.html

Large diffs are not rendered by default.

1,491 changes: 1,491 additions & 0 deletions docs/lib/surfactant.html

Large diffs are not rendered by default.

301 changes: 301 additions & 0 deletions docs/lib/test.html

Large diffs are not rendered by default.

3,708 changes: 3,708 additions & 0 deletions docs/lib/water.html

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions docs/search.js

Large diffs are not rendered by default.

55 changes: 33 additions & 22 deletions lib/Exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,23 @@ class OutOfRangeError(Exception):
"""Exception raised for errors in the input if it is out of range."""

def __init__(self, value, message="Value is out of the allowed range."):
self.value = value
self.message = message
"""
Args:
-----
value (float): value that the user provided in GUI
message (str): Error message
"""
self._value = value
self._message = message
super().__init__(self.message)

def __str__(self):
"""
:return: Returns the error message
:rtype: str
Returns: (str)
--------------
Returns the error message
"""
return f"{self.value} -> {self.message}"
return f"{self._value} -> {self._message}"


class SimulationCalcInputException(Exception):
Expand All @@ -22,18 +29,22 @@ class SimulationCalcInputException(Exception):
def __init__(self, message):
"""
constructor exception object

:param message: takes in the error message
:type message: str

Args:
-----
message (str): takes in the error message
"""
self.message = message
self._message = message

def __str__(self):
"""
:return: Returns the error message
:rtype: str
Returns: (str)
--------------
Returns the error message
"""
return self.message
return self._message




class UserInputException(Exception):
Expand All @@ -45,19 +56,19 @@ def __init__(self, message: str, inputs: dict | None = None):
"""
Initialize the exception with a message and optional input dictionary.

:param message: Description of the validation error.
:type message: str

:param inputs: Dictionary of user inputs (optional).
:type inputs: dict, None
Args:
-----
message (str): Description of the validation error.
inputs (dict, None): Dictionary of user inputs (optional).
"""
super().__init__(message)
self.message = message
self.user_inputs = inputs or {}
self._message = message
self._user_inputs = inputs or {}

def __str__(self):
"""
:return: Returns the error message
:rtype: str
Returns: (str)
--------------
Returns the error message
"""
return f"UserInputException: {self.message}"
return f"UserInputException: {self._message}"
27 changes: 27 additions & 0 deletions lib/enumerations.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,37 @@ class PolymerList(Enum):

@property
def Id(self):
"""
Id (int): Index for Polymer
"""
return self.value[0]

@property
def Density(self): # kg/m^3
"""
Density (float): density of the Polymer
"""
return self.value[1]

@property
def n_coeff(self): # dimensionless
"""
n_coeff (list[float]): 'n' coeffient for the empirical power law equation
"""
return self.value[2]

@property
def e_coeff(self): # dimensionless
"""
e_coeff (list[float]): 'ε' coeffient for the empirical power law equation
"""
return self.value[3]

@classmethod
def get_by_value(cls, value):
"""
retrieves Polymer from enumeration based on value
"""
member = next((member for member in cls if member.value[0] == value), None)
return member

Expand All @@ -98,18 +113,30 @@ class SurfactantList(Enum):

@property
def Id(self):
"""
Id (int): Index for Polymer
"""
return self.value[0]

@property
def IFT_equation(self):
"""
IFT_equation (lambda): the relationship between surfactant concentration and interfacial tension
"""
return self.value[1]

@property
def derivative_IFT_equation(self):
"""
derivative_IFT_equation (lambda): the derivative of the IFT_equation
"""
return self.value[2]

@classmethod
def get_by_value(cls, value):
"""
retrieves Surfactant from enumeration based on value
"""
member = next((member for member in cls if member.value[0] == value), None)
return member

Expand Down
Loading
Loading