Skip to content

Conversation

@lijas
Copy link
Collaborator

@lijas lijas commented Aug 13, 2021

To show an example for PR #35

Relevant lines:

function material_response(mp::MatHyperElasticPlastic, C::SymmetricTensor{2,3,T,6}, state::MatHyperElasticPlasticState, Δt=0.0
    ; nothing, options::Dict{Symbol, Any} = Dict{Symbol, Any}()) 

    S, ∂S∂C, ϵᵖ, ν, Fᵖ, _, _ = _compute_2nd_PK(mp, C, state, false)

    return S, ∂S∂C, MatHyperElasticPlasticState(ϵᵖ, Fᵖ, ν)
end


function material_response(mp::MatHyperElasticPlastic, C::SymmetricTensor{2,3,T,6}, state::MatHyperElasticPlasticState, Δt=0.0, ::Symbol
    ; nothing, ::Dict{Symbol, Any} = Dict{Symbol, Any}()) 
    
    S, ∂S∂C, ϵᵖ, ν, Fᵖ, g, dgdC = _compute_2nd_PK(mp, C, state, true)

    return S, ∂S∂C, MatHyperElasticPlasticState(ϵᵖ, Fᵖ, ν), MatHyperElasticPlasticExtras(g, dgdC)
end

So two methods for material_response are implemented, but they share the same function that does all the computation.
@kimauth let me know what you think :)

@codecov-commenter
Copy link

Codecov Report

Merging #36 (d0029ef) into main (2a4ef29) will decrease coverage by 17.60%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main      #36       +/-   ##
===========================================
- Coverage   94.87%   77.26%   -17.61%     
===========================================
  Files          10       12        +2     
  Lines         351      431       +80     
===========================================
  Hits          333      333               
- Misses         18       98       +80     
Impacted Files Coverage Δ
src/FiniteStrain/largedef_plastic.jl 0.00% <0.00%> (ø)
src/MaterialModels.jl 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a4ef29...d0029ef. Read the comment docs.

@lijas
Copy link
Collaborator Author

lijas commented Aug 25, 2021

Added some docs and tests.

It is a bit difficult coming up with a name for this material. It does not really have an author associated with it since it is pretty standard. It also has some simplifications in the local integration, and I can Imagine other users will want to implement similar materials without these simplifications...

Maybe we should have a very explicit name for the material, even though it will be long and ugly.

@kimauth
Copy link
Owner

kimauth commented Aug 25, 2021

Good question. Is there any name behind the unsimplified version, such that it could be called something like SimplifiedXY?

We could also split the section about materials in the docs into subsections, e.g. Small strains, Finite strains, Cohesive laws. That way it would be easy to see to which group a material belongs and there would be no need to have something like LargeDef in a name. That would leave more space for other information in the name. I agree that a long name is better than taking up a short one for something that is not what one would expect from it. (I should sure be renaming the Plastic material...)

@lijas
Copy link
Collaborator Author

lijas commented Aug 25, 2021

We could also split the section about materials in the docs into subsections, e.g. Small strains, Finite strains, Cohesive laws

Sounds good

I will go with the name HyperElasticPlasticSimplified for now :)

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.

4 participants