CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums

Generating nonuniform meshes with sizefunction

Register Blogs Community New Posts Updated Threads Search

Rate this Entry

Generating nonuniform meshes with sizefunction

Posted April 18, 2012 at 22:57 by sunliming

Generating nonuniform meshes with sizefunction
---------------------------------------------------------------------------------
Quote:
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
}

mesh.movePoints(newPoints);

mesh.write();

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).

Regards,
Alberto
Posted in Uncategorized
Views 1232 Comments 0 Edit Tags Email Blog Entry
« Prev     Main     Next »
Total Comments 0

Comments

 

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