CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > CFX

big question

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 12, 2012, 05:41
Red face big question
  #1
Senior Member
 
Safia
Join Date: Oct 2010
Location: Australia
Posts: 161
Rep Power: 6
happy is on a distinguished road
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/A
Answer:

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
happy is offline   Reply With Quote

Old   March 12, 2012, 17:33
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,477
Rep Power: 83
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
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).
ghorrocks is offline   Reply With Quote

Old   March 12, 2012, 20:07
Default Help me , please
  #3
Senior Member
 
Safia
Join Date: Oct 2010
Location: Australia
Posts: 161
Rep Power: 6
happy is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
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
happy is offline   Reply With Quote

Old   March 12, 2012, 20:32
Default
  #4
Senior Member
 
Safia
Join Date: Oct 2010
Location: Australia
Posts: 161
Rep Power: 6
happy is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
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?
happy is offline   Reply With Quote

Old   March 12, 2012, 21:36
Default
  #5
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,477
Rep Power: 83
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
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.
ghorrocks is offline   Reply With Quote

Old   March 12, 2012, 22:03
Default
  #6
Senior Member
 
Safia
Join Date: Oct 2010
Location: Australia
Posts: 161
Rep Power: 6
happy is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
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
happy is offline   Reply With Quote

Old   March 12, 2012, 22:38
Default question
  #7
Senior Member
 
Safia
Join Date: Oct 2010
Location: Australia
Posts: 161
Rep Power: 6
happy is on a distinguished road
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?
see the attachment, please
do you think that this error results come from the bad setup into my simulation?
regards
Attached Files
File Type: doc centreline velocity.doc (34.0 KB, 8 views)

Last edited by happy; March 12, 2012 at 23:08.
happy is offline   Reply With Quote

Old   March 12, 2012, 23:36
Default
  #8
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,477
Rep Power: 83
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
Rather than use the equation from my thesis, why not simply use the total pressure option?
ghorrocks is offline   Reply With Quote

Old   March 13, 2012, 00:11
Default
  #9
Senior Member
 
Safia
Join Date: Oct 2010
Location: Australia
Posts: 161
Rep Power: 6
happy is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
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
happy is offline   Reply With Quote

Old   March 13, 2012, 01:46
Default
  #10
Senior Member
 
Safia
Join Date: Oct 2010
Location: Australia
Posts: 161
Rep Power: 6
happy is on a distinguished road
Any suggestion can help me
I always appreciate anyone's comments.
Regards
happy is offline   Reply With Quote

Old   March 13, 2012, 05:48
Default
  #11
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,477
Rep Power: 83
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
If you know the total pressure at your inlet or outlet then the boundary condition should be specified as total pressure.
ghorrocks is offline   Reply With Quote

Old   March 13, 2012, 23:27
Default ??????????
  #12
Senior Member
 
Safia
Join Date: Oct 2010
Location: Australia
Posts: 161
Rep Power: 6
happy is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
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?/.
happy is offline   Reply With Quote

Old   March 13, 2012, 23:41
Default
  #13
D.B
Member
 
DB
Join Date: Apr 2011
Posts: 60
Rep Power: 6
D.B is on a distinguished road
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
D.B is offline   Reply With Quote

Old   March 15, 2012, 00:06
Default
  #14
Senior Member
 
Safia
Join Date: Oct 2010
Location: Australia
Posts: 161
Rep Power: 6
happy is on a distinguished road
Quote:
Originally Posted by D.B View Post
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
Thanks D.B for your input,,,,,
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
happy is offline   Reply With Quote

Old   March 15, 2012, 00:11
Default
  #15
Senior Member
 
Safia
Join Date: Oct 2010
Location: Australia
Posts: 161
Rep Power: 6
happy is on a distinguished road
Quote:
Originally Posted by D.B View Post
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.
happy is offline   Reply With Quote

Old   March 15, 2012, 00:14
Default
  #16
Senior Member
 
Safia
Join Date: Oct 2010
Location: Australia
Posts: 161
Rep Power: 6
happy is on a distinguished road
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
happy is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question Re Engineering Data Source imnull ANSYS 0 March 5, 2012 14:51
internal field question - PitzDaily Case atareen64 OpenFOAM Running, Solving & CFD 2 January 26, 2011 16:26
Question about Table applicaiton. universez OpenFOAM Running, Solving & CFD 0 January 12, 2010 21:31
question about uds tanven FLUENT 1 October 27, 2009 09:55
Do small boats slow big boats? Richard Scott Main CFD Forum 13 August 3, 2004 03:51


All times are GMT -4. The time now is 12:26.