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

mappedPatch with channel flow

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 20, 2014, 15:44
Default mappedPatch with channel flow
  #1
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 16
ArathoN is on a distinguished road
I want to simulate the fully developed flow in a rectangular channel and i decided to use the mappedpatch option with the solver simpleFoam.

I mapped the inlet with the outlet and I put as value variable the velocity i want like this:
Code:
dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    inlet
    {
        type                  mapped;
        value                 uniform (9.07 0 0);
        interpolationScheme   cell;
        setAverage            false;
        average               (9.07 0 0);  
    }

    outlet
    {
        type            zeroGradient;
    }

    upperWall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    lowerWall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    frontAndBack
    {
        type            empty;
    }
}

What i want is that the maximum velocity would be the given one, so it must be the center-line velocity. But after the simulation the velocity would increase and i can't figure out how i can make it stop doing it.

My hypothesis is that with mappedpatch it will try to maintain constant the massflow so the velocity at centerline represent the maximum flow and having the boundary layer the velocity will have to increase at the center-line cause near wall it's null. How can i counter this? I have the experimental data in 12 point of the channel height, can they be useful?

Here the interested part of blockmeshDict:

Code:
inlet
    {
        type mappedPatch;
        offset          ( 0.4 0 0 );
        sampleRegion    region0;
        sampleMode      nearestCell;
        samplePatch     none;
        faces
        (
            (0 5 11 6)
            (5 4 10 11)
        );
    }
    outlet
    {
        type patch;
        faces
        (

            (1 2 8 7)
            (2 3 9 8)          
        );
ArathoN is offline   Reply With Quote

Old   February 21, 2014, 11:13
Default
  #2
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 16
ArathoN is on a distinguished road
Resolved.

The values given at the boundary for the velocity for openFoam isn't the center-line velocity (as i wanted) but the bulk velocity.

knowing the definition of the bulk velocity ( Ub=1/h * integral[ U(y) dy] ) and having the experimental data i'll try to compute it with the trapezoidal method using excel. I'll report my results if i'm succesfull.
ArathoN is offline   Reply With Quote

Old   March 17, 2014, 07:23
Default
  #3
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 14
huangxianbei is on a distinguished road
Quote:
Originally Posted by ArathoN View Post
Resolved.

The values given at the boundary for the velocity for openFoam isn't the center-line velocity (as i wanted) but the bulk velocity.

knowing the definition of the bulk velocity ( Ub=1/h * integral[ U(y) dy] ) and having the experimental data i'll try to compute it with the trapezoidal method using excel. I'll report my results if i'm succesfull.
How long did you take to get a fully developed flow? I monitored the velocity at y+=30,the velocity shows really huge fluctuation and the period of it is almost 150 flow-through time. By the way ,I used the channelFoam
huangxianbei is offline   Reply With Quote

Old   May 5, 2014, 05:06
Default
  #4
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 16
ArathoN is on a distinguished road
Sorry if i didn't reply earlier, I simulated again the case with mappedPatch option and the simulation will converge even though the residual will oscillate around a really low value. The velocity profile is quite similar to the profile given thanks to the experimental data, except obviously for the region near the wall. Now i'll try to validate it comparing the u+-y+ graphs with the experimental data.

Btw Did you try pimplefoam + cyclic? I can't get proper results cause of high pressure residual.
ArathoN is offline   Reply With Quote

Old   May 5, 2014, 05:11
Default
  #5
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 14
huangxianbei is on a distinguished road
Quote:
Originally Posted by ArathoN View Post
Sorry if i didn't reply earlier, I simulated again the case with mappedPatch option and the simulation will converge even though the residual will oscillate around a really low value. The velocity profile is quite similar to the profile given thanks to the experimental data, except obviously for the region near the wall. Now i'll try to validate it comparing the u+-y+ graphs with the experimental data.

Btw Did you try pimplefoam + cyclic? I can't get proper results cause of high pressure residual.
Thank you. I think the initial data in the tutorial is from perhaps LES. I find that the time takes to reach a fully turbulent flow is long when using perturbU, however, I haven't found a faster way to specify the initial condition.
huangxianbei is offline   Reply With Quote

Old   May 5, 2014, 06:06
Default
  #6
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 16
ArathoN is on a distinguished road
I'm validating the Backward facing step and right now i'm studying the channel because i need a fully developed turbulent flow (i work with Re=15000 to 64000) so I've took the experimental data (from backward step) and I calculated all the initial data like k and turbulence intensity.

However until now I've used the RAS models, especially I've used the simpleFoam solver with mappedpatch condition or the usual setting with the developing region (i noticed that in High-Re channel the needed length for the channel to develop the flow is quite short aroud 25 High step with Re=15000).

I'll try again the cyclic BCs with simpleFoam (on OF 2.2 it didn't work, a patch was needed) and maybe I'll touch the LES settings (never done such a simulation).

My main problem right now is make the pimplefoam solver work on OF 2.3, in the previous version it worked wonderfully, here the LINK of the thread with my problem. I'll greatly appreciate any help.

Now i have a doubt why you need the perturbU if you can specify initial data based on experimental data? and what does this utility do?

P.S. Did you ever used the Kim data? I'm having a problem with the computed u_tau, the value calculated from the Re_tau and from y/yplus are different.
ArathoN is offline   Reply With Quote

Old   May 5, 2014, 10:11
Default
  #7
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 14
huangxianbei is on a distinguished road
Quote:
Originally Posted by ArathoN View Post
I'm validating the Backward facing step and right now i'm studying the channel because i need a fully developed turbulent flow (i work with Re=15000 to 64000) so I've took the experimental data (from backward step) and I calculated all the initial data like k and turbulence intensity.

However until now I've used the RAS models, especially I've used the simpleFoam solver with mappedpatch condition or the usual setting with the developing region (i noticed that in High-Re channel the needed length for the channel to develop the flow is quite short aroud 25 High step with Re=15000).

I'll try again the cyclic BCs with simpleFoam (on OF 2.2 it didn't work, a patch was needed) and maybe I'll touch the LES settings (never done such a simulation).

My main problem right now is make the pimplefoam solver work on OF 2.3, in the previous version it worked wonderfully, here the LINK of the thread with my problem. I'll greatly appreciate any help.

Now i have a doubt why you need the perturbU if you can specify initial data based on experimental data? and what does this utility do?

P.S. Did you ever used the Kim data? I'm having a problem with the computed u_tau, the value calculated from the Re_tau and from y/yplus are different.
Because I don't have experimental data. So a reasonable initial field is needed, if not, the time to be turbulent will be much longer.
Yes, I use the Kim data for comparison. What do you mean that the value calculated from the Re_tau and from y/yplus are different?
huangxianbei is offline   Reply With Quote

Old   May 5, 2014, 10:26
Default
  #8
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 16
ArathoN is on a distinguished road
I tried to calculate utau both from the given reynolds & nu, and from yplus and y; but i had different values of utau then i noticed that the y data was normalized by the channel width.

Can you link me the perturb thread you used? is it usefull only with LES or can i use it with RANS?

I'll try to run some LES simulations and i Hope to resolve my issues with the Cyclic condition on pimplefoam. I'll write here any results i'll have.
ArathoN is offline   Reply With Quote

Old   May 5, 2014, 10:32
Default
  #9
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 14
huangxianbei is on a distinguished road
Quote:
Originally Posted by ArathoN View Post
I tried to calculate utau both from the given reynolds & nu, and from yplus and y; but i had different values of utau then i noticed that the y data was normalized by the channel width.

Can you link me the perturb thread you used? is it usefull only with LES or can i use it with RANS?

I'll try to run some LES simulations and i Hope to resolve my issues with the Cyclic condition on pimplefoam. I'll write here any results i'll have.
You can find it http://www.cfd-online.com/Forums/ope...tml#post187632
It's a utility which can generate a initial field for channel flow.
If the channel is not rotate, then the ut at both sides should be equal.
y is normalized by half-width
huangxianbei is offline   Reply With Quote

Old   May 5, 2014, 12:40
Default
  #10
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 16
ArathoN is on a distinguished road
mmm in the ReadMe of the channel data zip it was written that the normalization was done with respect to "h", and i supposed it was the channel height.

I'm having a huge doubt, how do you decide the sizing of the grid? I know than the yplus needs to be lower than 1 to better determine the viscous layer and hence teh friction coefficient. But i found almost no information on the other two direction (spanwise and streamwise).
ArathoN is offline   Reply With Quote

Old   May 5, 2014, 21:57
Default
  #11
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 14
huangxianbei is on a distinguished road
Quote:
Originally Posted by ArathoN View Post
mmm in the ReadMe of the channel data zip it was written that the normalization was done with respect to "h", and i supposed it was the channel height.

I'm having a huge doubt, how do you decide the sizing of the grid? I know than the yplus needs to be lower than 1 to better determine the viscous layer and hence teh friction coefficient. But i found almost no information on the other two direction (spanwise and streamwise).
Usually,it's half-height.You should clarify this.
If the streamwise and spanwise is long comparing with y direction,than a finer mesh is required, say 128 grids in x and z.
You can first do a LES simulation. In RANS, the wall function is used which take a different method in sublayer and log-law region(y+=30)
So the region between sublayer and log-law layer is removed in this way.
huangxianbei is offline   Reply With Quote

Old   May 6, 2014, 05:35
Default
  #12
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 16
ArathoN is on a distinguished road
The data i've used are from this site, and in the file for mean profiles you'll see he uses "h" for the normalizations.

For the grid size I know about the grid requirement in the normal direction (Low-Re vs High-Re Meshes) and when to use the relative wall-Functions, but i couldn't find any info about the grid requirement in the other two directions.

In fact I'm going to do a refinement check, starting with a coarse uniform mesh and i'll see the mesh density needed to have a solution independent from the grid sizing. From this I think i can provide a better insight on how to consider a graded mesh in the boundary layer (especially in the sublayer where i can specify the first rid point and the optimal grid points needed to better define the region). Then I'll see the requirement for the other 2 directions.

I'm amazed that no one has done a study about the grid sizing for such simple cases, in every report I've read about channels they only specify their grid point without defining the grading coefficients which I think It's the most important info.

P.S. if you want i found the experimental data for the channel with higher Re (from 15000 onward).
ArathoN is offline   Reply With Quote

Old   May 7, 2014, 03:40
Default
  #13
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 14
huangxianbei is on a distinguished road
Quote:
Originally Posted by ArathoN View Post
The data i've used are from this site, and in the file for mean profiles you'll see he uses "h" for the normalizations.

For the grid size I know about the grid requirement in the normal direction (Low-Re vs High-Re Meshes) and when to use the relative wall-Functions, but i couldn't find any info about the grid requirement in the other two directions.

In fact I'm going to do a refinement check, starting with a coarse uniform mesh and i'll see the mesh density needed to have a solution independent from the grid sizing. From this I think i can provide a better insight on how to consider a graded mesh in the boundary layer (especially in the sublayer where i can specify the first rid point and the optimal grid points needed to better define the region). Then I'll see the requirement for the other 2 directions.

I'm amazed that no one has done a study about the grid sizing for such simple cases, in every report I've read about channels they only specify their grid point without defining the grading coefficients which I think It's the most important info.

P.S. if you want i found the experimental data for the channel with higher Re (from 15000 onward).
Yes, I didn't found any report about the grid size. I suggest you to use a finer mesh at the beginning, I have tested that if the x direction is long, the grid needed in this direction should be 128 or more, while in the normal direction, 64 should be enough.
I'll appreciate if you can show me the experimental data.
huangxianbei is offline   Reply With Quote

Old   May 7, 2014, 08:16
Default
  #14
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 16
ArathoN is on a distinguished road
Here a gook link with lots of datasets.

Did you use a uniform mesh along x and z direction like the tutorial channel395? and what yplus do you have? And how did you choose the dimensions on the three directions, I know there is a paper by Dean where he gives some insight ("REYNOLDS-NUMBER DEPENDENCE OF SKIN FRICTION AND OTHER BULK FLOW VARIABLES IN 2-DIMENSIONAL RECTANGULAR DUCT FLOW") but unfortunately i couldn't find the paper "free" (if someone has it please pm it to me).

My channel has these dimentions 1x0.025x0.1m (40*HxHx4*H), knowing that in the Kim paper the channel dimensions were 7mx22cmx85cm (32*HxHx4*H). Now i'll try the simulation with different yplus then i'll change the grid spacing along x and z respectively. I hope i'll finish all the needed simulation for 9/05 and i'll report back. Did it take a lot of time to converge with LES?

If you have some interesting paper about channel or backward facing step I would greatly appreciate if you could send it to me. Another paper i couldn't fin was this "THEORETICAL AND EXPERIMENTAL INVESTIGATION OF FLOW OVER SINGLE AND DOUBLE BACKWARD FACING STEPS" by Abbott.

PS Last question I'm choosing a Co number 0.5 for better stability did you define the time step based on the smallest grid spacing?
ArathoN is offline   Reply With Quote

Old   May 7, 2014, 08:32
Default
  #15
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 14
huangxianbei is on a distinguished road
Quote:
Originally Posted by ArathoN View Post
Here a gook link with lots of datasets.

Did you use a uniform mesh along x and z direction like the tutorial channel395? and what yplus do you have? And how did you choose the dimensions on the three directions, I know there is a paper by Dean where he gives some insight ("REYNOLDS-NUMBER DEPENDENCE OF SKIN FRICTION AND OTHER BULK FLOW VARIABLES IN 2-DIMENSIONAL RECTANGULAR DUCT FLOW") but unfortunately i couldn't find the paper "free" (if someone has it please pm it to me).

My channel has these dimentions 1x0.025x0.1m (40*HxHx4*H), knowing that in the Kim paper the channel dimensions were 7mx22cmx85cm (32*HxHx4*H). Now i'll try the simulation with different yplus then i'll change the grid spacing along x and z respectively. I hope i'll finish all the needed simulation for 9/05 and i'll report back. Did it take a lot of time to converge with LES?

If you have some interesting paper about channel or backward facing step I would greatly appreciate if you could send it to me. Another paper i couldn't fin was this "THEORETICAL AND EXPERIMENTAL INVESTIGATION OF FLOW OVER SINGLE AND DOUBLE BACKWARD FACING STEPS" by Abbott.

PS Last question I'm choosing a Co number 0.5 for better stability did you define the time step based on the smallest grid spacing?
Thank you very much. The dimension is 4pi*hx2hx2pi*h.
The y plus is about 0.5.
I haven't investigate the backward facing step, so I'm sorry there is no paper about this in my hand.
Co<1 is required if PISO is used. The Comax is about 0.6 in the simulation.
huangxianbei is offline   Reply With Quote

Old   May 8, 2014, 05:35
Default
  #16
Member
 
Niu
Join Date: Apr 2014
Posts: 55
Rep Power: 12
Z.Q. Niu is on a distinguished road
Hello, xianbei,
Would you mind telling me how to calculate u+ and y+ of channel flow in Open Foam?
Thank you !
Z.Q. Niu is offline   Reply With Quote

Old   May 8, 2014, 05:54
Default
  #17
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 14
huangxianbei is on a distinguished road
Quote:
Originally Posted by Z.Q. Niu View Post
Hello, xianbei,
Would you mind telling me how to calculate u+ and y+ of channel flow in Open Foam?
Thank you !
u+ is u/ut, ut is the friction velocity
y+ is calculated as y+=y*ut/mu, mu is the viscosity
huangxianbei is offline   Reply With Quote

Old   May 8, 2014, 14:20
Default
  #18
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 16
ArathoN is on a distinguished road
Quote:
Originally Posted by huangxianbei View Post
u+ is u/ut, ut is the friction velocity
y+ is calculated as y+=y*ut/mu, mu is the viscosity
mu? It should be ni the cinematic viscosity.

Btw you'll have to output yPlus then knowing y and ni you calculate ut and from it u. This is the fastest way otherwise you can output the wallshearstress and if you are working in incompressible field the values are normalized by the density so you have tau_wall/rho=ut^2.

The only problem here is the yplus, if you search the forum you'll see that if you use a wall resolved method other than les the yplus utility (yPlusRAS) will give different values from the real yplus (because yPlusRAS is based on the turbulent kinetic energy and it's the yStar from fluent) so in this case you need to patch it.

You'll notice that the fully developed region is given by a constant value of ut (tau_wall) and you need the values over the y-direction to map u+ vs y+.

PS: @huangxianbei what grading did you use for the direction y,x,z?

EDIT: I tried to simulate the case with cyclic BCs and I can't complete the simulation, It always crashes even if I use LES or RAS models. If someone is willing to help (Please) i can post all my files.
Mahmoud Abbaszadeh likes this.
ArathoN is offline   Reply With Quote

Old   May 8, 2014, 21:24
Default
  #19
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 14
huangxianbei is on a distinguished road
Quote:
Originally Posted by ArathoN View Post
mu? It should be ni the cinematic viscosity.

Btw you'll have to output yPlus then knowing y and ni you calculate ut and from it u. This is the fastest way otherwise you can output the wallshearstress and if you are working in incompressible field the values are normalized by the density so you have tau_wall/rho=ut^2.

The only problem here is the yplus, if you search the forum you'll see that if you use a wall resolved method other than les the yplus utility (yPlusRAS) will give different values from the real yplus (because yPlusRAS is based on the turbulent kinetic energy and it's the yStar from fluent) so in this case you need to patch it.

You'll notice that the fully developed region is given by a constant value of ut (tau_wall) and you need the values over the y-direction to map u+ vs y+.

PS: @huangxianbei what grading did you use for the direction y,x,z?

EDIT: I tried to simulate the case with cyclic BCs and I can't complete the simulation, It always crashes even if I use LES or RAS models. If someone is willing to help (Please) i can post all my files.
You mean the yPlusLES gives the right yplus and yPlusRAS gives a resolved yplus?I haven't used the RAS yet, so I'm just curious about this.

The only non-uniform direction is y, ie. 10. The homogenous directions use the uniform mesh.
huangxianbei is offline   Reply With Quote

Old   May 8, 2014, 23:26
Default
  #20
Member
 
Niu
Join Date: Apr 2014
Posts: 55
Rep Power: 12
Z.Q. Niu is on a distinguished road
Dear Xianbei,
I have not found the utility for plotting yplus with solver of DNS, have you got it ?
Z.Q. Niu 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
rhoCentralFoam for channel flow fportela OpenFOAM Running, Solving & CFD 22 June 10, 2014 21:14
Question on the boundary condition for open channel flow, please help! ripperjack OpenFOAM Running, Solving & CFD 0 September 13, 2013 12:44
Gravitational water flow in closed channel. Szymon85 CFX 7 September 3, 2013 17:28
[ICEM] Flow channel meshing problems StefanG ANSYS Meshing & Geometry 19 May 15, 2012 07:44
references for how to maintain a constant flow rate in turbulent channel flow amirrstg Main CFD Forum 0 October 25, 2011 04:17


All times are GMT -4. The time now is 15:58.