-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding integration test for PostOpStressState feature
- Loading branch information
1 parent
3d66631
commit a4146ee
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import pytest | ||
from SOSAT import StressState | ||
from SOSAT import PostOpStressState | ||
from SOSAT.constraints import FaultConstraint | ||
from scipy.stats import uniform | ||
|
||
def test_PostOpStressState(): | ||
|
||
# depth in meters | ||
depth = 1228.3 | ||
# density in kg/m^3 | ||
avg_overburden_density = 2580.0 | ||
# pore pressure gradient in MPa/km | ||
pore_pressure_grad = 9.955 | ||
|
||
pore_pressure = pore_pressure_grad * (1.0 / 1000) * depth | ||
|
||
ss = StressState(depth=depth, | ||
avg_overburden_density=avg_overburden_density, | ||
pore_pressure=pore_pressure, | ||
nbins = 50) | ||
|
||
fc = FaultConstraint() | ||
ss.add_constraint(fc) | ||
|
||
gamma_dist = uniform(0.4,(0.6-0.4)) | ||
dP = 15.0 # MPa | ||
postOp_ss = PostOpStressState(ss, gamma_dist, dP) | ||
|
||
postOp_ss.evaluate_posterior() | ||
|
||
sig = postOp_ss.posterior[20,20] | ||
sig == pytest.approx(0.001829) |