|
[Sponsors] |
April 18, 2018, 15:34 |
Boundary Condition for Variable Velocity
|
#1 |
New Member
Join Date: Dec 2017
Posts: 5
Rep Power: 8 |
Hello, I'm new to OF. I'm running an axi-symmetric case. It's just a pipe.
Geometry: https://imgur.com/a/YsK1o The problem is: The velocity varies according to an equation. This is the equation: https://imgur.com/a/8jDCc The ONLY variable is ' r ', which is the distance between the center of the tube and any cell in y direction. I need a boundary condition for that. Any help is appreciated. Sorry for bad english. |
|
April 19, 2018, 05:17 |
|
#2 |
Senior Member
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12 |
You might take a look at the codedFixedValue boundary conditon or the vectorCodedSource entry for the fvOptions dictionary. But i haven't work with any of those and can't tell you if it will work or not.
|
|
April 19, 2018, 05:20 |
|
#3 | |
Member
Hosein
Join Date: Nov 2011
Location: Germany
Posts: 94
Rep Power: 15 |
Quote:
A subtle way is discussed here. "https://www.youtube.com/watch?v=K-nAF3qAPTc" |
||
April 19, 2018, 13:22 |
|
#4 |
Senior Member
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 125
Rep Power: 13 |
Here is the code that you can put in U file:
Code:
inlet { type codedFixedValue; value uniform (0 0 0); redirectType parabolaProfile; code #{ const fvPatch& boundaryPatch = patch(); const vectorField& Cf = boundaryPatch.Cf(); vectorField& field = *this; scalar Ut = 1; scalar C = 1; scalar R0 = 1; scalar nu = 1; scalar n = 1; scalar vel; forAll(Cf, faceI) { scalar dis = Cf[faceI].y() < R0 ? Cf[faceI].y() : Cf[faceI].y() - R0; vel = Ut*C*pow(dis*Ut/nu, n); field[faceI] = vector(vel, 0, 0); } #}; } |
|
April 19, 2018, 13:47 |
|
#5 |
New Member
Join Date: Dec 2017
Posts: 5
Rep Power: 8 |
Thanks so much for your help, guys. Im gonna take a look.
|
|
April 20, 2018, 03:11 |
Another option is to use swak4foam/groovyBC
|
#6 |
Member
Rahul Vadrabade
Join Date: Apr 2018
Posts: 46
Rep Power: 8 |
This is very interesting implementation.
If you are familiar with swak4foam/groovyBC ( if not i recommend you/Everyone must learn) . I am assuming that flow direction is x and radial is y. Just look at implementation, images are attached. One can correct mistakes if any. All the best. (If swak4foam not compiled, then ask) |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Radiation in semi-transparent media with surface-to-surface model? | mpeppels | CFX | 11 | August 22, 2019 08:30 |
Out File does not show Imbalance in % | Mmaragann | CFX | 5 | January 20, 2017 11:20 |
Wrong flow in ratating domain problem | Sanyo | CFX | 17 | August 15, 2015 07:20 |
CFX fails to calculate a diffuser pipe flow | shenying0710 | CFX | 7 | March 26, 2013 05:13 |
Velocity inlet boundary condition for porous medium | Chander | CFX | 3 | March 11, 2012 22:18 |