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

flowRateInletVelocity - BC not applied correctly

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 12, 2020, 09:44
Default flowRateInletVelocity - BC not applied correctly
  #1
New Member
 
Join Date: Mar 2017
Posts: 25
Rep Power: 9
.bastian is on a distinguished road
Hi.

I am trying to set up a compressible MRF case using steadyUniversalMRFFoam or steadyCompressibleMRFFoam as a part of foam-extend 4.1.

In the boundary conditions I have specified a mass flow for the velocity at the inlet. During the first runs I noticed that the boundary condition seems to be not properly applied. As can be seen on the plot, the inlet mass flow is anything but constant.

My boundaries are defined as following:

0/U
Code:
inlet
    {
        type            flowRateInletVelocity;
        flowRate        0.177777777778;
        value           uniform (0 0 -20);
    }
outlet
    {
        type            zeroGradient;
    }
0/p
Code:
inlet
    {
        type            totalPressure;
        rho             rho;
        psi             none;
        gamma           1.693;
        p0              uniform 28500000;
        value           uniform 28500000;
    }
outlet
    {
        type            fixedValue;
        value           uniform 29706129.152;
    }


Any idea what i'm doing wrong?
.bastian is offline   Reply With Quote

Old   January 12, 2020, 13:35
Default
  #2
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
jherb is on a distinguished road
Are you sure that you have specified the mass flow rate and not the volmetric flow rate? See https://github.com/Unofficial-Extend...hVectorField.H


What is the dimension of the phi-field in the outputs?
jherb is offline   Reply With Quote

Old   January 13, 2020, 15:45
Default
  #3
New Member
 
Join Date: Mar 2017
Posts: 25
Rep Power: 9
.bastian is on a distinguished road
Quote:
Originally Posted by jherb View Post
[...]
What is the dimension of the phi-field in the outputs?

That was one of the first things i've checked:

phi:
Code:
dimensions      [1 0 -1 0 0 0 0]; // which corresponds to [kg/s]

And even if this would have been mixt up the value should have been kept constant during the simulation. - Or am i wrong?
.bastian is offline   Reply With Quote

Old   January 13, 2020, 16:37
Default
  #4
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
jherb is on a distinguished road
How have you calculated the massflows at the in- and outlet? Using function objects? Are the values on the patch faces used or the cell center values next to the patch?

Cell center values might/probably are different from the patch values. Your boundary condition sets the values on the faces.


What are the intial residuals at the end of each time step? Values for U and p should be below something link 1e-4.
jherb is offline   Reply With Quote

Old   January 15, 2020, 15:14
Default
  #5
New Member
 
Join Date: Mar 2017
Posts: 25
Rep Power: 9
.bastian is on a distinguished road
I've calculated the massflows with swak4foam using the following patchExpression:



Code:
patchMassFlow
     {
         type patchExpression;
         autowrite true;
         outputInterval 1;
        writeStartTime no;
         accumulations (
             sum
         );
         patches (
             inlet
             outlet
         );
         expression "phi";
         verbose true;
      }
So in my understanding it should be the flux which is leaving/entering the domain through the patch faces.
No, sadly the initial residuals are quite high.
Attached the plots of the last run.
Attached Images
File Type: png continuity.png (73.9 KB, 15 views)
File Type: png massFlows.png (45.9 KB, 12 views)
File Type: png residuals.png (69.1 KB, 20 views)
.bastian is offline   Reply With Quote

Old   January 15, 2020, 16:05
Default
  #6
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
jherb is on a distinguished road
Your residuals look really big.


Is this a steady state case or a transient simulation? If steady state, it is just not converged yet. If transient, you probably either have to decrease the time step significantly, or do (much) more outer corrector loops.
jherb is offline   Reply With Quote

Reply

Tags
boundary condition, flowrateinletvelocity, foam-extend 4.1


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
Define a new force applied to particles using DPMFoam enoch OpenFOAM Pre-Processing 1 June 27, 2023 23:49
[OpenFOAM] How to correctly show the result of #codeStream# internalField? chengdi ParaView 24 July 14, 2022 04:26
chtMultiRegionSimpleFoam planeWall2D case dont run correctly in OPenFOAM 1606+ shengqiming OpenFOAM Running, Solving & CFD 0 August 7, 2016 14:15
SU2 optimization does not work correctly with CGNS format Andrei SU2 Shape Design 1 April 22, 2016 10:35
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 19:43


All times are GMT -4. The time now is 12:04.