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

How can generate Uniform Cartesian grid?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 12, 2008, 05:59
Default How can generate Uniform Cartesian grid?
  #1
Harry
Guest
 
Posts: n/a
Hi, Guys

I need generate uniform Cartesian grid for any arbitrary geometry. This is supposed to be used for some specific multiphase-flow coding. At the first step, I mesh the domain which should cover the whole geometry of interest, and be possibly larger than the space occupied by the geometry. The second step is to determine which cubic cells are located inside the geometry. The third step is to cut the cells near the boundaries of the geometry. I would appreciate your hints about the last two steps. Is there any package available to handle this problem?

Regards,

Harry
  Reply With Quote

Old   January 12, 2008, 07:55
Default Re: How can generate Uniform Cartesian grid?
  #2
BastiL
Guest
 
Posts: n/a
Harry,

this seem so be a non trivial problem. There are several packages out there that try to do this. Especially for highly complex geometry cutting step is extremly difficult and generating good cell quality is a challange.

I need some more information: What does you geometry look like? Is it very complex? Do you need to access the mesh generated in Step 2 (Inside cells, not boundary fitted)? Is your initial surface closed and manifold? How good is th emesh quality of your inital surface mesh? (criterions like triquality or equiangle skewness may be helpful)

BastiL
  Reply With Quote

Old   January 12, 2008, 09:34
Default Re: How can generate Uniform Cartesian grid?
  #3
rt
Guest
 
Posts: n/a
i do some job in this regard, related paper is:

http://www3.interscience.wiley.com/c...TRY=1&SRETRY=0

this paper describe fairly simplems possible method to generate cartesian grid, its implementation is available here:

http://mehr.sharif.ir/~tav/cartgen.htm

  Reply With Quote

Old   January 12, 2008, 09:40
Default Re: How can generate Uniform Cartesian grid?
  #4
rt
Guest
 
Posts: n/a
correct link to paper is: http://dx.doi.org/10.1002/fld.1685
  Reply With Quote

Old   January 12, 2008, 14:28
Default Re: How can generate Uniform Cartesian grid?
  #5
BastiL
Guest
 
Posts: n/a
Interesting project. I tried to compile it but I struggle with gfortran. Which compiler is best?

These structured octree methods face lots of challenges. All codes have their certain pros and cons so it might be helpful to know how Harrys requirements are. I know most of the tools and can give him some feedback afterwards.
  Reply With Quote

Old   January 12, 2008, 15:39
Default Re: How can generate Uniform Cartesian grid?
  #6
rt
Guest
 
Posts: n/a
> Interesting project. I tried to compile it but I struggle with gfortran. Which compiler is best?

i think that it will be possible to compile it under any f90 compiler (i have tried DF), maybe you sholud separate module part from other parts and then compile its.

> These structured octree methods face lots of challenges.

i do not understand what you mean, but i could say that, generation of "Cartesian Octree" is fairly robust and simple procedure and there is not any challenge in this regard.

but note that: you sholud have a healthy CAD geometry, without gap, ..., fortunately there are several methods to repaire CAD files !

  Reply With Quote

Old   January 12, 2008, 17:40
Default Re: How can generate Uniform Cartesian grid?
  #7
BastiL
Guest
 
Posts: n/a
Thanks, how do I seperate modules? I will lool for the error messages - it has something to do with boolean operators as far as I remember.

The challenges: Generating a healty CAD is one of these. I do not really know good ways to repair really compelex CAD data so far.... So this sould be possible to handle as very few meshers can. What CAD repair do you propose? Another one is boundary adaption. I have seen very few (commercial) tools that are able to produce sufficiant quality for really complex geometries. Some companies do not even try to programm such a tool... Cartesian octree itself is robust no doubt.
  Reply With Quote

Old   January 12, 2008, 19:02
Default Re: How can generate Uniform Cartesian grid?
  #8
TITAN Algorithms
Guest
 
Posts: n/a
Harry,

What kind of geometry do you have? I would like to take a try at it with Hyperion-Mesh3D. Mesh3D generates a structured Hexahedral mesh from generic input geometries. I would be happy to issue a free license for your evaluation. Also, if anyone else is interested, please contact me.

www.titanalgorithms.com/hyperion_mesh3d

Best Regards

DSS

Last edited by wyldckat; March 9, 2014 at 17:09. Reason: removed image that was showing publicity, as the site is now dead
  Reply With Quote

Old   January 12, 2008, 19:36
Default Re: How can generate Uniform Cartesian grid?
  #9
Harry
Guest
 
Posts: n/a
impressive work! This is the part that I wanted. I calculate dense gas-solid flows. Hopefully, uniform Cartesian grid is just used to calculate solid concentration which requires to be mapped to CFD grid later. CFD grid generated by some commercial grid generators such as Gambit and ICEM/CFD is composed of arbitrary-shape cells. I can extract surface grid and triangulate it for the generation of uniform Cartesian grid. So my case may not be as hard as what BastiL is considering although I do be looking for a generalized-purpose method. However, in my work I need calculate solid concentration/porosity by dividing the volume of particles with the volume of cell where the particles are residing. This means that cell size needs to be big enough to obtain solid concentration having physical meanings, and it is necessary to obtain the exact volumes of the boundary cells which are partially located inside the domain of interest. I have quickly looked through rt's paper, it seems these volumes are not available in his method. Therefore I would appreciate your further suggestion.

Cheers, Harry
  Reply With Quote

Old   January 13, 2008, 12:15
Default Re: How can generate Uniform Cartesian grid?
  #10
BastiL
Guest
 
Posts: n/a
rt, this is what I get with gfortran (mere than once):

... IF(FLG_OCTREE) CALL MAKE_REMAINED_LEVELS

1

Error: ELSE IF clause at (1) requires a scalar LOGICAL expression ...

However your project looks interestign. Can you tell me more: What input and output file formats, is boundary fitting of octree mesh to geometry done and if yes, how? Thanks.

BastiL
  Reply With Quote

Old   January 15, 2008, 09:33
Default Re: How can generate Uniform Cartesian grid?
  #11
rt
Guest
 
Posts: n/a
> However, in my work I need calculate solid concentration/porosity by dividing the volume of particles

this is separated task from grid generator, you only need to determine number/type (include their volume) of particles in each cartesion cell which is easy for a uniform cartesian mesh.

> and it is necessary to obtain the exact volumes of the boundary cells which are partially located inside the domain of interest

my method compute approximate partial volume with more than 2nd order accuracy (you could increase its), i disscuss in paper about its. When we use approximate method (FDM, FVM, ...) why you try to use exact geometry! note that accuracy of suggested approximate method could be easily controlled and i think for a corse grid an geometry with approximately smooth boundary, it could be matched with computer floating point resolution.

but if you look for exact one (which is not essential in my opinion) you should implement method like M. Aftosmis method (AIAA98) which is fairly difficult to implement and needs state-of-the-art background in computational gometry

  Reply With Quote

Old   January 15, 2008, 09:43
Default Re: How can generate Uniform Cartesian grid?
  #12
rt
Guest
 
Posts: n/a
regarding to error under gfortran let me time to check its, now i am busy but i post my comment in this regard as soon as possible (but i think it will be very easy to resolve, basically compile of Fortran code is not challenge).

redarding to CAD repaire:

I list a few one in CartGen paper (get your email, i will send paper if u do not have access) some of them are open-source , e.g. http://graphics.stanford.edu/software/volfill/ is one of the old methods, for some of them binary package are available. Usually a surface triangulation, e.g. STL is required, but cargen is work of 05-06 and now there are more methods and more tools for this (if you realy look for a cad fixing tool send me an off-line email)

some new methods get only point cloud and generate healthy triangulation over it, basically no-one claim for robust method to repair dirty geometries (read related papers to figure out what is challenge in this field), but results are usually satisfactory.

a good resource in this field is ACM: http://portal.acm.org/ (ACM SIGRAGH and ACM TOG is one of the best) search in this bank by suitable keyword, if you do not have direct acces to paper do not worry in the computer science field peoples usually put their work on web and with google you usually could get them.

Also, you could use some from refs. of cartgen paper in this field, and then follow their citation by google scholar to know what is new works and stat-of-the-art

CADFIX is a commercial package for this too, also i heard from my friends that Solid-Work could repair "dirty" STL files

> I have seen very few (commercial) tools that are able to produce sufficient quality for really complex geometries

probably you mean body-fitted grid not cartesian-octree, i should say that i only know one semi-commercial cartesain octree solver (available only for US), Cart3D due to M. Aftosmis. Writing an immersed boundary octree flow solver is an order of magnitude difficult in contrast to body-fitted solver (if we try to preserve efficiency).

to my knowledge adaptation available in commercial grid generators are not fully automatic and generation of a suitable method needs large human efforts and is really art. (automation is one of main benefits of Cartesian solver)

  Reply With Quote

Old   January 15, 2008, 09:45
Default Re: How can generate Uniform Cartesian grid?
  #13
rt
Guest
 
Posts: n/a
regarding to compile error, i feedback in near future, i am quit busy right now.

> However your project looks interestign. Can you tell me more: What input and output file formats, is boundary fitting of octree mesh to geometry done and if yes, how?

please look at the paper, method is quit clear and easy, you got all of your question are answered un its (get your email, i could forward its)

input geometry is surface triangulation, e.g. STL

you could write output based on your need, only for show i put Tecplot and binary VTK (paraveiw read its)
  Reply With Quote

Old   January 15, 2008, 09:45
Default Re: How can generate Uniform Cartesian grid?
  #14
rt
Guest
 
Posts: n/a
regarding to compile error, i feedback in near future, i am quit busy right now.

> However your project looks interestign. Can you tell me more: What input and output file formats, is boundary fitting of octree mesh to geometry done and if yes, how?

please look at the paper, method is quit clear and easy, you got all of your question are answered un its (get your email, i could forward it to u)

input geometry is surface triangulation, e.g. STL

you could write output based on your need, only for show i put Tecplot and binary VTK (paraveiw read its)
  Reply With Quote

Old   January 15, 2008, 10:31
Default Re: How can generate Uniform Cartesian grid?
  #15
BastiL
Guest
 
Posts: n/a
Thanks so far rt. I have no access to the paper and CAD repair is of interest for me, I have stl-Files. My E-Mail:

BastiL2001@yahoo.de

You're right I mean body fitted meshing.
  Reply With Quote

Old   January 15, 2008, 18:33
Default Re: How can generate Uniform Cartesian grid?
  #16
marco
Guest
 
Posts: n/a
Could you send me too a copy of your paper ? I try to use CartGen compiling it with gfortran: I solve some problems in order to compile it, and at the end I've been able to compile it and process your example files. But I've a working file only for tecplot format; for VTK format, changing some part of the OPEN instruction in the subroutine in order to compile with gfortran, I was not be able to read the binary file with Paraview 3.2: do you have some suggestions ? Thanks Marco
  Reply With Quote

Old   January 15, 2008, 18:53
Default Re: How can generate Uniform Cartesian grid?
  #17
Gonski
Guest
 
Posts: n/a
"my method compute approximate partial volume with more than 2nd order accuracy (you could increase its), i disscuss in paper about its."

Great! this is exactly what I want.

"When we use approximate method (FDM, FVM, ...) why you try to use exact geometry!"

In my case, Cartesian grid is only used to evaluate solid concentration.

Now it seems all my problems have got being solved. Thanks for your kindly help.

Cheers,

Harry
  Reply With Quote

Old   January 16, 2008, 01:43
Default Re: How can generate Uniform Cartesian grid?
  #18
rt
Guest
 
Posts: n/a
Harry,

so what u need is a (high resolution) uniform cartesian grid (not octree), then u could extract partial volume, etc. information easily from its based on method disscussed in the paper. My code has a simple version for generation of uniform grid too, which is more easy to use and understand, give your mail ID i forward its to you.
  Reply With Quote

Old   January 16, 2008, 01:49
Default Re: How can generate Uniform Cartesian grid?
  #19
rt
Guest
 
Posts: n/a
> Could you send me too a copy of your paper ?

give ur mail ID

please let me know what u do to compile its under gfortran.

note that the output is only for showing the results, to use grid you should write your own output.

basically, i try to introduce an easy to implement cart grid generator (for uniform one it takes belw 2 days for me from scratch and i think for a people that read paper it take more little time), so code is not designed for end user and is not well documented with suitable output port, and is just to show programming and ease of implementation, i.e., converting 3d grid generation over complex geometry to sequense of 2d grid generation and in the same manner converting 2d to sequence of 1d grid generation

  Reply With Quote

Old   January 16, 2008, 03:51
Default Re: How can generate Uniform Cartesian grid?
  #20
Harry
Guest
 
Posts: n/a
"so what u need is a (high resolution) uniform cartesian grid (not octree), then u could extract partial volume, etc. information easily from its based on method disscussed in the paper. My code has a simple version for generation of uniform grid too, which is more easy to use and understand, give your mail ID i forward its to you."

This would greatly help. My email is s.b.kuang@gmail.com
  Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
On grid independent solution for pulsatile flow David FLUENT 5 March 25, 2022 04:33
Pressure instability with rhoSimpleFoam daniel_mills OpenFOAM Running, Solving & CFD 44 February 17, 2011 18:08
Problems with Turbulence Modeling ezsoal OpenFOAM Running, Solving & CFD 4 November 26, 2009 16:12
FOAM FATAL IO ERRORsimpleFoam hariya03 OpenFOAM Running, Solving & CFD 6 July 16, 2008 09:03
RasInterFoam STRANGE RESULTS AT BOUNDARY kumar2 OpenFOAM Running, Solving & CFD 8 March 24, 2008 19:38


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