A Introduction To Finite Elements Based On Examples With Cast3m
A Introduction To Finite Elements Based On Examples With Cast3m
A NDREI C ONSTANTINESCU
[email protected]
1
Contents
1 Introduction 4
1.1 Historical remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Linux Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Windows Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 Running castem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.5 Structure of the program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2 Meshing 12
Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.1 General settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2 Examples of 2D mesh creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3 Example of a 3D mesh creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.4 Deformation of meshes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.5 Import and export of meshes, format exchange . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.6 Numbers and mesures for meshes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5 Elastoplasticity 34
Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.1 Plasticity - programming of a incremental algorithm . . . . . . . . . . . . . . . . . . . . . . . 34
5.2 Plasticity - computation using pasapas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
2
6 Input and output 41
Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
6.1 Cast3m objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
6.2 Graphics and plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
6.3 exte[ieur] calling an exterior program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
6.4 chau[ssette] dynamic link with another program, server . . . . . . . . . . . . . . . . . . . 43
6.5 Reading and writing data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
6.6 util: reading subroutines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
6.7 Meshes and file format exchange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Exercices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3
1 Introduction
The CEA - Commisariat à l’énérgie atomique, Saclay, France (http://www.cea.fr) is a french government-
funded technological research organisation, which has developped in the past twenty years a dedicated toolbox
for finite element computations Cast3M. The toolbox contains the essential elements in order to perform a fi-
nite element computation. Its main application area is mechanics including elasticity, elasto-visco-plasticity
material behaviour and analysis adapted for equilibrium, buckling, vibration or dynamics problems. Other ap-
plication areas include thermak, hydraulic or elactromagnetic analysis. Its modular character permits program
new application in an easy and confortable manner, which make the tool adapted for coupled multiphysics
problems.
Cast3M is based on family of objets, i.e. data structures and a lexicon of operators, i.e. elementary oper-
ations acting on the given objects. ogether they form specific programming language called gibiane:. The
code itself is written in an extended Fortran called esope which permit a direct handling of the specific data
structure.
The website: http://www-cast3m.cea.fr/ contains a general presentation of the code, example files,
online and downloadable documentations. Downloadable versions for Linux and Windows of the computer
code are available for a non-commercial usage of the program. The source code can also be recovered after a
previous acceptance by the CEA.
For Mac OS users there is no official release. However Pierre Alain Boucard from the LMT laboratory at
ENS-Cachan has complied a version with the adapted libraries and provides kindly dowloadable versions on
his website: http://www.lmt.ens-cachan.fr/temp/CAST3M06-OSX.zip (G4/G5)
http://www.lmt.ens-cachan.fr/temp/CAST3M06_OSX_Intel.zip (Intel et 10.4)
http://www.lmt.ens-cachan.fr/temp/CAST3M07_OSX_Intel.zip.
We start from the assumption that the code is already installed in the directory cast3m_dir. Some of the
subdirectories are:
• bin - containing the binary files and the bash-script: castem launching the binaries.
• data - contains a series of files which will be linked with the binary at each execution. They contain
informations about errors, procedures, documentation.
• dgibi - a large collection of batch-tests of the operators which can be used a basis for examples
• docs - contains the documentation in both pdf and html formating. It is pratical to link the favorite
webbrowser to the pages containing the lists of operators:
4
cast3m_dir/doc/html/doc-ang.html help files in english
cast3m_dir/doc/html/doc-fra.html help files in french
• docs/pdf In this directory we can retrieve a series of explanatory documents written about the example
files or as short introductory lectures. Let us point the introduction to Cast3m written in english by Fi-
choux [2]: cast3m_dir/doc/pdf/beginning.pdf are interesting documents are the structured
list of operators, the annotated examples files, etc.
All documents and examples are also in free access on the Cast3m website, were the example files and the help
information can equally been found using a search engine.
The file structure of the Windows installation is equivalent with the Linux installation, the difference relies
only in the definitions of paths in Windows versus Linux, where
becomes /.
When installing the program, its is important to pay attention to several details specified in the README (resp.
LISEZMOI) files:
• the creation of the C:\tmp directory for swapping data during the computation, and
• the creation of the environmental variable CASTEM=cast3m_dir. If the home directory lies in the
C:\Program Files\cast3m directory the variable should become: CASTEM=C:\Progra˜1\cast3m
5
1.4 Running castem
Linux
In the Linux environment, the castem program is launched usually in a shell terminal (xterm, ...):
6
This command launches castem and ex- [andrei@rhea Test] $ castem -m XL myfile.dgibi
ecutes in a first step the commands found Le fichier de debordement se trouve dans :
in the file pressure.dgibi. /local/tmp
Technically the program copies the
file myfile.dgibi into fort.3 (called ..............
logic unit UNITE 3) and reads this file. &&&&&&&&&&&&&&&&&&&&&&&&&&
In a second step the program waits for $ * * myfiles content
the commands to be types in the castem- $ * is read here
shell as in the example before. $ *
Technically the program will copy the ........
commands typied in the shell into the $ * end of myfile;
fort.98 (called logic unit UNITE 98) $
*
and reads this file line by line.
$
Once the program is started as in the examples before with several command should be remembered:
• typing the command opti donn 5; in myfile.dgibi stops its reading and returns the hand to the user
in the castem-shell.
• typing the command opti donn 3; in the castem-shell returns the hand from the user to the reading
unit 3, i.e. the myfile.dgibi file.
From the programming point of view Cast3M differentiats two levels of programming:
• a compiled low level language : ESOPE. This language will be invisible for the normal user, its the
language of the creators of Cast3M. As explained earlier its just a derivation of the classical F ORTRAN
language enriched with operations for the manipulation of specific objects (creation, copy, removal, . . . of
data structure).
7
• a high level interpreted language : gibiane:, formed by a lexicon of operation which permits an easy
usage of the code and which is the language of the normal user as examplifyed in this text.
From this point of view, Cast3M is comparable with codes like Mathematica, Matlab, Scilab, Octave,
Mapple, ..., ESOPE beeing the langauge of the creator and gibiane: the language of the user.
a + b * c = (a + b) * c
a + b * c =!= a + (b * c)
• The program is not able to distinguish between upper and lower case characters, as an example we note
that vibr is equivalent to Vibr or VIBR.
• Tabbing spaces TAB and special invisible charcters in editors should be avoided as they might create error
in the file reading.
• Files containing commands in the gibiane language are simple ASCII text files as created by most of the
common editors like: nedit, xemacs, . . . under the Linux operating system or notepad under Windows.
Downloading and installation instructions for configuration files for enableling the syntax highlightning
of the editors for crimson (Windows) or emacs, nedit (Linux) are found at the follwoing webpage:
http://www-cast3m.cea.fr/cast3m/xmlpage.do?name=utilitaires
1
Most of the names of operators derive from the french common word defining it.
8
Objects are numerical or logical values organised in different data structures describing mathematical and
physical fields.
We find classical objects defining numbers:
• flottant is real number which can be described for example either under the 123.4 or the 1.234e2
= 1.234 × 102 form;
• logique are logical objects used in boolean operations with two values: VRAI meaning true and FAUX
meaning false.
• listenti[er] is a list of integers, which can be assembled using the lect[ure] operator:
• listreel is a list of real numbers, which can be assembled using the prog[ramer] operator:
• listmots (mots, en. words) is a list of strings, which can be assembled using the mots operator:
Another class of objects are typical for describing a finite element computation, for example :
• the maillage (mesh) is described by an element type SEG2, TRI3, QUA4, ..., a list of nodes (geo-
metrical points) and their connectivity;
• a chpoint, i.e. "champ par point" (field defined on points) is a scalar, vector or tensor field defined on a
domain described by its values at the nodal points of a mesh. Typical examples are the temperature, the
displacement, . . . ;
• le mchaml, i.e. "champs par élément" (fields defined on elements) is a scalar, vector or tensor field defined
on a domain described by its values at specific points of each element of the mesh. Specific points are
fore example the Gauss integration points, where the values of stresses, strains or temperature gradients
are definied in finite elements proframs.
9
• la rigidité (stiffness) is a stiffness matrix containing eventually a series of preconditioners.
• droi[te],cerc[le] surf[ace], dall[er], i.e. ligne, cercle, surface and tilling respectively con-
struct lignes, circles and surfaces starting from given points or contours.
• the plus (plus) operation performs a translation of a given vector and applies both to a mchaml type
object and a geometry type object;
• reso[ut] (solve) solves the algebraic equation KX = Y , with K a simetric positive definite matrix of
the rigidité (stiffness) type and X et Y fields defined at the nodes (chpoint).
• masq[uer] performs a selection of the values of a field defined on nodes, chpoint, or on the elements
mchaml with respect to user defined criterion.
• repe[ter], fin (repeat, end) define a loop and correspond to the do, enddo statements of C,F ORTRAN ,. . . ;
• debpr[ocedure] (debut procédure) and finp[roc] (fin procedure) define a the "procédure" in gibiane
which is the equivalemnt of subroutine end or function end in classical C,F ORTRAN ,. . . ;
A series of the existing operators are complex manipulations of the existing data structure and are themselves
writen in gibiane. For example:
• pasapas (step-by-step) solves incrementally nonlinear problems under the small and large strain as-
sumption like contact, elastoplasticity, etc. .
• The buckling problem is the eigenvalue problem KX − λK G X = 0 with K and K G the stiffness
and the geometrical stiffness matrixes. The flambage (buckling) operator is only a gibiane subroutine
which passes the needed information to the basic vibr[ation] operator which solves the eigenvalue
problem.
10
In the next chapters, we shall present a series of programming examples illustrating on the one hand side the
usage of the castem environnement and on the other hand side the programming of some classical algorithms
of the finite element theory. However, from the practical point of view, one should not forgot that most of the
classical problem settings in mechanics have dedicated operators already programmed in castem.
11
2 Meshing
Outline
This chapter is devoted the the discussion of mesh creation. We review the basic commands and show a
series of examples one two or three dimensional bodies embedded in a two or three dimensional space.
The first setting defines the dimensions of the working space and the coordinate system. These general
settings are defined through the opti operator.
The finite element theory uses fields defining their values at nodal at specific points of elements. Elements
are simple geometrical figures, i.e. triangles, quadrangles, . . . , cubes, pyramides, . . . . The set of elements will
represent the continous body and the associated data structures are given by the (i) nodal coordinates and (ii)
the list of connectivities defining the set of nodes for each element.
Depending on the type of the object we can define different types of associated meshes: points, lines,
surfaces or volumes.
Mesh Options
opti ...; command for defining general settings
dime dimension of the working space
elem basic element type for the mesh
12
2.2 Examples of 2D mesh creation
The operator opti does not creat ob- opti dime 2 echo 1 elem QUA4;
jets, but definies the general settings
of the computation by using a series ldom = 1.; r = 0.1;
of key-words. Here we define a two
dime[nsion]-al space and by default a p1 = 0. 0.;
plane strain situation. The basic element p2 = ldom 0.;
is chosen by elem QUA4 to be the linear p3 = ldom ldom;
isoparametric quadrangle. p4 = 0. ldom;
The corners of the mesh are defined us-
ing their coordinates values as functions a2 = r 0.;
of the size ldom of the domain and of the a4 = 0. r;
radius r of the hole (see figure ??) a3 = (r/1.4142) (r/1.4142);
trac dom;
13
Operators for 2D mesh creation
droi[te] creates a straight line
cerc[le] creates circle defined by the center and two of its points
cer3 creates circle defined by three of its points
para[bolic] creates a parablic arc
cubp, cubt create cubic
dall[er] 2D tilling of a curved quadrangular
pav[er] 3D tilling a curved cubic enveloppe
surf[ace] creates a surface by filling its closed boundary
tran[slation] creates a surface by translation
of a ligne along a given vector
rota[tion] creates a surface by rotation
of a ligne around a point or a line
14
P4 P3
A4
P1 A P2
2
GIBI FECIT
15
program. The problem is solved by the poin[t] and elemen[t] operators as illustrated in the next lines.
Most of the commands presented in the preceding section will equally fonction in a three dimanesional
environment, creating the embedded points, lines or surfaces. We shall briefly illustrate one of the construction
commands.
16
2.4 Deformation of meshes
A mesh can be deformed to create a new mesh just by adding a desired displacement field as illustrated in
the next example.
The import and export of meshes from and towards Cast3M is of importance for a series of practical appli-
cations. This topic is discussed in chapter 6.
17
Other operators for mesh manipulation
nbel[ements] computes the number of elemnts of a mesh
nb[noeuds] computes the number of nodes of a mesh
noeu[d] defines a point using its nodal number
mesu[rer] mesures the length, surface or volume of a mesh
Summary
In this chapter we presented the creation of points, lines, surface and volumes in a twodimensional and three
dimensional space. The operators used in the chapter cover a large variety of manipulations. However they do
not represent the complet set of mesh manipulation possibilities included in castem, which can be obtained
through examples, manual pages and existing reports and documents.
Exercices
1. Hyperbolic paraboloid
The hyperbolic parabolid is a ruled surface (fr. surface reglée) generated by a line thqt pertains to two
circles. This type of structures is used as a refrigaration tower for eletricity generating plants.
Hint use the regl[er] operator
18
3 Elliptic problems: elasticity and
heat transfer
Outline
The construction of the finite elemnt solutions start with the definition of the main assumptions of the
modeling: dimension of the space, coordinate systems, plane strain or plane stress, Fourier representation of
the functions, etc.
• plane strain (defo[rmation] plan[e]). We recall that displacement fields are defined in a cartesian
coordinate system (x, y, z) under the following:
In this case automatically the names of the components of the fields are defined in the following way:
field component name
displacement UX,UY
forces FX,FY
strain EPXX, EPXY, EPYY
stress SMXX, SMXY, SMYY, SMZZ
• axial symetry (axis). We recall that displacement fields are defined in a cylindrical coordinate system
(r, θ, z) under the following:
u(r, θ, z) = ur (r, z)er + uz (r, z)ez
19
In a similar way to plane strain, the names of the compoenents of the fields are defined in the following
field component name
displacement UR,UZ
way: forces FR,FZ
strain EPRR, EPRZ, EPZZ
stress SMRR, SMRZ, SMZZ, SMTT
• ...
General settings
opti[on] dime n space dimension n = 1,2,3
opti[on] plan defo cartesian coordinates, plain strain
opti[on] plan cont cartesian coordinates, plain stress
opti[on] axis cylindrtical coordinates, axisymetric
opti[on] four[ier] n cylindrtical coordinates, Fourier series expansion up to n harmonics
opti[on] trid[imensional] cartesian coordinates, tridimensional
The method of solution used by Cast3M is based on the Lagrangian relaxation of the boundary condition in
displacements as explained for example in [?]. The variational principal of the preceding section transforms
into:
Applying the On rappelle que cette méthode conduit à la résolution du système linéaire suivant:
dans lequel la matrice de rigidité [K] est définie par rapport à tous les déplacements nodaux sans distinction
entre les valeurs imposées ou non par les conditions limites. Les déplacements imposés apparaissent ici en
utilisant le matrice de projection [A] et les valeurs imposées [UD ]. Les conditions aux limites en traction ainsi
20
que les forces volumiques définissent le vecteur [F].
21
Listing the components of the displacement field
shows that we obtain the attended components of the displacement filed UX and UY, and as well a new component
LX, the Lagrange multiplier which contains [T].
To obtain the underlying traction vector, we use the reac[tion] operator as in the next command:
Plots
trac[er] plots different objects
trac[er] model field plots a field defined on elements
trac[er] geometry field plots a field defined at nodes
trac[er] geometry plots a mesh
dess[iner] evolution plots the graph of a function
evolution graph of a function defined by lists of numbers
evol[ution] 'CHPO' ... extracts the evolution of a field along a path
22
The results can be postprocessed in a series of different forms as shown in the next examples.
23
To plot the components of the strain or
the stress tensor, we directly apply the trace mod sig;
trac[e] and adjoin the model in or-
der to specify the position of the Gauss
points, where the values or defined.
The load of the previous example was only defined by an imposed displacement, as a consequence the
exterieur load vector: [F] = [0] and its zero values have been automatically been completed by the program.
The next examples will show how surface traction and body forces can be imposed.
Applied Forces
forc[e] equally distrutes a given force on a set of nodes
pres[sion] computes the nodal force distribution for a given pressure distribution
coor[donnees] computes the coordinate fields of a given mesh
mass[e] computes the mass matrix
manu 'CHPO' constructs a nodal field
24
Creation of ’stiffness matrixes’
rigi[dite] creates stiffness matrix
mass[e] creates mass matrix
cond[uctivite] creates conductivity matrix
capa[cite] creates capacity matrix
conv[ection] creates stiffness coresponding to convection boundary condition
The main operators for the construction of applied forces are forc[e] and pres[sion] (fr. pressure).
pmax (a2p − x2 )
if ||x|| < ap
p(x) =
0 if ||x|| ≥ ap
25
3.3.4 Body forces
In the poreceding subsections we have mentioned that spatially varying boundary tractions can be easily
defined using the coor[donnes] and masq[er] commands. A similar setting will permit to define varying
material parameters as illustrated in the next lines of programming for an elastic problem. The first example
illustrates an square inclusion in a domain, while the second example illustrates a continously varying distribu-
26
tion.
Manipulation of fields
chan[ger] changes field type by interpolation
manu[el] creates new objects
nomc changes name of component
27
3.4 Thermal equilibrium - castem problem setting
3.5 Exercices
• check the stress distribution for all types of applied forces, i.e. body force, applied pressure applied
surface pressure and tangential traction
• compute the solution applying a given linear momentum (resultant force) on the upper face of the
plate using both forc[e] and the pres[sion] operators. Explain the difference !
Suppose now that we dispose of a law correlating a material property P with temperature θ (for example
consider the young modulus E(θ) or the dilation coefficient α(θ)).
The question we would like to answer next is: how to compute the spatial distrubution of of P in the
presence of an inhomogenous temperature distribution θ(x), i.e.
P (x) = P (θ(x))
29
4 Parabolic problems: transient heat
transfer
Dans cette section on reprend les équations de la conduction thermique en régime instationnare discutés en
chapitre ?? et on va étudier un exemple d’échauffement de la plaqué trouée.
Ce type de problème peut être résolu numériquement en utilisant l’opérateur pasapas de Cast3M comme
présenté dans les fichiers exemple du code. Dans la suite on va partir de la formulation discritisée en espace en
en temps (voir ??) et montrer les pas de programmation de l’algorithme en utlisant le langage GIBIANE.
30
qui permet de déterminer Tn+1 connaissant Tn+1 . θ ∈ [0, 1] est un paramètre.
Ensuite on calcule les matrices inter- Matnpun = ((1./dt) * MM) et (theta * KK);
venant dans l’algorithme, i.e. dans Matn = ((-1./dt) * MM) et ((1 - theta) * KK);
l’équation (??).
fin boucle;
Comme example d’analyse dynamique, on reprend ici les équations de l’élasticité linéaire en régime dy-
namique et on va présenter la programmation de l’algorithme de Newmark (voir ??) en langage GIBIANE.
Comme pour le problème thermique instationnaire, ce type de problème peut être résolu numériquement en
utilisant l’opérateur pasapas de Cast3M. Une variante qui utilise un algorithme fondé sur une projection du
champ des déplacements sur une base modale est également disponible avec l’opérateur dyne.
31
On rappele que la famille d’algorithmes présentée précedement repose sur l’équation:
32
qui permet de déterminer Tn+1 connaissant Tn+1 . θ ∈ [0, 1] est un paramètre.
Ensuite on crée le modèle et le matériau. mod = dom mode mecanique elastique isotrope;
mat = mod mate 'RHO' 1. 'YOUNG' 1. 'NU' 0.3;
Les paramètre du calcul: pas de temps ndt = 200;
dt et les paramètres de l’algoritme β et γ dt = 1.;
sont choisies pour assurer la convergence
et la stabilité du calcul ??. beta = 0.25;
gamma = 0.5;
On défini les conditions aux limites: AA = bloq depla dgauche;
• extremité gauche: barre encastré
F = table;
• extremité droite: un créneau tem- F . 0 = force ddroite (0. 0.);
porel de force pendant quelques F . 1 = force ddroite (-1. 0.);
instants F . 2 = force ddroite (-1. 0.);
On assemble les matrice de rigidité [K] KK = rigi mod mat;
et de masse [K] et on calcule la matrice MM = mass mod mat;
[S] la seule qui va être inverse pendant
l’algorithme. et de masse SS = MM et (( beta * (dt ** 2.)) * KK );
* ** calcul de l'acceleration
ddU . (n + 1) =
reso (SS et AA) ((F.(n+1)) - (KK * Upred));
33
* ** correction et actualisation
Outline
L’exemple présenté ensuite se restreint volontièrement à un calcul élastoplastqiue avec une matrice de
rigidité constante avec similaire à l’algorithme de la section ??. Dans cette version on utilise l’opérateur
ecou[lement] pour le calcul de l’incrémént des contraintes et des variables internes. Pour l’instant on ne
34
calcule donc pas explicement en langage gibiane le retour radial.
On demarre d’un domain dom carre sur dom = dall d12 d23 d34 d41;
lesquel on défini le chargement suivant:
u1 = 0.; u2 = 0.01; ndt = 8;
• déplacement imposé:
uy |d34 = tu1 ux |d12 = tu2 AA1 = (bloq uy d34 ); AA2 = (bloq ux d23);
AA3 = (bloq uy d12) et (bloq ux d41);
• conditions de symétrie sur ...
AA = AA1 et AA2 et AA3;
• surfaces libres ailleurs FF1 = depi AA1 u1; FF2 = depi AA2 u2;
t ∈ [0, 1] désigne le parametre du temps
fictif. Le chargement est imposé en ndt
FF = table;
pas de longeurs égales.
repeter boucle (ndt + 1);
Les matrices de rigidité associées aux
n = &boucle - 1;
blocages sont AA1, AA2, AA3 et AA et FF . n = ((flot n) / ndt ) * (FF1 et FF2);
les forces imposées sont stockées pour fin boucle;
chaque pas de temps n dans un vecteur
force FF . n appartenant à la table FF.
On défini premièrement les paramètres
du comportement: EE = 2.e11; nu = 0.3;
sigy = 600.e6;
• le module de Young EE et le coef-
H = 2000.e6;
ficient de Poisson nu
• la limite élastique sigy et le mod- mod = mode dom mecanique elastique
ule d’écrouissage H plastique cinematique;
mat = mate mod'YOUNG' EE 'NU' nu 'H' H 'SIGY' sigy;
Et ensuite on va associé un com-
portement élastoplastique cinématique
KK = rigi mod mat;
à écrouissage isotrope par l’opréateur
mode au maillage dom. Les paramètres
du modèle sont associés aux modèle mod
par l’intermédiare de l’opérateur mate.
La rigidité KK associé à la partie élas-
tique du comportement est calculé en
utilisant l’opérateur rigi comme dans le
cas élastique, donc associé à EE et nu.
tol_res est la tolérance accépté pour
l’équation d’équilibre et est actuellemnt tol_res = 1.e-3;
le seul paramètre du calcul.
Les tables des déformations plastiques UU = table; sig = table;
des variables internes des déplacement epsp = table; alpha = table;
sont intialisées en uitilisant les opéra-
UU . 0 = manu chpo dom 2 ux 0. uy 0.;
teurs table pour la structure de liste
epsp . 0 = zero mod 'DEFINELA';
généralisée et par zero pour la valeur alpha . 0 = zero mod 'VARINTER';
initiale à t = 0. sig . 0 = zero mod 'CONTRAIN';
UU . n = UU . n + du;
deps = epsi mod du;
A l’intérieur de la boucle it_char
des incréments du chargement on con- repeter it_equi max_ip;
struit une nouvelle boucle it_equi.
A l’intérieur de celle-ci on trouve le nsig nalpha ndepsp =
ECOU mod (sig . n) (alpha . n) deps mat;
calcul dce l’incrémént des variables
internes si nécessaire, ceci est réal- sig . n = nsig; alpha . n = nalpha;
isé par l’intermédiaire de l’opérateur epsp . n = ndepsp;
ecou[lement] et puis la vérification de
l’équilibre.
36
5.2 Plasticity - computation using pasapas
In this section we shall illustrate the usage of the standard castem command pasapas (fr. step-to-step)
command, which enable to compute the solution of an nonlinear problem. The case discussed next will be that
of an elastoplastic problem. In the example we shall refer to the already defined geometry of the plate with a
circular hole (see chapter ?? and ?? ) and will directly start with the definition of the material, the boundary
conditions.
Model and laoding history
37
The computation using pasapas
• Nplas
• Critere
• Deps.max
• Eps.max
• Crit.flex
Calcul MECANIQUE
*** PLASTICITE ***
*** CONVERGENCE FORCEE ***
38
Pas d incr\uffffment de charge, initialisation calcul\uffffe avec le temps
Initialisation \uffff partir de la solution precedente Coeff 0.0000
1 35 0.50000 8.40624E-06 2.14937E-03 0.50000
2 34 1.17475E-04 8.79403E-06 2.15165E-03 1.17475E-04
3 34 8.47313E-05 1.14535E-05 2.15337E-03 8.47313E-05
****** CONVERGENCE A L ITERATION 3
....
39
Analysis of the results
After the completetion of the pasapas computation a series of results can be analysed.
Outline
41
The presented version of the sauv[er] command realises an export file in a binary format. The output can
equally be written in a txt format if the option format is called. For more information see the help file of the
sauv[er] command.
Graphics created with the trac[er] or the dess[iner] command can be saved in a P OSTSCRIPT format
in an external file. The steps are the following:
• click succesively the following quadrangles in the castem graphics window:(i)Softcopy (ii) choose one
of the formats Framemaker, Postscript couleur (colour), Postscript NB (black and white).
• all succesive graphic outputs will be saved in a single file temporary file in the working directory called
fort.24. This file will be copied after the end of the castem run in one of the following files:
• the classical drawing and image processing softwares like: A DOBE P HOTOSHOP, A DOBE I LLUSTRA -
TOR , C OREL D RAW , G IMP (free), I MAGE M AGICK (free), etc.
42
6.3 exte[ieur] calling an exterior program
43
The @excel1 procedure, writing to a file
The @excel1 procedure is a user defined subroutine which permits to save an evolution object in a stan-
dard E XCEL format. The subroutine was written by Christian Laborderie in 1994 and gratiously give to the
castem community.
We shall briefly analyse the procedure, which can than be used as an inspirational model for creating other
similar output programs.
In the preceeding section we have been analysing an example of a procedure, i.e. a subroutine or a function
when refered in classical programming languages. For programming convenience one can group a series of
subroutines in an external file. If the file is correctly uploaded using the util[sateur] procedure (maning user
in french) the subroutine will appear in the following runs of the program as already complemented castem
commands.
44
The file containing the procedures should be organized as follows:
Once created one can include the procedure using the following commands:
The import and export of meshes from and towards Cast3M is of importance for a series of practical appli-
cations. This topic is discussed in chapter 6.
This can be performed using the standard castem commands lire, sortir (see example of the next
chapter) or by using for example a series perl scripts kindly proposed by Laurent Champaney [1]. The tools
permit exchanges between mesh formats of the following finite element programms, pre- or postprocessors
Abaqus, Cast3m, GMSH, Nastran, SAMCEF, etc.
45
Next we present a series of standard Cast3m commands for mesh export and import.
Exercices
46
7 How to and other questions
47
Bibliography
[1] L. Champaney. Outils personnels (exchange tools for finite elemnt programs).
http://laurent.champaney.free.fr/perso/outils.html.
[2] P. Fichoux. Presentation et utilisation de castem 2000. Technical report, ENSTA, 1998.
48
Index
49
heat, 27 read lire, 44
real number flottant, 8
if si, 9 recover data from file rest[ituer], 40
integer entier, 8 repe[ter] , 39
inve[rser] (change order), 12 repe[ter] (do, end), 43
lect[ure], 8 repe[ter] (do, start), 43
line droi[te], 9 repe[ter] (do), 9
line droit[e], 12 repe[ter] (loop, end), 43
lire (read), 44 repe[ter] (loop, start), 43
listenti[er], list of integers, 8 reso[ut] (solve), 9, 20, 27
listmots, list of strings, 8 rest[ituer] (recover data from file), 40
listreel, list of real numbers, 8 rigi[dite] (stiffness), 20
logical value logique, 8 rigidite (stiffness), 9
logique (logical value), 8
loop, end repe[ter], 43 sauv[er] (saving data in file), 40
loop, start repe[ter], 43 save graphics, 41
saving data in file sauv[er], 40
maillage (mesh), 8 select elements elem[ent], 15
manu[el] (creates fields and other objects), 26 select points or nodes poin[t], 15
mask, characteristic function masq[uer], 9 settings opti[on], 11
masq[er] (characteristic function), 24 si (if), 9
masq[uer] (mask, characteristic function), 9 sigm[a], stress , 22
material maté[riaux], 20 sinon (else), 9
maté[riaux] (material), 20 solve reso[ut], 9, 20, 27
mchml (change from nodal to element field), 26 sortir (write), 44
mesh maillage, 8 step-by-step, incremental problem pasapas, 9
mess[age], 43 stiffness rigi[dite], 20
mesu[rer], mesures length, areas and volumes, 16 stiffness rigidite, 9
Mises stress norm (von Mises) vmis[es], 23 strain, epsi[lon] , 22
mode[le] (model), 20 stress, sigm[a] , 22
model mode[le], 20 stress, von Mises, vmis[es] , 23
mots, 8 string , list of strings8
subroutine file, util[isateur] debp[procedure], 44
nbel[ements], computes the number of elements, 16 subroutine, end debp[procedure], 43
nbno[euds], computes the number of nodes, 16 subroutine, start debp[procedure], 43
nodal field chpoint, 8
subroutine; end finp[roc], 9
nodal force , bsig[ma], 22
subroutine; start debpr[ocedure], 9
opti[on] (settings), 11 surf[ace] (surface), 9
surf[ace], meshes a closed line, 13
pasapas (step-by-step, incremental problem), 9 surface surf[ace], 9
plane strain defo[rmation] plan[e], 18
plot trac[er], 9 thermique, 27
plus, new mesh by a adding a displacement, 15 tilling 2D dall[er], 12
plus, 9 tilling dall[er], 9
poin[t] (select points or nodes), 15 trac[er] (plot), 9
prog[ramer], 8 trac[er], graylevels, 41
50
trac[er], save graphics, 41
util[isateur], 44
vibr[ation], 9
vmis[es] (Mises stress norm (von Mises)), 23
write sortir, 44
51