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

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

internalField   uniform 1e+5;

boundaryField
{
    walls
    {
        type            zeroGradient;
     // type            fixedValue;
        value           $internalField;
    }

    acous
    {
        type            codedFixedValue;
        value           $internalField;
        name            acousticWave; // 任意の識別名

        codeOptions
        #{
            -I$(LIB_SRC)/finiteVolume/lnInclude
        #};

        code
        #{
            const fvPatch& boundaryPatch = patch();
            const scalar pi = constant::mathematical::pi;
            const scalar t = this->db().time().value();

            scalar value = 1.0e5 + 20.0e3 * sin(2.0 * pi * 1e7 * t);

            operator==(scalarField(boundaryPatch.size(), value));
        #};
    }

    symm
    {
        type            symmetryPlane;
    }

    defaultFaces
    {
        type            empty;
    }

}


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