Introduction to Code_Aster

Category: Open-Source CAE | Revised 2026-10-02
CAE visualization for code aster intro theory - technical simulation diagram
Introduction to Code_Aster

Theory: command-file flow and verification

Overview

🙋

Code_Aster is free but said to be hard to master. What's different about it?

🎓

Its unusual syntax and its wealth of verification material. Code_Aster was built by EDF to assess nuclear-plant structures; analyses are written as command files (.comm), effectively Python scripts. Command names are French abbreviations (LIRE_MAILLAGE = read the mesh, AFFE_MODELE = assign the model, and so on), confusing at first. On the other hand, thousands of verification cases and their theory are published, so you can trace which cases verify a given feature — a strength other open-source codes lack. A good entry is to run the whole chain once on a simple problem with a known solution in the Salome-Meca environment: mesh, assemble commands in AsterStudy, and view results.

Command flow for a static analysis

  1. LIRE_MAILLAGE: read the mesh (MED format).
  2. AFFE_MODELE: assign element type (PHENOMENE='MECANIQUE', MODELISATION='3D', etc.).
  3. DEFI_MATERIAU, AFFE_MATERIAU: define material (Young's modulus, Poisson's ratio) and assign to mesh groups.
  4. AFFE_CHAR_MECA: apply supports (DDL_IMPO) and loads.
  5. Solve with MECA_STATIQUE, compute stresses with CALC_CHAMP and write results with IMPR_RESU.

Beam theory for comparison

$$ \delta_b = \frac{P L^3}{3 E I},\quad I = \frac{b h^3}{12},\qquad \delta_s = \frac{P L}{k G A},\quad k = \frac{5}{6},\qquad \sigma_{max} = \frac{P L\,(h/2)}{I} $$

P is tip load, L length, E Young's modulus, I second moment of area, b and h section width and height, G shear modulus, A area and k the shear correction factor.

Coffee Break Trivia

An open solver born from nuclear verification

Code_Aster has been developed at EDF since 1989 and was released as open source in 2001. Because analyses must be justified to nuclear regulators, writing verification cases and theory documents for each new feature is a development rule. The result is a rare open-source code whose quality-assurance documentation rivals commercial solvers.

Worked examples

Example 1: steel cantilever (50 mm × 100 mm, 1 kN at the tip, N-mm-MPa)

Length (L/h)Bending deflectionShear contributionTotalMax bending stress
1,000 mm (10)0.3810 mm0.0030 mm (0.8%)0.3839 mm12.0 MPa
500 mm (5)0.0476 mm0.0015 mm (3.1%)0.0491 mm6.0 MPa

E = 210,000 MPa, Poisson's ratio 0.3, second moment of area 4.167×10⁶ mm⁴. Shorter beams carry a larger share of shear deformation, so 3D element results come out slightly above beam theory.

Example 2: a unit mix-up

With an mm mesh but Young's modulus entered as 210×10⁹ (the Pa value), deflection becomes 3.81×10⁻⁷ mm — a millionth of the correct value. Code_Aster has no units, so this raises no error.

🙋

Solving with a 3D mesh, I only got about 0.30 mm deflection. What went wrong?

🎓

Suspect element order. Linear tetrahedra (4 nodes) represent bending poorly and behave too stiffly, underestimating deformation; with only a few elements through the beam depth, deflection 20% or more below theory is common. Switching to quadratic tetrahedra (10 nodes) or quadratic hexahedra should bring it near 0.38 mm at similar element counts. In Code_Aster you only make the mesh quadratic (specify quadratic elements in Salome or convert with CREA_MAILLAGE); MODELISATION='3D' stays the same. Then confirm the value stops changing as you refine, and the verification is complete. If the gap to theory is around 0.8% (the shear contribution), supports and loading are applied correctly too.

Getting started

  1. Install Salome-Meca and run one bundled example.
  2. Build the cantilever geometry and mesh and define groups for supported and loaded faces.
  3. Assemble commands in AsterStudy, fix the unit system and enter materials and loads.
  4. Compare deflection and stress with beam theory.
  5. Find official verification cases using the same features and use them as references.
Coffee Break Trivia

“An analysis with loads 1000 times too large”

In one contract analysis, Code_Aster stresses came out 1000 times the hand calculation. The mesh was in metres, but the load — meant in kN per the drawing — was multiplied by 1000 to convert to N and applied as a pressure while areas were computed in m². With a unit-free solver, the team now states at the top of each input which unit every quantity uses and first checks orders of magnitude on a known problem such as a cantilever; the mistake has not recurred.

Common mistakes

Mistakes and fixes

MistakeEffectFix
Inconsistent unitsResults off by orders of magnitudeUse N-mm-MPa or similar consistently
Linear tets for bendingDeflection underestimatedQuadratic elements
Mismatched group namesLoad not appliedCheck mesh and commands
Insufficient supportsRigid-body errorCheck DOFs
No known-solution checkErrors unnoticedVerify with a cantilever
🙋

I'd like to learn related topics.

Related Simulators

Experience the theory firsthand with the interactive simulator for this field

All Simulators

Related fields

Structural AnalysisFluid Analysis (CFD)Thermal Analysis
Rate this article
Thank you for your feedback!
Helpful
More details
Report error
Helpful
0
More details
0
Report error
0