GfsOutputPPM
From Gerris
OutputPPM writes a colour image of the given scalar field in PPM (Portable PixMap) format.
The syntax in parameter files is:
[ GfsOutputScalar ]
By default the pixels are the square cells at the highest level of refinement. The level of the cells displayed can be controlled using the maxlevel
option of GfsOutputScalar. Setting maxlevel
can also be useful to control the size (in pixels) of the image produced: when maxlevel
is set the pixel size of the image will always be a multiple (depending on the number of boxes in the computation domain) of 2^maxlevel. This holds even when the number of levels in the simulation changes due to adaptive refinement (see also this question in the FAQ).
The NODATA
keyword of GfsFunction can be used to mask out parts of the domain. For example drawing only the positive values of the pressure could be written:
OutputPPM { start = end } end.ppm { v = (P > 0 ? P : NODATA) }
The "no data" areas are drawn in black.
Note that this object is only available for 2D simulations.
Examples
- B\'enard--von K\'arm\'an Vortex Street for flow around a cylinder at Re=160
- Vortex street around a "heated" cylinder
- Rayleigh-Taylor instability
- Coalescence of a pair of Gaussian vortices (Gerris logo)
- The 2004 Indian Ocean tsunami
- "Garden sprinkler effect" in wave model
- Cyclone-generated wave field
- Time-reversed VOF advection in a shear flow
- Time-reversed advection with curvature-based refinement
- Lid-driven cavity at Re=1000
- Lid-driven cavity at Re=1000 (explicit scheme)
- Lid-driven cavity on an anisotropic mesh
- Gravity waves in a realistic ocean basin
OutputPPM { istep = 2 } { ppm2mpeg > vort.mpg } {
min = -10 max = 10 v = Vorticity
}
OutputPPM { istep = 2 } { ppm2mpeg > t.mpg } {
min = 0 max = 1 v = T
}
OutputPPM { start = 15 } { convert -colors 256 ppm:- vort.eps } {
min = -10 max = 10 v = Vorticity
}
OutputPPM { start = 15 } { convert -colors 256 ppm:- t.eps } {
min = 0 max = 1 v = T
}
OutputPPM { istep = 2 } { ppm2mpeg > t.mpg } {
min = 0 max = 0.4 v = T
}
OutputPPM { start = 15 } { convert -colors 256 ppm:- t.eps } {
min = 0 max = 0.4 v = T
}
OutputPPM { istep = 2 } { ppm2mpeg > vort.mpg} {
min = -30 max = 30 v = Vorticity
}
OutputPPM { istep = 2 } { ppm2mpeg > t.mpg } {
min = 0 max = 1 v = T
}
OutputPPM { start = end } { convert -colors 256 ppm:- vort.eps } {
min = -30 max = 30 v = Vorticity
}
OutputPPM { start = end } { convert -colors 256 ppm:- t.eps } {
min = 0 max = 1 v = T
}
OutputPPM { istep = 2 } { ppm2mpeg > logo.mpg } {
v = Vorticity
min = -0.1348 max = 6.22219
# Only generate the movie in a small box centered on the
# origin. We also need to make sure that box size is a multiple
# of 1./64. so that the PPM image size stays constant (ffmpeg
# crashes on variable image sizes).
condition = (Level < 6 ||
(x >= -3./128. && x <= 3./128. && y >= -3./128. && y <= 3./128.))
}
OutputPPM { step = 60 } { ppm2mpeg > velocity.mpg } {
maxlevel = 10
v = Velocity
min = 0 max = 0.25
}
OutputPPM { step = 60 } { ppm2mpeg > zb.mpg } {
maxlevel = 10
v = Zb
}
OutputPPM { step = 12 } { ppm2mpeg > hs-MINLEVEL-NTHETA.mpg } { v = Hs maxlevel = 7 }
OutputPPM { istep = 1 } { ppm2mpeg > hs.mpg } { v = Hs maxlevel = 9 }
OutputPPM { istep = 1 } { ppm2mpeg > level.mpg } { v = Level min = 4 max = LEVEL maxlevel = 9 }
OutputPPM { start = 0 } { convert ppm:- t-0.eps } { v = T }
OutputPPM { start = 2.5 } { convert ppm:- t-2.5.eps } { v = T }
OutputPPM { start = 5 } { convert ppm:- t-5.eps } { v = T }
OutputPPM { start = end } { convert ppm:- dt-5.eps } { v = DT }
OutputPPM { start = end } { convert ppm:- dt-5.eps } { v = DT }
OutputPPM { start = end } { convert -colors 256 ppm:- velocity.eps } {
v = Velocity
}
OutputPPM { start = end } { convert -colors 256 ppm:- velocity.eps } {
v = Velocity
}
OutputPPM { start = end } { convert -colors 256 ppm:- -resize 128x128! velocity.eps } {
v = Velocity
}
OutputPPM { start = 2 } { convert ppm:- p.eps } { v = P min = -5e-3 max = 5e-3 }