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

How to access gradient near the boundary for Navier slip bc?

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 7 Post By charlotte

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   January 2, 2012, 12:11
Default How to access gradient near the boundary for Navier slip bc?
  #1
New Member
 
Marc-Florian Uth
Join Date: Jan 2010
Posts: 10
Rep Power: 16
Marc10 is on a distinguished road
Hi!

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();
}
Here I guess I just have to replace the operator= argument with the above equation. But how can I access or calculate the gradient at or in the cell next to the wall?

I appreciate any help! Thank you!

marc
Marc10 is offline   Reply With Quote

 


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


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 03: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


All times are GMT -4. The time now is 07:12.