|
[Sponsors] |
November 3, 2011, 20:57 |
volumetric control total cell count
|
#1 |
Member
adam
Join Date: Oct 2011
Posts: 52
Rep Power: 15 |
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: 556
Rep Power: 20 |
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: 636
Rep Power: 22 |
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: 556
Rep Power: 20 |
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: 15 |
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: 556
Rep Power: 20 |
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
adam
Join Date: Oct 2011
Posts: 52
Rep Power: 15 |
Quote:
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: 556
Rep Power: 20 |
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: 636
Rep Power: 22 |
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: 15 |
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 13, 2011, 18:42 |
|
#11 |
Senior Member
Join Date: Oct 2009
Location: Germany
Posts: 636
Rep Power: 22 |
I would get fired when I would do a mesh study every time!
On simple problems, I usually pick a mesh size, look at the mesh (often the geometry is complex and therefore the mesh looks bad) and decide where to refine until the mesh looks nice. Keep in mind, a bad looking mesh usually is bad - a nice looking mesh COULD be nice but there is NO GUARANTEE IT IS nice. Of course, it's much easier when you've got some experience from another simulation or a colleague did something similar before etc. Another good point is to compare results with measurement data, this gives a good indication whether you should do something on the mesh or not. While running the simulation, I have a look on the solution. Best to plot scalar data filled, not smoth or blended filled, so you can see better where gradients might be too big. When your velocity field has a red and a blue cell connected to each other (with automatic range), you should refine your mesh It would be best to do a mesh study, especially on more complicated problems. But these tend to be too complicated or too big. Reducing cell size by 1.5 in each direction on a 50 million cells mesh might work for the first refinement - but is very expensive and might be even impossible at the second time at the latest. In your case, the surface average temperature goes down at a constant rate when refining the mesh? So you don't have a mesh independent solution. Keep on refining when it's possible or as long as it is necessary*. When not, make sure you're always using similar meshes when comparing data! And keep in mind, even then results might be "wrong" due to mesh dependency. By the way, max / min temperature is often defined by boundary condition like wall temperatures, inlet temperature or whatever. In this case you can't use the max or min temperature to judge your mesh, except when the max temperature gets significantly higher than the highest wall temperature. When this occurs in some cells, it's an indicator for a bad mesh. * Results could even show a wrong trend due to bad mesh sizes or bad boundary condition. In this case, you need to find the reason for this issue. "Mesh quality" is hard to define. There are a lot different criterias, like change in volume between adjacent cells, angles between cell centers and face normals etc... As long as the invalid cell remover doesn't find much cells to remove, the mesh should be suitable to get a solution. Whether it's a good solution is something different... |
|
November 14, 2011, 17:14 |
|
#12 | |
Member
adam
Join Date: Oct 2011
Posts: 52
Rep Power: 15 |
Quote:
|
||
November 14, 2011, 17:49 |
|
#13 |
Senior Member
Join Date: Oct 2009
Location: Germany
Posts: 636
Rep Power: 22 |
Okay, don't forget to have a look on your Y+ values when twiddling with the prism layer settings...
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to determine the direction of cell face vectors on processor patches | sebastian_vogl | OpenFOAM Programming & Development | 1 | October 11, 2016 14:17 |
Is the cell count causing error? | eespi002 | FLUENT | 0 | July 28, 2009 16:07 |
air bubble is disappear increasing time using vof | xujjun | CFX | 9 | June 9, 2009 08:59 |
SST in 2D? | Jesper Sørensen | CFX | 16 | December 23, 2006 09:40 |
New topic on same subject - Flow around race car | Tudor Miron | CFX | 15 | April 2, 2004 07:18 |