getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Getfem-users] 3D truss element


From: Roman Putanowicz
Subject: Re: [Getfem-users] 3D truss element
Date: Mon, 7 Jun 2010 06:09:28 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

> Dear All,
> 
> Has anyone of you implemented 3D truss element (or 2D) within the
> framework of GetFEM++? Not that this element is any special --
> I could calculate its stiffness matrix explicitly and use generic
> assembly routines. However I have problems if figuring out if there
> is some sort of support in GetFEM for "structural elements" as I call them.
> 
> To be more explicit: one usually  defines the truss element in 
> local coordinate system that reduces the problem to 1D. 
> Then in case of 2D one uses the transformation matrix:
> 
>   T = [ c  s 0 0
>         0  0 c s ]   c -- cosine between local and global X axis
>                      s -- sine between local and global X axis
> 
>  that transforms global degree of freedom Q_i (2 per node) into the 
>  local one.
>  Of course element stiffness matrix in global coordinate system boils down
>  to :
>    E*A *   T' * [1,-1;-1,1] * T     where E*A is the bar stiffness.
> 
>  The question essentially is -- what is the most "GetFEMic" way of handling
>  the matrix T?

Answering my own post -- I was to lazy to sit down and think for a while :)

Firstly, there is mistake in the last formula, it should be:
  E*A/L * T' * [1,-1;-1,1] * T
where L is the bar length.

Secondly, one has to do nothing to program truss element (2D or 3D). Everything
is in GetFEM++ :). The transformation matrix T  which in some codes is put
explicitly is in fact hidden in a way in the transformation from reference to
real element. It is enough to set up right assembly formula:

/* The matrix M should be scaled by a bar stiffness EA */
    assem.set("k=comp(vGrad(#1).vGrad(#1));"
              "M(#1,#1)+= k(:,i,i,:,j,j);");

In the attachment I included the whole code for a simple truss structure
(it is very crude, especially in the way of solving the FEM system but
shows the point).

Regards,

Roman
-- 
Roman Putanowicz, PhD  < address@hidden  >
Institute for Computational Civil Engng (L-5)
Dept. of Civil Engng, Cracow Univ. of Technology
www.l5.pk.edu.pl, tel. +48 12 628 2569, fax 2034

Attachment: simple_truss.cc
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]