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

Different nu effects the amount of gravity?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By wyldckat
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 29, 2015, 10:01
Default Different nu effects the amount of gravity?
  #1
Member
 
Rickard Hidefjäll
Join Date: Jun 2009
Location: Uppsala, Sweden
Posts: 39
Rep Power: 17
SkunkWorks is on a distinguished road
Hi look at http://youtu.be/ueMCheEpMrk

interMixingFoam with nu=1; in the square hanging in the air (marked as other. The colon on the left side have nu=1e-6 equal to water.
The colon are falling faster than the square. It should be the other way around of the fact that the square just have air under and not water.

And look at http://youtu.be/oKsIfmoJc6w

interMixingFoam with nu=1e-6 in the square hanging in the air (marked as other. The colon on the left side have nu=1e-6 equal to water.
The colon are now falling equal fast as the square, which it didn't in the other video http://youtu.be/ueMCheEpMrk .

Is something wrong with the software? Or have I done some thing wrong?

Here is the changes of the interMixingFoam :
(I ran both it in parallel with 8 cores, but that should not effect the result. it took app. 45 minutes.)

In transportProperties
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

phases (air other water);

air
{
    transportModel  Newtonian;
    nu              nu [0 2 -1 0 0 0 0] 1.48e-05;
    rho             rho [1 -3 0 0 0 0 0] 1;
}

other
{
    transportModel  Newtonian;
    nu              nu [0 2 -1 0 0 0 0]  1; //change this to 1e-6 to get the ohter simulation.
    rho             rho [1 -3 0 0 0 0 0] 1010;
}

water
{
    transportModel  Newtonian;
    nu              nu [0 2 -1 0 0 0 0]  1e-6;
    rho             rho [1 -3 0 0 0 0 0] 1000;
}

// Surface tension coefficients
sigma12           sigma12 [1 0 -2 0 0 0 0] 0.05;
sigma13           sigma13 [1 0 -2 0 0 0 0] 0.04;

// Diffusivity between miscible phases
D23               D23   [0 2 -1 0 0 0 0]  3e-09;

// ************************************************************************* //
in setFieldsDict

Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

defaultFieldValues
(
    volScalarFieldValue alpha.air 1
    volScalarFieldValue alpha.other 0
    volScalarFieldValue alpha.water 0
);

regions
(
    boxToCell
    {
        box (0 0 -1) (0.1461 0.292 1);
        fieldValues
        (
            volScalarFieldValue alpha.air 0
            volScalarFieldValue alpha.other 0
            volScalarFieldValue alpha.water 1
        );
    }
    boxToCell
    {
        box (0.2 0.3 -1) (0.4 0.5 1);
        fieldValues
        (
            volScalarFieldValue alpha.air 0
            volScalarFieldValue alpha.other 1
            volScalarFieldValue alpha.water 0
        );
    }
);


// ************************************************************************* //
controlDict
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     interMixingFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         5;

deltaT          0.0001;

writeControl    adjustableRunTime;

writeInterval   0.01;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression compressed;

timeFormat      general;

timePrecision   6;

runTimeModifiable yes;

adjustTimeStep  yes;
//adjustTimeStep  no;

maxCo           0.5;
maxAlphaCo      0.5;

maxDeltaT       1;


// ************************************************************************* //
blockMeshDict
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.146;

vertices
(
    (0 0 0)
    (2 0 0)
    (2.16438 0 0)
    (4 0 0)
    (0 0.32876 0)
    (2 0.32876 0)
    (2.16438 0.32876 0)
    (4 0.32876 0)
    (0 4 0)
    (2 4 0)
    (2.16438 4 0)
    (4 4 0)
    (0 0 0.1)
    (2 0 0.1)
    (2.16438 0 0.1)
    (4 0 0.1)
    (0 0.32876 0.1)
    (2 0.32876 0.1)
    (2.16438 0.32876 0.1)
    (4 0.32876 0.1)
    (0 4 0.1)
    (2 4 0.1)
    (2.16438 4 0.1)
    (4 4 0.1)
);

blocks
(
    hex (0 1 5 4 12 13 17 16) (92 32 1) simpleGrading (1 1 1)
    hex (2 3 7 6 14 15 19 18) (76 32 1) simpleGrading (1 1 1)
    hex (4 5 9 8 16 17 21 20) (92 168 1) simpleGrading (1 1 1)
    hex (5 6 10 9 17 18 22 21) (16 168 1) simpleGrading (1 1 1)
    hex (6 7 11 10 18 19 23 22) (76 168 1) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
    leftWall
    {
        type wall;
        faces
        (
            (0 12 16 4)
            (4 16 20 8)
        );
    }
    rightWall
    {
        type wall;
        faces
        (
            (7 19 15 3)
            (11 23 19 7)
        );
    }
    lowerWall
    {
        type wall;
        faces
        (
            (0 1 13 12)
            (1 5 17 13)
            (5 6 18 17)
            (2 14 18 6)
            (2 3 15 14)
        );
    }
    atmosphere
    {
        type patch;
        faces
        (
            (8 20 21 9)
            (9 21 22 10)
            (10 22 23 11)
        );
    }
);

mergePatchPairs
(
);

// ************************************************************************* //

Last edited by wyldckat; January 29, 2015 at 16:49. Reason: Added [CODE][/CODE]
SkunkWorks is offline   Reply With Quote

Old   January 29, 2015, 16:57
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Rickard,

This is so cool! It looks like a magic trick !
My best guesses without testing are:
  1. A fluid with nu=1 has a good gliding capability, since the fluid particles don't tear apart.
  2. The pressure is not homogeneous enough at the initial time.
  3. The solver might not be usable for such a high nu value.

I'll have a look into it during this coming weekend. But first a few questions:
  1. Which OpenFOAM version are you using?
  2. Are you using the tutorial "multiphase/interMixingFoam/laminar/damBreak" as a basis?
Best regards,
Bruno
SkunkWorks likes this.
__________________
wyldckat is offline   Reply With Quote

Old   January 29, 2015, 17:47
Default
  #3
Member
 
Rickard Hidefjäll
Join Date: Jun 2009
Location: Uppsala, Sweden
Posts: 39
Rep Power: 17
SkunkWorks is on a distinguished road
Hi!
And thanks!

I use OpenFOAM 2.3.1
Kubuntu 14.04
i7 3.2Ghz (the first edition)
24Gb RAM
(It took 45 minutes used all 8 core)

Regards / Rickard Hidefjäll

---------------

Sorry!
Yes I do use the interMixingFoam tutorial case from start.

Last edited by wyldckat; January 31, 2015 at 08:38. Reason: merged posts, since they were posted a minute apart
SkunkWorks is offline   Reply With Quote

Old   January 31, 2015, 09:12
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Rickard,

Well this is certainly an interesting test case that can showcase the importance of the dynamic viscosity (mu) between fluids. Here's an example of what I'm referring to:
Code:
air
{
    transportModel  Newtonian;
    nu              nu [0 2 -1 0 0 0 0] 1.48e-05;
    rho             rho [1 -3 0 0 0 0 0] 1;
}

other
{
    transportModel  Newtonian;
    nu              nu [0 2 -1 0 0 0 0]  1.48e-1;
    rho             rho [1 -3 0 0 0 0 0] 1000;
}

water
{
    transportModel  Newtonian;
    nu              nu [0 2 -1 0 0 0 0]  1e-6;
    rho             rho [1 -3 0 0 0 0 0] 1000;
}
Now, in case you're not aware, this is briefly explained here: http://openfoamwiki.net/index.php/FA...ble_solvers.3F

  • \mu is the dynamic viscosity (mu).
  • \rho is the fluid's density (rho).
  • \nu=\frac{\mu}{\rho} is the kinematic viscosity (nu).
And why is the dynamic viscosity important? If you look at the values in the example above:
  • air: \mu={1.481 \times 10^{-5}} \times 1.0 = 1.48 \times 10^{-5}
  • other: \mu={1.48 \times 10^{-1}} \times 1000.0 = 1.48 \times 10^{2}
  • water: \mu={1 \times 10^{-6}} \times 1000.0 = 1 \times 10^{-3}
Now, if you subtract the largest from the smallest: 1.48e2 - 1.48e-05 = 147.9999852
Notice anything strange yet? Well, it's simple: the solver was not designed to compensate for such large numerical discrepancies, because "147.9999852" is almost identical to "148", which means that the number of computational errors that occur due to this very small difference are far greater than the remaining values being calculated.

If you increase even more to \nu=1.48 \times 10^{3}, the block barely moves. As time progresses, it then happens something very similar to this: http://www.cfd-online.com/Forums/ope...ckerboard.html


Note: the reason for choosing \nu=1.48 \times 10^{-1} for the "other" fluid was because I was confusing how dynamic and kinematic viscosity relate to each other.


Conclusion: this is not a bug. It simply means that the solver was not designed to handle such large differences in the fluids' properties.

Best regards,
Bruno
linyanx likes this.
__________________

Last edited by wyldckat; January 31, 2015 at 09:21. Reason: fixed mathematical expressions
wyldckat is offline   Reply With Quote

Old   February 1, 2015, 18:09
Default Thanks a lot!
  #5
Member
 
Rickard Hidefjäll
Join Date: Jun 2009
Location: Uppsala, Sweden
Posts: 39
Rep Power: 17
SkunkWorks is on a distinguished road
Hi and Thanks for a fast and lightning response!

Do you have a suitable solver in mind?
My goal is to simulate a new kind of toilette.

Best regards / Rickard Hidefjäll
SkunkWorks is offline   Reply With Quote

Old   February 3, 2015, 15:58
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Rickard,

I've never used it myself, but perhaps multiphaseEulerFoam can get the job done?
For more details: http://www.cfd-online.com/Forums/ope...eulerfoam.html

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 3, 2015, 15:59
Default
  #7
Member
 
Rickard Hidefjäll
Join Date: Jun 2009
Location: Uppsala, Sweden
Posts: 39
Rep Power: 17
SkunkWorks is on a distinguished road
Lots ofta tank !!!
SkunkWorks is offline   Reply With Quote

Reply

Tags
bug?, intermixingfoam


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
Convergence problem when use gravity aroma STAR-CCM+ 1 April 10, 2013 11:18
Question on Gravity archdevil Main CFD Forum 9 May 16, 2012 14:31
variation of gravity with time rajani FLUENT 0 February 16, 2005 03:45
On gravity modelling... Drona CFX 7 November 22, 2001 11:28
Effects of gravity in pipe - pressure distribution Anthony Wachs FLUENT 2 July 25, 2001 08:07


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