2. Method “COLLOCATION”#
Vocabulary note:
The word « project » is sometimes ambiguous in this document.
When we say « project » the field from \(\mathit{ma1}\) to \(\mathit{ma2}\) , we’re looking for the field on \(\mathit{ma2}\) knowing the field on \(\mathit{ma1}\) : the projection goes from 1 to 2.
For the method “ COLLOCATION “, we must find for each node \(\mathit{n2}\) of \(\mathit{ma2}\) what is the point of \(\mathit{ma1}\) which occupies the same position as \(\mathit{n2}\) , for this we project the node \(\mathit{n2}\) onto the mesh onto the mesh \(\mathit{ma1}\) : the projection goes from 2 to 1.
2.1. Algorithm implemented#
We loop over all the nodes in mesh \(\mathit{ma2}\):
for each node (\(\mathit{n2}\)), we proceed in 4 steps:
We are looking for what is the \(\mathit{m1}\) mesh of \(\mathit{ma1}\) that geometrically « contains » the node n2,
An approximate position of \(\mathit{n2}\) is determined in \(\mathit{m1}\) (i.e. its coordinates in the reference element associated with the mesh \(\mathit{m1}\)),
We « refine » the position calculated previously by solving a non-linear problem to take into account the fact that the cells are not linear (the Jacobian of the geometric transformation varies over the cell).
We use the shape functions of mesh \(\mathit{m1}\) to determine the value of the field on \(\mathit{n2}\) knowing the value of the field on the nodes of \(\mathit{m1}\).
2.1.1. note#
The third step shows that this method assumes that all the nodes in mesh m1 know the field to be projected. For example, one would not be able to project a field that would carry different degrees of freedom on its « vertex » nodes and on its « middle edge » nodes. However, the projection of such a field is possible with the 2 other projection methods [§ 3].
2.2. The difficulties encountered and their treatment#
2.2.1. Step 1#
We do not treat the possible curvature of the edges of the elements. For example, in the figure below (problem plan), node \(\mathit{n2}\) will be declared to belong to mesh \(\mathit{m1a}\) while it belongs to mesh \(\mathit{m1b}\). In reality, this problem is rare because, most often, « curved » edges exist only on the border of mesh domains (the internal facets are flat).
If node \(\mathit{n2}\) is actually « external » to mesh \(\mathit{ma1}\), it will be assigned the mesh \(\mathit{m1}\) closest to it. This behavior makes it possible to project, without stopping in fatal error, a field onto a mesh whose border differs slightly from that of the initial mesh (which is always the case in practice).
2.2.2. Steps 2 and 3#
To find the point of the reference element that gives node \(\mathit{n2}\) through the geometric transformation, it is generally necessary to solve a non-linear problem, because only for the triangle with 3 nodes (in 2D) and for the tetrahedron with 4 nodes (in 3D), for the tetrahedron with 4 nodes (in 3D), is the geometric transformation linear.
First, we assume that the mesh is linear by forgetting its middle nodes and by cutting it arbitrarily into triangles or tetrahedra. In this « linearized » mesh, an approximate position of the point in relation to node \(\mathit{n2}\) is determined.
Then, using a Newton algorithm, the non-linear problem of finding a precise point is solved using the approximation previously calculated.
Note: the non-linear problem is solved in two 2D cases (projection of a 2D mesh onto another 2D mesh) or 3D (projection of a 3D mesh onto another 3D mesh) but not for the 2.5D cases (shells immersed in 3D space) or 1.5D (2D wire mesh) cases, but not for the 2.5D cases (shells immersed in 3D space) or 1.5D cases (2D wire mesh),
2.2.3. Step 4#
The real shape functions of the elements of the initial mesh are not always used. In fact, in Code_Aster, it is the finite elements that choose their shape functions: a thermal triangle is not obliged to choose the same shape functions as a mechanical triangle. An element may also not need shape functions, or it may choose different functions depending on the variables to be interpolated. Nor does the formulation of the element always reveal a reference element and associated geometric transformation.
For all these reasons and so that the programming of PROJ_CHAMP is independent of the finite elements present in the model, we assign to all the cells of \(\mathit{ma1}\), the shape functions of the 1D, 2D or 3D iso-parametric elements [R3.01.01].
2.3. Details about steps 1 and 2#
Computerically, steps 1 and 2 are carried out simultaneously. We are going to discuss in turn how to deal with the following 3 problems:
treatment of a \(\mathit{n2}\) node found within the border of the \(\mathit{ma1}\) mesh (the most frequent case),
processing a \(\mathit{n2}\) node outside the \(\mathit{ma1}\) border,
treatment of the case of « shell » meshes (surfaces immersed in \({\mathrm{ℝ}}^{3}\)).
2.3.1. Node n2 « inside »#
To understand the treatment of an interior node, let’s take the case of a 2D mesh QUAD8 (\(\mathit{abcd}\)). We start by forgetting its middle knots (and therefore their possible curvature) then we cut it into 2 triangles (\(\mathit{abc}\) and \(\mathit{acd}\)). This division is arbitrary (it depends on the local numbering of the QUAD8 nodes). Note that the other possible division (other diagonal) would generally give another point in the reference element.
\(\mathit{n2}\) belongs to the \(\mathit{abc}\) triangle. We’re looking for its barycentric coordinates in this triangle. These are the 3 numbers \(\mathit{xa},\mathit{xb},\mathit{xc}\) as you can write: \(\mathit{n2}\mathrm{=}\mathit{xa}\mathrm{\times }a+\mathit{xb}\mathrm{\times }b+\mathit{xc}\mathrm{\times }c\)
The point N2 of the reference element selected by the algorithm will be:
\(\mathit{N2}\mathrm{=}\mathit{xa}\mathrm{\times }A+\mathit{xb}\mathrm{\times }B+\mathit{xc}\mathrm{\times }C\)
For volume cells (Hexahedra, Pentahedra, Pyramids and Tetrahedra), we proceed in the same way: we forget the middle nodes and we cut the non-tetrahedral cells into tetrahedra.
2.3.2. Node n2 « outside »#
A \(\mathit{n2}\) node is declared external to mesh \(\mathit{ma1}\) if no mesh has been found for which it is internal. When this is found, we look for the \(\mathit{m1}\) mesh closest to \(\mathit{n2}\). The calculated distance is the distance between node \(\mathit{n2}\) and the border of mesh \(\mathit{m1}\). Let’s call \(\mathit{p2}\) the point in \(\mathit{m1}\) that’s closest to \(\mathit{n2}\). This point can be on a face of a solid element or on an edge or on a vertex.
Example (in 2D):
To node \(B\), we associate the point \(\mathit{pB}\) obtained here by orthogonal projection of \(B\) on an edge of \(\mathit{T1}\).
To node \(A\), we associate the point \(\mathit{pA}\) of the triangle \(\mathit{T1}\). It could just as easily have been associated with the point pA of triangle \(\mathit{T2}\), but that would have changed nothing since the field to be projected is known at the nodes of the mesh. It is therefore continuous between adjacent elements.
Once we have found the point \(\mathit{p2}\) of the \(\mathit{m1}\) mesh that achieves the minimum distance with \(\mathit{n2}\), we come back to the previous problem: the point \(\mathit{N2}\) of the reference element that will be associated with \(\mathit{n2}\) will be the corresponding of \(\mathit{p2}\) by the procedure of paragraph [§ 2.3.1].
Notes:
For a given triangle (or tetrahedron) \(T\) , there is only one point \(\mathit{p2}\) achieving the minimum distance between \(\mathit{n2}\) and \(T\) because \(T\) is convex. This property would disappear if we took into account the curvature of the edges of the meshes. We can see here that the two simplifications of the implementation (forgetting the middle nodes and dividing the meshes into linear triangles) are linked together.
An external point will always have a value interpolated between the values of the nodes in the mesh \(\mathit{ma1}\) and never extrapolated; which is not the case with the 2 methods NUAGE_DEG_0 /1.
2.3.3. Case of « shell » meshes#
When one seeks to project the nodes of a surface mesh onto another surface mesh, one generally automatically comes across the case of the « external » points above. Indeed, the imprecision on the coordinates of the nodes means that a \(\mathit{n2}\) node is never strictly in the plane of the triangles of the cells of \(\mathit{ma1}\).
It is therefore the procedure of [§ 2.3.2] that applies:
For each \(\mathit{n2}\) node:
find the triangle (or the tetrahedron) that achieves the minimum distance with \(\mathit{n2}\). Identification of point \(\mathit{p2}\) that achieves this distance,
calculation of the point \(\mathit{n2}\) of the reference element that corresponds to \(\mathit{p2}\) using the [§3.3.1] procedure.