Skip to content

Large strain material model with extra output. - #36

Open
lijas wants to merge 3 commits into
mainfrom
largedef
Open

Large strain material model with extra output.#36
lijas wants to merge 3 commits into
mainfrom
largedef

Conversation

@lijas

@lijas lijas commented Aug 13, 2021

Copy link
Copy Markdown
Collaborator

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

codecov-commenter commented Aug 13, 2021

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.44444% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.78%. Comparing base (2a4ef29) to head (b1d29d5).
⚠️ Report is 28 commits behind head on main.

Files with missing lines Patch % Lines
src/MaterialModels.jl 0.00% 3 Missing ⚠️
src/FiniteStrain/largedef_plastic.jl 97.70% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #36      +/-   ##
==========================================
- Coverage   94.87%   94.78%   -0.09%     
==========================================
  Files          10       12       +2     
  Lines         351      441      +90     
==========================================
+ Hits          333      418      +85     
- Misses         18       23       +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lijas

lijas commented Aug 25, 2021

Copy link
Copy Markdown
Collaborator Author

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

kimauth commented Aug 25, 2021

Copy link
Copy Markdown
Owner

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

lijas commented Aug 25, 2021

Copy link
Copy Markdown
Collaborator Author

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.

3 participants