Skip to content

Commit

Permalink
Reasonable indentation for parabolic inlet profile
Browse files Browse the repository at this point in the history
  • Loading branch information
davidscn committed Mar 26, 2024
1 parent 401c1bb commit fc05b0e
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions turek-hron-fsi3/fluid-openfoam/0/U
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ boundaryField
cylinder
{
type noSlip;
}
}

flap
{
Expand All @@ -43,24 +43,26 @@ boundaryField

code
#{
const vectorField& Cf = patch().Cf();
vectorField& field = *this;
const scalar pi=3.14159265358979;
const scalar Umean=2.0;
const vectorField& Cf = patch().Cf();
vectorField& field = *this;

const scalar pi = 3.14159265358979;
const scalar Umean = 2.0;
const scalar t = this->db().time().value();
if(t<2){
forAll(Cf,faceI)
if (t < 2)
{
forAll(Cf, faceI)
{
const scalar y=Cf[faceI][1];
field[faceI]=vector((1.5*Umean*4.0/0.1681)*y*(0.41-y)*((1-cos(pi/2 *t))/2),0,0);
const scalar y = Cf[faceI][1];
field[faceI] = vector((1.5 * Umean * 4.0 / 0.1681) * y * (0.41 - y) * ((1 - cos(pi / 2 * t)) / 2), 0, 0);
}
}else
}
else
{
forAll(Cf,faceI)
forAll(Cf, faceI)
{
const scalar y=Cf[faceI][1];
field[faceI]=vector((1.5*Umean*4.0/0.1681)*y*(0.41-y),0,0);
const scalar y = Cf[faceI][1];
field[faceI] = vector((1.5 * Umean * 4.0 / 0.1681) * y * (0.41 - y), 0, 0);
}
}
#};
Expand Down

0 comments on commit fc05b0e

Please sign in to comment.