although I found a personal work-around for this issue, I'd like to post it here still. I am using Salome for digesting STP files into meshes, or for creating models from scratch to form meshes. The meshes get a Group of solid for each Body and a Group of faces for each boundary. However lately I missed the first boundary face from each model when reading the UNV file into Elmer. Numbering the model with boundary Indexes Shows that the first denominated boundary face from Salome has the same boundary index number like the General surface of the whole Body.
An example: A simple bar is created, one end face is the fixed end, the other one is the loaded one. The body of the bar has body index 1, the fixed boundary receives boundary index 2 and the loaded face gets index 3. But all other surface of the bar also gets boundary index 2, hence I cannot assign the fixed condition to boundary 2, otherwise the whole body is fixed....
Elmergrid Output reads as follows (normally I open the UNV file directly in ElmerGUI, but also after Treatment with Elmergrid, the Problem remains):
Code: Select all
D:\Elmer_workdir>elmergrid 8 2 mesh_2.unv
Starting program Elmergrid
Elmergrid reading in-line arguments
Output will be saved to file mesh_2.
Elmergrid loading data:
-----------------------
Reading mesh from universal mesh file mesh_2.unv.
First round for allocating data
Units dataset content is currently omitted!
Part UID = 1
Part name = SMESH_Mesh
Coord system name = Global
There are 1306 nodes in the mesh
Element type range in mesh [202,504]
Allocating mesh with 1306 nodes and 6902 4-node elements in 3 dims.
Physical index interval is [2,2]
Group index interval is [1,3]
Using offset 2 for physical indexes
Second round for reading data
Reading Coordinate system information
Reading node coordinates
Reading element topologies
Reading element groups in mode 2467
Reading 1:th group with index 1 with 5136 entities: Box_
Element type range in group is [504 504]
Reading 2:th group with index 2 with 114 entities: fix_
Element type range in group is [303 303]
Reading 3:th group with index 3 with 118 entities: load_
Element type range in group is [303 303]
Moving bulk elements to boundary elements
Leading bulk elementtype is 504
Trailing bulk elementtype is 202
There are 1766 (out of 6902) lower dimensional elements.
Node 1020 belongs to maximum of 40 elements
Found correctly 1766 side elements.
Parent elements were reordered up to indx 5136.
Moved 5136 elements (out of 6902) to new positions
The Universal mesh was loaded from file mesh_2.unv.
Elmergrid creating and manipulating meshes:
-------------------------------------------
Elmergrid saving data with method 2:
-------------------------------------
Saving mesh in ElmerSolver format to directory mesh_2.
Saving 1306 coordinates to mesh.nodes.
Saving 5136 element topologies to mesh.elements.
Saving boundary elements to mesh.boundary.
Saving header info to mesh.header.
Saving names info to mesh.names.
Saving entities info to entities.sif.
Thank you for using Elmergrid!
Send bug reports and feature wishes to elmeradm@csc.fi
The python script for Salome geometry Generation Shows geometry Groups:
Code: Select all
# -*- coding: utf-8 -*-
###
### This file is generated automatically by SALOME v8.3.0 with dump python functionality
###
import sys
import salome
salome.salome_init()
theStudy = salome.myStudy
import salome_notebook
notebook = salome_notebook.NoteBook(theStudy)
sys.path.insert( 0, r'D:/Elmer_workdir')
###
### GEOM component
###
import GEOM
from salome.geom import geomBuilder
import math
import SALOMEDS
geompy = geomBuilder.New(theStudy)
O = geompy.MakeVertex(0, 0, 0)
OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
Box_1 = geompy.MakeBoxDXDYDZ(200, 400, 100)
Partition_1 = geompy.MakePartition([Box_1], [], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["VERTEX"])
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["VERTEX"])
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["SOLID"])
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["SOLID"])
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["SOLID"])
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["SOLID"])
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["SOLID"])
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["SOLID"])
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["SOLID"])
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["FACE"])
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["FACE"])
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["FACE"])
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["FACE"])
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["FACE"])
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["FACE"])
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["FACE"])
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["FACE"])
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["FACE"])
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["FACE"])
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["FACE"])
listSubShapeIDs = geompy.SubShapeAllIDs(Partition_1, geompy.ShapeType["FACE"])
Box_itself = geompy.CreateGroup(Partition_1, geompy.ShapeType["SOLID"])
geompy.UnionIDs(Box_itself, [1])
fix = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(fix, [23])
load = geompy.CreateGroup(Partition_1, geompy.ShapeType["FACE"])
geompy.UnionIDs(load, [27])
geompy.addToStudy( O, 'O' )
geompy.addToStudy( OX, 'OX' )
geompy.addToStudy( OY, 'OY' )
geompy.addToStudy( OZ, 'OZ' )
geompy.addToStudy( Box_1, 'Box_1' )
geompy.addToStudy( Partition_1, 'Partition_1' )
geompy.addToStudyInFather( Partition_1, Box_itself, 'Box_itself' )
geompy.addToStudyInFather( Partition_1, fix, 'fix' )
geompy.addToStudyInFather( Partition_1, load, 'load' )
###
### SMESH component
###
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(theStudy)
Mesh_2 = smesh.Mesh(Partition_1)
NETGEN_1D_2D_3D = Mesh_2.Tetrahedron(algo=smeshBuilder.NETGEN_1D2D3D)
NETGEN_3D_Parameters_1 = NETGEN_1D_2D_3D.Parameters()
NETGEN_3D_Parameters_1.SetMaxSize( 20 )
NETGEN_3D_Parameters_1.SetSecondOrder( 0 )
NETGEN_3D_Parameters_1.SetOptimize( 1 )
NETGEN_3D_Parameters_1.SetFineness( 2 )
NETGEN_3D_Parameters_1.SetMinSize( 0 )
NETGEN_3D_Parameters_1.SetUseSurfaceCurvature( 1 )
NETGEN_3D_Parameters_1.SetFuseEdges( 1 )
NETGEN_3D_Parameters_1.SetQuadAllowed( 0 )
isDone = Mesh_2.Compute()
Box_ = Mesh_2.GroupOnGeom(Box_itself,'Box_',SMESH.VOLUME)
fix_ = Mesh_2.GroupOnGeom(fix,'fix_',SMESH.FACE)
fix_.SetColor( SALOMEDS.Color( 1, 0, 0 ))
load_ = Mesh_2.GroupOnGeom(load,'load_',SMESH.FACE)
load_.SetColor( SALOMEDS.Color( 0, 0.666667, 0 ))
try:
Mesh_2.ExportUNV( r'D:/Elmer_workdir/Mesh_2.unv' )
pass
except:
print 'ExportUNV() failed. Invalid file name?'
## Set names of Mesh objects
smesh.SetName(NETGEN_1D_2D_3D.GetAlgorithm(), 'NETGEN 1D-2D-3D')
smesh.SetName(Box_, 'Box_')
smesh.SetName(NETGEN_3D_Parameters_1, 'NETGEN 3D Parameters_1')
smesh.SetName(Mesh_2.GetMesh(), 'Mesh_2')
smesh.SetName(load_, 'load_')
smesh.SetName(fix_, 'fix_')
As far as I know myself, there is a fair Chance this is not a bug of Elmer, but a bug in my thinking . But clarification would definitely appreciated!
Thanks, Thomas.