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

Having various problems simulating a multiphase channel flow

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 24, 2016, 18:29
Default Having various problems simulating a multiphase channel flow
  #1
mf3
New Member
 
faride.bahrami
Join Date: Mar 2016
Location: Iran
Posts: 10
Rep Power: 10
mf3 is on a distinguished road
Hi everyone :
When I try to run my case i get this error in terminal:



Code:
--> FOAM FATAL IO ERROR: 
keyword PIMPLE is undefined in dictionary "/home/a/Desktop/Tfinal/system/fvSolution"

file: /home/a/Desktop/Tfinal/system/fvSolution from line 81 to line 74.

    From function dictionary::subDict(const word& keyword) const
    in file db/dictionary/dictionary.C at line 648.
And this is my fvsolution file:
Code:
solvers
{
    alpha.water
    {
        nAlphaCorr      1;
        nAlphaSubCycles 2;
        cAlpha          1;
    }

    pcorr
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-10;
        relTol          0;
    }

    p_rgh
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-07;
        relTol          0.05;
    }

    p_rghFinal
    {
        $p_rgh;
        relTol          0;
   "pcorr.*"
    {
        $p_rghFinal;
        tolerance       0.0001;
    }

    "(U|k|epsilon)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-8;
        relTol          0.1;
    }

    "(U|k|epsilon)Final"
    {
        $U;
        relTol          0;
    }
}


PIMPLE
{
    momentumPredictor no;
    nCorrectors     3;

    nNonOrthogonalCorrectors 0;

    pRefPoint      (0.51 0.51 .51);
    pRefValue      0;
}
Please help me what can i do?

Best regards!

Faride.

Last edited by wyldckat; September 11, 2016 at 09:01. Reason: Added [CODE][/CODE] markers
mf3 is offline   Reply With Quote

Old   July 25, 2016, 04:24
Default
  #2
New Member
 
Amelie Rohlfs
Join Date: Jan 2013
Posts: 19
Rep Power: 13
AmRo is on a distinguished road
Hello Faride,

you should check your brackets, there might be missing something at p_rghFinal.

Greetings, Amelie
AmRo is offline   Reply With Quote

Old   July 25, 2016, 07:56
Default
  #3
mf3
New Member
 
faride.bahrami
Join Date: Mar 2016
Location: Iran
Posts: 10
Rep Power: 10
mf3 is on a distinguished road
Thanks Amelie for your reply.ur right.I checked my fvsolution and I missed a " } " .
mf3 is offline   Reply With Quote

Old   July 25, 2016, 16:54
Default OpenFOAM Running
  #4
mf3
New Member
 
faride.bahrami
Join Date: Mar 2016
Location: Iran
Posts: 10
Rep Power: 10
mf3 is on a distinguished road
when i run case like weiroverflow with interDyMFoam in 2D, the follownig contents occured in the terminal,but when I use interfoam there is no problem.

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?#0
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/opt/openfoam30/platforms/linuxGccDPInt32Opt/lib/libOpenFOAM.so"
#3 ? at tensorField.C:?
#4 ? at ??:?
#5 ? at ??:?
#6 ? at ??:?
#7 ? at ??:?
#8 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#9 ? at ??:?
Floating point exception (core dumped)

I attach my files .Any help is much appreciated.

Thank you,
Best Regards
Faride
Attached Files
File Type: docx fvsolution.docx (4.6 KB, 4 views)
File Type: docx fvscheme.docx (4.3 KB, 4 views)
File Type: docx log.docx (5.4 KB, 8 views)

Last edited by mf3; July 26, 2016 at 11:42.
mf3 is offline   Reply With Quote

Old   July 27, 2016, 07:00
Default
  #5
New Member
 
Join Date: Oct 2014
Posts: 26
Rep Power: 12
teuk is on a distinguished road
Hi mf3,

obviously it crashes in the p_rgh solving process. Not sure why. Mabe this helps? Are you sure about your relaxation factors?


regards,
teuk
teuk is offline   Reply With Quote

Old   July 27, 2016, 14:06
Default
  #6
mf3
New Member
 
faride.bahrami
Join Date: Mar 2016
Location: Iran
Posts: 10
Rep Power: 10
mf3 is on a distinguished road
Hi Teuk,
Thank u for your reply.
but I check my relaxationfactors and changed it like this:
relaxationFactors
{
fields
{
p 0.3;
}
equations
{
"U.*" 0.7;
"k.*" 0.7;
"epsilon.*" 0.7;
}
}

but it doesn't work .I don't know what should I do? Is that coz I use interDyMFoam for 2D case?Anyone know how can I change the codes for using inerDyMFoam in 2D?
mf3 is offline   Reply With Quote

Old   August 16, 2016, 18:41
Default OpenFOAM Running
  #7
mf3
New Member
 
faride.bahrami
Join Date: Mar 2016
Location: Iran
Posts: 10
Rep Power: 10
mf3 is on a distinguished road
Hi Friends:
My case is quit easy,its a rectangular channel of dimension 6*.3*.4 (length ,height , width) that a profile located in the bottom of the channel with length 2.5 m.I should imposed a supercritical flow inlet and subcritical floe outlet.I mean i should have a constant flow depth y1= .053 m at the inlet and a constant flow depth y2=.158 m at the outlet.I used this B.C but when i run whit interFoam i get this error:

Invalid wall function specification
Patch type for patch inlet-2 must be wall
Current patch type is genericPatch

I attached my case .I dont know whats wrong, so any kind of help would be wonderfull!

Thanks.

blockMesh:
Code:
 /*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v3.0+                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters  1;

vertices
(

    (0 0 0)//0
    (6 0 0)//1
    (6 .053 0) //2
    (0 .053  0)//3

    (0 0 .5)//4
    (6 0 .5)//5
    (6 .053 .5)//6
    (0 .053 .5)//7

    (0 .158 0)//8
    (6 .158 0)//9
    (6 .158 .5)//10
    (0 .158 .5)//11
    

     (0 .3 0)//12
     (6 .3  0)//13
     (6 .3 .5)//14
     (0 .3 .5)//15
   
   
   
);

blocks
(
   hex (0 1 2 3 4 5 6 7) (400 4 1) simpleGrading (1 1 1)  
    hex (3 2 9 8 7 6 10 11) (400 7 1) simpleGrading (1 1 1) 
     hex (8 9 13 12 11 10 14 15) (400 10 1) simpleGrading (1 1 1)     
);

edges
(
);

boundary
(
   outlet-1
    {
        type patch;
        faces
        (
            (1 2 6 5)
            (2 9 10 6)
            
            
        );
    }
 outlet-2
    {
        type wall;
        faces
        (
            (9 13 14 10)
           
            
        );
    }
    inlet-1
    {
        type   patch;
        faces
        (
            (0 3 7 4)
            
        );
    }
     inlet-2
    {
        type *   wall;
        faces
        (
            (3 8 11 7)
            (8 12 15 11)
            
        );
    }
    atmosphere
    {
        type patch;
        faces
        (
            (12 15 14 13)
           
        );
    }
    bottom
    {
        type   wall;
        faces
        (
            (0 4 5 1)
           
        );
    }

    front
    {
        type patch;
        faces
        (
            (5 6 7 4)
            (6 10 11 7)
            (10 14 15 11)
        );
    }
      back
    {
        type patch;
        faces
        (
            (1 2 3 0)
            (2 9 8 3)
           (9 13 12 8)
           
        );
    }
  
);

mergePatchPairs
(
);

// ************************************************************************* //
U:

Code:
 dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0.0001 0 0);

boundaryField
{ 
    atmosphere
    {
        type          zeroGradient;
    }   
  
  inlet-1          // mghale1:f(y)           mghale2:fixedValue
    {
        type            fixedValue;
    value        uniform (1.76 0 0);
    }
    inlet-2
    {
        type            fixedValue;
     
    value        uniform (0 0 0);
    }
   outlet-1    //maghale1:f(y)       maghale 2: zeroGradient
    {
        type            zeroGradient;
    }
 outlet-2
    {
       type            fixedValue;
       value           uniform (0 0 0);
    }

    front

    {
        type            empty;
    }

    back

    {
        type            empty;
    }
   

     profile

    {       
        type            fixedValue;
    value        uniform (0 0 0);
    }
      
      bottom
    {
        type            fixedValue;
    value        uniform (0 0 0);
    }
}
Prgh

Code:
 dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 0.0001;

boundaryField
{
      atmosphere
    {
        type            fixedValue;
    value        uniform 0;
    }

    inlet-1       
    {
        type           zeroGradient;
    }
    inlet-2
    {
        type            zeroGradient;
    }
    outlet-1            //f(y) dota maghele
    {
        type          fixedValue; 
        value            uniform 774.2;
    
    }
     outlet-2        
    {
        type            zeroGradient;
    }
    front
    {
        type            empty;
    }
    back
    {
        type            empty;
    }
    bottom
    {
        type            zeroGradient;
    }

     profile
    {
         type    zeroGradient;
     }
}
Alpha
Code:
dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0.0001;

boundaryField
{
   atmosphere
    {
         type         zeroGradient;
        
       
    }
   
    inlet-1
    {
        type            fixedValue;
    value        uniform 1;
    }

    inlet-2
    {
        type            zeroGradient;
    
    }

    outlet-1
    {
         type            fixedValue;
    value        uniform 1;
    }
      outlet-2
    {
       
        type            zeroGradient;
    }
      bottom
    {
        type            zeroGradient;
    }

    front
    {
        type            empty;
    }
    back
    {
        type            empty;
    }
    bottom
    {
        type            zeroGradient;
    }
    profile
    {
       type    zeroGradient;
    }
}

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

Last edited by wyldckat; September 11, 2016 at 09:04. Reason: Added [CODE][/CODE] markers
mf3 is offline   Reply With Quote

Old   September 7, 2016, 05:43
Default openFoam runing
  #8
mf3
New Member
 
faride.bahrami
Join Date: Mar 2016
Location: Iran
Posts: 10
Rep Power: 10
mf3 is on a distinguished road
Hi
I want to simulate the open-channel flow over a transition structure over that's located at the bottom of the channel. above this profile water level changes from sup to sub-critical flow without hydraulic jump.in my simulation the water level drops but in experimental result shouldn't drop.I dont know what B.C should use to simulate the correct result.in the picture in attache file I showed my result.

Code:
 FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (1.76 0 0);

boundaryField
{ 
    atmosphere
    {
        type            pressureInletOutletVelocity;
        value           uniform (0 0 0);
    }   
     outlet-1 
    {
        type            zeroGradient;
    }
    outlet-2
    {
       type            fixedValue;
       value           uniform (0 0 0);
    }
    inlet-1
    {
        type            fixedValue;
    value        uniform (1.76 0 0);
    }
    inlet-2
    {
        type            fixedValue;
    value        uniform (0 0 0);
    }
    front
    {
        type            empty;
    }
    back
    {
        type            empty;
    }
    bottom
    {
        type            fixedValue;
    value        uniform (0 0 0);
    }

     profile
    {       
        type            fixedValue;
    value        uniform (0 0 0);
    }
      
}
Code:
 FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
      atmosphere
    {
        type            totalPressure;
    p0        uniform 0;
    }

    inlet-1       
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
    inlet-2
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
    outlet-1
    {
      
        type            totalPressure;
    p0        uniform 0; // type            fixedFluxPressure;
        //value           uniform 0;
    }
     outlet-2        
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
    front
    {
        type            empty;
    }
    back
    {
        type            empty;
    }
    bottom
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }

     profile
    {
        type            fixedFluxPressure;
        value           uniform 0;
     }
}
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0.0001;

boundaryField
{
   atmosphere
    {
//         type         zeroGradient;
        type            inletOutlet;
        inletValue      uniform 0;
        value           uniform 0;      
    }
   
    inlet-1
    {
        type            fixedValue;
    value        uniform 1;
    }

    inlet-2
    {
        type            zeroGradient;//fixedValue;
//    value        uniform 0;
    }

    outlet-1
    {
        type            zeroGradient; // type            fixedValue;
    //value        uniform 1;
    }
      outlet-2
    {
       
        type            zeroGradient;
    }
      bottom
    {
        type            zeroGradient;
    }

    front
    {
        type            empty;
    }
    back
    {
        type            empty;
    }
    bottom
    {
        type            zeroGradient;
    }
    profile
    {
       type    zeroGradient;
    }
}

// ************************************************************************* //
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters  1;

vertices
(

    (0 0 0.1)//0
    (4.5 0 0.1)//1
    (4.5 .053 0.1) //2
    (0 .053  0.1)//3

    (0 0 .115)//4
    (4.5 0 .115)//5
    (4.5 .053 .115)//4.5
    (0 .053 .115)//7

    (0 .2 0.1)//8
    (4.5 .2 0.1)//9
    (4.5 .2 .115)//10
    (0 .2 .115)//11
    

     (0 .3 0.1)//12
     (4.5 .3  0.1)//13
     (4.5 .3 .115)//14
     (0 .3 .115)//15
   
   
   
);

blocks
(
   hex (0 1 2 3 4 5 6 7) (400 4 1) simpleGrading (1 1 1)  
    hex (3 2 9 8 7 6 10 11) (400 10 1) simpleGrading (1 1 1) 
     hex (8 9 13 12 11 10 14 15) (400 7 1) simpleGrading (1 1 1)     
);

edges
(
);

boundary
(
   outlet-1
    {
        type patch;
        faces
        (
            (1 2 6 5)
            (2 9 10 6)
            
            
        );
    }
 outlet-2
    {
        type wall;
        faces
        (
            (9 13 14 10)
           
            
        );
    }
    inlet-1
    {
        type patch;
        faces
        (
            (0 3 7 4)
            
        );
    }
     inlet-2
    {
        type wall;
        faces
        (
            (3 8 11 7)
            (8 12 15 11)
            
        );
    }
    atmosphere
    {
        type patch;
        faces
        (
            (12 15 14 13)
           
        );
    }
    bottom
    {
        type wall;
        faces
        (
            (0 4 5 1)
           
        );
    }

    front
    {
        type empty;
        faces
        (
            (5 6 7 4)
            (6 10 11 7)
            (10 14 15 11)
        );
    }
      back
    {
        type empty;
        faces
        (
            (1 2 3 0)
            (2 9 8 3)
           (9 13 12 8)
           
        );
    }
  
);

mergePatchPairs
(
);

// ************************************************************************* //
Thank you for help me.


Attached Images
File Type: jpg photo_2016-09-07_13-06-22.jpg (23.8 KB, 63 views)
File Type: png Selection_001.png (10.7 KB, 56 views)

Last edited by wyldckat; September 11, 2016 at 09:05. Reason: Added [CODE][/CODE] markers
mf3 is offline   Reply With Quote

Old   September 13, 2016, 16:46
Default
  #9
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
Quick answer: I received the PM you sent me. I don't have enough time to look into your case, so the best I can do is suggest that you study the course presentation and cases that are provided here: http://www.openfoamworkshop.org/courses - look for the presentation "Learning how to use free surface flows in OpenFOAM 3.0" and click on the download link to the right of the entry "Training Material".
__________________
wyldckat is offline   Reply With Quote

Old   November 8, 2016, 02:47
Default Problem modeling hydraulic jump in an open channel with interFoam (VoF)
  #10
mf3
New Member
 
faride.bahrami
Join Date: Mar 2016
Location: Iran
Posts: 10
Rep Power: 10
mf3 is on a distinguished road
Hi
i want to simulate a hydraulic jump in a rectangular channel ..

U
Code:
dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (1.01937 0 0);

boundaryField
{ 
    atmosphere
    {
        type            pressureInletOutletVelocity;
        value           uniform (0 0 0);
    }   
     outlet-1 
    {
        type           inletOutlet;
         inletValue  uniform (0 0 0);
    }
    outlet-2
    {
       type            fixedValue;
       value           uniform (0 0 0);
    }
    inlet-1
    {
        type            fixedValue;
        value        uniform (1.355544 0 0);
    }
    inlet-2
    {
        type            fixedValue;
        value        uniform (0 0 0);
    }
    front
    {
        type         empty;
    }
    back
    {
        type            empty;
    }
    bottom
    {
        type            fixedValue;
        value        uniform (0 0 0);
    }
    upWall
    {
       type            fixedValue;
       value        uniform (0 0 0);
       
    } 
    profile
    {       
        type            fixedValue;
        value        uniform (0 0 0);
    }
      
}
P
Code:
dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    atmosphere
    {
        type            totalPressure;
        p0        uniform 0;
    }

    inlet-1       
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
    inlet-2
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
    outlet-1
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
     outlet-2        
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
    front
    {
        type           empty;
    }
    back
    {
        type            empty;
    
    }
    bottom
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
    upWall
    {
       type            fixedFluxPressure;
        value           uniform 0;
       
    } 

     profile
    {
        type            fixedFluxPressure;
        value           uniform 0;
     }
}
With my setting I obtain an hydraulic jump that is not stationary, indeed the hydraulic jump is pushed from downstream to upstream.
Do you have any suggestion for obtaining the stationary hydraulic jump?


Thanks in advance.
-Faride

Last edited by wyldckat; November 13, 2016 at 12:37. Reason: Added [CODE][/CODE] markers
mf3 is offline   Reply With Quote

Old   November 13, 2016, 12:42
Default
  #11
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
Quote:
Originally Posted by mf3 View Post
With my setting I obtain an hydraulic jump that is not stationary, indeed the hydraulic jump is pushed from downstream to upstream.
Do you have any suggestion for obtaining the stationary hydraulic jump?
Quick answer: Sorry, without images, it's not clear to me what you mean by "stationary hydraulic jump"
__________________
wyldckat is offline   Reply With Quote

Old   November 14, 2016, 06:49
Default
  #12
mf3
New Member
 
faride.bahrami
Join Date: Mar 2016
Location: Iran
Posts: 10
Rep Power: 10
mf3 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer: Sorry, without images, it's not clear to me what you mean by "stationary hydraulic jump"
Hi
Dear mr.santos

Thanks a lot for you consideration.

My case is a rectangular channel of dimension 4.5*.3*.4 (length ,height , width) that a transition structure is located at the bottom of it with length 2.5 m.This transition was designed based on the energy principle and the singular point theory to gradually increase the flow depth,thereby eliminating the hydraulic jump.
I should imposed a supercritical flow inlet and subcritical floe outlet.I mean i should have a constant flow depth y1= .053 m at the inlet and a constant flow depth y2=.158 m at the outlet.
EXPERIMENT: A weak hydraulic jump is formed at the transition
downstream end, which then moves upstream by increasing the
tailwater. The hydraulic jump weakens during its move towards
the crest of the structure. By further increase in the tailwater,
once it reaches y2opt, the hydraulic jump for the upstream
design Froude number is avoided completely and this is steady state. At this stage, the
flow depth, which is close to the crest, is identical to the critical
depth.
In my simulation is formed a weak hydraulic jump and moves towards upstream .when it reaches at crest of the transition ,it becomes weak and we don't see hydraulic jump but this isn't steady state and after some seconds is formed a wave and moved towards inlet and level of the water is increased. I want to have a steady state like experiment.
Also I like to know how can we impose y2(desired water depth at the outlet)? I use try and error ant it's time consuming .

Thanks in advanced.
Attached Images
File Type: png 2016-11-12_14-14-44.png (98.8 KB, 39 views)
File Type: png Screenshot from 2016-09-15 14_55_17.png (7.9 KB, 36 views)
File Type: png lab.png (51.7 KB, 35 views)
File Type: png Screenshot from 2016-09-15 14_54_48.png (9.5 KB, 37 views)
File Type: png Selection_009.png (8.4 KB, 34 views)
mf3 is offline   Reply With Quote

Old   November 14, 2016, 18:32
Default
  #13
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
Quick answer: I've gotten a better sense of what you're trying to simulate, but it would help if you had a few pictures or movie or animation of the real life experiment.
I ask this because if I'm understanding things correctly, the problem you are having has to do with how the boundary conditions are affecting both the air phase and the water phase at the same time. Because of that, you also get air drag against the water surface, which is possibly helping to cause the instability.
For example, take a look at the U file and you have this:
Code:
internalField   uniform (1.01937 0 0);
That means that both air and water are moving at the same speed when it starts. That's sort of like having a tree log on top of the water already going at 1.02 m/s over X and it hits the obstacle directly, without increasing its height first.

My advice is that you start with an empty channel, filled with air that is stationary. Then inject water into the channel with a gradually increasing velocity. I believe the tutorial "incompressible/pimpleFoam/TJunction" has the example for a single phase simulation, but you should be able easily adapt this to the multiphase simulation.

The reason why starting from an empty tank is important is so that you can at least see how the air phase is disturbed when you start injecting fluid.

By the way, I also suggest that since this a type of simulation that takes a long time to run, first run a pseudo-2D case like the "damBreak" from the User Guide, to see what to expect.


As for imposing the water height at the exit... use the "fixedValue" boundary condition at the outlet and then use setFields to enforce the value on that outlet. See here: https://github.com/OpenFOAM/OpenFOAM...FieldsDict#L38
WaterHammer1985 likes this.
wyldckat is offline   Reply With Quote

Old   November 15, 2016, 07:57
Default
  #14
mf3
New Member
 
faride.bahrami
Join Date: Mar 2016
Location: Iran
Posts: 10
Rep Power: 10
mf3 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer: I've gotten a better sense of what you're trying to simulate, but it would help if you had a few pictures or movie or animation of the real life experiment.
I ask this because if I'm understanding things correctly, the problem you are having has to do with how the boundary conditions are affecting both the air phase and the water phase at the same time. Because of that, you also get air drag against the water surface, which is possibly helping to cause the instability.
For example, take a look at the U file and you have this:
Code:
internalField   uniform (1.01937 0 0);
That means that both air and water are moving at the same speed when it starts. That's sort of like having a tree log on top of the water already going at 1.02 m/s over X and it hits the obstacle directly, without increasing its height first.

My advice is that you start with an empty channel, filled with air that is stationary. Then inject water into the channel with a gradually increasing velocity. I believe the tutorial "incompressible/pimpleFoam/TJunction" has the example for a single phase simulation, but you should be able easily adapt this to the multiphase simulation.

The reason why starting from an empty tank is important is so that you can at least see how the air phase is disturbed when you start injecting fluid.

By the way, I also suggest that since this a type of simulation that takes a long time to run, first run a pseudo-2D case like the "damBreak" from the User Guide, to see what to expect.


As for imposing the water height at the exit... use the "fixedValue" boundary condition at the outlet and then use setFields to enforce the value on that outlet. See here: https://github.com/OpenFOAM/OpenFOAM-4.x/blob/master/applications/utilities/preProcessing/setFields/setFieldsDict#L38


Thanks a lot for your reply.
when I forced the outlet water depth imposing a given value of alpha,my simulations crashed.I know I have to impose an outlet velocity or (hydrostatic)pressure that cause the desired water depth to accrue.but I dont know which boundary conditions for U or p should I use?
I use inletOutlet for U and FixedFluxepressure for p-rgh at the outlet.

In attached file you can see the movies of real life experiment.

let me explain how to do my simulation
i divided the outlet in 2 segment: outlet--1 patch y1
outlet-2 wall y2
and I do my simulation in 3 step:
step-1:

y1=.1 y2=.2
with this setting I have supercritical flow all over the channel.like picture1.

step-2:
when I want ( for example close the gate )I set outlet like this: y1=.053 y2=.247 and use mapfields from step-1.
In this step is formed a weak hydraulic jump and moves to upstream.


step -3:when hydraulic jump is formed after some second before the wave reaches to transition I changes the outlet B.C like this:
y1=.15 y2=.15
and use mapfeilds frome step-2

I have to use try and error to get the desired water depth at outlet.But in experiment by setting the gate we can get
desired water depth at outlet.
Please let me know whether this method is correct or not?
For the high capacity of
movies and animations,it's not impossible to uplode them.I try to show them in images that are attached.
In step-3 with try and error I get good result in some seconds but after that is formed a wave again and moves towards upstream.I don't want to have this wave .

Thanks a lot.



Attached Images
File Type: png step-2.png (6.8 KB, 31 views)
File Type: png step-2.Time1.png (7.9 KB, 30 views)
File Type: png step-1.png (4.5 KB, 35 views)
File Type: jpg 6886.jpg (55.0 KB, 35 views)
File Type: png 866.png (44.6 KB, 24 views)
mf3 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
Calculating mass flow rate at multiphase flows Kuslo187 OpenFOAM Post-Processing 1 August 21, 2015 19:11
Gravitational water flow in closed channel. Szymon85 CFX 7 September 3, 2013 17:28
Periodic channel flow with time dependent mass flow rate QBeast FLUENT 3 May 10, 2013 14:14
Multiphase flow problems Shane Gillis FLUENT 2 August 10, 2000 02:06
compressible channel flow.. R.D.Prabhu Main CFD Forum 0 July 17, 1998 18:23


All times are GMT -4. The time now is 09:01.