CFD Online Logo CFD Online URL
Home > Forums

Generating nonuniform meshes with sizefunction

Register Blogs Members List Search Today's Posts Mark Forums Read

Rate this Entry

Generating nonuniform meshes with sizefunction

Posted April 18, 2012 at 21:57 by sunliming

Generating nonuniform meshes with sizefunction
Originally Posted by alberto View Post
Hello Ehsan,
the trick is exactly the one explained by Hrvoje in this thread.

Create a uniform mesh, with the number of nodes you need in the three directions. Then write a small utility which:

- Reads the mesh (see how this is done in all solvers or mesh manipulation utilities).

- Does

pointField newPoints = mesh.points();

forAll (newPoints, i)
// Your code here, calculate the point position



using an analytical expression to relate the position of a node in a uniform grid to the new position (this is commonly done to generate grids for channel flow simulations).

Posted in Uncategorized
Views 699 Comments 0 Edit Tags Email Blog Entry
« Prev     Main     Next »
Total Comments 0



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