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/)
-   -   Trouble creating an injection pulse (interFoam) (https://www.cfd-online.com/Forums/openfoam-solving/107510-trouble-creating-injection-pulse-interfoam.html)

smschnob September 28, 2012 22:03

Trouble creating an injection pulse (interFoam)
 
Greetings,

I am very new to OF. I've been using it for only a couple weeks now, and I'm runnning into some issues. I went through the interFoam/les/nozzleFlow2D tutorial (using OpenFOAM v2.1) and would like to make some changes to it. In the tutorial liquid is ejected from the nozzle through the entire simulation. I would like to change the model so only a short pulse of liquid is ejected from the nozzle. Basically, I would like to specify an injection duration. Does anyone have any thoughts on how I can accomplish this? I should also mention that I made one change to the tutorial. I wanted to specify the inlet using total pressure instead of velocity. Listed below is the code.

In 0/p_rgh ...

inlet
{
type totalPressure;
p0 1e6;
U U;
rho none;
phi phi;
psi none;
gamma 1;
value uniform 1e6
}

In 0/U ...

inlet
{
type pressureInletVelocity;
value uniform (0 0 0);
}

In addition, I tried to add a table to create the pulse of liquid but that didn't seem to work. Listed below is the code I used.

inlet
{
type uniformTotalPressure;
pressure table
(
(0 1e6)
(5e-6 0)
);
p0 1e6;
U U;
rho none;
phi phi;
psi none;
gamma 1;
value uniform 1e6
}

Thank you!

michielm October 10, 2012 05:52

You could use something like this:

Code:

inlet
    { 
        type            uniformFixedValue;
        uniformValue    table
        (   
                (0      (0.05 0 0))
                (0.05  (0.05 0 0))
                (0.1    (0 0 0))
        );   
    }

That will give you an x-velocity of 0.05 m/s from t=0 to t=0.05 which then decreases linearly to 0 from t=0.05 to t=0.1

smschnob October 10, 2012 12:26

Quote:

Originally Posted by michielm (Post 385903)
You could use something like this:

Code:

inlet
    { 
        type            uniformFixedValue;
        uniformValue    table
        (   
                (0      (0.05 0 0))
                (0.05  (0.05 0 0))
                (0.1    (0 0 0))
        );   
    }

That will give you an x-velocity of 0.05 m/s from t=0 to t=0.05 which then decreases linearly to 0 from t=0.05 to t=0.1


Thank you so much! That's exactly what I was looking for.

Thanks again,
Scott


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