Contrib:Claws/Code Aster/10 x cases/torque

From CAELinuxWiki
Revision as of 22:59, 27 January 2010 by Claws (Talk | contribs)

Jump to: navigation, search

Content

Introduction and theory

This is the result of we'll be working towards in this study

Claws result.gif

Applying Torque

Code_Aster does not (yet anyway) have a straight forward way of applying torque to a structure. Only nodes have the option of having moment (FORCE_NODALE-> MX,MY and MZ) applied to them. What this means is, that you, in order to apply torque to an object, have to connect a single node to the object and and thereby transfer the moment into torque.

There are several ways of achieving this, but I will only describe one of the ways here. In terms of what happens inside Code_Aster, this method places a single node adjacent to the surface you want to apply torque to, creates a rigid link between the single node and the surface and finally applies the moment and thereby torque.

  1. Surface you want to apply torque to
  2. Create adjacent single node
  3. Code_Aster creates rigid links between the node and the surface
  4. Apply moment to single node

Claws applying torgue.png

Creating the groups in Salomé

(You should be familiar with creating a geometry and meshing it already)

Not much to explain here since it is described well in the image below.

Mesh your object and create a single node center and normal to the surface you want to apply torque to. In this case it makes sense to create it with an offset normal to the surface so it's easier to select the single node. Assign a 'node group' to the single node

The surface you want to apply torque to, must be assigned to a 'node group' and not a 'surface group' (important). Include the single node you just created (important).

Finally, assign a surface group (or which ever you prefer) to the surface that will prevent the object from moving. Here the bottom of the object.

Claws Twister group edit.png

Parameters

Using parameters in Code_Aster is as useful as in any situation; it lets you change many variables at once and can let you control an entire calculation by changing only one parameter.

In this case one parameter is used to do just that: T1


  • T1=10
  • T2=(2*T1)
  • T3=(3*T1)
  • T4=(4*T1)
  • NBT=T1 (or any of the Tx)
  • T_END= Any of the Tx


By changing the value of T1 you change the number of steps (resolution) in the calculation and the length of the calculation.

By using a value of 10 for T1, 10 steps is calculated for each interval, and with 4 intervals 40 calculations is done. Using T1=100 increases the resolution and length by an order of 10.

The parameter NBT determines the number of steps for each interval so with NBT=T1 the number of steps becomes 10

The parameter T_END determines for how many steps the entire calculation should run for. In other words; it determines how many intervals are calculated, e.g. T_END=T1 means 10 steps are calculated and outputted and with T_END=T4, 40 steps are calculated and outputted.

I've tried to visualize the influence of the parameters in this diagram (click to view full image)

Claws Parameters.png

The load multiplier is also connected to T1 and thus follows the number of steps you increase or decrease (but not the magnitude of the load) The parameter ANGLMAX is used to determine the maximum magnitude of the load (angle of twist) in the object.

In the following diagram, the function for the load and the intervals of the calculation is visualized.

Claws Load function.png


<br\> <br\>

Applying the theory to Code_Aster

This section will go through the command file describing each relevant step.

'Creating' the single node inside C_A

In order to apply any kind of load or displacement to anything in C_A, a model and materials must be assigned to it. This also applies to the single node we're going to use to impose load or displacement in this case.

DEBUT();
mesh1=LIRE_MAILLAGE(FORMAT='MED',);
mesh=CREA_MAILLAGE(MAILLAGE=mesh1,
                  CREA_POI1=_F(NOM_GROUP_MA='load',
                               GROUP_NO='load',),);

(Document U4.23.02 details the use of CREA_MAILLAGE)

Definition
  • LIRE_MAILLAGE: Read the original mesh file and assign it the name 'mesh1'
  • CREA_MAILLAGE: Create a new mesh from the original mesh
    • CREA_POI1: Create a mesh containing a single node from the node group 'load' - This is necessary in order to assign a model and material to the node later on.
    • NOM_GROUP_MA: Name of the new mesh group 'load' - will now have the same name as the node group 'load' we created in Salomé

Defining the parameters

T1 = 10;

T2 = (2 * T1);

T3 = (3 * T1);

T4 = (4 * T1);

#NBT = Number of timesteps
NBT = T1;

ANGLMAX = 0.03;

#T_END = endtime
T_END = T4;

Defining the load function

ROTA=DEFI_FONCTION(NOM_PARA='INST',VALE=(0.0,0.0,
                        T1,ANGLMAX,
                        T2,0.0,
                        T3,-(ANGLMAX),
                        T4,0.0,
                        ),PROL_DROITE='EXCLU',PROL_GAUCHE='EXCLU',);
Definition
  • DEFI_FONCTION: Define a function
    • NAM_PARA=INST: Define a function based on points and dependent on time (See the image above on the load function)
    • VALE: Values (points) in a cartesian coordianate system - x1,y1 , x2,y2 , x3,y3 to form a domain.
    • PROL_DROITE and PROL_GAUCHE = extend_right and extend_left. Defines the type of extension to the right (or left) the domain of the variable:
      • 'CONSTANT' For an extension with the last (or first) value of the function,
      • 'LINEAR' For an extension along the first segment defined (PROL_GAUCHE) or the last segment defined (PROL_DROITE)
      • 'EXCLUDED' The domain starts and ends with the values given. In the case a calculation requires a value of the function outside the domain of definition, the code stops with fatal error.

Claws defi fonction extend.png

Doc U4.31.02 - 3.8 Operands PROL_DROITE and PROL_GAUCHE

Defining the list of time steps

LINST=DEFI_LIST_REEL(DEBUT=0.,
                    INTERVALLE=(_F(JUSQU_A=T1,
                                   NOMBRE=NBT,),
                                _F(JUSQU_A=T2,
                                   NOMBRE=NBT,),
                                _F(JUSQU_A=T3,
                                   NOMBRE=NBT,),
                                _F(JUSQU_A=T4,
                                   NOMBRE=NBT,),),);
Definition

4 intervals each containing 10 time steps

  • LINST=DEFI_LIST_REEL: Create a list called LINST consisting of real numbers. Start the list at 0 (DEBUT=0)
  • INTERVALLE: Interval ranging from 0 to 10 (T1=10), number of steps in this interval: NOMBRE=NBT which is 10. Next interval continues from 10 to T2=20 and this interval is also divided into 10 steps. And so on.

An interval of JUSQU_A=40 with NOMBRE=40 would be just the same, but without the option of de- or increasing the number of time steps at each interval.

Assigning materials

Steel=DEFI_MATERIAU(ELAS=_F(E=2.1E5,
                            NU=0.3,),);

CHMAT=AFFE_MATERIAU(MAILLAGE=mesh,
                    AFFE=_F(TOUT='OUI',
                           MATER=Steel,),);

As said before, everything must have a material assigned to it, even the single node used for applying load/displacement:

Definition
  • DEFI_MATERIAU: Define material, assign the name 'Steel' to it.
    • ELAS: We only deal with a regular elastic material here, with an elasticity module (Young's module) of 210 GPA and a Poisson's ratio of 0.3
  • AFFE_MATERIAU: Assign the material 'Steel' to everything (TOUT=all, OUI=yes)

Assigning models

Model=AFFE_MODELE(MAILLAGE=mesh,
                 AFFE=(_F(TOUT='OUI',
                          PHENOMENE='MECANIQUE',
                          MODELISATION='3D',),
                       _F(GROUP_MA='load',
                          PHENOMENE='MECANIQUE',
                          MODELISATION='DIS_TR',),),);

Here we assign models to the components of the object:

Definition
  • AFFE_MODELE: Assign model, conveniently called 'Model' here
    • MAILLAGE: Assign to the mesh called 'mesh'
    • AFFE_1: Assign a 3D mechanical model to everything
    • AFFE_2: Assign a discreet model to the single node 'load'
      • MODELISATION=DIS_TR: A DIScreet model with the capabilities of Translation and Rotation is assigned.

Assigning loads

Loads meaning boundary conditions actually.

CHME=AFFE_CHAR_MECA(MODELE=Model,
                   DDL_IMPO=(_F(GROUP_MA='hold',
                                LIAISON='ENCASTRE',),
                             _F(GROUP_MA='load',
                                DRZ=1.0,),),
                   LIAISON_SOLIDE=_F(GROUP_NO='twister',),);
Definition
  • AFFE_CHAR_MECA: Assign a mechanical load. Used the previously assigned Model
    • DDL_IMPO: Impose a boundary condition.
      • GROUP_MA='hold'
        • LIAISON=ENCASTRE: The group 'hold' is assigned 'ENCASTRE', which is just an easy way to block movements in all directions instead of assigning DX=0, DY=0, DZ=0 to the group.
      • GROUP_MA=load
        • DRZ=1.0: The single node 'load' is assigned a rotation around the Z axis: DRZ=1
    • LIAISON_SOLIDE: This is where the magic happens
      • GROUP_NO='twister': The node group 'twister' is now told to have a completely rigid connection (LIAISON SOLIDE) - if the node 'load' moves, so does the rest of the nodes in the group.