CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   STAR-CCM+ (https://www.cfd-online.com/Forums/star-ccm/)
-   -   Boundary conditions when gravity is enabled (https://www.cfd-online.com/Forums/star-ccm/190863-boundary-conditions-when-gravity-enabled.html)

Cobra July 24, 2017 15:38

Boundary conditions when gravity is enabled
 
2 Attachment(s)
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.

ping August 13, 2017 00:14

see the good steve article on doing the properly

devesh.baghel August 14, 2017 03:45

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

ping August 15, 2017 06:44

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

devesh.baghel August 18, 2017 21:37

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

ping August 19, 2017 02:28

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))

Cobra August 21, 2017 14:44

1 Attachment(s)
Quote:

Originally Posted by ping (Post 661218)
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.

devesh.baghel August 21, 2017 19:30

Can you please post temperature contour as well

Sent from my Redmi 3S using CFD Online Forum mobile app

ping August 22, 2017 00:56

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

Cobra August 25, 2017 07:56

Quote:

Originally Posted by ping (Post 661465)
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?

devesh.baghel August 25, 2017 08:28

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

Cobra August 25, 2017 11:36

3 Attachment(s)
The cylinder is an adiabatic wall, so there's no heat exchange involved.
Attached there are the three fields.

mparsani January 13, 2020 07:38

Link to steve article
 
Dear All,


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


Thank you in advance.


Best Regards,


All times are GMT -4. The time now is 00:03.