CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FloEFD, FloWorks & FloTHERM (
-   -   Is it possible to change the density of water in FlowSim?? (

nikesh January 28, 2014 02:41

Is it possible to change the density of water in FlowSim??
Hi all,
Just a quick question....
Is it possible to change the density of water in Flow Simulation?

In my case, the water contains some impurities and I either need to simulate denser water ...or... two-phase flow.

Is there any chance that either of the two options is available in Flow Simulation? I tried looking around but couldn't find much information about these so I wanted to make sure.

Any help highly appreciated!


Boris_M March 5, 2014 06:23

Hi Nikesh,
sorry I was travelling a lot. Yes you can change the density. The default water you use is a predefined fluid. In order to change it you need to create a user-defined fluid. Simply go into the engineering database and look for the water entry in the liquids collection. you can copy/paste that liquid as a whole to the User-defined section of the liquids database and then adjust the density settings instead of creating water from scratch.


nikesh April 30, 2014 04:34

2 Attachment(s)
Hello Borris,
Thanks to all your replies, I have managed to perform simulations for gate valve and segment ball valve cases for "water-only" as fluid flow. The results, if you'd like to see I have attached herewith (see Fig. 2). They do look quite alright to me. However, I would definitely love to hear some of your expert opinion.

And now I have come across a big problem which has baffled me for a couple of months already :confused:.
In actual situation, the reservoir contains sludge up to about 3~4 m and also some of those particles mixed with water above that height. You can see this in Fig 1. Sludge along with water is drained when the valve is opened. I'm really struggling to find a way to run simulations with this scenario. Due to the presence of sludge, the density of water changes but is not uniform throughout the depth of the reservoir. Also that the height of the sludge decreases as it is drained through the pipe at the bottom with valve operation. Basically, I'm struggling to use P_total at the inlet since rho is not that of water now and is not uniform throughout the entire depth of the reservoir.
Currently, we are setting up the apparatus and instruments to measure mass flow rate which might still take some time until it is complete. Meanwhile I need to start running my simulations which could replicate to some extent the real case scenario.

I really appreciate your help, Borris. And one more heads up here would be really great!!
Thanks a lot and hoping to hear from you soon!!


Boris_M May 6, 2014 10:51

Sorry for the delay, I was on vacation.

The curves look good to me.

For the sludge, this is indeed not a simple task. What you might want to try is to define geometries in your fluid domain which you can deactivate as a solid for FloEFD and apply a local initial condition in which you can specify for that volume a different fluid to start with, with a different density etc. You need to add that fluid in the general settings to the default fluids and specify the concentration in the general settings for that fluid to 0 and the other/s to the according values. For example 0 for the sludge and 1 for the water. Now in the local initial condition you specify sludge to 1 and water to 0 and if you start your simulation from there you will see how that is then mixing and moving. A simple case would be a transient simulation with a horizontal pipe with water in it except for the center third of the pipe which is specified as lets say red paint (for visualization purposes). The simulation will show the three sections (water-red paint-water) to move through the pipe as if it is spitting red-white-red-white etc. with just some little mixture at the interface regions with the fluids depending on their viscosity which in your case should also be different, not just the density I guess.

That would somehow come the whole thing closer.

I hope this helps,

nikesh June 11, 2014 03:08

I am now finally getting to start my simulations for this case. I'm going through your previous reply very carefully. But I am wondering more on how to obtain total pressure at the bottom of the reservoir, or at the pipe inlet (which is the inlet condition for my simulations)? My previous case was only with water which made it simpler to calculate pressure at the bottom of the reservoir. But now due to the sludge I can't exactly figure out a way to obtain this pressure.
1. Installing a pressure sensor in the pipe ahead of the valve is one option but since this reservoir is always filled with water and sludge, its not viable to drill or tap through a pipe still filled with liquid at high pressure.
2. I can find out experimentally the height of sludge (3~4m max) in the bottom of the reservoir before turning on the valve and at the same time can calculate its density manually which should give me the pressure exerted by this sludge+water at the bottom. But the problem with this is that this sludge height is reduced as the valve starts operating. I believe we won't have the same pressure at the bottom for all the valve angle cases?
3. Regarding the density of sludge, I can collect 1000cc of completely dried sludge and weigh it to compute its density (mass/volume) which should be OK I believe?? And what about its kinematic viscosity? I believe I'd need a special viscosimeter to measure its viscosity right?
Any insight into my aforementioned predicament is highly appreciated, Boris!
Thank you.

Boris_M June 11, 2014 03:38

Hi Nikesh,

It is necessary to find out the hight of the sludge as this is a boundary condition for the simulation.
Since the sludge is moving when opening the valve as you said, the total pressure will change over time as the heavier sludge is moving out and reducing the potential pressure on the outlet of the pipe. But you don't have to define the total pressure at the outlet if you define the zero level of the system to the outlet and define like in a free stream a static pressure at the outlet. I guess you work at 1atm.
With gravity activated, FloEFD should take into account the heavier sludge over its height and the lighter water above it.
I would like to test it before I suggest it to you as this is also something I have never done but unfortunately I'm pretty occupied.

Regarding the sludge sample. I would suggest you take a sample of wet sludge as the water is still in and makes the volume/mass different. You have to see it like a sponge, it is much lighter dried than when water is filled in all the pores. If you take 1L = 1000cc wet sludge you will get exactly the sludge density for the real case. But then of course you will also need to measure the viscosity. It shouldn't be any special viscosimeter if you have one already you can check if that works. It's been some time since I did that but we used a simple rotational viscosimeter. I cannot tell if your sludge has non-newtonian behaviour, that might happen but then it wouldn't work with water in FloEFD. So I think at least an asumption of newtonian liquid should give you some results.

I hope this helps,

nikesh June 22, 2014 22:24

Hi Boris,
I have few more ambiguities, hope you could help!

1. For the experiments, lets say the valve opening time is 50 sec. So, I'd take water samples every 5 sec which refers to 10% valve opening angle. While choosing the operating fluid for CFD, which option is better?
a) taking the mixture as a whole NEW FLUID and each of the 10 samples will have different densities and viscosity which I can measure, and perform those 10 simulations with their respective fluids varying only in density and viscosity.
b) taking them as 2-PHASE FLOW. I can determine experimentally the mass % of sludge and water for each of the samples. So for each of my simulations, I can take the corresponding % of water and sludge as obtained from the experiments for each of the valve angle case. The mass % would be determined by completely separating water from the sludge (dried sludge) and weighing it. Now my ambiguity is with the density and viscosity of dry sludge and whether it is possible or not to use such sludge in FloEFD.

2. It seems now it is possible to install a pressure sensor (pressure gauge) before and aft of the valve. These pressure gauges give us the dynamic pressure readings, right? I performed some tests to check the variation of pressure before and after the valve. I get same readings on both the ends at all different valve angles.
Since, P_total = P_static + P_dynamic,
I can expect the pressure reading on these gauges to give same or similar values at the inlet and outlet. The static pressure at the outlet is the atmospheric pressure, so the only difference would be with the static pressure at the inlet which I should expect it to be higher than the atmospheric pressure. In this case, how can I measure the static pressure experimentally?? Any recommendations?
And if I could measure pressure ahead of the valve, I could use those pressure as the inlet pressure conditions for the simulations-and there won't be a need to measure sludge height in the reservoir during valve operation. That is how I am planning to proceed.

Any heads up highly appreciated Borris!
Thank you!!

Boris_M June 23, 2014 04:19

Hi Nikesh,

a) Do you think the samples will be different for the sluge? Is it more dense due to the weight of the fluid ontop of it so the density and viscosity changes over the height?
b) Is the dry sludge not like solid material like dried mud so earth? Then the viscosity will not make sense. You will get the viscosity of earth which I don't think makes sense for any fluid. So I would rather go with a) and see if there is even a difference. The think you can do however is to use the first sludge probe and if it really changes over the height then take that density and viscosity and measure the mass % of that sludge compared to the other probes and use the first probe as 100% sludge and over the height you can increase the mixture for more water over the height of the model. So you will start with 100% sludge and in order to thinn it you use then more and more water until at some point you only have water left.
That can be done with the dependency button for the concentration values you would define in the general settings with F(x) or what ever coordinate your height is.

2. Depending on how the pressure sensors are instaled it will tell you dynamic, total or static pressure. Pressure gauges can measure like a membrane between two pressures and therefore the difference between the two sides of the membrane. If the one side is the pressure trough a tube that is put into the flow directly with its opening and the other a hole in the pipe perpendicular to the axis of the pipe you will measure the total pressure with the first tube and the hole will give you the static pressue. The gauge will tell you the difference which is the dynamic pressure. So basically it is up to the installation.
It is unlikely that you will get the same value expect if the valve is completely open. the total pressure will be lower on the outlet side if the valve is slightly closed as the valve will cause a pressure loss due to the loss in velocity but also the static pressure could differ depending on the position of the measurement which should be in the undisturbed area further away from the valve to reduce that influence. But since you work with liquid we can tell it is incompressible so the mass balance equation is limited to the velocity and cross section. Since the cross section before and after the valve are probably the same, the velocities will be too and with that the dynamic pressure. So only the static pressure will change and you can determine the difference by connecting the pressure gauge (if it is a differential gauge) between both sides of the valve with just holes into the pipe wall. So like the venturi effect but with an additional loss factor in the equation that comes from the valve and represents the delta that you want to find.
If you do it the way by defining the sludge height with a pressure condition then you can change also the concentration over time in a transient anylsis and if you measure the pressure difference transient you can calibrate the simulation model with the concentration to match the measurement so it will fit in future. Calibrating might be necessary as the pressure difference is most likely going to change due to the sludge concentration change.

In fact, that seems to be an interesting paper for a conference such a test and simulation model calibration etc.

Good luck,

All times are GMT -4. The time now is 16:54.