idaholab / moose

Multiphysics Object Oriented Simulation Environment
https://www.mooseframework.org
GNU Lesser General Public License v2.1
1.62k stars 1.01k forks source link

Dynamic Rupture Earthquake Simulation Using Cohesive Zone Model and Slip Weakening Friction Law #24433

Open chunhuizhao478 opened 1 year ago

chunhuizhao478 commented 1 year ago

Closes #24642

chunhuizhao478 commented 1 year ago

Hello!

I did a quick first pass. The application is definitely interesting Who is your contact at INL (if any)? In order to organize further review.

Hello! Thanks for your reply, I will look into them today. I'm at INL as intern right now, my contact is Robert Podgorney, I have talked with one of reviewers (jiangwen) yesterday.

GiudGiud commented 1 year ago

Ok great! I ll let them take over the review process for now. This is a strong start to adding this.

Should it be an example in the tensor mechanics module?

chunhuizhao478 commented 1 year ago

Ok great! I ll let them take over the review process for now. This is a strong start to adding this.

Should it be an example in the tensor mechanics module?

Thanks! I think I have added two examples 2D_slipweakening, 3D_slipweakening in tensor_mechanics/test/tests/.

GiudGiud commented 1 year ago

I saw the inputs. There is just a slight nuance between tests and examples. Examples are easier to highlight in the documentation.

chunhuizhao478 commented 1 year ago

I saw the inputs. There is just a slight nuance between tests and examples. Examples are easier to highlight in the documentation.

I see. So you would recommend I move them to examples?

GiudGiud commented 1 year ago

I ll let you work with Rob and Wen to determine that

hugary1995 commented 1 year ago

Well Robert will have to make a decision, but my suggestion is to put this in MASTODON or BLACKBEAR.

chunhuizhao478 commented 1 year ago

Well Robert will have to make a decision, but my suggestion is to put this in MASTODON or BLACKBEAR.

Thanks. So Cody arranged a meeting last week, people eventually agree to move the code in TensorMechanics

hugary1995 commented 1 year ago

In that case, I second @GiudGiud 's suggestion -- please don't hard code numbers.

hugary1995 commented 1 year ago

This PR probably needs some more work and review. But this is definitely an interesting capability!

chunhuizhao478 commented 1 year ago

This PR probably needs some more work and review. But this is definitely an interesting capability!

Thanks! I will definitely take the comments seriously and discuss with framework people if needed

chunhuizhao478 commented 12 months ago

Let s remove the merge commit and rebase instead

Sorry I'm new to this, how should I remove the merge commit and rebase? I try the following: git log --merges --oneline, find the [number] of second merge commit and do: git rebase -I [that number].

I'm not sure whether it's still there or not

GiudGiud commented 12 months ago

git rebase -i HEAD~3 then delete the merge commit (replace pick by d) then git fetch origin git rebase origin/devel (and deal with any conflict commit by commit, which is the nice part of rebasing)

GiudGiud commented 12 months ago

ok then dont do it that way

git reset --hard 38c002ffaa70ba4d4667c75b9dd6557c4b203b36 git cherry-pick e6892185989462a038c0440a503ebbeaf3267e46 git cherry-pick 129c0df4ca8675dd8599b9d5dd54f6b6efd875e9 git rebase origin/devel

chunhuizhao478 commented 12 months ago

ok then dont do it that way

git reset --hard 38c002f git cherry-pick e689218 git cherry-pick 129c0df git rebase origin/devel

I tried this, but then it will have multiple pull and push commits, how should I deal with that?

GiudGiud commented 12 months ago

what do you mean push and pull commits?

chunhuizhao478 commented 12 months ago

what do you mean push and pull commits?

okay, I switched to slipweakening branch, now it's fine

chunhuizhao478 commented 11 months ago

Hi Guid, if you have time, could you please address the unresolved comments again? I'm working on the documentation, so which folder should I put the whole document in? And for each added object, I should have a separate documentation? @GiudGiud

moosebuild commented 11 months ago

Job Documentation on 403683d wanted to post the following:

View the site here

This comment will be updated on new commits.

moosebuild commented 11 months ago

Job Coverage on 403683d wanted to post the following:

Framework coverage

Coverage did not change

Modules coverage

Tensor mechanics

dcbdc8 #24433 403683
Total Total +/- New
Rate 84.63% 84.71% +0.08% 97.88%
Hits 25763 25948 +185 185
Misses 4679 4683 +4 4

Diff coverage report

Full coverage report

Full coverage reports

Reports - [`framework`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/framework) - [`chemical_reactions`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/chemical_reactions) - [`combined`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/combined) - [`contact`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/contact) - [`electromagnetics`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/electromagnetics) - [`external_petsc_solver`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/external_petsc_solver) - [`fluid_properties`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/fluid_properties) - [`fsi`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/fsi) - [`functional_expansion_tools`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/functional_expansion_tools) - [`geochemistry`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/geochemistry) - [`heat_conduction`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/heat_conduction) - [`level_set`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/level_set) - [`misc`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/misc) - [`navier_stokes`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/navier_stokes) - [`optimization`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/optimization) - [`peridynamics`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/peridynamics) - [`phase_field`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/phase_field) - [`porous_flow`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/porous_flow) - [`ray_tracing`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/ray_tracing) - [`rdg`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/rdg) - [`reactor`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/reactor) - [`richards`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/richards) - [`scalar_transport`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/scalar_transport) - [`solid_properties`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/solid_properties) - [`stochastic_tools`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/stochastic_tools) - [`tensor_mechanics`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/tensor_mechanics) - [`thermal_hydraulics`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/thermal_hydraulics) - [`xfem`](https://mooseframework.inl.gov/docs/PRs/24433/coverage/xfem)

This comment will be updated on new commits.

loganharbour commented 11 months ago

We need some help too figuring out the best place for extended documentation for this in TM.

Who from the TM side wants to review?

GiudGiud commented 11 months ago

I'm thinking this belongs in an example. @jiangwen84 what do you think?

jiangwen84 commented 11 months ago

I'm thinking this belongs in an example. @jiangwen84 what do you think?

I agree. Example seems to be the way to go.

GiudGiud commented 11 months ago

ok let's move all the source code in src and include folders in a directory under moose/modules/tensor_mechanics/examples.

then for the docs you will want to put that there: modules/tensor_mechanics/examples and reference it in the example_index.md file

chunhuizhao478 commented 11 months ago

@GiudGiud @loganharbour I'm not sure what to do about this "Conflicting files" large_media warning

GiudGiud commented 11 months ago

Dont worry about that. you may have to update the large media submodule again that s it

chunhuizhao478 commented 10 months ago

@GiudGiud Hi Guid, I'm not sure why the code self-check is still in the queue? I think I have waited the check for weeks. Thanks!

GiudGiud commented 10 months ago

Hello

it s not automatically triggering for new contributors. I turned it on again manually. I d like to see other people s input on this work before we move forward

rpodgorney commented 9 months ago

@loganharbour @GiudGiud @dschwen @bwspenc @lynnmunday can you guys have a look at this--we need to move it along or get necessary feedback to the contributor. I can cover you time to review---

jiangwen84 commented 9 months ago

@rpodgorney I had some discussion with @chunhuizhao478 for his codes. I will provide additional review.

lynnmunday commented 9 months ago

@GiudGiud can you help him update the large media, it is causing the tests to fail.

GiudGiud commented 9 months ago

Just rebase on devel to get that one right. You ll want to be using the current version of large_media, not change the commit for the submodule anymore

chunhuizhao478 commented 9 months ago

Thanks @lynnmunday, I will look into the comments these days. Hi, @GiudGiud Just to make sure I don't mess up something, could you provide the git command for rebase and resolve the large_media conflict, I will start from it, thanks!

GiudGiud commented 9 months ago
git fetch origin
git rebase origin/devel
git add large_media
git rebase --continue

will likely do it.

chunhuizhao478 commented 9 months ago

A few comments.

Thanks @jiangwen84. I will look into it

chunhuizhao478 commented 9 months ago
git fetch origin
git rebase origin/devel
git add large_media
git rebase --continue

will likely do it.

Hi @GiudGiud, when I run "git rebase --continue", an error "fatal: No rebase in progress?" pops up, what does it mean?

GiudGiud commented 9 months ago

means you did not get a conflict and it finished rebasing fine?

lynnmunday commented 9 months ago

It is still failing from a merge conflict with large_media. @GiudGiud how does he fix this?

 * branch                  slipweakening -> FETCH_HEAD
Failed to merge submodule large_media (not checked out)
Auto-merging large_media
CONFLICT (submodule): Merge conflict in large_media
Automatic merge failed; fix conflicts and then commit the result.

ERROR: exiting with code 1
GiudGiud commented 9 months ago

should be good now. Ping me when everybody s good to go with the PR please

lynnmunday commented 9 months ago

@chunhuizhao478 Guillaume fixed the large_media issue so your test is now being run. It is hitting a build failure here:

/data/civet2/build/moose/modules/tensor_mechanics/src/materials/cohesive_zone_model/SlipWeakeningFriction3d.C:96:8: error: variable 'mu_s' set but not used [-Werror=unused-but-set-variable]
   Real mu_s = 0;
        ^~~~

I think this is a build failure I introduced from the code suggestion that you committed on github. I never accept a reviewers code suggestion on github; I always copy and paste it into my local branch and push it so that I can see if it builds.

chunhuizhao478 commented 9 months ago

@chunhuizhao478 Guillame fixed the large_media issue so your test is now being run. It is hitting a build failure here:

/data/civet2/build/moose/modules/tensor_mechanics/src/materials/cohesive_zone_model/SlipWeakeningFriction3d.C:96:8: error: variable 'mu_s' set but not used [-Werror=unused-but-set-variable]
   Real mu_s = 0;
        ^~~~

I think this is a build failure I introduced from the code suggestion that you committed on github. I never accept a reviewers code suggestion on github; I always copy and paste it into my local branch and push it so that I can see if it builds.

Thanks! @lynnmunday. I will test it in the local before commit, I want to ask about how should I switch 2D/3D using the same set of code (by switching some of the functions in the material object). If there is a built-in parameter could give me the dimension of the problem that could do the trick. I'm also thinking about create an input parameter for user to specify the dimension, I wonder which one is more suitable, thanks!

lynnmunday commented 9 months ago

@chunhuizhao478 I left a review. Before you try merging the 2d & 3D cohesive models, please try to get the documentation to build. This PR is hard for us to review because we don't understand the physics you are modeling or why this implementation is necessary. So the documentation needs to cover that. But once you get the documentation to build, it will be easier to read and review what you are doing. You also need to have some fast running tests of the code your implementing. The test you have now is too large and runs for too many timesteps. Make a much smaller test, like 100 elements that can demonstrate your cohesive zone model in like 100 transient steps.

chunhuizhao478 commented 9 months ago

Hi, I wonder if there is a way to start locally right after the latest commit by @GiudGiud , It seems like I have some local commits that I did long time ago (I want to discard them all). Thanks!

chunhuizhao478 commented 9 months ago

Hi, I wonder if there is a way to start locally right after the latest commit by @GiudGiud , It seems like I have some local commits that I did long time ago (I want to discard them all). Thanks!

I want to do " git fetch, git rebase origin/devel " then I received the following conflict error:

Auto-merging modules/doc/content/newsletter/2023/2023_05.md CONFLICT (content): Merge conflict in modules/doc/content/newsletter/2023/2023_05.md error: could not apply 3d84d520d3... Add time stepper system updates #24404 hint: Resolve all conflicts manually, mark them as resolved with hint: "git add/rm ", then run "git rebase --continue". hint: You can instead skip this commit: run "git rebase --skip". hint: To abort and get back to the state before "git rebase", run "git rebase --abort". Could not apply 3d84d520d3... Add time stepper system updates #24404

GiudGiud commented 9 months ago

That’s a very simple conflict to fix you should just fix it then continue the rebase

chunhuizhao478 commented 9 months ago

That’s a very simple conflict to fix you should just fix it then continue the rebase

Hi @GiudGiud, it has multiple merge conflicts I need to resolve while rebasing, should I just "git add and commit" them all?

GiudGiud commented 9 months ago

You need to fix the file before git add and git commit.

it s odd you would get a lot. are you rebasing on devel? Was your PR based a previous moose devel?

chunhuizhao478 commented 9 months ago

You need to fix the file before git add and git commit.

it s odd you would get a lot. are you rebasing on devel? Was your PR based a previous moose devel?

That could be the reason, so is "next" the one I should rebase on?

(base) andyz@Chunhuis-MBP-2 moose % git branch next

chunhuizhao478 commented 9 months ago

You need to fix the file before git add and git commit. it s odd you would get a lot. are you rebasing on devel? Was your PR based a previous moose devel?

That could be the reason, so is "next" the one I should rebase on?

(base) andyz@Chunhuis-MBP-2 moose % git branch next

  • slipweakening

no I think the "next" is more things to do... so is there a way to start right after the latest commit?

GiudGiud commented 9 months ago

You should rebase on moose/devel not next. You only rebase on next if there are conflicts with next that there are not in devel and you have to get your patch merged (e.g. critical maintenance work only pretty much)

You can keep adding commits after these ones on this branch? Why are you trying to rebase now?