plot_MilleFEuiIle.py
- plot_MilleFEuiIle.compute_streamlines(ax, v, points, vel_max, fig, font_size, i)
Computes (and plots) streamlines for the velocity field by performing forward and backward trajectory integration. Initial position of the points is prescribed as an equidistant distribution at y = 2 km.
# --- Starting points for streamlines computation --- length = 200e3 num_points = 50 points = [] for i in range(1, num_points): if (i != int(num_points/2.0)): points.append([length/num_points*i, 2e3])The parameter
lengthrepresents the length of the domain andnum_pointsis the number of the points along the line.Tip
Custom initial position of the can be simply redefined.
- plot_MilleFEuiIle.extract_cell_data(mesh, function, index)
Reads a scalar value in the center of a cell with given index.
- plot_MilleFEuiIle.load_comp_tracers(ax, name, i, data)
Loads tracers and plots them based on their composition. See
plot_comp_tracersinplot_demo*.pyThe composition number, color and opacity are specified as follows
plot_comp_tracers = [[2, "orange", 0.25], [1, "lightskyblue", 0.25]]
- plot_MilleFEuiIle.load_melt_tracers(ax, name, labels, fig, font_size, i)
Loads tracers and plots them based on their melt content. See
plot_melt_tracersinplot_demo*.pyOnly tracers with nonzero amount of melt are plotted. Adds a separate colorbar for the melt content.
- plot_MilleFEuiIle.plot_scalar(ax, fig, function, mesh, labels, x_range, z_range, font_size, type, plot_HDF5_data)
Plots a scalar function from the HDF5 file, a colorbar, and labels.
- plot_MilleFEuiIle.plot_time(ax, directories, column, labelname, colors, styles)
Plots data with respect to time.
- plot_MilleFEuiIle.plot_trajectory(ax, name, ID, sim_step, tail, tail_length)
Plots trajectories of individual tracers from
"data_" + name + "/tracers/trajectories/. Seeplot_trajectoriesinplot_demo*.pyThe tracers’ IDs and colors are then specified as follows:
plot_trajectories = [["a", "white"], ["b", "aqua"], ["c", "violet"], ["d", "yellow"], ["e", "lawngreen"]]Attention
The tracers need to be defined already in
m_parameters.pyof the simulation.