Skip to content

[ADDITION] Added a variant of the Herschel Bulkley rheology#317

Open
mthielma wants to merge 9 commits intoJuliaGeodynamics:mainfrom
mthielma:mt/hb_rheology
Open

[ADDITION] Added a variant of the Herschel Bulkley rheology#317
mthielma wants to merge 9 commits intoJuliaGeodynamics:mainfrom
mthielma:mt/hb_rheology

Conversation

@mthielma
Copy link

@mthielma mthielma commented Feb 13, 2026

Whats the purpose of this PR?

  • Bug fix
  • New feature
  • Documentation update
  • Other, please explain

Describe it in more detail below:
Based on Albert's earlier work, I have added a variant of Hershel-Bulkley rheology that is a bit more general than the one in Massmeyer et al. (2013). The rheology is given by:

$$ \eta( \dot{\varepsilon}_{II},T ) = \left( 1.0 - e^{-\frac{2\eta_0\dot{\varepsilon}_{II}}{\tau_0}} \right) \left( \frac{\tau_0}{2\dot{\varepsilon}_{II}} + η_T \left(\frac{\dot{\varepsilon}_{II}}{\dot{\varepsilon}_{r}}\right)^{\frac{1}{n} - 1} \right) $$

where $\eta_T$ is a temperature-dependent reference viscosity at a reference temperature $T_r$ and a reference strain rate $\dot\varepsilon_{r}$:

$$ \eta_T (T) = \eta_r e^{Q\left(T^{-1} - T_r^{-1}\right)} $$

and

$$ \dot{\varepsilon}_{r} = \frac{\tau_0}{2\eta_0} $$

is the reference strain rate at the Bingham yield stress.
This formulation is loosely based on the paper by Souza Mendes and Dutra (2004) and Massmeyer et al. (2013). I have adapted it so that it resembles more the formulations that are used in geodynamics.

This rheology may be useful for lower mantle rheology, but it is also often used to model magma rheology (when the magma contains crystals or bubbles). However, the current implementation does not include the effects of bubbles/crystals etc. on e.g. the yield stress or the power law exponent.

Before going on with this, I would like to get some feedback on the implementation and the formulation. I have not added any tests/documentation yet, but I will do so once everybody is happy with the implementation.

Mendes, P. R. S., & Dutra, E. S. S. (2004). Viscosity Function for Yield-Stress Liquids. Applied Rheology, 14(6), 296–302. https://doi.org/10.1515/arh-2004-0016

Massmeyer, A., Giuseppe, E. D., Davaille, A., Rolf, T., & Tackley, P. J. (2013). Numerical simulation of thermal plumes in a Herschel–Bulkley fluid. Journal of Non-Newtonian Fluid Mechanics, 195, 32–45. https://doi.org/10.1016/j.jnnfm.2012.12.004

Checklist

  • The PR title is descriptive and starts with the appropriate tag: [BUGFIX], [ADDITION], [DOC], etc.
  • New tests were added, or old tests were updated
  • The new feature was added in a way that does not break public API
  • New documentation related to the new feature was added
  • The new code follows the Runic Style

@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 89.13043% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/CreepLaw/HerschelBulkley.jl 91.11% 8 Missing ⚠️
src/Viscosity/Viscosity.jl 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@albert-de-montserrat albert-de-montserrat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Marcel! Looks mostly good to me!

@aelligp
Copy link
Member

aelligp commented Feb 18, 2026

@albert-de-montserrat I think its either fastpow() or @pow but the macro @fastpow doesn't exist in GP that's why the tests fail now

@albert-de-montserrat
Copy link
Member

Ah yes my bad, @fastpow is from a different pkg :D

@mthielma mthielma marked this pull request as ready for review March 23, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants