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

Pressure Driven Flow BC. Please Help!

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 18, 2021, 13:12
Default Pressure Driven Flow BC. Please Help!
  #1
New Member
 
Sung Kwon
Join Date: Oct 2020
Posts: 12
Rep Power: 6
sungmin130 is on a distinguished road
Hi foamers. I am new to openFoam and I am currently trying to illustrate pressure driven flow. The point being is I would like to obtain velocity values based on pressure change between inlet and outlet. I am using simpleFoam solver because I want do it under steady-state, incompressible, laminar flow condition. I have been trying to modify BCs and simulate pressure driven flow but I haven't had any luck. I would really appreciate if someone pointed out what I have done wrong. I attached my boundary condition below. Thank you so much for your time and consideration. Hope I can hear some feedback soon!




dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type fixedValue;
value uniform 102598;
}
outlet
{
type fixedValue;
value uniform 0;
}

wall
{
type zeroGradient;
}
}


dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
inlet
{
type zeroGradient;
}
outlet
{
type zeroGradient;
}
wall
{
type noSlip;
}

}
sungmin130 is offline   Reply With Quote

Old   January 19, 2021, 03:59
Default
  #2
Senior Member
 
Tom-Robin Teschner
Join Date: Dec 2011
Location: Cranfield, UK
Posts: 211
Rep Power: 17
t.teschner is on a distinguished road
Quote:
The point being is I would like to obtain velocity values based on pressure change
And where do you want to get those velocity values? I presume Paraview would be the simplest choice here to extract any information around the velocity.

If you want to sample data directly during your simulation, you may want to put some probes into the flow. Maybe this document will get you started: http://www.wolfdynamics.com/training...g_sampling.pdf
t.teschner is offline   Reply With Quote

Old   January 19, 2021, 10:26
Default
  #3
New Member
 
Sung Kwon
Join Date: Oct 2020
Posts: 12
Rep Power: 6
sungmin130 is on a distinguished road
Quote:
Originally Posted by t.teschner View Post
And where do you want to get those velocity values? I presume Paraview would be the simplest choice here to extract any information around the velocity.

If you want to sample data directly during your simulation, you may want to put some probes into the flow. Maybe this document will get you started: http://www.wolfdynamics.com/training...g_sampling.pdf



Thanks for the information. I just quite dont understand why my BC does not work. I gotta look into it more while I am waiting for other people point out what I did wrong.
sungmin130 is offline   Reply With Quote

Old   January 19, 2021, 11:23
Default
  #4
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 8
shock77 is on a distinguished road
Hi,


I think in your case you need to use the total pressure BC, because otherwise you have an infinit number of possible solutions for problem. I havent run something like that before so the provided informations are without guarantee.
shock77 is offline   Reply With Quote

Old   January 19, 2021, 11:25
Default
  #5
New Member
 
Sung Kwon
Join Date: Oct 2020
Posts: 12
Rep Power: 6
sungmin130 is on a distinguished road
Quote:
Originally Posted by shock77 View Post
Hi,


I think in your case you need to use the total pressure BC, because otherwise you have an infinit number of possible solutions for problem. I havent run something like that before so the provided informations are without guarantee.

Thank you for your reply. How would you change my BC differently then? Thank you in advance
sungmin130 is offline   Reply With Quote

Old   January 19, 2021, 11:33
Default
  #6
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 8
shock77 is on a distinguished road
Depends on your problem and which physical quantities you know in your problem.



Use totalPressure at one end and fixedValue at the other end. For U pressureInletOutletVelocity with totalPressure and zeroGradient with fixed value. I would try that and see whether it works or not.


Look at your p and u fields to see what is the problem, e. g. the velocity increases without convergence.
shock77 is offline   Reply With Quote

Old   January 19, 2021, 11:36
Default
  #7
New Member
 
Sung Kwon
Join Date: Oct 2020
Posts: 12
Rep Power: 6
sungmin130 is on a distinguished road
Quote:
Originally Posted by shock77 View Post
Depends on your problem and which physical quantities you know in your problem.



Use totalPressure at one end and fixedValue at the other end. For U pressureInletOutletVelocity with totalPressure and zeroGradient with fixed value. I would try that and see whether it works or not.


Look at your p and u fields to see what is the problem, e. g. the velocity increases without convergence.

Thanks for the reply again. So, the only thing I know is inlet pressure and outlet pressure. How would you set up the pressureInletOutletVelocity value? Is it just going to be uniform (0,0,0)? The whole point of this simulation is that I would like to see the velocity profile based on pressure change between inlet and outlet.
sungmin130 is offline   Reply With Quote

Old   January 19, 2021, 11:42
Default
  #8
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 8
shock77 is on a distinguished road
The velocity value in pressureInletOutletVelocity is just meant for initialization. You can start with 0 0 0. You should try to initialize your entire field with the velocity you are expecting for faster convergence.
shock77 is offline   Reply With Quote

Old   January 19, 2021, 12:01
Default
  #9
New Member
 
Sung Kwon
Join Date: Oct 2020
Posts: 12
Rep Power: 6
sungmin130 is on a distinguished road
Quote:
Originally Posted by shock77 View Post
The velocity value in pressureInletOutletVelocity is just meant for initialization. You can start with 0 0 0. You should try to initialize your entire field with the velocity you are expecting for faster convergence.

So I changed to what you said and it did not converge unfortunately. I attached my BC below. Your comments and inputs are much appreciated.


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 pressureInletVelocity;
value uniform (0 0 0);
}

outlet
{
type zeroGradient;
}

wall
{
type fixedValue;
value uniform (0 0 0);
}

}




FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type totalPressure;
p0 uniform 102010;
}
outlet
{
type fixedValue;
value uniform 101325;
}

wall
{
type zeroGradient;
}
}
sungmin130 is offline   Reply With Quote

Old   January 19, 2021, 12:46
Default
  #10
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 8
shock77 is on a distinguished road
To more comments on that:


1. Look at the dimensions of your pressure. Its not Pascal for incompressible problems in openfoam. It is called kinematic pressure and calculated as follows: https://www.openfoam.com/documentati...-pressure.html


So I guess 101325 Pa is wrong and you have to calculate the kinematic pressure by using the density.


2. I suppose you are not using a turbulence model. Therefore I would use the slp BC at the wall since you would need a fine grid to resolve the boundary layer.
shock77 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
Pressure driven flow with rhoSimpleFoam Error OpenFOOL OpenFOAM Running, Solving & CFD 2 February 22, 2023 12:41
Pressure driven compressible flow between two gas reservoirs dld OpenFOAM Running, Solving & CFD 1 October 27, 2022 15:45
Simple Box - Gravity with Pressure Outlet - Unrealistic Reverse Flow pyccknn FLUENT 2 December 1, 2021 18:31
fluid flow fundas ram Main CFD Forum 5 June 17, 2000 22:31
Hydrostatic pressure in 2-phase flow modeling (CFX4.2) HB &DS CFX 0 January 9, 2000 14:19


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