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

Simple straight tube problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 1, 2014, 22:28
Default Simple straight tube problem
  #1
New Member
 
Andrew Ho
Join Date: Jan 2014
Posts: 6
Rep Power: 12
everyday is on a distinguished road
Hi everyone, I've been trying to get OpenFOAM up and running and I'd like to start with an easy, verifiable case of Pouseuille flow through two straight parallel planes. This can be a 2D simulation with no-slip on the solid walls and periodic inlet/outlet velocities. I'd like for the pressures to be "periodic" as well.

I am starting with the channel395 example, use a blockMeshDict similar to the lid-driven cavity except without the moving top, and with cyclic inlet/outlets.
I'd like to simulate it with a uniform body force (eg gravity) instead of by specifying the Ubar. However, there are errors whenever pimpleFoam is run. The gravity is specified in a file "constant/g" which I borrowed from the tutorials/multiphase/icoFoam/laminar/damBreak case. I'm also commenting out the lines in the setup files whereever Ubar is specified.

Any help getting me set up with this simple case would be very appreciated!

The error I get when I hit ./Allrun is:

Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0 

Reading field p

Reading field U

Reading/calculating face flux field phi 

[0] 
[0] 
[0] --> FOAM FATAL IO ERROR: 
[0] Illegal master cellID 1001. Should be 0..80
[0] 
[0] file: /home/andrew/workspace/foam/straightTube/system/fvSolution.PIMPLE from line 60 to line 64. 
[0] 
[0]     From function void Foam::setRefCell
(
    const volScalarField&,
    const volScalarField&,
    const dictionary&,
    label& scalar&,
    bool
)
[0]     in file cfdTools/general/findRefCell/findRefCell.C at line 66. 
[0] 
FOAM parallel run exiting
[0] 
--------------------------------------------------------------------------
everyday is offline   Reply With Quote

Old   October 2, 2014, 02:01
Default Try reading the error message why don't you...
  #2
New Member
 
Andrew Ho
Join Date: Jan 2014
Posts: 6
Rep Power: 12
everyday is on a distinguished road
So I took a closer look at the error message, and the answer was obviously inside the fvSolution file, where the pressure reference cell for pimple was set incorrectly.

Anyways, I am now having success in running the very simple flow in this geometry so long as I am using the pressureGradientExplicitSource and specifying a Ubar. Is there a way to specify explicitly what the pressure gradient is? It seems like a much simpler task than finding the pressure gradient for some Ubar, but I can't seem to find any documentation on the available options for momentumSource. Is there anything like "constantAccelerationSource" ?

I found some old forum posts referring to a "channelFoam" tutorial, but I'm guessing that's depracated now and that channel395 is the only one. Any help would still be very much appreciated!
everyday is offline   Reply With Quote

Old   October 2, 2014, 12:03
Default
  #3
New Member
 
Andrew Ho
Join Date: Jan 2014
Posts: 6
Rep Power: 12
everyday is on a distinguished road
So I am plugging away again, trying to decipher the doxygen (which isn't fully compiling for some reason) and discovered that there is a momentumSource called "vectorExplicitSetValue" which is an explicit typed class of "explicitSetValue". However, there is no documentation on what the options are for explicitSetValueCoeffs or vectorExplicitSetValueCoeffs. Is there a better documentation or example set for this? The most I could find was one older post asking for help, where no one answered him. I hope that isn't what happens to this thread...

Here was his post:
Code:
momentumSource {
     type            vectorExplicitSetValue;
     active          on;            //on/off switch
     selectionMode   all;       //cellSet // points //cellZone
      vectorExplicitSetValueCoeffs     {
         injectionRate         {
             F    ( 0.1335 0 0 );
         }
     }
 }
I'm going to try this out and see if it works, and also wrestle with the doxygen generator. But in the meantime, I would STILL very much appreciate some help, or at least some acknowledgement that I'm alive....
everyday is offline   Reply With Quote

Old   October 2, 2014, 14:09
Default
  #4
New Member
 
Andrew Ho
Join Date: Jan 2014
Posts: 6
Rep Power: 12
everyday is on a distinguished road
So I did manage to get this working now, using the "semiImplicitSource" instead of the "vectorExplicitSetValue". From my prodding around, it seems that "vectorExplicitSetValue", used as above but with "U" instead of "F", directly sets the value of velocity at each time step, which is not what I want.

However, the semiImplicitSource seems to add a source term at each time step, which is precisely how I can treat my simulation. The only thing I don't understand now is the difference between "absolute" and "specific" in the options. I only know that for this simple case, using "absolute" gives a result about 10x bigger than expected, but "specific" gives the expected result.

Here is my fvOptions for any future foamers (myself included):

Code:
momentumSource
{
   type vectorSemiImplicitSource;
   active on;
   selectionMode all;

   vectorSemiImplicitSourceCoeffs
   {
      //volumeMode      absolute; // specific
      volumeMode        specific;
      injectionRateSuSp
      {
         U           ( (1 0 0) 0);
      }
   }

}
everyday is offline   Reply With Quote

Reply

Tags
channel395, cyclic, periodic


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
HLL Riemann Shock Tube Matlab Problem Luke F Main CFD Forum 2 May 20, 2016 03:10
[ANSYS Meshing] Problem in Meshing a tube in tube Helical HX Maradona ANSYS Meshing & Geometry 0 August 4, 2014 08:50
Problem using FVM, SIMPLE algorithm Elay Main CFD Forum 0 July 3, 2014 17:39
FSI analysis-Turn a straight tube to constricted tube ashtonJ CFX 4 March 14, 2014 03:17
? Simple CFD problem Davy Main CFD Forum 0 August 21, 1998 07:19


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