Skip to content
Snippets Groups Projects
Commit 127b01b7 authored by felix's avatar felix
Browse files

move code to boundary file where it is actually used

parent f4293420
No related branches found
No related tags found
No related merge requests found
...@@ -18,6 +18,8 @@ dimensions [0 1 -1 0 0 0 0]; ...@@ -18,6 +18,8 @@ dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0); internalField uniform (0 0 0);
#include "../scale"
boundaryField boundaryField
{ {
wall wall
...@@ -29,8 +31,19 @@ boundaryField ...@@ -29,8 +31,19 @@ boundaryField
inlet inlet
{ {
type codedFixedValue; type codedFixedValue;
value uniform (0.2 0 0); value uniform ($ubar 0 0);
name parabolicChannelInlet; name parabolicChannelInlet;
code #{
auto y0 = -0.2; // Reference coordinate, lower wall
auto vmean = 0.2; // Mean velocity
//auto vmean = 1; // Mean velocity
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)
);
#};
} }
outlet 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.
parabolicChannelInlet
{
code
#{
auto y0 = -0.2; // Reference coodinate, lower wall
auto vmean = 300; // Mean velocity
//auto vmean = 1; // Mean velocity
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