Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Multiphase Flow LS - Air Bubble in Water Cylinder - Conservative forms fails

Please login with a confirmed email address before reporting spam

Hello everybody and thank you in advance for any kind of help you may give,
I am trying to simulate a simple kind of scenario, an air bubble in a water cylinder rising due to buoyancy force.
I made my model axisymmetric and used the level set method (but I want to be able to simulate the same scenario also with the phase field and moving mesh method in the end). I am using v4.2a and I use the stokes flow approximation. I initialize the pressure inside the bubble with young-laplace equation assuming outside pressure is 0.
This example is very similar to the rising bubble model of comsol with an oil droplet in water, but here the second fluid (air) is only in the bubble and not also in the top layer, which is closed by a wetted wall.
What happens is that if I use the incompressible and non conservative form I have a converging solution and the bubble rises, even though the volume fraction seems to decrease in time (mass is not conserved apparently) and if I use the conservative form it inevitably fails to converge.
If I try the compressible Navier Stokes, which is intrinsically conservative, it fails as well.
Since I am not expert with mesh refinement and solver's advanced options, could somebody point some of these things out for me? Or if you find any wrong BC (which I checked over different tutorials and should be fine), could you please highlight me where the errors are?
If I am missing something with the physics, please let me know too, I tried to make it as simple as possible.
I attach the file model if you have the opportunity to check.
Thank you again for your help

Stefano


4 Replies Last Post 2013年5月1日 GMT-4 15:54
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年4月30日 GMT-4 02:20
Hi

First of all you are in 2D and NOT in 2D-axi so you are simulating a cylinder and not a bubble, then you could give your model some further values for the initial condition (and set up completemly the material, even if you overwrite them further down

the water pressure, if you set p=0 at the bottom is p=g*rho*height_z where height is the distance along Z (for 2D-axi, Y for 2D) counted from the level where you set point p=0. So setting your model in 2D-axi and using z=0 as the bottom or upper point makes sometimes the equation writing simpler

An advice: use also units in the parameters definitions, then you are sure you get less errors as COMSOL helps you flag any inconsistencies

Check carefully how the wetting agle is defined w.r.t. fluid 1 and 2 there might well be a sign issue depending on how ou define the fluid1 and 2 (order and type

--
Good luck
Ivar
Hi First of all you are in 2D and NOT in 2D-axi so you are simulating a cylinder and not a bubble, then you could give your model some further values for the initial condition (and set up completemly the material, even if you overwrite them further down the water pressure, if you set p=0 at the bottom is p=g*rho*height_z where height is the distance along Z (for 2D-axi, Y for 2D) counted from the level where you set point p=0. So setting your model in 2D-axi and using z=0 as the bottom or upper point makes sometimes the equation writing simpler An advice: use also units in the parameters definitions, then you are sure you get less errors as COMSOL helps you flag any inconsistencies Check carefully how the wetting agle is defined w.r.t. fluid 1 and 2 there might well be a sign issue depending on how ou define the fluid1 and 2 (order and type -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年4月30日 GMT-4 10:52
Dear Ivar,
thank you very much for your comments and guidelines.
I have modified the model, now starting from a real axisymmetric model and not by making it 2d axisymmetric by adding a simmetry line, and this improved a lot it seems the quality of the mesh.
Since the problem is symmetric, in theory the bubble shouldn't touch the walls, so I left a no slip condition to make calculations easier.
I would like to add the hydrostatic pressure, but I don't seem to understand how to modify the variable pressure in the model, could you please give me some more explanations?
I was thinking where I should add an expression like g_const*rho*variable and could not find a place apart from adding a volume force or writing it in the initial values (but it should be a boundary condition not an initial value).
Then I have two more doubts about the hydrostatic pressure idea: first, the grh formula works well for incompressible fluids, so I can add it easily for the water, but I what should I add for the gas, so as not to make the model unbalanced?Could you tell me your opinion on this point?
Moreover, how do I specify the distance variable you called height_z? Because I can't find the correct name for the variable and I always get the comsol flag, unknown variable height_z or height_y or y or z.
Is there no way to access all the variables of the system? I am very grateful for your help and hope you'll have the chance to answer more of my doubts.
Best,

Stefano
Dear Ivar, thank you very much for your comments and guidelines. I have modified the model, now starting from a real axisymmetric model and not by making it 2d axisymmetric by adding a simmetry line, and this improved a lot it seems the quality of the mesh. Since the problem is symmetric, in theory the bubble shouldn't touch the walls, so I left a no slip condition to make calculations easier. I would like to add the hydrostatic pressure, but I don't seem to understand how to modify the variable pressure in the model, could you please give me some more explanations? I was thinking where I should add an expression like g_const*rho*variable and could not find a place apart from adding a volume force or writing it in the initial values (but it should be a boundary condition not an initial value). Then I have two more doubts about the hydrostatic pressure idea: first, the grh formula works well for incompressible fluids, so I can add it easily for the water, but I what should I add for the gas, so as not to make the model unbalanced?Could you tell me your opinion on this point? Moreover, how do I specify the distance variable you called height_z? Because I can't find the correct name for the variable and I always get the comsol flag, unknown variable height_z or height_y or y or z. Is there no way to access all the variables of the system? I am very grateful for your help and hope you'll have the chance to answer more of my doubts. Best, Stefano

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年4月30日 GMT-4 14:23
Hi

the vertical pressure (assuming gravity along -Z in 2D axi) would be something like pressure [Pa] =

g_const*mat2.def.rho(293.15)[kg/m^3]*z

or mat1 depending on which one you refer to (if it's air it's probably mat1.def.rho(1[atm/Pa],273.15)[kg/m^3]*z
you need to check the pA and T dependence how its defined for the different materials

now this is assuming z=0 for the lowest geoemtrical point, if you have a height of 150[um] and you have put z such that it ranges from -75 to 75 um, then you must replace z by (z-(-75[um]) or define a z0=-75[um] and use the height = (z-z0)

This works also for a fluid, but not the one as a bubble inside a liquide, as here the fluid / air surface pressure would also act

--
Good luck
Ivar
Hi the vertical pressure (assuming gravity along -Z in 2D axi) would be something like pressure [Pa] = g_const*mat2.def.rho(293.15)[kg/m^3]*z or mat1 depending on which one you refer to (if it's air it's probably mat1.def.rho(1[atm/Pa],273.15)[kg/m^3]*z you need to check the pA and T dependence how its defined for the different materials now this is assuming z=0 for the lowest geoemtrical point, if you have a height of 150[um] and you have put z such that it ranges from -75 to 75 um, then you must replace z by (z-(-75[um]) or define a z0=-75[um] and use the height = (z-z0) This works also for a fluid, but not the one as a bubble inside a liquide, as here the fluid / air surface pressure would also act -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年5月1日 GMT-4 15:54
Thank you Ivar,
yes I manage to apply the hydrostatic pressure by adding a volume force defined as the one in your formula and that works if I do it for a column of water.
Unfortunately this doesn't solve the problem that my air bubble in water does not converge if I use a mass conservative or compressible method.
I am looking more into the problem, I hope to bring more explanations or better defined doubts and questions soon.
Thanks for the support.
Stefano
Thank you Ivar, yes I manage to apply the hydrostatic pressure by adding a volume force defined as the one in your formula and that works if I do it for a column of water. Unfortunately this doesn't solve the problem that my air bubble in water does not converge if I use a mass conservative or compressible method. I am looking more into the problem, I hope to bring more explanations or better defined doubts and questions soon. Thanks for the support. Stefano

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.