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

Boundary condition setting for adding gravity in simpleFoam

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 8, 2013, 07:51
Unhappy Boundary condition setting for adding gravity in simpleFoam
  #1
New Member
 
Bin Xu
Join Date: Apr 2012
Location: Singapore
Posts: 23
Rep Power: 12
norkistar is on a distinguished road
Hi Foamers,

I am just starting simulation water flow in a horizontal circular pipe. Without adding gravity, it works well. With adding gravity, it can't converge. The result diverse and become unbelievable. I think problem might due to the boundary condition setting for p. I will list the step that I did for adding the gravity. Your kindly attention would be much appreciated.

1 I add g in the createFields.H as follows
Info<< "Reading g\n" << endl;
uniformDimensionedVectorField g
(
IOobject
(
"g",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);

2 I make change to UEqn.H
eqnResidual = solve
(
UEqn() == -fvc::grad(p)+g
).initialResidual();

3 I make change to pEqn.H
U -= (fvc::grad(p)-g)/AU;

After that, I wmake to make these changes take effect.

In the constant folder, the g file is listed as follow
dimensions [0 1 -2 0 0 0 0];
value ( 0 0 -9.81 );

In the 0 folder, the p is setting as previous simulation which is without gravity
dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type zeroGradient;
}
tubewall
{
type zeroGradient;
}
outlet
{
type fixedValue;
value uniform 0;
}
plane
{
type symmetryPlane;
}
}
norkistar is offline   Reply With Quote

Old   February 14, 2013, 12:59
Default
  #2
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 145
Rep Power: 15
ziemowitzima is on a distinguished road
I would suggest you to look into solvers where gravity is implemented, such as:
multiphase and heat transfer solvers.
ziemowitzima is offline   Reply With Quote

Old   February 15, 2013, 20:06
Default
  #3
New Member
 
Bin Xu
Join Date: Apr 2012
Location: Singapore
Posts: 23
Rep Power: 12
norkistar is on a distinguished road
Thanks for your kind attention. I have looked into the heat transfer solvers and I use buoyantSimpleFoam now it works
norkistar is offline   Reply With Quote

Old   June 15, 2022, 05:20
Default
  #4
Member
 
Mahmoud
Join Date: Nov 2020
Location: United Kingdom
Posts: 37
Rep Power: 4
Mahmoud Abbaszadeh is on a distinguished road
Quote:
Originally Posted by norkistar View Post
Thanks for your kind attention. I have looked into the heat transfer solvers and I use buoyantSimpleFoam now it works


Hi,

Could you please share with us what you have done? Many thanks.
Mahmoud Abbaszadeh is offline   Reply With Quote

Reply

Tags
boundary condition, convergence, gravity, simplefoam

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF setting wall boundary condition with a DEFINE_PROFILE NLao FLUENT 3 September 2, 2019 01:33
setting Boundary condition for additional variable fek66 CFX 2 May 19, 2011 05:44
External Radiation Boundary Condition for Grid Interface CFD XUE FLUENT 0 July 9, 2010 03:53
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 05:05
Warning 097- AB Siemens 6 November 15, 2004 05:41


All times are GMT -4. The time now is 13:57.