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

Need help in Implementing Swirl flow velocity - OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 1 Post By Scram_1
  • 2 Post By Pravin Kadu
  • 1 Post By HappyS5
  • 1 Post By Krao
  • 1 Post By Alizarei

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 19, 2017, 16:02
Default Need help in Implementing Swirl flow velocity - OpenFOAM
  #1
New Member
 
Adithya Gurumurthy
Join Date: Jun 2017
Posts: 18
Rep Power: 9
raptorishungry is on a distinguished road
Hello all,

I am trying to implement a swirling flow at the inlet of my geometry (inlet is a circular cross-section) for a 3-D steady, turbulent case. I am varying u(z) and u(theta) for a u(r) = 0, for a fixed resultant Umag (0.6 m/s in all my cases). I have tried the following methods:

1. swirlFlowRateInletVelocity - https://github.com/OpenFOAM/OpenFOAM...hVectorField.H

2. cylindricalInletVelocity - https://github.com/OpenFOAM/OpenFOAM...hVectorField.H

For the aforementioned methods, I am having an unusual spike in the velocity, where the Umag exceeds its actual intended value at the inlet. I am pasting my inlet BC for U folder for both the methods.

//swirlFlowRateInletVelocity
INLET
{
type swirlFlowRateInletVelocity;
flowRate constant 1.69e-05; // based on Umag
rpm constant 8486; // for Utheta = 0.4243 m/s
value uniform (0 0 0);

//type fixedValue;
//value uniform (0 0.6 0);
}


//cylindricalInletVelocity
INLET
{
type cylindricalInletVelocity;
axis (0 1 0);
centre (0 10e-03 0);
axialVelocity constant 0.4243;
radialVelocity constant 0;
rpm constant 8486; // for Utheta = 0.4243 m/s
value uniform (0 0 0);
}


3. I have also tried implementing through coordinate transformation method using groovyBC for the same inlet condition using the following code

INLET
{

type groovyBC;
variables
(
"zp=pos().z;"
"xp=pos().x;"
"r=sqrt(pow(xp,2)+pow(zp,2));"

"U_theta=0.4243;" // inputs
"U_axial=0.4243;" //inputs
"U_radial=0;" // inputs
"theta=atan(zp/xp);"
"U_x=U_radial*sin(theta)+U_theta*cos(theta);" // conversion to cartesian
"U_z=U_radial*cos(theta)-U_theta*sin(theta);" // conversion to cartesian
);
valueExpression "vector ( U_x, U_axial, U_z )"; // the cylindrical axis is along Y

}

For this case, the contour seems wrong and the stream lines do not seem to indicate the swirling motion.

I have attached all the plots for your kind perusal. It would be very helpful if anyone could elucidate me on this issue. Thanks in advance.

OpenFOAM version: 3.0.1
Attached Images
File Type: png swirlInlet_also_cylindricalInlet.png (47.7 KB, 161 views)
File Type: png groovyBC_inlet.png (93.9 KB, 135 views)
File Type: png streamtrace_for_groovyBC_inlet.png (169.3 KB, 120 views)
raptorishungry is offline   Reply With Quote

Old   November 20, 2017, 12:50
Default
  #2
Member
 
Join Date: Oct 2015
Posts: 63
Rep Power: 11
Scram_1 is on a distinguished road
Hi Adithya!
Even I'm facing a similar issue.
I'm getting unphysical results with regards to u(r). I've tried the swirl velocity inlet BC. It would be helpful if someone could post a solution to this problem.
raptorishungry likes this.
Scram_1 is offline   Reply With Quote

Old   November 26, 2017, 16:06
Default
  #3
New Member
 
Adithya Gurumurthy
Join Date: Jun 2017
Posts: 18
Rep Power: 9
raptorishungry is on a distinguished road
Could someone please shed some light on this issue?


Thanks,

Adithya Gurumurthy
raptorishungry is offline   Reply With Quote

Old   January 29, 2018, 03:04
Default
  #4
New Member
 
Kadu
Join Date: Jun 2015
Location: India
Posts: 6
Rep Power: 11
Pravin Kadu is on a distinguished road
I used this
[Note - my cylinder center is at (0,0,0)]

inlet2
{
type groovyBC;
variables
(
"yp2=pos().y;"
"zp2=pos().z;"
"r2=sqrt(pow(zp2,2)+pow(yp2,2));"

"U_ax2=0.5496*pow((1-mag(r2-0.0095)/(1.001*0.0035)),(1/7));"
"U_t=0.15*(1-pow((mag(r2-0.0095)/(1.001*0.0035)),2));"

"U_tz=-U_t*yp2/r2;"
"U_ty=U_t*zp2/r2;"
);
valueExpression "vector ( U_ax2, U_ty, U_tz )";
value uniform (0 0 0);
}
Mansur and raptorishungry like this.
Pravin Kadu is offline   Reply With Quote

Old   April 19, 2018, 14:48
Default
  #5
New Member
 
Adithya Gurumurthy
Join Date: Jun 2017
Posts: 18
Rep Power: 9
raptorishungry is on a distinguished road
Thank you Pravin! I am getting realistic results now
raptorishungry is offline   Reply With Quote

Old   July 5, 2019, 00:19
Default Can you define your variables?
  #6
Member
 
Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 10
HappyS5 is on a distinguished road
Quote:
Originally Posted by Pravin Kadu View Post
I used this
[Note - my cylinder center is at (0,0,0)]

inlet2
{
type groovyBC;
variables
(
"yp2=pos().y;"
"zp2=pos().z;"
"r2=sqrt(pow(zp2,2)+pow(yp2,2));"

"U_ax2=0.5496*pow((1-mag(r2-0.0095)/(1.001*0.0035)),(1/7));"
"U_t=0.15*(1-pow((mag(r2-0.0095)/(1.001*0.0035)),2));"

"U_tz=-U_t*yp2/r2;"
"U_ty=U_t*zp2/r2;"
);
valueExpression "vector ( U_ax2, U_ty, U_tz )";
value uniform (0 0 0);
}
Pravin,

I am new to CFD but I am learning the best I can.

In the near future, I will be modeling a nozzle that has significant swirl at the inlet. So, I found your discussion useful.

Sadly, I am ignorant to the code that you use in your post. Can you explain each step for me? I know it is a lot to ask, but I will benefit greatly from your tutorial.
Krao likes this.
HappyS5 is offline   Reply With Quote

Old   July 31, 2019, 07:05
Default
  #7
Senior Member
 
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8
Krao is on a distinguished road
Hi Chris

Quote:
Originally Posted by HappyS5 View Post
Pravin,

I am new to CFD but I am learning the best I can.

In the near future, I will be modeling a nozzle that has significant swirl at the inlet. So, I found your discussion useful.

Sadly, I am ignorant to the code that you use in your post. Can you explain each step for me? I know it is a lot to ask, but I will benefit greatly from your tutorial.
I am also trying to simulate a propeller with swirl at the inlet. As I am planning to implement parabolic swirl at the inlet, it would be great if I know the expansion of the code too. If you have already found the explanation please post that here. Else, I would also request other members to give us some hint where we can find the theory of all these GroovyBCs.

Thank you all in advance

Krao
Krao is offline   Reply With Quote

Old   July 31, 2019, 11:55
Default
  #8
Senior Member
 
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8
Krao is on a distinguished road
Quote:
Originally Posted by HappyS5 View Post
Pravin,

I am new to CFD but I am learning the best I can.

In the near future, I will be modeling a nozzle that has significant swirl at the inlet. So, I found your discussion useful.

Sadly, I am ignorant to the code that you use in your post. Can you explain each step for me? I know it is a lot to ask, but I will benefit greatly from your tutorial.
I have got a better understanding now although not completely! I still don't know the meaning of the numerical values in the equation. If you have not gone through these links then it may help you as well, https://openfoamwiki.net/images/d/db...mReference.pdf, https://openfoamwiki.net/images/7/7a...icTraining.pdf
HappyS5 likes this.
Krao is offline   Reply With Quote

Old   August 5, 2019, 04:12
Default
  #9
New Member
 
Ali
Join Date: Aug 2019
Posts: 1
Rep Power: 0
Alizarei is on a distinguished road
Thank you friend for your help
I was trying for Swirlvelocity inlet boundary condition and every time it showed an error for essentioaly " value " and when i added the last line of your description it worked.thank you so much man
HappyS5 likes this.
Alizarei is offline   Reply With Quote

Reply


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
How to calculate swirl velocity or angular velocity in a in-cylinder flow analysis us tgsankar Main CFD Forum 2 April 26, 2017 17:55
Quantifying the swirl in CFX, Swirl Number/Swirl Angle tauqirnawaz CFX 23 July 24, 2016 23:28
Problem with time average tangential velocity in swirl flow. lakhi FLUENT 5 July 18, 2012 17:28
swirl flow rvndr FLUENT 10 May 30, 2012 03:53


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