CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > FloEFD, FloWorks & FloTHERM

having problems with performing grid convergence study in SWFS

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 12, 2015, 14:23
Default having problems with performing grid convergence study in SWFS
  #1
New Member
 
Dan Hofstetter
Join Date: Apr 2012
Posts: 14
Rep Power: 10
drdet is on a distinguished road
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
drdet is offline   Reply With Quote

Old   January 14, 2015, 08:54
Default
  #2
Senior Member
 
Boris Marovic
Join Date: Jul 2009
Posts: 599
Rep Power: 18
Boris_M will become famous soon enough
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.
Now I cannot tell how much that is likely as I don't see the flow field you have but a transient case in a steady state with different mesh might result in such deviations as it is simply not steady state.

Now I understand what you are trying to do but do you want to change the whole mesh in the model or just the mesh in a certain region such as the region of the grating or the region after the grating. Then I would rather advise you to use a local mesh for that.
Also rather use a surface goal or volume goal on that region inlet or outlet or in case of the volume goal on the region itself.

This should vary less and ideally use a average or even better the bulk average goal. A min or max value only considers the singel cell with the lowerst or highest value and as you might understand that cell can be a different one in each iteration for a complex flow field.

Also you could try to use a porous media for the grating depending on the overall dimensions etc. That might reduce your mesh size for that region.

You can send me a PM with your email address and I will contact you so you can send me the model.

Boris
Boris_M is offline   Reply With Quote

Old   January 15, 2015, 11:42
Default
  #3
New Member
 
Dan Hofstetter
Join Date: Apr 2012
Posts: 14
Rep Power: 10
drdet is on a distinguished road
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.
drdet is offline   Reply With Quote

Old   January 15, 2015, 20:33
Default
  #4
New Member
 
Dan Hofstetter
Join Date: Apr 2012
Posts: 14
Rep Power: 10
drdet is on a distinguished road
Quote:
Originally Posted by Boris_M View Post
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.
drdet is offline   Reply With Quote

Old   January 16, 2015, 02:52
Default
  #5
Senior Member
 
Boris Marovic
Join Date: Jul 2009
Posts: 599
Rep Power: 18
Boris_M will become famous soon enough
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
Boris_M is offline   Reply With Quote

Old   January 20, 2015, 10:30
Default
  #6
Senior Member
 
Boris Marovic
Join Date: Jul 2009
Posts: 599
Rep Power: 18
Boris_M will become famous soon enough
Hi Dan,

I had a quick look at your model and a general advice and some comments on your setup.

1. Your Outlet volume flow opening are not ideal. You should make sure that you rather have a larger lid on an opening and a full surface contact. Such line contacts can be automatically fixed by the software but try to avoid this.
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.

2. I think the mesh number 2 with 140,36,44 is very good for the overall domain in order to get a good resolution of the field. But you need local meshes at the grating as cells are just the size of the rods and there is just a little more than one cell between them. This is not enough to resolve the flow correctly. It would give some decent results if they were long channels (long in direction of flow) but not with just short square rods. Try to get three cells in between them. Create a local mesh body that overlaps that region with 1-2 times the thickness of the grating offset to the top and bottom so that the whole block sits over the grating with 3-5 times the thickness of it and the grating is in the center. Then apply a mesh refinement based on the mesh I mentioned above with a narrow channel refinement of level 3 as it is already level 1 in that ragion. This should give you a gap with about 5 cells in between them and if that is not good enough you can add also fluid cells to level 2.
This should improve the flow resolution through the grating and you can also improve that by increasing the local mesh body dimension in the main flow direction (so the top) by again 3 times the rod size and use the fluid cell refinement level of 2 if you haven't used it before. This should increase your flow mixture resolution right above it and you can also apply the goal on that body for velocity and mass fraction.
This will cause a mesh of around 1.9 million cells.

3. Your smal inlet slot at the other ond of the room is not resolved enough by the mehs also so you need also a loacl 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 infront of it to have a better flow reolution into the model.

4. You can also try to half the basic mesh to 70,18,22 and increase the levels you currently have by one. This will keep the mesh refinement at these locations but the general fluid volume is less dense with mesh and gives you a little faster solver. For the accuracy I cannot tell as I haven't done any mesh convergence study on that try. I was just playing with the mesh. The mesh is now somewhere of 1.7 million cells so a little less.

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 freez it in this case.

All in all I created a 1.72 million fluid and 0.56 million partial cells mesh for your case and will test it now. I will probably get back to you tomorrow.

Boris
Boris_M is offline   Reply With Quote

Old   January 20, 2015, 10:44
Default
  #7
Senior Member
 
Boris Marovic
Join Date: Jul 2009
Posts: 599
Rep Power: 18
Boris_M will become famous soon enough
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
Boris_M is offline   Reply With Quote

Old   January 20, 2015, 13:41
Default
  #8
New Member
 
Dan Hofstetter
Join Date: Apr 2012
Posts: 14
Rep Power: 10
drdet is on a distinguished road
Quote:
Originally Posted by Boris_M View Post
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!
drdet is offline   Reply With Quote

Old   January 20, 2015, 13:47
Default
  #9
New Member
 
Dan Hofstetter
Join Date: Apr 2012
Posts: 14
Rep Power: 10
drdet is on a distinguished road
Quote:
Originally Posted by Boris_M View Post
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
drdet is offline   Reply With Quote

Old   January 21, 2015, 03:16
Default
  #10
Senior Member
 
Boris Marovic
Join Date: Jul 2009
Posts: 599
Rep Power: 18
Boris_M will become famous soon enough
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
Boris_M is offline   Reply With Quote

Old   January 21, 2015, 16:58
Default
  #11
New Member
 
Dan Hofstetter
Join Date: Apr 2012
Posts: 14
Rep Power: 10
drdet is on a distinguished road
Quote:
Originally Posted by Boris_M View Post
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!
drdet is offline   Reply With Quote

Old   January 21, 2015, 18:05
Default
  #12
New Member
 
Dan Hofstetter
Join Date: Apr 2012
Posts: 14
Rep Power: 10
drdet is on a distinguished road
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.
drdet is offline   Reply With Quote

Old   January 22, 2015, 04:44
Default
  #13
Senior Member
 
Boris Marovic
Join Date: Jul 2009
Posts: 599
Rep Power: 18
Boris_M will become famous soon enough
Hi Dan,

regarding the lid:
It does not change the volume or mass flor rate in case you defined a velocity inlet if the lid's surface in contact with the fluid inside the model is not bigger. The BC of course can only apply the flow to the part that has contact to the fluid. So if your lid overlaps with the surface of the room, that overlap is not in contact with the fluid and therefore there cannot be more flow than through the fluid contact area.
If you use the create lid feature it automatically creates a lid that is partially overlapped by oversizing it and extruded in both directions.
So leave the opening in the wall of the room but make the lid larger with the diameter to overlapp with the wall. If you sketch the lid onto the wall's surface you can convert the circular hole in the wall to the sketch. If that circle is then made with an offset to the exterior of the hole and then extruded, you will get a surface-surface contact at the overlap and a clear definition of the area that is in contact with the fluid at the hole. Only that part in contact with the fluid also has flow from the BC. The contacting surface to the fluid therefore does not change in size as the hole does not.

Regarding the HVAC module:
The good thing with the tracer is that if you consider a steady state flow like in your case where you can consider a converged state in which the flow field doesn't change a lot in transient if the fans are running for several ours or so. Testing the behaviour of various contaminants behaviours in the post processing is much faster than running a simulation for each contaminant.
But as you want to test the initial stage where no flow exists at all but the pit is filled with the contaminant in a certain concentration, you will need to run it in transient for the run up of the flow field as it develops. This development is too slow to be considered as converged in no time. The tracers herefore are not very useful as they only apply to a steady state result or a single flow field frozen in time so not a transient number or result files. You load one result file and run a tracer study and not several result files. The tracer themselves can however run in a transient study but based on the loaded result file.
So if you consider the flow filed is established and now you want to add some contaminant beeing emitted by the bottom of the pit as if it is released form the waste sitting in the pit. You can then see how the tracer develop over time for this fixed flow field. So a transient post processing feature on a steady state flow field.
The mass fraction/concentration you mentioned is very low for the contaminant and could therefore be considered for the tracer as they would have too little influence on the flow that it would be disturbed. But as I said the development of the flow from start is too slow that it has to be transient calculated and tracers only have their transient capability on a steady state result.

Regarding the steady state as initial to a transient:
The reason you were not successful is that you did it wrong. If you simply start the solver a again and BC change it has to remesh and will start from scratch. Remeshing has to be done in order to resolve the new boundary conditions with the mesh.
What you should have done is to run one project with steady state, then clone the project, add your new boundary conditions and then go to the general setting and into the initial conditions menu. Here you can switch the "User defined" to "Transferred" and select the steady state project as initial condition. When you now run the project it will remesh but after that map the old results onto the mesh, then apply the changes in your boundary conditons and run from zero but with the existing flow. If you have a local initial condition in the pit for the contaminant then this region will be overwritten with the new BC but the flow field (velocities) should stay the same I think. I never tried it with an local initial condition but other BCs.
There is a difference between the "transferred BC" and the "transferred initial conditions". The first will use the flow into the domain from the other project as BC into the new domain in case the domain size is changed. There is a tutorial that shows a good reason for an application.

Boris
Boris_M is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANSYS Meshing] Grid convergence study AS_Aero ANSYS Meshing & Geometry 1 June 7, 2013 04:29
[ICEM] Grid Convergence Index study for a hybrid mesh j_h_86 ANSYS Meshing & Geometry 2 December 6, 2012 11:45
Grid Convergence Articles ryzd Main CFD Forum 0 February 10, 2012 14:40
GRID REORDER DOMAIN PROBLEMS Mike FLUENT 0 December 31, 2008 09:54
Grid Independent Solution Chuck Leakeas Main CFD Forum 2 May 26, 2000 11:18


All times are GMT -4. The time now is 21:01.