adamantine-sim / adamantine

Software to simulate heat transfer for additive manufacturing
https://adamantine-sim.github.io/adamantine/
Other
37 stars 10 forks source link

Add support for J2 plasticity #243

Closed Rombur closed 10 months ago

Rombur commented 1 year ago

This is still a work in progress. The first two commits could be moved to their own PRs but they are literally one line each so I don't think it matters. Things left to do:

stvdwtt commented 1 year ago

Great!

Re where it goes: I'll read it through let you know if I have any thoughts/preferences.

Re testing: This is mostly a note for myself. Verification Test 1 mentioned here might be of use, but I need to read through it in more detail. https://csm.mech.utah.edu/content/wp-content/uploads/2011/10/9tutorialOnJ2Plasticity.pdf

Rombur commented 1 year ago

Analytical solution on sphere and cyclinder:

Possible code comparison:

Rombur commented 11 months ago

This PR should actually work if you add material in serial. I need to check that it works properly though.

Rombur commented 11 months ago

I think this is PR should be good enough for what Ayana needs (ie we can add material in serial but not use AMR). Of course, we still don't have good tests so that's pretty annoying.

stvdwtt commented 11 months ago

@Rombur, sounds good. I'll review and merge as soon as possible. The test case for Ayana will at least give us a sanity check until we have good tests in place.

stvdwtt commented 10 months ago

@Rombur There was a repeated phrase in one of the comments (I think probably due to how I structured the "suggested edit"). I went ahead and fixed that directly. Once the CI passes I'll merge this in.

Rombur commented 10 months ago

There was a failure (see here). I have seen this a couple of times. Usually re-running fixes the issue. I don't know where the problem comes from. I have run the test in valgrind and everything looks fine.

Rombur commented 10 months ago

The CI passed, so we can merge this.

@stvdwtt where do you think the new code should go? MechanicalPhysics, MechanicalOperator, or a new Operator? I can move the code in a different PR if we think it would be better somewhere else.

stvdwtt commented 10 months ago

Merging it now. I think it works well in MechanicalPhysics, at least for now. If we get to a point where we have a more complicated model or options between models, it might make sense to move it to a new operator. But I don't have a good enough sense of where we're going with this next to justify a particular structure.