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