Skip to content
Snippets Groups Projects
U 1.49 KiB
Newer Older
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  8
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform (0 0 0);

boundaryField
{
felix's avatar
felix committed
    wall
    {
        type            fixedValue;
felix's avatar
felix committed
        value           uniform (0 0 0);
felix's avatar
felix committed
    inlet
        type            codedFixedValue;
felix's avatar
felix committed
        value           uniform (1 0 0);
        name            parabolicChannelInlet;
        code            #{
            auto y0 = -0.2;      // Reference coordinate, lower wall
felix's avatar
felix committed
            // auto vmean = 0.2;   // Mean velocity
            auto vmean = 1;   // Mean velocity

            Foam::Field<double> y = patch().Cf().component(vector::Y) - y0;
            operator ==
            (
                vmean*((6.0*y*(0.41-y))/pow(0.41,2))*vector(1,0,0)
            );
        #};
felix's avatar
felix committed
    outlet
    {
        type            fluxCorrectedVelocity;
    }

    empty
    {
        type            empty;
    }
}

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