Define Truss Mesh in JuAFEM

Hello everybody :slight_smile:

I am new to Julia and JuAFEM. Now I am trying to understand the linear Elasticity demo in juAFEM see. I understood a lot but I have big problems to adjust the code for my own purpose.

I want to define a simple truss problem like:


1 Element with 2 Nodes and 2 DoF in each node i.e. I am searching for the solution (u1_x, u2_x, u3_x, u4_x).

My first try lead to:

using JuAFEM
using BlockArrays, SparseArrays, LinearAlgebra
using Pandas
n = 1, l=2
function create__grid(l, n)

    # Ecken zuerst mit Koordinaten
    corners = [Vec{2}((0.0)),

    grid = generate_grid(Lagrange, n, corners);

    # facesets for boundary conditions
    addfaceset!(grid, "clamped", x -> norm(x[0]) ā‰ˆ 0.0);
    addfaceset!(grid, "traction", x -> norm(x[1]) ā‰ˆ 2.0);
    return grid

Is this the correct way?

That structure is unstable.

What do you mean with unstable? So how is the correct way to define a truss structure? For example something like:


This would work. However Iā€™m not qualified to advise you on the construction of the grid.
I believe you will have to do it manually, the function you used above may be for one-dimensional grids only.