Code_Aster ®
Version
5.0
Titrate:
Projection of a field on a grid
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
1/12
Organization (S): EDF/MTI/MN
Handbook of Référence
R7.20 booklet: Projection of results or measurement
Document: R7.20.01
Projection of a field on a grid
Summary:
Command PROJ_CHAMP makes it possible “to project” fields known on the nodes of a grid (ma1) on
nodes of another grid (ma2).
In this document, one describes the 3 accessible methods of projection in this command.
The paragraph [§5] gives some elements of validation of these methods.
Handbook of Référence
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A

Code_Aster ®
Version
5.0
Titrate:
Projection of a field on a grid
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
2/12
1
General information on command PROJ_CHAMP
Command PROJ_CHAMP makes it possible to project a field known with nodes (CHAM_NO) of a grid
(ma1) on the nodes of another grid (ma2) [U4.72.05]. In general, the 2 grids (ma1 and ma2)
are “incompatible”; i.e. the nodes of ma2 are not confused geometrically
with the nodes of ma1. One does not treat the fields “by element” (CHAM_ELEM).
3 methods of projection are currently available:
METHODE: “ELEM”
METHODE: “NUAGE_DEG_0”
METHODE: “NUAGE_DEG_1”
Method “ELEM” uses the functions of form of the elements of the grid ma1. It is detailed with
paragraph [§3].
The 2 other methods use a smoothing of the values of the field in the vicinity of the point where one wants
to project the field. These 2 methods are detailed in the paragraph [§4].
2
General operation of the command
For 2 methods “NUAGE_DEG_0/1” the command makes it possible to project one field. In
revenge, with method “ELEM” one projects the whole of the fields of a structure of data
result (evol_ther, evol_noli,…).
Whatever the method, the user with the possibility of projecting only one “piece” of field on one
“piece” of the grid ma2. This possibility is offered by the key word factor VIS_A_VIS. A piece
of field is the restriction of the field on a whole of nodes (or meshs) of the grid ma1. One
piece of the grid ma2 is a subset of the nodes of ma2.
The basic problem to solve is thus the following:
That is to say a field ch1 known, on the nodes of a subset of a grid ma1, how to calculate it
field ch2 on the nodes of a subset of another grid ma2?
In the continuation to simplify the talk one will not speak any more a subset of a grid, one will make
as if one projected all the grid ma1 on all the grid ma2.
Notice on the vocabulary:
The word “to project” is sometimes ambiguous in this document.
When one says “to project” the field of ma1 towards ma2, one seeks the knowing field on ma2
that on ma1: projection goes from 1 towards 2.
For method “ELEM”, it is necessary to find for each node N2 of ma2 which is the point of
ma1 which occupies the same position that N2, for that one projects the node N2 on the grid
ma1: projection goes from 2 towards 1.
Handbook of Référence
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A

Code_Aster ®
Version
5.0
Titrate:
Projection of a field on a grid
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
3/12
3 Method
“ELEM”
3.1
algorithm implemented
One loops on all the nodes of the grid ma2:
for each node (N2), one proceeds in 3 stages:
1) One seeks which is the mesh m1 of ma1 which “contains” the node N2 geometrically,
2) one determines the N2 position in m1 (i.e his co-ordinates in the element of reference
associated the mesh m1),
3) one uses the functions of form of the mesh m1 to determine the value of the field on N2
knowing the value of the field on the nodes of m1.
3.1.1 Notice
The third stage shows that this method supposes that all the nodes of the mesh m1 know
the field to be projected. For example, one could not project a field which would carry degrees of
freedom different on its nodes “nodes” and its nodes “mediums from edge”. The projection of such
field would be possible on the other hand with the 2 other methods of projection [§4].
To use method “ELEM”, it is thus important that all the nodes of the same mesh carry
same components in the field to be projected. Practically (because of continuity of the meshs
connected between them), that wants to say that the field must be “homogeneous” on the piece of field
intended to be projected.
3.2
Encountered difficulties and their processing
For each one of these 3 stages, one will see that difficulties obliged us with simplified the problem and
thus to solve it only imperfectly.
3.2.1 Stage
1
· one does not treat the possible curvature of the edges of the elements. For example, in the figure
below (plane problem), the node N2 will be stated to belong to the mesh m1a whereas it
belongs to the mesh m1b,
m1b
N2
m1a
· if the node N2 is actually “external” with the grid ma1, one will affect the mesh m1 more to him
near to him. This behavior makes it possible to project, without stopping in fatal error, a field
on a grid whose border differs slightly from that of the initial grid (what is
always the case in practice).
Handbook of Référence
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A

Code_Aster ®
Version
5.0
Titrate:
Projection of a field on a grid
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
4/12
3.2.2 Stage
2
To find the point of the element of reference which would give by the geometrical transformation the node
N2, it is in general necessary to solve a non-linear problem, because there is only for the triangle with 3 nodes (in
2D) and for the tetrahedron with 4 nodes (in 3D) that the geometrical transformation is linear.
Not to solve this non-linear problem. One “linearizes it” by cutting out the meshs of ma1 in
linear triangles or tetrahedrons. The resolution of the problem arising is thus approximate.
Note:
To solve the non-linear problem exactly, one could think of using a method
iterative of Newton, but it would be necessary to call into question stage 1 above because the mesh m1
selected east cannot be not the maid.
3.2.3 Stage
3
One always does not use the true functions of form of the elements of the initial grid. Indeed, in
Code_Aster, in fact the finite elements choose their functions of form: a triangle of
thermics is not obliged to choose the same functions of form as a triangle of mechanics. One
element can also not need functions of form, or it can choose functions
different according to the variables to be interpolated. The formulation of the element either always does not make
to appear of element of reference and associated geometrical transformation.
For all these reasons and so that the programming of PROJ_CHAMP is independent of
finite elements present in the model, one assigns to all the meshs ma1, the functions of form
isoparametric elements 2D or 3D [R3.01.01].
Note:
The linear meshs are not treated today. One cannot thus project a field
known on 1 linear model (beam or linear hull).
3.3
Details concerning stages 1 and 2
By means of computer, stages 1 and 2 are carried out simultaneously. We will discuss
successively in the way of dealing with the 3 following problems:
· processing of a node N2 finding inside the border of the grid ma1 (case more
frequent),
· processing of a node N2 outside the border of ma1,
· processing of the case of the grids of the type “hull” (surfaces plunged in R3).
Handbook of Référence
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A

Code_Aster ®
Version
5.0
Titrate:
Projection of a field on a grid
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
5/12
3.3.1 Node
“interior” N2
To include/understand the processing of an interior node, let us take the case of a mesh 2D QUAD8 (abcd). One
start by forgetting its nodes mediums (and thus their possible curvature) then one cuts out it into 2
triangles (ABC and acd). This cutting is arbitrary (it depends on the local classification of the nodes on
QUAD8). Let us note that other possible cutting (another diagonal) would give another point in general
in the element of reference.
C
D
C
D
B
N2
N2

With
B

has
Element of reference
Real element
N2 belongs to the triangle ABC. One seeks his barycentric co-ordinates in this triangle. It is
the 3 teststemxà numbers, xb, teststemxç such as one can write: n2= teststemxà * has + xb * B + teststemxç * C
The point N2 of the element of reference retained by the algorithm will be:
N2 = teststemxà * A + xb * B + teststemxç * C
For the voluminal meshs (Hexaèdres, Pentaèdres, Pyramides and Tétraèdres), one proceeds of
even way: one forgets the nodes mediums and one cuts out the nontetrahedral meshs in tetrahedrons.
3.3.2 Node
“external” N2
A node N2 is declared external with the grid ma1 if one found no mesh for which it is
interior. When this is noted, one seeks the mesh m1 nearest to N2. The distance
calculated is that which separates the node N2 and the border from the mesh m1. Let us call p2 the point of m1 it
nearer to N2. This point can be on a face of a voluminal element or on an edge or one
node.
Example (in 2D):
With
Pa
T4
T2
B
T1
Pb
T3
Handbook of Référence
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A

Code_Aster ®
Version
5.0
Titrate:
Projection of a field on a grid
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
6/12
The node B, one associates the point Pb obtained here by orthogonal projection of B on an edge of T1.
Node A, one associates point Pa of triangle T1. One could just as easily have associated point Pa to him
T2 triangle, but that would not have changed anything since the field to be projected is known with the nodes of
grid. It is thus continuous between the adjacent elements.
Once found the point p2 of the mesh m1 which carries out the minimum of the distance with N2, one brings back oneself
with the preceding problem: the point N2 of the element of reference which will be associated N2 will be it
correspondent of p2 by the procedure of the paragraph [§3.3.1].
Note:
For a triangle (or a tetrahedron) given T, there is only one point p2 carrying out the distance
minimal between N2 and T bus T is convex. This property disappears if one took account of
curvature of the edges of the meshs. It is seen there that two simplifications of the implementation
(lapse of memory of the nodes mediums and cutting of the meshs in linear triangles) are dependant enters
they.
An external point will always have a value interpolated between the values of the nodes of the grid
ma1 and ever extrapolated; what is not the case of 2 methods NUAGE_DEG_0/1.
3.3.3 Case of the grids “hull”
When one seeks to project the nodes of a surface grid on another surface grid,
one falls in general systematically on the case from the “external” points above. Indeed,
the inaccuracy on the co-ordinates of the nodes makes that a node N2 is never rigorously in
plan of the triangles of the meshs of ma1.
It is thus the procedure of [§3.3.2] which applies:
For each node N2:
· seek triangle (or tetrahedron) which carries out the minimum of distance with N2.
Identification of the point p2 which carries out this distance,
· calculation of the point N2 of the element of reference which corresponds to p2 by the procedure of [§3.3.1].
4 Method
“NUAGE_DEG_0” or “NUAGE_DEG_1”
4.1
Principle of the method
These 2 methods are based on the same principle: one chooses a priori basic functions Fi (X, y, Z)
(here of the polynomials of degree 0 or 1). One seeks in the vector space generated by these functions of
base, the function F= (I Fi) which carries out the distance minimum (within the meaning of least squares) with
“cloud” of the known points. Once this found function, one evaluates it at the sought point.
To reduce the notations, one places oneself in 2D (but calculations can be made in the same way in
dimension 3 or more…). The field to be projected is a whole of couples (Xj, Vj) where Xj= (xj, yj) is one
node of the grid ma1 and Vj is a reality (value of the field on this node). This field constitutes the cloud
known points.
That is to say a node N2 (X, y) of the grid ma2 for which one wants to calculate the value of the field (V).
Choice of the basic functions:
NUAGE_DEG_0:
only one function: F1= 1
NUAGE_DEG_1:
3 functions: F1= 1; F2=x; F3=y
Handbook of Référence
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A

Code_Aster ®
Version
5.0
Titrate:
Projection of a field on a grid
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
7/12
In the continuation of this paragraph, one will choose NUAGE_DEG_1 so that the formulas do not degenerate
too much.
The sought function is F = 1 F1 + 2 F2 + 3 F3. One defines a kind of “distance” between F and them
couples (Xj, Vj):
D = wj (F (Xj) - Vj) 2
where the wj are the weights assigned to each couple (Xj, Vj).
One wants to minimize D compared to 3 variables 1, 2, 3. D is a quadratic function of 1, 2,
3. To minimize D amounts cancelling its derivative and thus solving a linear system with 3 unknown factors:
1, 2, 3.
When this problem is solved, one calculates:
V= 1 + 2 X + 3 y
4.2
Choice of weights of the points of the cloud
All the “easy way” of these methods is in the choice (difficult) weights wj assigned to the points of
cloud.
· it is decided a priori that the weight of a point (Xj) depends only on the distance (D) separating it
not node N2 (isotropic weighting),
· if wj is a constant, the problem does not depend any more of the unknown node N2. The function F is
single (for all the nodes of ma2): it is “the linear straight regression line” of the cloud,
· if wj (D) is a function too not very decreasing, the function F “is smoothed too much”: “accidents”
buildings “are gummed” by the great number of remote points taken into account,
· if wj (D) is a too decreasing function, one takes the risk “to catch” no point of
cloud. The numerical consequence is that the linear system to solve becomes singular (and
thus insoluble).
We chose to write W (D) like exponential decreasing parameterized by 2
parameters: dref and:
W D
E D dref
()
(/
)
= -
2
dref is a distance from reference (depend on the node N2). We will see below
how it is calculated. is a constant chosen to cancel more or less
quickly the weight of the distant N2 points. In the code, was selected to 0.75.
dref is the distance from which one wishes to see the weight of the points decreasing
quickly. In the programming, dref is calculated like the product of a distance d1
by a C1 coefficient. Today, we chose C1 = 0.45.
d1 is defined as follows:
· in 3D, d1 is the radius of the smallest ball of center N2 which contains 4 points of
cloud noncoplanar,
· in 2D, d1 is the radius of the smallest ball of center N2 which contains 3 points of
cloud not aligned.
The problem is known as “2D” if all the nodes of the grid ma1 have same co-ordinate Z, it is
known as “3D” if not.
Handbook of Référence
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A

Code_Aster ®
Version
5.0
Titrate:
Projection of a field on a grid
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
8/12
4.3
Current restriction of the programming
The 2 methods of projection NUAGE_DEG_0/1 are programmed only for the real fields (and
not for the complex fields)
5
elements of validation
To validate the 3 methods suggested, we will treat the example of the projection of a field of
temperature “unidimensional” T = T (X).
The field to be projected is worth:
T (X) = sin (3x) + Heavysi (
X -)
1
This field is affected on the nodes of a grid (ma1) linear rather coarse (14 meshs)
segment [0,2]. This field has the property to be discontinuous (in theory) at the point x=1. Because of
discretization on the grid ma1, the field only seems to vary very brutally between the 2
points x=0.99 and x=1.01
One projects this field on a grid (ma2) very fine of the same segment (300 elements length
2/300).
Handbook of Référence
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A

Code_Aster ®
Version
5.0
Titrate:
Projection of a field on a grid
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
9/12
5.1 Method
:
“ELEM”
EDF
Electricity
from France
Method: “ELEM”
1.0
0.8
0.6
before projection
Temperature
after projection
0.4
0.2
0.0
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4
1.6
1.8
2.0
co-ordinate X
agraf 13/10/2000 (c) EDF/DER 1992-1999
It is noted that with this method, the projected field is without surprised: the value obtained by
projection the is always interpolated linear one between the 2 nodes of ma1 where the field is known.
5.1.1 Quadratic initial grid
If one remakes same calculation by replacing the linear grid ma1 by a quadratic grid
(containing approximately 2 times less meshs), one finds:
EDF
Electricity
from France
Method: “ELEM”
1.2
1.0
0.8
E
erase
0.6
before projection
Temp
after projection
0.4
0.2
0.0
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4
1.6
1.8
2.0
co-ordinate X
agraf 13/10/2000 (c) EDF/DER 1992-1999
It is noted that the interpolation of the field is now parabolic between the nodes of ma1. One
thus approach better the form of the initial function.
Handbook of Référence
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A

Code_Aster ®
Version
5.0
Titrate:
Projection of a field on a grid
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
10/12
5.2 Method
:
“NUAGE_DEG_0”
EDF
Electricity
from France
Method: “NUAGE_DEG_0”
1.0
0.8
0.6
E
erase
before projection
Temp
after projection
0.4
0.2
0.0
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4
1.6
1.8
2.0
co-ordinate X
agraf 13/10/2000 (c) EDF/DER 1992-1999
It is noted that with this method, the projected field is presented in the form of a succession of small
horizontal “bearings” connected to each other. This aspect in staircase is related to the parameters (and C1) selected in
“hard” in the code for the form of the exponential decay of the weight of the points. One sees
also that the discontinuity of the initial field is very strongly gummed.
5.2.1 Influence form of exponential decreasing
On the following figure, we modified a parameter of exponential decreasing of the method
“NUAGE_DEG_0”: the parameter dref (or C1 what returns to same) was multiplied by 0.5 or 2. by
report/ratio with the value retained by the code.
EDF
Electricity
from France
Method: NUAGE_DEG_0
1.4
1.2
1.0
0.8
R
E
0.6
E
R
has
you
before projection
mp
you
0.4
dref=0.5 dref
dref= 1. dref
0.2
dref= 2. dref
0.0
- 0.2
- 0.4
0.0.0.2.0.4 0.6.0.8.1.0 1.2.1.4.1.6 1.8 2.0
agraf 13/10/2000 (c) EDF/DER 1992-1999
co-ordinate X
It is noted that the choice of dref influences the result much. If it is too large, one does not see any more
discontinuity. If it is too small, the form in aliasing is accentuated.
Handbook of Référence
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A

Code_Aster ®
Version
5.0
Titrate:
Projection of a field on a grid
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
11/12
5.3 Method
:
“NUAGE_DEG_1”
EDF
Electricity
from France
Method: “NUAGE_DEG_1”
1.0
0.5
E
erase
0.0
before projection
Temp
after projection
- 0.5
- 1.0
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4
1.6
1.8
2.0
co-ordinate X
agraf 13/10/2000 (c) EDF/DER 1992-1999
It is noted that with this method, the projected field is correct in the 2 regular zones (x<0.99 and
x>1.01).
On the other hand the discontinuity of the field between these 2 values is strongly exaggerated. This famous example
well faculty that with this method to extrapolate the values of the initial points (because of estimate of
gradient of the field).
In the 2 regular parts, the projected field is rather close to that obtained with the method
“ELEM”. It is noticed simply that method “NUAGE_DEG_1” rounds a little the angles
Handbook of Référence
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A

Code_Aster ®
Version
5.0
Titrate:
Projection of a field on a grid
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
12/12
5.3.1 Influence form of exponential decreasing
On the following figure, we modified a parameter of exponential decreasing of the method
“NUAGE_DEG_1”: the parameter dref (or C1 what returns to same) was multiplied by 0.5 or 2. by
report/ratio with the value retained by the code.
EDF
Electricity
from France
Method: NUAGE_DEG_1
1.4
1.2
1.0
0.8
T
U
Re
0.6
E
ruffle
before projection
mp
you
0.4
dref=0.5 dref
dref= 1. dref
0.2
dref= 2. dref
0.0
- 0.2
- 0.4
0.0.0.2.0.4 0.6.0.8.1.0 1.2.1.4.1.6 1.8 2.0
agraf 13/10/2000 (c) EDF/DER 1992-1999
co-ordinate X
There still, it is noted that the choice of dref is crucial for the result: too much large, discontinuity
is gummed, too small, discontinuity is exaggerated.
5.4
Choice of the best method of projection
Within sight of the some preceding curves, it appears clear that method “ELEM” is in general
preferable to methods NUAGE_DEG_0/1. This method is “natural” within the framework of the elements
stop and it does not depend on any numerical coefficient of adjustment.
Methods NUAGE_DEG_0/1 must be reserved, in our opinion, for uses a little
special:
· case
of one
grid
ma1 “non-existent”: one has only of the nodes but not the meshs (by
example, the “nodes” of ma1 are in fact of the transmitters),
· case of a field (result of a calculation or obtained by measurements) that one wants to smooth
voluntarily. But in this case, it would be necessary that the 2 numerical parameters (C1 and) are
accessible to the user what is not the case today.
6 Bibliography
[1]
I. VAUTIER: “Isoparametric Elements”, Documentation de Référence of Code_Aster
n° [R3.01.00]
Handbook of Référence
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A

Outline document