RPTs Notebook: Fluid Substitution Model
Gassmann fluid substitution step by step: predict how Vp, Vs and density change when brine is replaced by gas or oil, with plots of the effect.
Preview what's inside
- 1. Title & Introduction
- Fluid Substitution Model Using Gassmann's Equation
- 2. Import Required Libraries
- 3. Define the Gassmann Fluid Substitution Function
- 4. Implement Gassmann’s Fluid Substitution Function
- 5. Generate Example Input Data
- 6. Define Input Parameters & Run Fluid Substitution
- 7. Visualize Results
- 8. Plot the Changes in Rock Properties
- 9. Summary & Conclusions
# Define rock & fluid properties
vp1 = 3500 # Initial P-wave velocity (m/s)
vs1 = 2000 # Initial S-wave velocity (m/s)
ro1 = 2.35 # Initial bulk density (g/cc)
phi = 0.2 # Porosity (20%)
k0 = 36 # Mineral bulk modulus (GPa)
# Initial fluid: Brine
rofl1 = 1.1 # Brine density (g/cc)
kfl1 = 2.5 # Brine bulk modulus (GPa)
# New fluid: Gas
rofl2 = 0.2 # Gas density (g/cc)
kfl2 = 0.1 # Gas bulk modulus (GPa)
# Apply Gassmann fluid substitution
vp2, vs2, ro2 = gassmnv(vp1, vs1, ro1, rofl1, kfl1, rofl2, kfl2, k0, phi)
# Display results
print(f"Old Vp: {vp1:.2f} m/s |", f"New Vp: {vp2:.2f} m/s")
# ...
RPTs Notebook: Vp Template for Overpressured Shale
Builds the full overpressured-shale Vp template on a 3 m grid: Traugott density, overburden, temperature, Beta function, Dutta porosity and Issler Vp for hydrostatic to 17 ppg, then compares it with seismic Vp.
Preview what's inside
- 1. Introduction
- Vp Template of Overpressured Shale: Calculation Based on Different Pore Pressure Gradients
- 2. Generate example seismic vp data
- 3. Define Depth and Environmental Properties
- 4. Density Trend Calculation
- 5. Overburden Stress Calculation
- 6. Temperature Profile
- 7. Geologic Age Estimation
- 8. Beta Function Calculation
- 9. Pore Pressure and Effective Stress Template Estimation
- 10. Converting Effective Stress to Porosity
- 11. Estimating Vp from Porosity
- 12. Compare Computed Vp Template with Seismic Vp
- Summary
# Traugott equation parameters
rosfl = 1.8
a = 0.35
b = 0.25
c = 3125
# Compute density trend
ro = rosfl + a * (zbml * 3.2808 / c) ** b
# Plot Density Trend
plt.figure()
plt.plot(ro, zbml)
plt.xlabel('Density (g/cc)')
plt.ylabel('Depth BML (m)')
plt.axis([1, 3, -300, 8300])
plt.gca().invert_yaxis()
plt.title('Density Trend vs Depth')
plt.show()
RPTs Notebook: Using DNN for Pore Pressure Prediction
A TensorFlow/Keras DNN that predicts pore pressure from depth, seismic Vp and temperature: data prep, standardization, training and back-scaling.
Preview what's inside
- 1. Import required libraries
- 2. Define Example Input Data
- 3. Data Standardization
- 4. Build and Train the DNN Model
- 5. Make Predictions and Convert to Original Scale
- 6. Key Takeaways
# Select features and target variable
X = df[['Depth', 'SeisVp', 'Temperature']].values # Feature matrix
y = df['PorePressure'].values # Target variable
# Standardizing features
X_mean, X_std = X.mean(axis=0), X.std(axis=0)
X_standardized = (X - X_mean) / X_std
# Standardizing target
y_mean, y_std = y.mean(), y.std()
y_standardized = (y - y_mean) / y_std
# Check standardized data
print("Feature mean after standardization:", X_standardized.mean(axis=0))
print("Feature std after standardization:", X_standardized.std(axis=0))
RPTs Notebook: Vp Template for Brine Sand
Computes the brine-sand Vp template from scratch: Athy porosity trend, Reuss/Voigt/Hill mixing for 0–100% clay and the RHG equation, with plots.
Preview what's inside
- Introduction
- 1. Import Required Libraries
- 2. Define Rock Physics Parameters
- 3. Compute Porosity Using Athy’s Equation
- 4. Define Vclay Range
- 5.Compute Bulk & Shear Modulus Using Mixing Laws
- 6. Compute Solid Phase Density and Vp
- 7. Visualizing Bulk and Shear Moduli Trends
- 8. Compute Vp Using RHG Equation
- 9. Plot Porosity vs Depth
- 10. Plot Vp vs Depth
- Summary
# Bulk and shear moduli (GPa) and density (g/cc) of minerals
k1, g1, d1 = 36.6, 45, 2.65 # Quartz
k2, g2, d2 = 21, 7, 2.58 # Clay
kf, rhof = 2.6891, 1.05 # Water properties
# Define depth range (Below Mud Line, BML)
zbml = np.arange(0, 8000, 1)
# Water depth and density
wd = 100 # Sea water depth (m)
row = 1.03 # Sea water density (g/cc)
📥 How to Open Jupyter Notebooks on iPhone & iPad
Most of our premium downloads are Jupyter Notebook (.ipynb) files. If you want to run them on your iPhone or iPad, use the free Carnets - Jupyter app.
📌 Steps:
- Download Carnets - Jupyter from the App Store.
- Download the notebook file (.ipynb) from this page.
- Locate the file in your Files app, then select “Share” → “Open in Carnets”.
- Start running your notebook on your iPhone or iPad!
Carnets lets you run Jupyter Notebooks offline with full Python support!
📥 How to Open Jupyter Notebooks on Google Colab
You can also use Google Colab, a free online platform to run notebooks instantly.
📌 Steps:
- Go to Google Colab.
- Click "File" → "Upload Notebook" and select your
.ipynbfile. - Or, open from Google Drive under "File" → "Open Notebook" → "Google Drive".
- Start running your notebook online!
Google Colab requires no installation and offers free GPU/TPU access!