# big question

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

 March 12, 2012, 04:41 big question #1 Senior Member   Safia Join Date: Oct 2010 Location: Australia Posts: 161 Rep Power: 14 Hi all,, I'm using the below solution of bouyancy pressure B.C. in gas cases #763576 - I have a problem involving buoyant flow of an ideal gas under atmospheric conditions so that the height at a pressure boundary varies over a significant distance. When I set the pressure at the boundary, how can I specify it so that I don't see any spurious flows due to an inconsistent specification of the opening pressure? Family:CFXProduct:CFX-SolverVersion:11.0Area:GeneralSubarea:N/AAnswer: Specifying the pressure at a boundary for a buoyant problem where the height in the gravity potential field varies significantly requires care, particularly for an ideal gas. For an ideal gas, the pressure and density are related via the expression for the change in the hydrostatic pressure with height: dP/dy = -rho*g (assuming that the height variable is y and that gravity acts in the -y direction). It may be simplest to set the reference pressure for the domain to 0 and set the buoyancy reference density to zero as well. For an ideal gas, the density is given by PM/RT. Eliminating pressure using the ideal gas law and integrating for isothermal flow from some reference height L where the pressure is Pref and the density is rhoL gives: rho = rhoL*exp(Mg*(L-y)/R/T) and: P = Pref*exp(Mg*(L-y)/R/T) The conditions for this type of a pressure boundary should be set up so that the conditions of the dependent variables approach that of the known ambient fluid. A sample definition file for flow in a large 2D square box, with a height/width dimension of 300 m is attached. The fluid is set to be Air Ideal Gas. The pressure at the top of the box (y = L = 300 m) is set at 1 atm. The domain reference pressure is set to 0 and the buoyancy reference density to 0 as well. Gravity acts in the ży direction. At the outlet opening, the pressure is set to: P = rho*RT/M = rhoL*RT/M*exp(mg*(L-y)/R/T) = (1.0 [atm]*exp(M*g(L-y)/R/T) The temperature in this simulation is constant at 300 K. For an inlet velocity of 1 m/s, the streamlines and static pressure look reasonable. The streamlines go more or less straight across except where there is a disturbance due to flow around an internal wall. The online help suggests setting the buoyancy reference density to the average value prevailing in the domain. When you have a pressure boundary where the height and hydrostatic pressure varies, I would ignore the recommendation from the online help and choosea reference density that simplifies setting the hydrostatic pressure at the pressure boundary. I believe setting the reference density to zero allows one to calculate the pressure and density variation with height in the simplest manner. So can anyone tell me if I want the pressure function in temperature how i can make the excepression. I tried to use T as variable but the cfx give me an error that I divided on zero. How ever, the temperature is greater than zero. is there is any workaround solve the problem? Regards

March 12, 2012, 16:33
#2
Super Moderator

Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,326
Rep Power: 138
Quote:
 I believe setting the reference density to zero allows one to calculate the pressure and density variation with height in the simplest manner.
It might simplify the mathematics but it increases numerical round off errors. I recommend you do the additional maths (it is not that hard) and reduce round off errors.

To answer your question can you attach the output file (including the error message).

March 12, 2012, 19:07
#3
Senior Member

Safia
Join Date: Oct 2010
Location: Australia
Posts: 161
Rep Power: 14
Quote:
 Originally Posted by ghorrocks It might simplify the mathematics but it increases numerical round off errors. I recommend you do the additional maths (it is not that hard) and reduce round off errors. To answer your question can you attach the output file (including the error message).
Here you are
+--------------------------------------------------------------------+
| PROBLEM ENCOUNTERED WHEN EXECUTING CFX EXPRESSION LANGUAGE |
| |
| The CFX expression language was evaluating: |
| Relative Pressure |
| |
| The problem was: |
| DIVIDE-BY-ZERO |
| |
| FURTHER INFORMATION |
| |
| The problem was encountered in executing the expression for: |
| myp |
| The complete expression is: |
| p0*exp((g*(30 [m]-y)) / (287.1[J kg^-1 K^-1]*T )) |
| The error occurs on sub-expression: |
| (g*(30 [m]-y)) / (287.1[J kg^-1 K^-1]*T ) |
| |
| BACKGROUND INFORMATION |
| |
| The error was detected at one location. The same problem may be |
| present at other locations - that has not been investigated. |
| The following values are for the first location which has the |
| problem. |
| |
| These values were set before reaching the current expression: |
| |
| Name = Expression = Value |
| |
| y = \$LOCAL_y = 102.412 |
| p0 = 1 [atm] = 1013.25 |
| g = 9.8066502 [m s^-2] = 980.665 | |
| END OF DIAGNOSTIC OUTPUT FOR CFX EXPRESSION LANGUAGE |
+--------------------------------------------------------------------
By the way, into your thesis in p.62 chapter 3, you wrote an equation to define the pressure at the boundaries in compressible gas by p=ptotal/(1+(game-1)*M^2/2)^(gama/(gama-1))
Do you mean that M is mach no., where you did not mention what is M in pp.xvi,xvii,xviii
At the same time give me the following
Notice: The maximum Mach number is 3.108E+01.
Finally, about the round off error, I know that this error come form ignoring or reduce the number of digit so could you please advise me more in details.
Best Regards

March 12, 2012, 19:32
#4
Senior Member

Safia
Join Date: Oct 2010
Location: Australia
Posts: 161
Rep Power: 14
Quote:
 Originally Posted by ghorrocks It might simplify the mathematics but it increases numerical round off errors. I recommend you do the additional maths (it is not that hard) and reduce round off errors. To answer your question can you attach the output file (including the error message).
Now I understand why my convergance so slow due to round off error..
is that right?

 March 12, 2012, 20:36 #5 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,326 Rep Power: 138 Your CEL error should be a straight forward debugging exercise. Somehow it is getting a divide by zero, so you need to find it and fix it. The obvious place to start is to look at what the value of T is. I did not say that your convergence problem was caused by numerical round off. I said that what you have done is bad practice as it increases round off error, and that it CAN cause convergence problems.

March 12, 2012, 21:03
#6
Senior Member

Safia
Join Date: Oct 2010
Location: Australia
Posts: 161
Rep Power: 14
Quote:
 Originally Posted by ghorrocks Your CEL error should be a straight forward debugging exercise. Somehow it is getting a divide by zero, so you need to find it and fix it. The obvious place to start is to look at what the value of T is. I did not say that your convergence problem was caused by numerical round off. I said that what you have done is bad practice as it increases round off error, and that it CAN cause convergence problems.
Hi again,,
what h no is high and I want to use the pressure in your thesis , do you accept that from your point of view in my case?
Regards

March 12, 2012, 21:38
question
#7
Senior Member

Safia
Join Date: Oct 2010
Location: Australia
Posts: 161
Rep Power: 14
What you think its wrong into my expression?
my centreline velocity still increasing even using this techniqe hoevere it should be decreasing until get constant value depending on the height of my domain?
do you think that this error results come from the bad setup into my simulation?
regards
Attached Files
 centreline velocity.doc (34.0 KB, 10 views)

Last edited by happy; March 12, 2012 at 22:08.

 March 12, 2012, 22:36 #8 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,326 Rep Power: 138 Rather than use the equation from my thesis, why not simply use the total pressure option?

March 12, 2012, 23:11
#9
Senior Member

Safia
Join Date: Oct 2010
Location: Australia
Posts: 161
Rep Power: 14
Quote:
 Originally Posted by ghorrocks Rather than use the equation from my thesis, why not simply use the total pressure option?
could you explain more...how? I used the opening pressure at the sides and outlet BCs so there is no option for total pressure?
you want me use outlet with total pressure option?
regards

 March 13, 2012, 00:46 #10 Senior Member   Safia Join Date: Oct 2010 Location: Australia Posts: 161 Rep Power: 14 Any suggestion can help me I always appreciate anyone's comments. Regards

 March 13, 2012, 04:48 #11 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,326 Rep Power: 138 If you know the total pressure at your inlet or outlet then the boundary condition should be specified as total pressure.

March 13, 2012, 22:27
??????????
#12
Senior Member

Safia
Join Date: Oct 2010
Location: Australia
Posts: 161
Rep Power: 14
Quote:
 Originally Posted by ghorrocks If you know the total pressure at your inlet or outlet then the boundary condition should be specified as total pressure.
I used different B.Cs that I think it is correct, but my results did not match the thoery.
I'm working with forced plume which gas 3 diffrent regions.
The third region folor -2/3 law but the results overthere has big diffrent?/.

 March 13, 2012, 22:41 #13 Member   DB Join Date: Apr 2011 Posts: 87 Rep Power: 13 Hi, You said that you have set Reference Pressure as Zero and Reference Density as zero as well. Since P = rho*R*T, Reference Temperature also goes to zero Kelvin, I am not sure but that might be cause of error. -D.B __________________ -D.B

March 14, 2012, 23:06
#14
Senior Member

Safia
Join Date: Oct 2010
Location: Australia
Posts: 161
Rep Power: 14
Quote:
 Originally Posted by D.B Hi, You said that you have set Reference Pressure as Zero and Reference Density as zero as well. Since P = rho*R*T, Reference Temperature also goes to zero Kelvin, I am not sure but that might be cause of error. -D.B
you are right.However, I have in my results temperature profile into my plume. honestly, the general behav of my results is okay, but the devaition is too large.

Any comment will be appraiciated.
Best Regards

March 14, 2012, 23:11
#15
Senior Member

Safia
Join Date: Oct 2010
Location: Australia
Posts: 161
Rep Power: 14
Quote:
 Originally Posted by D.B Hi, You said that you have set Reference Pressure as Zero and Reference Density as zero as well. Since P = rho*R*T, Reference Temperature also goes to zero Kelvin, I am not sure but that might be cause of error. -D.B
In my case I did not work with Boussinsq approximation but I solve N-S equation directly. That what I thought.

any commen will be valuable.

 March 14, 2012, 23:14 #16 Senior Member   Safia Join Date: Oct 2010 Location: Australia Posts: 161 Rep Power: 14 at the same time, there is refernce temperature for my fluid (air) which can be set up through the material properties. if I'm wrong please advise me more. Regards