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

Turbulent flow through a pipe with variable inlet velocity

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   March 26, 2012, 06:22
Default Turbulent flow through a pipe with variable inlet velocity
  #1
New Member
 
Oluwalogbon Akinnola
Join Date: Mar 2012
Posts: 23
Rep Power: 5
lobstar is on a distinguished road
Hi everyone,

I am a new user of OpenFoam and I'm taking my time to get to grips with it. I am trying to run a simulation of a flow through a pipe where the inlet and outlet pressures are known and the velocities are calculated from them. However I am having trouble with the boundary conditions. I have tried using the pressureInletVelocity bc and the pressureInletOutletVelocity bc in case of back flow but both return a floating point exception error. Can anyone provide any guidance on how to set up the case to get a result. I have tried the case with with a zeroGradient inlet pressure and an arbitrary inlet velocity (10m/s) and it was produced an answer so I don't think the problem is with the other bcs but as I said I'm new to this. Also the mesh was imported from gambit. Not sure if this bears any relevance but thought I'd mention it.

Thanks for any help guys.
lobstar is offline   Reply With Quote

Old   March 27, 2012, 05:56
Default
  #2
New Member
 
Oluwalogbon Akinnola
Join Date: Mar 2012
Posts: 23
Rep Power: 5
lobstar is on a distinguished road
I have just seen someone with the same issue get a response this morning. Issue appears to be because there is nothing creating movement in the system, need to use a fixed pressure gradient if you want velocity to be calculated. Just in case anyone looks at my post and has the same problem.
lobstar is offline   Reply With Quote

Old   March 27, 2012, 08:18
Default
  #3
New Member
 
Oluwalogbon Akinnola
Join Date: Mar 2012
Posts: 23
Rep Power: 5
lobstar is on a distinguished road
This has not worked. If anyone can suggest other solutions would be greatly appreciated!
lobstar is offline   Reply With Quote

Old   March 28, 2012, 01:58
Default
  #4
kid
Senior Member
 
cfdkid
Join Date: Mar 2009
Posts: 133
Rep Power: 8
kid is on a distinguished road
Hi Lobstar,
The floating point error generally and most of the time , is thrown because of
some formulation error in boundary condition files.

Note 1: In your case you said pressure is known at both inlet and outlet. Please check , have you used, type fixedValue and given scalar value. This has to be done in 0/p file.
And Value both at inlet and outlet patch should be the known value you mentioned.

Also for U file. Use zeroGradient type with no value, both for inlet and outlet.

Note 2: Also pasting contents of both p and U file would help us, if the above does not
remove your error.

Regards,
CFDkid

Last edited by kid; March 28, 2012 at 01:59. Reason: just2
kid is offline   Reply With Quote

Old   March 28, 2012, 04:40
Default
  #5
New Member
 
Oluwalogbon Akinnola
Join Date: Mar 2012
Posts: 23
Rep Power: 5
lobstar is on a distinguished road
Thank you for the advice CFDkid. Unfortunately it hasn't worked. I had used fixed value for the pressure bcs with scalar values given. I also tried using zeroGradient for the velocity bcs but still no luck. I apologise for not pasting the bcs before, I'm new to the forum as well as Openfoam and still learning the etiquette. Please find my original 0/p and 0/U files pasted below. I realise I also haven't fully described the simulation. I'm using simpleFoam with the k-epsilon turbulent model to simulate flow going from a wide pipe into a thinner pipe and out of it. Thanks again for your help.

0/U
boundaryField
{
wall
{
type fixedValue;
value uniform (0 0 0);
}

inlet
{
type pressureInletUniformVelocity;
value uniform (0 0 0);

}

outlet
{
type pressureInletOutletVelocity;
value uniform (0 0 0);



0/p
boundaryField
{
wall
{
type zeroGradient;

}

inlet
{
type fixedValue;
value uniform 10416.666666667;
}

outlet
{
type fixedValue;
value uniform 520.83333333333;
}
lobstar is offline   Reply With Quote

Old   March 28, 2012, 05:02
Default
  #6
kid
Senior Member
 
cfdkid
Join Date: Mar 2009
Posts: 133
Rep Power: 8
kid is on a distinguished road
Modified U

0/U
boundaryField
{
wall
{
type fixedValue;
value uniform (0 0 0);
}

inlet
{
type zeroGradient;
}

outlet
{
type fixedValue;
value uniform (0 0 0);


modified p

boundaryField
{
wall
{
type zeroGradient;

}

inlet
{
type fixedValue;
value uniform 10416.666666667;
}

outlet
{
type zeroGradient;
}

Try this set up. It should work, there was an error in my previous reply.
Also if this set up does not work try the below set up.

0/U
boundaryField
{
wall
{
type fixedValue;
value uniform (0 0 0);
}

outlet
{
type zeroGradient;
}

intlet
{
type fixedValue;
value uniform (0 0 0);


modified p

boundaryField
{
wall
{
type zeroGradient;

}

outlet
{
type fixedValue;
value uniform 520.83333333333;;
}

inlet
{
type zeroGradient;
}

Hope it helps.

Regards,
CFDkid
kid is offline   Reply With Quote

Old   March 28, 2012, 05:56
Default
  #7
New Member
 
Oluwalogbon Akinnola
Join Date: Mar 2012
Posts: 23
Rep Power: 5
lobstar is on a distinguished road
Thanks CFDkid! your second suggestion seems to be working fine (no error just yet). I wanted to ask if you know why my set up wasn't working? In your suggestion only one pressure bc is known. Could you (or anyone) make any suggestions on how to simulate a certain pressure drop with an incompressible flow? Thanks again, i really appreciate the quick replies!
lobstar is offline   Reply With Quote

Old   March 28, 2012, 06:10
Default
  #8
kid
Senior Member
 
cfdkid
Join Date: Mar 2009
Posts: 133
Rep Power: 8
kid is on a distinguished road
Good.
I hope some senior member could comment better on later explanation. OpenFOAM expects us to provide any gradient to start the solution, once the flow is developed or converged, the final result should give us other missing values ( in this case).

Regards,
CFDkid
kid is offline   Reply With Quote

Old   March 28, 2012, 11:15
Default
  #9
New Member
 
Oluwalogbon Akinnola
Join Date: Mar 2012
Posts: 23
Rep Power: 5
lobstar is on a distinguished road
Ok, I think I have a better understanding of what is expected now. Thanks kid I'll continue to fiddle around and see what I can conjure up. I would really appreciate it if anyone who has a working example of a flow using the pressureInletVelocity boundary condition could share their set up, it'd really help!

Last edited by lobstar; March 29, 2012 at 11:18.
lobstar is offline   Reply With Quote

Reply

Tags
pressure inlet, turbulent, variable velocity

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Steady pipe flow mean velocity higher than inlet velocity anita OpenFOAM Running, Solving & CFD 7 September 25, 2012 05:35
Disturbed flow field at outlet boundary (Multiphase flow through pipe) Michiel CFX 17 April 21, 2010 10:14
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 15:45
Mass Flow Inlet with Velocity specification bernarde STAR-CCM+ 1 December 4, 2009 00:13
velocity or mass flow inlet? Silvia FLUENT 1 August 12, 2005 13:55


All times are GMT -4. The time now is 11:34.