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
249 stars 66 forks source link

How to define jumps on dict field? #231

Closed sebastianpech closed 4 years ago

sebastianpech commented 5 years ago

The manual states that

To define jumps on field, one must define field element-wise.

How do I define a field element-wise? Do I need to define a different name for the field in every element?

What I wan't to do is viewing the results in paraview without using the lsq interpolation, which means strains, stresses ... jump between nodes.

ahojukka5 commented 5 years ago

Defining fields element-wise means that one should not use a dictionary to define fields, that is, instead of having

T = Dict(1 => 1.0, 2 => 2.0, 3 => 3.0)
element1 = Element(Seg2, (1, 2))
element2 = Element(Seg2, (2, 3))
update!([element1, element2], "temperature", T)

We should do something like

update!(element1, "temperature", (1.0, 2.0))
update!(element2, "temperature", (3.0, 4.0))

So both elements are sharing node 2, but the first element "local node temperature" is 2.0 and second element 3.0.

But then, thinking of postprocessing, I think it's not possible to visualize this kind of nodal jump easily using Paraview. In principle, there's only one value per node. You could have two nodes with the same coordinates so that you can have two different values, but that means the elements are physically disconnected.

T = Dict(1 => 1.0, 2 => 2.0, 3 => 3.0, 4 => 4.0)
element1 = Element(Seg2, (1, 2))
element2 = Element(Seg2, (3, 4))
update!([element1, element2], "temperature", T)

If that is not a problem, it should be possible to write a function which alters the connectivity map such a way that the elements are physically disconnected. And that should be done after the actual analysis unless you are doing some kind of DG-FEM. An interesting problem indeed, but definitely solvable.

http://www.xdmf.org/index.php/XDMF_Model_and_Format#Attribute

Actually, there are some DG things which can be defined using ElementFamily, but I'm not familiar with how this should be defined.