Postprocessing SOPALE output January 28, 2002 The files generated by SOPALE can be viewed using the mozart_plot.x program. This program, written by Philippe Fullsack, currently runs on the SP2 and uses X Window graphics. ******** Overview ******** The program mozart_plot.x is controlled by a combination of text input files and interactive graphic interface. The text input files control things like window size, which files are to be plotted, contour lines, etc. The graphic interface let you set some other options, like which field values and which grids to plot. Mozart_plot.x displays the plots on screen, using X Window graphics, and can save Postscript output of the screen plot. ********************** Input files (overview) ********************** The input files required by mozart_plot.x fall into two categories: 1) The binary files generated by SOPALE, which contain the data to be plotted. These are the files with names of the form gXX_pYY_fNN_o where XX, YY, and NN are numbers To go with these, you also need the files with names like gXX_pYY_T00_o where XX and YY are numbers These files are also generated by SOPALE. 2) Text files whose names (usually) start with "P" and end in "_i", which contain various parameters to control the display of the on-screen plot. There are many of these files, and we're not sure what all of them do. (Only Philippe knows for sure...) Some of the "P" files that may be useful are described in the section below called "Description of P Input Files". ********************************** Getting Started with mozart_plot.x ********************************** We'll start with a simple example of using mozart_plot.x to view SOPALE output. 1) Set up the working directory for running mozart_plot.x When you run mozart_plot.x, the P*_i input files and the SOPALE output data files need to be in the current directory. You can either (a) copy the P*_i files to the directory where you ran your model (where the output files will be sitting), or (b) copy your SOPALE output files to a directory where you keep your P*_i files. Let's suppose in our sample case, that our SOPALE run was set up to write out data at timesteps 400, 800, 1200, and 1600 (for both the Lagrangian and Eulerian grids). Our output files will be called g01_p00_f01_o Eulerian grid at frame 1 (timestep 400) g01_p00_f02_o Eulerian grid at frame 2 (timestep 800) g01_p00_f03_o Eulerian grid at frame 3 (timestep 1200) g01_p00_f04_o Eulerian grid at frame 4 (timestep 1600) g02_p00_f01_o Lagrangian grid at frame 1 (timestep 400) g02_p00_f02_o Lagrangian grid at frame 2 (timestep 800) g02_p00_f03_o Lagrangian grid at frame 3 (timestep 1200) g02_p00_f04_o Lagrangian grid at frame 4 (timestep 1600) If we want to look at the model results from timestep 800 (that would be frame 2) for both Lagrangian and Eulerian grids, we'll need the files g01_p00_f02_o g02_p00_f02_o In addition, we'll need the files g01_p00_T00_o g02_p00_T00_o Copy these files to the directory where you plan to plot (if you are plotting somewhere else besides the model output directory). Make sure the P*_i files are also in the directory where you plan to plot. If you don't have them already, just copy them from an existing directory (they're too much trouble to create from scratch). 2) Edit the file "Pfiles_to_read_i" file to specify the files you want to plot. The format of the Pfiles_to_read_i is described in the section below called "Description of P Input Files". For now, we'll just look at our simple example. In our sample case, we want to plot the data in g01_p00_f02_o and g02_p00_f02_o. Our Pfiles_to_read_i will look like this. 2 number of fields (files) to plot 1 0 2 1=Eulerian, leave other numbers as 0,2 g01_p00_f02_o name of input file for frame 2 Eulerian output 0 0=another file definition is coming up 2 0 2 2=Lagrangian, leave other numbers as 0,2 g02_p00_f02_o name of input file for frame 2 Lagrangian output 1 1= end of list of files 3) Set the environment variable DISPLAY on the machine where you are running mozart_plot.x (this will be the SP2 at first - later you may want to port mozart_plot.x to a local machine). In the Korn shell (ksh) command line, type DISPLAY=hostname.domain:0.0; export DISPLAY [where hostname.domain is the Internet name of the local machine where you are displaying] 4) On the machine where you are displaying, you'll need to do xhost + (for a Unix workstation), or the equivalent command if you're using X server software on a PC, to allow the SP2 access to the graphics display. 5) In the working directory (where your output files and P*_i files are), run mozart_plot.x $ mozart_plot.x (If mozart_plot.x is not in your path, you may need to type in the full pathname.) After some messages are displayed, you should see two windows on your screen - a tall thin window with buttons in it, on the left side of your screen (we'll call this the menu bar), and a large squarish window in the center of your screen (we'll call this the main plot window). 6) The first thing you do is to choose which grid (Lagrangian or Eulerian) to plot. Let's say we want to display the Lagrangian grid. Click the top button on the menu bar which says "Set current grid". Now the selections in the menu bar will change, to show a different set of options. Click on "L_00" (L for Lagrangian) to plot the Lagrangian grid. 7) Now that you have chosen the Lagrangian grid, you choose how you want it displayed. For this example, we'll display just the grid lines. Click on "Grid rendering". You'll get another menu with a number of different options. (These options are explained in the section below on "Grid Rendering Menu".) For now, click on the "Cells" option. Then click "Cancel" to go back to the main menu. 8) The Lagrangian grid should now be drawn in the main plot window. 9) Now suppose you want to display the value of some field on the Eulerian grid - say, the strain. Choose the grid by clicking on "Set current grid" and then click on "E_00" (E for Eulerian). 10) After selecting the Eulerian grid, you must now select "Grid rendering" to choose how you want it displayed. This time, instead of "Cells" (which we used to display the grid lines for the Lagrangian grid), choose "Colour mesh". After choosing "Color mesh", there is a menu showing another set of options ("Cancel / logabs / powerlaw / filter / Color map"). Click on "Color map". Now click "Cancel". 11) You will now see a list of possible fields to plot. Click on the field you wish to display, say "strain_L" to display the strain. You should see the plot being drawn in the main plot window. 12) If you want to change the field being displayed, click on "Set field to use" in the main menu. 13) If you want to save what you see on screen, click on the "Print" option in the main menu. This doesn't actually send the plot to the printer; it saves it in a file called "window1.1.ps". If you have a Postscript printer, you can probably send this file directly to the printer. 14) To end the program, click "Done" (near the bottom of the menu bar in the main menu). ********************* Common plotting tasks ********************* Some common plotting options are described below. The relevant input file is mentioned for each task, but the actual description of the input file is in the section "Description of P Input Files". SETTING WHICH FILES TO PLOT =========================== Relevant input file(s): Pfiles_to_read_i Input file format(s): Pfiles_to_read_i ---------------- This specifies the names of the SOPALE output files to be read and plotted. Format: Line 1: n_of_files Number of files to plot Line 2: g_locnum g_myproc g_frame g_locumn = 1 for Eulerian grid = 2 for Lagrangian grid g_myproc - leave this as 0 g_frame - leave this as 2 Line 3: filename Name of file to plot Line 4: splot splot = 0 if you are going to specify another file = 1 if this is the last file in the list Repeat lines 2 to 4 for each file you will plot. Example of Pfiles_to_read_i: 2 number of fields to plot 1 0 2 1=Eulerian, 2=Lagrangian; leave others as 0,2 g01_p00_f02_o name of input file 0 0=plot next one; 1=stop 2 0 2 g02_p00_f02_o 1 SETTING THE DOMAIN TO BE PLOTTED ================================ Relevant input files(s): Pmplot_i Description of input files: Pmplot_i -------- This file specifies the domain to be plotted on the screen. Mozart_plot.x reads just one line, containing 6 numbers, from this file. Line 1: nwinx nwiny xwin11 ywin11 dxwin dywin nwinx } nwiny } The first two numbers are integers. Philippe hasn't explained what they are for, so we just leave both of them set to 1. xwin11 = X value, in user units, which corresponds to lower left corner of plot window ywin11 = Y value, in user units, which corresponds to lower left corner of plot window dxwin = size of X axis in user units (i.e. xwin11 + dxwin = X value of upper right corner of plot window) dywin = size of Y axis in user units (i.e. ywin11 + dywin gives the Y value of upper right corner of plot window Example of Pmplot_i 1 1 10. -.25 10. 10. ! last 4 numbers are xmin ymin xmax ymax NOTE: it appears that xmax is an increment, not an absolute number (probably true of ymax too) How to: Edit the Pmplot_i file. Start (or re-start) the mozart_plot.x program. NOTE: This file doesn't appear to be re-read by mozart_plot.x when the "Redraw" button is clicked. You must exit mozart_plot.x and restart it if you want it to use the most recent values in Pmplot_i. PLOTTING GRIDS ============== Relevant input file(s): Pplot_outline_mesh_i Description of input files: Pplot_outline_mesh_i -------------------- This file defines some parameters for displaying grid lines. Line 1: nrgrids Number of grids to plot. If this number is not the same as the number of files in Pfiles_to_read_i, mozart_plot.x will print a warning message, but will continue anyway. Line 2: nxfil nyfil deltas ixf iyf nxfil = desired x spacing of grid lines (i.e. if nxfil = 2, only every second line is plotted; if nxfil = 3, then only every third line is plotted, and so on) nyfil = desired y spacing of grid lines (i.e. if nyfil = 2, only every second line is plotted; if nyfil = 3, then only every third line is plotted, and so on) deltas = maximum length of line to plot. If a grid line is longer than deltas, then it will not be plotted. This is useful when you are plotting Lagrangian grids with a lot of deformation. ixf = 1 means plot horizontal grid lines (rows of grid) = 0 means don't horizontal grid lines iyf = 1 means plot vertical grid lines (columns of grid) = 0 means don't plot vertical grid lines Line 2: grid_lw grid_lw = line width to use for plotting the grid, in points. NOTE: this will not affect the display of the grid on screen, but will show up in the postscript file. Repeat lines 2 and 3 for each grid you want to plot; there should be as many as you specified in nrgrids in Line 1. How to: First, choose the grid you want to plot (Lagrangian or Eulerian): In the menu, click on "Set current grid". You'll get another menu. Click on "L_00" for Lagrangian or "E_00" for Eulerian. Now click on "Grid rendering" (the second item in the menu). To plot the grid lines, either click on "Cells" (the 4th menu item) or "Strings" (the 6th menu item). You should now see the grid lines for either the Lagrangian grid or the Eulerian grid, depending on which one you chose. If you don't see anything, you may have set the plotting domain incorrectly in Pmplot_i, or your offsets in Pgrid_xzshifts_i may have shifted your plots right off the screen. Additional notes: The difference between using "strings" and using "cells" for plotting is in the Postscript file created when you choose "Print". If you used "Cells" as your grid rendering option, the Postscript file will be physically larger and the grid elements are drawn as separate segments, grouped in rows (this will only be apparent when you import the Postscript file into a drawing package such as Adobe Illustrator or CorelDraw). If you use "Strings", the Postscript file will be smaller, and the rows and columns of the grids are drawn as multi-segment lines rather than as separate line segments grouped into rows. The above differences are mainly an issue when you are importing the Postscript files into a drawing package. The file Pplot_string_mesh_i is now obsolete for versions of mozart_plot.x prior to November 29, 2001. The "strings" plotting option now uses the Pplot_outline_mesh_i like the "cells" option. PLOTTING FIELD VALUES ===================== i.e. plotting cells which are filled in with a color according to the value of the field in the cell (where "field" can be strain rate or material number or pressure and so on...) NOTE: This may have been rendered obsolete by the introduction of "partitioning" (see the next section entitled "PARTITIONING" OR "BLOBBING" WHEN PLOTTING A FIELD). It doesn't seem to work correctly right now. However, it's good to have this written down anyway. [BL July 19, 2000] Relevant input file(s): Pplot_color_mesh_i Pplot_fields_i (more?) Description of input files: Pplot_color_mesh_i ------------------ Similar format to Pplot_outline_mesh_i (see above in section on "Plotting Grid Lines"). In this case, the grid lines are not actually plotted, but are used as the boundary lines for the filled-in grid cells Line 1: nrgrids Number of grids to plot. If this number is not the same as the number of files in Pfiles_to_read_i, mozart_plot.x will print a warning message, but will continue anyway. Line 2: nxfil nyfil deltas ixf iyf nxfil = desired x spacing of grid lines (i.e. if nxfil = 2, only every second is plotted; if nxfil = 3, then only every third line is plotted, and so on) nyfil = desired y spacing of grid lines (i.e. if nyfil = 2, only every second line is plotted; if nyfil = 3, then only every third line is plotted, and so on) deltas = maximum length of line to plot. If a grid line is longer than deltas, then it will not be plotted. This is useful when you are plotting Lagrangian grids with a lot of deformation. ixf = 1 means plot x (vertical) grid lines = 0 means don't plot x (vertical) grid lines iyf = 1 means plot y (horizontal) grid lines = 0 means don't plot y (horizontal) grid lines Repeat line 2 for each grid you want to plot; there should be as many as you specified in nrgrids in Line 1. Pplot_fields_i -------------- Contains various parameters used when plotting field values. Line 1: plot_field_read, plot_field_write, pcolors, cprecis, pcontours plot_field_read = 1 -> read various parameters from the rest of this file = 0 -> don't read any further than the first line of this file Most of my input files have plot_field_read set to 0. plot_field_write = 1 -> write information about field status (field range, transformations, etc) to a file called "statu_[fieldname].xx" where [fieldname] is the name of the field and "xx" is the grid number. = 0 -> Don't write the field information to a file pcolors = number of different regions (i.e. number of different materials, etc) cprecis = parameter for contouring which controls the number of points per cell used when calculating contours (don't know if it's advisable to change this) pcontours = number of contours to use for auto-contouring (see section below for more information about autocontours) The following lines are only needed if plot_field_read = 1 For each field in each grid, we have: Line 2: f_transform f_transform = type of transformation to apply to the field Transformations will use one or more of the values f_t_shift, f_t_L, f_t_U, and f_t_power, which are specified in the next line (line 3). In the description of the transforms below, field_value refers to the value of the field before the transform, transformed_field_value refers to the value of the field after the transform. Types of transforms: 1 => transformed_field_value = field_value + f_t_shift if (field_value + f_t_shift) =< f_t_L then transformed_field_value = f_t_L if (field_value + f_t_shift) >= f_t_U then transformed_vield_value = f_t_U (i.e. make sure transformed_field_value is within the range [f_t_L, f_t_U] ) 2 => if (field_value + f_t_shift ) >= f_t_U then transformed_field_value = 1 else transformed_field_value = 0 3 => if (field_value + f_t_shift) =< f_t_L then transformed_field_value = 1 else transformed_field_value = 0 4 => if (field_value + f_t_shift) is within [f_t_L, f_t_U] then transformed_field_value = 1 else transformed_field_value = 0 5 => if (field_value + f_t_shift) is within [f_t_L, f_t_U] then transformed_field_value = log10(abs(field_value + f_t_shift)) if (field_value + f_t_shift) =< f_t_L then transformed_field_value = log10(abs(f_t_L)) if (field_value + f_t_shift) >= f_t_U then transformed_field_value = log10(abs(f_t_U)) if (field_value + f_t_shift) = 0 then transformed_field_value = 1 6 => if (field_value + f_t_shift) is within [f_t_L, f_t_U] then transformed_field_value = (abs(field_value + f_t_shift))**f_t_power if (field_value + f_t_shift) =< f_t_L then transformed_field_value = (abs(f_t_L))**f_t_power if (field_value + f_t_shift) >= f_t_U then transformed_field_value = (abs(f_t_U))**f_t_power Line 3: f_t_shift, f_t_L, f_t_U, f_t_power Values used for transformations above. Line 4: f_colorscheme f_colorscheme = type of colormap to use [Appears that this is currently not implemented -BL Jan28/02] Line 5: idefault idefault = default color number to use for plotting out-of-range values [Appears that this is currently not implemented -BL Jan28/02] Line 6: f_scale f_scale = 0 for autoscaling f_scale = 1 -> read f_plot_min, f_plot_max in next line Line 7: (only if f_scale is 1) f_plot_min, f_plot_max Line 8: f_element_mix f_element_mix = method for nodal colour mixing Lines 2 to 8 are repeated for each field in each grid. So if you have 2 grids, each with 10 fields, then we would need 20 occurrences (2 grids x 10 fields) of lines 2 to 8. How to: Edit Pplot_color_mesh_i and Pplot_fields_i. Choose your grid ("Set current grid"), choose a field ("Select field to use"), then choose "Grid rendering" -> "Color mesh" Right now, only the default colormap is used. "PARTITIONING" OR "BLOBBING" WHEN PLOTTING A FIELD ================================================== Relevant input files(s): Ppart_i Description of input file(s): Ppart_i ------- This file contains parameters to set "partitioning" (Philippe's new term for what was called "blobbing" in the older microfem model code). "Partitioning" means to combine adjacent cells which have the same field values into one larger polygon (used mostly when plotting the materials). This greatly reduces the size of the resulting postscript file. Line 1: rorw rorw = 1 use the colours specified below for plotting the field values rorw = 2 use the colours specified below AND save the values in lines 2 to the end in another file called fcols_xxxx where xxxx = the name of the field. Example: If we are plotting the field "mechan_set_L", the values would be saved in the file "fcols_mechan_set_L 02" rorw = 3 Use the colours specified in the file fcols_xxxx where xxxx = the name of the field (this would be the file that was saved when rorw was set to 2.) Line 2: ndisc,nx1u,nx2u,ny1u,ny2u,colopt ndisc = number of materials you want to plot (should be the same as the number of materials in your model) nx1u = first column you want to plot (usually 1) nx2u = last column you want to plot (usually the number of horizontal nodes in your grid) ny1u = first row you want to plot (usually 1) ny2u = last row you want to plot (usually the number of vertical nodes in your grid) colopt = 0 if you want to use the automatic colour scheme = 1 if you want to define your colours in the rest of this file Next ndisc lines (if colopt is 1): partr(i),partg(i),partb(i) RGB values to define each colour. NOTE: Each of these RGB has a range of 0 to 65535 (not the usual 0 to 255). partr = red value partg = green value partb = blue value Example Ppart_i file: 2 6 1 601 1 301 1 !nvalues,nx1,nx2,ny1,ny2,0=auto colors,1=define colors LAG 65535 65535 0 ! #1 Fluid mantle, yellow (255 255 0) 0 65535 32639 ! #2 Strong mantle, sea green (CMY=100,0,50 RGB=0,255,127) 38550 38550 65535 ! #3 Weak mantle, lavender (150 150 255) 65535 42405 0 ! #4 Upper crust, orange (255 165 0) -if too dark, use 255,175,100 65535 31868 44975 ! #5 Weak zone, hot pink (255 124 175) if too dark, use pale pink 255,201,216 65535 65535 38550 ! #6 Lower crust, sand (255 255 150) DP13,DP15,DP16 COLOURMAP FOR 6 MATERIALS How to: Set current grid -> example L_00 Grid rendering -> f-partition alloc -> Cancel [choose field to plot, example mechan_set_L] Grid rendering -> f-partition symb Grid rendering -> f-partition compute Grid rendering -> f-partition plot -> Fill polygons Quit By default, polygons are outlined. To turn this off, click "Toggle outline" before clicking "Fill polygons". Every time the screen is refreshed (for example, after a zoom or unzoom or when you click on "Redraw"), you will get the menu where you have to click on "Fill polygons". If you use the partitioner to display fields other than materials, you should use the automatic colour scheme (set colopt to 0 in the file Ppart_i). [NOTE: this means that you can't use a user-defined colourmap for fields other than materials. Hopefully we'll get this fixed later. BL July 18, 2000] PLOTTING VECTORS ================ Relevant input files(s): Pplot_vectors2_i How to: By default, vectors are not usually plotted. To put vectors on your plot, first select the appropriate grid using "Set current grid" from the main menu, then select "Toggle vectors". If this is the first time you have toggled the vectors on, you will see a menu with items like "x_E", "y_E", "vx_E", "vy_E", "viscosity", node_pressure_E", and so on. Click on the field to use for the X component of the vector. If you want to plot Eulerian velocity, for example, you would click on "vx_E". Then click on the field to use for the Y component of the vector. (In our example, that would be "vy_E".) If you don't see any vectors plotted on the screen, you should check the values in the Pplot_vectors2_i file. Make sure you have reasonable scaling factors selected, and make sure that the clipping window for the vector plot is appropriate. Also check that you have specified the scaling factors and clipping window for the appropriate grid. For example, if you want to plot vectors on the Eulerian grid, which is the first grid listed in your Pfiles_to_read_i, then make sure that your scaling factors and clipping window are listed in the set of parameters corresponding to the first grid in Pplot_vectors2_i. PLOTTING CONTOURS ================= This just covers "manual" contouring (where you specify which values for the contour lines and how many contours you want). It's also possible to "autocontour", where the postprocessing program decides, on its own, what values to use; however, that's not as useful if you want to know what actual values the contour lines correspond to. Relevant input files(s): Pplot_contours_i How to: First you need to decide how many contour lines (contour levels) you want, the values for those contour lines, and what colours to use for each line. Then edit Pplot_contours_i (see file description below). When you run mozart_plot.x, choose your grid ("Current grid"), then choose the field you want to contour ("Set field" -> and then pick the appropriate field). Now click on "Grid rendering" and then pick "Contours". SCRIPTING ========= Relevant input file(s): Pxinterac_i Precord_xactions_i How to: To record a script, put 1 in Pxinterac_i and run mozart_plot.x. The actions you take will be recorded in the file Precord_xactions_i. To "play back" a script, put 0 in Pxinterac_i and make sure the script you want to run is in Precord_xactions_i. Run mozart_plot.x Notes on deciphering script files: The Precord_xactions_i file contains a series of phrases and numbers which record a set of actions. Here's an example of a short Precord_xactions_i file: main menu 3 filedchoice menu 6 main menu 1 grid menu 3 main menu 3 filedchoice menu 19 main menu 30 The phrases "main menu", "filedchoice menu" [sic], "grid menu", and so on, show which menu the user is choosing from, and the number denotes which choice to pick from that menu. In our example, the script will choose option 3 from the main menu, then option 6 from the "filedchoice" menu, then option 1 from the main menu, etc. Here are the meanings of the various number options in the mozart_plot menus: main menu 1 = Set current grid (this will bring us to the grid menu next) 2 = Grid rendering (this will bring us to the rendering menu) 3 = Set field to use (this will bring us to the "filedchoice" menu) 4 = create field 5 = Toggle pearls 6 = Set pearl radius 7 = Toggle vectors 8 = Set vector fields 9 = Scale vectors up 10 = Scale vectors down 11 = Set vector scale 12 = set line width 13 = Elem -> node method 14 = Node -> elem method 15 = runtime field 16 = export grid 17 = export field 18 = export icon 19 = section 20 = check search 21 = meshers 22 = Colormap 23 = Print 24 = Save 25 = interpolate-NNI 26 = Unzoom 27 = Zoom 28 = track 29 = Redraw 30 = Done 31 = sections grid menu 1 = first grid listed in Pfiles_to_read_i 2 = second grid listed in Pfiles_to_read_i 3 = third grid listed in Pfiles_to_read_i etc. After a grid is chosen from the grid menu, mozart_plot will return to the main menu. rendering menu 1 = Cancel 2 = Autocontours 3 = No grid rendering 4 = Cells 5 = Color mesh 6 = Strings 7 = Nodes 8 = Pseudo-contours 9 = Contours 10 = Tree 11 = f-partition alloc 12 = f-partition symb 13 = f-partition compute 14 = f-partition plot (this will bring us to the partitioner plotting menu) 15 = f-partition After an option is chosen from the rendering menu, mozart_plot will return to the main menu. coloring menu 1 = Cancel 2 = logabs 3 = powerlaw 4 = filter 5 = Color map filedchoice menu If the current grid is Eulerian, the fieldchoices look like this: 1 = x_E [displacement in x direction, Eulerian grid] 2 = y_E [displacement in y direction, Eulerian grid] 3 = vx_E [x component of velocity, Eulerian grid] 4 = yx_E [y component of velocity, Eulerian grid] 5 = viscosity 6 = node_presssure_E 7 = princ_ang_E [orientation of principal axes for stress and strain] 8 = dev_stress_E [deviatoric stress] 9 = strain_rate_E [2nd invariant of deviatoric strain rate, Eulerian grid] 10 = stressdyield_E 11 = stress_yield_E 12 = strain_E [2nd invariant of total deviatoric strain, Eulerian grid] 13 = mechan_set_E [mechanical material numbers, Eulerian grid] 14 = thermal_set_E [thermal material numbers, Eulerian grid] 15 = temperature_E [temperature, Eulerian grid] 16 = edot-xx [horizontal strain rate, Eulerian grid] 17 = edot-xy [shear strain rate, Eulerian grid] 18 = runtime field 19 = user-defined If the current grid is Lagrangian, the fieldchoices look like this: 1 = x_L [displacement in x direction, Lagrangian grid] 2 = y_L [displacement in y direction, Lagrangian grid] 3 = vx_L [x component of velocity, Lagrangian grid] 4 = vy_L [x component of velocity, Lagrangian grid] 5 = not used 6 = strain_L [2nd invariant of total deviatoric strain, Lagrangian grid] 7 = mechan_set_L [mechanical material numbers, Lagrangian grid] 8 = thermal_set_L [thermal material numbers, Lagrangian grid] 9 = temperature_L [temperature, Lagrangian grid] 10 = user-defined vector x component filed choice menu This looks the same as the fieldchoice menu above. vector y component field choice menu This looks the same as the fieldchoice menu above. partitioner plotting menu (If material colours are plotted with the partitioner, this menu will reappear whenever the screen is redrawn) 1 = Fill polygons 4 = xzscale 5 = one zone 16 = Toggle outline blobs 18 = Toggle grid 20 = Quit ******************* Other P input files ******************* NOTE: Some of the plotting options set in the P*_i files can be changed "on the fly"; that is, if you edit the file while mozart_plot.x is running, then click on the "Redraw" button in the main menu bar, it will re-display the plot with the new options. Unfortunately, not all of the P*_i files are like this, so you may have to quit and then restart mozart_plot.x to change some of the settings. Pplot_string_mesh_i ------------------- NOTE: This file is obsolete for versions of mozart_plot.x before Nov.29,2001. This is quite similar to Pplot_outline_mesh_i in function (i.e. it defines parameters for displaying grid lines). However, Pplot_outline_mesh_i is used when the "cells" menu option (see below) is chosen, while Pplot_string_mesh_i is used when the "strings" menu option is chosen. Line 1: nrgrids Number of grids to plot. If this number is not the same as the number of files in Pfiles_to_read_i, mozart_plot.x will print a warning message, but will continue anyway. Line 2: nxfil nyfil deltas ixf iyf nxfil = desired x spacing of grid lines (i.e. if nxfil = 2, only every second line is plotted; if nxfil = 3, then only every third line is plotted, and so on) nyfil = desired x spacing of grid lines (i.e. if nxfil = 2, only every second line is plotted; if nxfil = 3, then only every third line is plotted, and so on) deltas = maximum length of line to plot. If a grid line is longer than deltas, then it will not be plotted. This is useful when you are plotting Lagrangian grids with a lot of deformation. ixf = 1 means plot x grid lines = 0 means don't plot x grid lines iyf = 1 means plot y grid lines = 0 means don't plot y grid lines Line 3: x1cl x2cl y1cl y2cl x1c1 = minimum x value, used for clipping x2c1 = maximum x value, used for clipping y1c1 = minimum y value, used for clipping y2c1 = maximum y value, used for clipping Repeat lines 2 and 3 for each grid you want to plot; there should be as many as you specified in nrgrids in Line 1. Example Pplot_string_mesh_i 3 1 1 0.1 1 1 0. 10000000. -1. 10000000. ! xmin xmax ymin ymax for clipping (ymin ymax not used) 1 1 0.1 1 1 0. 100000000. -1. 100000000. ! xmin xmax ymin ymax for clipping (ymin ymax no t used) 2 2 0.1 1 1 0. 40. -1. 39. ! xmin xmax ymin ymax for clipping (ymin ymax not used) Pplot_contours_i ---------------- Sets some parameters used in manual contouring (not auto-contouring). Line 1: nrgrids Number of grids to plot. If this number is not the same as the number of files in Pfiles_to_read_i, mozart_plot.x will print a warning message, but will continue anyway. * Line 2: cprecis This is a parameter for contouring, which controls the number of points per cell used when calculating contours. * Line 3: ncontourvg Number of contour lines to plot. * Line 4: contourvg(i) [for i=1,ncontourvg] The contour values for each contour line. * Lines 5 to 5+ncontourvg: phr(k),phg(k),phb(k) The RGB values (red/green/blue) which define the colour to use for each contour line. NOTE: Unlike in most applications, where each RGB value is defined on a scale of 0 to 255, in mozart_plot.x Philippe has chosen to define each RGB value on a scale of 0 to 65535. Repeat the lines marked with a * for each grid. Example Pplot_contours_i file: 2 ! number of grids .06 ! cprecis - controls number of points per cell in contouring 10 ! number of contour values (no more than 200) 1e-14 2e-14 3e-14 4e-14 5e-14 6e-14 7e-14 8e-14 9e-14 10e-14 ! contour values 00000 44000 52000 60000 60000 0 000 60000 0 0000 10000 60000 60000 40000 20000 00000 44000 52000 60000 60000 0 000 60000 0 0000 10000 60000 60000 40000 20000 Pclear_i -------- This file contains only one number, which is used to control whether the plot window is cleared in between redrawing. Line 1: iclear If iclear = 1, then the plot window is cleared before redrawing the plot results If iclear = 0, then the plot window is NOT cleared before redrawing the plot results. This is useful when you want to superimpose some plots. NOTE: the iclear parameter only affects what you see on the screen. You can't save the superimposed plots to a Postscript file. If you tried to save the superimposed plots, you get the same picture as you get when iclear=1. Pplot_vectors2_i ---------------- This file contains parameters which control the display of vectors. (Note: some older versions of mozart_plot.x used Pplot_vectors_i instead, but this is not needed in for this [July 5/00] version.) Line 1: nrgrids Number of grids to plot. If this number is not the same as the number of files in Pfiles_to_read_i, mozart_plot.x will print a warning message, but will continue anyway. Line 2: vectmultx vectmulty vectpearl vectmultx = scaling factor for x component of vector vectmulty = scaling factor for y component of vector vectpearl = radius of "pearl" (filled circle at base of vector) Units: Choose values of vectmultx and vectmulty so that vectmultx * X component of velocity = desired size of X component of vector in the same units as your grid vectmultx * Y component of velocity = desired size of Y component of vector in the same units as your grid vectpearl should be specified in the same units as your grid. Line 3: vectix vectiy vectix = horizontal spacing for displaying vectors. A value of n results in every nth vector (in the x direction) to be displayed; i.e. if vectix is 4, then every 4th vector (in the x direction) is displayed. vectiy = vertical spacing for displaying vectors. A value of n results in every nth vection (in the y direction) to be displayed; i.e. if vectiy is 3, then every 3rd vector (in the y direction) is displayed. Line 4: vect_min vect_max These values are now ignored (but they still need to be included in the file.) They have been superseded by the values in Line 5. Line 5: vect_xmin vect_xmax vect_ymin vect_ymax These values define a clipping window for vectors. Any vectors outside this window won't be plotted. This is useful when generating Postscript files that will be imported into a drawing software package. vect_xmin = minimum x value for vector clipping window vect_xmax = maximum x value for vector clipping window vect_ymin = minimum y value for vector clipping window vect_ymax = maximum y value for vector clipping window Units are user units for the grid. Line 6: vect_lw vect_lw = line width to use in plotting vectors (units: points) NOTE: the specified line width will not show up on screen, but will show up in the printed postscript file. For example, if you set vect_lw to 0.75, the vectors will be drawn with a 0.75-point line BUT ONLY IN THE PRINT VERSION. The vectors will still be drawn with thin lines on screen. Repeat lines 2 to 6 for each grid. Example Pplot_vectors2_i file: 3 ! number of grids 50.e12 50.e12 5000.002 ! x scaling factor, y scaling factor, pearl radius 4 4 ! x spacing, y spacing 0.0d1 2.0d6 ! ignored 0.63d6 1.63d6 -1d6 1d6 ! xmin,xmax,ymin,ymax 0.75 ! linewid 100.e12 100.e12 2000. ! x scaling factor, y scaling factor, pearl radius 12 12 ! x spacing, y spacing 0.0d6 2.0d6 ! ignored 0.63d6 1.63d6 -1d6 1d6 ! xmin,xmax,ymin,ymax 0.75 ! linewid 100.e12 100.e12 2000. ! x scaling factor, y scaling factor, pearl radius 6 6 ! x spacing, y spacing 0.0d6 2.0d6 ! ignored 0.63d6 1.63d6 -1d6 1d6 ! xmin,xmax,ymin,ymax 0.75 ! linewid Ppermut_grids_i --------------- Pgrid_xzshifts_i ----------------- Defines offsets for plotting several grids in one window (otherwise if you were plotting multiple files, they would be superimposed on each other). Line 1: grid_xshift grid_zshift grid_xshift = distance, measured in user units, to shift the plot in the x direction grid_zshift = distance, measured in user units, to shift the plot in the y direction Repeat Line 1 for each file you specified in Pfiles_to_read_i. The first line will specify the x and z shifts for the first file, the second line will specify the x and z shifts for the second file, and so on. Pplot_pearls_i -------------- NOTE: [Jan27/00] This file appears to be ignored. To change the size of the pearls, edit the file Pplot_vectors2_i. This file contains parameters for displaying "pearls" - filled circles located at the nodes. Line 1: nrgrids Number of grids to plot. If this number is not the same as the number of files in Pfiles_to_read_i, mozart_plot.x will print a warning message, but will continue anyway. Line 2: pearlfield pearlrad pearlfield = 1 means colour the pearls according to the field value pearlrad = radius of pearl NOTE: I don't know if there are any other possible values for pearlfield. Line 3: pearlix pearliy pearlix = horizontal spacing for displaying pearls A value of n results in a pearl being drawn at every nth node (in the x direction); i.e. if pearlix is 4, then a pearl is drawn at every 4th node in the x direction. pearliy = vertical spacing for displaying pearls A value of n results in a pearl being drawn at every nth node (in the y direction); i.e. if pearlix is 3, then a pearl is drawn at every 3rd node in the y direction. 2 ! number of grids 1 .1 ! 1=color pearls with field values, radius of pearl 1 1 ! ix, iy (column, rows spacing) 1 .1 ! same as above, for second grid 1 1 ********** Menu items ********** When you start up mozart_plot.x, two windows will come up. One is a large square window near the center of your screen. This is the plot window. The other window is a tall thin window on the left side of your screen and contains the menu. Not all of the menu items are currently implemented. The items on the main menu are listed below, along with brief explanations for a few of them (the ones we know how to use...): Set current grid This lets you define which grid (Lagrangian or Eulerian) to display. All the current settings (grid rendering, etc.) apply to the current grid. Grid rendering Allows you to set the features of the grid which will be plotted. You can display only the grid itself or the field values (as blocks of colour) or contour lines, and so on. See the section on "Grid Rendering Menu" below for details. Set field to use Lets you choose which field to display on the plot, i.e. velocity, strain rate, etc. create field Toggle pearls Vectors can be displayed with a "pearl" (a filled circle) at the base of the vector. The "Toggle pearls" menu item turns this display on and off. Set pearl radius This should set the size of the pearls (see "Toggle pearls item above). However, I don't know if Chris and I have ever tried this option... [Jan27/00 - this doesn't seem to work. BL] Toggle vectors Turns the display of velocity vectors on and off. Set vector fields Scale vectors up [Jan27/00 - This doesn't seem to work. BL] Scale vectors down [Jan27/00 - This doesn't seem to work. BL] Set vector scale set line width Elem -> node method Node -> elem method runtime field export grid export field export icon section pp steepest check search meshers Colormap Print Saves a Postscript version of the screen contents in the file "window1.1.ps". Please note, this file is not closed until after you've exited mozart_plot.x, so it will not be complete until after the program finishes. Save interpolate-NNI Unzoom Redraws the contents of the plot window using the specifications in the "Pmplot_i" file. Zoom Allows you to zoom in on a section of the plot window. After you've chosen the "Zoom" menu item, click on your plot window to define one corner of your zoom area, then click again to define the diagonally opposite corner of your zoom area. Example: you would click on the upper left corner of the area you want to zoom to, then click where you want the lower right corner. The area you've defined by the two clicks will be redrawn to fill the plot window. track Redraw Redraws the plot window. Done Exits the program. sections "Grid Rendering" Menu: ====================== After you've chosen "grid rendering" from the main menu, you'll get another menu to select options for grid rendering. Cancel Go back to main menu Autocontours This will do automatic contouring (using the default parameters defined in the file Pplot_fields_i) of the cell values in whatever field you've chosen. No grid rendering Don't display the grid. (This applies to the "current grid" that you selected when you chose "Set current grid" in the main menu.) You would normally use this option when you want to turn off the display of a particular grid. Cells Selecting this option will display the grid lines. Color mesh Display some field property, with the cells coloured according to their value, e.g. you might want to display the density. Strings Display the grid lines. This will look on screen just like what you'd get if you selected "Cells", but it uses a different method to draw the lines. You'll notice the difference when you save to a Postscript file - the file produced when "Strings" is used to draw the grid is significantly smaller than the file produced when "Cells" is used to display the grid. Nodes I'm not sure if this option is implemented or what it would do if it were implemented. Pseudo-contours See comment on "Nodes" above. Contours See comment on "Nodes" above. Tree See comment on "Nodes" above. f-partition alloc f-partition symb f-partition compute f-partition plot f-partition For the "f-partition" menu selections, see the section above entitled "PARTITIONING" OR "BLOBBING" WHEN PLOTTING A FIELD. ****** Output ****** Mozart_plot.x can save Postscript versions of the screen plot. When you choose the "Print" option in the menu, the current screen is saved to a file called "window1.1.ps". If you do more than one "Print" in a session, all of the plots will be saved in the one "window1.1.ps" file, with a page break in between each plot. Please note: The "window1.1.ps" file is not closed until mozart_plot.x exits, so it will not contain a complete plot until after you exit mozart_plot.x. The resulting Postscript file can either be sent directly to a Postscript printer, or imported into a drawing program that understands Postscript files. Warning: some drawing programs may have problems with the multi-page Postscript files. Also, some drawing programs may have problems dealing with the large number of polygons generated in some types of plots. ***************************** Additional Comments and Notes ***************************** [1] The following is a work-around that Russ used, so it may be obsolete now. However, it is useful to keep this info in case we have to deal with older versions where you need to do this. [July 2000] The colourmap for the Eulerian materials can be set with the following procedure: After mozart_plot.x has started, edit (in another window) the file f_13g_01 (this file is created by mozart_plot.x, so you will have to do this every time mozart_plot.x runs). The contents of the file will look something like this: 0 6 1.00000000000000000 1.66666666666666652 1.66666666666666652 2.33333333333333304 2.33333333333333304 2.99999999999999956 3.00000000000000000 3.66666666666666652 3.66666666666666652 4.33333333333333304 4.33333333333333304 5.00000000000000000 1.000000000 0.2000000030 0.1000000020E+21 0.1000000020E+21 21 1 0.5000000075E-01 60000 54000 52000 60000 60000 0 0 60000 60000 10000 10000 60000 20000 40000 60000 60000 50000 50000 1.00000000000000000 5.00000000000000000 The "6" in the second line indicates 6 areas/contours/whatever. The next 6 lines after that give the min and max boundaries for those areas/contours/whatever. Skip the next two lines after that. The 6 lines after that contain the RGB colour specifications for the materials, e.g. (in the above example) 60000 54000 52000 60000 60000 0 0 60000 60000 10000 10000 60000 20000 40000 60000 60000 50000 50000 The number range for each RGB specification is from 0 - 65535 (i.e. not the usual 0 - 255). Russ also notes that the order of the materials gets shifted from the order that they were specified in the input file. The *last* material in the input file ends up as the *first* material listed in the colormap. The first material ends up second in the colourmap list, the second as third in the colourmap, and so on.