/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version         2.0;
    format          ascii;
    //root            "./system"
    //case            "test.case";
    //instance        "system";
    local           "system";
    class           dictionary;
    object          funkySetFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


expressions
(
    initial
    {
        field           alpha.water;
        variables       ("hN=2e-4;");
        expression      "((pos().y > hN* (1+  0.02 * cos(2*pi*  pos().x / (100*hN)  ) ) ) ? 0 : 1)";
        condition       "true";
        keepPatches     1;
    }
    velocityinitial
    {
        field           U;
        variables       ("hN=2e-4;gx=9.81;nu=1e-6;");
        expression      "(pos().y<=hN* (1+  0.02 * cos(2*pi*  pos().x / (100*hN)  ) ) )?   vector(0, (pos().y*hN- pos().y*pos().y/2)*gx/nu, 0) : vector(0, gx/nu*hN*hN/2, 0)";
        condition       "true";
        keepPatches     1;
    }
    
);

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