tracer-lulab / hyperelastics.jl Goto Github PK
View Code? Open in Web Editor NEWHyperelastic Material modelling with support for Automatic Differentiation
Home Page: https://tracer-lulab.github.io/Hyperelastics.jl/
License: MIT License
Hyperelastic Material modelling with support for Automatic Differentiation
Home Page: https://tracer-lulab.github.io/Hyperelastics.jl/
License: MIT License
The labels of the axes or the units are not appearing in the example plots in the documentation.
Based on the developments from DifferentiationInterface.jl (DI), the package should move away from the separate definitions for each package and instead rely on DI for AD support.
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!
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.
Create examples for performing FEA simulations with Hyperelastics.jl
@JuliaRegistrator register
@JuliaRegistrator register
A few additions to the citations would be appropriate, including:
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
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.
Support for unitful with AD in the package is not yet supported.
At the moment, the documentation is missing the Statement of Need and Community Guidelines sections.
@JuliaRegistrator register
@JuliaRegistrator register
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.