Hi, all,

Greetings!

Thanks for the credits @julien.dular. The theory is well explained in Pellikka's paper section 5 (https://gmsh.info/doc/preprints/gmsh_homology_preprint.pdf). I have only put it into practice :-)

The example Julien shared works fine in 2D or when the conductors cross the domain (having terminals at the boundary). An even more general case computes the boundary of the relative 2-homology of the conducting domains to its boundary, resulting in cycles that form a basis for the 1-Homology of the air space. Finally, we can compute the 1-Cohomology of the airspace (as usual) and use the HomologyPostProcessing plugin to transform it to the desired basis with the previously computed 1-Homology. Note the new basis will have the same orientation as the 1-Homology representative cycles. This is exactly what is explained in Pellikka's paper.

Here is an example with a straight conductor crossing the calculus domain and a "torus" in 3D: ExampleAdaptCohomologyBasis.geo

I hope this can help.

Best regards, Bruno

This is a merge request for including the thin-shell model implemented in the H-phi formulation for the single tape example. The resolution method still requires adjustments for solving as for the other formulations.

**Bruno Alves**
(993924d6)
*
at
02 Jun 00:15
*

**Bruno Alves**
(9e16a790)
*
at
02 Jun 00:15
*

Includes the H-phi thin-shell formulation for a single HTS tape exa...

**Bruno Alves**
(993924d6)
*
at
31 May 21:48
*

Includes H-phi TS formulation - still need to implement with same s...

*
... and
1 more commit
*

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

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 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

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

constraint can work. See my comment bellow.

Bruno

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

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

Hi Jie,

Your groups' definition seems correct. To set the material properties of the stator and windings separately, you just need to define them in each one of these subgroups as

```
Function {
nu[stator] = nu_stator ;
rho[stator] = rho_stator;
nu[winding] = mu_winding ;
rho[winding] = rho_winding;
}
```

where `nu_stator`

and `rho_stator`

are the stator parameters, and `mu_winding `

and `rho_winding `

the windings parameters (that can be defined as constants or functions, as you wish).

PS: check the "windung" spelling. You can use whatever name you want. Just make sure that it is the same everywhere in your code.

Best, Bruno

Hi Jie,

It's missing the .msh file. You probably need to mesh your model and save it before running GetDP. Just type `2`

or `3`

(for 2D or 3D mesh, respectively) and `Ctrl+s`

to save it. This creates the missing file `Interactive_Elasticity.msh`

in your directory.

Another option is to include `Solver.AutoMesh = 2`

in the .geo file. This generates a new mesh and saves it automatically every time your geometry changes.

I hope this helps.

Best, Bruno

Hi Fabien,

I understand your problem. When we delete a physical group with "Delete {Physical Surface {tag};}" in Gmsh, it also deletes the related geometrical entities.

I would suggest creating only the physical group related to the surface you want to apply the crack plugin. After applying it, use the command "Delete Physicals;" It will delete all the physical groups but not the geometrical entities. You can then define only the physical groups you want. Please, see attached the example for a thin line. I believe you can do the same for a surface. Sorry for not having a better solution.

BrunoThinCrack.geo

You can proceed exactly in the same way with thin surfaces as with thin lines. I would suggest saving the tag you define for each geometrical surface you create before applying the crack plugin, and the new "Thin-" surface will be simply this tag +1.

Regards, Bruno

Hi Fabien,

You can create two independent physical groups for the two lines, but not for the open boundaries. As you have mentioned, the initial physical group includes the two lines; however, each line will be a separate geometrical entity after applying the plugin crack, and you can identify them to create two new independent physical groups.

The geometrical entity of the line "Thin+" will have the same geometrical tag of the initial line "Thin" and the new line related to the negative side of "Thin" will have the next available tag for lines (equivalent to a newl command). So, for creating the PhysicalGroup for "Thin+" you just need to repeat the code command used to create the "Thin". For creating the PhysicalGroup "Thin-" you need to identify the new line tag. Please, find attached a simple example.

Bruno ThinCrack.geo

Hi Kotaro Matsuoka,

I'm also a Gmsh and GetDP user, and I've faced a similar problem before.

You are using `Layers`

in the extrusion of your initial 2D domain, and this command extrudes both the geometry and the mesh using a translation. So, the mesh on the upper and lower surfaces are already equivalents, and you don't need to use `Periodic Surface`

. You can remove this from your .GEO file.

Also, I think you forgot to include the line-loop of the "air" region on the definition of the "inf" surface (AIR_OUT).

`infs = news; Plane Surface(infs) = {infll, airll}; //AIR_OUT`

Another problem that I can anticipate is that applying the H-phi-psi formulation with periodic boundary conditions will require the "thick cuts" (psi) to be at the same position on both upper and lower surfaces. The use of `Layers`

in the extrusion with just a few layers may works, but if you want to refine the mesh by increasing the number of layers, the "thick cuts" may not be equivalent on these surfaces. I'm still trying to find a solution to this issue.

Regards, Bruno