# volumetric control total cell count

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

 November 3, 2011, 20:57 volumetric control total cell count #1 Member   adam Join Date: Oct 2011 Posts: 52 Rep Power: 7 Sponsored Links Here is a picture of the mesh I am using for my simulation: The base size is 10 mm, the size for the volume control is 2.5 mm and absolute. With these values I have a cell count of about 195,000. I tried doing a mesh refinement, but something odd happened. When I refine the mesh for the volume control to 2 mm, the total cell count jumps up over 900,000. I played around with the mesh size for the volume control, and found that when I go from 2.18 mm to 2.17 mm, there is an increase in cell count of about 700,000. How does that many extra cells get added for a one hundredths of a millimeter change!? Its only when I hit this "threshold" value that the cell count just blows up and becomes huge. Where are all these extra cells being packed in? I took mesh scenes cut in different planes and everything looked normal. Keep in mind that above 2.18 mm there is only a gradual increase in cell count as I refine the mesh, which seems normal, so I do not understand where this huge sudden change from 200,000 to over 900,000 based upon a 1/100 millilmeter change is coming from. Last edited by sieginc.; November 4, 2011 at 00:22.

 November 5, 2011, 05:47 #2 Senior Member   Ping Join Date: Mar 2009 Posts: 272 Rep Power: 12 I agree it seems strange. Create a threshold (or several) based on cell volume with appropriate lower and upper limits and use this to determine where and how many cells of a few size ranges are in each model.

 November 5, 2011, 16:29 #3 Senior Member   Join Date: Oct 2009 Location: Germany Posts: 637 Rep Power: 14 It is a trimmed mesh, so all relations of cell sizes will be nth power of 2. It might happen, the mesher can't place smaller cells when you decrease the cell size only slightly, as it wouldn't be half the size of the next bigger cell. Now when you reduce the target size below a certain value, the mesher finds out, it can half a cell in all directions without breaking the minimum size. And to produce twice the cells in every direction is a total of 8 times more cells. When you volumetric control with the bigger settings contains only about 100 000 cells (which is half of the total cell count, that's often a reasonable value), you will get 800 000 cells when the cell size is halfed. You can prove this by measuring the cell size with both settings. Just place a ruler tool along an edge of a cell and see how it changes when changing the cell size in your volumetric control.

 November 6, 2011, 05:21 #4 Senior Member   Ping Join Date: Mar 2009 Posts: 272 Rep Power: 12 abdul is on the right track - I did not notice that you were using a volume source. with a base size of 10mm your vol source cell sizes will only change when you set its size to 5, 2.5, 1.25mm etc.. at some point in between these values the mesher decides to go to the next lower size - you have discovered by accident this transition point for the change from 2.5 to 1.25mm at about 2.17 - I did a test on a simple box with one vol source and confirmed this. a good lesson for all trimmer mesh users - keep boundary and vol source sizes as power of 2 multiples or fractions of the base size if you don't want to see the effect which puzzled you.

 November 7, 2011, 03:57 #5 Member   adam Join Date: Oct 2011 Posts: 52 Rep Power: 7 Thank you for the responses. If that's the case then that really hampers any attempt at a mesh refinement study, since I would only be able to test two mesh sizes of 5 mm and 2.5 mm. That does not give me a whole lot of insight into any convergence. If I get down to 1.25 mm my processing time becomes too impractical. To be honest my intuition tells me 2.5 mm is a sufficient mesh size for what I'm doing, but this is going to be for a thesis so I need to 'prove' the quality of the mesh with some sort of convergence study. Would I be better off not using the trimmer and just using a tetrahedral mesh?

 November 7, 2011, 05:08 #6 Senior Member   Ping Join Date: Mar 2009 Posts: 272 Rep Power: 12 if you change the base size rather than the local size on the vol source or boundary (and ensure these are all set to relative rather than absolute sizing), then you can use any value, and then all the mesh will change size in proportion, and you will be able to get much greater control of the mesh count

November 7, 2011, 19:50
#7
Member

Join Date: Oct 2011
Posts: 52
Rep Power: 7
Quote:
 Originally Posted by ping if you change the base size rather than the local size on the vol source or boundary (and ensure these are all set to relative rather than absolute sizing), then you can use any value, and then all the mesh will change size in proportion, and you will be able to get much greater control of the mesh count
If I wanted to keep the base size constant, could I just switch the vol source size to relative, and vary that % instead?

Ex: base size 10 mm for all tests

Test 1: vol source size 50% relative to base
Test 2: 40%
Test 3: 30%

etc. etc

 November 8, 2011, 04:20 #8 Senior Member   Ping Join Date: Mar 2009 Posts: 272 Rep Power: 12 please read what abdul and i said previously - all local refinements are powers of 2 of the base size - nothing to do with absolute or relative. i cant see why you dont want to change the base size - this is the correct way to do this - if you are not happy with the cells sizes elsewhere then make other local adjustments. alternatively you could create a new region for the area you are concerned about with its own mesh model and so mesh sizes in each region could then be quite independent. need to interface the regions which is dead easy with 3d-cad and parts these days.

 November 11, 2011, 14:24 #9 Senior Member   Join Date: Oct 2009 Location: Germany Posts: 637 Rep Power: 14 Ping is absolutely right, I would refine the complete mesh by reducing the base size to study mesh dependendy. Anyway, when you want to reduce the mesh in your volumetric control without touching the rest of your mesh, you can either use two regions (with additional inaccuracies at the non-conformal interface) or use a polyhedral mesh. I recommend not to use a tetrahedral mesh, as a polyhedral mesh increases the accuracy and significantly reduces the cell count.

 November 13, 2011, 05:46 #10 Member   adam Join Date: Oct 2011 Posts: 52 Rep Power: 7 OK I understand now. Well, I eliminated the problem of the cell count jumping by varying the base size. I do have a more general question relating to meshes and mesh size. I am relatively new to CFD, but for those more experienced, what is your meshing procedure like? Do you arbitrarily pick a mesh size you think will yield good results, or do you perform some type of convergence study every time? In my case I'm looking at the average and peak surface temperatures of a block that generates heat being cooled by a fan. I gradually refined the mesh using the method discussed in this thread, but I didn't notice any type of convergence as the mesh got finer. The average surface temperature decreased at a constant rate. The peak temperatures increased and decreased at random, but stayed within a certain range. I guess if someone asked me about my mesh quality, I wouldn't really be able to "prove" its a quality mesh. But then again, what makes a quality mesh anyway? I don't have real data to compare my results to.

November 14, 2011, 17:14
#12
Member

Join Date: Oct 2011
Posts: 52
Rep Power: 7
Quote:
Thank you very much for the insight. I actually believe I may have found the culprit... my prism layer thickness was too great. I had them about the same size as what was in my volume control, and just made them smaller. Now my results seem better.

 November 14, 2011, 17:49 #13 Senior Member   Join Date: Oct 2009 Location: Germany Posts: 637 Rep Power: 14 Okay, don't forget to have a look on your Y+ values when twiddling with the prism layer settings...

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post sebastian_vogl OpenFOAM Programming & Development 1 October 11, 2016 13:17 eespi002 FLUENT 0 July 28, 2009 15:07 xujjun CFX 9 June 9, 2009 07:59 Jesper SÃ¸rensen CFX 16 December 23, 2006 09:40 Tudor Miron CFX 15 April 2, 2004 06:18