# having problems with performing grid convergence study in SWFS

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

 January 12, 2015, 14:23 having problems with performing grid convergence study in SWFS #1 New Member   Dan Hofstetter Join Date: Apr 2012 Posts: 14 Rep Power: 14 Hi, I am trying to perform a grid convergence study using SolidWorks Flow Simulation 2013. I need to be able to report a grid convergence index (GCI) and use Richardson's Extrapolation to determine the level of error from the mesh. Here is a brief description of my model and the process: I built a model of a ventilated room, which has an exhaust fan at one end, a perforated ceiling at atmospheric pressure, and an inlet slot (atmospheric P) at the other end. The room has floor grating located above a shallow pit that holds waste. I used a ventilation fan to blow fresh air down into the pit to evacuate contaminant gases from the pit, which pushed gas up through the grating into the room. The exhaust fan then carried the contaminated air out of the room. I measured transient gas concentration at several locations both above and below the grating. The actual floor grating has 1/2" x 3" diagonal slots and is ~ 1/2" thick. To make this easier to mesh in my model, I created geometry with straight 2" openings and 2" solid bars x 2" thick (effectively grouping four slots into one). First, I need to determine the best grid settings to use, so I am trying to perform a grid convergence study. I tried to use manual mesh settings because the automatic settings don't result in double the number of cells in each direction (X,Y,Z). I set up eight levels of mesh to try: (A table with cell values and a graph of results can be seen at https://forum.solidworks.com/thread/90067) I ran steady-state simulations for these 8 mesh cases, then compared average velocity at some point locations in the room (using point parameters). I expected the average velocity values to converge asymptotically as the mesh got denser, but instead I saw divergence and oscillation. The room is 36 ft long x 9 ft wide x 8 ft high. The exhaust fan is 2,000 cfm, and the pit ventilation fan is 420 cfm. I did not think I would need more than 500,000 cells to do a good job of modeling this room, but I am confused about my results. Can anyone help? Once I have the grid convergence figured out, I need to do a time-step sensitivity analysis, then model transient gas decay so that I can compare the simulation output with measured data. I can share the model file if needed (maybe by email - the file is 14MB and this forum seems to have small file size limits). Thanks, Dan Last edited by drdet; January 12, 2015 at 14:26. Reason: table and image would not display properly

 January 15, 2015, 11:42 #3 New Member   Dan Hofstetter Join Date: Apr 2012 Posts: 14 Rep Power: 14 Thanks, I'll send you a PM. Actually, I tried adding cube-shaped solids with the centroid located at the monitor point, with dimensions of 4", 8" and 12" thinking that the volume average might start to converge, but I had the same results: the volume averages varied and oscillated by the same amount. I'm wondering if maybe the convergence criteria used was too loose, or if possibly that model got corrupted somehow.

January 15, 2015, 20:33
#4
New Member

Dan Hofstetter
Join Date: Apr 2012
Posts: 14
Rep Power: 14
Quote:
 Originally Posted by Boris_M I have to agree with Jared in the SW forum as you might change the grid and with that the flow might change slightly and fluctuations appear where a point is just somewhere fixed in the space the flow is moving. Your itertion time varies and with that even in a steady state simulation the values might vary with mesh and longer calculation for such a small point.
As I was thinking about this more, I thought I should clarify that for this point matching I am using a steady-state calculation. I understand that in a transient calculation the values for one point in space could change from one mesh configuration to the next.

 January 16, 2015, 02:52 #5 Disabled   Join Date: Jul 2009 Posts: 616 Rep Power: 24 Hi Dan, This is of course in a transient for the mesh as well as for the time step true. With a change in resolution the results get smoother or worse and values might change because the flow can be calculated more accurately especially if you test the mesh convergence. But also in a steady state the mesh might have an influence on the flows end result becaue of the coarser or finer resolution. If the flow is in general a non-steady state flow in reality similar to the natural convection over a hot plate as the air is kind of dancing similar to the flickering of the hot air over a hot street in the summer when you see how the shimmering moves if you are looking at a low angle along the street. Each refinement might change the a velocity vector slightly in a steady state case and lets you end up with another flow field as you are capturing a snap shot of a transient flow. It is like having a candle burning and there is a slight wind and you take pictures of the candle. The flame would look different in each image because it is simply not a steady state case. You will only see that in a transient calculation if the flow is really constant at that position and if you would record a goal value over time time at that location you will find these fluctuations beeing recorded and it can give you a view of how much the values can vary if you record that for some time. Boris

 January 20, 2015, 10:44 #7 Disabled   Join Date: Jul 2009 Posts: 616 Rep Power: 24 Oh, just wanted to run the simulation when I noticed that you included the contaminant gas in the simulation but you didn't define any concentration of it anywhere. There is no initial concentration nor a inlet where it would come in. What you could do is using tracers if it can be considered as an add mixture and do it in the post processing but any goal on its concentration wouldn't make sense during the calculation if there is non existent. Any idea how to apply it? Boris

January 20, 2015, 13:41
#8
New Member

Dan Hofstetter
Join Date: Apr 2012
Posts: 14
Rep Power: 14
Quote:
 Originally Posted by Boris_M Simply make the lid a tiny bit larger than the opening and make a surface contact or in case of a sketch on that surface you just need to extrude it.
I'm not sure I follow you, do you have an example image you can post? What I think you are saying is that the diameter of the lid should be greater than the diameter of the outlet hole (so they overlap), and that the surface of the lid should be on the same plane as the surface of the outlet opening. Is this correct?

Quote:
 Your small inlet slot at the other end of the room is not resolved enough by the mesh also so you need also a local mesh around that which will cause additional cell count but is necessary. I applied a local mesh onto the slot surface but ideally you'll need a local mesh in front of it to have a better flow resolution into the model.
Ok - I had wondered if this would cause a problem or not. I am going to drive out to the facility and take some air flow measurements at that slot and see if I can just suppress it in the simulation, since the resulting cell size in the mesh would be so much smaller than anywhere else in the domain. There probably isn't very much flow coming through that slot in this scenario.

Quote:
 Another thing I found in that project number 2 is you set the maximum iterations to 100. Don't know if that was a test to stop it at some point or you forgot it. So I thought I'll mention it. And also you had flow freezing as permanent starting at 3000 iterations. The 100 iterations stopping criteria make it useless but still I think in general it doesn't make a lot of sense to freeze it in this case.
I probably set the maximum iterations to 100 as a test and forgot about it. You are right - the flow freezing doesn't make sense for the steady-state calculation. I probably forgot to disable it since most of the simulations finished before 3000 iterations, but I should disable it just for good practice.

Thanks for taking a look at this, I really appreciate your help!

January 20, 2015, 13:47
#9
New Member

Dan Hofstetter
Join Date: Apr 2012
Posts: 14
Rep Power: 14
Quote:
 Originally Posted by Boris_M Oh, just wanted to run the simulation when I noticed that you included the contaminant gas in the simulation but you didn't define any concentration of it anywhere. There is no initial concentration nor a inlet where it would come in. What you could do is using tracers if it can be considered as an add mixture and do it in the post processing but any goal on its concentration wouldn't make sense during the calculation if there is non existent. Any idea how to apply it? Boris
Hi Boris,

You are right - I was not using the contaminant gas for the steady-state grid study. It is from my transient study where I define the airspace below the slotted floor as some initial concentration of gas. Once I get the mesh and time step figured out, I will unsuppress that initial condition and run the transient simulation to try to match experimental gas decay at the points above and below the slotted floor.

I don't know how to use the tracers in post processing. I think that is in the HVAC module, which I don't have. Also, I wasn't sure it would be possible or valid to use it since I am simulating the pit (below the slotted floor) with gas in it starting at time = 0s. Will the tracer study allow me to define a volume with some uniform initial concentration of gas, or does it expect a gas source?

Thanks,

Dan

 January 21, 2015, 03:16 #10 Disabled   Join Date: Jul 2009 Posts: 616 Rep Power: 24 Hi Dan, Regarding the Lid diameter: Yes, that's what I meant. You can also overlap with the material sligtly, that doesn't matter but the way you have it it is not ideal and can result in invalid contacts. Those are contacts where it is numerically not clear if it is closed or open for fluid to pass as it is only a line and no surface contact or material overlap. Regarding the slot: Yes, the mesh will be much finer at the slot and since it is a long small slot it will create a lot of cells in the third dimension. It is doable but costs you mesh and solver time. Regarding the tracers: Yes, you can use an initial condition or surface where it comes from etc. Similar to the full CFD simulation only that is doesn't have any effect on the already calculated flow. Therefore it only works for low concentrations compared to the calculated concentrations. Something like water vapor or some other contaminant that is only considered to be carried by the flow but not really influence it due to its large amount. So having a 100% mass fraction as the initial condition will not work as the amount it too much. We are talking more about a few percent. It is similar to the particle study where the particles wouldn't influence the flow and therefore it works only for some particles but not a full shovel of sand thrown into the model. And yes, you'll need the HVAC module. So do you need any certain amount of gas for the initial condition? Is it 100% mass fraction for the pit and is there a guessed mass flow rate on the bottom of the pit to test the convergence problems? Or will you continue from here? Boris

January 21, 2015, 16:58
#11
New Member

Dan Hofstetter
Join Date: Apr 2012
Posts: 14
Rep Power: 14
Quote:
 Originally Posted by Boris_M Regarding the Lid diameter: Yes, that's what I meant. You can also overlap with the material sligtly, that doesn't matter but the way you have it it is not ideal and can result in invalid contacts.
One thing about making the lid larger: doesn't this change the velocity or flow rate (depending on how you define the lid)? i.e. if the flow opening is 8" diameter, and I define 420 cfm, that gives me a flow velocity of 1,203 ft/min. If I make a lid that is much larger, the velocity will decrease due to increased lid area. I know this might not matter, but I wanted to see what is the best practice - to make the lid the correct diameter and make the interfering geometry smaller, or to live with the lower velocity?

Quote:
 So do you need any certain amount of gas for the initial condition? Is it 100% mass fraction for the pit and is there a guessed mass flow rate on the bottom of the pit to test the convergence problems? Or will you continue from here?
I was using something between 40 and 130 ppm (volume fraction) for the initial condition in the pit, and there is no assumed mass flow rate from the bottom of the pit. I'm assuming the mass flow from the bottom of the pit is negligible in this case.

I've never used or seen the HVAC module, but I'd love to know how it would work for my case. Is there some way you could run a case and send me the point parameters and goal plots? Maybe with 100 ppm for the initial condition in the pit. I'd be interested in comparing that to what I get from a purely transient study.

Thanks!

 January 21, 2015, 18:05 #12 New Member   Dan Hofstetter Join Date: Apr 2012 Posts: 14 Rep Power: 14 Is there a way to do something similar without the HVAC module? I have tried unsuccessfully in the past to solve a study as steady-state, then use transferred boundary conditions and continue the calculation as transient. I ran it with my initial condition suppressed during the steady-state calculation. Then, after setting up the transferred boundary conditions, I unsuppressed the initial condition. But this always seems to result in the calculation re-meshing and starting a new calculation. I also tried setting the concentration in the local initial condition using an f(time) table with 0s = 0 ppm, then 10s = 100 ppm, to see if it would "switch on" the gas in the pit, but it didn't work.