Git Product home page Git Product logo

hyperelastics.jl's Introduction

Hyperelastics

Stable Dev codecov

A hyperelastic model library and fitting toolkit developed by TRACER Lab at Liberty University. An extension is provided for Optimization.jl for model calibration based on experimental data.

Installation:

To install Hyperelastics.jl in Julia >= v1.9, use the Julia package manager:

using Pkg
Pkg.add("Hyperelastics")

Statement of Need:

The development of Hyperelastics.jl began as a study of the accuracy for a variety of material models for a set of experimental data. Often, researchers rely on custom implementations of material models and the data fitting process to find material parameters that match their experimental data. Hyperelastic models can well represent the nonlinear stress-deformation behavior of many biological tissues as well as engineering polymeric materials.

The SEDFs included in this package cover most (if not all) of the available analytical models from the literature to date, from constitutive to phenomelogical models. Furthermore, a selection of data-driven models are incldued as a starting point for the development of new methods.

Hyperelastics.jl is part of a spinoff Multi-Scale Material Modelling ($M^3$) Suite being developed by Vagus LLC (wwww.vagusllc.com), as a byproduct result of ongoing multi-functional material research being carried out in the Translational Robotics and Controls Engineering Research (TRACER) Lab at Liberty University. A pure Julia implementation allows for the use of automatic differentiation (AD) packages to calculate the partial derivatives of the SEDF. Hyperelastics.jl is designed to leverage multiple-dispatch to define a common set of functions for calculating the SED, Second Piola Kirchoff Stress Tensor, and the Cauchy Stress Tensor. The package provides a set of hyperelastic models and an interface to Optimization.jl for fitting model parameters.

Currently, most commercial finite element codes only offer a limited number, often less than 10, of hyperelastic models which limits the extent to which researchers are able to accurately model a given material. The closest project to Hyperelastics.jl is the matADi project by Andreas Dutzler [@matAdi2023] which has AD support for 18 material models.

Citations:

All relevant citations are located in CITATIONS.bib

Paper:

Markdown: DOI

HTML: DOI badge

reStructuredText: .. image:: https://joss.theoj.org/papers/10.21105/joss.06314/status.svg :target: https://doi.org/10.21105/joss.06314

hyperelastics.jl's People

Contributors

cfarm6 avatar github-actions[bot] avatar

Stargazers

 avatar

Watchers

 avatar

hyperelastics.jl's Issues

(JOSS) New references in the JOSS Paper Draft

A few additions to the citations would be appropriate, including:

  • on the use of hyperelastic models to model biological materials or polymeric materials (first paragraph of the statement of need)
  • Optimization.jl as it directly used in the fitting

Unitful support

Support for unitful with AD in the package is not yet supported.

(JOSS) Bug when running Example in the documentation

When trying to run this part of the Example in the docs:

models = Dict(
    Gent => ComponentVector(μ=240e-3, Jₘ=80.0),
    EdwardVilgis => ComponentVector(Ns=0.10, Nc=0.20, α=0.001, η=0.001),
    NeoHookean => ComponentVector(μ=200e-3),
    NonaffineMicroSphere => ComponentVector(μ=0.292, N=22.5, p=1.471, U=0.744, q=0.1086),
    Beda => ComponentVector(C1=0.1237, C2=0.0424, C3=7.84e-5, K1=0.0168, α=0.9, β=0.68, ζ=3.015)
)

sol = Dict{Any, SciMLSolution}()
for (ψ, p₀) in models
    HEProblem = HyperelasticProblem(ψ(), treloar_data, p₀,  ad_type = AutoForwardDiff())
    sol[ψ] = solve(HEProblem, NelderMead())
end

I get the following error that arises from the Gent model:

ERROR: type NamedTuple has no field J_m
Stacktrace:
  [1] getproperty
    @ .\Base.jl:37 [inlined]
  [2] getindex(#unused#::ComponentArrays.Axis{(μ = 1, Jₘ = 2)}, s::Symbol)
    @ ComponentArrays C:\Users\...\.julia\packages\ComponentArrays\NoToB\src\axis.jl:158
  [3] _broadcast_getindex_evalf
    @ .\broadcast.jl:683 [inlined]
  [4] _broadcast_getindex
    @ .\broadcast.jl:656 [inlined]
  [5] (::Base.Broadcast.var"#31#32"{Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple}, Nothing, typeof(getindex), Tuple{Tuple{ComponentArrays.Axis{(μ = 1, Jₘ = 2)}}, Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple}, Nothing, typeof(ComponentArrays.getval), Tuple{Tuple{DataType}}}}}})(k::Int64)
    @ Base.Broadcast .\broadcast.jl:1088
  [6] ntuple
    @ .\ntuple.jl:48 [inlined]
  [7] copy
    @ .\broadcast.jl:1088 [inlined]
  [8] materialize(bc::Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple}, Nothing, typeof(getindex), Tuple{Tuple{ComponentArrays.Axis{(μ = 1, Jₘ = 2)}}, Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple}, Nothing, typeof(ComponentArrays.getval), Tuple{Tuple{DataType}}}}})
    @ Base.Broadcast .\broadcast.jl:873
  [9] #s39#55
    @ C:\Users\...\.julia\packages\ComponentArrays\NoToB\src\array_interface.jl:120 [inlined]
 [10] var"#s39#55"(::Any, index_fun::Any, x::Any, idx::Any)
    @ ComponentArrays .\none:0
 [11] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any})
    @ Core .\boot.jl:602
 [12] getindex
    @ C:\Users\...\.julia\packages\ComponentArrays\NoToB\src\array_interface.jl:103 [inlined]
 [13] getindex(x::ComponentVector{Float64, Vector{Float64}, Tuple{ComponentArrays.Axis{(μ = 1, Jₘ = 2)}}}, idx::Symbol)
    @ ComponentArrays C:\Users\...\.julia\packages\ComponentArrays\NoToB\src\array_interface.jl:102
 [14] HyperelasticProblem(ψ::Gent{PrincipalValueForm}, test::HyperelasticUniaxialTest{Float64, Float64}, u0::ComponentVector{Float64, Vector{Float64}, Tuple{ComponentArrays.Axis{(μ = 1, J_m = 2)}}}; ad_type::AutoForwardDiff{nothing, Nothing}, loss::LossFunctions.L2DistLoss, lb::NamedTuple{(:μ, :Jₘ), Tuple{Float64, 
Float64}}, ub::Nothing, int::Nothing, lcons::Nothing, ucons::Nothing, sense::Nothing, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ HyperelasticsOptimizationExt C:\Users\...\.julia\packages\Hyperelastics\9siTz\ext\HyperelasticsOptimizationExt.jl:52
 [15] top-level scope
    @ c:\Users\...\he_review\src\he_review.jl:42

Changing "Jₘ" to "J_m" above hasn't helped for this. In either case, I think the issue arises from trying to access a named tuple like this in the HyperelasticsOptimizationExt.jl file:

(μ = 0.0, Jₘ = 55.46379855669157)[J_m]

The rest of the example runs fine when I remove the Gent model from the code.

ANSYS Mechanical Output for Material Model

Export calibrated material models to ANSYS Mechanical

See "C:\Program Files\ANSYS Inc\ANSYS Student\v221\ansys\customize\user\UserHyper.F" for example of hyperelastic material routine in Fortran

(JOSS) Paper Contents

Hi,

In my opinion, there is no need to include the documentation Example in the paper's main body, despite it being very useful for the documentation.

I think it would be helpful to add a brief, high-level description of the workflow (in words instead of code, maybe even graphically ), possibly mentioning the types of data being dealt with in the input/output. More emphasis on who the software is directed towards, as well as its scope in terms of what it can do would also be useful. In addition, it could be good to further emphasise the software's differences compared to other similar ones.

In the Example, there are some useful paragraphs in between the code parts, which could be compiled and further developed to address some of the issues above.

Let me know if any of the above is unclear.

(JOSS) Documentation of software installation

I noticed that there is no explicit set of instructions in the docs to install the software. The required libraries can be inferred from the Example section (I managed to install it easily in the REPL pkg mode). A simple section in the docs that outlines this, with a clear list of other dependencies, and maybe a bit of code that automates the installation, would help.

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.