Code_Aster
®
Version
5.0
Titrate:
Projection of a field on a mesh
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
1/12
Manual of Reference
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A
Organization (S):
EDF/MTI/MN
Manual of Reference
R7.20 booklet: Projection of results or measurement
Document: R7.20.01
Projection of a field on a mesh
Summary:
The control
PROJ_CHAMP
allows “to project” fields known on the nodes of a mesh (
ma1
) on
nodes of another mesh (
ma2
).
In this document, one describes the 3 accessible methods of projection in this control.
The paragraph [§5] gives some elements of validation of these methods.
Code_Aster
®
Version
5.0
Titrate:
Projection of a field on a mesh
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
2/12
Manual of Reference
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A
1
General information on the control
PROJ_CHAMP
The control
PROJ_CHAMP
allows to project a field known with the nodes (
CHAM_NO
) of a mesh
(
ma1
) on the nodes of another mesh (
ma2
) [U4.72.05]. In general, 2 mesh (
ma1
and
ma2
)
are “incompatible”; i.e. 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:
METHOD: “ELEM”
METHOD: “NUAGE_DEG_0”
METHOD: “NUAGE_DEG_1”
Method '
ELEM
'uses the functions of form of the elements of the mesh
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 control
For the 2 methods
'NUAGE_DEG_0/1
'the control makes it possible to project one field. In
revenge, with the 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 mesh
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 mesh
ma1
. One
piece of the mesh
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 mesh
ma1
, how to calculate it
field
ch2
on the nodes of a subset of another mesh
ma2
?
In the continuation to simplify the talk one will not speak any more a subset of a mesh, one will make
as if all the mesh were projected
ma1
on all the mesh
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 field on
ma2
knowing
that on
ma1
: projection goes from 1 towards 2.
For the method
“ELEM”
, it is necessary to find for each node
N2
of
ma2
which is the point of
ma1
who occupies the same position as
N2
, for that one projects the node
N2
on the mesh
ma1
: projection goes from 2 towards 1.
Code_Aster
®
Version
5.0
Titrate:
Projection of a field on a mesh
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
3/12
Manual of Reference
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A
3 Method
“ELEM”
3.1
algorithm implemented
One loops on all the nodes of the mesh
ma2
:
for each node (
N2
), one proceeds in 3 stages:
1) One seeks which is the mesh
m1
of
ma1
who “contains” the node geometrically
N2
,
2) one determines the position of
N2
in
m1
(i.e its co-ordinates in the element of reference
associated the mesh
m1
),
3) the functions of form of the mesh are used
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 the 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,
N2
m1b
m1a
·
if the node
N2
is actually “external” with the mesh
ma1
, the mesh will be affected to him
m1
more
near to him. This behavior makes it possible to project, without stopping in fatal error, a field
on a mesh whose border differs slightly from that of the initial mesh (what is
always the case in practice).
Code_Aster
®
Version
5.0
Titrate:
Projection of a field on a mesh
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
4/12
Manual of Reference
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A
3.2.2 Stage
2
To find the point of the element of reference which would give by the geometrical transformation the node
N2
, should in general be solved 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 mesh. 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 programming of
PROJ_CHAMP
that is to say independent of
finite elements present in the model, one assigns to all the meshs
ma1
, 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 itself inside the border of the mesh
ma1
(case more
frequent),
·
processing of a node
N2
outside the border of
ma1
,
·
processing of the case of the mesh of the type “hull” (surfaces plunged in R3).
Code_Aster
®
Version
5.0
Titrate:
Projection of a field on a mesh
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
5/12
Manual of Reference
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A
3.3.1 Node
N2
“interior”
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.
N2
B
C
With
D
D
C
B
has
N2
Element of reference
Real element
N2
belongs to the triangle
ABC
. One seeks his barycentric co-ordinates in this triangle. It is
3 numbers
teststemxà
,
xb
,
teststemxç
such that one can write:
n2= teststemxà * has + xb * B + teststemxç * C
The point
N2
element of reference retained by the algorithm will be:
N2 = teststemxà * A + xb * B + teststemxç * C
For the voluminal meshs (Hexahedrons, Pentahedrons, Pyramids and Tetrahedrons), one proceeds of
even way: one forgets the nodes mediums and one cuts out the nontetrahedral meshs in tetrahedrons.
3.3.2 Node
N2
“external”
A node
N2
is declared external with the mesh
ma1
if one found no mesh for which it that is to say
interior. When this is noted, the mesh is sought
m1
nearest to
N2
. The distance
calculated is that which separates the node
N2
and the border of the mesh
m1
. Let us call
p2
the point of
m1
nearer to
N2
. This point can be on a face of a voluminal element or on an edge or one
node.
Example (in 2D):
T4
T2
T1
T3
AP
Pb
With
B
Code_Aster
®
Version
5.0
Titrate:
Projection of a field on a mesh
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
6/12
Manual of Reference
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A
With the node
B
, the point is associated
Pb
obtained here by orthogonal projection of
B
on an edge of
T1
.
With the node
With
, the point is associated
AP
triangle
T1
. One could just as easily have associated the point to him
AP
triangle
T2
, but that would not have changed anything since the field to be projected is known with the nodes of
mesh. It is thus continuous between the adjacent elements.
Once found the point
p2
mesh
m1
who carries out the minimum of the distance with
N2
, one brings back oneself
with the preceding problem: the point
N2
element of reference which will be associated
N2
will be it
agent 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 enters
N2
and
T
because
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 mesh
ma1
and ever extrapolated; what is not the case of the 2 methods
NUAGE_DEG_0/1
.
3.3.3 Case of the mesh “hull”
When one seeks to project the nodes of a surface mesh on another surface mesh,
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
who carries out this distance,
·
calculation of the point
N2
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 F= function
(
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 mesh
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 mesh
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
Code_Aster
®
Version
5.0
Titrate:
Projection of a field on a mesh
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
7/12
Manual of Reference
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A
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 the 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 points of
N2
. 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
who contains 4 points of
cloud noncoplanar,
·
in 2D, d1 is the radius of the smallest ball of center
N2
who contains 3 points of
cloud not aligned.
The problem is known as “2D” if all the nodes of the mesh ma1 have same co-ordinate Z, it is
known as “3D” if not.
Code_Aster
®
Version
5.0
Titrate:
Projection of a field on a mesh
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
8/12
Manual of Reference
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A
4.3
Current restriction of the programming
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
X
Heavyside X
=
+
-
sin 3
1
This field is affected on the nodes of a mesh (
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 mesh
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 mesh (
ma2
) very fine of the same segment (300 elements length
2/300).
Code_Aster
®
Version
5.0
Titrate:
Projection of a field on a mesh
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
9/12
Manual of Reference
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A
5.1 Method
:
“ELEM”
co-ordinate X
Temperature
EDF
Electricity
from France
Method: “ELEM”
agraf 13/10/2000 (c) EDF/DER 1992-1999
before projection
after projection
0.0
0.2
0.4
0.6
0.8
1.0
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4
1.6
1.8
2.0
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 mesh
If one remakes same calculation by replacing the linear mesh
ma1
by a quadratic mesh
(containing approximately 2 times less meshs), one finds:
co-ordinate X
Temp
E
erase
EDF
Electricity
from France
Method: “ELEM”
agraf 13/10/2000 (c) EDF/DER 1992-1999
before projection
after projection
0.0
0.2
0.4
0.6
0.8
1.0
1.2
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4
1.6
1.8
2.0
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.
Code_Aster
®
Version
5.0
Titrate:
Projection of a field on a mesh
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
10/12
Manual of Reference
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A
5.2 Method
:
“NUAGE_DEG_0”
co-ordinate X
Temp
E
erase
EDF
Electricity
from France
Method: “NUAGE_DEG_0”
agraf 13/10/2000 (c) EDF/DER 1992-1999
before projection
after projection
0.0
0.2
0.4
0.6
0.8
1.0
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4
1.6
1.8
2.0
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.
co-ordinate X
you
mp
E
R
has
you
R
E
EDF
Electricity
from France
Method: NUAGE_DEG_0
agraf 13/10/2000 (c) EDF/DER 1992-1999
before projection
dref=0.5 dref
dref= 1. dref
dref= 2. dref
- 0.4
- 0.2
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4
0.0.0.2.0.4 0.6.0.8.1.0 1.2.1.4.1.6 1.8 2.0
It is noted that the choice of
dref
influence 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.
Code_Aster
®
Version
5.0
Titrate:
Projection of a field on a mesh
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
11/12
Manual of Reference
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A
5.3 Method
:
“NUAGE_DEG_1”
co-ordinate X
Temp
E
erase
EDF
Electricity
from France
Method: “NUAGE_DEG_1”
agraf 13/10/2000 (c) EDF/DER 1992-1999
before projection
after projection
- 1.0
- 0.5
0.0
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
It is noted that with this method, the projected field is correct in the 2 regular areas (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 the method
“NUAGE_DEG_1”
rounds a little the angles
Code_Aster
®
Version
5.0
Titrate:
Projection of a field on a mesh
Date:
09/02/01
Author (S):
J. PELLET
Key:
R7.20.01-A
Page:
12/12
Manual of Reference
R7.20 booklet: Projection of results or measurement
HI-75/01/001/A
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.
co-ordinate X
you
mp
E
ruffle
T
U
Re
EDF
Electricity
from France
Method: NUAGE_DEG_1
agraf 13/10/2000 (c) EDF/DER 1992-1999
before projection
dref=0.5 dref
dref= 1. dref
dref= 2. dref
- 0.4
- 0.2
0.0
0.2
0.4
0.6
0.8
1.0
1.2
1.4
0.0.0.2.0.4 0.6.0.8.1.0 1.2.1.4.1.6 1.8 2.0
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 the method
“ELEM”
is in general
preferable with the 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
mesh
ma1
“non-existent”: one has only of the nodes but not the meshs (by
example, “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”, Reference material of Code_Aster
n° [R3.01.00]