Friday, August 13, 2010

Partition tool bug in Salome 5.1.3

Recently I spent a whole day getting mad with the partition tool of Salome 5.1.3. NETGEN is not able to mesh a simple square face, if there is a "open ended" partition within the face. If the partition cuts the entire face, there is no problem.
Partition bug in Salome 5.1.3
Partition the entire face works in Salome 5.1.3
Since I need to model a lot of weld seams, I cant partition every face through the entire machine. I would end up with a very strange chess board.

Fortunately this bug is fixed in Salome 5.1.4. The partition tool works great with half cut faces.
Partition with Salome 5.1.4
Because Salome Meca 2010 includes version 5.1.3 of Salome, maybe someone else encounters this problem. So just switch to Salome 5.1.4 (and of course there are some other great features too).

Friday, August 6, 2010

Convert linear mesh to quadratic with Code-Aster

Simple, quick and easy:

Qmesh=CREA_MAILLAGE(MAILLAGE=mesh,
LINE_QUAD=_F(TOUT='OUI',),);

Friday, July 23, 2010

Consistent units for FEM

Two sets of consistent units. Pick the one you like.
  • SI units:
    • Length: m
    • Force: N
    • Elastic Modulus: Pa = N/m²
    • Mass: kg
    • Mass Density: kg / m³

  • mm / N / t
    • Length: mm
    • Force: N
    • Elastic Modulus: MPa = N/mm²
    • Mass: t
    • Mass Density: t / mm³

Tuesday, July 20, 2010

A brief overview on 3D meshes and attached springs

Salome:
Starting with a 3D mesh first you need to create a 1 D element (edge), where the spring is supposed to be.
  • If you need a spring an ground, place a new node and then create a new edge between the "ground" and the desired node of your model. To block displacements of the ground-node later in Code-Aster, it is useful to create a group containing all these fixed nodes.
  • If you need a spring only connected with existing nodes, just create a edge between the nodes you need
I order to assign a stiffness to the just created spring in Code-Aster, create a group of the new spring ("spring"). To pick the element, not the nodes, select "Elements type: Edge"

Code-Aster:
Within Code-Aster the model has to know about the discrete spring. This is done with "AFFE_MODELE", where the "spring"group is defined as a discrete and translational. If you need rotational as well, choose "MODELISATION -> DIS_TR"
modele=AFFE_MODELE(MAILLAGE=mesh,
                   AFFE=(_F(TOUT='OUI',
                            PHENOMENE='MECANIQUE',
                            MODELISATION='3D',),
                         _F(GROUP_MA='spring',
                            PHENOMENE='MECANIQUE',
                            MODELISATION='DIS_T',),),);
The properties of the spring are described with "AFFE_CARA_ELEM". In this case the spring has only translational degrees of freedom, which can be defined by the element "K_T_D_L" (be sure to use any of the "T" elements, not "TR"). Because we use a SEG2 entity, we also need the "L", not "N".
cara=AFFE_CARA_ELEM(MODELE= modele,
                    DISCRET=(_F(CARA='K_T_D_L',
                                GROUP_MA='spring',
                                VALE=(25000,25000,25000,),),);
If you need rotation as well, choose e.g. "K_TR_D_L".

If you need a spring on ground, now you could tie the free end of your spring with "AFFE_CHAR_MECA / DDL_IMPO" and finish your calculation.

! Don't forget to put your spring definition ("cara") everywhere it's in need !
e.g.:
MACRO_MATR_ASSE(MODELE= modele,
                CHAM_MATER=mat,
                CARA_ELEM=cara,      ...
 or the solver:
dyna=DYNA_LINE_TRAN(MODELE=modell,
                    CHAM_MATER=mat,
                    CARA_ELEM=cara,
                    MATR_MASS=Mmass,     ...

Saturday, July 10, 2010

Hi there

Hello to everybody, who is interested in open source FEM software. In this blog I am going to post various tips, thoughts and problems related to some open source FEM software, which will be mostly Code-Aster and Salome.
This is intended as a help for myself, not to forget all this little tricks and workarounds you need sometimes. But if you come across, I'm happy to share this thing with you and maybe you find something useful.