Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
John Burkardt
Department of Scientific Computing
Florida State University
..........
11am, 12 November 2013
CCS, Stanley Thomas Hall
..........
http://people.sc.fsu.edu/jburkardt/presentations/...
stokes 2013 tulane.pdf
1 / 58
Deal.II
Fenics
FreeFem++
Ifiss
2 / 58
4 / 58
t
x
y
x
y
y
u v
+
+
=0
t
x
y
6 / 58
EQUATIONS: Simplifications
In many flow problems, there is a transient solution that
gradually settles down to a long-term unvarying flow.
We can seek this steady-state solution by dropping the time
derivatives from our equation.
Many fluids, such as water, have an almost constant density. If we
assume incompressibility, we can dividing through by .
We can replace
7 / 58
8 / 58
||v ||L
p
=fu
x
p
=fv
y
v
=0
y
They are a good model for low Reynolds number flow; but they
can also be useful if we end up working with the nonlinear
problem, because the Stoke equations will at least give us a decent
starting estimate for the solution.
10 / 58
11 / 58
12 / 58
15 / 58
16 / 58
17 / 58
pnodes
X
ci i (x, y )
i=1
where the i-th basis function is associated with the i-th pnode.
18 / 58
19 / 58
20 / 58
22 / 58
v=
vnodes
X
i=1
vnodes
X
ai i (x, y )
bi i (x, y )
i=1
or
u
v
=
vnodes
X
i=1
ai
bi
i (x, y )
23 / 58
24 / 58
26 / 58
Z
2v
2v
p
(( 2 + 2 ) +
) i dx dy =fv
x
y
y
Z
u v
(
+
) i dx dy =0
y
x
Z
((
27 / 58
n
Z
Z
Z
v i
v i
p
v
fv + (
+
)+
i dx dy = fv dx dy +
i ds
x x
y y
y
n
Z
u v
+
) i dx dy =0
(
y
x
The right hand sides are only interesting (nonzero) for nodes on
the boundary where a normal inflow or outflow condition is allowed.
We can still recognize the original PDEs, but the integration
allows us to think about the average behavior over the area of each
element, rather than at particular points.
28 / 58
30 / 58
I (f , ) =
n
X
wi f (xi , yi ) = Q(f , )
i=1
x x2 x3 x2
32 / 58
1 (x, y ) =
33 / 58
3 (x, y ) =
g (x, y ) h(x, y )
g (x3 , y3 ) h(x3 , y3 )
37 / 58
ASSEMBLY
38 / 58
39 / 58
%
%
%
%
%
%
43 / 58
45 / 58
http://www.cs.umd.edu/elman/ifiss.html
46 / 58
IFISS: Features
IFISS includes built-in solvers for 2D versions of:
the
the
the
the
Poisson equation
convection-diffusion equation
Stokes equations
Navier-Stokes equations
The user can specify the geometry and the boundary conditions,
and time dependence.
The package uses MATLABs sparse storage structure; it can use
MATLABs sparse direct solver, but also can invoke iterative
solvers, including GMRES and multigrid methods.
IFISS offers a variety of mixed finite element bases for flow:
Stable rectangular: Q2 Q1 or Q2 P1 ;
Stabilized rectangular: Q1 P0 or Q1 Q1 ;
47 / 58
48 / 58
wght*dpsidx(:,i).*dpsidx(:,j).*invjac(:);
wght*dpsidy(:,i).*dpsidy(:,j).*invjac(:);
wght*psi(:,i).*psi(:,j).*jac(:);
- wght*psi(:,i) .*dpsidx(:,j);
- wght*psi(:,i) .*dpsidy(:,j);
for i=1:3
bxe(:,i,j) = bxe(:,i,j) - wght*chi(:,i) .* dpsidx(:,j);
bye(:,i,j) = bye(:,i,j) - wght*chi(:,i) .* dpsidy(:,j);
end
end
49 / 58
Notice that the flow seems symmetric before and after the
obstruction. Its actually reversible!
54 / 58
57 / 58
Deal.II
Fenics
FreeFem++
Ifiss
58 / 58