Exemple #1
0
def test_constructor():
    ss = StressState(1.0,
                     2.5,
                     0.3,
                     depth_unit='km',
                     density_unit='g/cm^3',
                     pressure_unit='MPa')

    sigv = ss.vertical_stress
    sigv == pytest.approx(24.525)
Exemple #2
0
    a, b = '{:.2e}'.format(x).split('e')
    b = int(b)
    return r'${} \times 10^{{{}}}$'.format(a, b)


# 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)
Exemple #3
0
# vertical stress calculated from integration of density log
sigV = 1.140307 * units('psi/ft') * depth

g = 9.81 * units('m/s^2')

# equivalent average density
# density in kg/m^3
avg_overburden_density = (sigV / (g * depth)).to('kg/m^3')

pore_pressure = 1955.0 * units('psi')
print("pore_pressure= ", pore_pressure)
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,
    nbins=800,
    depth_unit='ft',
    density_unit='lb/ft^3',
    pressure_unit='psi',
    stress_unit='psi')
# friction_mu = 0.7
# friction_std = 0.15
# mudist = lognorm(scale=friction_mu,
#                  s=friction_std)
# fc = FaultConstraint(mudist)
mudist = uniform(0.6, scale=1.0e-12)
fc = FaultConstraint(mudist)
ss.add_constraint(fc)

fig = ss.plot_posterior()
plt.savefig("fault_constraint_posterior.png")
Exemple #4
0
import matplotlib.pyplot as plt

from SOSAT import StressState
from SOSAT.constraints import FaultConstraint

# 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)
# friction_mu = 0.7
# friction_std = 0.15
# mudist = lognorm(scale=friction_mu,
#                 s=friction_std)
# fc = FaultConstraint(mudist)
fc = FaultConstraint()

ss.add_constraint(fc)

fig = plt.figure()
ax = fig.add_subplot(111)

shmin, pshmin = ss.get_shmin_marginal()
ax.plot(shmin, pshmin, "k")
Exemple #5
0
units = pint.UnitRegistry()

# depth in feet
depth = 8520.0 * units('ft')
# density in kg/m^3
avg_overburden_density = 2601.27615 * units('kg/m^3')
# pore pressure gradient in MPa/km
pore_pressure_grad = 9.72686 * units('MPa/km')

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