Contributing
Adding a new rock physics equation
If you want to add a new rock physics equation, e.g., a conductivity mechanism that got out recently and fits with your research or an anelasticity model you want to add, please open an issue/ pull request.
Adding a method is the same for all conductivity, elastic, viscous or anelastic methods, and we follow the example of a conductivity method in the steps below:
Add a new
mutable structsimilar to other definitions insrc/conductivity/types.jlDefine
forwarddispatch insrc/conductivity/forward.jlAdd the constants to be used in
forwarddispatch tosrc/conductivity/cache.jl. It is recommended to look at otherparamsdefined in thecache.jlfile. Adding empirical constants inparamskeeps the codebase cleaner and organized.Define dispatch on
default_paramsinsrc/conductivity/types.jlitself.If required, add other functions in
src/conductivity/utils.jlAdd a new distribution struct in
probabilistic/conductivity.jlsimilar in definition as thestructdefined in step 1.Finally export from the
src/Porosity.jlfile.
It's always a good idea to add some docstring and test for the methods you add.
Adding a new phase mixing method
To add a new phase mixing method, we follow the example of HS1962_plus :
Define a new
mutable structinsrc/mixing_phases.jlDefine the function dispatch
mix_modelinsrc/mixing_phases_core.jlwhich dictates how bulk property can be estimated.Define dispatch on
from_ntwhich basically outputs the object of the same type. This was needed to work things out forMALandGAL.Finally export from the
src/Porosity.jlfile.
Please note that the 2-phase mixing models are different from a more general N-phase mixing model. There isn't much difference when adding a new method except that if it's a multi-phase mixing model, add that to multi_phase_mix_types, which is a union of all types which work on multi_phase_model whereas if it's a two-phase model, add that to two_phase_mix_types.