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

Channel Flow with Constant Mass Flow Rate

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 1, 2018, 11:31
Default Channel Flow with Constant Mass Flow Rate
  #1
New Member
 
Buzz
Join Date: Apr 2018
Posts: 2
Rep Power: 0
huzafa is on a distinguished road
I am trying to simulate a channel flow of infinite stream-wise length, fixing a constant mass flow rate across the channel to drive the flow. I am using simpleFoam with kw SST turbulence model. My strategy is to set a periodic boundary condition at the inlet and outlet for U, nut, k and w (to give the effect of an infinite stream-wise length) and allow the pressure to be solved (to ensure a fixed mass flow rate). I am using OF version 1.7.1.

I tried to set a cyclic boundary condition for the inlet and outlet in the blockmesh dictionary file, however this meant that the simulation would not run unless I set the inlet/outlet boundary condition for every flow variable as cyclic in the field files (I do not want to do this for pressure).

Following this, my approach was to use the mappedPatch in the blockmesh dictionary file as follows:

Code:
boundary
(
       inlet
       {
                type                    mappedPatch;
                sampleMode        nearestPatchFace;
                samplePatch        outlet;
                faces                   ((7 4 0 3));
        }
 
        outlet
        {
                 type                    patch;
                 faces                   ((2 1 5 6));
The field files for all the variables are as follows:

U:

Code:
boundaryField
{
                 inlet
                 {
                       type                      mapped;
                       value                     uniform (10 0 0 );
                       setAverage             true;
                       average                 (10 0 0);
                  }

                 outlet
                 {
                       type                      zeroGradient;
                  }
p:

Code:
boundaryField
{
                 inlet
                 {
                       type                      zeroGradient;
                  }

                 outlet
                 {
                       type                      zeroGradient;
                  }
omega:

Code:
boundaryField
{
                 inlet
                 {
                       type                      mapped;
                       value                     uniform 200000;
                       setAverage             false;
                       average                 200000;
                  }

                 outlet
                 {
                       type                      zeroGradient;
                  }
k:

Code:
boundaryField
{
                 inlet
                 {
                       type                      mapped;
                       value                     uniform 0.002;
                       setAverage             false;
                       average                 0.002;
                  }

                 outlet
                 {
                       type                      zeroGradient;
                  }
nut:

Code:
boundaryField
{
                 inlet
                 {
                       type                      mapped;
                       value                     uniform 0;
                       setAverage             false;
                       average                 0;
                  }

                 outlet
                 {
                       type                      zeroGradient;
                  }
Reading other posts on the form I believe that the mappedPatch boundary type is the one to use along with mapped in the field files. I can generate blockMesh and decompose my domain without any issue, but when I mpirun my case with these conditions, I receive an error. So I need help with the following:

-Do these boundary conditions make sense for what I am trying to achieve?

-What is the function of "sampleMode" and "samplePatch" entries (sampleMode is required when using mappedPatch type)?

-I have read that the mass flow rate is fixed through setting "true" for the "setAverage" entry in the "U" field file. Is this correct?

Thanks
huzafa is offline   Reply With Quote

Reply

Tags
boundary condition, channel, mapped, mass flow rate


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
Mass flow rate: calculation v/s computation beguxa FLUENT 5 December 2, 2018 22:02
Mass flow rate boundary condition with negative values hebe2u. CFX 1 December 27, 2016 04:53
Shape Optimization Problem of Mass Flow Rate ggc1991 SU2 Shape Design 1 December 1, 2016 21:24
Mass flow rate boundary condition with negative values ashtonJ CFX 3 November 26, 2014 06:21
Constant mass flow rate / choking outlet bounardy condition Min Zhu Main CFD Forum 1 September 29, 1998 16:33


All times are GMT -4. The time now is 13:53.