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/)
-   -   On/Off inlet boundary condition (https://www.cfd-online.com/Forums/openfoam-solving/202216-off-inlet-boundary-condition.html)

cuikahlil May 24, 2018 04:51

On/Off inlet boundary condition
 
Hello!

Is it possible in openfoam to implement some sort of on/off mechanism at the inlet? I am trying to simulate water entering a chamber through an inlet but would like the flow to start after a certain period of time.

Any ideas are welcome! Thank you in advance.

Kahlil

RobertHB May 24, 2018 05:54

See if you can use any of the fvOptions entries. Those have a startTime and duration keyword.

cuikahlil May 24, 2018 06:36

Oh dear how could I have forgotten that. I was thinking the solution would be a lot complicated. Thank you very much!

cuikahlil May 24, 2018 09:09

I may have over estimated my familiarity with fvOptions. Would you be so kind to offer some suggestions which ones I can use? I have seen that acousticDampingSource has the time settings but I can't imagine using it for what I intend to do.

RobertHB May 24, 2018 09:23

Quote:

Originally Posted by cuikahlil (Post 693450)
Would you be so kind to offer some suggestions which ones I can use?

The first option that comes to my mind is meanVelocityForce. You could defin your inlet as a cell set close the your inlet patch und use the meanVelocityForce to only drive the flow during a given time interval.

But i have never used the options with a time, and cant say for sure that it will work.


For further information about fvOptions entries you might want to look at this page: www.geocities.jp. Most of it is in japanese, but you can use google translate or the chrome browser to translate the website. The important parts are in english anyways.

Bloerb May 24, 2018 09:50

Code:

    {
        type            uniformFixedValue;
        uniformValue    constant (1 0 0);
        value                uniform (0 0 0); // meaningless initial value
    }

or for a non constant velocity:
Code:

    {
        type            uniformFixedValue;
        uniformValue    table
        (
        (0.0 (1 0 0))
        (1.0 (1 0 0))
        (1.1 (0 0 0))
        );
    }

Keep in mind, that a linear interpolation is used between those.

cuikahlil May 25, 2018 20:48

Thanks for the heads up Robert! I will definitely check this out.

cuikahlil May 25, 2018 20:50

Hello Bloerb! which part in this code allows me to set the time when I want the inlet to release the water?

RobertHB May 28, 2018 03:28

Quote:

Originally Posted by cuikahlil (Post 693625)
Hello Bloerb! which part in this code allows me to set the time when I want the inlet to release the water?

In short: none. You will have to add the timeStart and duration keywords. This at least worked in 2.2.x, see here. Couldt find those lines for 4.x or 5.x


All times are GMT -4. The time now is 07:28.