Add a BDF solver with an equal-order extrapolation estimate for the nonlinear term. This results in a semi-implicit solver that only needs one linear system solve per time step. The scheme is based on the time-stepping in Nek5000.
This solver is slower to solve an individual time step compared to IPCS (because it uses a mixed formulation instead of split velocity/pressure systems), but typically faster overall since it can take larger time steps. For example, on the cylinder (single core on my laptop, medium-resolution mesh), the BDF3 solver takes about 14.5 sec wall clock time per unit of simulation time, compared to about 54.3 sec per unit of sim time for IPCS (about a 4x speedup). We can probably improve on this further by using a stabilized formulation like SUPG so that we can use equal-order elements and have a smaller mixed linear system to solve.
Time to run each environment to tf=1.0, using approximately the maximum stable time step for each method and the default mesh for each environment. Times reported are wall clock times.
Cylinder
Pinball
Cavity
Step
IPCS (nproc=1)
0:57
3:34
IPCS (nproc=4)
0:48
1:50
IPCS (nproc=8)
0:43
1:30
IPCS (nproc=32)
1:15
1:43
1:10:30
13:13
BDF3 (nproc=1)
0:22
1:34
BDF3 (nproc=4)
0:15
0:43
BDF3 (nproc=8)
0:15
0:40
BDF3 (nproc=32)
0:25
0:47
12:13
3:57
Max speedup
2.9x
2.3x
5.8x
3.3x
Looks like ~3x speedup on average, maybe more for larger problems. The mixed element systems do lead to larger linear system solves, but hopefully that can be somewhat mitigated with SUPG stabilization or linear velocity elements.
Changes
Add new time-stepper (semi-implicit BDF/EXT scheme of order k=1, 2, 3).
Add ScaledDirichletBC to represent time-varying BCs more easily. IPCS now uses time-varying BCs instead of B vectors.
Use exact ODE solution to update damped actuators (also gets rid of "inertia" parameter - now rolled into "damping" as a single time scale. See docstring for DampedActuator). No longer need to specify integration type.
Minor changes to Actuator interface
Add a common base class for Firedrake Navier-Stokes timesteppers
Some cleanup of the "flow.py" codes
TODO
[x] Benchmark IPCS on cylinder
[x] Fix other flow configs
[x] Can IPCS use ScaledDirichletBC as well?
[ ] Test SUPG stabilization for linear velocity elements? (See #135)
Add a BDF solver with an equal-order extrapolation estimate for the nonlinear term. This results in a semi-implicit solver that only needs one linear system solve per time step. The scheme is based on the time-stepping in Nek5000.
This solver is slower to solve an individual time step compared to IPCS (because it uses a mixed formulation instead of split velocity/pressure systems), but typically faster overall since it can take larger time steps. For example, on the cylinder (single core on my laptop, medium-resolution mesh), the BDF3 solver takes about 14.5 sec wall clock time per unit of simulation time, compared to about 54.3 sec per unit of sim time for IPCS (about a 4x speedup). We can probably improve on this further by using a stabilized formulation like SUPG so that we can use equal-order elements and have a smaller mixed linear system to solve.
Profiling
Time to run each environment to
tf=1.0
, using approximately the maximum stable time step for each method and the default mesh for each environment. Times reported are wall clock times.Looks like ~3x speedup on average, maybe more for larger problems. The mixed element systems do lead to larger linear system solves, but hopefully that can be somewhat mitigated with SUPG stabilization or linear velocity elements.
Changes
ScaledDirichletBC
to represent time-varying BCs more easily. IPCS now uses time-varying BCs instead ofB
vectors.DampedActuator
). No longer need to specify integration type.Actuator
interfaceTODO
ScaledDirichletBC
as well?Test SUPG stabilization for linear velocity elements?(See #135)