Skip to content
Snippets Groups Projects
Commit 7fd42710 authored by felix's avatar felix
Browse files

replace code with other code

parent fc7a2cd1
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
/*--------------------------------*- 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)
);
#};
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment