Skip to content

Commit

Permalink
updating branch with finished test on the compvis method within the s…
Browse files Browse the repository at this point in the history
…imulation class
  • Loading branch information
bhargavakula01 committed Jan 15, 2025
1 parent bcc6332 commit 7948cb9
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions tests/test_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ def test_compute_viscosity():
This function will test the 'compvis' method within the simulation class
"""
test_sim_object = initializing_simulation()

#setting up mesh
sog = 29 #test value for size of grid
test_sim_object.mesh.m = sog
test_sim_object.mesh.n = sog
test_sim_object.mesh.calculate_spacing

print(test_sim_object.mesh.dx)

####calculating parameters for compvis function:

Expand All @@ -118,21 +126,24 @@ def test_compute_viscosity():

#Determining X and Y:
[x, y] = np.meshgrid(
range(test_sim_object.mesh.left, test_sim_object.mesh.right, round(test_sim_object.mesh.dx)),
range(test_sim_object.mesh.bottom, test_sim_object.mesh.top, round(test_sim_object.mesh.dy)))
np.arange(test_sim_object.mesh.left, test_sim_object.mesh.right + test_sim_object.mesh.dx, test_sim_object.mesh.dx),
np.arange(test_sim_object.mesh.bottom, test_sim_object.mesh.top + test_sim_object.mesh.dy, test_sim_object.mesh.dy))

#Determining beta1:
beta1 = 15000

#Determining c0_array:
sog = 29 #test value for size of grid
test_sim_object.initial_concentration_matrix()
c0_array = test_sim_object.polymer.vec_concentration * np.ones((sog+1, sog + 1))

test_sim_object.compvis(u, v, x, y, beta1, c0_array)



def test_compute_resid_saturations():
"""
This function will test the function that determines that residual saturations
"""
pass

def test_compute_mobility():
Expand All @@ -143,4 +154,4 @@ def test_solving_saturation_equations():


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

0 comments on commit 7948cb9

Please sign in to comment.