CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

How to impose both normal and tangential gradient boundary conditions for U and p

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

Like Tree1Likes
  • 1 Post By HPE

LinkBack Thread Tools Search this Thread Display Modes
Old   June 17, 2019, 07:01
Default How to impose both normal and tangential gradient boundary conditions for U and p
New Member
Join Date: Aug 2016
Posts: 19
Rep Power: 7
mtgoncalves is on a distinguished road
I am simulating incompressible laminar external flows in 2D (e.g. flow past cylinder, airfoil, etc.). For this I am using a hybrid solver consisting of pimpleFoam coupled to another non-OpenFOAM solver. I use pimpleFoam only to simulate the near-body flow. The meshes I use are small: the numerical boundary is close to the solid body. Hence, the boundary conditions I need to impose for U and p are unsteady and non-uniform.

With the external solver I can compute the velocity, velocity gradient, pressure and pressure gradient at the coordinates of the face centers at the boundary of the mesh used by pimpleFoam. To impose these conditions I have modified the inletOutlet and outletInlet boundary conditions such that I can change at each time step the:
  • refValue for velocity at inlet faces
  • refGradient for pressure at inlet faces
  • refGradient for velocity at outlet faces
  • refValue for pressure at outlet faces

The problem I am facing now is that for the gradients I am now only imposing the normal component. Because I can get everything from the external solver I would also like to impose the tangential component of the gradients.

So my question is: what do I need to modify in inletOutlet and outletInlet such that I can impose the actual gradients and not merely their normal component.

ps: If it makes more sense to start development from a different boundary condition (e.g. mixed or directionMixed) please tell me.
mtgoncalves is offline   Reply With Quote

Old   May 6, 2020, 10:20
New Member
Join Date: May 2020
Posts: 1
Rep Power: 0
thabuis is on a distinguished road
If you solve your problem, I would be interested in knowing the answer
thabuis is offline   Reply With Quote

Old   May 6, 2020, 16:30
Senior Member
HPE's Avatar
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 930
Rep Power: 10
HPE is on a distinguished road
if there is a code example, we may try to work on that.
rockFish1007 likes this.
HPE is offline   Reply With Quote


boundary conditions, inlet and outlet, neuman conditions, neumann boundary

Thread Tools Search this Thread
Search this Thread:

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
mesh file for flow over a circular cylinder Ardalan Main CFD Forum 7 December 15, 2020 13:06
Calculation Tangential & Normal gradients of a Scalar near a surface. AnthonyP OpenFOAM Programming & Development 12 July 22, 2020 09:01
Slip and Symmetry boundary conditions giuse OpenFOAM Programming & Development 3 December 20, 2016 03:21
Surface normal velocity BC with zero gradient tangential, cylinder c_dowd OpenFOAM Running, Solving & CFD 0 May 25, 2013 07:22
Radial and Tangential Velocity boundary conditions N. A. OpenFOAM 4 September 2, 2011 07:21

All times are GMT -4. The time now is 00:45.