JuliaFEM / JuliaFEM.jl

The JuliaFEM software library is a framework that allows for the distributed processing of large Finite Element Models across clusters of computers using simple programming models. It is designed to scale up from single servers to thousands of machines, each offering local computation and storage.
http://juliafem.github.io/JuliaFEM.jl/latest/
MIT License
250 stars 66 forks source link

FreeCad med file exports Seg3 and Tri6 elements #211

Open TeroFrondelius opened 6 years ago

TeroFrondelius commented 6 years ago

I am building full Open source example and I used FreeCAD for geometry and because there is meshing I thought why not. The problem is that your option are Calculix inp or Code Aster binary med. This med file have Seg3 and Tri6 elements included, which are not needed in the analysis.

Also the error message could be clearer.

MethodError: no method matching assemble!(::FEMBase.Assembly, ::FEMBase.Problem{JuliaFEM.Elasticity}, ::Array{FEMBase.Element{FEMBasis.Seg3},1}, ::Float64, ::Type{Val{:continuum}})
Closest candidates are:
  assemble!(::FEMBase.Assembly, ::FEMBase.Problem{JuliaFEM.Elasticity}, ::Array{FEMBase.Element{El<:Union{FEMBasis.Hex20, FEMBasis.Hex27, FEMBasis.Hex8, FEMBasis.Pyr5, FEMBasis.Tet10, FEMBasis.Tet4, FEMBasis.Wedge15, FEMBasis.Wedge6}},1}, ::Any, ::Type{Val{:continuum}}) where El<:Union{FEMBasis.Hex20, FEMBasis.Hex27, FEMBasis.Hex8, FEMBasis.Pyr5, FEMBasis.Tet10, FEMBasis.Tet4, FEMBasis.Wedge15, FEMBasis.Wedge6} at C:\Users\tfr004\.julia\v0.6\JuliaFEM\src\problems_elasticity.jl:106
  assemble!(::FEMBase.Assembly, ::FEMBase.Problem{JuliaFEM.Elasticity}, ::Array{FEMBase.Element{El<:Union{FEMBase.Poi1, FEMBasis.Quad4, FEMBasis.Quad8, FEMBasis.Quad9, FEMBasis.Tri3, FEMBasis.Tri6}},1}, ::Any, ::Type{Val{:continuum}}) where El<:Union{FEMBase.Poi1, FEMBasis.Quad4, FEMBasis.Quad8, FEMBasis.Quad9, FEMBasis.Tri3, FEMBasis.Tri6} at C:\Users\tfr004\.julia\v0.6\JuliaFEM\src\problems_elasticity.jl:350
  assemble!(::FEMBase.Assembly, ::FEMBase.Problem{JuliaFEM.Elasticity}, ::Union{Array{FEMBase.Element,1}, Array{FEMBase.Element{T},1}}, ::Any, ::Type{Val{:plane_stress}}) where T at C:\Users\tfr004\.julia\v0.6\JuliaFEM\src\problems_elasticity_2d.jl:10
  ...
ahojukka5 commented 6 years ago

This is because 3d elasticity does not know what to do with Seg3 elements. Maybe we should give warning in this kind of situations instead of throwing an error. At least give a more clear error message.