Insert Geometry and Mesh

In this example, we will create the geometry for an insert with 4 helices and mesh it

1. Running the case

To run this example on MSO4SC portal see this section.

1.1. Create the geometry:

salome -t -b -m GEOM,SMESH,HIFIMAGNET $HIFIMAGNET/HIFIMAGNET_Cmd.py args:--cfg=Insert-H1H4-Leads-2t.yaml

The HIFIMAGNET environment variable points to where the HiFiMagnet Salome plugin is installed:

  • on premise machine with Salome 8.3.0 for instance: export HIFIMAGNET=/opt/SALOME-8.3.0-MPI-DB9.5/BINARIES-DB9.5/HIFIMAGNET/bin/salome/

  • in singularity container: the variable is automatically set into the container

For the magnetostic model, we need to add some air surrounding the insert. To do so:

salome -t -b -m GEOM,SMESH,HIFIMAGNET $HIFIMAGNET/HIFIMAGNET_Cmd.py args:--cfg=Insert-H1H4-Leads-2t.yaml,--air[,--infty_Rratio=2,--infty_ZRatio=1.5]

1.2. Generate the mesh

salome -t -b -m GEOM,SMESH,HIFIMAGNET $HIFIMAGNET/HIFIMAGNET_Cmd.py args:--cfg=Insert-H1H4-Leads-2t.yaml[,--air],--mesh[,--groupCoolingChannels]

The mesh may be converted into an another format using gmsh compiled with proper med support

gmsh -3 -bin HL-31-H1H4-Leads-2t[_withAir].med -o HL-31-H1H4-Leads-2t[_withAir].msh

The resulting mesh is in mm

When running this example you need to have a valid MeshGems license:

  • For singularity, do not forget to mount the directory holding the MeshGems license key into the container, eg:

singularity shell -B /opt/DISTENE/DLim:/opt/DISTENE/DLim:ro salome-8.4.0-stretch.simg

2. Data files

The data files may be retreived from Data Catalogue. See the dataset A test insert in Lncmi collection.

The gzipped archive tarball Insert-H1H4.tgz contains all the files needed.

2.1. Geometry files

  • Insert-H1H4-Leads-2t.yaml

  • HL-31_H1-2t.yaml

  • HL-31_H2-2t.yaml

  • HL-31_H3-2t.yaml

  • HL-31_H4-2t.yaml

  • Ring-H1H2.yaml

  • Ring-H2H3.yaml

  • Ring-H3H4.yaml

  • inner.yaml

  • outer-H4.yaml

Definition of the helical cut per helix:

  • HL-31_H1-2t_cut_salome.dat

  • HL-31_H2-2t_cut_salome.dat

  • HL-31_H3-2t_cut_salome.dat

  • HL-31_H4-2t_cut_salome.dat

2.2. Mesh input data

  • HL-31-H1H4-Leads-2t_Air_meshdata.yaml

3. Outputs

The outputs will consist in a set of a brep and xao files for each component of the insert and for the assembly:

  • brep file hold a CAD into native Salome CAD format,

  • xao file hold the definition of groups into the correspond CAD and point to the correspodning brep file

The obtained geometry should be similar to the image bellow:

Insert without surrounding air

The mesh is in med format. For the case with air, its main characteristics are:

vertices 570625

elements

3860823

To get this information within Salome:

  • start Salome in GUI,

  • Active the SMESH module,

  • From File/Import/Med menu select the mesh

  • From Mesh/Mesh Information menu print the mesh characteristics

Mesh (with Air) characteristics

Alternatively, type print mesh.Dump() in the python console bellow the mesh view.

When using singularity, do not forget to add the --nv flag to get GUI, eg:

singularity shell --nv -B /opt/DISTENE/DLim:/opt/DISTENE/DLim:ro salome-8.4.0-stretch.simg