This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/tutorials/compressible/rhoPorousSimpleFoam/beaverJoseph/0/U
2016-06-21 15:04:21 +02:00

55 lines
1.8 KiB
C++

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 4.0 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
// Re = 1 = rho=(rho U H)/mu; rho=1.144, mu=1.861e-5; H=0.01
internalField uniform (1.62589e-4 0 0);
boundaryField
{
inlet
{
// type groovyBC;
type fixedValue;
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);";
valueExpression "vector(1,0,0)*Unew2";
value $internalField;
}
outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}
upperWall
{
type fixedValue;
value uniform (0 0 0);
}
lowerWall
{
type fixedValue;
value uniform (0 0 0);
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //