CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

interFoam, wierd nu.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 2, 2013, 19:41
Default interFoam, wierd nu.
  #1
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Hi,

In interFoam,I usually simulate a system of non-newtonian fluid. So I just make a test,in tutorial dambreak, I set the lower part of the mesh is all of fluid, and the higher part is air. Actually the fluid is still.

This is my transportProperties Dict:
Code:
phase1
{
    transportModel  HerschelBulkley;
rho             rho [ 1 -3 0 0 0 0 0 ] 989;
HerschelBulkleyCoeffs
{
    nu0             nu0 [ 0 2 -1 0 0 0 0 ] 0.19;//  188/989
    tau0           tau0 [ 0 2 -2 0 0 0 0 ] 0.0111;// 11/989  m2/s2  
    k              k [ 0 2 -1 0 0 0 0 ] 0.0283;//    28/989
    n               n [ 0 0 0 0 0 0 0 ] 0.14;
}
}

phase2
{
    transportModel  Newtonian;
    nu              nu [ 0 2 -1 0 0 0 0 ] 1.48e-05;
    rho             rho [ 1 -3 0 0 0 0 0 ] 1;
    CrossPowerLawCoeffs
    {
        nu0             nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
        nuInf           nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
        m               m [ 0 0 1 0 0 0 0 ] 1;
        n               n [ 0 0 0 0 0 0 0 ] 0;
    }

    BirdCarreauCoeffs
    {
        nu0             nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515;
        nuInf           nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
        k               k [ 0 0 1 0 0 0 0 ] 99.6;
        n               n [ 0 0 0 0 0 0 0 ] 0.1003;
    }
}

sigma           sigma [ 1 0 -2 0 0 0 0 ] 0.07;
But in the next time steps,nu becomes all the same all of the fields even where it is air.

Why is this happening?Thanks in advance.

I attach my case,just run
blockMesh
setFields
interFoam
then see the result.
Attached Images
File Type: jpg 1.jpg (18.4 KB, 89 views)
File Type: jpg 2.jpg (17.0 KB, 98 views)
Attached Files
File Type: gz damBreakstill.tar.gz (10.0 KB, 20 views)
sharonyue is offline   Reply With Quote

Old   April 8, 2013, 21:50
Default
  #2
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Recently I have tried twophaseeulerfoam,the mesh is totally the same with damBreak.

First I set the liquid is water, the transportDict is:
Code:
phase1
{
    nu              1.6e-05;
    rho             1;
    d               0.003;
}

phase2
{
    nu              1e-6;
    rho             1000;
    d               0.0001;
}

Cvm             0.5;
Cl              0;
Ct              1;
I get the satisfactory result which is been attached.

Then I change the phase nu to be 1 like this:
Code:
phase1
{
    nu              1.6e-05;
    rho             1;
    d               0.003;
}

phase2
{
    nu              1;
    rho             1000;
    d               0.0001;
}

Cvm             0.5;
Cl              0;
Ct              1;
Via result,Its obvious that the velocity is very slow.

So no matter interFoam which the two phase share the same governing equation or twoPhaseeuelrfoam which use their own equations all have this problem, especially when the viscosity ratio is large.

Anyone who would give me some light in the dark I would be very appreciated.Thanks in advance.
Attached Images
File Type: jpg water time 0.2.jpg (38.6 KB, 80 views)
File Type: jpg water time 0.45.jpg (37.9 KB, 66 views)
File Type: jpg water time 0.jpg (30.9 KB, 56 views)
File Type: jpg big nu time 0.2.jpg (36.0 KB, 58 views)
File Type: jpg big nu time 1.35.jpg (34.8 KB, 62 views)
sharonyue is offline   Reply With Quote

Old   April 8, 2013, 21:52
Default
  #3
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
This is my case.just run
blockMesh
setFields
twoPhaseeulerfoam

See the result and change the nu make a comparison.
Attached Files
File Type: gz damBreaktwophaseeulerfoam.tar.gz (10.0 KB, 17 views)
sharonyue is offline   Reply With Quote

Old   April 8, 2013, 22:02
Default
  #4
Member
 
Chris L
Join Date: Sep 2012
Posts: 53
Rep Power: 13
vbchris is on a distinguished road
What are your modeling with a nu=1 and rho =1000?
This would be a material with the consistancy of a ball bearing (ie not fluid) I think this is why you see such low velocities. check wolfram alpha for viscosities of various materials.

Chris
vbchris is offline   Reply With Quote

Old   April 8, 2013, 22:08
Default
  #5
Member
 
Chris L
Join Date: Sep 2012
Posts: 53
Rep Power: 13
vbchris is on a distinguished road
With respect to the interFoam.

I was using that last week.
I believe it calculated a blended effective viscosity MuEff based on the phase fractions in each cell. So The only way I would see it being equivalent over your mesh is with a prefectly mixed system. From your attached picture I would suggest changing the scales for nu in parafoam and it might tell a different tale.

Chris
vbchris is offline   Reply With Quote

Old   April 9, 2013, 00:04
Default
  #6
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Quote:
Originally Posted by vbchris View Post
With respect to the interFoam.

I was using that last week.
I believe it calculated a blended effective viscosity MuEff based on the phase fractions in each cell. So The only way I would see it being equivalent over your mesh is with a prefectly mixed system. From your attached picture I would suggest changing the scales for nu in parafoam and it might tell a different tale.

Chris
Hi Chris,

Thanks for your reply

With respect to dambreakstill case.I check the nu1.in time 0.45.nu1 is equivalent over the field.this is the result:
Code:
dimensions      [0 2 -1 0 0 0 0];

internalField   uniform 0.19;

boundaryField
{
    leftWall
    {
        type            calculated;
        value           uniform 0.19;
    }
    rightWall
    {
        type            calculated;
        value           uniform 0.19;
    }
    lowerWall
    {
        type            calculated;
        value           uniform 0.19;
    }
    atmosphere
    {
        type            calculated;
        value           uniform 0.19;
    }
    defaultFaces
    {
        type            empty;
    }
}
So I think its not the visual problem via paraview.

About nu=1,I just make an assumption,Well,in this threadhttp://www.cfd-online.com/Forums/openfoam-solving/115002-interfoam-different-nu-different-falling-velocity.html,I made a comparision and found that the falling velocity is different as of the nu is changed. I dont know if its because of the VOF model.
sharonyue is offline   Reply With Quote

Old   June 6, 2013, 23:58
Default
  #7
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
I dont know why there is no one concerning about this, no one is doing non-newtonian simulation? I made another test, copy the dambreak tutorial and make only one correction in nu:

Code:
phase1
{
    transportModel  BirdCarreau;
    //nu              nu [ 0 2 -1 0 0 0 0 ] 1e-06;
    rho             rho [ 1 -3 0 0 0 0 0 ] 1000;
    CrossPowerLawCoeffs
    {
        nu0             nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
        nuInf           nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
        m               m [ 0 0 1 0 0 0 0 ] 1;
        n               n [ 0 0 0 0 0 0 0 ] 0;
    }

    BirdCarreauCoeffs
    {
        nu0             nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515;
        nuInf           nuInf [ 0 2 -1 0 0 0 0 ] 1e-04;
        k               k [ 0 0 1 0 0 0 0 ] 99.6;
        n               n [ 0 0 0 0 0 0 0 ] 0.1003;
    }
}
Then run the case and see the result. It appears that nu is almost the same all over the field, But I wish the nu of liquid is bigger than the air.
Attached Images
File Type: jpg 1.jpg (29.6 KB, 51 views)
sharonyue is offline   Reply With Quote

Old   June 12, 2013, 19:42
Default
  #8
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
I check the voscosity model in OpenFOAM, for example CrossPowerLaw code:
Code:
return (nu0_ - nuInf_)/(scalar(1) + pow(m_*strainRate(), n_)) + nuInf_;
Does it mean it do not consider the two phase situation?
sharonyue is offline   Reply With Quote

Old   June 13, 2013, 09:06
Default
  #9
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 17
olivierG is on a distinguished road
hello,

Quote:
Does it mean it do not consider the two phase situation?
No, if you use InterFoam and Cie, you have nu1 (phase 1) and nu2, and nu which come from "incompressibleTwoPhaseMixture, which is nu1*alpha1+nu2*alpha2.
By defaut, nu is not write. If you use custom law like CrossPowerLaw for phase 1, you will have nu1, but still not nu of the mixture.

You can have large viscosity ratio (like nu1=1, nu2=1e-5), but then use small time step and at least 3 outercorrectors.

regards,
olivier
olivierG is offline   Reply With Quote

Old   June 13, 2013, 09:23
Default
  #10
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Quote:
Originally Posted by olivierG View Post
No, if you use InterFoam and Cie,
Hi olivier,

Thats a light from the dark, Thanks. But what is Cie?

Quote:
you have nu1 (phase 1) and nu2, and nu which come from "incompressibleTwoPhaseMixture, which is nu1*alpha1+nu2*alpha2.
Looks like this could explain the high viscosity liquid is droping more slowly, for example: if the nu1 is 500, nu2 is 1, so the nu in the interface is 250, so its turning more viscious, right?

Code:
By defaut, nu is not write. If you use custom law like CrossPowerLaw for phase 1, you will have nu1, but still not nu of the mixture.
But in my case, it write the nu. you could try a case just make the liquid to non-newtonian fluid. So if its nu, I think nu in the liquid and nu in the air is in totally different order, but the result shows no difference on this two different nu.

Thank you again at last.

Last edited by sharonyue; June 18, 2013 at 03:30.
sharonyue is offline   Reply With Quote

Old   June 18, 2013, 03:29
Default
  #11
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Quote:
Originally Posted by olivierG View Post
you have nu1 (phase 1) and nu2, and nu which come from "incompressibleTwoPhaseMixture, which is nu1*alpha1+nu2*alpha2.
Hi,

About this, my opinion is this: look at this image. the four cells in the middle is some kind viscious liquid which viscosity is 1000, the other cells' viscosity is 1, By openfoam's code:
Code:
"nuf",
            (
                alpha1f*rho1_*fvc::interpolate(nuModel1_->nu())
              + (scalar(1) - alpha1f)*rho2_*fvc::interpolate(nuModel2_->nu())
            )/(alpha1f*rho1_ + (scalar(1) - alpha1f)*rho2_)
Does it mean the nuf is 500 in the red line? Actually no matter what kind of this liquid is, they should fall in the same velocity, I think nuf is the point why the liquid is falling slowly, can I just set the nuf to "nu1*0.99+nu2*0.01"? so the nuf is 10.99. or "nu1*0.999+nu2*0.001"?
Attached Images
File Type: jpg 1.jpg (59.8 KB, 52 views)
sharonyue is offline   Reply With Quote

Old   June 18, 2013, 03:57
Default
  #12
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 17
olivierG is on a distinguished road
hello,

I am not an expert in this field, but this is common to use this linear variation.
You can try to modify this by using some kind of tanh function instead, which would be more continuous. Feel free to share if you get some more info about this.

regards,
olivier
olivierG is offline   Reply With Quote

Old   June 18, 2013, 05:22
Default
  #13
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Quote:
Originally Posted by olivierG View Post
hello,

I am not an expert in this field, but this is common to use this linear variation.
You can try to modify this by using some kind of tanh function instead, which would be more continuous. Feel free to share if you get some more info about this.

regards,
olivier
If the liquid's density is 1000, nu is 1000,
gas's density is 1 , nu is 1 ,
By this code, if alpha=0.5, we have nuf=\frac{0.5*1000*1000+0.5*1*1}{0.5*1000+0.5*1}=999
Its almost equals the liquid's viscosity even in where alpha is 0.5.

I dont know whether my thought is right, I will try it by your advise.Thanks!
sharonyue is offline   Reply With Quote

Old   June 26, 2013, 20:17
Default
  #14
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Quote:
Originally Posted by olivierG View Post
You can try to modify this by using some kind of tanh function instead, which would be more continuous.
hi olivier,

There are four functions about nu, nuf, mu, muf in the code of twoPhaseMixture.C, I change the function regarding "nuf" and "muf", I think its the viscosity in the face which make the liquid falling slowly. In this new function if alpha is below 0.9 or 0.95, the viscosity in the face is near to the gas's.

I wmake it, succeed. As of I am newbie to programming. So now I only go this far and being stuck by linking this libso to interFoam, But I think its easy for some others, I attached my twoPhaseMixture.C, if you or someone else have an interest into it. try to wmake it and see the result.

I am learning ro program and keep going to handle this.
Attached Images
File Type: jpg new function.jpg (40.1 KB, 61 views)
Attached Files
File Type: gz incompressible.tar.gz (10.0 KB, 19 views)
File Type: gz interFoamweirdnuTEST.tar.gz (10.0 KB, 12 views)
sharonyue is offline   Reply With Quote

Old   October 30, 2013, 21:58
Default
  #15
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Sorry, very late.

In leisure time, I check this out again, and find this "velocity getting slow" thing is not incurred by the nu. I attached an image using the new nu field. In this solver I make the nu in the liquid boundary is the almost the same as the gas. But velocity is still slow. I think its because the UEqn. And it needs much deeper consideration how to keep the dropping velocity and have a stable liquid phase boundary. Even this is not my project, but I am wondering if VOF can simulate solid ball dropping.
sharonyue 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
InterFoam stops after deltaT goes to 1e14 francesco_b OpenFOAM Running, Solving & CFD 9 July 25, 2020 06:36
interFoam vs. simpleFoam channel flow comparison DanM OpenFOAM Running, Solving & CFD 12 January 31, 2020 15:26
Perfect fluid implementation - interFoam Gaetano OpenFOAM Programming & Development 7 January 26, 2013 12:54
Segmentation fault in interFoam run through openMPI voingiappone OpenFOAM 16 November 2, 2011 06:49
Open Channel Flow using InterFoam type solver sxhdhi OpenFOAM Running, Solving & CFD 3 May 5, 2009 21:58


All times are GMT -4. The time now is 10:44.