Simulation

We’ll use incompressible stationary for this.

Copy from OpenFOAM tutorial directory: “tutorials/incompressible/simpleFoam/squareBend”.

Then modify to suit your needs. For example “U” boundary condition:

/--------------------------------- C++ -----------------------------------\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: v1812 |
| \ / A nd | Web: www.OpenFOAM.com |
| \/ M anipulation | |
*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value uniform (0 0 -10);
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
"(?i).*Walls"
{
type noSlip;
}
}
// *** //