a simple mechanical study - code_aster

50
A simple mechanical study code_aster, salome_meca course material GNU FDL licence (http://www.gnu.org/copyleft/fdl.html)

Upload: others

Post on 16-Apr-2022

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A simple mechanical study - Code_Aster

A simple mechanical study

code_aster, salome_meca course materialGNU FDL licence (http://www.gnu.org/copyleft/fdl.html)

Page 2: A simple mechanical study - Code_Aster

Outline

1. Introducing a simple study

2. Starting the study

3. Data settings

4. Solving the problem

5. Post-processing the resultsGNU FDL licence | code_aster, salome_meca course material

Page 3: A simple mechanical study - Code_Aster

3

1. Introducing a simple study

A pump of the safety injection system (RIS)

GNU FDL licence | code_aster, salome_meca course material

Under a constant internal pressure

Inlet pipe

Outlet pipe

Page 4: A simple mechanical study - Code_Aster

4

1. Introducing a simple study

A pump of the safety injection system (RIS)

GNU FDL licence | code_aster, salome_meca course material

Simplifications and hypotheses

Simplify the connexions

Intake, Exhaust : supported forces

Simplify the fixation :

Haut, Face_bas are clamped

Intake

Exhaust

Haut

Face_Bas

Page 5: A simple mechanical study - Code_Aster

Outline

1. Introducing a simple study

2. Starting the study

3. Data settings

4. Solving the problem

5. Post-processing the resultsGNU FDL licence | code_aster, salome_meca course material

Page 6: A simple mechanical study - Code_Aster

6

2. Starting the study

Mesh in code_aster

GNU FDL licence | code_aster, salome_meca course material

Mesh consists of

Coordinates of nodes

Cells defined by their connectivity

Groups of cells (GROUP_MA) and groups of nodes (GROUP_NO)

Page 7: A simple mechanical study - Code_Aster

7

2. Starting the study

Mesh in code_aster

GNU FDL licence | code_aster, salome_meca course material

Page 8: A simple mechanical study - Code_Aster

8

2. Starting the study

Mesh in code_aster

GNU FDL licence | code_aster, salome_meca course material

Import mesh in different formats

MED format (default input format)

Aster format and other foramts (GIBI, IDEAS, GMSH)

MAIL = LIRE_MAILLAGE ( FORMAT = … )

Orientation of the normals

Check for plate/shell elements or the borders where a pressure is applied

Reorients properly the cells where contact is defined

Command MODI_MAILLAGE

Keywords : ORIE_NORM_COQUE, ORIE_PEAU_2D, ORIE_PEAU_3D

Direct display

Page 9: A simple mechanical study - Code_Aster

Outline

1. Introducing a simple study

2. Starting the study

3. Data settings

4. Solving the problem

5. Post-processing the resultsGNU FDL licence | code_aster, salome_meca course material

Page 10: A simple mechanical study - Code_Aster

10

3. Data setting

Finite elements

GNU FDL licence | code_aster, salome_meca course material

What is a finite element ?

A geometric description, provided by the mesh

Shape functions

Degrees of freedom

The choice determines

equations to solve

Discretization and integration hypothesis

Unknowns fields

Page 11: A simple mechanical study - Code_Aster

11

3. Data setting

Finite elements

GNU FDL licence | code_aster, salome_meca course material

Page 12: A simple mechanical study - Code_Aster

12

3. Data setting

Finite elements

GNU FDL licence | code_aster, salome_meca course material

Defined by command AFFE_MODELE

Example for mechanical phenomenon, with 3D elements:

MODE = AFFE_MODELE ( AFFE = _F ( GROUP_MA ='ZONE_1',

PHENOMENE = 'MECANIQUE‘,

MODELISATION = '3D'),)

Different choices for 3D, 2D, 1D, 0D elements

MODELISATION = / '3D' / 'D_PLAN' / 'POU_D_T'

/ '3D_SI' / 'C_PLAN' / 'TUYAU'

/ '3D_THM' / 'DKT' / …

/ … / …

3D isoparametric

mechanical element

Page 13: A simple mechanical study - Code_Aster

13

3. Data setting

Finite elements

GNU FDL licence | code_aster, salome_meca course material

Mixture of finite elements

Kinematic connections between different degrees of freedom ( in the definitions of

loadings and boundary conditions)

Direct display

Page 14: A simple mechanical study - Code_Aster

14

3. Data setting

Materials – Definition

GNU FDL licence | code_aster, salome_meca course material

Defined through numerical parameters of properties

Units are not managed by code_aster: the user must use a consistent system of units

throughout the study

Example:

Coordinates of the mesh nodes mm m

Young's modulus MPa Pa

Applied force N N

Stress obtained as a result MPa Pa

Page 15: A simple mechanical study - Code_Aster

15

3. Data setting

Materials – Definition

GNU FDL licence | code_aster, salome_meca course material

Page 16: A simple mechanical study - Code_Aster

16

3. Data setting

Materials – Assignment

GNU FDL licence | code_aster, salome_meca course material

Assigned to the mesh

Overloading rule

Example:

STEEL1 = DEFI_MATERIAU( ELAS = _F( E = 305000.0E6, NU = 0.3, ), )

STEEL2 = DEFI_MATERIAU( ELAS = _F( E = 405000.0E6, NU = 0.3, ), )

CHMAT1 = AFFE_MATERIAU( MAILLAGE=MESH,

AFFE =(_F(GROUP_MA=('GR1','GR2',),

MATER=STEEL1,),

_F(GROUP_MA=('GR2',),

MATER=STEEL2,),),)

GR1

GR2

1 2

1

2Direct display

Page 17: A simple mechanical study - Code_Aster

17

3. Data setting

Materials – Assignment

GNU FDL licence | code_aster, salome_meca course material

Assigned to the mesh

Assignment after the definition, and used directly in the solving operators

Example:

STEEL1 = DEFI_MATERIAU( ELAS = _F( E = 205000.0E6, NU = 0.3, ), )

STEEL2 = DEFI_MATERIAU( ELAS = _F( E = 305000.0E6, NU = 0.3, ), )

STEEL3 = DEFI_MATERIAU( ELAS = _F( E = 405000.0E6, NU = 0.3, ), )

CHMAT1 = AFFE_MATERIAU( MAILLAGE=MESH,

AFFE =_F(TOUT='OUI',

MATER= STEEL2,),)

CHMAT2 = AFFE_MATERIAU( MAILLAGE=MESH,

AFFE =_F(TOUT='OUI',

MATER= STEEL3,),)

RESU = MECA_STATIQUE(...

CHAM_MATER= CHMAT1,

...)

Page 18: A simple mechanical study - Code_Aster

18

3. Data setting

Materials – Consistency with constitutive equation

GNU FDL licence | code_aster, salome_meca course material

Materials must be consistent with the resolution assumptions

Example: VMIS_ISOT_TRAC, constitutive equation for von Mises elasto-plasticity with

isotropic nonlinear hardening

steel=DEFI_MATERIAU(ELAS =_F(E=2.1.E11, NU=0.3,),)

TRACTION =_F( SIGM = CTRACB),)

mater=AFFE_MATERIAU(MAILLAGE=mesh,

AFFE=_F(TOUT='OUI', MATER=steel,),)

result=STAT_NON_LINE( ... CHAM_MATER=mater,

COMPORTEMENT=_F(

RELATION = 'VMIS_ISOT_TRAC'),)

Page 19: A simple mechanical study - Code_Aster

19

3. Data setting

Boundary conditions and loading

GNU FDL licence | code_aster, salome_meca course material

Page 20: A simple mechanical study - Code_Aster

20

3. Data setting

Boundary conditions and loading

GNU FDL licence | code_aster, salome_meca course material

Commands AFFE_CHAR_****(_F)

With _F => functions

**** => MECA / CINE / THER

Example – different choices of boundary conditions in MECA:

Be careful of the consistency with the DOF allowed by the chosen finite element

Imposed relationships on the degrees of freedom (DOF)

| DDL_IMPO Unknowns imposed on a node or group| FACE_IMPO Unknowns imposed on the nodes of a cell or a group of cells| LIAISON_SOLIDE Rigid body element on a set of nodes or cells| LIAISON_ELEM 3D-beam, beam-shell, 3D-pipe connections …| LIAISON_COQUE connection between shells

Direct display

Page 21: A simple mechanical study - Code_Aster

21

3. Data setting

Boundary conditions and loading

GNU FDL licence | code_aster, salome_meca course material

Commands AFFE_CHAR_****(_F)

Loadings used as boundary conditions

Example – different choices of loadings in MECA

Loadings inside the continuous media

| PESANTEUR

| ROTATION

| FORCE_INTERNE

| FORCE_NODALE

. . .

Border loadings

| FORCE_FACE

| FORCE_ARETE

| FORCE_CONTOUR

| PRES_REP

. . .

Loadings specific to structural elements

| FORCE_POUTRE

| FORCE_COQUE

| FORCE_TUYAU

. . .

Direct display

Page 22: A simple mechanical study - Code_Aster

Outline

1. Introducing a simple study

2. Starting the study

3. Data settings

4. Solving the problem

5. Post-processing the resultsGNU FDL licence | code_aster, salome_meca course material

Page 23: A simple mechanical study - Code_Aster

23

4. Solving the problem

Setting of solving operators

GNU FDL licence | code_aster, salome_meca course material

~ 15 resolution operators to solve the physical problems

Thermics: THER_LINEAIRE, THER_NON_LINE

Mechanics: MECA_STATIQUE, STAT_NON_LINE

Dynamics: DYNA_VIBRA, DYNA_NON_LINE

Modal calculation: CALC_MODES

Page 24: A simple mechanical study - Code_Aster

24

4. Solving the problem

Setting of solving operators

GNU FDL licence | code_aster, salome_meca course material

Page 25: A simple mechanical study - Code_Aster

25

4. Solving the problem

Setting of solving operators

GNU FDL licence | code_aster, salome_meca course material

Input the description of the problem prior to solving

The model: MODELE

Materials: CHAM_MATER

Geometrical characteristics (for structural elements): CARA_ELEM

Loadings: EXCIT

A time stepping if necessary: LIST_INST (Appendix)

One can also change settings on the resolution algorithm =>

advanced usage

In most cases, the default values are suitable

Analysis Summary

Page 26: A simple mechanical study - Code_Aster

26

4. Solving the problem

Setting of solving operators

GNU FDL licence | code_aster, salome_meca course material

Choosing the linear solver

via the keyword SOLVEUR / METHODE, Relevant depending on the problem

Direct solvers

MUMPS (MUltifrontal Massively Parallel sparse direct Solver): Default method. external

solver. Slightly broader scope than MULT_FRONT. Provides access to parallelism.

MULT_FRONT (multi-frontal): Universal solver, very robust. Not recommended for mixed

models of X-FEM, incompressible ...

Page 27: A simple mechanical study - Code_Aster

27

4. Solving the problem

Setting of solving operators

GNU FDL licence | code_aster, salome_meca course material

Choosing the linear solver

via the keyword SOLVEUR / METHODE, Relevant depending on the problem

Iterative solvers

GCPC (Preconditioned conjugate gradient): recommended method for thermics. Useful for

well conditioned, large problems.

PETSC: external multi-method solver. Very fast and robust when associated with pre-

conditioner LDLT_SP. Provides access to parallelism.

Page 28: A simple mechanical study - Code_Aster

28

4. Solving the problem

Setting of solving operators

GNU FDL licence | code_aster, salome_meca course material

Use of parallelism

Choose SOLVEUR=_F(METHODE=‘MUMPS’) or

SOLVEUR=_F(METHODE=‘PETSC’)

Choose a MPI version of code_aster

Choose the number of processors

Moderate parallelism: Up to 8 processors, the gains are virtually guaranteed for large

enough problems (50000 unknowns)

Massive parallelism: for huge studies (Exemple, 200 millions DOF and 2000 time steps

during 5h with 2000 processors

Page 29: A simple mechanical study - Code_Aster

Outline

1. Introducing a simple study

2. Starting the study

3. Data settings

4. Solving the problem

5. Post-processing the resultsGNU FDL licence | code_aster, salome_meca course material

Page 30: A simple mechanical study - Code_Aster

30

5. Post-processing the results

Results in code_aster

GNU FDL licence | code_aster, salome_meca course material

Page 31: A simple mechanical study - Code_Aster

31

5. Post-processing the results

Results in code_aster – fields, tables, functions

GNU FDL licence | code_aster, salome_meca course material

Fields: CALC_CHAMP / CREA_CHAMP

Tables: POST_ELEM / CREA_TABLE / CALC_TABLE /

POST_RELEVE_T / MACR_LIGN_COUPE

Functions: RECU_FONCTION

Page 32: A simple mechanical study - Code_Aster

32

5. Post-processing the results

Results in code_aster – Output files

GNU FDL licence | code_aster, salome_meca course material

IMPR_RESU

Meshes / Fields / Data contained in a result data structure.

Different formats: RESULTAT / ASTER/ MED / GMSH/ IDEAS

IMPR_TABLE

Different formats: Print the contents of a table in a listing or an Excel file, also plot

curves

IMPR_FONCTION

Extract the evolution of a quantity as a function of another

Formats ‘TABLEAU’ or ‘XMGRACE’,

Page 33: A simple mechanical study - Code_Aster

33

5. Post-processing the results

Results in code_aster – Post-process

GNU FDL licence | code_aster, salome_meca course material

Page 34: A simple mechanical study - Code_Aster

34

5. Post-processing the results

Results in code_aster

GNU FDL licence | code_aster, salome_meca course material

Single field, single physical quantity: cham_gd

Type;

Several components;

A single access number (no time step for example).

Result data structure: resultat

Gathering several fields of quantities in a given physics;

Several access numbers;

Parameters (depending on the model).

Page 35: A simple mechanical study - Code_Aster

35

5. Post-processing the results

Results in code_aster - Fields

GNU FDL licence | code_aster, salome_meca course material

Naming rule XXXX_YYYY :

Four first characters: name of the quantity (SIGM, EPSI, ERRE, etc);

Four last characters : location (NOEU, ELGA, ELNO or ELEM).

Examples:

Exception! DEPL, VITE, ACCE

SIEQ_ELNO, SIGM_ELNO

Page 36: A simple mechanical study - Code_Aster

36

5. Post-processing the results

Results in code_aster - Fields

GNU FDL licence | code_aster, salome_meca course material

Location of the values:

Fields on nodes (NOEU) ;

On the elements: (ELGA) (ELNO) (ELEM).

Page 37: A simple mechanical study - Code_Aster

37

5. Post-processing the results

Results in code_aster – Data structure resultat

GNU FDL licence | code_aster, salome_meca course material

Produced by resolution operators

The type depends on the operator:

EVOL_ELAS (linear mechanics), EVOL_NOLI (non-linear mechanics), EVOL_THER

(linear thermics), MODE_MECA (modal analysis), ...

At each computation step, one or more fields are stored in the

data structure resultat

Fields are identified by access variables: INST, NUME_ORDRE, FREQ, NUME_MODE, ...

Examples of stored fields

Temperatures for a list of time steps / Displacements for the first n modes

Displacements and stresses for a list of time steps

Page 38: A simple mechanical study - Code_Aster

Outline

1. Introducing a simple study

2. Starting the study

3. Data settings

4. Solving the problem

5. Post-processing the resultsGNU FDL licence | code_aster, salome_meca course material

Go

further !

Page 39: A simple mechanical study - Code_Aster

39

Go further

Redo this study with assistant

GNU FDL licence | code_aster, salome_meca course material

Step 1: Choose the type of your study

Page 40: A simple mechanical study - Code_Aster

40

Go further

Redo this study with assistante

GNU FDL licence | code_aster, salome_meca course material

Step 2 : Edit et/or add commands

Page 41: A simple mechanical study - Code_Aster

41

Go further

Analysis summary before the launch

GNU FDL licence | code_aster, salome_meca course material

Verifier the data setting of the study

Page 42: A simple mechanical study - Code_Aster

42

Go further

Calculation information

GNU FDL licence | code_aster, salome_meca course material

Follow-up

Page 43: A simple mechanical study - Code_Aster

43

Go further

Study with several stages

GNU FDL licence | code_aster, salome_meca course material

Good practice for several cases:

Analysis + Post-processing

Thermal analysis + mechanical analysis

Page 44: A simple mechanical study - Code_Aster

44

Go further

Calculation information

GNU FDL licence | code_aster, salome_meca course material

Messages : find the error quickly (only redo post-processing)

Page 45: A simple mechanical study - Code_Aster

45

Go further

Calculation information

GNU FDL licence | code_aster, salome_meca course material

Messages : find the error quickly (only redo post-processing)

Page 46: A simple mechanical study - Code_Aster

46

Go further

Results view in Post-Process

GNU FDL licence | code_aster, salome_meca course material

Page 47: A simple mechanical study - Code_Aster

47

Go further

Access to other modules

GNU FDL licence | code_aster, salome_meca course material

MESH: dynamic link

(Post-Process =>)ParaVIS

ADAO

OpenTurns

Variables

One value (Table in Numpy format) => Launch to verfify

(Click CurrentCase) Export to OpenTurns

Page 48: A simple mechanical study - Code_Aster

End of presentation

Is something missing or unclear in this document?

Or feeling happy to have read such a clear tutorial?

Please, we welcome any feedbacks about Code_Aster training materials.

Do not hesitate to share with us your comments on the Code_Aster forum

dedicated thread.

GNU FDL licence | code_aster, salome_meca course material

Page 49: A simple mechanical study - Code_Aster

49

Appendix

Special commands

GNU FDL licence | code_aster, salome_meca course material

DEBUT command

Begins execution, previous lines are ignored

POURSUITE command

Restarts execution from a database provided as an input

Useful to continue a calculation initiated with the same version of code_aster

Recommended to separate the calculation from the post-processing

FIN command

Ends the command file and ends the run, following lines are ignored

Closes the database at the end of execution

Specifies the format used for the produced base: HDF or Aster

Calculation: DEBUT() … FIN()

Post-processing: POURSUITE() … FIN()

Page 50: A simple mechanical study - Code_Aster

50

Appendix

Functions and time stepping

GNU FDL licence | code_aster, salome_meca course material

Functions

Define a real or complex function of a real variable

Usually for the loading or boundary conditions, which depends on space or time

Time stepping

Time list for the calculation

Time management for the iterative algorithms

FUNC = DEFI_FONCTION( NOM_PARA = ‘Y’,

VALE = ( 0.0, 200000.0, 4.0, 0.0) )

listr = DEFI_LIST_REEL( DEBUT = 0.0,

INTERVALLE = _F( JUSQU_A = 10.0,

NOMBRE = 10 ) )

time = DEFI_LIST_INST( DEFI_LIST = _F( LIST_INST = listr,) )