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/)
-   -   PerturbU (http://www.cfd-online.com/Forums/openfoam-solving/59602-perturbu.html)

hadi July 3, 2007 05:22

Hi to all, I am a new openF
 
Hi to all,

I am a new openFoam user,and i would like to know if the perturbU utility exists by default in openFOam or i should add it?
can u please tell me how to get this utility?

thanks in advance
Hadi

alberto July 3, 2007 07:00

Hello, it's not included in O
 
Hello,
it's not included in OpenFOAM. You can download it here:

- For a channel:

http://www.cfd-online.com/OpenFOAM_D...ages/1/40.html

- For a cylinder:

http://www.cfd-online.com/OpenFOAM_D...es/1/2946.html

With kind regards,
Alberto

hadi July 3, 2007 07:23

Thank you very much Alberto
 
Thank you very much Alberto

regards
Hadi

pante December 14, 2013 14:44

hello,
I try to download perturbU utility for using it in a pipe flow, but for some reason I get a file of type .unk (unknown). Can anyone provide me a valid link for downloading perturbU utility?

wyldckat December 14, 2013 19:21

Greetings pante,

The old forum had this safety mechanism, where the attached files were renamed to always have the file extension ".unk".

The solution is simple: after you download the file, you have to manually rename the file extension to the correct extension, as indicated on the surrounding text for the link you used for the download. In this case, change "unk" to "tgz".

Best regards,
Bruno

Sunxing March 10, 2014 08:23

1 Attachment(s)
Quote:

Originally Posted by alberto (Post 191519)
Hello,
it's not included in OpenFOAM. You can download it here:

- For a channel:

http://www.cfd-online.com/OpenFOAM_D...ages/1/40.html

With kind regards,
Alberto

Hi Alberto,

I'm using the perturbU utility to generate a terbulent initial filed for a wall-jet case. However, I don't know how to set the parameters in the perturbUDict, such as duplus, betaPlus, alphaPlus, sigma and epsilon. Is there a rule for setting them?
The following picture is the schematic of the domain for my case.

Best Regards.
sunxing

aylalisa April 10, 2014 10:01

Dear Sunxing,

did you read thesis of Eugene de Villiers:
"The Potential of Large Eddy Simulation for the Modeling of Wall Bounded Flows"
Page. 164 ff. and the the file perturbU.C till line 78.
It does not directly answer your question but could improve understanding.



Best regards,
aylalisa

Sunxing April 10, 2014 20:22

Quote:

Originally Posted by aylalisa (Post 485238)
Dear Sunxing,

did you read thesis of Eugene de Villiers:
"The Potential of Large Eddy Simulation for the Modeling of Wall Bounded Flows"
Page. 164 ff. and the the file perturbU.C till line 78.
It does not directly answer your question but could improve understanding.



Best regards,
aylalisa

Hi aylalisa,

Thanks for your reply.

Regards
Sunxing

aylalisa April 11, 2014 04:16

Hi Sunxing,

I've found yesterday (after I've replied your thread): http://lists.cfd-online.com/pipermai...ch/019398.html

Aylalisa

Z.Q. Niu May 7, 2014 06:27

Hello aylalisa,
I has download purturbU from http://www.cfd-online.com/OpenFOAM_D...ages/1/40.html for channel.I wmake it in my open foam 2.2.0, but it points that "mathematicalConstant" is not declared. Do you wmake perturbU successfuly? would you mind sending me your file of perturbU? My email is silence@tju.edu.cn
Thank you !

amanbearpig May 7, 2014 14:45

I do not have version 2.2.0, but I encountered the same issue in 2.2.2. It's due to how pi is defined in different versions of OpenFOAM. Thankfully it is not a difficult fix.

If you edit the .C perturbU file and change any references (I believe there are 2) of 'mathematicalConstant' to 'constant::mathematical', this should rectify the issue. :)

Z.Q. Niu May 7, 2014 22:27

Thank you, amanbearpig! I have solved it ,the problem is indeed due to mathematicalConstant, I has corrected it successfully!

adambarfi May 9, 2014 01:27

1 Attachment(s)
here you are the modified perturbU utility for OF-2.0.0 to OF-2.3.0:

adambarfi May 27, 2014 03:50

hi everybody,

The perturbU utility was ran for channel395 correctly. I changed the geometry to a perfect channel which the conditions at inlet and outlet patches are cyclic. then I ran the perturbU but it set a zero velocity field for U. I can't understand why it didn't make any perturbation of my velocity field?????

anybody knows what and where is the problem?

the blockMeshDict is as follow:
Code:

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

convertToMeters 1;

vertices
(
    (0 0 0)
    (1 0 0)
    (1 1 0)
    (0 1 0)
    (0 0 4)
    (1 0 4)
    (1 1 4)
    (0 1 4)

    (2 0 0)
    (2 1 0)
    (2 0 4)
    (2 1 4)

    (1 2 0)
    (0 2 0)
    (1 2 4)
    (0 2 4)

    (2 2 0)
    (2 2 4)
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (25 25 20) simpleGrading (10 10 1)
    hex (1 8 9 2 5 10 11 6) (25 25 20) simpleGrading (0.1 10 1)
    hex (3 2 12 13 7 6 14 15) (25 25 20) simpleGrading (10 0.1 1)
    hex (2 9 16 12 6 11 17 14) (25 25 20) simpleGrading (0.1 0.1 1)

);

edges
(
);

boundary
(
    outlet1_1
    {
        type cyclic;
        neighbourPatch  inlet1_1;
        faces
        (
            (4 7 6 5)
        );
    }
    inlet1_1
    {
        type cyclic;
        neighbourPatch  outlet1_1;
        faces
        (
            (0 3 2 1)
        );
    }


    outlet1_2
    {
        type cyclic;
        neighbourPatch inlet1_2;
        faces
        (
            (5 6 11 10)
        );
    }
    inlet1_2
    {
        type cyclic;
        neighbourPatch  outlet1_2;
        faces
        (
            (1 2 9 8)
        );
    }



    outlet2_1
    {
        type cyclic;
        neighbourPatch  inlet2_1;
        faces
        (
            (7 15 14 6)
        );
    }
    inlet2_1
    {
        type cyclic;
        neighbourPatch  outlet2_1;
        faces
        (
            (3 13 12 2)
        );
    }



    outlet2_2
    {
        type cyclic;
        neighbourPatch  inlet2_2;
        faces
        (
            (6 14 17 11)
        );
    }
    inlet2_2
    {
        type cyclic;
        neighbourPatch  outlet2_2;
        faces
        (
            (2 12 16 9)
        );
    }

    fixedWalls
    {
        type wall;
        faces
        (
            (4 7 3 0)
            (7 15 13 3)
            (10 11 9 8)
            (11 17 16 9)

            (4 0 1 5)
            (5 1 8 10)
            (15 13 12 14)
            (14 12 16 17)
        );
    }
);

mergePatchPairs
(
);

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

and the perturbUDict is as
Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  1.0                                  |
|  \\  /    A nd          | Web:      http://www.openfoam.org              |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/

FoamFile
{
    version        2.0;
    format          ascii;
    instance        "system";

    class          dictionary;
    object          perturbUDict;
}

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


// Expected turbulent Re(tau) Reynolds number with respect to utau
Retau 395;

// Streamwise component of flow. 0=x, 1=y, 2=z
streamwise 2;

// Spanwise component of flow. 0=x, 1=y, 2=z
spanwise 1;

// Halfheight of channel. This is the direction normal to both streamwise and
// spanwise directions.
h 1;

// Set (overwrite) velocity to laminar profile
setBulk true;

// Perturb velocity with some cosine like perturbations
perturb false;

// Perturbation properties
//wall normal circulation as a fraction of Ubar/utau
duplus 0.25;
//spanwise perturbation spacing in wall units
betaPlus 200;
//streamwise perturbation spacing in wall units
alphaPlus 500;
//transverse decay
sigma 0.00055;
//linear perturbation amplitude as a fraction of Ubar
epsilon 0.005;


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

any tip or hint would be appreciated.

Regards,
Mostafa

adambarfi May 27, 2014 04:51

Quote:

Originally Posted by adambarfi (Post 494266)
hi everybody,

The perturbU utility was ran for channel395 correctly. I changed the geometry to a perfect channel which the conditions at inlet and outlet patches are cyclic. then I ran the perturbU but it set a zero velocity field for U. I can't understand why it didn't make any perturbation of my velocity field?????

anybody knows what and where is the problem?

the blockMeshDict is as follow:
Code:

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

convertToMeters 1;

vertices
(
    (0 0 0)
    (1 0 0)
    (1 1 0)
    (0 1 0)
    (0 0 4)
    (1 0 4)
    (1 1 4)
    (0 1 4)

    (2 0 0)
    (2 1 0)
    (2 0 4)
    (2 1 4)

    (1 2 0)
    (0 2 0)
    (1 2 4)
    (0 2 4)

    (2 2 0)
    (2 2 4)
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (25 25 20) simpleGrading (10 10 1)
    hex (1 8 9 2 5 10 11 6) (25 25 20) simpleGrading (0.1 10 1)
    hex (3 2 12 13 7 6 14 15) (25 25 20) simpleGrading (10 0.1 1)
    hex (2 9 16 12 6 11 17 14) (25 25 20) simpleGrading (0.1 0.1 1)

);

edges
(
);

boundary
(
    outlet1_1
    {
        type cyclic;
        neighbourPatch  inlet1_1;
        faces
        (
            (4 7 6 5)
        );
    }
    inlet1_1
    {
        type cyclic;
        neighbourPatch  outlet1_1;
        faces
        (
            (0 3 2 1)
        );
    }


    outlet1_2
    {
        type cyclic;
        neighbourPatch inlet1_2;
        faces
        (
            (5 6 11 10)
        );
    }
    inlet1_2
    {
        type cyclic;
        neighbourPatch  outlet1_2;
        faces
        (
            (1 2 9 8)
        );
    }



    outlet2_1
    {
        type cyclic;
        neighbourPatch  inlet2_1;
        faces
        (
            (7 15 14 6)
        );
    }
    inlet2_1
    {
        type cyclic;
        neighbourPatch  outlet2_1;
        faces
        (
            (3 13 12 2)
        );
    }



    outlet2_2
    {
        type cyclic;
        neighbourPatch  inlet2_2;
        faces
        (
            (6 14 17 11)
        );
    }
    inlet2_2
    {
        type cyclic;
        neighbourPatch  outlet2_2;
        faces
        (
            (2 12 16 9)
        );
    }

    fixedWalls
    {
        type wall;
        faces
        (
            (4 7 3 0)
            (7 15 13 3)
            (10 11 9 8)
            (11 17 16 9)

            (4 0 1 5)
            (5 1 8 10)
            (15 13 12 14)
            (14 12 16 17)
        );
    }
);

mergePatchPairs
(
);

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

and the perturbUDict is as
Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  1.0                                  |
|  \\  /    A nd          | Web:      http://www.openfoam.org              |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/

FoamFile
{
    version        2.0;
    format          ascii;
    instance        "system";

    class          dictionary;
    object          perturbUDict;
}

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


// Expected turbulent Re(tau) Reynolds number with respect to utau
Retau 395;

// Streamwise component of flow. 0=x, 1=y, 2=z
streamwise 2;

// Spanwise component of flow. 0=x, 1=y, 2=z
spanwise 1;

// Halfheight of channel. This is the direction normal to both streamwise and
// spanwise directions.
h 1;

// Set (overwrite) velocity to laminar profile
setBulk true;

// Perturb velocity with some cosine like perturbations
perturb false;

// Perturbation properties
//wall normal circulation as a fraction of Ubar/utau
duplus 0.25;
//spanwise perturbation spacing in wall units
betaPlus 200;
//streamwise perturbation spacing in wall units
alphaPlus 500;
//transverse decay
sigma 0.00055;
//linear perturbation amplitude as a fraction of Ubar
epsilon 0.005;


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

any tip or hint would be appreciated.

Regards,
Mostafa

solved, I made a mistake and defined the Ubar=(0.1335 0 0) instead of Ubar=(0 0 0.1335).
sorry for that :rolleyes:

Regards,
Mostafa

wyldckat March 21, 2015 14:34

Greetings to all!

I've given a proper wiki page and git repository to perturbU and all of the 3 variants I found that were made by Eugene de Villiers:
May anyone feel free to update that wiki page and fork from that repository!

Best regards,
Bruno

canopus June 1, 2015 05:54

perturbU + precursor inlet
 
Hi!
I want to do LES of a diffuser.
For the inlet I want to run a precursor LES of channel for which I set cyclic for inlet and outlet.
Then I run perturbUChannel but the original 0/U file is replaced by some numbers.
Is it OK to run with this condition? How does the solver know about cyclic patches then?

aylalisa June 1, 2015 06:49

Hi Canopus,

yes, start simulation with the new field.

You define your patches in constant/polyMesh/blockMeshDict.

Quote:

boundary
(
inlet
{
type cyclic;
neighbourPatch outlet;
matchTolerance 0.01;
faces
(
(0 1 5 4)
);
}
...
)
Ayla

canopus June 2, 2015 07:31

Thanks for your reply.
I found that the numbers are the initial field and the boundary conditions of 0/U still exist and can be found in the bottom of the file.


All times are GMT -4. The time now is 02:56.