CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Ideal gas problem (https://www.cfd-online.com/Forums/cfx/131617-ideal-gas-problem.html)

Atze March 18, 2014 06:32

Ideal gas problem
 
Hi all.

I've a problem in simulating a Buoyant Ideal gas inside a closed domain.
Here is the problem.

If I use Air Ideal Gas I obtain a constant absolute pressure field, with a variable density and velocity field

If I use a constant density gas I obtain a Isochoric compression with no buoyancy.

How can I simulate a buoyant gas AND an increase in internal pressure due to temperature increase? Have I to use real gas model?

Thank you

ghorrocks March 18, 2014 16:49

Ideal gas will have a hydrostatic pressure gradient. You do not need real gas for this. Have a look in the documentation about hydrostatic pressure - the pressure variable has the hydrostatic component removed in buoyant simulations. But the absolute pressure should include the hydrostatic component.

Atze March 19, 2014 02:05

Hi Glenn,

I've seen you were also answering me on another post http://www.cfd-online.com/Forums/cfx...ed-cavity.html

My problem is exactly the same (same tutorial), but in a steady state simulation. I use ideal gas but the average absolute pressure inside my domain is always 101325 Pa which is the reference pressure I set.

I tried to set Pressure level information but It give me error

STDOUT:

Fatal bounds error detected
---------------------------
Variable: Absolute Pressure

so probably I set something wrong

ghorrocks March 19, 2014 05:52

You will have problems running a closed domain with an incompressible fluid. You will get out of bounds errors on pressure...... Which is what you are getting :)

You have to either make the fluid compressible or put a pressure boundary in it to define the pressure.

Atze March 19, 2014 06:02

Hi,

My fluid is compressible. Is Air ideal gas. I only get this error if I set pressure level information at 101350 Pa like the reference pressure inside my fluid_domain tab.

I can't insert a pressure boundary condition since my problem is a closed box ( like the tutorial )

ghorrocks March 19, 2014 06:10

Can you post an image of what you are modelling and your CCL?

Atze March 19, 2014 06:46

I have just dowloaded the ansys tutorial "buoyant flow in a partitioned cavity". Than I have switched AIR at 25°C (incompressible gas used in tutorial) with AIR IDEAL GAS and set the reference density for buoyancy as " volumeAve(Density)@Buoyancy2D"

Here I post the results for STEADY STATE and UNSTEADY STATE simulation. As you can see the pressure ( relative pressure ) is almost 11000 Pa in the unsteady simulation ( in agreement with a isochoric transformation for a ideal gas ). For the Steady simulation is almost 0 Pa

Setting are exactly the same

Domain Name : Buoyancy2D
+--------------------------------------------------------------------+
| Variable Name | min | max |
+--------------------------------------------------------------------+
| Density | 1.01E+00 | 1.27E+00 |
| Specific Heat Capacity at Constant Pressure| 1.00E+03 | 1.00E+03 |
| Dynamic Viscosity | 1.83E-05 | 1.83E-05 |
| Thermal Conductivity | 2.61E-02 | 2.61E-02 |
| Isothermal Compressibility | 9.87E-06 | 9.87E-06 |
| Static Entropy | -6.97E+01 | 1.56E+02 |
| Velocity u | -1.05E-06 | 1.09E-06 |
| Velocity v | -1.11E-06 | 1.06E-06 |
| Velocity w | 0.00E+00 | 0.00E+00 |
| Pressure | -4.35E-05 | 6.60E-05 |
| Temperature | 2.78E+02 | 3.48E+02 |
| Static Enthalpy | -2.01E+04 | 5.02E+04 |
+--------------------------------------------------------------------+
Domain Name : Buoyancy2D
+--------------------------------------------------------------------+
| Variable Name | min | max |
+--------------------------------------------------------------------+
| Density | 1.13E+00 | 1.42E+00 |
| Specific Heat Capacity at Constant Pressure| 1.00E+03 | 1.00E+03 |
| Dynamic Viscosity | 1.83E-05 | 1.83E-05 |
| Thermal Conductivity | 2.61E-02 | 2.61E-02 |
| Isothermal Compressibility | 8.85E-06 | 8.85E-06 |
| Static Entropy | -1.01E+02 | 1.24E+02 |
| Velocity u | -1.17E-06 | 1.22E-06 |
| Velocity v | -1.24E-06 | 1.18E-06 |
| Velocity w | 0.00E+00 | 0.00E+00 |
| Pressure | 1.17E+04 | 1.17E+04 |
| Temperature | 2.78E+02 | 3.48E+02 |
| Static Enthalpy | -2.01E+04 | 5.02E+04 |
+--------------------------------------------------------------------+

ghorrocks March 19, 2014 16:34

You should set the reference density to a constant value. I am not sure what CFX does if you set it to a potentially varying number like you have. It could do unexpected things.

Atze March 20, 2014 03:14

Hi,

I asked to Ansys support service. They said It's a bug of the software. Basically to solve this situation they told me to insert a temperature variable " presure level information ", according to perfect law gas.

Hope this can help other people with same problem.

Thanks Glenn for you kindness

ghorrocks March 20, 2014 05:13

Sure, but still give it a constant value, not a function of the field variables. The whole point of a reference value is it is constant. If it changes it is not much of a reference.

Antanas March 20, 2014 05:22

Quote:

Originally Posted by Atze (Post 481023)
Hi,

I asked to Ansys support service. They said It's a bug of the software. Basically to solve this situation they told me to insert a temperature variable " presure level information ", according to perfect law gas.

Hope this can help other people with same problem.

Thanks Glenn for you kindness

What does it means: temperature variable " presure level information "? p = p(T) = Rho * R * T?

Atze March 20, 2014 05:46

In solver control, under " pressure level informations " you have to write

P = P0/T0 * T , where P0,T0 are reference values for your gas and T is the mean temperature in your domain

ghorrocks March 20, 2014 15:56

Yes, but mean temperature at the initial condition (or some other condition) to return a constant value. Do not make it a function of the average temperature at that moment in time because then it is not constant.


All times are GMT -4. The time now is 01:40.