# --- maillage effectif du pipe
- (meshPipe, meshPipeGroups, edgesCircPipeGroup) = \
+ (meshPipe, edgeFaceFissGroup, edgesCircPipeGroup) = \
construitMaillagePipe(gptsdisks, idisklim, nbsegCercle, nbsegRad, \
nro_cas)
(meshFaceFiss, _, grpEdgesPeauFissureExterne, _) = \
mailleFacesFissure(faceFissureExterne, \
edgesPipeFissureExterneC, edgesPeauFissureExterneC, \
- meshPipeGroups, areteFaceFissure, rayonPipe, nbsegRad, \
+ edgeFaceFissGroup, areteFaceFissure, rayonPipe, nbsegRad, \
mailleur, nro_cas)
# --- maillage faces de peau
meshPipe = smesh.Mesh(None, "meshPipe")
putName(meshPipe, "meshPipe", i_pref=nro_cas)
+ edgesCircPipeGroup = list()
+
fondFissGroup = meshPipe.CreateEmptyGroup(SMESH.EDGE, "FONDFISS")
nodesFondFissGroup = meshPipe.CreateEmptyGroup(SMESH.NODE, "nfondfis")
faceFissGroup = meshPipe.CreateEmptyGroup(SMESH.FACE, "fisInPi")
edgeFaceFissGroup = meshPipe.CreateEmptyGroup(SMESH.EDGE, "edgeFaceFiss")
- edgeCircPipe0Group = meshPipe.CreateEmptyGroup(SMESH.EDGE, "edgeCircPipe0")
- edgeCircPipe1Group = meshPipe.CreateEmptyGroup(SMESH.EDGE, "edgeCircPipe1")
- faceCircPipe0Group = meshPipe.CreateEmptyGroup(SMESH.FACE, "faceCircPipe0")
- faceCircPipe1Group = meshPipe.CreateEmptyGroup(SMESH.FACE, "faceCircPipe1")
mptdsk = list() # vertices de chaque disque au fur et à mesure
mptsdisks = list() # vertices maillage de tous les disques
construitMaillagePipe_b(idisk, \
idisklim, nbsegCercle, \
meshPipe, mptdsk, \
- edgeCircPipe0Group, edgeCircPipe1Group)
+ edgesCircPipeGroup)
# -----------------------------------------------------------------------
# --- Les groupes des faces débouchantes
if idisk in (idisklim[0],idisklim[1]):
construitMaillagePipe_c(idisk, \
idisklim, nbsegCercle, \
- meshPipe, mptdsk, nbsegRad, \
- faceCircPipe0Group, faceCircPipe1Group)
+ meshPipe, mptdsk, nbsegRad)
# -----------------------------------------------------------------------
# --- mailles volumiques, groupes noeuds et edges de fond de fissure, groupe de face de fissure
_ = pipeFissGroup.AddFrom( meshPipe.GetMesh() )
_, _, _ = meshPipe.MakeBoundaryElements(SMESH.BND_2DFROM3D, "pipeBoundaries")
- edgesCircPipeGroup = [edgeCircPipe0Group, edgeCircPipe1Group]
-
- meshPipeGroups = dict(fondFissGroup = fondFissGroup, \
- nodesFondFissGroup = nodesFondFissGroup, \
- faceFissGroup = faceFissGroup, \
- edgeFaceFissGroup = edgeFaceFissGroup, \
- edgeCircPipe0Group = edgeCircPipe0Group, \
- edgeCircPipe1Group = edgeCircPipe1Group, \
- faceCircPipe0Group = faceCircPipe0Group, \
- faceCircPipe1Group = faceCircPipe1Group, \
- pipeFissGroup = pipeFissGroup, \
- edgesCircPipeGroup = edgesCircPipeGroup \
- )
#if meshPipe:
#text = "Arrêt rapide.\n"
#logging.info(text)
#raise Exception(text)
- return (meshPipe, meshPipeGroups, edgesCircPipeGroup)
+ return (meshPipe, edgeFaceFissGroup, edgesCircPipeGroup)
#
"""Les groupes des edges des cercles débouchants"""
+import SMESH
+
def construitMaillagePipe_b(idisk, \
idisklim, nbsegCercle, \
meshPipe, mptdsk, \
- edgeCircPipe0Group, edgeCircPipe1Group):
+ edgesCircPipeGroup):
"""Les groupes des edges des cercles débouchants"""
#logging.info('start')
pts = list()
for n_cercle in range(nbsegCercle):
pts.append(mptdsk[n_cercle][-1])
+
edges = list()
nb_pts = len(pts)
for n_cercle in range(nb_pts):
edges.append(id_edge)
if idisk == idisklim[0]:
- edgeCircPipe0Group.Add(edges)
+ groupe = meshPipe.CreateEmptyGroup(SMESH.EDGE, "edgeCircPipe0")
else:
- edgeCircPipe1Group.Add(edges)
+ groupe = meshPipe.CreateEmptyGroup(SMESH.EDGE, "edgeCircPipe1")
+
+ groupe.Add(edges)
+ edgesCircPipeGroup.append(groupe)
return
#
"""Les groupes des faces débouchantes"""
+import SMESH
+
def construitMaillagePipe_c(idisk, \
idisklim, nbsegCercle, \
- meshPipe, mptdsk, nbsegRad, \
- faceCircPipe0Group, faceCircPipe1Group):
+ meshPipe, mptdsk, nbsegRad):
"""Les groupes des faces débouchantes"""
#logging.info('start')
faces.append(id_face)
if idisk == idisklim[0]:
- faceCircPipe0Group.Add(faces)
+ groupe = meshPipe.CreateEmptyGroup(SMESH.FACE, "faceCircPipe0")
else:
- faceCircPipe1Group.Add(faces)
+ groupe = meshPipe.CreateEmptyGroup(SMESH.FACE, "faceCircPipe1")
+
+ groupe.Add(faces)
return
def mailleFacesFissure(faceFissureExterne, \
edgesPipeFissureExterneC, edgesPeauFissureExterneC, \
- meshPipeGroups, areteFaceFissure, rayonPipe, nbsegRad, \
+ edgeFaceFissGroup, areteFaceFissure, rayonPipe, nbsegRad, \
mailleur="MeshGems", nro_cas=None):
"""maillage faces de fissure"""
logging.info('start')
logging.info("UseExisting1DElements depuis '%s'", edgesPipeFissureExterneC.GetName())
algo1d = meshFaceFiss.UseExisting1DElements(geom=edgesPipeFissureExterneC)
- hypo1d = algo1d.SourceEdges([ meshPipeGroups['edgeFaceFissGroup'] ],0,0)
+ hypo1d = algo1d.SourceEdges([ edgeFaceFissGroup ],0,0)
putName(algo1d.GetSubMesh(), "edgeFissPeau", i_pref=nro_cas)
putName(algo1d, "algo1d_edgeFissPeau", i_pref=nro_cas)
putName(hypo1d, "hypo1d_edgeFissPeau", i_pref=nro_cas)