
[Sponsors] 
January 2, 2012, 13:11 
How to access gradient near the boundary for Navier slip bc?

#1 
New Member
MarcFlorian Uth
Join Date: Jan 2010
Posts: 10
Rep Power: 9 
Sponsored Links
I am trying to implement a boundary condition based on the Navier slip model, where the velocity at the wall is a function of the velocity gradient at the wall: U = ls * du/dn For this, I have to access du/dn (the velocity gradient normal to the wall) in the field. Is there a function for this similar to this>patchInternalField()? As a starting point I use the partialSlip bc from OpenFoam. Code:
template<class Type> void Foam::partialSlipFvPatchField<Type>::evaluate ( const Pstream::commsTypes ) { if (!this>updated()) { this>updateCoeffs(); } tmp<vectorField> nHat = this>patch().nf(); Field<Type>::operator= ( (1.0  valueFraction_) *transform(I  sqr(nHat), this>patchInternalField()) ); transformFvPatchField<Type>::evaluate(); } I appreciate any help! Thank you! marc 

Sponsored Links 
October 31, 2012, 16:15 

#2 
New Member
Charlotte
Join Date: Oct 2009
Posts: 16
Rep Power: 9 
Hi Marc,
Sorry for giving an answer so late, but I guess other people may be interested by the answer. The easiest to create this BC is to copy the one in: $FOAM_SOLVERS/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip and replace the "valueFraction_" by "1/(1+slipLength_*this>patch().deltaCoeffs())" To get a better understanding, the distance from the boundary face center to near wall center is D=1/deltaCoeffs. nHat is the normal vector at the boundary. You want Uwall=l dU/dn = l (UcUwall)/D So Uwall = (l/D)/(1+l/D)U = (11/(1+l/D))U To make sure that youget only a tangential component, you multiply by transform(InHat*nHat) Note that if you surface is curved, you may need some additional correction and you can check the Maxwell BC in the same folder to get an idea how to do it. 

July 4, 2013, 08:12 

#3  
Senior Member
Srivathsan N
Join Date: Jan 2013
Location: India
Posts: 101
Rep Power: 6 
Quote:
I am asking this question in this thread because I'm dealing with a curved boundary patch and also require U on that curved patch to be given as a BC. I've had a look at the maxwell BC, but my C++ isn't that good. So can i confirm if transform(InHat*nHat) will give the value of U along the curved patch? Also with respect to this solver, why are the variables thermalCreep and curvature of the 'true/false' type? and what is accomodation factor? Kindly excuse the barrage of questions as I'm new to OpenFOAM and C++, Thanks in advance
__________________
Regards, Srivaths 

August 16, 2013, 21:24 

#4  
New Member
Charlotte
Join Date: Oct 2009
Posts: 16
Rep Power: 9 
Hi Srivaths,
unfortunately, in my case I didn't need for a curved boundary face, so I never looked into the details. Like you, I'm not an expert in C++, but fortunately, Openfoam is written such that you don't really need to be an expert. So I was able to write a slip BC without learning the whole C++ language Anyway, if you look at the maxwell BC, you can see that they make reference to a curvature class and I'm guessing you need to code sth similar to there. Since I was considering flat wall, I never try to understand that part... I don't know much about the Maxwell BC: I think it's a slip BC with a temperature jump at the boundary based on Boltzmann's equation. I googled it and there is plenty of literature about it (http://www4.ncsu.edu/~ces/pdfversions/246.pdf for instance). Sorry for not being more help, but I pretty much shared all my knowledge in my previous post ... Charlotte Quote:


February 13, 2014, 08:51 

#5 
Senior Member
Srivathsan N
Join Date: Jan 2013
Location: India
Posts: 101
Rep Power: 6 
Charlotte,
I'm getting back to this thread really late, because I was trying to work around a tangential gradient of velocity (for a curved surface). My question is this: What happens when I set refValue and valueFraction = 0 in mixedFixedValueSlip? I'm guessing that it will  return only the tangential gradient in the 'Return gradient at boundary part'  might also return a value of velocity for the patch in 'Evaluate the field on the patch' section (evaluated from the (1  valueFraction...) part) How do I just get the former? a mixedFixedGradientSlip may be?
__________________
Regards, Srivaths 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
boundary conditions for simpleFoam calculation  foam_noob  OpenFOAM Running, Solving & CFD  8  July 1, 2015 08:07 
Water subcooled boiling  Attesz  CFX  7  January 5, 2013 04:32 
inlet velocity boundary condition  murali  CFX  5  August 3, 2012 08:56 
slip velocity on boundary (V.P.M)  Lee, Juhee  Main CFD Forum  3  October 22, 1998 15:30 
Sponsored Links 