/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2312                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#include        "include/initialConditions"

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

internalField   uniform (0 0 0); //defining the internal field as flow velocity using the initial condition file

boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes" //special boundary conditions for overset mesh
    //$FOAM_ETC/caseDicts/setConstraintTypes includes the correct BCs
    oversetPatch
    {
        type            overset;
        value		$internalField;
    }

    walls
    {
        type            movingWallVelocity;
        value           uniform (0 0 0);
    }

    /*inlet
    {
        type            fixedProfile;
        profile         polynomial
        (
            // Correct syntax: ((Vector) (Exponent))
            ((0 0 0) (0 0 0))       // Constant baseline term (z^0)
            ((0.025 0 0) (1 0 0))      // Linear multiplier term (z^1)
        );
        direction       (0 0 1); // Variational axis (Z-axis)
        origin          0; // Starting origin point
        value           uniform (0 0 0);
    }*/
    
      /*  inlet
    {
        type            codedFixedValue;
        value           uniform (0 0 0);
        name            linearProfile;

        codeInclude
        #{
            #include "vectorField.H"
        #};

        code
        #{
            const vectorField& Cf = patch().Cf();
            vectorField& Ufield = *this;

            for (label facei = 0; facei < Cf.size(); ++facei)
            {
                // Accessing z component directly via index [2] to avoid function call bugs
                scalar zCoord = Cf[facei][2]; 
                scalar maxU = 0.15;
                scalar maxZ = 6;

                Ufield[facei] = vector(maxU * (zCoord / maxZ), 0.0, 0.0);
            }
        #};
    }*/
    /*
    inlet
    {
        type            uniformFixedValue;
        
        // 1. Define the direction and scale of your velocity vector
        uniformValue    constant (0.15 0 0); 
        
        // 2. Multiply the vector linearly based on spatial coordinates
        scale           expression;
        expression      "pos().z / 0.025"; 
        
        value           uniform (0 0 0);
    }*/
    
    inlet
    {
    	//type		  slip;
        //type            fixedValue;
        //value           uniform (0 0 0);
        type		  cyclic;
    }

    outlet
    {
        //type		  slip;
        //type            fixedValue;
        //value           uniform (0 0 0);
        type		  cyclic;
    }

    top
    {
        type            fixedValue;
        value    	uniform (0.10 0 0);
    }

    bottom
    {
        type            fixedValue;
        value    	uniform (-0.10 0 0);
    }
    
    frontAndBack
    {
    	type            empty;
    }
}


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