Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Creating identical meshes on opposing faces

Status
Not open for further replies.

DavidMcArthur

Mechanical
Dec 2, 2021
9
0
0
GB
Hello all,

I am trying to create identical meshes on 2 opposing and parallel faces of a part (show below with red circles identifying example of opposite faces)
Picture3_mf5z0k.png


I need the nodes of the (linear tetrahedral) elements to be lined up really well (to within some small tolerance that I can set myself). I will then use a plugin to apply constraint equations between the pairs of nodes that requires them to have the same coordinates (excluding the coordinate in which the faces are separated).

So far I have tried to fiddle with different mesh controls, seeding edges, structural vs free mesh etc. I then found out that you can edit the coordinates of mesh nodes in Abaqus. I have tried to write a python script to do this (manually would be too long as I want to do this with different geometries too). The python script is not behaving exactly as I hoped (I have attached the script and pasted the section of code below). As you can see, the meshes are very different. I can also see when I print the coordinates of all the nodes that they are not right. In the code, I have specified that I should change the coordinates of the node on face 2 to that of the closest node on face 1. If I don't do this, the nodes are pulled all over the place - it might match the coordinates of 2 nodes on opposite corners of the faces for example.

Picture4_fxgs6l.png


I have put a wetransfer link of my files here: If anyone wants to look.

Any help would be much appreciated. If there is a better more simple approach that would be great. Maybe there is some other software that can do this more easily too? I know of meshlab but I am not familiar with all the features.

Thank you all,
David


Python:
#Python Code for trying to match coordinates of nodes on opposing faces
#
#generate mesh
#
mdb.models['Model-1'].parts['unit cell'].generateMesh()   
#
#Edit Node Coordinates
#
#Collect Nodes on Faces
Nodes_1=mdb.models['Model-1'].parts['unit cell'].nodes.getByBoundingBox(-100,7.49999,-100,100,7.50001,100)
Nodes_2=mdb.models['Model-1'].parts['unit cell'].nodes.getByBoundingBox(-100,4.49999,-100,100,4.50001,100)
x_coordinate_list_1=[]
x_coordinate_list_2=[]
for i in range(0, len(Nodes_1)-1):
    current_node=Nodes_1[i]
    current_node_2=Nodes_2[i]
    x_coordinate=current_node.coordinates[0] #gather x and z coordinates on face 1
    z_coordinate=current_node.coordinates[2]
    distance=[]
    #Find closest node on face 2 to node i on face 1
    for j in range(0, len(Nodes_2)-1):
        distance.append(sqrt(((x_coordinate-x_coordinate_2)**2)+((z_coordinate-z_coordinate_2)**2)))
        min_distance = min(distance)
        index=distance.index(min_distance)
    current_node_2=Nodes_2[index]
    #Edit x and z coordinates of node on face 2 to match node on face 1
    mdb.meshEditOptions.setValues(enableUndo=True, maxUndoCacheElements=0.5)
    mdb.models['Model-1'].parts['unit cell'].editNode(coordinate1=x_coordinate, coordinate3=z_coordinate, nodes=
        current_node_2, 
        projectToGeometry=ON)
 
Replies continue below

Recommended for you

Can you say more about the goal of this analysis ? There are often some workarounds but it depends on what you want to achieve in this simulation. For example, there are plug-ins that facilitate the whole preparation of RVE’s and other models woth periodic boundary conditions. They take care of side to side node matching as well. And if you just want to define general equation constraints then there are likely easier ways and plug-ins for that. Maybe you could even create separate, independently meshed parts, mirror/pattern them and then connect with the rest of the model.
 
Hi there, thank you for your reply and suggestions!

So my goal is to simulate the uniaxial compression of this unit cell (and others later) to attain the E11 and E22 Young's modulus, and G12 shear modulus. I have a plugin that I was recommended called EasyPBC which doesn't perform side by side node matching and this is why I need to match the nodes. I would love to hear about any software or plugins that can help with that however, I haven't come across them myself yet!

At the moment, my workflow is that I create the geometry in Rhinoceros using a parametric modelling plugin called Grasshopper. Because I will ultimately be creating lots of complex geometries I would like to keep my workflow that way ideally - Creating step files in Rhinoceros and meshing in either Abaqus or another meshing software for subsequent analysis in Abaqus.
 
Check the Micromechanics Plugin, it offers some form of matching to handle periodic boundary conditions. This plug-in is likely the best way to perform analyses with RVE's in Abaqus.
 
Try this:
When you create a tet mesh with the option "Mesh Region", you can use the selection filter to create a boundary mesh on individual surfaces. Do that for one of the two faces. Then go to Mesh->Edit->Copy mesh pattern to copy that mesh to the second face. In that process you have to select some characteristic nodes/points to make A/CAE more clear how the copying should happen. After this you should have the same mesh on both faces.

Now also generate meshes for the other faces of your solid like in the first action of the previous process.
Then say you want to mesh the solid again. A/CAE should recognize that all faces have boundary meshes and just fill the solid based on those outer meshes.
 
@FEA_way That plugin looks very helpful as they say it accommodates unit cell analysis for lattices which is what I'm working on - thank you for the help

@Mustaine3 This is exactly what I needed!! It worked a treat and I have perfectly matching meshes on 2 faces now. Thanks very much for the help it's much appreciated
 
Status
Not open for further replies.
Back
Top