# Optimisation for steady-state flows

(Difference between revisions)
 Revision as of 17:04, 7 February 2008Traumflug (Talk | contribs)← Previous diff Revision as of 19:06, 7 February 2008Traumflug (Talk | contribs) (Added pictures of the surprising results.)Next diff → Line 7: Line 7: [[AdvectionParams]] { scheme = none } [[AdvectionParams]] { scheme = none } - For an example, see the [http://gfs.sourceforge.net/tests/tests/couette/couette.gfs.html Couette flow test case]. To give evidence, I've run the example from [[An engineer's pipe flow]] with the viscosity of water up to time t = 5 with and without advection: + For an example, see the [http://gfs.sourceforge.net/tests/tests/couette/couette.gfs.html Couette flow test case]. - [[Image:Doppelbogen-water-velocity-with-advection.png|thumb|left|Velocity with advection]] + To give the removal of advection evidence, I've run the example from [[An engineer's pipe flow]] with the viscosity of water and up to time t = 1.1 (with advection it's divergent at t = 1.107) with and without advection: - [[Image:Doppelbogen-water-velocity-without-advection.png|thumb|left|Velocity without advection]] + + [[Image:Doppelbogen-1.0-water-velocity-with-advection.png|thumb|left|Velocity with advection]] + [[Image:Doppelbogen-1.0-water-velocity-without-advection.png|thumb|left|Velocity without advection]] + + With advection, the calculation time was 4436 seconds. Without advection, this shortened to just 77 seconds. + + As you can see, there are pretty big differences. + +
+ + [[Image:Doppelbogen-1.1-water-velocity-with-advection.png|thumb|left|Velocity with advection]] + [[Image:Doppelbogen-1.1-water-velocity-without-advection.png|thumb|left|Velocity without advection]] + + A tenth of fluid domain time later, the advection version appeard to "explode". Shortly thereafter, the timestep goes down to almost zero and stays there forever. + +
+ + [[Image:Doppelbogen-5.0-water-velocity-without-advection.png|thumb|left|Velocity without advection]] + + Just for Info, the same flow withoutadvection a lot later.

## Revision as of 19:06, 7 February 2008

Often, you're not particularly interested in how a flow or stream develops over time, but only how the constant flow behaves if it exists long enough to have all initial reactions and changes settled. While Gerris isn't optimised for such calculations, a few simplifications and speed-ups exist.

## Getting rid of advection calculations

In a mailing list thread people agree, a steady-state solution behaves equally to a pure Stokes flow and advection terms are negligible. You can switch them off:

```AdvectionParams { scheme = none }
```

For an example, see the Couette flow test case.

To give the removal of advection evidence, I've run the example from An engineer's pipe flow with the viscosity of water and up to time t = 1.1 (with advection it's divergent at t = 1.107) with and without advection:

With advection, the calculation time was 4436 seconds. Without advection, this shortened to just 77 seconds.

As you can see, there are pretty big differences.

A tenth of fluid domain time later, the advection version appeard to "explode". Shortly thereafter, the timestep goes down to almost zero and stays there forever.