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

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

internalField   uniform 1;

boundaryField
{
   bottom
	{   
	    type fixedValue;
		value uniform 0;
	
	   /*type     groovyBC;
	   valueExpression "fi_p*(extrLen/(deltaX+extrLen))";
	   gradientExpression "-fi_p/(deltaX+extrLen)";
	   variables "fi_p{bottom}=internalField(fi2); deltaX{bottom}=0.5*mag(delta()); extrLen{bottom}=3*DD2*0.7104;";
	   value uniform 1;*/
	   
    }

    top
	{     type fixedValue; 
	      value uniform 0;
	   /*type     groovyBC;
	   valueExpression "fi_p*(extrLen/(deltaX+extrLen))";
	   gradientExpression "-fi_p/(deltaX+extrLen)";
	   variables "fi_p{top}=internalField(fi2); deltaX{top}=0.5*mag(delta()); extrLen{top}=3*DD2*0.7104;";
	   value uniform 1;*/
    }
     
	left
    { 
	
	  type fixedValue; 
	      value uniform 0;
       /*type     groovyBC;
	   valueExpression "fi_p*(extrLen/(deltaX+extrLen))";
	   gradientExpression "-fi_p/(deltaX+extrLen)";
	   variables "fi_p{left}=internalField(fi2); deltaX{left}=0.5*mag(delta()); extrLen{left}=3*DD2*0.7104;";
	   value uniform 1; */
      	   
    }
	
	right
	{
	  type fixedValue; 
	      value uniform 0;
	   /*type     groovyBC;
	   valueExpression "fi_p*(extrLen/(deltaX+extrLen))";
	   gradientExpression "-fi_p/(deltaX+extrLen)";
	   variables "fi_p{right}=internalField(fi); deltaX{right}=0.5*mag(delta()); extrLen{right}=3*DD*0.7104;";
	   value uniform 1;*/
	  
    } 
	
    updown
    {
   
	type            empty;
    }
}

// ************************************************************************* //
/*
	      type codedFixedValue;
		  value $internalField;
		  redirectType myParabolicVelocity;
	      code
		  
		      scalar fi_ave=0.05, h=0.8; 
               
              const fvPatch& boundaryPatch=patch(); 
               scalarField& field=*this;	

				forAll(boundaryPatch, faceI)
				{ 
				field[faceI]= 1.5*fi_ave*(1-Foam::pow(boundaryPatch.Cf()[faceI]/h,2 ) ) ;
				} 
				 
		   
		   CodeOptions 
		   
		      -I$(LIB_SRC)/finiteVolume/lnInclude \
			  -I$(LIB_SRC)/meshTools/lnInclude 
			  
		     
	       
		   codeInclude 
		   
		        #include "fvCFDH"
                #include <cmath> 
                #include <iostream>
            					
	
	  // type      groovyBC;
	   // gradientExpression "fi_p";
	   // variables "fi_p{top}=-fi/100000000;";
	*/