fixed writing out entries in advective bc
[OpenFOAM-1.6-ext.git] / tutorials / incompressible / porousSimpleFoam / beaverJoseph / 0 / U
blob60a9c8023099232333e8329fbc79d40ea9f6666a
1 /*--------------------------------*- C++ -*----------------------------------*\
2 | =========                 |                                                 |
3 | \\      /  F ield         | OpenFOAM Extend Project: Open Source CFD        |
4 |  \\    /   O peration     | Version:  1.6-ext                               |
5 |   \\  /    A nd           | Web:      www.extend-project.de                 |
6 |    \\/     M anipulation  |                                                 |
7 \*---------------------------------------------------------------------------*/
8 FoamFile
10     version     2.0;
11     format      ascii;
12     class       volVectorField;
13     object      U;
15 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17 dimensions      [0 1 -1 0 0 0 0];
19 // Re = 1 = rho=(rho U H)/mu; rho=1.144, mu=1.861e-5; H=0.01
20 internalField   uniform (1.62589e-4 0 0);
22 boundaryField
24     inlet
25     {
26         // type            groovyBC;
27         type fixedValue;
28         variables "relax=0.7;UTarget=1.62589e-4;Uout@outlet=sum((pos().y) > 0.1 ? mag(U)*mag(Sf()) : 0.)/sum(pos().y > 0.1 ? mag(Sf()) : 0);Uold=mag(U);Uo=(Uout>1e-7 ? Uout : 1e-7);Unew=Uold*((1-relax)+relax*(UTarget/Uo));Unew2=(Unew > UTarget ? UTarget : Unew);";
29         valueExpression "vector(1,0,0)*Unew2";
30         value           $internalField;
31     }
32     outlet
33     {
34         type            inletOutlet;
35         inletValue      uniform (0 0 0);
36         value           uniform (0 0 0);
37     }
38     upperWall
39     {
40         type            fixedValue;
41         value           uniform (0 0 0);
42     }
43     lowerWall
44     {
45         type            fixedValue;
46         value           uniform (0 0 0);
47     }
50 // ************************************************************************* //