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

tank level & float valve kind of simulation - CFX Pre

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 16, 2013, 09:56
Default tank level & float valve kind of simulation - CFX Pre
  #1
Member
 
Sandeep
Join Date: Oct 2012
Location: India
Posts: 51
Rep Power: 14
sandy_1982 is on a distinguished road
hi friends ,

1. I have a tank which is 1100 mm high that has water filled up to 1000 mm; the base of the tank is a circle of 300 mm dia.
2. The tank is open at the top, has an outlet of dia. 50 mm near the bottom, an inlet of 40mm dia. 100 mm from the base (upwards).
3. I have a situation where water is going out at the rate of 0.8kg/s, this results in the fall in level in the tank.
4. When the level as fallen by 50 mm, I want the ‘inlet’ to supply water to the tank at the rate 0.5 kg/s
5. I am writing an expression ‘Inflow’ defined thus:
If(y<950[mm], 0.5[kg/s], 0[kg/s])
6. Here’s the error I get: “mass and momentum being defined as a single valued function can’t be defined in terms of a FIELD VALUED VARIABLE, y” ( I know I can use single valued variable ‘t’ , but level will be more realistic in my actual case)

HOW TO DEFINE THE INLET AS A CONDITIONAL BOUNDARY DEPENDING ON THE LEVEL FALL IN THE TANK?

any ideas on this type of problem ?

thanks
Sandeep
sandy_1982 is offline   Reply With Quote

Old   August 17, 2013, 07:46
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,852
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Your error is that you are not correctly getting the liquid level. An expression like volumeInt(liquid.volume fraction)@domain/cross section area will correctly return the avergae fluid height - assuming the cross section area is constant.
ghorrocks is offline   Reply With Quote

Old   August 17, 2013, 09:51
Default
  #3
Member
 
Sandeep
Join Date: Oct 2012
Location: India
Posts: 51
Rep Power: 14
sandy_1982 is on a distinguished road
hi Glenn ,

i am defining the initial liquid level as : waterVF = if(y<1000[mm],1,0)

whereas the air phase volume fraction is defined in the domain as :
airVF = 1 - waterVF

i am not sure if i understood your point "An expression like volumeInt(liquid.volume fraction)@domain/cross section area will correctly return the avergae fluid height "...............my doubt is about the Inlet BC , as to how to give an Inflow at this boundary when the level falls in the tank

-sandeep
sandy_1982 is offline   Reply With Quote

Old   August 17, 2013, 23:13
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,852
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
The variable y returns the y coordinate of the current node. It does not return the height of the free surface. The function I gave will return the value of the free surface.

Do you want this inlet to be turned on and off by the fluid level (like a control valve)? Or do you know when it is going to turn on and off in advance?
ghorrocks is offline   Reply With Quote

Old   August 18, 2013, 01:20
Default
  #5
Member
 
Sandeep
Join Date: Oct 2012
Location: India
Posts: 51
Rep Power: 14
sandy_1982 is on a distinguished road
yes, i have a control valve (a float valve which regulates it) that opens and closes as per the fluid level in the tank
sandy_1982 is offline   Reply With Quote

Old   August 18, 2013, 07:33
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,852
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
In that case, don't you need a variable using my equation to give the fluid height, then use that with an if statement to turn the inlet on and off?

Another thing - I think you will find this approach numerically unstable and unlikely to converge. Turning inlets on and off instantaneously like this is always bad news.
ghorrocks is offline   Reply With Quote

Old   August 18, 2013, 09:58
Default
  #7
Member
 
Sandeep
Join Date: Oct 2012
Location: India
Posts: 51
Rep Power: 14
sandy_1982 is on a distinguished road
Glenn ..sure , i need to relate fluid level in tank with the inlet BC , the approach i have tried is :

I am writing an expression ‘Inflow’ defined thus:
(when the level falls from 1000 mm to 950 mm)

If(y<950[mm], 0.5[kg/s], 0[kg/s])

The software has a problem in the variable 'y' which it says is a
"field valued variable" .

I therefore need an alternate to 'y' in defining the position of the water level.

------------------------------------------------------------------------

As per you suggested is the following correct .. ?

Inflow : if(volumeInt(liquid.volume fraction)@domain<0.7,0.5[kg/s],0[kg/s])

i have replaced 'y' by the 'expression' you suggested

i mean at what value of the volume intergal should i define the water-air interface ? (i've taken 0.7)
sandy_1982 is offline   Reply With Quote

Old   August 18, 2013, 19:25
Default
  #8
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,852
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
I have tried to tell you several times that the y variable returns the y coordinate of the current node, not the height of the free surface. Your inlet extends over a range of y coordinate values, so when you set the inlet to be a function of y coordinate it does not know which nodal y value to use - hence the error.

volumeInt(liquid.volume fraction)@domain will return the volume integral of the liquid volume fraction over the domain named "domain". You are going to have to change the "domain" and "liquid" names to what you have defined the domain and liquid phase names as.

As it returns a volume, so your test should be against a threshold volume. I assume 0.7 is the volume in the tank at which the valve turns on and off. That's fine, but you will need to define units for the volume.

Quote:
i mean at what value of the volume intergal should i define the water-air interface ? (i've taken 0.7)
This suggests you are confused about this equation as well. The volumeInt function does not use any thresholds, it just integrates the VF over the domain. In liquid regions it will be 1, in gas regions it will be 0 and in interface regions it will be intermediate. But when you do the volume integral over the domain it will return the volume of the liquid.
ghorrocks is offline   Reply With Quote

Reply


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
[snappyHexMesh] Boundary layer in a pipe Clementhuon OpenFOAM Meshing & Mesh Conversion 6 March 12, 2012 13:41
Set liquid level in a Tank chemeng OpenFOAM 4 April 7, 2010 00:46
CFX 5.7 pre Neser CFX 0 January 27, 2005 12:22
CFX 5.5.1 stirred tank and LES problem Nishant CFX 2 September 13, 2002 08:11
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11


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