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

Plasticity #142

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open

Plasticity #142

wants to merge 24 commits into from

Conversation

pabloseleson
Copy link
Collaborator

@pabloseleson pabloseleson commented Oct 28, 2024

Preliminary example of a compact tension test for the plasticity model. The plasticity model needs to be properly implemented. Right now, it overwrites the PMB model. The yield stretch is also currently hardcoded instead of reading it from the json file.

@pabloseleson pabloseleson requested a review from streeve October 28, 2024 23:00
examples/mechanics/compact_tension_test.cpp Outdated Show resolved Hide resolved
examples/mechanics/compact_tension_test.cpp Outdated Show resolved Hide resolved
examples/mechanics/compact_tension_test.cpp Outdated Show resolved Hide resolved
src/force/CabanaPD_Force_PMB.hpp Outdated Show resolved Hide resolved
examples/mechanics/compact_tension_test.cpp Outdated Show resolved Hide resolved
examples/mechanics/compact_tension_test.cpp Outdated Show resolved Hide resolved
src/force/CabanaPD_Force_PMB.hpp Outdated Show resolved Hide resolved
@streeve
Copy link
Collaborator

streeve commented Nov 19, 2024

@pabloseleson fixed issues on my end here - let me know if the example is working. @abisner let me know if you have thoughts on design/even more tags

@streeve streeve mentioned this pull request Dec 13, 2024
10 tasks
@streeve streeve mentioned this pull request Jan 2, 2025
@streeve
Copy link
Collaborator

streeve commented Jan 9, 2025

Currently blocked by #172

{
protected:
using memory_space = MemorySpace;
using NeighborView = typename Kokkos::View<int**, memory_space>;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It "int" correct here?

In CabanaPD_Force.hpp, we have:

using NeighborView = typename Kokkos::View<int**, memory_space>;
NeighborView _mu;

There, mu is a 2D array of integers. However, s0 should be a 2D array of double numbers, correct?

Copy link
Collaborator

Choose a reason for hiding this comment

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

You're correct; changed

using mechanics_type = ElasticPerfectlyPlastic;
using thermal_type = TemperatureIndependent;

using base_plasticity_type::_s_0;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Placeholder comment: I may change s_0 to s_p. Not sure yet.

using base_type::K;

// FIXME: hardcoded
const double s_Y = 0.0014;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We need this to computer based on the yield stress.

}

KOKKOS_INLINE_FUNCTION
auto forceCoeff( const int, const int, const double s,
Copy link
Collaborator Author

@pabloseleson pabloseleson Jan 28, 2025

Choose a reason for hiding this comment

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

Are "const int, const int," here for "i" and "n"? (Same for the energy below)

Copy link
Collaborator

Choose a reason for hiding this comment

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

See the force file below where these get called in the neighbor loop

{
// FIXME: doesn't work because this kernel doesn't use n.
// auto s_0 = _s_0( i, n );
if ( s < s_Y )
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We will need to write 93-96 just as as:

        return c * ( s - s_0) * vol;

Copy link
Collaborator

Choose a reason for hiding this comment

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

As we discussed this will not work in the current setup and isn't worth updating right now - I've removed for now

{
protected:
using memory_space = MemorySpace;
using NeighborView = typename Kokkos::View<int**, memory_space>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

You're correct; changed

src/CabanaPD_ForceModels.hpp Outdated Show resolved Hide resolved
src/CabanaPD_ForceModels.hpp Show resolved Hide resolved
src/CabanaPD_ForceModels.hpp Outdated Show resolved Hide resolved
src/CabanaPD_Particles.hpp Show resolved Hide resolved
src/CabanaPD_ForceModels.hpp Outdated Show resolved Hide resolved
// Grid spacing in y-direction
double dy = inputs["dx"][1];

// Remove particles from original geometry
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not technically true, the other particles are never created

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

How about "// Do not create particles outside compact tension test specimen region"?

This would be consistent with the fragmenting cylinder example? We say there "// Do not create particles outside given cylindrical region"

src/CabanaPD_Particles.hpp Show resolved Hide resolved
src/CabanaPD_HeatTransfer.hpp Outdated Show resolved Hide resolved
{
// FIXME: doesn't work because this kernel doesn't use n.
// auto s_0 = _s_0( i, n );
if ( s < s_Y )
Copy link
Collaborator

Choose a reason for hiding this comment

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

As we discussed this will not work in the current setup and isn't worth updating right now - I've removed for now

// ====================================================
// Custom particle generation and initialization
// ====================================================
// Rectangular prism containing the full specimen: original geometry
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should never do this - if we need every particle considered, it should use a body term

else if ( s <= s_0 - s_Y )
_s_0( i, n ) = s + s_Y;
// else: Elastic (in between), do not modify.
s_0 = _s_0( i, n );
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is unnecessary

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Why is this unnecessary? We need to update s_0 for Line 140.

Copy link
Collaborator

Choose a reason for hiding this comment

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

No it is not

Copy link
Collaborator

Choose a reason for hiding this comment

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

Your comment didn't show - I was responding to myself..

using base_type::s0;

using base_plasticity_type::_s_0;
// FIXME: hardcoded
Copy link
Collaborator Author

@pabloseleson pabloseleson Jan 29, 2025

Choose a reason for hiding this comment

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

s_Y needs to be computed from the yield stress \sigma_Y. The relation is:

Untitled

where K is the bulk modulus.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Done

using memory_space = typename ParticleType::memory_space;
return ForceModel<ModelType, ElasticPerfectlyPlastic, Fracture,
TemperatureIndependent, memory_space>(
delta, K, G0, particles.localOffset() );
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What is "particles.localOffset()" for?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Allocating the permanent stretch array

@pabloseleson
Copy link
Collaborator Author

It seems the calculation for critical stretch under plasticity is missing. It should be:
Untitled

const double vol ) const
{
auto s_p = _s_p( i, n );
return 0.25 * c * ( s - s_p ) * xi * vol;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I need to change this. It is incorrect.

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