Ferrite-FEM / Ferrite.jl

Finite element toolbox for Julia
https://ferrite-fem.github.io
Other
350 stars 92 forks source link

Hyperelasticity demo #321

Closed bhaveshshrimali closed 3 years ago

bhaveshshrimali commented 3 years ago

Hi @fredrikekre @KristofferC

Firstly, great package! Many thanks!! Looking forward to having it indexed with a new name :)

I was taking a look at JuAFEM for my research work on computational micromechanics. The idea is to have small julia alternatives to dolfin (especially on Windows where natively running FEniCS is not possible). Also, in the meantime as the FEM landscape in Julia evolves to support distributed computing more effectively, I wanted to experiment with JuAFEM. Moreover, it is a good place to explore, and learn from, existing codebases.

I started by taking a look at https://github.com/KristofferC/JuAFEM.jl/blob/kc/ad_nl/examples/hyperelasticity.ipynb

Except for a few syntactic changes, namely

struct NeoHook{T}
    μ::T
    λ::T    
end

and

δE = Vector{SymmetricTensor{2, 3, eltype(ue), 6}}(undef, ndofs)

where the syntax requires an UndefInitializer, everything works perfectly. The solution obtained looks reasonable to me. I will take a look at the other examples too. As a starting point, I am looking to implement incompressible hyperelasticity using Taylor-Hood element (u-p formulation). So, broadly speaking, composing together the "Cook's membrane" and hyperelasticity.

Just out of curiosity, though, how large a (nonlinear) problem have any of you attempted with JuAFEM? If you have, then I might as well try to solve phase-field fracture (the problems there are huge, often with ~10^6 elems in 3D) and require some sort of parallel computing support.

Another question: are there any tutorials/snippets explaining how to import external meshes (say those from Gmsh/TetGen)?

Of course, to begin with, I am more than happy to contribute small examples/demos once I have it running :)

KristofferC commented 3 years ago

Look at https://kristofferc.github.io/JuAFEM.jl/dev/examples/hyperelasticity/ instead of the examples. They are up to date. We should remove the notebooks.

koehlerson commented 3 years ago

Just out of curiosity, though, how large a (nonlinear) problem have any of you attempted with JuAFEM? If you have, then I might as well try to solve phase-field fracture (the problems there are huge, often with ~10^6 elems in 3D) and require some sort of parallel computing support.

As far as I know no one is dealing with distributed memory parallelism right now. Shared memory parallelism is covered in the docs.

Another question: are there any tutorials/snippets explaining how to import external meshes (say those from Gmsh/TetGen)?

You can try https://github.com/koehlerson/JuAFEMGmsh.jl It's not much but at least some basic functionality. Note that it only works with the gmsh geometry kernel. OpenCASCADE Kernel is not supported (as of now)

bhaveshshrimali commented 3 years ago

Look at kristofferc.github.io/JuAFEM.jl/dev/examples/hyperelasticity instead of the examples. They are up to date. We should remove the notebooks.

Thanks Kristoffer! I got redirected to the notebook from Discourse. I will check out the dev examples and docs.

bhaveshshrimali commented 3 years ago

Thanks @koehlerson. I will checkout JuAFEMGmsh. Once I have a feel for the associated functions in grid, I can write a parser -- at least for my own use cases. Shouldn't be too bad.

As far as I know no one is dealing with distributed memory parallelism right now. Shared memory parallelism is covered in the docs.

AFAIK GridapDistributed (https://github.com/gridap/GridapDistributed.jl), though not as actively developed as Gridap itself, is under development. But definitely a WIP.