numerical/model.py¶
WeatheringMediatedWeakness
¶
Rock weathering & erosion modeling.
-
Python package
viz
VizData
Methods:
-
fit_weakness_vs_time_and_depth_model–Regress a 2d model against experimental data.
-
fit_weakness_vs_time_linear_model–Regress a 1d model against experimental data.
-
weakening_model–Shifted exponential decay weathering model:
Source code in wmbe/numerical/model.py
fit_weakness_vs_time_and_depth_model
¶
Regress a 2d model against experimental data.
Parameters:
-
(data¶DataFrame) –which experimental dataset as key to pandas DataFrame
-
(select¶str) –which computation of weakness from rock strength
Attributes:
-
fdict[data_set]–model surface fit as meshgrid X=wet/dry \(N\), Y=confining pressure \(P\) and corresponding surface Z[X,Y] as list (X,Y,Z)
-
sdict[data_set]–model surface estimates at experimental values as meshgrid X=wet/dry \(N\), Y=confining pressure \(P\) and corresponding surface Z[X,Y] as list (X,Y,Z)
-
w_s2normed_means–mean values of model-normed weakness \(w\)
-
w_s2normed_stds–standard deviations of \(w\)
Source code in wmbe/numerical/model.py
fit_weakness_vs_time_linear_model
¶
fit_weakness_vs_time_linear_model(
data: DataFrame, x_name: str, y_name: str, select: str | None = None
) -> None
Regress a 1d model against experimental data.
Perform a linear regression fit of a linear model to the given experimental data, such as modeling the degree of rock weakness as a linear function of the number of wetting and drying cycles.
Parameters:
-
(data¶DataFrame) –which experimental dataset as key to pandas DataFrame
-
(x_name¶str) –abscissa \(x\)
-
(y_name¶str) –ordinate \(y\)
-
(select¶str | None, default:None) –which computation of weakness from rock strength
Attributes:
-
fdict[data_set](or fdict[selection_name]) –model fit
-
w_s2_means(NDArray) –mean values of weakness \(w\)
-
w_s2_stds(NDArray) –standard deviations of weakness \(w\)
Source code in wmbe/numerical/model.py
weakening_model
staticmethod
¶
Shifted exponential decay weathering model: \(w = 1 + w_0(\tau+\tau_0)\exp(-k\chi)\).
Parameters:
-
(wetdryN_P¶Sequence | NDArray) –pair \((\tau,\chi)\)
-
(k¶float) –reciprocal e-folding scale \(k\)
-
(w0¶float) –magnitude \(w_0\)
-
(tau0¶float) –time offset \(\tau_0\)
Returns:
-
float–weakness \(w\)