Moving a deformable mesh by moving nodes directly

Submitted by pfalkingham on Fri, 09/21/2018 - 12:01

I'm hoping to simulate a mesh where faces can change in size and geometry - my source is a mesh that's moved by directly moving individual vertices.

Question 1: Is this going to work if I try to do it in LIGGGHTS, or is there some reason that it won't work even if I can implement it? My understanding is that the mesh rotate command works by calculating new vertex positions, so perhaps it's possible to move each one independently?

Question 2: Is it already possible to directly move verticies, either elegantly or with a hacky workaround? (I'm guessing not, so...)
Question 2b: A brief and uneducated look through the source tells me that this may require digging into multiple source files (mesh definitions, mesh_mover, probably more - Or could I just adapt mesh_mover_rotation perhaps?) to implement it. Any comments on where to start?

richti83's picture

richti83 | Fri, 09/21/2018 - 18:07

Hey Peter,
nice to see you again in the Forum.

The "magic" happens in multi_node_mesh_I.h
I added a new Method "moveelements"

/*#############################################################
move mesh element with constant velocity between two timesteps
###############################################################*/
template
void MultiNodeMesh::moveElements(double*** v_node, double dt)
{
int n = sizeLocal() + sizeGhost();
//printf("size=%d\n",n);
for (int i = 0; i < n; i++)
{
vectorZeroize3D(center_(i));
for (int j = 0; j < NUM_NODES; j++)
{
for (int k = 0; k<3; k++) {
node_(i)[j][k] += v_node[i][j][k] * dt;
}
vectorAdd3D(node_(i)[j], center_(i), center_(i)); //calc center
}
vectorScalarDiv3D(center_(i), static_cast(NUM_NODES));
}
updateGlobalBoundingBox();
}

For our DEM-FEM coupling we use file exchange every 1000 DEM steps and interpolate the mesh position between this coupling steps with this method.
I call it directly from my new mesh_mover_FEM

replacing mesh code
[...]
else {
//printf("Interpolate STL FILE at step %d\n",update->ntimestep);
mesh_->moveElements(v_node_move,dt);
//add node velocity, by initial integrate v_node is v_surf bc. of copy v_conveyor (=0 for non-surface vel)
for (int i = 0; i < size; i++)
for (int j = 0; j < numNodes; j++) {
vectorAdd3D(v_node[i][j], v_node_move[i][j], v_node[i][j]);
}
}

You need a way to tell liggghts the node-velocity (v_node_move[triangle][node][3]) from outside for every node, for us we derive it directly in FEM from node-positions between two load steps.

See https://doi.org/10.2314/GBV:871968150 @Fig. 54 for the result.
The DEM FEM Coupling was a two year project, so don't expect to get everything to work over the weekend ;-).

Maybe we can make a corporate project before England leaves EU ??

Best
Christian.

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

pfalkingham | Thu, 09/27/2018 - 11:58

That's a big help, thanks Christian. I will eventually have a xyz list of positions for each vertex at every x timesteps, so velocity and position for each vertex can easily be calculated/supplied.

As always, funding is always an issue, but I'll look into it to see if we can get a collaboration going.

P