Prescribing internal velocity constraints with ASCII files#

This section was contributed by Bob Myhill

Building on sec:prescribed-velocities, the cookbooks/prescribed_velocity_ascii_data directory contains a plugin which uses an ASCII data file to specify where to prescribe internal velocities. Velocities are prescribed wherever the field value indicated by the ASCII data file is greater than 0.5. As before, the plugin is loaded in parameter files as an additional shared library:

An example parameter file using this plugin can be found at cookbooks/prescribed_velocity_ascii_data/prescribed_velocity_ascii_data.prm. In this file, the velocities are constrained to be zero within the letters “ASPECT” (Figure 1). The part of this file which provides the location of the ASCII file and the prescribed velocity field function is:

A temperature gradient is applied within the letters, while the temperature field outside the letters is set to be constant. This initial temperature field is specified by another ASCII data file:

These two ASCII data files are generated from aspect_name.png by the python file, both of which can be found in the same directory as the parameter file.


Fig. 48 Initial composition and temperature conditions for the prescribed velocity ascii data cookbook, as described in Section 0.0.1.#

During the simulation, excess heat diffuses out from the tops of the letters, and into the bases of the letters. The temperature gradients in the unconstrained part of the domain then generate convective flow. Figure 2 illustrates the resulting flow field.


Fig. 49 Convective flow around the letters ASPECT, within which velocities are prescribed to be zero, as described in Section 0.0.1.#