Hi Bruno,

I defined the constraint Periodic in the 2balken.pro and added constraint in the Elasticity and also set the name after nameofconstraint to periodic. When I try to change the variable, it shows a new error in the function. Do I need to add an extra functionspace to add constraint?

Best, Jie

Hi Jie,

You defined the constraint `Periodic`

in the wrong place. It should be defined in your `2balken.pro`

file, and not in the `Elasticity.pro`

. Then, you need to apply this constraint to your variables inside the `FunctionSpace`

in the `Elasticity.pro`

, just like the constraints `Displacement_x`

, `Displacement_y`

and `Displacement_z`

, but with the `NameOfConstraint`

as `Periodic`

.

Best, Bruno

Hi Bruno, I am very sorry to bother you at this late hour. I found that I also have some problems with the usage of this link, for example, I use two thin plate models, it will appear like this, can you tell me what is the reason for this? I think I have misunderstood the structure of this link, can you explain where I am wrong here?I don't understand why it shows a -syntax error Attach the code: 2balken.geo

Best Jie

No, you don't need to redefine each line/surface separately. Just verify if you have a proper mesh for each physical volume in your model. You can type `Alt+m`

(or `option+m`

on Mac) to display your mesh.
You can also verify if the surfaces at the interface between the stator and the windings are the same. In `Tools->Visibility`

select `elementary entities`

, and you will see a list of all geometrical entities that may include these surfaces.
All of this is just to check if your geometrical model is well defined (according to the geometry you want to represent) and that it has a proper mesh in the different subdomains.

You can check if the geometrical and physical entities in your Gmsh model are well represented. In `tools->visibility`

you can select the entities you want to see, and checking the boxes in `Tools->Options->Geometry`

you can see their respective labels (curve, surface and volume labels). Maybe the problem is with the definition of your geometry, as you mentioned.

Bruno

Hi Bruno,

I think it could also be due to the stp file I used as the geo file, I don't know if that's the reason. Because at the beginning I used the ansys model (with the windings in the stator). Then after exporting this model as a stp file, I used gmsh for meshing. Could it be that gmsh is reading the stp file with the filled volume and the stator gap overlapping by default?

Best, Jie

Hi Jie,

I don't think the solution here is to apply a link constraint thought. If the two surfaces are already the same, you probably have the same degree of freedom on this interface.

Note that the solution you see for the elasticity includes a displacement in XYZ, and maybe that is the reason behind the deformations you see on the screenshot you sent earlier. Again, sorry, but I am not familiar with this elasticity problem to evaluate if the solution you have makes sense (or not). If it is wrong, the error may be associated with other parameters of your simulation.

Best, Bruno

**Christophe Geuzaine**
(a9dc1502)
*
at
20 Oct 11:29
*

only sign if package was constructed

If that is what you need to do, I believe the a `link`

constraint can work. See my comment bellow.

Bruno

Hi Bruno,

This is really helpful to me, thank you again for your help! I will continue to try it now.

Best, Jie Li

Hi Jie,

You can create two independent groups (e.g. `Left`

and `Right`

) each one of them with the three corresponding faces you want to link. The constraint definition should be put inside `Constraint{}`

, and it can be placed after the groups definition (not inside) in the .pro file.
You should have something like:

```
Group {
Left = Region[{1,2,3}];
Right = Region[{5,6,7}];
...
}
Constraint {
{ Name periodic;
Case {
{ Region Left; Type Link ; RegionRef Right;
Coefficient -1; Function Vector[X[]+Pi, Y[], Z[]] ;
}
}
}
}
```

In addition, you need to apply this constraint to your variables. In your `FunctionSpace{}`

you should have something like that:

```
Constraint {
{ NameOfCoef vn ;
EntityType NodesOf ; NameOfConstraint Periodic ; }
}
```

after defining your `BasisFunctions{}`

.

I hope this can help.

Best, Bruno

Hi Bruno, Thank you very much for your help, I tried to use this syntax to unite them together. But I noticed that in 3d case there are 3 contact surfaces between the stator and the winding, do I need to constrain each one? Or do I just need to constrain the faces on both sides of the stator and winding and keep the bottom face? Also where do I put this syntax in the pro file? Should it be before the group.

Best, Jie

Hi Bruno,

no problem.I also felt very strange about this model views0-9, so I used the Magnetmeter example to try to merge into my model. But I have a new problem, the undesired deformation between the stator and the winding of the motor, I found in the literature that I need to restrict them to the same degree of freedom, I am not sure if I understood the literature correctly. Also in the documentation of getdp I see the syntax "link", I don't know if it can solve my problem, can you please give me a simple example to solve this problem?

Best Jie

If you want to apply a constraint of type Link, we can follow the example in the reference manual of GetDP:

"
To link the degrees of freedom in the constrained region `Left`

with the degrees of freedom in the reference region `Right`

, located `Pi`

units to the right of the region `Left`

along the X-axis, with the coeficient -1, one could write:

```
{ Name periodic;
Case {
{ Region Left; Type Link ; RegionRef Right;
Coefficient -1; Function Vector[X[]+Pi, Y[], Z[]] ;
< FunctionRef XYZ[]; >
}
}
}
```

In this example, Function defines the mapping that translates the geometrical elements in the region `Left`

by `Pi`

units along the X-axis, so that they correspond with the elements in the reference region `Right`

. For this mapping to work, the meshes of `Left`

and `Right`

must be identical.
"

In your example, you can create a group `Left`

with the faces of the stator, and the group `Right`

with the winding faces, but you need to have the same mesh on these faces. You can use the command `Periodic Surface`

in Gmsh to this end.

Best, Bruno

Hi Jie,

Sorry for the delay. I am not sure I understand your question here. I need to say that I am not familiar with this example, but it seems that you have the ten modals there (views 0-9). However, these results also seem strange to me.

Bruno

Or have any other solution for it?