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

Solid material model testing framework #225

Merged
merged 17 commits into from
Jul 22, 2024

Conversation

aabrown100-git
Copy link
Collaborator

@aabrown100-git aabrown100-git commented Jul 19, 2024

Current situation

Currently, solid material models (in the function get_pk2cc()) are tested only through full simulations. It's difficult to tell from simulation results if the material models are implemented correctly, and there are likely some bugs in get_pk2cc(). See additional discussion in issue #150

Release Notes

  • Expands the solid material model testing framework established in Add first unit test #150. The developer needs only to implement the strain energy density function $\Psi(\mathbf{F})$, where $\mathbf{F}$ is the deformation gradient tensor. Then, the 2nd Piola-Kirchhoff stress $\mathbf{S} = \frac{\partial \Psi}{\partial \mathbf{E}}$ and the material elasticity tensor $\mathbb{C} = \frac{\partial \mathbf{S}}{\partial \mathbf{E}}$ are tested using finite differences, for prescribed and random $\mathbf{F}$.
  • Currently, the NeoHookean, Mooney-Rivlin, and Holzapfel-Ogden material models are tested
  • Also, added some linear algebra functions in mat_fun_carray.h
  • Also, fixed small bugs in Mooney-Rivlin elasticity tensor (see mat_models_carray.h) and in reading Mooney-Rivlin parameters (see set_material_props.h)

Documentation

I have included instructions in test.h for adding material models to the testing suite.

Testing

Please ensure that the PR meets the testing requirements set by GitHub Actions.

The code itself is testing.

Code of Conduct & Contributing Guidelines

@MatteoSalvador MatteoSalvador self-requested a review July 22, 2024 16:08
Copy link
Collaborator

@MatteoSalvador MatteoSalvador left a comment

Choose a reason for hiding this comment

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

Really nice job @aabrown100-git! This looks good to me

@MatteoSalvador MatteoSalvador merged commit b92add4 into SimVascular:main Jul 22, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants