kmaterna / Strain_2D

Strain rate modeling from GNSS velocity fields
MIT License
44 stars 19 forks source link

Bug in max shear strain rate calculation #16

Closed jlmaurer closed 2 years ago

jlmaurer commented 2 years ago

Hey @kmaterna I introduced a bug in the max shear strain rate code by propagating a bug from my last code. The current syntax is

(1) tau{max} = sqrt((e{11}-e{22})^2 + e{12}^2)

but after some extensive work with Kaj Johnson we figured out that the formula should actually be

(2) tau{max} = sqrt((e{11}-e{22})^2 + *4e{12}**^2).

The factor of 4 is missing from the current formulation. It can make a difference of a factor of 1-2 depending on the tensor.

The way we worked this out was to analytically calculate the principal strains and take the difference. Max shear strain rate is just the difference between e1 and e2. Solving for the eigenvalues of the strain rate tensor and taking the difference results in Eq. 2 above.

See here for line in question.

kmaterna commented 2 years ago

Thanks, change is made in https://github.com/kmaterna/Strain_2D/commit/28a9201eeddba071009d84baee312a0f4501f155

kmaterna commented 2 years ago

@jlmaurer awesome. This fix is supported by Savage and Simpson 1997 Equation 2. They have tau_max exactly as you and Kaj suggested.