Metafor

ULiege - Aerospace & Mechanical Engineering

User Tools

Site Tools


commit:2020:03_20

Commit 2020-03-20

Commit Description

In this commit I implemented a new type of Interaction “LagMultInteraction” which generates new “LagMultElements”. 3 types of LagMultElements are now implemented, “DraggingPointOnCurveLagMult2DElement”, “PointOnCurveLagMult2DElement”, “EqualityDofConstraintLagMult2DElement”. The three types of elements are described here after. The implementation is for now only 2D and pure mechanical but the extension to 3D and thermal will come next. The PointOnCurve elements required a new type of element container, because they need to be linked to a Point AND a Line, I thus also created a “ContainerLine” Object which behaves as a line but also contains a pointer to an extra Point.

Initial Goal

In the goal to eventually create “non-conformal” elements in Metafor, the first step is to allow “hanging nodes”.

One possible way to allow hanging nodes is by adding a Lagrange multiplier constraint to impose the relation between the DoFs of node “h” and nodes 1 and 2 on the extremities.

Previous implementations

A similar constraint was already present in the code in “LagrangeMultiplierEdge2DElement”. However this constraint imposes the displacements of nodes 1 and 2 with respect to node h and not the reciprocal, the displacement of node h must thus be fully imposed by the user. The goal of that constraint was to allow 1 point to “drag” a curve according to its displacement:

This is not exactly what is needed for the hanging nodes because what we want is a relation between the 3 nodes without node h having to be imposed a priori but it can be used as base.

LagMult Elements

DraggingPointOnCurveLagMult2DElement

This element is the recreation of the previous implementation, we thus have a link between the 3 nodes but the displacement of the “hanging node” is fully imposed by the user and it simply “drags” the other 2 points. The Tangent Stiffness Matrix and External Force Vector to implement in the code is given here after, with lambda the lagrange multiplier which is a newly added degree of freedom, x being the current (“ACTUAL”) displacements and dx being the correction.

PointOnCurveLagMult2DElement

This element is the one actually implementing the goal, it imposes the relation between the 3 nodes without assuming that the displacement of node h is imposed by the user. The Tangent Stiffness Matrix and External Force Vector to implement in the code is given here after, with lambda the lagrange multiplier which is a newly added degree of freedom, x being the current (“ACTUAL”) displacements and dx being the correction.

EqualityDofConstraintLagMult2DElement

This element is the recreation of equalityDofConstraints using LagMultElements. Indeed, imposing two degrees of freedom being equal is trivial with Lagrange Multipliers. The Tangent Stiffness Matrix and External Force Vector to implement are:

ConstainerLine Object

As stated before, I added a new type of geometry Object “ContainerLine”. This Object derives from line and its purpose is to serve as an “element Container” for “PointOnCurve” elements. This object must behave as a line. A “ContainerLineBuilder” was created to generate ContainerLines. A “ContainerLineMesher” was also created. They are similar to the Line builder and meshers except for the fact that the builder requires 3 points to create the ContainerLine. To make sure this object behaves like a Line the third point is not added to the Object (i.e. not in line.comp[2]) a pointer to this point is stored in “containedPoint”.

Remark: The topology link between curves and sides is wrong for all ContainerLines. I created a function “fixTopology” in mtGeoGeometry which loops over all containerLines and fixes the topology for those ContainerLines. This function needs to be called after all other geometry creating operations.

Tests

I Added a series of tests in apps.lagMult to test the new elements.

DraggingPointOnCurve and PointOnCurve

First, I reproduced a test that was using the old implementation “LagrangeMultiplierEdge2DElement”. The test was named “LagrangeMultiplier2D”, I renamed this test “DraggingNode” for more clarity. The new implementation and the old implementation give the same results. Moreover, “DraggingPointOnCurve” and “PointOnCurve” give the same results for this test. The reason is that because the displacement of the middle node is imposed we have dx_h=0.0 in both cases and both formulations will give the same result. This can be seen in the figures hereafter where “DraggingPointOnCurve” is used on the left and “PointOnCurve” is used on the right.

Simple Shear

Secondly I created a new test “SimpleShearPointOnCurve.py”, this test has 2 cases, one where the only node free to move in the Y direction is the middle node, and one where the only node free to move in the Y direction is one of the extremities:

On those two cases I created both a “DraggingPointOnCurve2DElement”(Left) and a “PointOnCurve2DElement”(Right). Hereafter are the different results:

Case 1:

Case 2:

One can see that as expected, the two elements give the same result when the displacement of the middle node is fully imposed (case 2). However, in case 1 where the displacement of the middle node is not imposed only the “PointOnCurve” element makes the point correctly stay on the curve.

EqualityDofConstraint

I recreated the apps.qs.equalityDofConstraint.py test using “equalityDofConstraintLagMult2DElement”. The results are shown hereafter.

One can see that the results using equalityDofConstraint or the Lagrange Multipliers are exactly the same. There is however a slight increase in CPU (+12% Real CPU) and memory (+7%). Moreover the DSSolver was used in both cases because the Default Skyline had troubles with the added 0 pivot resulting from the addition of the Lagrange Multiplier. No other study of the influence of the solver has been done so far but this issue needs to be addressed in the future.

Another test using equalityDofConstraint was recreated using Lagrange Multipliers, this test is cont2MfcX.py which is a Cont2 test where a equalityDofConstraint was set on the right edge. The results are here again the same:

Finally, a last test was added “equalityDofConstraintMono”, in this test a mono element in tension was modeled, except that instead of fixing the bottom curve along Y and the right curve along X I fixed the bottom-right point along X and Y and used an equalityDofConstraintLagMultElement on both curves to “fix” the remaining points.

The test contains both the classical fixation(right) and the fixation using equalityDofConstraintLagMult2DElement (Left). The results are the same as expected.

Future dev

This commit is a preliminary to the implementation of many more LagMultInteractions. The extension to 3D elements will come soon (already implemented but not tested), then will come the extension to Thermal. A lot of other relations between DoFs could be created using LagMultElements and more types of elements will be added in the future. A study of the influence of the lagrange multiplier DoFs on the residual still needs to be done as well as looking at the behavior in dynamic schemes.

Added [a] / deleted [d] / renamed [r] files

Code:

[a] mtElements/lagMult
[a] mtElements/lagMult/DraggingPointOnCurveLagMultElement.cpp
[a] mtElements/lagMult/DraggingPointOnCurveLagMultElement.h
[a] mtElements/lagMult/DraggingPointOnCurveLagMultElement.inl
[a] mtElements/lagMult/DraggingPointOnCurveLagMultElShcuts.h
[a] mtElements/lagMult/DraggingPointOnCurveLagMultElShcuts.inl
[a] mtElements/lagMult/EqualityDofConstraintLagMultElement.cpp
[a] mtElements/lagMult/EqualityDofConstraintLagMultElement.h
[a] mtElements/lagMult/EqualityDofConstraintLagMultElement.inl
[a] mtElements/lagMult/EqualityDofConstraintLagMultElShcuts.h
[a] mtElements/lagMult/EqualityDofConstraintLagMultElShcuts.inl
[a] mtElements/lagMult/PointOnCurveLagMultElement.cpp
[a] mtElements/lagMult/PointOnCurveLagMultElement.h
[a] mtElements/lagMult/PointOnCurveLagMultElement.inl
[a] mtElements/lagMult/PointOnCurveLagMultElShcuts.h
[a] mtElements/lagMult/PointOnCurveLagMultElShcuts.inl
[a] mtElements/LagMultInteraction.cpp
[a] mtElements/LagMultInteraction.h
[a] mtGeo/mtGeoContainerLine.cpp
[a] mtGeo/mtGeoContainerLine.h
[a] mtGeo/mtGeoContainerLineBuilder.cpp
[a] mtGeo/mtGeoContainerLineBuilder.h
[a] mtGeo/mtGeoContainerLineMesher.cpp
[a] mtGeo/mtGeoContainerLineMesher.h

Tests:

[a] apps/lagMult
[a] apps/lagMult/cont2
[a] apps/lagMult/cont2/cont2MfcXLagMult.py
[a] apps/lagMult/equalityDofConstraint
[a] apps/lagMult/equalityDofConstraint/equalityDofConstraintDSSolver.py
[a] apps/lagMult/equalityDofConstraint/equalityDofConstraintLagMult.py
[a] apps/lagMult/equalityDofConstraint/equalityDofContraintMono.py
[a] apps/lagMult/pointOnCurve
[a] apps/lagMult/pointOnCurve/DraggingNode.py
[a] apps/lagMult/pointOnCurve/DraggingNodeOld.py
[a] apps/lagMult/pointOnCurve/SimpleShearDraggingPointOnCurve.py
[a] apps/lagMult/pointOnCurve/SimpleShearPointOnCurve.py
[a] apps/lagMult/pointOnCurve/SimpleShearPointOnCurveMid075.py

Cédric Laruelle 2020/03/20

commit/2020/03_20.txt · Last modified: 2020/03/20 10:15 by laruelle