CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Morphing deforming surface mesh depend on some sensitivity field (

sponiar June 4, 2008 06:54

Hi FOAMing users, may I ask f
Hi FOAMing users,
may I ask for some questions about moving surface points depend on some contours of scalarField.
I attach 2 pics. It looks like motorcycle helmet and color is coresponding with sensitivity map.

And this is the problem. How could I move with every points / elements mesh to normal direction depend on local values of sensitivity map.
I found OpenFOAM tool like 'deformedGeom'. It is good start point. This aplications takes infromation about velocity field and move every points in control domain respect to some 'scale factor * U'.
In this time I can changed velocity field to any other scalar or vector field, but thise steps are not quite correct for me. Results are always horrible.

May I ask you for any hints how implement thise steps:

- find boundary condition 'helmet'
- get values of sensitivity map
- move every helmet's boundary elements respect to 'sensetivityMap * normalVectorOfElement * someScaleFactor'
- write new geometry to typical dir. structure of /constant/polyMesh

In this time, I do not care if volume mesh after morphing will have some negative volume or very bad cells. Primary, I would like get new geometry. After that, I can generate new volume mesh and repeat simulation.

Thank you for any hints.

braennstroem June 7, 2008 17:19

Hi David, take a look at ht
Hi David,

take a look at

I create the morphing according to the diff of two different meshes using deformGeom. Obviously you have to create diffs for every shape vector.


sponiar June 11, 2008 11:19

I try other steps to check, wh
I try other steps to check, where could be any mistake.
In previous source code for morphing I attached block, which convert x,y coordinates of cylinder to angular construction. So I get file with:

#angle ----- sensitivityMap
-180 0.0
-175 10.5
. .
. .
. .
175 -2.5
180 -0.01

When I plot data, graph look like some tic-tac-noise curve. So I check list of x-coord, y-xoord and sensitivity map in this cordinate and value, which have to be there was in another point.
Now, I can only guess: there is some mistake with sorting point and value in those points.

Could You help me?

braennstroem August 12, 2008 13:32

Hi David, did you find your p
Hi David,
did you find your problem?

All times are GMT -4. The time now is 12:01.