CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to set a tangential-only velocity boundary condition (https://www.cfd-online.com/Forums/openfoam-solving/240564-how-set-tangential-only-velocity-boundary-condition.html)

bobuhito January 12, 2022 15:37

How to set a tangential-only velocity boundary condition
 
I'm running a 2D transient flow simulation and have a flat patch at which I would like to force a pressure of 0 and tangential velocity of 0 (leaving normal velocity free, and gradients free, for the solver to calculate at each time step). If the flow were into the block, I know "type pressureInletOutletVelocity" works perfectly for this, but in the outflow case, for better convergence, this type does not constrain the tangential velocity. I don't think my case will have a convergence problem and would prefer to just keep the tangential constraint for both directions.

At the most basic level, I just want the reversed constraint of "type fixedNormalSlip" which has normal velocity fixed but tangential velocity free. So, I am looking for the equiavelent of a new "type fixedTangential" with tangential velocity fixed and normal velocity free. (It might even make things easier knowing that my patch is vertical such that normal direction is along xhat, and tangential direction is along yhat.)

Any suggestions?

JulioPieri January 14, 2022 13:49

try coding your BC, or using swak4Foam.

have a look on how "fixedNormalSlip" works and implement a codedBC that adds a similar chunk of code, change the directions of interest.


All times are GMT -4. The time now is 03:54.