diff --git a/openfoam/run/flowAroundCylinder/0/U b/openfoam/run/flowAroundCylinder/0/U index ddad14bc50577f7c7425d05aa9b952ec045281f4..f5cc7340cb52bc2f2c70d477de0253df1edac984 100644 --- a/openfoam/run/flowAroundCylinder/0/U +++ b/openfoam/run/flowAroundCylinder/0/U @@ -26,11 +26,23 @@ boundaryField value uniform (0 0 0); } + inlet + /* { */ + /* type codedFixedValue; */ + /* value uniform (0.2 0 0); */ + /* name parabolicChannelInlet; */ + /* } */ inlet { - type codedFixedValue; - value uniform (0.2 0 0); - name parabolicChannelInlet; + type uniformFixedValue; + uniformValue (0.2 0 0); + y0 0.2; + scale2 polynomial + ( + ( (#eval{6*$y0*(0.41-$y0)/pow(0.41,2)} 0 0) (0 0 0) ) + ( (#eval{6*(0.41-2*$y0)/pow(0.41,2)} 0 0) (1 0 0) ) + ( (#eval{-6/pow(0.41,2)} 0 0) (2 0 0) ) + ); } outlet diff --git a/openfoam/run/flowAroundCylinder/system/codeDict b/openfoam/run/flowAroundCylinder/system/codeDict deleted file mode 100644 index c214bee7976bbc1e28ba4749122358f8b7d7317e..0000000000000000000000000000000000000000 --- a/openfoam/run/flowAroundCylinder/system/codeDict +++ /dev/null @@ -1,38 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 5.0 | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "system"; - object codeDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -// Note that you must adjust y0 with respect to the origin of -// you coordinate system. - -#include ../scale - -parabolicChannelInlet -{ - code - #{ - auto y0 = -0.2; // Reference coodinate, lower wall - // auto vmean = 0.2; // Mean velocity with Re_d = 20 - // auto vmean = 1; // Mean velocity with Re_d = 100 - auto vmean = $ubar; - - Foam::Field<double> y = patch().Cf().component(vector::Y) - y0; - operator == - ( - vmean*((6.0*y*(0.41-y))/pow(0.41,2))*vector(1,0,0) - ); - #}; -}