CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

Non-diffusive inflow boundary condition for transport equation

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 23, 2016, 07:55
Default Non-diffusive inflow boundary condition for transport equation
  #1
Senior Member
 
Join Date: Oct 2013
Posts: 379
Rep Power: 7
chriss85 is on a distinguished road
I have implemented a boundary condition for the velocity field that acts as an inflow of a gas which I want to track with a transport equation. I don't use different thermophysical properties for it so MULES etc is not needed right now. The transport equation uses the mass fraction Y of the additional gas as primary variable which is solved for. It looks like this:

fvm::ddt(rho,Y)+fvm::div(rho*U,Y)-fvm::laplacian(turb->muEff(), Y)=0

As boundary for Y I'm using fixedValue with uniform 1 as value because the inflow consists purely of this gas. However, this leads to an additional diffusive flux because q = - turb->muEff()*grad(Y) is nonzero. I need to find a way to have a diffusive flux which is zero at the boundary.

Let's look at ways to solve this:
  1. Set diffusivity to zero at the boundary. I have already tested this and it works mostly but not with nonorthogonal cells where some correction schemes apply and the actual diffusivity is mixed with the diffusivity from the first cell layer as far as I can tell.
  2. Set diffusivity to zero at the boundary and in the first cell layer. This should be working at the expense of not having diffusion in the first cell layer. Easy to implement but not fully correct.
  3. Use an explicit scheme for the laplacian and set the flux vector to zero at the boundary. Also easy to implement at the cost of not having an implicit scheme anymore.
  4. Find some way to use different boundary conditions for different terms. No idea if this is possible, but this would be the ideal solution. Does anyone know if this is feasible somehow?
  5. Add an explicit correction term to subtract the diffusive flux again. This will probably have some numerical errors and won't be equal to a diffusive flux of exactly zero at the wall.
  6. Maybe there is some method to correct the flux vector of the laplacian term on the matrix level? Unfortunately my insight in OpenFOAM and the math of FVM is not deep enough to know what to do here.
  7. Further suggestions?
Right now I believe the best solution might be 1 in combination with 5, setting the diffusivity to zero at the boundary and explicitly subtract any flux which arises because of non-orthogonality correction schemes. I have yet to test this though.

I would be happy to have a discussion about this and similar topics.

Edit: I have done some tests with a fixedValue=1 boundary, solving only the transport equation without flow and found that it is best to use an additional explicit corrector term in which the diffusivity is zero everywhere except for the boundary. There is still a very small error but atleast in my case it is negligible (Mass fraction is ~1e-7 at the end of the simulation). Alternatively one could set the diffusivity to nonzero also in the first cell layer but the results at the end of the test are very similar and this stops diffusion between the first and second cell layer. I found it somewhat surprising that it doesn't suffice to set the diffusivity to zero in the first two cell layers to prevent incoming diffusion. If there is any interest I can show a comparison of the results.

Last edited by chriss85; February 24, 2016 at 04:59.
chriss85 is offline   Reply With Quote

Old   May 17, 2016, 10:30
Default non-orthogonal correction at boundary is ignored
  #2
New Member
 
Jianzhi Li
Join Date: Jul 2013
Location: Shanghai, China
Posts: 27
Rep Power: 5
epi_c is on a distinguished road
Send a message via Skype™ to epi_c
Hi @chriss85,

According to Jasak's PhD thesis, the non-orthogonal correction at boundary is ignored (Error Analysis and Estimation for the Finite Volume Method with Applications to Fluid Flows, 3.3.3.1). So I think just set diffusivity to zero at inlet boundary is sufficient.

On the other hand, I don't agree to set diffusivity to zero at inlet boundary. Since you are using convection-diffusion equation to model the transportation and mixing of the specified gas, diffusion is expected everywhere. The only thing you have to take care of is that Y at inlet must greater than Y at the first cell layer (maybe greater than 1 cause unbounded schemes). How do you think?

And, can you post the comparison of the results? Hope you still keep the results.
epi_c is offline   Reply With Quote

Old   May 23, 2016, 03:37
Default
  #3
Senior Member
 
Join Date: Oct 2013
Posts: 379
Rep Power: 7
chriss85 is on a distinguished road
Yes I still have the results luckily, although I actually don't use them now.

The target of this comparison was to find ways to suppress diffusion in a transport equation where the boundary is set to fixedValue 1.
This problem arises when there is an inflow of the transported gas. The convection term of the transport equation requires the fixedValue 1 boundary condition. At the same time one must prevent a diffusion from the wall into the fluid. In my case I couldn't have incoming diffusion when there is no inflow because I was modelling an ablation process where the medium is solid on the other side of the boundary.

The best way proved to be a fully implicit diffusion term plus an implicit diffusion term in which only the cells at the boundary (and possibly
first cell layer) have a nonzero diffusivity.
Attached Images
File Type: jpg results_lin.jpg (89.3 KB, 5 views)
File Type: jpg results_log.jpg (87.7 KB, 5 views)
chriss85 is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sliding mesh problem in CFX Saima CFX 45 September 22, 2015 10:53
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 10 June 16, 2015 15:48
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
Question about boundary condition of 2D Burgers equation effort8 Main CFD Forum 0 January 29, 2012 21:55
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 05:05


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