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

Bugfix/multi material with internal variables #27

Conversation

btalamini
Copy link
Collaborator

This PR comes from a request from a collaborator to be able to do multi-material simulations with history-dependent materials. This overlap of capabilities had been intentionally omitted due to time constraints. The PR does two things:

  1. Implement missing pieces for multi-material solid mechanics with materials with internal state. I made an implementation decision that bears noting: I padded the internal variable array such that it has enough storage for the largest set of internal variables. That is, the internal variable array has shape (ne, neqp, nint), where ne is the number of elements (same as before), neqp is the number of quadrature points per element (same as before), and nint is the maximum of the number of internal variables for a material over all materials. This wastes memory, but makes the implementation easier. We can revisit this later if necessary. Probably the entire multi-material design needs to be rethought and unified with the single material implementation. I noted another potential performance concern, which is that the elements in each block are not enforced to be consecutive. This is a bigger concern, since it will likely be a big speed hit. I opened issue Ensure elements in blocks are consecutive #25 to keep track of this.
  2. Write a tutorial in a Jupyter notebook for multi-material simulations. This is the first real documentation of any kind in optimism. It's meant to help my collaborators use the library. It's the first attempt to address Documentation #20 .

I didn't add unit testing of the multi-material capability, so I opened issue #26 . As I noted above, I think the design needs to be re-thought anyway. I would like to get opinions from Tupek and others on this.

btalamini and others added 4 commits July 14, 2022 21:16
…with internal vars

When materials have different numbers of internal variables, this
pads the array so that each quadrature point has enough space for
the largest number of internal variables. This is not
memory efficient, but it works for now.

The while multi-material paradigm really needs a review and
probably a refactoring (if not new implementation).

Maybe "blocks" should be another array dimension.
@btalamini btalamini requested a review from ralberd July 22, 2022 17:45
@ralberd ralberd merged commit e9a1db5 into sandialabs:main Jul 25, 2022
@btalamini btalamini deleted the bugfix/multi_material_with_internal_variables branch October 6, 2022 23:24
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