Skip to content

Continuum Damage Model #816

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

Merged
merged 3 commits into from
Apr 14, 2025
Merged

Conversation

ChrisZYJ
Copy link
Contributor

@ChrisZYJ ChrisZYJ commented Apr 3, 2025

Description

2-way coupled continuum damage model for elastic simulations.

Also fixes #509 along the way.

Type of change

  • New feature (non-breaking change which adds functionality)

Scope

  • This PR comprises a set of related changes with a common goal

How Has This Been Tested?

2WayContDamage.mp4

Checklist

  • I have added comments for the new code
  • I added Doxygen docstrings to the new code
  • I have made corresponding changes to the documentation (docs/)
  • I have added regression tests to the test suite so that people can verify in the future that the feature is behaving as expected
  • I have added example cases in examples/ that demonstrate my new feature performing as expected.
    They run to completion and demonstrate "interesting physics"
  • I ran ./mfc.sh format before committing my code
  • New and existing tests pass locally with my changes, including with GPU capability enabled (both NVIDIA hardware with NVHPC compilers and AMD hardware with CRAY compilers) and disabled
  • This PR does not introduce any repeated code (it follows the DRY principle)
  • I cannot think of a way to condense this code and reduce any introduced additional line count

If your code changes any code source files (anything in src/simulation)

To make sure the code is performing as expected on GPU devices, I have:

  • Checked that the code compiles using NVHPC compilers
  • Checked that the code compiles using CRAY compilers
  • Ran the code on either V100, A100, or H100 GPUs and ensured the new feature performed as expected (the GPU results match the CPU results)
  • Ran the code on MI200+ GPUs and ensure the new features performed as expected (the GPU results match the CPU results)
  • Enclosed the new feature via nvtx ranges so that they can be identified in profiles
  • Ran a Nsight Systems profile using ./mfc.sh run XXXX --gpu -t simulation --nsys, and have attached the output file (.nsys-rep) and plain text results to this PR
  • Ran an Omniperf profile using ./mfc.sh run XXXX --gpu -t simulation --omniperf, and have attached the output file and plain text results to this PR.
  • Ran my code using various numbers of different GPUs (1, 2, and 8, for example) in parallel and made sure that the results scale similarly to what happens if you run without the new code/feature

Copy link

codecov bot commented Apr 4, 2025

Codecov Report

Attention: Patch coverage is 46.73913% with 49 lines in your changes missing coverage. Please review.

Project coverage is 43.63%. Comparing base (a2a8800) to head (51aa469).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/simulation/m_hypoelastic.fpp 51.42% 13 Missing and 4 partials ⚠️
src/simulation/m_data_output.fpp 7.69% 12 Missing ⚠️
src/common/m_variables_conversion.fpp 0.00% 3 Missing ⚠️
src/simulation/m_riemann_solvers.fpp 0.00% 2 Missing and 1 partial ⚠️
src/simulation/m_time_steppers.fpp 0.00% 2 Missing and 1 partial ⚠️
src/post_process/m_start_up.f90 60.00% 1 Missing and 1 partial ⚠️
src/pre_process/m_initial_condition.fpp 33.33% 1 Missing and 1 partial ⚠️
src/simulation/m_rhs.fpp 66.66% 1 Missing and 1 partial ⚠️
src/post_process/m_data_output.fpp 0.00% 1 Missing ⚠️
src/post_process/m_global_parameters.fpp 75.00% 0 Missing and 1 partial ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #816      +/-   ##
==========================================
+ Coverage   43.61%   43.63%   +0.02%     
==========================================
  Files          66       66              
  Lines       19748    19835      +87     
  Branches     2413     2433      +20     
==========================================
+ Hits         8613     8655      +42     
- Misses       9653     9688      +35     
- Partials     1482     1492      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ChrisZYJ ChrisZYJ force-pushed the cont_damage_merged branch from 074a021 to d1e7fa0 Compare April 11, 2025 23:52
@sbryngelson
Copy link
Member

@ChrisZYJ change this from a draft pr to a regular pr when it's ready for review 👍

@ChrisZYJ ChrisZYJ marked this pull request as ready for review April 12, 2025 03:25
@ChrisZYJ ChrisZYJ requested review from a team and sbryngelson as code owners April 12, 2025 03:25
| `cont_damage_s` | Real | Power `s` for continuum damage model |
| `alpha_bar` | Real | Damage factor (rate) for continuum damage model |

- `cont_damage` activates continuum damage model for solid materials. Requires `tau_star`, `cont_damage_s`, and `alpha_bar` to be set (empirically determined) ([Cao et al., 2019](references.md#cao19)).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think these work, please see #509

do l = adv_idx%end + 1, sys_size
@:ALLOCATE(q_prim_qp%vf(l)%sf(idwbuff(1)%beg:idwbuff(1)%end, idwbuff(2)%beg:idwbuff(2)%end, idwbuff(3)%beg:idwbuff(3)%end))
end do
num_eqns_after_adv = count((/surface_tension, cont_damage/))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clever 👍

@sbryngelson
Copy link
Member

@ChrisZYJ, does this fix all the links? If so, you can add that you fixed GH issue 509, and we will close that via this PR.

@ChrisZYJ
Copy link
Contributor Author

@ChrisZYJ, does this fix all the links? If so, you can add that you fixed GH issue 509, and we will close that via this PR.

This fixes all the broken links by redirecting them to the reference page instead of to a specific reference on that page. If that's all right, then this PR should be ready for merging

@sbryngelson sbryngelson merged commit 068da2c into MFlowCode:master Apr 14, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[Website] Fix broken links!
2 participants