mise à jour des cas-tests

This commit is contained in:
GERALD NICOLAS 2021-01-26 17:00:07 +01:00
parent d6d7f3ffb4
commit 65d5c162a5
4 changed files with 48 additions and 36 deletions

View File

@ -63,13 +63,13 @@ class cylindre_2(cylindre):
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
def setReferencesMaillageFissure(self): def setReferencesMaillageFissure(self):
self.referencesMaillageFissure = dict( \ self.referencesMaillageFissure = dict( \
Entity_Quad_Pyramid = 1158,
Entity_Quad_Quadrangle = 7028, \ Entity_Quad_Quadrangle = 7028, \
Entity_Quad_Hexa = 18366, \ Entity_Quad_Hexa = 18366, \
Entity_Node = 105035, \ Entity_Node = 105035, \
Entity_Quad_Edge = 735, \ Entity_Quad_Edge = 735, \
Entity_Quad_Triangle = 1056, \ Entity_Quad_Triangle = 1056, \
Entity_Quad_Tetra = 16305, \ Entity_Quad_Tetra = 16305, \
Entity_Quad_Pyramid = 1158, \
Entity_Quad_Penta = 384 \ Entity_Quad_Penta = 384 \
) )

View File

@ -35,12 +35,14 @@ dicoParams = dict(nomCas = 'disque',
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
referencesMaillageFissure = dict(Entity_Quad_Pyramid = 610, referencesMaillageFissure = dict ( \
Entity_Quad_Triangle = 1284, Entity_Quad_Quadrangle = 1630, \
Entity_Quad_Edge = 393, Entity_Quad_Hexa = 3523, \
Entity_Quad_Penta = 592, Entity_Node = 18874, \
Entity_Quad_Hexa = 6952, Entity_Quad_Edge = 261, \
Entity_Node = 51119, Entity_Quad_Triangle = 190, \
Entity_Quad_Tetra = 11672, Entity_Quad_Tetra = 1322, \
Entity_Quad_Quadrangle = 3000) Entity_Quad_Pyramid = 172, \
Entity_Quad_Penta = 64 \
)

View File

@ -111,13 +111,13 @@ class faceGauche_2(fissureGenerique):
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
def setReferencesMaillageFissure(self): def setReferencesMaillageFissure(self):
self.referencesMaillageFissure = dict( \ self.referencesMaillageFissure = dict( \
Entity_Quad_Pyramid = 859, Entity_Quad_Quadrangle = 2542, \
Entity_Quad_Triangle = 634, Entity_Quad_Hexa = 3435, \
Entity_Quad_Edge = 323, Entity_Node = 44095, \
Entity_Quad_Penta = 288, Entity_Quad_Edge = 323, \
Entity_Quad_Hexa = 3435, Entity_Quad_Triangle = 634, \
Entity_Node = 44095, Entity_Quad_Tetra = 18400, \
Entity_Quad_Tetra = 18400, Entity_Quad_Pyramid = 859, \
Entity_Quad_Quadrangle = 2542 Entity_Quad_Penta = 288 \
) )

View File

@ -47,47 +47,53 @@ class vis_1(fissureGenerique):
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
def genereMaillageSain(self, geometriesSaines, meshParams): def genereMaillageSain(self, geometriesSaines, meshParams):
logging.info("genereMaillageSain %s", self.nomCas) texte = "genereMaillageSain pour '{}'".format(self.nomCas)
logging.info(texte)
([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests/visSain.med")) ([objetSain], _) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "visSain.med"))
smesh.SetName(objetSain.GetMesh(), 'objetSain') smesh.SetName(objetSain.GetMesh(), "{}_objetSain".format(self.nomProbleme))
return [objetSain, True] # True : maillage hexa return [objetSain, True] # True : maillage hexa
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
def setParamShapeFissure(self): def setParamShapeFissure(self):
""" """paramètres de la fissure pour méthode construitFissureGenerale
paramètres de la fissure pour méthode construitFissureGenerale
lgInfluence : distance autour de la shape de fissure a remailler (A ajuster selon le maillage) lgInfluence : distance autour de la shape de fissure a remailler (A ajuster selon le maillage)
rayonPipe : le rayon du pile maillé en hexa autour du fond de fissure rayonPipe : le rayon du pile maillé en hexa autour du fond de fissure
convexe : optionnel True : la face est convexe (vue de l'exterieur) sert si on ne donne pas de point interne convexe : optionnel True : la face est convexe (vue de l'exterieur) sert si on ne donne pas de point interne
pointIn_x : optionnel coordonnée x d'un point dans le solide sain (pour orienter la face) pointIn_x : optionnel coordonnée x d'un point dans le solide sain (pour orienter la face)
""" """
logging.info("setParamShapeFissure %s", self.nomCas) texte = "setParamShapeFissure pour '{}'".format(self.nomCas)
logging.info(texte)
self.shapeFissureParams = dict(lgInfluence = 0.6, self.shapeFissureParams = dict(lgInfluence = 0.6,
rayonPipe = 0.1) rayonPipe = 0.1)
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams): def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
logging.info("genereShapeFissure %s", self.nomCas) """Importe la géométrie de la fissure et crée le groupe du fond de la fissure"""
texte = "genereShapeFissure pour '{}'".format(self.nomCas)
logging.info(texte)
lgInfluence = shapeFissureParams['lgInfluence'] lgInfluence = shapeFissureParams['lgInfluence']
shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests/visFiss.brep")) shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "visFiss.brep"))
fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"]) fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
geompy.UnionIDs(fondFiss, [6, 8]) geompy.UnionIDs(fondFiss, [6, 8, 3])
geompy.addToStudy( shellFiss, 'shellFiss' ) geompy.addToStudy( shellFiss, 'shellFiss' )
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' ) geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 0.1 ,0.2) coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 0.1 ,0.2)
centre = None centre = None
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss] return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
def setParamMaillageFissure(self): def setParamMaillageFissure(self):
self.maillageFissureParams = dict(nomRep = '.', texte = "setParamMaillageFissure pour '{}'".format(self.nomCas)
logging.info(texte)
self.maillageFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas, nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas, nomFicFissure = 'fissure_' + self.nomCas,
nbsegRad = 5, nbsegRad = 5,
@ -103,6 +109,8 @@ class vis_1(fissureGenerique):
def genereMaillageFissure(self, geometriesSaines, maillagesSains, def genereMaillageFissure(self, geometriesSaines, maillagesSains,
shapesFissure, shapeFissureParams, shapesFissure, shapeFissureParams,
maillageFissureParams, elementsDefaut, step): maillageFissureParams, elementsDefaut, step):
texte = "genereMaillageFissure pour '{}'".format(self.nomCas)
logging.info(texte)
maillageFissure = construitFissureGenerale(maillagesSains, maillageFissure = construitFissureGenerale(maillagesSains,
shapesFissure, shapeFissureParams, shapesFissure, shapeFissureParams,
maillageFissureParams, elementsDefaut, step) maillageFissureParams, elementsDefaut, step)
@ -110,12 +118,14 @@ class vis_1(fissureGenerique):
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
def setReferencesMaillageFissure(self): def setReferencesMaillageFissure(self):
self.referencesMaillageFissure = dict(Entity_Quad_Pyramid = 1284, self.referencesMaillageFissure = dict( \
Entity_Quad_Triangle = 2336, Entity_Quad_Quadrangle = 4285 ,\
Entity_Quad_Edge = 758, Entity_Quad_Hexa = 6416, \
Entity_Quad_Penta = 984, Entity_Node = 85673, \
Entity_Quad_Hexa = 6416, Entity_Quad_Edge = 758, \
Entity_Node = 85673, Entity_Quad_Triangle = 2336, \
Entity_Quad_Tetra = 35990, Entity_Quad_Tetra = 35990, \
Entity_Quad_Quadrangle = 4285) Entity_Quad_Pyramid = 1284, \
Entity_Quad_Penta = 984 \
)