CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

Boundary conditions when gravity is enabled

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 24, 2017, 15:38
Default Boundary conditions when gravity is enabled
  #1
New Member
 
Nicholas
Join Date: Nov 2015
Location: Modena, Italy
Posts: 20
Rep Power: 10
Cobra is on a distinguished road
The problem I wanted to solve in the first place was one of natural convection in open air, but I found it very hard to model the boundary conditions when gravity is enabled.
I then tried a very simple test case to find the proper BCs, but the results that I obtain are definitely wrong.
This is my setup:

- the geometry is 2D, a cross section of an horizontal cylinder, 2 cm in diameter

- the outer atmospheric boundary is represented by a circumference surrounding the cylinder, 10 cm in diameter (following the Star guidelines, which suggest a domain 3-5 times wider then the object for natural convection cases in open air)

- the atmospheric boundary is a Pressure Outlet, with 300 K as Temperature, and the following Field Function for pressure: -1.18*9.81*$$Position[1]

- the inner cylinder surface is an adiabatic wall

- the 0 Y position is in the middle of of the cylinder (and thus in the middle of the domain too, since they're concentric)

- the reference altitude is 0

- the flow is Laminar

- the reference pressure is 101325 Pa

- the models I tried are the followings

1) Ideal Gas

- the reference Density is 1.18 kg/m^3

2) Boussinesq

- the Density is 1.18 kg/m^3

- the reference Temperature is 300 K

- the thermal expansion coefficient is 0.003/K

What I'm expecting to obtain is an almost zero vector field everywhere in may domain, but with both the models I obtain a flow toward the top of my domain, with top speeds of around 1.5 m/s. The flow is clearly driven by the wrongly defined pressure boundary condition at the atmospheric opening.

I don't know what could I change. Can anyone help?

Attached is the mesh and the vector field.
Attached Images
File Type: jpg MeshCyl.jpg (72.7 KB, 49 views)
File Type: jpg VectorField.jpg (85.0 KB, 65 views)
Cobra is offline   Reply With Quote

Old   August 13, 2017, 00:14
Default
  #2
Senior Member
 
Ping
Join Date: Mar 2009
Posts: 556
Rep Power: 20
ping is on a distinguished road
see the good steve article on doing the properly
ping is offline   Reply With Quote

Old   August 14, 2017, 03:45
Default
  #3
Member
 
Devesh Baghel
Join Date: Mar 2009
Posts: 84
Rep Power: 17
devesh.baghel is on a distinguished road
Hi,
About pressure boundary.... Is it really needs to define field function with rho*gravity*height, even if so, magnitude will be negligible when compared with reference pressure. You can simply define pressure outlet on outer most wall with 0 value.... Since reference pressure is already defined as 101325 Pa.
What BC defined to cylinder wall, Temperature or heat flux?

Sent from my Redmi 3S using CFD Online Forum mobile app
devesh.baghel is offline   Reply With Quote

Old   August 15, 2017, 06:44
Default
  #4
Senior Member
 
Ping
Join Date: Mar 2009
Posts: 556
Rep Power: 20
ping is on a distinguished road
this is not correct since the change in height creates very small pressure variations say fractions of a pascal but this is still enough to drive flow so to ensure zero flow in those vertical boundaries it is essential to apply the correct physics as explained in that steve article
ping is offline   Reply With Quote

Old   August 18, 2017, 21:37
Default
  #5
Member
 
Devesh Baghel
Join Date: Mar 2009
Posts: 84
Rep Power: 17
devesh.baghel is on a distinguished road
Hi,
I think it is temperature driven flow not through pressure gradient.
If I consider total height of cylinder around 10 cm, hydrostatic pressure comes around 0.115 Pa. Practically impact on driving the flow may be low while temperature gradient may have more influence.
Please correct me if I'm wrong at any point.
Thank you

Sent from my Redmi 3S using CFD Online Forum mobile app
devesh.baghel is offline   Reply With Quote

Old   August 19, 2017, 02:28
Default
  #6
Senior Member
 
Ping
Join Date: Mar 2009
Posts: 556
Rep Power: 20
ping is on a distinguished road
as explained above it is complex and explained in the great steve article called

what is the cause of unphysical results, specifically pressure and velocity, in an ideal gas simulation with gravity on and pressure boundary specification?

please read this and among other things you will encounter this formula

pressure = Pref (exp(g*(z-z0)/(RT))-1-g*(z-z0)/(RTref))
ping is offline   Reply With Quote

Old   August 21, 2017, 14:44
Default
  #7
New Member
 
Nicholas
Join Date: Nov 2015
Location: Modena, Italy
Posts: 20
Rep Power: 10
Cobra is on a distinguished road
Quote:
Originally Posted by ping View Post
as explained above it is complex and explained in the great steve article called

what is the cause of unphysical results, specifically pressure and velocity, in an ideal gas simulation with gravity on and pressure boundary specification?

please read this and among other things you will encounter this formula

pressure = Pref (exp(g*(z-z0)/(RT))-1-g*(z-z0)/(RTref))

I tried to to implement the pressure BC as suggested, but I still get unphysical results, that is a pressure driven flux toward the sides of the domain.

The pressure on the boundaries was defined as:

101235*(exp(-9.81*$$Position[1]/(28.9664*8.314472*0.001*300))-1+9.81*$$Position[1]/(28.9664*8.314472*0.001*300))

where the term 28.9664*8.314472*0.001 represents the value of R for the gas considered.

The reference density was set to 1 kg/m^3, the molecular weight to 28.9664 g/mol, the reference altitude to 0, the reference pressure to 101235 Pa, the reference temperature to 300 K.

Attached you find a picture of the vector field.
Attached Images
File Type: jpg img21.8.jpg (134.1 KB, 36 views)
Cobra is offline   Reply With Quote

Old   August 21, 2017, 19:30
Default
  #8
Member
 
Devesh Baghel
Join Date: Mar 2009
Posts: 84
Rep Power: 17
devesh.baghel is on a distinguished road
Can you please post temperature contour as well

Sent from my Redmi 3S using CFD Online Forum mobile app
devesh.baghel is offline   Reply With Quote

Old   August 22, 2017, 00:56
Default
  #9
Senior Member
 
Ping
Join Date: Mar 2009
Posts: 556
Rep Power: 20
ping is on a distinguished road
you have at least two mistakes in your equation being g is not a negative number and R for air is around 287 not .24 as your numbers resolve to
and i would be more exact with the reference density and its location if you want good results

there are several articles on the steve support portal covering this general issue

if you want to understand why this equation is required for your initial pressure field and the pressure boundaries then read this https://en.wikipedia.org/wiki/Vertic...sure_variation
ping is offline   Reply With Quote

Old   August 25, 2017, 07:56
Default
  #10
New Member
 
Nicholas
Join Date: Nov 2015
Location: Modena, Italy
Posts: 20
Rep Power: 10
Cobra is on a distinguished road
Quote:
Originally Posted by ping View Post
you have at least two mistakes in your equation being g is not a negative number and R for air is around 287 not .24 as your numbers resolve to
and i would be more exact with the reference density and its location if you want good results

there are several articles on the steve support portal covering this general issue

if you want to understand why this equation is required for your initial pressure field and the pressure boundaries then read this https://en.wikipedia.org/wiki/Vertic...sure_variation
I corrected the two mistakes that you kindly pointed out, and my definition of pressure at the boundary is now:

101235*(exp(+9.81*$$Position[1]/(286.9*300))-1-9.81*$$Position[1]/(286.9*300))

while the the reference density is 1.177 (calculated from the state equation with p=101325 Pa, T=300 K, R=286.9).

I still obtain some pressure driven flux toward the top of my domain, but the max speed value is around 0.04 m/s, much smaller than with the previous simulations.

Is this level of error good enough or does it mean that I'm still doing some mistakes?
Cobra is offline   Reply With Quote

Old   August 25, 2017, 08:28
Default
  #11
Member
 
Devesh Baghel
Join Date: Mar 2009
Posts: 84
Rep Power: 17
devesh.baghel is on a distinguished road
Hi Cobra,
What boundary condition you are using at cylinder surface ?
Can you please post contour plot of pressure, velocity and temperature as well ?

Sent from my Redmi 3S using CFD Online Forum mobile app
devesh.baghel is offline   Reply With Quote

Old   August 25, 2017, 11:36
Default
  #12
New Member
 
Nicholas
Join Date: Nov 2015
Location: Modena, Italy
Posts: 20
Rep Power: 10
Cobra is on a distinguished road
The cylinder is an adiabatic wall, so there's no heat exchange involved.
Attached there are the three fields.
Attached Images
File Type: jpg Pressure_Field.jpg (45.7 KB, 30 views)
File Type: jpg Temperature_Field.jpg (44.1 KB, 29 views)
File Type: jpg Vector_Field.jpg (88.7 KB, 30 views)
Cobra is offline   Reply With Quote

Old   January 13, 2020, 07:38
Default Link to steve article
  #13
New Member
 
Join Date: Aug 2013
Location: USA
Posts: 3
Rep Power: 12
mparsani is on a distinguished road
Dear All,


could you please point me to what you call the "great steve article"?


Thank you in advance.


Best Regards,
mparsani is offline   Reply With Quote

Reply

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
3D Windturbine simulation in SU2 k.vimalakanthan SU2 15 October 12, 2023 05:53
Wrong multiphase flow at rotating interface Sanyo CFX 14 February 7, 2017 17:19
Domain Imbalance HMR CFX 5 October 10, 2016 05:57
Error - Solar absorber - Solar Thermal Radiation MichaelK CFX 12 September 1, 2016 05:15
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00


All times are GMT -4. The time now is 02:23.