/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     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
{

    outlet
    {
        type            zeroGradient;
    }

    inlet
    {
        type            codedFixedValue;
        value           uniform (1.0 0 0);
        
        name	parabolicVelocity;
        code
        #{
                const vectorField& Cf = patch().Cf();
        	vectorField& field = *this;
        	
        	const scalar c = 0;
        	const scalar r = 0.5;
        	const scalar Umax = 2.0;
        	
        	forAll(Cf, faceI)
        	{
        	   
        		const scalar y = Cf[faceI][1];
        		const scalar z = Cf[faceI][2];
        	
        		field[faceI] = vector( Umax*( 1.0 - ( pow(y/r,2)+pow(z/r,2) ) ) , 0, 0);   	
        	
        	}
        #};        
        
    }
        
    nozzle
    {
        //type            noSlip;
        type            fixedValue;
        value           uniform (0.0 3.36e-7 0);
    }

    sideFront
    {
        type            wedge;
    }
    
    sideBack
    {
        type            wedge;
    }   

    axis
    {
        type            empty;
    }      
}

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