CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   bubblefoam totally failed on unstructured mesh. (https://www.cfd-online.com/Forums/openfoam-solving/110206-bubblefoam-totally-failed-unstructured-mesh.html)

sharonyue December 6, 2012 01:34

bubblefoam totally failed on unstructured mesh.
 
Sorry, but yes, I have to concede that bubblefoam totally cant run on an unstructured mesh.
I even dont need to attach my case.
Just generate any simple cyclinder with an inlet,wall,outlet with an unstructured mesh. and run bubblefoam or twophaseeulerfoam.


bang!!......blowing up!


anyway,Thats is not my expected,I want a plausible suggestion how to prevent blowing up.

michielm December 6, 2012 03:14

If you want people to solve a problem for you, you should provide much much more details.

So you DO have to upload your case, because nobody is going to take the effort of making a mesh and running a simulation just to see what you mean.

If you show that you have put some effort into thinking about the issue and trying to solve it and share this information, then somebody might be willing (and be able) to help you.

sharonyue December 6, 2012 03:28

2 Attachment(s)
Hi Michiel:

Thank you very much for my consideration. actually I have done lots of works about bubblefoam, even all of them are extremely simple ones.




http://www.cfd-online.com/Forums/ope...tml#post396032
in this thread I tried use structured mesh on bubblefoam but failed, so I have to use unstructured mesh.then....

http://www.cfd-online.com/Forums/ope...behaviour.html
in this thread I have tried unstructured mesh on twoPhaseEulerFoam,or bubblefoam,it cant get convergence.

untill now I dont know if bubblefoam can handle unstructured mesh...

I cant upload my case because the fluent.msh is large.... but I can upload a image.
its a very simple case. if anyone can generate a mesh then just put it in mycase folder,the fluentMeshToFoam fluent.msh, setFields . bubbleFoam..
you will see the result.


everytime I receive an Email, I would be more closer to my success...thats exciting.

sharonyue December 10, 2012 01:29

Thats quite weird, is there anyone tried an unstructured mesh on bubblefoam?

sharonyue December 14, 2012 06:32

nobody is here?...

niklas December 14, 2012 07:34

get a dropbox account and put the mesh there.

why do you have different inlet velocities for the phases?

sharonyue December 14, 2012 08:25

Quote:

Originally Posted by niklas (Post 397539)
get a dropbox account and put the mesh there.

why do you have different inlet velocities for the phases?

Thank you for reminding me the dropbox Niklas. I upload my case on hotfire. you can chekc it out there.
https://hotfile.com/dl/184355810/d49...p.html?lang=en
https://hotfile.com/dl/184356440/5e7...p.html?lang=en


you can run it directly as of I have set the alpha field and generated the mesh.:

twoPhaseEulerFoam


U1 is the gas velocity , U2 is the liquid velocity, there is only air get in the column,so U2 inlet is zero.

If you can give me any assistance I would be very appreciated.

niklas December 14, 2012 09:49

doesnt work. hotfile is terrible.
cant download and now it says im downloading and I can only download 1 at a time.

sharonyue December 14, 2012 23:08

Quote:

Originally Posted by niklas (Post 397567)
doesnt work. hotfile is terrible.
cant download and now it says im downloading and I can only download 1 at a time.

here is a link on dropbox~

https://www.dropbox.com/s/1v6n8cf39n...structured.zip
https://www.dropbox.com/s/mguy6w6gm9...structured.zip

sharonyue December 18, 2012 00:52

Looks like only FOAM developers can tackle this problem?...

niklas December 18, 2012 01:41

the main problem is the mesh-quality at the interface. I would try to remake the mesh, slightly finer and also to add some outer corrections instead of running in piso mode.

I dont know if that is sufficient, but its impossible to get it working with that mesh.

sharonyue December 18, 2012 03:37

Quote:

Originally Posted by niklas (Post 398013)
the main problem is the mesh-quality at the interface. I would try to remake the mesh, slightly finer and also to add some outer corrections instead of running in piso mode.

I dont know if that is sufficient, but its impossible to get it working with that mesh.

Thank you very very much. although this problem has not been handled.I would be very thankful for your assistance.

um...maybe twophaseeulerfoam in next edition of OpenFOAM would be better on dealing with this mesh problem.? But I dont have much time to wait.....

niklas December 18, 2012 03:49

add this to controlDict and watch what happens to the velocities

Code:

functions
{
    extraInfo
    {
        type              coded;
        functionObjectLibs ( "libutilityFunctionObjects.so" );
        redirectType      average;
        code
              #{
            const volVectorField& U1 = mesh().lookupObject<volVectorField>("U1");
            const volVectorField& U2 = mesh().lookupObject<volVectorField>("U2");
            Info << "max U1 = " << max(mag(U1)).value() << ", U2 = " << max(mag(U2)).value() << endl;
            const volScalarField& p = mesh().lookupObject<volScalarField>("p");
            Info << "p min/max = " << min(p).value() << ", " << max(p).value() << endl;
        #};
    }
}


sharonyue December 24, 2012 22:42

Dear Niklas,
yeah, thats help, somthing wired about velocity fields. but finally,I dont know how to run bubblefoam or twophaseeulerfoam on that mesh. is this regarding to the model itself? if its ture. that is far beyond my ability.

alberto December 26, 2012 09:12

2 Attachment(s)
Use the "upwind" scheme for the divergence term of U1 and U2, and use the "uncorrected" option for Laplacians and snGrad. Also, fix the maximum time step to a much lower value than 1s, to avoid too strong fluctuations in the time-step.

I attach the files I used, and it ran up to 0.18s, then I stopped.

P.S. There is no reason to use an unstructured mesh with such a simple geometry :-)

sharonyue December 26, 2012 09:16

Quote:

Originally Posted by alberto (Post 399089)
Use the "upwind" scheme for the divergence term of U1 and U2, and use the "uncorrected" option for Laplacians and snGrad. Also, fix the maximum time step to a much lower value than 1s, to avoid too strong fluctuations in the time-step.

I attach the files I used, and it ran up to 0.18s, then I stopped.

P.S. There is no reason to use an unstructured mesh with such a simple geometry :-)

Oh my GOD! Thank you so very much Prof. alberto. I have been waiting for your reply. coz I know you can handle this question. I will try this . and update this thread if its necessary.

sharonyue December 26, 2012 10:34

1 Attachment(s)
Quote:

Originally Posted by alberto (Post 399089)
Use the "upwind" scheme for the divergence term of U1 and U2, and use the "uncorrected" option for Laplacians and snGrad. Also, fix the maximum time step to a much lower value than 1s, to avoid too strong fluctuations in the time-step.

I attach the files I used, and it ran up to 0.18s, then I stopped.

P.S. There is no reason to use an unstructured mesh with such a simple geometry :-)

Well~Prof.Alberto, I have tried, but the result looks...unsatisfactory.the image has been attached.If you have time,could you do me a favor check this thing out again please? Thank you.
BTW,I really admire what you have done in CFD research.

alberto December 26, 2012 10:45

You should improve your mesh resolution if you want to obtain reliable results.

P.S. Alberto works just fine, no need of titles ;-)

sharonyue December 26, 2012 10:48

Quote:

Originally Posted by alberto (Post 399100)
You should improve your mesh resolution if you want to obtain reliable results.

P.S. Alberto works just fine, no need of titles ;-)

Okay! I will remesh and try it, and update the result! Thanks alberto~

alberto December 26, 2012 10:50

May I know why you are trying to use a tetrahedral mesh?

sharonyue December 26, 2012 11:04

1 Attachment(s)
Quote:

Originally Posted by alberto (Post 399102)
May I know why you are trying to use a tetrahedral mesh?


Because I want to simulate the velocity field in a stirred tank which has two or more complex impeller and other things. the liquid is xanthan gum. and the air was injected. ofcourse I want to use hex mesh. but its too hard the create it. the image has been attached.
Wish someday I can fly to IOWA..haha
I will try to make a fine tet mesh and update later,now its very late in my country~but if you are interested in my research just ask me I will give you a detailed reply~

alberto December 26, 2012 11:07

For your type of flow you will need to consider non-Newtonian flow models too, which are not available in twoPhaseEulerFoam.

sharonyue December 26, 2012 11:11

Quote:

Originally Posted by alberto (Post 399106)
For your type of flow you will need to consider non-Newtonian flow models too, which are not available in twoPhaseEulerFoam.

..............I just thought it could be set just like interFoam..:(:(:( oh, I am facing a real problem.

sharonyue January 2, 2013 21:06

4 Attachment(s)
I think I should post it here, sorry.


More details see here,http://www.cfd-online.com/Forums/ope...tml#post399837
Quote:

I am sorry about that question. because it looks like there is no substantial change to the result.but I dont know if its still because of the mesh.


So I refine the mesh, now the cell is half than that cell in the other thread.so the total cell number reachs to 1,79 million,its too many, so I shorten the height, the other thing is not changed.the total cells number is about 55000.

I attached my image.I think that dont need to depict it.My primary language is not english so~.

btw,I turn to the other thread,I am sorry for that.

Thanks for you consistent attention.Alberto
Code:


Courant Number mean: 0.0039261 max: 0.319883
Max Ur Courant Number = 0.397983
deltaT = 0.002
Time = 0.008

MULES: Solving for alpha1
MULES: Solving for alpha1
Dispersed phase volume fraction = 8.32216e-05  Min(alpha1) = -3.02366e-18  Max(alpha1) = 1
GAMG:  Solving for p, Initial residual = 0.0171367, Final residual = 0.000609333, No Iterations 1
time step continuity errors : sum local = 2.04118e-05, global = -1.65081e-05, cumulative = -2.06546e-05
GAMG:  Solving for p, Initial residual = 0.00123443, Final residual = 8.21305e-09, No Iterations 12
time step continuity errors : sum local = 2.75416e-10, global = -5.95165e-11, cumulative = -2.06547e-05
ExecutionTime = 20.71 s  ClockTime = 21 s

Courant Number mean: 0.00430036 max: 0.423144
Max Ur Courant Number = 0.452263
deltaT = 0.002
Time = 0.01

MULES: Solving for alpha1
MULES: Solving for alpha1
Dispersed phase volume fraction = 0.000108438  Min(alpha1) = -4.18974e-18  Max(alpha1) = 1
GAMG:  Solving for p, Initial residual = 0.0240778, Final residual = 0.000665494, No Iterations 1
time step continuity errors : sum local = 2.28141e-05, global = -1.13576e-05, cumulative = -3.20123e-05
GAMG:  Solving for p, Initial residual = 0.00362172, Final residual = 8.3694e-09, No Iterations 12
time step continuity errors : sum local = 2.8619e-10, global = -5.54905e-11, cumulative = -3.20123e-05
ExecutionTime = 31.58 s  ClockTime = 31 s

Courant Number mean: 0.00473514 max: 0.539752
Max Ur Courant Number = 0.623292
deltaT = 0.00142857
Time = 0.0114286

MULES: Solving for alpha1
MULES: Solving for alpha1
Dispersed phase volume fraction = 0.000129096  Min(alpha1) = -9.55797e-13  Max(alpha1) = 1
GAMG:  Solving for p, Initial residual = 0.036045, Final residual = 0.00127238, No Iterations 1
time step continuity errors : sum local = 2.27111e-05, global = -1.7439e-05, cumulative = -4.94513e-05
GAMG:  Solving for p, Initial residual = 0.002945, Final residual = 5.42404e-09, No Iterations 13
time step continuity errors : sum local = 9.72319e-11, global = -2.11643e-11, cumulative = -4.94513e-05
ExecutionTime = 36.55 s  ClockTime = 36 s


Courant Number mean: 0.000966892 max: 0.412464
Max Ur Courant Number = 0.469807
deltaT = 0.000136854
Time = 0.029042

MULES: Solving for alpha1
MULES: Solving for alpha1
Dispersed phase volume fraction = 0.3376  Min(alpha1) = -7.3195e-15  Max(alpha1) = 1.00001
GAMG:  Solving for p, Initial residual = 9.81394e-06, Final residual = 7.26256e-07, No Iterations 1
time step continuity errors : sum local = 3.91702e-08, global = 7.41876e-11, cumulative = -2.8009e-06
GAMG:  Solving for p, Initial residual = 3.71368e-06, Final residual = 8.62789e-09, No Iterations 7
time step continuity errors : sum local = 4.65332e-10, global = -5.75839e-12, cumulative = -2.80091e-06
ExecutionTime = 284.29 s  ClockTime = 285 s

Courant Number mean: 0.00247628 max: 0.490122
Max Ur Courant Number = 0.13124
deltaT = 9.56469e-05
Time = 0.0675132

MULES: Solving for alpha1
MULES: Solving for alpha1
Dispersed phase volume fraction = 0.3376  Min(alpha1) = -2.83721e-15  Max(alpha1) = 1
GAMG:  Solving for p, Initial residual = 3.71895e-06, Final residual = 1.61786e-07, No Iterations 2
time step continuity errors : sum local = 4.21222e-09, global = -5.40208e-12, cumulative = -2.80081e-06
GAMG:  Solving for p, Initial residual = 2.05989e-06, Final residual = 6.36106e-09, No Iterations 6
time step continuity errors : sum local = 1.65604e-10, global = 6.10213e-13, cumulative = -2.80081e-06
ExecutionTime = 1619.52 s  ClockTime = 1622 s


sharonyue January 9, 2013 04:22

Um....looks like this problem still exists.

sharonyue March 15, 2013 03:24

Its been a long while.

But until in FOAM 2.2.0, twoPhaseEulerFoam and bubbleFoam still cannot solve tet mesh.

sharonyue May 1, 2013 02:43

2 Attachment(s)
Hi guys,

A little success.Regards to twoPhaseEulerFoam. I spent several days learning snappyhexmesh, and this solver can deal with this mesh.

doubledang August 14, 2016 11:02

Quote:

Originally Posted by sharonyue (Post 424339)
Hi guys,

A little success.Regards to twoPhaseEulerFoam. I spent several days learning snappyhexmesh, and this solver can deal with this mesh.


Hi, sharonyue!

I am also facing the same problem with this thread,
I also tried to use snappyHexMesh to generate a more or less okay mesh for a stirred tank, but it turned out there were always prism elements.
So, I am wondering did you manage to get rid of prisms in your case?
If so, how did you make it?

Many thanks!

Regards,

alberto August 14, 2016 22:08

Quote:

Originally Posted by doubledang (Post 613992)
Hi, sharonyue!

I am also facing the same problem with this thread,
I also tried to use snappyHexMesh to generate a more or less okay mesh for a stirred tank, but it turned out there were always prism elements.
So, I am wondering did you manage to get rid of prisms in your case?
If so, how did you make it?

Many thanks!

Regards,

I am not sure what solver you are using and in what version of OpenFOAM, but twoPhaseEulerFoam has been deeply modified in recent releases.

I would suggest you use OpenFOAM 4.x (Foundation), and take a look at reactingTwoPhaseEulerFoam, which has been much more robust in my experience.

Successfully using tet meshes is a question of choosing the appropriate schemes, so it would be useful to see what you are using in fvSchemes / fvSolution. If they come from the tutorials, it may not be ideal.

I hope this helps.

doubledang August 15, 2016 18:54

1 Attachment(s)
Quote:

Originally Posted by alberto (Post 614032)
I am not sure what solver you are using and in what version of OpenFOAM, but twoPhaseEulerFoam has been deeply modified in recent releases.

I would suggest you use OpenFOAM 4.x (Foundation), and take a look at reactingTwoPhaseEulerFoam, which has been much more robust in my experience.

Successfully using tet meshes is a question of choosing the appropriate schemes, so it would be useful to see what you are using in fvSchemes / fvSolution. If they come from the tutorials, it may not be ideal.

I hope this helps.

Hi Alberto,

Very happy to have your help here.
You just helped me a lot in learning OpenQBMM a while ago, I am Dang.....
As you know, I need to develop a two-phase flow solver based on OpenQBMM,
Now I am struggling on that...
I solved the above problem by creating pure Hex mesh for Rushton turbine using blockMesh.
and also changed some settings in fvSchemes/fvSolution after searching around in this platform.
But I still have two difficulties:
1. I will mainly use multiple pitch blade turbines, which are far more difficult to generate Hex mesh by blockMesh. I noticed your group have done wonderful job on this recently by using Pointwise (9th International Conference on Multiphase Flow). In a presentation by Xiaofei Hu, your mesh is so impressive, could you please shed some lights as regard to how to add/mesh zero-thickness blades/walls in pointwise?

2. I also tested multiphaseEulerFoam in a gas-liquid stirred tank, but failed to inject gas from a sparger by using the attached "fvOptions" file. This file is okay for twoPhaseEulerFoam. Do you have some suggestions on this?

By the way, I used both FOAM.3.0.1 and 2.4.

Many thanks in advance!

Best regards,

alberto August 15, 2016 23:49

Quote:

Originally Posted by doubledang (Post 614149)
Very happy to have your help here.
You just helped me a lot in learning OpenQBMM a while ago, I am Dang.....
As you know, I need to develop a two-phase flow solver based on OpenQBMM,
Now I am struggling on that...

Yes, I remember. :)
I am working on a similar problem (bubble columns) with a student of mine, but the code isn't public yet.

Quote:

1. I will mainly use multiple pitch blade turbines, which are far more difficult to generate Hex mesh by blockMesh. I noticed your group have done wonderful job on this recently by using Pointwise (9th International Conference on Multiphase Flow). In a presentation by Xiaofei Hu, your mesh is so impressive, could you please shed some lights as regard to how to add/mesh zero-thickness blades/walls in pointwise?
A zero-thickness surface in Pointwise is simply a face (domain) in a 3D block, so you need to create the domain for each blade, mesh it, and typically project/extrude or connect to another face to build the 3D block.

We have worked on very large-scale industrial reactors, with complex stirrers, which were too tedious to be meshed in a CAD-like environment. We obtained excellent results, comparable to those in Pointwise, with snappyHexMesh, once we figured the settings out, and properly defined the STL (if you use SolidWorks, feel free to maximize the export quality).

Quote:

2. I also tested multiphaseEulerFoam in a gas-liquid stirred tank, but failed to inject gas from a sparger by using the attached "fvOptions" file. This file is okay for twoPhaseEulerFoam. Do you have some suggestions on this?
I have not used fvOptions to simulate the sparger. In our case, we mesh the actual sparger because it is big enough to alter the flow.

Quote:

By the way, I used both FOAM.3.0.1 and 2.4.
Our cases were mostly done with reactingTwoPhaseEulerFoam/reactingMultiphaseEulerFoam in OpenFOAM-dev, which is currently in OpenFOAM 4.0. My post-doc definitely knows these technicalities better than me, but I am quite sure she didn't use 3.0 much.

Regards,

doubledang August 18, 2016 11:32

Quote:

Originally Posted by alberto (Post 614156)
Yes, I remember. :)
I am working on a similar problem (bubble columns) with a student of mine, but the code isn't public yet.

A zero-thickness surface in Pointwise is simply a face (domain) in a 3D block, so you need to create the domain for each blade, mesh it, and typically project/extrude or connect to another face to build the 3D block.

We have worked on very large-scale industrial reactors, with complex stirrers, which were too tedious to be meshed in a CAD-like environment. We obtained excellent results, comparable to those in Pointwise, with snappyHexMesh, once we figured the settings out, and properly defined the STL (if you use SolidWorks, feel free to maximize the export quality).

I have not used fvOptions to simulate the sparger. In our case, we mesh the actual sparger because it is big enough to alter the flow.

Our cases were mostly done with reactingTwoPhaseEulerFoam/reactingMultiphaseEulerFoam in OpenFOAM-dev, which is currently in OpenFOAM 4.0. My post-doc definitely knows these technicalities better than me, but I am quite sure she didn't use 3.0 much.

Regards,


Hi Alberto,

Thanks for your kind reply.
I have tried hard to get rid of prisms by using snappyHexMesh, but still be bothered by them. Do you have some suggestions on this? According to your experiences, which parameters in snappyHexMeshare are crucial to your success?
Is it possible because of you use a large scale tank?
While I work on a lab-scale tank with ~ 0.3 m in diameter (I used Salome to generate STL file).

BTW, I played with twoPhaseEulerFoam these days, but have no clear idea about
"maxFullyDispersedAlpha" and "maxPartlyDispersedAlpha" under "blending" in "phaseProperties". Could you explained them?

Thanks!


Best,

alberto August 19, 2016 22:37

Quote:

Originally Posted by doubledang;6[LIST=1
[/LIST]14572]
I have tried hard to get rid of prisms by using snappyHexMesh, but still be bothered by them. Do you have some suggestions on this? According to your experiences, which parameters in snappyHexMeshare are crucial to your success?

We make the STL separating the following parts in different STL files:
  • Tank
  • Each impeller
  • Parts of the shaft between impellers
  • Shaft in the top of the reactor (from outside the rotating zone to the top of the tank)

This allows to specify different refinement levels. We also use the implicit feature detection, which seems to better conform the mesh to the surface in all of our cases. I would recommend you create a fine-enough blockMesh box, to start from a decent mesh resolution, rather than a very coarse one.

Quote:

Is it possible because of you use a large scale tank?
While I work on a lab-scale tank with ~ 0.3 m in diameter (I used Salome to generate STL file).
We just submitted a paper where we used snappyHexMesh with a tank whose diameter is smaller than yours, and we obtained a good mesh.

Quote:

BTW, I played with twoPhaseEulerFoam these days, but have no clear idea about
"maxFullyDispersedAlpha" and "maxPartlyDispersedAlpha" under "blending" in "phaseProperties". Could you explained them?
Blending is used to stabilize the solution when there is phase inversion. This is achieved by blending the contribution of the phases to the momentum exchange term. The thresholds you refer to are parameters of the blending function you choose to use for the force model. I would stick to the defaults, if you simulate gas-liquid systems, since they have been tested for those.

doubledang August 21, 2016 09:54

Quote:

Originally Posted by alberto (Post 614735)
We make the STL separating the following parts in different STL files:
  • Tank
  • Each impeller
  • Parts of the shaft between impellers
  • Shaft in the top of the reactor (from outside the rotating zone to the top of the tank)

This allows to specify different refinement levels. We also use the implicit feature detection, which seems to better conform the mesh to the surface in all of our cases. I would recommend you create a fine-enough blockMesh box, to start from a decent mesh resolution, rather than a very coarse one.



We just submitted a paper where we used snappyHexMesh with a tank whose diameter is smaller than yours, and we obtained a good mesh.



Blending is used to stabilize the solution when there is phase inversion. This is achieved by blending the contribution of the phases to the momentum exchange term. The thresholds you refer to are parameters of the blending function you choose to use for the force model. I would stick to the defaults, if you simulate gas-liquid systems, since they have been tested for those.

Hi Alberto,
Thanks very much for your kind reply.
The information is helpful!

Best regards,

doubledang August 23, 2016 18:17

2 Attachment(s)
[/QUOTE]
Quote:

Originally Posted by alberto (Post 614735)
We make the STL separating the following parts in different STL files:
  • Tank
  • Each impeller
  • Parts of the shaft between impellers
  • Shaft in the top of the reactor (from outside the rotating zone to the top of the tank)

This allows to specify different refinement levels. We also use the implicit feature detection, which seems to better conform the mesh to the surface in all of our cases. I would recommend you create a fine-enough blockMesh box, to start from a decent mesh resolution, rather than a very coarse one.

We just submitted a paper where we used snappyHexMesh with a tank whose diameter is smaller than yours, and we obtained a good mesh.

Blending is used to stabilize the solution when there is phase inversion. This is achieved by blending the contribution of the phases to the momentum exchange term. The thresholds you refer to are parameters of the blending function you choose to use for the force model. I would stick to the defaults, if you simulate gas-liquid systems, since they have been tested for those.


Hi, Alberto,

I think it's better to open a new thread to disccuss the reactingMultiphaseEulerFoam issues.
So, I opened a new thread at the following link:

http://www.cfd-online.com/Forums/ope...tml#post615294

Hope you could take a look. :)

Best regards,


All times are GMT -4. The time now is 22:05.