Skip to content

Commit

Permalink
add docs for compute viscosity functions (#120)
Browse files Browse the repository at this point in the history
* add docs for compute viscosity functions

* fix typos and add viscosity.md

* merci spellchecker!

* add to make.jl
  • Loading branch information
tduretz authored Oct 19, 2023
1 parent b0c434d commit ca4b5af
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ makedocs(;
"Density" => "man/density.md",
"Creep laws" => "man/creeplaws.md",
"Custom rheology" => "man/customrheology.md",
"Viscosity" => "man/viscosity.md",
"Elasticity" => "man/elasticity.md",
"Plasticity" => "man/plasticity.md",
"Heat Capacity" => "man/heatcapacity.md",
Expand Down
4 changes: 2 additions & 2 deletions docs/src/man/plasticity.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Plasticity

Plasticity is a non;linear rheology bthat is actrivated once stresses exceed a certain yield criteria.
# Implemented laws
Plasticity is a non-linear rheology that is activated once stresses exceed a certain yield criteria.
# Implemented laws
The following plastic law are implemented:
```@docs
GeoParams.MaterialParameters.Plasticity.DruckerPrager
Expand Down
6 changes: 6 additions & 0 deletions docs/src/man/viscosity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Effective viscosity computations

```@docs
GeoParams.compute_viscosity_εII
GeoParams.compute_viscosity_τII
```
10 changes: 10 additions & 0 deletions src/Viscosity/Viscosity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ export compute_viscosity_εII,
@inline _viscosity(τII, εII) = τII / (2 * εII)

# compute effective "creep" viscosity from strain rate tensor
"""
compute_viscosity_εII(s::AbstractConstitutiveLaw, εII, kwargs...)
Compute effective viscosity given a 2nd invariant of the deviatoric strain rate tensor, extra parameters are passed as a named tuple, e.g., (;T=T)
"""
@inline function compute_viscosity_εII(v::AbstractConstitutiveLaw, εII, args)

τII = compute_τII(v, εII, args)
Expand All @@ -18,6 +23,11 @@ export compute_viscosity_εII,
end

# compute effective "creep" viscosity from deviatoric stress tensor
"""
compute_viscosity_τII(s::AbstractConstitutiveLaw, τII, kwargs...)
Compute effective viscosity given a 2nd invariant of the deviatoric stress tensor and, extra parameters are passed as a named tuple, e.g., (;T=T)
"""
@inline function compute_viscosity_τII(v::AbstractConstitutiveLaw, τII, args)

εII = compute_εII(v, τII, args)
Expand Down

0 comments on commit ca4b5af

Please sign in to comment.