CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Meshing & Mesh Conversion

Surface aligned mesh

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 27, 2006, 09:02
Default Hello FOAMers, inspired by
  #1
New Member
 
Radoslaw Pasiok
Join Date: Mar 2009
Location: Poznan, Poland
Posts: 6
Rep Power: 8
rpasiok is on a distinguished road
Hello FOAMers,

inspired by hftga2foam I thought about an utility for stretching a mesh or align it with a surface.
I use OpenFOAM to simulate flows around various hydraulic structures with scoured irregular bed and the bottom mesh always cause my headakes.

I tried to code such an utility and here is what it does:
  • reads an initial mesh
  • reads 2 surface files, i.e new bottom and top of the mesh (supported extensions are '.ftr', '.stl', '.stlb', '.gts', '.obj', '.ac', '.off' and '.tri');
  • moves mesh points in the Z direction so that the bottom and top faces are aligned with the surfaces - internal mesh points keep their relative distance between bottom and top faces during the transformation;
  • writes the new mesh to the next time step directory.
Sources and examples of the utility can be found on the wiki page:
http://openfoamwiki.net/index.php/Contrib_AlignMeshSurf

Shortcomings of the code:
  • both surfaces must cover original mesh in the XY-plane - it crashes if there's no surface point to read for any of mesh point t move
  • curently it moves the mesh only in the Z direction
I'm still looking for reasonable free (GPL-ed) surface generator. Usually I start with a grid of points or isolines and there's need for a non-linear interpolation / smoothing.
If you use or know about such tool, please, let me know.

Regards,

Radoslaw Pasiok
rpasiok is offline   Reply With Quote

Old   November 27, 2006, 11:22
Default Why don't you just use the aut
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
hjasak will become famous soon enough
Why don't you just use the automatic mesh motion solver - that will allow you to move all boundaries in any way you like and allow you to control the mesh grading etc.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   November 28, 2006, 05:55
Default Thank you Hrvoje for suggestio
  #3
New Member
 
Radoslaw Pasiok
Join Date: Mar 2009
Location: Poznan, Poland
Posts: 6
Rep Power: 8
rpasiok is on a distinguished road
Thank you Hrvoje for suggestion!
I would love to use the solver and I will in the future. Meanwhile I didn't want to jump into the dynamic mesh stuff as I regarded it to much complicated for my static problem. Maybe that was wrong impression...

I should know already that in the OpenFOAM I should check twice for ready to use solutions before I try to do something myself :-/

Radoslaw Pasiok
rpasiok is offline   Reply With Quote

Old   November 28, 2006, 06:33
Default Have a look at the moveMesh ap
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
hjasak will become famous soon enough
Have a look at the moveMesh application: there is a field called motionU, you specify the motion of the boundary, run moveMesh and... you're done!

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   November 29, 2006, 12:01
Default Thank you Hrvoje once again, I
  #5
New Member
 
Radoslaw Pasiok
Join Date: Mar 2009
Location: Poznan, Poland
Posts: 6
Rep Power: 8
rpasiok is on a distinguished road
Thank you Hrvoje once again, I had a look at the moveMesh & friends and it looks really great.

But still the main problem is to specify motionU. Please keep in mind that, in general, my surface is irregular.
What is the most elegant way of finding motionU if a patch is going to change its shape? More precisely, I want all patch points to move in a common direction but various distances.

In the alignMeshSurf the direction is assumed and the hitPoint of triSurfaceSearch is used to find the distance at each mesh point. Here I would need hitPoint only for patch points to know their distance to the surface. Then I would write the distances to motionU in similiar manner as it is done with motionDiff in setMotionMovingCone (newMovingCone case of icoDyMFoam).
Or is there something better? Thank you in advance for any suggestions.

Radoslaw Pasiok
rpasiok is offline   Reply With Quote

Old   November 29, 2006, 13:58
Default Have a look at the PrimitivePa
  #6
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
hjasak will become famous soon enough
Have a look at the PrimitivePatch class and projectPoints:

//- Project vertices of patch onto another patch
template <class>
List<objecthit> projectPoints
(
const ToPatch& targetPatch,
const vectorField& projectionDirection,
const intersection::algorithm alg = intersection::FULL_RAY,
const intersection::direction dir = intersection::VECTOR
) const;

objectHit gives you both the distance and location of projected point.

Enjoy,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   January 7, 2008, 06:55
Default related thread
  #7
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 9
maka is on a distinguished road
related thread
maka is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Volume mesh instead of surface mesh phan Open Source Meshers: Gmsh, Netgen, CGNS, ... 4 October 18, 2009 17:17
Recover surface from surface mesh in IcemCFD Jerry Tanner CFX 0 August 20, 2008 12:48
Mesh on surface Julia CFX 0 January 31, 2008 13:31
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 18:10
ccm+ surface mesh guang ai CD-adapco 0 July 14, 2006 00:28


All times are GMT -4. The time now is 10:47.