CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   interFoam | Hydraulic Jump | Correct boundary condition p_rgh (http://www.cfd-online.com/Forums/openfoam-solving/111881-interfoam-hydraulic-jump-correct-boundary-condition-p_rgh.html)

pythag0ra5 January 17, 2013 04:48

interFoam | Hydraulic Jump | Correct boundary condition p_rgh
 
Dear fellows,

at the moment, i want to simulate the open-channel-flow over some kind of "ramp". I expect that under certain flow conditions, a wave occurs (i think the correct term for this flow phenomena is "hydraulic jump", please correct me if i am wrong). Below, you will find a picture:

http://people.fh-landshut.de/%7Emehrenwi/1.png

The inlet is at the left side, outlet is on the right side. The inlet-boundary-conditions are:

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform (0 0 0);

boundaryField
{
    inlet
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }

    outlet
    {
      type            zeroGradient;
    }
   
    ground
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
   
    atmosphere
    {
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }
   
    front
    {
        type            empty;
    }

    back
    {
        type            empty;
    }
   
    ramp
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
   
    lower_inlet
    {
        type            fixedValue;
        value          uniform (2 0 0);
    }
}


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

I prepared to p_rgh files which yield different results. The first one (you can find an animation under people.fh-landshut.de/~mehrenwi/constant/constant.avi) looks like:

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 0;

boundaryField
{
    inlet
    {
        type            buoyantPressure;
        value          uniform 0;
    }

    outlet
    {
        type            buoyantPressure;
        value          uniform 0;
    }
   
    ground
    {
        type            buoyantPressure;
        value          uniform 0;
    }

    atmosphere
    {
        type            totalPressure;
        p0              uniform 0;
        U              U;
        phi            phi;
        rho            rho;
        psi            none;
        gamma          1;
        value          uniform 0;
    }

    front
    {
        type            empty;
    }
   
    back
    {
        type            empty;
    }
   
    ramp
    {
        type            buoyantPressure;
        value          uniform 0;
    }
   
    lower_inlet
    {
        type            buoyantPressure;
        value          uniform 0;
    }
}

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

The second p_rgh file looks like:

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 0;

boundaryField
{
    inlet
    {
        type            buoyantPressure;
        value          uniform 0;
    }

    outlet
    {
    type        outletInlet;
    value        uniform 0;
    outletValue    uniform 0;
    }
   
    ground
    {
        type            buoyantPressure;
        value          uniform 0;
    }

    atmosphere
    {
        type            totalPressure;
        p0              uniform 0;
        U              U;
        phi            phi;
        rho            rho;
        psi            none;
        gamma          1;
        value          uniform 0;
    }

    front
    {
        type            empty;
    }
   
    back
    {
        type            empty;
    }
   
    ramp
    {
        type            buoyantPressure;
        value          uniform 0;
    }
   
    lower_inlet
    {
        type            buoyantPressure;
        value          uniform 0;
    }
}

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

Again, you can find an animation under people.fh-landshut.de/~mehrenwi/decreasing/decreasing.avi

Both animation represent a time of 20 seconds. You can see, that the different p_rgh-boubdary-condition at the outlet yield different result. To be honest, none of theses results look senseful for me. Do you have any hints concerning boundary conditons (or general remarks to this simulation)? One option of preventing the fluid from flowing out of the domain would be to construct a small step / wall at the outlet. Because this is physically not valid, i am not so happy with this solution, what is your opinion?

Best Regards,
Mathias

colinB January 17, 2013 05:52

Hey Mathias,

I had to do something similar for my thesis.
my BCs were:

Code:

                          U                        prgh              alpha1
airInlet              fixed Value                zeroGrad          fixedValue 1

waterInlet            fixed Value              zeroGrad          fixedValue 0

outlet                zeroGrad                  zeroGrad          zeroGrad

Top and Bottom        slip                        zeroGrad          zeroGrad

front and Back        empty                      empty              empty

However this system was ill-defined (it wanted to know a little bit more
about the pressure)
So specifying the top with atmospheric pressure might help as well as
using buoyantPressure for the bottom. But using zeroGradient at the
outlet in my opinion is necessary.
Alternatively you can specify a point or cell in the mesh with a fixed value
for the pressure which gives the system a starting point (specified
somewhere in fvSolution), if the system is ill-defined.

I hope I could contribute

regards

pythag0ra5 January 17, 2013 07:53

Hello Colin,

thank you very much for your reply. I also found this post:

http://www.cfd-online.com/Forums/ope...omparison.html

where also some bc are given. According to your tabel Top and Bottom are defined as slip walls (?), why did you do this? I would expect that the velocity at the walls is zeroGrad.

Again, i would expect that there exist a "statinoary wave" behind the ramp, this has something to do with the so called "Froude-Number". But neither in the "onstant-case" nor in the "decreasing-case" this wave occurs :(.

Thanks a lot
Mathias

colinB January 17, 2013 08:40

Hi Mathias,

I defined the top and bottom with slip, since I didn't want to have any friction/
boundary layer there. However if you modell the boundarylayer you would use
fixedValue 0 on the bottom. Also my Reynoldsnumber was rather low for I was
using a laminar flow.

But in general the BCs should be the same only the initial condition of the fluids
properties should differ.

From what I just saw: your internal field is 0 so your flow has to develop.
Secondly your speed is 2m/s at the inlet, this seems to be rather slow for a
hydraulic jump, however I don't know your domain dimensions.

My recommendation is to increase the speed and also set the internal speed
to the value you use at the inlet.

I hope I got everything alright what you were asking.

regards

pythag0ra5 January 21, 2013 19:05

Dear Collin,

sorry for being late with my reply, i tried to implement your suggestions into my model. First of all, some general remarks:

- The length before the (reverse) ramp is 50m
- The length behind the ramp equals 100m.
- The ramp itself is 5m long and 1.5m high
- The waterInlet is 1m high. To ensure a hydraulic jump, i assumed the Froude number to be 2, therefore the velocity has to be: v = sqrt(9,81m/s² * 1m) * Fr = 6,2641m/s
- The total time simulated is 120 seconds.
- I defined the boundary conditions as shown below:

http://people.fh-landshut.de/~mehren...conditions.png

Again, i prepared a video for you:

people.fh-landshut.de/~mehrenwi/video1.avi

Does this make sense to you? To be honest, not for me, especially the decreasing waterInlet (starting at 1 Minute / 10 seconds).

I'm looking forward to hearing from you again!

Best regards,
Mathias

colinB January 23, 2013 08:10

Hi Mathias,

on a short note:
did you initialize the internal filed with the same velocity as the inlet?
For there seems to occur a blockage in the end part of your domain.

I hope that helps
regards Colin

Edit: What might also help is to not set the velocity of the air to 0 but the same value as the water
to avoid friction / wave making between the two liquids. At least it minimizes the effect.

pythag0ra5 January 23, 2013 10:02

Hi Colin,

thank you very much for your reply! Just to ensure you got my problem right, i want to see the waves in the area of the ramp. Can you tell me how to set an initial velocity of the water? I will simulate then the problem with your suggestions an let you know the results.

Thank you very much for your help!

Best regards,
Mathias

colinB January 24, 2013 04:35

Dear Mathias,

please follow this link:

http://www.openfoam.org/docs/user/ba...18-1020004.2.8

look in this section for the keyword: internalField, where you can specify
a velocity vector.

Commenting the waves you are expecting:

I would expect in the outlet section a fast drop of the water level, since
the cross section of the outlet covered with water is bigger than the
cross section on the inlet.
Later when the flow and the water level has stabilized one should see the
hydraulic jump in the end part of the domain.
Waves I also would only expect in the end of the domain but not in the
beginning or on the ramp where the water is rather fast.
(correct me if I'm wrong!)

regards
Colin

pythag0ra5 January 24, 2013 15:36

Dear Colin,

thank you very much for your feedback. Meanwhile, i re-simulated my problems with the interField-variable, please find attached the latest video of my simulation:

http://people.fh-landshut.de/~mehrenwi/global.avi (this shows the whole geometry)
http://people.fh-landshut.de/~mehrenwi/local.avi (this shows just the relevant part, the ramp)

In my first post, i posted a video

where you can see the decreasing of the fluid at the outlet.

Maybe i should explain a little bit more to my project:

In Munich, there exist two places, where Surfers can surf on rivers. At the moment, i am writing my Master Thesis, the main part of this work will be the simulation of this phenomena with OpenFOAM. Below, you can see a pictue of the Münchener Floßlände, which is (next to the well known Eisbach) a famous surf-spot for surfing on rivers.

http://www.ig-surfen-muenchen.de/files/FL_lines.jpg

(Source of this image: http://www.ig-surfen-muenchen.de/files/FL_lines.jpg)

Under http://www.wellen-für-münchen.de/spots/flosslaende you can find also other interesting material.

You can see, that the surfers ride the standing wave at the place where the ramp is place int the riverbed. From a very theoretical point of view, this makes sense to me, because:

At the upper side, you have a high velocity and a low water level, whereas at the lower part you have a higher water level and a very low velocity of the water. Therefore, the Froude -Number at the upper side seems to be >1 and <1 at lower side, which is the basis for a standing wave. Therefore, I would expect this wave at the same place as in reality.

But unfortunately, none of my simulation could cover this flow phenomena. First of all, it is not realistic that my domain is "leaking out", because in reality it is a river. Second, i can not establish any kind of wave (neither close to the outlet-region as you mentioned, nor at any other area of the fluid domain).

It would be great if you have any further help for me!

Thanks a lot
Mathias

colinB January 25, 2013 03:50

1 Attachment(s)
Dear Mathias,

What I expected actually you can see from the attached drawings.
Basically I thin we are talking about the same, but I expressed myself
a little but clumsy.

I had a look at your videos and they look pretty realistic to me.
However the explanation to these videos you might find here:
http://en.wikipedia.org/wiki/Hydraul...ic_conclusions

Your geometry or your water depth simply might not provide the
condition for an hydraulic jump to occur. (refer to row 1 of the table
in the above mentioned link)

Eventually you want to introduce a backwards slope from the ramp
to the end part of the domain to slow down the water and force
a decrease in Fn which should cause a hydraulic jump.

I hope I could contribute

regards Colin

pythag0ra5 January 26, 2013 05:31

Dear Colin,

thank you very much for your reply. I am in contact with some of Munich Surfers, and it seems to be correct, no hydraulic jump can occur at my system because my geometry simply does not cover the reality. I am pretty sure, that my boundary conditions now are set up correct.

Therefore, i will go one step backwards and make a more general assumption: Think about a well known geometry, the backward facing step. I want a little bit to play around with this geometry, because the backward facing step seems to be a special case of my problem. The step-height will be set to 1m, the height of the water-inlet also should equal 1m. Now, my question is: Which value is necessary for the inlet-velocity of the water in order to get a hydraulic jump?

Some days ago, i wrote:

Quote:

To ensure a hydraulic jump, i assumed the Froude number to be 2, therefore the velocity has to be: v = sqrt(9,81m/s² * 1m) * Fr = 6,2641m/s
Do you think this assumption is correct?

colinB January 28, 2013 02:30

Good Morning Mathias,

Quote:


Do you think this assumption is correct?

Generally speaking yes. However to get this clear phenomena of the
hydraulic jump it might be better to increase the Fn.

In my previous post I linked a wikipedia article where a table is mentioned
which gives you some numbers as well as a good description of what will happen.
I strongly recommend you to read that table, for it explains what is happening now
within you domain as well as what you should do to get towards your
desired results!

Concerning the boundary conditions, they indeed seem to be correct.

regards

pythag0ra5 January 28, 2013 06:55

Dear Colin,

i read through your article, thank you very much! There is a ratio called height after to height before jump which is not clear to me right now: Is this the height of the water before / after the "step" (or whatever thing which may be the reason for the standing wave) ?

Nevertheless, i prepared a video for you again, unfortunately the explanations given in the video are quite fuzzy because of the bad resolution:

http://people.fh-landshut.de/~mehrenwi/backward_facing_step.mpg

I tried to simulate the Froude Numbers from 1 to 5 for a backward-facing-step (Height of the step = 1m).

Later, these simulations are made for a slightly different setup which my professor was interested in.

The positive thing is, that the flow behaves exactly like you forecasted it some posts above in your drawing, which means: First the initial water-level decreases abruptly as the simulation begins. Then, some waves occur (depending on the corresponding Fr-Number). In the end, the final water-level at the output is reached, for me interesting is the fact that this water level seems to be constant no matter what inlet-velocity is present.

The negative thing (once again) is that i cannot establish a standing wave. Today in the evening i will try to simulate the same geometry with some turbulence-model, i am excited about the results.

Quote:

I strongly recommend you to read that table, for it explains what is happening now
within you domain as well as what you should do to get towards your
desired results!
Sorry, I cannot see what you mean, where exactly do you see how to influence the simulation / the setup in order to get the standing wave?

Thank you very much!

Best regards,
Mathias

colinB January 28, 2013 07:44

Hey Mathias,

the video looks quite promising.

In the first series of calculation the problem appears to be that in the end part
of the domain, the Fn cannot decrease fast enough so the water is flowing smoothly
out of the domain.

To roughly explain the phenomena you are waiting for:

the water comes with a certain speed into the domain and then due to the
roughness of the bottom it looses speed.
If you apply now the Bernoulli-equation leaving the pressure constant,
since you are dealing with an incompressible flow, the water level rises.

In the first serious the roughness is too "smooth" so you don't get a drop of the
speed and hence the water level stays the same.

I couldn't grasp the changes you applied in the second serious, for the picture was
too blurry, however these changes seem to overcome this smoothness and
produce a standing wave.
If you would extend your domain in the end you could see this better.

Understanding the terms specified in the table refer to the beginning of the article
where a sketch is shown with the terms explained.

My suggestions to reduce the speed in the end part:

- rise the ground level in the end of the domain so you get another slope
so the gravity helps you to reduce the speed

- extend the domain in the end so the surface can increase its influence on
the water and decrease its speed.

Furthermore: what is the speed of the air in your domain? if it is zero
you might want to give it the same speed as the water to avoid friction
between the water layer and the air layer, causing waves and spray in the
opposite direction, you observed in the first serious.

So this is a quite extensive explanation to your problem I hope it helps.

regards

pythag0ra5 January 30, 2013 11:23

Hi Colin,

sorry for the late response. For your information: The difference in the results (see the video above) just was a different definition of the "ground"-boundary condition. If you have a sharp look on the pictures below, you can see it near the outlet:

http://people.fh-landshut.de/%7Emehrenwi/normal.png

http://people.fh-landshut.de/%7Emehrenwi/step.png

As i promised, i made 3 simulations (Fr = 1, k-epsilon model is active), you can find the video below. Each simulation is about 60 seconds, the first one show a "normal" backward facing step (definition of boundary conditions according to first picture), the second is like flowing into a lake (definition of boundary conditions according to second picture), the third one is a flow over a backward facing step followd by some kind of slope:

http://people.fh-landshut.de/~mehrenwi/Backward_Facing_Step.avi

Is there any option to increase friction on ground with some boundary-conditions?

I interessted in yout opinion concerning the video!

Best reagards,
Mathias

colinB February 4, 2013 04:03

Hi Mathias,

sry for my late reply, and just on a short note:

increase friction: - what are the boundary conditions on the lower wall?
You might want to set U to fixed value = 0 if you
haven't done it already.
- what might also help is introducing a moving wall
(see tutorial Lid driven cavity) which is moving in the
opposite direction (however i'm not sure about this
and I don't know how this setup deviates
from the reality)
- another suggestion is to use the k-w- turbulence model
which is better for near wall effects than k-epsilon

Concerning the video: I didn't have a look at it, for I don't have too much
time currently for cfd-work. Maybe a comment is following later, if I can
make some time free, but I won't promise.

regards

Tobi February 4, 2013 18:16

Hi you both,

well I want to engagement me into the discussion.

First of all.
Like Colin told you should use the k-omega model for near wall flows. In my opinion you should take the k-omega-sst model. In my simulation I used that one:

Video: http://www.holzmann-cfd.de/index.php/brueckensimulation

To set internal fields you can specify it in the first line by
Code:

internalField uniform (2 0 0);
but thats not necessary. If your simulation is done well you should get your wave. Of course is a better initialisation better for your simulation and its faster.


And notice that 2D does not represent every effect! Maybe a 3D simulation would be better?

PS: Video is not working ? maybe it depends on my computer !


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