Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

same model setup in UW2 and UWGeo but different outputs in fault patterns #705

Open
YangHaibin1102 opened this issue Oct 29, 2024 · 2 comments

Comments

@YangHaibin1102
Copy link

Hi Julian,
Here are the codes that set the model with same paramters and same solver, same precisions, but have different fault patterns.
Can you help check this issue?

Note that, as I set gaussian points in UW2, you have to set gaussian points for swarm in UWGeo as well. I manually change the default setup in my docker environment for UWGeo (in UWGeo you cannot change the default swarm distribution in the python interface). However, as I see it is not the particle distribution that affect the final results, it may be ok to let it be there.
Extension_debug.zip

this is the plastic strain from UW2 after 2Ma. Faults tend to dip to left side of the model in UW2.
image

the one from UWGeo after 2Ma.
image

The maximum plasticstrain strain at the same time running in UW2 and UWGeo is quite different.

Cheers,

Haibin

@NengLu
Copy link

NengLu commented Oct 30, 2024

No idea about this, but you may reset the swarms from the python interface like:

from underworld.swarm import Swarm
from collections import OrderedDict
Model.swarm_variables = OrderedDict()
Model.swarm = Swarm(mesh=Model.mesh, particleEscape=True)
Model.swarm.allow_parallel_nn = True
# or other layout method
Model._swarmLayout = uw.swarm.layouts.PerCellSpaceFillerLayout(swarm=Model.swarm,
    particlesPerCell=particlesPerCell)
Model.swarm.populate_using_layout(layout=Model._swarmLayout)
Model._initialize()

@tiannh7
Copy link

tiannh7 commented Oct 30, 2024

Hi Haibin,

It looks like the problem you're experiencing is due to the _cohesionFn function in UWGeodynamics/_rheology.py missing the epsilon1 and epsilon2 parameters. As a result, the cohesion doesn't vary with plastic strain and remains constant, which is certainly not the intended behavior.

To fix this, you can adjust the _cohesionFn so it correctly applies linear cohesion weakening based on accumulated plastic strain. The weakening parameters epsilon1 and epsilon2 should be passed into the function, and the cohesion should be updated accordingly.

Here’s a quick fix to add the missing parameters to _cohesionFn:

def _cohesionFn(self):
    if self.plasticStrain:
        cohesion = self.cohesionWeakeningFn(
            self.plasticStrain,
            Cohesion=nd(self.cohesion),
            CohesionSw=nd(self.cohesionAfterSoftening),
            epsilon1=self.epsilon1,  # Add epsilon1
            epsilon2=self.epsilon2   # Add epsilon2
        )
    else:
        cohesion = fn.misc.constant(self.cohesion)
    return cohesion

Additionally, I noticed that _frictionFn currently returns:

friction = fn.math.atan(nd(self.frictionCoefficient))

In your uw2 file, you're not using atan for the friction coefficient. This may not cause a significant issue, but it's worth double-checking your friction weakening implementation to ensure it's working as expected.

Ninghui,

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

No branches or pull requests

3 participants