CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Manipulation of every single mesh node inside the domain (OpenFoam) (http://www.cfd-online.com/Forums/openfoam-solving/108807-manipulation-every-single-mesh-node-inside-domain-openfoam.html)

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.

Thanks
D

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:

Code:

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

        vectorField newPoints = mesh.points() + delCentroid;

        mesh.movePoints(newPoints);

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.

Cheers!
Kyle

davide November 27, 2012 14:28

Hey Kyle,

Thanks for the reply.

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

Thanks
D

immortality November 28, 2012 18:18

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


All times are GMT -4. The time now is 23:53.