Repository navigation
Conversation
The TransverseIsotropicFlowModel docstring printed the anisotropic correction with a + sign and repeated the n_i n_l delta_jk term (the first should be n_i n_k delta_jl). _build_c_tensor computes C = 2 eta_0 I - 2 (eta_0 - eta_1) Lambda, which is correct. The docstring now states eta_ijkl = eta_0 I - (eta_0 - eta_1) Lambda with tau = 2 eta : edot (Moresi & Muhlhaus 2006). Same correction in docs/advanced/vep-transverse-isotropy-faults.md (factor-of-2 inconsistency between the eta_0 and Lambda terms) and in the shear_box_2d_fault example (+ sign). The I_ijkl printed in Ex_Anisotropy and Ex_ConstitutiveTensors had the wrong index pairing. New test_0611 pins the sign: pure plane shear gives tau_nt = 2 eta_1 edot_nt exactly, and a deviatoric stretch normal to the plane sees only eta_0, in 2D and 3D with off-axis directors. No code change. Underworld development team with AI support from Claude Code
10 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
TransverseIsotropicFlowModeldocstring printed the viscosity tensor with two errors._build_c_tensoris correct and is unchanged.C = 2 eta_0 I - 2 (eta_0 - eta_1) Lambda. The docstring had+, which would make the plane stiffer than the bulk.n_i n_l delta_jkappeared twice. The first should ben_i n_k delta_jl.The docstring now gives (Moresi & Muhlhaus 2006):
It also states that
viscous_model.cholds2 eta_ijkl. The old text wrotetau = eta : edot, which is off by that factor of 2.Other places that quoted the formula:
docs/advanced/vep-transverse-isotropy-faults.mdgave2 eta_0 I - (eta_0 - eta_1) Lambda, so the two terms were off by a factor of 2 from each other. It now uses the same form as the docstring, withsigma = 2 eta : edot.docs/examples/fluid_mechanics/intermediate/shear_box_2d_fault.pythe correction had a+sign. Changed to-.Ex_Anisotropy.pyandEx_ConstitutiveTensors.pyprintedI_ijkl = 1/2(d_ij d_kj + d_kl d_il), which pairs the wrong indices. Changed tod_ik d_jl + d_il d_jk. This is the identity tensor rather than the TI formula, but it is a one-line fix to a formula in the same section.TransverseIsotropicVEPFlowModeldocstring doesn't quote the formula, so it is unchanged.New
tests/test_0611_transverse_isotropic_tensor.py(level_1,tier_b) contracts the model'sctensor with exact symbolic strain rates, using off-axis directors in 2D and 3D:tau = 2 eta_1 edot, sotau_nt = 2 eta_1 edot_nt(this pins the sign);tau = 2 eta_0 edot.Checklist (UW3 Style Charter — docs/developer/UW3_STYLE_CHARTER.md)
level_*andtier_*markers (S8). The algebra was checked in standalone sympy: the code's sign passes both tests and the old docstring's+fails the shear test. This test has not been run against an installed build. The session container had no pixi or PETSc, so CI is the first real run..array/mesh.X.coords(S7). N/Apixi.toml/pixi.lockchangesNoticed but not changed:
constitutive_models.py:2136raisesSyntaxWarning: invalid escape sequence '\p'(a docstring that isn't a raw string). It is already ondevelopment.Underworld development team with AI support from Claude Code
Generated by Claude Code