
[Sponsors] 
August 14, 2012, 08:00 
Impose both Dirichlet and Neumann boundary conditions

#1 
New Member
Konstantinos
Join Date: Sep 2011
Posts: 11
Rep Power: 7 
Hi,
i am trying to implement a twoequation turbulent model in CFD, using kinetic energy and enstrophy equation.(w^2), where w is the fluctuating vorticity vector. In contrast to other models, here i have to apply both boundary conditions on kinetic energy. That is, set k=0, dk/dxn=0, where xn is the normal coordinate on the wall. Does anyone have any idea how to do this numerically?i can send you the equations if it's needed. Thanks. 

August 14, 2012, 11:19 

#2  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 2,518
Rep Power: 31 
Quote:
However, I am not sure such a condition makes sense physically... 

August 15, 2012, 08:23 

#3  
Senior Member
Join Date: Aug 2011
Posts: 251
Rep Power: 8 
Quote:
When you integrate theoretically a second order partial derivative equation (when it is feasible) you should have 2 constants that you will determine with two boundary conditions. In this case you can use a Dirichlet AND a Neuman boundary condition if you need it. If you integrate numerically a PDE with a finite volume ,finite element, finite differerence or spectral method, to my mind you can not impose two boundary conditions on the same location. It does not make sense. You can only impose one BC for each variable on each boundary of your computational domain. A Robin boundary condition is not a boundary condition where you have both Dirichlet and Neuman conditions. It is expressed as a*Phy + b*dPhy/dn= g when coefficient a =0 you have Neuman, when b=0 you have Dirichlet and when a and b are different from zero you have not the both Dirichlet and Neuman but a mix between the both. It's not the same. 

August 15, 2012, 08:35 

#4 
Senior Member
Jonas T. Holdeman, Jr.
Join Date: Mar 2009
Location: Knoxville, Tennessee
Posts: 108
Rep Power: 10 
prescribing both Neumann and Dirichlet condition is defined as Robin condition
Not quite. The Robin b.c. is the prescription of a linear combination of Dirichlet and Neuman conditions, not the conditions individually. I have done something similar to what Kostas requires using Hermite finite elements, but this may not apply in his case. 

August 15, 2012, 09:25 

#5 
Senior Member
Jonas T. Holdeman, Jr.
Join Date: Mar 2009
Location: Knoxville, Tennessee
Posts: 108
Rep Power: 10 
Leflix says:
If you integrate numerically a PDE with a finite volume ,finite element, finite differerence or spectral method, to my mind you can not impose two boundary conditions on the same location. It does not make sense. You can only impose one BC for each variable on each boundary of your computational domain. When using Hermite finite elements you have function and derivative degreesoffreedom at the nodes, each of which may be specified/fixed on the boundary. 

August 15, 2012, 10:20 

#6  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 2,518
Rep Power: 31 
Quote:


August 16, 2012, 07:11 

#7 
New Member
Konstantinos
Join Date: Sep 2011
Posts: 11
Rep Power: 7 
Hi Guys,
thanks for the hints. i am thinking to impose firstly k=0 to the source terms of the wall nodes and then apply zeroflux normal the wall at the kequation. after dealing with k equation, the algorithm solves the enstrophy equation using the updated values for k. it's the simplest thing i can think. what do you think? 

August 16, 2012, 08:16 

#8  
Senior Member
Join Date: Aug 2011
Posts: 251
Rep Power: 8 
Quote:
Hi Kostas, what you plan to do seems to me really weird ! So I 'm afraid I should have missed something...so could you tell us what is your goal? As far as I understood something you want to solve k equation from a turbullent model. So it is a second order partial derivative transport equation isn't it? what is the discretization method you use for this? are you colocated or staggered? what is the type of boundary condition ? wall?, inlet ? outlet? 

August 16, 2012, 12:27 

#9 
New Member
Konstantinos
Join Date: Sep 2011
Posts: 11
Rep Power: 7 
Hi,
I am using a collocated grid. The diffusion term is based on a secondorder derivative. My goal is to solve for the two scalars, k and enstrophy. The boundary conditions that i have mentioned are on the wall. The code i am developing is based on a code that has ready subroutines for zeroflux, wall,slip... boundary conditions. The way the boundary conditions for zeroflux are applied in the basic code,is to add a source term that impose that condition. This source term is added in the B matrix of the linear system Ax=B, where A is the left hand side of the system and B the right hand side. So, A and B contains a value for k. The way the code functions, is firstly to solve for k and then uses the updated values for k into enstrophy equation. Thus, through the updated k, i impose the boundary conditions also to enstrophy equation. I can send you the equations, but i do not where. 

August 17, 2012, 05:13 

#10  
Senior Member
Join Date: Aug 2011
Posts: 251
Rep Power: 8 
Quote:
In the way you proceed to impose neumann BC it's ok but you should have also a contribution term in the AP coefficient. Quote:
But anyway I still do not understand why you want to impose a Dirichlet AND a Neumann boundary conditions onthe same nodes? A transport equation as designed for k, will only admit one BC on each boundary of your domain. You have to choose which type of BC is the most appropriated according your physical problem and flow condition. Then manipulate the source term and the central coefficient to account for the BC for all nodes next to that boundary. So if your boundary is located for node I=1 for all J, modify the source term and AP coeff for node I=2 taking into account convective flux and diffusive flux for I=1 (which is the boundary) nothing else is needed. Check how BC are implemented in the book of Versteeg. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Implementation of boundary conditions for FVM  Tom  Main CFD Forum  7  August 26, 2014 05:58 
Dirichlet and Neumann Boundary conditions  Zacc  Fluent UDF and Scheme Programming  0  May 9, 2012 11:41 
Neumann boundary conditions  Martin80  OpenFOAM Programming & Development  22  September 7, 2011 17:48 
Multigrid with Neumann Boundary Conditions  Davoche  Main CFD Forum  3  September 22, 2005 04:46 
Boundary conditions?  Tom  Main CFD Forum  0  November 5, 2002 02:54 