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

simpleFoam for laminar pipe parabolic flow

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 15, 2012, 11:48
Default simpleFoam for laminar pipe parabolic flow
  #1
Senior Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 131
Rep Power: 15
Goutam is on a distinguished road
Dear All,

I am trying to add parabolic flow at the inlet. The p and U files are given below. I am not getting satisfactory results. Can anyone tell me where is the problem.

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet
{
type fixedValue;
value uniform 0;
}
outlet
{
type zeroGradient;
}
Walls
{
type zeroGradient;
}
}

---------------------------

FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
inlet
{
type codedFixedValue;
value $internalField;
redirectType ramp;
code
#{
scalar U_0=0.001934;
scalar r=0.02595;
fixedValueFvPatchVectorField myPatch(*this);
forAll(this->patch().Cf(),i)
{
myPatch[i]=vector(2*U_0*(1-Foam:ow(this->patch().Cf()[i].x(),2)/pow(r,2)),0,0);
}
operator==(myPatch);
#};
}
outlet
{
type zeroGradient;

}
Walls
{
type fixedValue;
value uniform (0 0 0);
}
}
Goutam is offline   Reply With Quote

Old   April 24, 2012, 19:38
Default
  #2
New Member
 
kallone
Join Date: Apr 2012
Posts: 1
Rep Power: 0
kallone is on a distinguished road
Hi Goutam,

I am also modeling laminar 3D pipe flow. I've found that a poor quality mesh can lead to results that do not match the analytical solution. You may want to try refining your mesh and see if that helps. Also I would suggest switching your inlet and outlet pressure BCs.
kallone is offline   Reply With Quote

Old   April 25, 2012, 08:08
Default
  #3
Senior Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 131
Rep Power: 15
Goutam is on a distinguished road
Dear Kallone,

I have checked my mesh and its fine. Since, I am using parabolic BC at the inlet, so I am expecting the same pattern throughout the length and constant centerline velocity profile. I am not getting this at all. I didn't find the problem. Did you get the correct result ???

Thanks.

Goutam

Last edited by Goutam; April 25, 2012 at 10:02.
Goutam is offline   Reply With Quote

Old   April 25, 2012, 10:02
Default
  #4
Senior Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 131
Rep Power: 15
Goutam is on a distinguished road
I am using simpleFoam solver. Please see the attached file. I attached all the files that is necessary to run the problem.

Thanks

Goutam
Attached Files
File Type: zip gspipe.zip (6.6 KB, 43 views)
Goutam is offline   Reply With Quote

Old   April 25, 2012, 10:08
Default
  #5
New Member
 
April
Join Date: Jul 2011
Location: Ann Arbor, MI
Posts: 7
Rep Power: 15
april0100 is on a distinguished road
Hi Goutam,

I am using a constant velocity profile at the inlet but obtain correct results for this scenario using SimpleFoam.

Have you tried switching the pressure BCs? That is, specify p = 0 at the outlet and zero gradient at the inlet. You cannot fix both the velocity and the pressure at the inlet at the same time.
april0100 is offline   Reply With Quote

Old   April 25, 2012, 10:16
Default
  #6
Senior Member
 
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 131
Rep Power: 15
Goutam is on a distinguished road
hi april

I have used a constant velocity at the inlet and I also got the correct results using simpleFoam. I will change the pressure Bcs and hope it will work !!!
Goutam 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
Problems with simpleFoam with flow in pipe fsalvucci OpenFOAM 6 April 17, 2012 09:31
simpleFoam Blows up with Parabolic Inlet Pipe Flow swahono OpenFOAM 0 December 6, 2010 20:37
Turbulence intensity in fully devloped pipe flow - Reference Shocktrain Main CFD Forum 0 October 14, 2010 07:58
About Turbulence Intensity (Pipe flow assimilated) gRomK13 Main CFD Forum 1 July 10, 2009 04:11
Turbulence in a pipe flow JM Main CFD Forum 4 December 21, 2006 05:04


All times are GMT -4. The time now is 21:31.