CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] Problem with fully developed velocity profile groovyBC in 2D axi-sym mesh

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 17, 2014, 01:37
Default Problem with fully developed velocity profile groovyBC in 2D axi-sym mesh
  #1
New Member
 
Harshad Lalit
Join Date: May 2013
Posts: 26
Rep Power: 12
harshad88 is on a distinguished road
Hello All,

I am studying a premixed jet flame using reactingFoam in a 2D axisymmetric mesh and using a groovyBC to simulate fully developed turbulent flow through the premixed inlet. The geometry has a wall beside the premixed inlet (at x=0.0075m). I am using the following code to set up my velocity profile:

Code:
Inlet
    {
        type groovyBC;
              value uniform (0 0 0);
              variables (
                "n=7;"  //power law coefficient n
                "R=0.0075;"  //pipe radius
                "Umean=7.5;"   //calculate mean velocity
                "Umax=13.2;"  //calculate max velocity
                "profile=Umax*pow(1-sqrt(pow(pos().x,2)+pow(pos().z,2))/R,(1/n));"
                //calcucate power law velocity profile Umax*(1-r/R)^(1/n)
                );
              valueExpression "normal()*-profile";
              //apply to boundary, normal() is surface normal vector and minus is needed for inflow
    }
However, when I extract the velocities using the sampleDict utility I do not see my velocities going to 0 at the intersection with the wall.
Code:
x	y	z	u(m/s)		v(m/s)		w(m/s)
0	0	0	0		13.097		0
0.00105	0       0       1.8e-2  	12.9125 	-7.34282e-06
0.0021	0	0	0.000278988	12.5902		-8.95149e-06
0.003	0	0	-0.00146174	12.2672		-2.48713e-07
0.00375	0	0	-0.00351349	11.9474		-2.31918e-05
0.0039	0	0	-0.00399891	11.8788		-9.06154e-06
0.0042	0	0	-0.00526191	11.7293		-3.19546e-05
0.0045	0	0	-0.00667307	11.5738		-1.0456e-06
0.0051	0	0	-0.0111364	11.2036		-3.2705e-05
0.00555	0	0	-0.0147763	10.8722		5.90284e-06
0.0057	0	0	-0.0148122	10.7366		2.19331e-05
0.006	0	0	-0.0149064	10.4634		-4.21239e-07
0.00645	0	0	-0.0167839	9.89666		-2.98323e-06
0.0066	0	0	0.00138561	9.61408		0.000813393
0.00675	0	0	0.0273102	9.29285		0.00173083
0.0069	0	0	0.0532349	8.97162		0.0006639
0.00705	0	0	0.0728419	8.32117		0.000127202
0.0072	0	0	0.0820423	7.12842		0.000463938
0.00735	0	0	0.0912427	5.93567		0.000299331
0.0075	0	0	0.0918162	4.74207		-0.0003617
Can anyone please help me out and tell me what have I done wrong here? Why aren't my velocities 0 at the endpoint??
harshad88 is offline   Reply With Quote

Old   July 22, 2014, 18:07
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by harshad88 View Post
Hello All,

I am studying a premixed jet flame using reactingFoam in a 2D axisymmetric mesh and using a groovyBC to simulate fully developed turbulent flow through the premixed inlet. The geometry has a wall beside the premixed inlet (at x=0.0075m). I am using the following code to set up my velocity profile:

Code:
Inlet
    {
        type groovyBC;
              value uniform (0 0 0);
              variables (
                "n=7;"  //power law coefficient n
                "R=0.0075;"  //pipe radius
                "Umean=7.5;"   //calculate mean velocity
                "Umax=13.2;"  //calculate max velocity
                "profile=Umax*pow(1-sqrt(pow(pos().x,2)+pow(pos().z,2))/R,(1/n));"
                //calcucate power law velocity profile Umax*(1-r/R)^(1/n)
                );
              valueExpression "normal()*-profile";
              //apply to boundary, normal() is surface normal vector and minus is needed for inflow
    }
However, when I extract the velocities using the sampleDict utility I do not see my velocities going to 0 at the intersection with the wall.
Code:
x	y	z	u(m/s)		v(m/s)		w(m/s)
0	0	0	0		13.097		0
0.00105	0       0       1.8e-2  	12.9125 	-7.34282e-06
0.0021	0	0	0.000278988	12.5902		-8.95149e-06
0.003	0	0	-0.00146174	12.2672		-2.48713e-07
0.00375	0	0	-0.00351349	11.9474		-2.31918e-05
0.0039	0	0	-0.00399891	11.8788		-9.06154e-06
0.0042	0	0	-0.00526191	11.7293		-3.19546e-05
0.0045	0	0	-0.00667307	11.5738		-1.0456e-06
0.0051	0	0	-0.0111364	11.2036		-3.2705e-05
0.00555	0	0	-0.0147763	10.8722		5.90284e-06
0.0057	0	0	-0.0148122	10.7366		2.19331e-05
0.006	0	0	-0.0149064	10.4634		-4.21239e-07
0.00645	0	0	-0.0167839	9.89666		-2.98323e-06
0.0066	0	0	0.00138561	9.61408		0.000813393
0.00675	0	0	0.0273102	9.29285		0.00173083
0.0069	0	0	0.0532349	8.97162		0.0006639
0.00705	0	0	0.0728419	8.32117		0.000127202
0.0072	0	0	0.0820423	7.12842		0.000463938
0.00735	0	0	0.0912427	5.93567		0.000299331
0.0075	0	0	0.0918162	4.74207		-0.0003617
Can anyone please help me out and tell me what have I done wrong here? Why aren't my velocities 0 at the endpoint??
How are you sampling? Because the values are strange anyway (I guess the x and the z component should be exactly zero if the patch has a normal (0,1,0) ).

To check which values groovyBC sets I usually
a) have a look at the written field file
b) open the case in paraview. Deselect internalField, select the patch in question and inspect it in PV
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   July 24, 2014, 02:19
Default
  #3
New Member
 
Harshad Lalit
Join Date: May 2013
Posts: 26
Rep Power: 12
harshad88 is on a distinguished road
Hello Bernhard. Thanks for your reply . I am sampling using the "uniform" technique in the sample utility, however I have deleted a couple of columns of my data to keep it short.

I was wondering if my problem has something to do with the mesh. My axisymmetric domain has the axis in the vertical - Y direction , whereas most of the problems I have seen have their axis in the horizontal X direction. Will my mesh be still consistent with the OpenFoam format? Please let me know. Thanks!
harshad88 is offline   Reply With Quote

Old   July 24, 2014, 07:58
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by harshad88 View Post
Hello Bernhard. Thanks for your reply . I am sampling using the "uniform" technique in the sample utility, however I have deleted a couple of columns of my data to keep it short.
Use "midPoint" and the interpolation scheme "cell" if you want to know the real value in the cells. "uniform" and any kind of interpolation is for preparing the data for presentations etc but not for finding problems. Because you might as well have a problem with the interpolation.

Quote:
Originally Posted by harshad88 View Post
I was wondering if my problem has something to do with the mesh. My axisymmetric domain has the axis in the vertical - Y direction , whereas most of the problems I have seen have their axis in the horizontal X direction. Will my mesh be still consistent with the OpenFoam format? Please let me know. Thanks!
Don't think so. If you think the orientation is a problem you can always use the transformPoints-utilitiy to rotate the mesh
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   July 24, 2014, 13:02
Default
  #5
New Member
 
Harshad Lalit
Join Date: May 2013
Posts: 26
Rep Power: 12
harshad88 is on a distinguished road
Hi Bernhard,

So instead of having a groovyBC i just put in a fixedValue bc (0.0 13.0 0.0) for my inlet. The domain next to the inlet is a wall (0.0 0.0 0.0). I used the "midpoint" sampling technique with 'cell' interpolation and the following in the output I got for velocity at inlet after 0.01 seconds.

Code:
distance, Ux, Uy, Uz
0.000124881, -0.000182222, 13.0002, 6.40391e-14
0.000374643, -0.000366104, 13.0002, 1.46322e-13
0.000624405,-0.000569023, 13.0001, 2.17518e-13
0.000874167, -0.000749703, 13, 1.79184e-13
0.00112393, -0.000908129, 12.9999, 1.23171e-13
0.00137369, -0.00105632, 12.9999, 1.11654e-13
0.00162345, -0.00120575, 12.9998, 1.72996e-13
0.00187322, -0.00136315, 12.9998, 3.27864e-13
0.00212298, -0.00153432, 12.9998, 5.30865e-13
0.00237274, -0.00172296, 12.9998, 4.06978e-13
0.0026225, -0.00193339, 12.9997, 3.88529e-13
0.00287226, -0.00217462, 12.9997, 4.72995e-13
0.00312203, -0.00245306, 12.9997, 2.78539e-13
0.00337179, -0.00277999, 12.9997, 1.41409e-13
0.00362155, -0.00318224, 12.9997, 6.0643e-14
0.00387131, -0.00367517, 12.9997, 6.17558e-15
0.00412107, -0.00431001, 12.9998, -4.18723e-14
0.00437084, -0.00515109, 12.9998, -8.86959e-14
0.0046206, -0.00625099, 12.9999, -1.175e-13
0.00487036, -0.00772528, 12.9999, -8.92134e-14
0.00512012, -0.00974374, 13, -5.14688e-14
0.00536988, -0.012564, 13.0001, -2.47128e-14
0.00561965, -0.0165905, 13.0004, -9.6174e-15
0.00586941, -0.0225386, 13.0008, -1.10196e-15
0.00611917, -0.0317697, 13.002, 4.90887e-15
0.00636893, -0.0458528, 13.0047, 8.50871e-15
0.00661869, -0.0621625, 13.0074, 7.54421e-15
0.00686846,-0.0489905, 12.9861, 3.24075e-14
0.00711822, -0.202212, 12.8795, 8.25841e-14
0.00736798, 0.487566, 12.1117, 2.76338e-14
The velocity drops to 12.11 m/s even before reaching the wall. The Ux is also non-zero in this domain. Not able to fathom why this is happening

I have attached an image of the closeup of mesh (the highlighted part is my inlet)
Attached Images
File Type: jpg mesh_image.jpg (93.4 KB, 25 views)
harshad88 is offline   Reply With Quote

Old   July 24, 2014, 14:30
Default
  #6
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by harshad88 View Post
Hi Bernhard,

So instead of having a groovyBC i just put in a fixedValue bc (0.0 13.0 0.0) for my inlet. The domain next to the inlet is a wall (0.0 0.0 0.0). I used the "midpoint" sampling technique with 'cell' interpolation and the following in the output I got for velocity at inlet after 0.01 seconds.

Code:
distance, Ux, Uy, Uz
0.000124881, -0.000182222, 13.0002, 6.40391e-14
0.000374643, -0.000366104, 13.0002, 1.46322e-13
0.000624405,-0.000569023, 13.0001, 2.17518e-13
0.000874167, -0.000749703, 13, 1.79184e-13
0.00112393, -0.000908129, 12.9999, 1.23171e-13
0.00137369, -0.00105632, 12.9999, 1.11654e-13
0.00162345, -0.00120575, 12.9998, 1.72996e-13
0.00187322, -0.00136315, 12.9998, 3.27864e-13
0.00212298, -0.00153432, 12.9998, 5.30865e-13
0.00237274, -0.00172296, 12.9998, 4.06978e-13
0.0026225, -0.00193339, 12.9997, 3.88529e-13
0.00287226, -0.00217462, 12.9997, 4.72995e-13
0.00312203, -0.00245306, 12.9997, 2.78539e-13
0.00337179, -0.00277999, 12.9997, 1.41409e-13
0.00362155, -0.00318224, 12.9997, 6.0643e-14
0.00387131, -0.00367517, 12.9997, 6.17558e-15
0.00412107, -0.00431001, 12.9998, -4.18723e-14
0.00437084, -0.00515109, 12.9998, -8.86959e-14
0.0046206, -0.00625099, 12.9999, -1.175e-13
0.00487036, -0.00772528, 12.9999, -8.92134e-14
0.00512012, -0.00974374, 13, -5.14688e-14
0.00536988, -0.012564, 13.0001, -2.47128e-14
0.00561965, -0.0165905, 13.0004, -9.6174e-15
0.00586941, -0.0225386, 13.0008, -1.10196e-15
0.00611917, -0.0317697, 13.002, 4.90887e-15
0.00636893, -0.0458528, 13.0047, 8.50871e-15
0.00661869, -0.0621625, 13.0074, 7.54421e-15
0.00686846,-0.0489905, 12.9861, 3.24075e-14
0.00711822, -0.202212, 12.8795, 8.25841e-14
0.00736798, 0.487566, 12.1117, 2.76338e-14
The velocity drops to 12.11 m/s even before reaching the wall. The Ux is also non-zero in this domain. Not able to fathom why this is happening

I have attached an image of the closeup of mesh (the highlighted part is my inlet)
This is OK: you set a zero-velocity BOUNDARY CONDITION. This is only valid in the boundary faces. In the boundary cell the velocity is calculated from that BC and the other cells and for low velocities may be as high as you show it

The sample utility is good for looking at cell values. If I want the face values on a patch I usually have a look at the field-file or check it in ParaView
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   July 24, 2014, 14:50
Default
  #7
New Member
 
Harshad Lalit
Join Date: May 2013
Posts: 26
Rep Power: 12
harshad88 is on a distinguished road
But shouldnt atleast the Ux be 0 because my velocity is only in the y-direction?

The Ux seems to be pretty signicant and not close to zero unlike the Uz.
harshad88 is offline   Reply With Quote

Old   July 24, 2014, 15:28
Default
  #8
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by harshad88 View Post
But shouldnt atleast the Ux be 0 because my velocity is only in the y-direction?

The Ux seems to be pretty signicant and not close to zero unlike the Uz.
Well: the wall is slowing the fluid down but the BC pushes from the back. To preserve conservation it has to go somewhere. In your case: left
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Reply

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
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 08:38
Patch fully developed velocity and turbulence profile over full domain Teumde FLUENT 2 June 29, 2015 14:47
[swak4Foam] problem with Velocity Profile with groovyBC ssss OpenFOAM Community Contributions 1 August 7, 2014 15:44
Fully developed temperature profile for laminar/turbulent flow in FLUENT raghu.tejaswi FLUENT 10 November 7, 2012 10:57
A girl fail to plot velocity profile when mesh changes + Wall function asherah STAR-CCM+ 0 February 19, 2010 18:45


All times are GMT -4. The time now is 20:57.