moose icon indicating copy to clipboard operation
moose copied to clipboard

To enable restart a crystal plasticity simulation from checkpoint

Open schakrabortygithub opened this issue 1 year ago • 10 comments

The non-statefull material properties were not getting resized properly during restart.

closes #26458 (changed to point directly to the issue that refers to the original discussion)

Reason

The non-stateful material properties in crystal plasticity material models that were derived from the class "CrystalPlasticityStressUpdateBase" were not getting properly resized if the simulation is restated from a checkpoint. This happened because the resizing operation are done within the function initQpStatefulProperties() of the corresponding class and during restart that function is not called for obvious reason.

Design

A new virtual function setMaterialVectorSize() is added to separate the resizing operation for non-stateful material properties.

Impact

Crystal plasticity simulation that updates the stress using the class 'ComputeMultipleCrystalPlasticityStress' and 'CrystalPlasticityStressUpdateBase' e.g., CrystalPlasticityKalidindiUpdate, CrystalPlasticityTwinningKalidindiUpdate should work without any problem while restarting the simulation from a checkpoint. Also added input scripts to restart a simulation for regression test.

schakrabortygithub avatar Jan 05 '24 08:01 schakrabortygithub

Job Documentation on e2d7347 wanted to post the following:

View the site here

This comment will be updated on new commits.

moosebuild avatar Jan 05 '24 18:01 moosebuild

Job Coverage on e2d7347 wanted to post the following:

Framework coverage

1d6aa7 #26485 e2d734
Total Total +/- New
Rate 85.31% 85.31% +0.00% -
Hits 101269 101271 +2 0
Misses 17441 17439 -2 0

Diff coverage report

Full coverage report

Modules coverage

Solid mechanics

1d6aa7 #26485 e2d734
Total Total +/- New
Rate 84.78% 84.79% +0.01% 100.00%
Hits 27113 27128 +15 29
Misses 4868 4868 - 0

Diff coverage report

Full coverage report

Full coverage reports

Reports

This comment will be updated on new commits.

moosebuild avatar Jan 08 '24 21:01 moosebuild

Job Docker moose on 183d2b1 : invalidated by @jiangwen84

moosebuild avatar Jan 11 '24 17:01 moosebuild

I do not have further comments. @schakrabortygithub thanks for your great work.

@sapitts Do you have any other comments?

jiangwen84 avatar Jan 11 '24 17:01 jiangwen84

Job Docker moose on 183d2b1 : invalidated by @jiangwen84

moosebuild avatar Jan 11 '24 17:01 moosebuild

Assigning you for the merge @jiangwen84

GiudGiud avatar Jan 12 '24 01:01 GiudGiud

@jiangwen84 I'd like to get this setMaterialVector change added into the remaining stress-update based crystal plasticity classes, and the modifications to all of the tests files made so that the new tests @schakrabortygithub added will be run in the test suite. I can do this as an additional commit on existing PR here.

Would you wait to merge this code until after I have added that commit please?

sapitts avatar Jan 24 '24 18:01 sapitts

@sapitts @jiangwen84 @loganharbour can we get an update on this please? Just making sure the delay on the merge is still intended

GiudGiud avatar Feb 20 '24 23:02 GiudGiud

Sorry folks, I lost github notifications and clearly forgot to check on this PR. @subhendu-LANL thank you for repushing with the refactor to the new solid mechanics module name. I will pull early next week and get the required tests files added so that the new tests added are actually run. If you'd rather not wait for me (I completely understand, my track record with this pull request is pretty terrible), please take a look at the tests text file in any of the directories in which you have added a new test

sapitts avatar Mar 13 '24 02:03 sapitts

@schakrabortygithub I have a copy of your branch on which I have updated the tests files and added the required changes to the remaining stress-update crystal plasticity classes. Are you okay with me pushing to your branch to update the pull request?

sapitts avatar Mar 18 '24 17:03 sapitts

@sapitts , sure, you can push the changes to the branch that I have created for this PR.

schakrabortygithub avatar Mar 18 '24 19:03 schakrabortygithub

Job Precheck on 58c6717 wanted to post the following:

Your code requires style changes.

A patch was auto generated and copied here
You can directly apply the patch by running, in the top level of your repository:

curl -s https://mooseframework.inl.gov/docs/PRs/26485/clang_format/style.patch | git apply -v

Alternatively, with your repository up to date and in the top level of your repository:

git clang-format f5ce2c7ab1f32ca0867aa104c576fca287b26ed0

moosebuild avatar Mar 18 '24 22:03 moosebuild

Job Documentation on 85b7d4e : invalidated by @cticenhour

Invalidating now that next is merging (as of last night)

moosebuild avatar Mar 19 '24 15:03 moosebuild

@jiangwen84 or @loganharbour if one of you would be willing to review this PR once more, it's ready to go

sapitts avatar Mar 28 '24 21:03 sapitts