GfsAdaptFunction
From Gerris
GfsAdaptFunction uses a "cell cost" defined by a GfsFunction.
The syntax in parameter files is:
[ GfsAdapt ] [ GfsFunction ]
For example, the following will result in a fine mesh being used only along the interface defined by variable T:
VariableTracerVOF T
...
AdaptFunction { istep = 1 } { cmax = 0 minlevel = 5 maxlevel = 8 } (T > 0 && T < 1)
Examples
- Air-water flow around a Series 60 cargo ship
- Time-reversed advection with curvature-based refinement
- Viscous flow past a sphere
- Shape oscillation of an inviscid droplet
AdaptFunction { istep = 1 } {
cmax = 1e-2
# Faster coarsening than with the default cfactor of 4 reduces
# the size of the simulation
# cfactor = 2
# Coarse 'sponge' for x >= 1.5
maxlevel = (x < 1.5 ? LEVEL : 4)
minlevel = 4
} {
return (T > 0.)*fabs (Vorticity)*ftt_cell_size (cell)/FROUDE;
}
AdaptFunction { istep = 1 } { cmax = 0.1 maxlevel = 8 minlevel = 6 } {
return T > 0. && T < 1. ? ftt_cell_size (cell)*fabs (K) : 0.;
}
AdaptFunction { istep = 1 } { cmax = 1e-2 maxlevel = LEVEL } {
return (fabs(dx("U"))+fabs(dy("U")))/fabs(U)*ftt_cell_size (cell);
}
AdaptFunction { istep = 1 } {
cmax = 0.01
maxlevel = LEVEL
} (T > 0 && T < 1 ? 1. : fabs (Vorticity)*ftt_cell_size (cell))

