How to access gradient near the boundary for Navier slip bc?
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.
I appreciate any help! Thank you!
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:
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 (Uc-Uwall)/D
So Uwall = (l/D)/(1+l/D)U = (1-1/(1+l/D))U
To make sure that youget only a tangential component, you multiply by transform(I-nHat*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.
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(I-nHat*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
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 :p
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... :o
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 ...
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?
|All times are GMT -4. The time now is 10:09.|