Using Body Force to Simulate Convection in a Navier-Stokes Problem

General discussion about Elmer
Post Reply
gschrank
Posts: 17
Joined: 21 Aug 2016, 05:40
Antispam: Yes

Using Body Force to Simulate Convection in a Navier-Stokes Problem

Post by gschrank »

Good morning!

I've been working on a relatively complex 3D multi-physics problem using Elmer for a few years now. I've been studying a particular geometry during those years, and I've recently modified the geometry to a slightly larger scale.
RbGeometry.png
RbGeometry.png (8.38 KiB) Viewed 2618 times
The original geometry is posted above (ignore the different colors for this discussion). The new geometry has a slightly larger body (the middle cylindrical section). This body is ~3 cm diameter, and the new geometry is ~5 cm diameter.
Like I said, the model is multi-physics, so it has a lot of moving parts. The part I'm having trouble with is the Navier-Stokes (N-S) bit. In both the original and new model, I'm modeling the gas flow using the Perfect Gas compression model. I have a body force on the fluid to simulate gravity so I can model the convection in the model (heat is being applied as a body force in thermal module of the multi-physics model). This worked relatively well in the old geometry.
However, with the new geometry, I see a very bizarre phenomena. The most prominent of this is the flow separates into two different regions. (See the image below.)
Flowsep.png
Flowsep.png (66.27 KiB) Viewed 2618 times
You can see in the image that the flow lines terminate in the sides of the cell and then appear from another side of the cell. This happens even if only the N-S module is run with none of the other multi-physics modules to interact with. It is both the steady-state solution (i.e. when I solve for steady state) and the FIRST time step in transient solution. I say "first" because if I let time run forward, this behavior disappears and the streamlines connect. It's a bit disturbing though that solution, when this geometry is solved in steady state, comes up with this solution.
So, this wouldn't be so much of a problem for my transient simulations, except that I think it might be related to an issue that eventually collapses the model. In the below image, you can see a close up of the velocities in and out of the inlet and outlet of the geometry. The inlet (on the left) looks fine. In fact, I imposed the inlet velocity boundary conditions, so I'd expect as much. The outlet is another matter. It looks like the outlet flow is smashed down to the bottom (which is the direction of gravity in this model) and there is some flow that goes back INTO the cell. This leads to very bizarre and non-physical predictions for the behavior in that area, and it seems to eventually lead to the non-convergence of either the N-S model or one of the models that depend on it.
Outletflow.png
Outletflow.png (33.35 KiB) Viewed 2618 times

I've played around with this for a couple of months now, and I thought I'd reach out to the community to see if this is a known artifact with a known solution. Perhaps there are tricks that are known in CFD of which I'm simply unaware.
Again, I think that the salient points are that I'm using a Perfect Gas compression model with a body force to simulate gravity. When the body force is set to zero, this behavior disappears. The boundary conditions for the N-S module are simply a velocity profile on the inlet (meant to approximate fully developed flow), an external pressure boundary condition on the outlet, and every other surface is a no-slip wall. Thank you so much!
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Using Body Force to Simulate Convection in a Navier-Stokes Problem

Post by raback »

Hi gschrank

Does not ring any bells and indeed seems somewhat suspicious. Maybe you could share the case for further studies.

-Peter
gschrank
Posts: 17
Joined: 21 Aug 2016, 05:40
Antispam: Yes

Re: Using Body Force to Simulate Convection in a Navier-Stokes Problem

Post by gschrank »

Sorry for my delayed reply. :oops:

The case sifs can be found on my git repo here: https://github.com/drschrank/elmerfem

The case sif are under misc/SEOPsifs. The most recent sifs that are used in this study are XePolIncomp.sif and XePolPerGas.sif. There's a fair amount of preamble that uses MATC to do some calculations. The N-S solver is Solver 1. My test for just the N-S solver is to set the Exec Solver parameter for solvers 2-6 as "Never". Like I said in the main post, the bizarre solutions appear as either the steady-state fluid solution (when only solving temperature) and as the first time step solution when completing a transient solution.

You can also find some example mesh files under misc/SEOPsifs/exmesh. This is the most recent and troublesome geometry.

Finally, you can look at older solution visualization of the smaller geometry on my youtube channel here: https://www.youtube.com/watch?v=yjd9XBV ... 7CK19hUwLB
Post Reply