Skip to content
Snippets Groups Projects
Commit 5c9c6201 authored by felix's avatar felix
Browse files

Revert "replace code with other code"

This reverts commit 7fd42710.

Doesn't works since I am using a different OpenFoam.
parent 7fd42710
No related branches found
No related tags found
No related merge requests found
......@@ -26,23 +26,11 @@ boundaryField
value uniform (0 0 0);
}
inlet
/* { */
/* type codedFixedValue; */
/* value uniform (0.2 0 0); */
/* name parabolicChannelInlet; */
/* } */
inlet
{
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) )
);
type codedFixedValue;
value uniform (0.2 0 0);
name parabolicChannelInlet;
}
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