CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Manipulation of every single mesh node inside the domain (OpenFoam) (

davide November 1, 2012 22:51

Manipulation of every single mesh node inside the domain (OpenFoam)
Hello everyone,

I am new to OpenFoam and I would like to simulate an unsteady model that requires moving boundary/mesh motion analysis.

However, the motion of the mesh nodes are already prescribed (known) as a function of time. so I do not need to use any dynamic mesh solver to calculate the position of each node.

Is it possible in OpenFoam to manipulate the position of each mesh node inside the domain as a function of time?

I appreciate if someone would help me with this issue.


kmooney November 5, 2012 17:34

Hi D,

You can do something like this to manipulate the mesh point locations as you like. You will need to incorporate this CV motion into your solver though relative/abs flux treatments.

Uniform mesh point manipulation can be quite easy:


        vectorField delCentroid(mesh.points().size(), deltaC);

        vectorField newPoints = mesh.points() + delCentroid;


Here I'm moving the mesh every timestep by a vector deltaC. You could loop through the motion vectors in 'newPoints' and move them independently if you wanted.

I hope that helps you out a bit.


davide November 27, 2012 14:28

Hey Kyle,

Thanks for the reply.

I will give it a shot and let you know the results.


immortality November 28, 2012 18:18

I have the same problem.where in solver i should add this code?
Thank you.

All times are GMT -4. The time now is 13:45.