CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   tank level & float valve kind of simulation - CFX Pre (https://www.cfd-online.com/Forums/cfx/122298-tank-level-float-valve-kind-simulation-cfx-pre.html)

sandy_1982 August 16, 2013 08:56

tank level & float valve kind of simulation - CFX Pre
 
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

ghorrocks August 17, 2013 06:46

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.

sandy_1982 August 17, 2013 08:51

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

ghorrocks August 17, 2013 22:13

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?

sandy_1982 August 18, 2013 00:20

yes, i have a control valve (a float valve which regulates it) that opens and closes as per the fluid level in the tank

ghorrocks August 18, 2013 06:33

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.

sandy_1982 August 18, 2013 08:58

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)

ghorrocks August 18, 2013 18:25

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.


All times are GMT -4. The time now is 18:34.