Exemple #1
0

# 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)
fc = FaultConstraint()
ss.add_constraint(fc)

smc = StressMeasurement(shmin_dist=uniform(loc=25.0,
                                           scale=5.0))

ss.add_constraint(smc)

fig = ss.plot_posterior()
plt.savefig("faulting_stress_measurement_constraint_posterior.png")

# generate samples
sampler = RejectionSampler(ss)
Nsamples = int(1e6)
shmin, shmax, sv = sampler.GenerateSamples(Nsamples)

assert len(shmin) == Nsamples
Exemple #2
0
from SOSAT import StressState
from SOSAT.constraints import FaultingRegimeConstraint
from SOSAT.constraints import SU

# 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)

frc = FaultingRegimeConstraint(
    SU(w_NF=100.0,
       w_SS=50.0,
       w_TF=5.0,
       theta1=np.sqrt(2.0) * 0.5,
       k1=300.0,
       theta2=-np.sqrt(2.0) * 0.5,
       k2=300.0))

ss.add_constraint(frc)

fig = ss.plot_posterior()
plt.savefig("fault_regime_constraint_posterior.png")
Exemple #3
0
tensile_strength_dist = weibull_min(c=1.1)

ts = np.linspace(0.0, 10.0, 500)
pts = tensile_strength_dist.pdf(ts)
ts_fig = plt.figure()
ax_ts = ts_fig.add_subplot(111)
ax_ts.plot(ts, pts, "k")
ax_ts.set_xlabel("MinimumTensile Strength (MPa)")
ax_ts.set_ylabel("Probability Density")
ts_fig.savefig("Tensile_Strength_PDF.png")

mud_pressure_dist = uniform(loc=17.32, scale=(19.32 - 17.32))
mud_temperature_dist = uniform(loc=35.0, scale=(50.0 - 35.0))
formation_temperature = 30.7
# YM in MPa, so 19,000 MPa = 19 GPa
YM = 19.0e3
PR = 0.25
CTE = 2.4e-6
DITFc = DITFConstraint(DITF_exists=False,
                       mud_pressure_dist=mud_pressure_dist,
                       mud_temperature_dist=mud_temperature_dist,
                       tensile_strength_dist=tensile_strength_dist,
                       formation_temperature=formation_temperature,
                       YM=YM,
                       PR=PR,
                       CTE=CTE,
                       pressure_unit='MPa')
ss.add_constraint(DITFc)
fig = ss.plot_posterior()
plt.savefig("DITF_constraint_posterior.png")
C_ul = 35.0
UCS_ll = C_ll * np.cos(phi) / (1.0 - np.sin(phi))
UCS_ul = C_ul * np.cos(phi) / (1.0 - np.sin(phi))
UCS_dist = uniform(loc=UCS_ll, scale=(UCS_ul - UCS_ll))

# this makes the friction angle deterministic, by essentiall
# making it a Dirac Delta pdf
friction_angle_dist = uniform(loc=phi, scale=0.0)

mud_pressure_dist = uniform(loc=16.32, scale=(17.32 - 16.32))
mud_temperature_dist = uniform(loc=35.0, scale=(50.0 - 35.0))
formation_temperature = 30.7
# YM in MPa, so 19,000 MPa = 19 GPa
YM = 19.0e3
PR = 0.25
CTE = 2.4e-6
bc = BreakoutConstraint(breakout_exists=False,
                        UCS_dist=UCS_dist,
                        rock_friction_angle_dist=friction_angle_dist,
                        rock_friction_angle_units='radians',
                        mud_pressure_dist=mud_pressure_dist,
                        mud_temperature_dist=mud_temperature_dist,
                        formation_temperature=formation_temperature,
                        YM=YM,
                        PR=PR,
                        CTE=CTE,
                        pressure_unit='MPa')
ss.add_constraint(bc)
fig = ss.plot_posterior()
plt.savefig("breakout_constraint_posterior.png")
Exemple #5
0
pore_pressure = pore_pressure_grad * depth

ss = StressState(depth=depth.to('ft').magnitude,
                 avg_overburden_density=avg_overburden_density
                               .to('lb/ft^3').magnitude,
                 pore_pressure=pore_pressure.to('psi').magnitude,
                 depth_unit='ft',
                 density_unit='lb/ft^3',
                 pressure_unit='psi',
                 stress_unit='psi')


meas_shmin_ul = (0.62 * units('psi/ft')
                        * depth) \
                        .to('psi').magnitude
meas_shmin_ll = meas_shmin_ul - 500.0
meas_shmin_dist = uniform(meas_shmin_ll,
                          scale=(meas_shmin_ul
                                 - meas_shmin_ll))
ss.add_constraint(
         StressMeasurement(meas_shmin_dist))

# ss.add_constraint(FaultConstraint())
fig = ss.plot_posterior()
plt.savefig("stress_measurement_constraint_posterior.png")

shmin_ll, shmin_ul = ss.get_shmin_confidence_intervals(0.99)
print("smin_ll= ", shmin_ll)
print("smin_ul= ", shmin_ul)