
[Sponsors] 
April 23, 2012, 18:12 
Arbitrary rigid bodies in coarse grid

#1 
New Member
Join Date: Apr 2012
Posts: 3
Rep Power: 7 
Hi!
I'm trying to implement a realtime smoke simulation in 2D. I spent the last two weeks experimenting with different approaches in the CFD field. I successfully implemented an Eulerian fixedgrid algorithm (based on this and this article) and it works as expected. Now I'm trying to figure out how to include rigid bodies to the simulation. I think I understand the theory: The velocity at the boundaries has to be updated. Either the normal component of the velocity (freeslip) or the whole velocity vector (noslip) has to be set to 0. The pressure gradient has to be zero at the boundaries. I could easily implement this if the rigid bodies would fit exactly into the grid. But what if that's not the case? Imagine an upstream airflow in the above situation. At the rectangle's bottom edge, in which cells would I set the velocity to zero? The ones that are completely outside (below) the rectangle, the ones on the edge or the ones inside? None of these seem to be a good idea, because either the smoke would be redirected early (making it look like the rectangle had some repellent force on it), or the smoke would go inside of the box. At least that's how I see it. And it just gets more complicated once I start to rotate the objects. Is there a way to prevent staircase artifacts in this case and make the smoke flow smoothly around the box (beside increasing the resolution)? I was thinking about using dynamic resolution (higher around bodies) or dynamic meshes. What do you think? Is there a better solution? I also looked into vortex based approaches instead of fixed grids. But I couldn't yet figure out how to implement rigid bodies in that method either. Thanks for reading. Any help would be very appreciated! 

April 23, 2012, 19:17 

#2 
Senior Member
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 388
Rep Power: 8 
I believe what you want to use is the "immersed boundary method". I am no expert on this, so I can't offer you any good references.


April 23, 2012, 19:19 

#3 
Senior Member
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 388
Rep Power: 8 
Of course you can also use unstructured grids, but this would require some reworking of your code.


April 24, 2012, 02:59 

#4 
Senior Member
Rami BenZvi
Join Date: Mar 2009
Posts: 148
Rep Power: 10 
Unstuctured grid is indeed the most flexible option. However, maybe you can solve your problem using a structured BFC (body fitted coordinates) grid aligned with your objects, while still retaining a single block topological structure.


April 25, 2012, 20:22 

#5  
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 700
Rep Power: 19 
Quote:
Do not agree. When there is motion in solids the unstructured grids are more hinderance than help. 

April 26, 2012, 05:09 

#6  
New Member
Join Date: Apr 2012
Posts: 3
Rep Power: 7 
Quote:
EDIT: Body fitted grid's seem to have the same problem. EDIT 2: Do you think SPH would be a good approach for smoke? I've not seen anything but water simulations with SPH and I'm not sure how much vorticity would be conserved. Last edited by DrummerB; April 26, 2012 at 05:28. 

April 26, 2012, 09:42 

#7  
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 700
Rep Power: 19 
Quote:
I understand you are not overly interested in ultra accuracy. What you want is real time type performance. Quote:
Use finite difference and extend the stencil till the body surface. This is fastest way to represent general body and that would allow fast movement too. (even in non uniform cartesian mesh one can mark body very very fast.) If the flow viscosity is large enough than lattice boltzman would be the fastest approach to this problem. And good thing with lattice boltzman is that you could program it in GPU too. SPH would be bad approach as it asks you to mark neighbors after every step. This means doing nearest neighbor search, which will slow you down very much. Not worth the effort. 

April 26, 2012, 09:58 

#8 
New Member
Join Date: Apr 2012
Posts: 3
Rep Power: 7 
Thanks very much. I will look into Immersed Boundary Methods.
Do you know any good resource where I could read about it? Most of the things I find with Google are either restricted (pay to view) or too math based. Now, both wouldn't be a problem (I'm happy to pay for a good article) but I'd rather not buy something without knowing if it's what I'm looking for. And the math heavy papers generally don't care a lot about performance and aim for accuracy. 

April 26, 2012, 10:09 

#9  
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 700
Rep Power: 19 
Quote:
Nothing special is needed for immersed boundary. The velocity field is supposed to follow velocity of solid in the region where solid lies. This you could force by many methods. If you are using Gauss Seidel type iterations then you can just keep replacing velocity to be equal to that of solid even during the iterations. Otherwise a matrix based approach can force the velocity (i will write down tomorrow how i did few years back). Rest of the algorithm is same. Solve the pressure equation etc exactly the way you do otherwise. Just force the velocity field. PS: If you are interested in very accurate results then things do get complicated. By accuracy I mean say , want to predict lift and drag on a rotating body. (In this case you will need ghost cell based immersed boundary). Please search cfdonline i made a explanatory comment about it long back. 

Tags 
body, boundary, grid, rigid, smoke 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Nonlinear Multigrid: Coarse Grid Operators  Greg Lewin  Main CFD Forum  0  December 1, 2006 10:39 
On grid independent solution for pulsatile flow  David  FLUENT  4  June 8, 2005 16:20 
coarse grid to fine grid crashing  Arnab  CDadapco  1  February 22, 2005 13:27 
Combustion Convergence problems  Art Stretton  Phoenics  5  April 2, 2002 05:59 
Grid Independent Solution  Chuck Leakeas  Main CFD Forum  2  May 26, 2000 11:18 