In[]:=
rules={length->22/10,hight->41/100};​​Ω=RegionDifference[Rectangle[{0,0},{length,hight}],Disk[{1/5,1/5},1/20]]/.rules;​​​​Show[BoundaryDiscretizeRegion[Ω],bmesh=HighlightMesh[BoundaryDiscretizeRegion[Ω,AccuracyGoal->5],{Style[1,Black],Style[2,None]}],VectorPlot[{4*1.5*y*(0.41-y)/0.41^2,0},{x,0,2.2},{y,0,0.41},Sequence[VectorScale->Small,VectorStyle->Red,VectorMarkers->Placed["Arrow","Start"],VectorPoints->Table[{0,y},{y,0.05,0.35,0.075}]]],ImageSize->Medium]​​​​op=​​ρ​​
(1,0,0)
u
[t,x,​​y]+ρ{u[t,x,y],v[t,x,y]}.Inactive[Grad][​​u[t,x,y],{x,y}]+​​Inactive[Div][(-μInactive[Grad][u[t,x,y],{x,y}]),{x,​​y}]+​​
(0,1,0)
p
[t,x,y],ρ​​
(1,0,0)
v
[t,x,​​y]+ρ{u[t,x,y],v[t,x,y]}.Inactive[Grad][​​v[t,x,y],{x,y}]+​​Inactive[Div][(-μInactive[Grad][v[t,x,y],{x,y}]),{x,​​y}]+​​
(0,0,1)
p
[t,x,y],​​
(0,1,0)
u
[t,x,y]+​​
(0,0,1)
v
[t,x,y]/.{μ->10^-3,ρ->1};​​​​ramp=Function[t,Exp[5*t]/(Exp[20]+Exp[5*t])];​​​​inflowBC=DirichletCondition[{u[t,x,y]==ramp[t]*4*1.5*y*(hight-y)/hight^2,v[t,x,y]==0},x==0];​​​​outflowBC=DirichletCondition[p[t,x,y]==0.,x==length];​​​​wallBC=DirichletCondition[{u[t,x,y]==0,v[t,x,y]==0},0<x<length];​​bcs={inflowBC,outflowBC,wallBC}/.rules;​​​​ic={u[0,x,y]==0,v[0,x,y]==0,p[0,x,y]==0};​​​​Monitor[AbsoluteTiming[{xVel,yVel,pressure}=NDSolveValue[{op=={0,0,0},bcs,ic},{u,v,p},{x,y}∈Ω,{t,0,10},Method->{"PDEDiscretization"->{"MethodOfLines","SpatialDiscretization"->{"FiniteElement","InterpolationOrder"->{u->2,v->2,p->1},"MeshOptions"->{"MaxCellMeasure"->0.0005}}}},EvaluationMonitor:>(currentTime=Row[{"t = ",CForm[t]}])];],currentTime]​​​​vorticity=Function@@List[{t,x,y},-D[xVel[t,x,y],y]+D[yVel[t,x,y],x]];​​​​cc=Join[{-30},N@Subdivide[-20,20,50],{30}];​​colors=ColorData["TemperatureMap"][Rescale[#,MinMax[cc]]]&/@cc;​​​​Show[ContourPlot[vorticity[8,x,y],{x,0,2.2},{y,0,0.41},Sequence[AspectRatio->Automatic,ContourShading->None,Contours->cc,ContourStyle->colors,Axes->False,Frame->None]],Sequence[bmesh,ImageSize->Medium]]​​
Out[]=
NDSolveValue
:No places were found on the boundary where x0 was True, so DirichletCondition[v0,x0] will effectively be ignored.
NDSolveValue
:No places were found on the boundary where x
11
5
was True, so DirichletConditionp0.,x
11
5
 will effectively be ignored.
NDSolveValue
:No places were found on the boundary where x0 was True, so DirichletConditionu
35.693
5t

41
100
-yy
20

+
5t

,x0 will effectively be ignored.
General
:Further output of NDSolveValue::bcnop will be suppressed during this calculation.
NDSolve
:No places were found on the boundary where x0 was True, so DirichletConditionu
35.693
5t

41
100
-yy
20

+
5t

,x0 will effectively be ignored.
NDSolve
:No places were found on the boundary where x0 was True, so DirichletConditionu
35.693
5t

41
100
-yy
20

+
5t

,x0 will effectively be ignored.
NDSolve
:No places were found on the boundary where x0 was True, so DirichletConditionu
35.693
5t

41
100
-yy
20

+
5t

,x0 will effectively be ignored.
General
:Further output of NDSolve::bcnop will be suppressed during this calculation.
Out[]=
{5.34011,Null}
Out[]=