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/)
-   -   Swirled inlet (https://www.cfd-online.com/Forums/openfoam-solving/162659-swirled-inlet.html)

Gerrit November 15, 2015 06:45

Swirled inlet
 
1 Attachment(s)
Hi everyone,

I have some cases with straight, coaxial pipes where I would like to have swirl at the inlet.
In the incompressible/simpleFoam tutorials I found this inlet condition, that is supposed to create swirl.
Code:

    type            codedFixedValue;
        redirectType    swirl;

        code
        #{
            const vector axis(0, 0, 1.5);

            vectorField v(2.0*this->patch().Cf() ^ axis);
            v.replace(vector::Z, -1);
            operator==(v);
        #};
        value          $internalField;

I used this code and it works quite fine for me. I have a magnitude velocity of 1 m/s as wished.

Only the swirl is strange. Instead 1.5 m/s the absolute velocity maximal is only 0.0115 m/s.

I would like to understand the definition of the 1.5 m/s which are obviously not 1.5 m/s.

Best
Gerrit

Gerrit November 18, 2015 05:13

Hi,

By try and error, I found it my self.

Code:

{
    type            codedFixedValue;
        redirectType    swirl;

        code
        #{
            const vector axis(0, 0, 1);            // Axis of rotation

            vectorField v = 20.0*this->patch().Cf() ^ axis;    // Angular velocity in rad/s
            v.replace(vector::Z, -1);                                    // Velocity of mainflow
            operator==(v);
        #};
        value          $internalField;
    }


lth March 11, 2022 23:58

Thank you Gerrit for sharing what you figured out.


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