Skip navigation links
(Plotc Home Page) (Introduction) (General Description) (Input Description) (Running The Code) (Plotc Man Page) (Plotc_p3d) (Acquiring Plotc) (Change History)

plotc_p3d - 2-D Plots from Plot3d Files

As mentioned in the introduction, a special-case version of plotc, called plotc_p3d, may also be used. plotc_p3d can be used to create two-dimensional line plots from the xyz and q files created by many CFD codes for use with the three-dimensional plotting program Plot3d [Plot3d is a plotting package written at NASA Ames Research Center, and is used primarily for displaying results from computational fluid dynamics codes. [Walatka, P. P., Buning, P. G., Pierce, L., and Elson, P. A. (1990) "PLOT3D User's Manual," NASA TM 101067.] Plots may be created showing the variation of a function along any of the grid lines in the three-dimensional flow field. This appendix includes some general information about plotc_p3d, an example showing how to run it, and the man page for the shell script used to run the code.

General Description

plotc_p3d is, basically, simply plotc with a specialized COORS routine. Since, except for the COORS routine, the plotc_p3d code is the same as the plotc code, namelists PTYPE and AXES described previously for plotc also apply to plotc_p3d. A third namelist, P3D, is used to specify the function to be plotted and the grid line or lines of interest. The standard COORS input, of course, is not used. However, sets of symbols may be plotted using the standard POINTS input, just as in plotc.

The type of Plot3d xyz and q files (i.e., whole, planes, or 2-D; unformatted, binary, or formatted; and with or without IBLANK'ing) is specified via command-line options. [Currently, xyz files with IBLANK'ing may be read, but the IBLANK array is ignored.] The files may be single-block, or multi-block with at most 20 blocks. The number of grid points per block is limited to 400,000. The grid lines of interest (i.e., those along which the function being plotted is varying) must all be in the same block.

Namelist P3D

This namelist is used to specify the desired function, and to identify the grid line or lines along which the function will be plotted.

    IFCT    An integer specifying the function to be plotted. The functions currently available are:

1    x-velocity, u
2 y-velocity, v
3 z-velocity, w
4 Mach number, M
5 Speed of sound, a
6 Contravariant velocity normal to ξ surface, U
7 Contravariant velocity normal to η surface, V
8 Contravariant velocity normal to ζ surface, W
9 Total velocity magnitude, |V|
10 x-momentum, ρu
11 y-momentum, ρv
12 z-momentum, ρw
13 ξ-velocity
14 η-velocity
15 ζ-velocity
16 Flow angle, αv
17 Flow angle, αw

20 Static density, ρ
21 Total density, ρT

30 Static pressure, p
31 Total pressure, pT
32 Static pressure coefficient, cp
33 Total pressure coefficient, cpT
34 Pitot pressure, pp
35 Dynamic pressure, q

40 Static temperature, T
41 Total temperature, TT

50 Total energy per unit volume, ET
51 Total energy, ET / ρ
52 Internal energy, ei
53 Kinetic energy, ek

60 Static enthalpy, h
61 Total enthalpy, hT

70 x-vorticity, Ωx
71 y-vorticity, Ωy
72 z-vorticity, Ωz
73 Total vorticity magnitude, |Ω|

80 Entropy, s

90 Laminar coefficient of viscosity, μl
91 Laminar second coefficient of viscosity, λl
92 Laminar coefficient of thermal conductivity, kl
93 Specific heat at constant pressure, cp
94 Specific heat at constant volume, cv
95 Ratio of specific heats, γ

100 Turbulent coefficient of viscosity, μt
101 Turbulent second coefficient of viscosity, λt
102 Turbulent coefficient of thermal conductivity, kt
103 Effective coefficient of viscosity, μe
104 Effective second coefficient of viscosity, λe
105 Effective coefficient of thermal conductivity, ke
106 Turbulent kinetic energy, k
107 Turbulent dissipation rate, ε
108 Inner region coordinate, y+
109 Inner region velocity, u+

120 Shear stress, τxx
121 Shear stress, τyy
122 Shear stress, τzz
123 Shear stress, τxy
124 Shear stress, τxz
125 Shear stress, τyz
126 Heat flux, qx
127 Heat flux, qy
128 Heat flux, qz

200 x-coordinate, x
201 y-coordinate, y
202 z-coordinate, z

210 Inverse Jacobian, J −1
211 Metric coefficient, ξt
212 Metric coefficient, ξx
213 Metric coefficient, ξy
214 Metric coefficient, ξz
215 Metric coefficient, ηt
216 Metric coefficient, ηx
217 Metric coefficient, ηy
218 Metric coefficient, ηz
219 Metric coefficient, ζt
220 Metric coefficient, ζx
221 Metric coefficient, ζy
222 Metric coefficient, ζz

The definitions of all these functions are presented in the Section Function Definitions. Note that for turbulent flow, functions 100-107 and 120-128 require a turbulence data file, in addition to the usual xyz and q files. The format of the Plot3d xyz and q files is described by Walatka, et. al. [Walatka, P. P., Buning, P. G., Pierce, L., and Elson, P. A. (1990) "PLOT3D User's Manual," NASA TM 101067.] The format of the turbulence data file is described in the Section Function Definitions. The default value for IFCT is 13, corresponding to the ξ-velocity.

    IABSC An integer specifying the abscissa for the plot. Note that the IABSC = −n capability allows you to plot any supported function against any other supported function. For 3-D cases, the valid values are:

1    Cartesian coordinate, x
2 Cartesian coordinate, y
3 Cartesian coordinate, z
4 Index along the specified grid line
5 Distance along the specified grid line
n Function number n.

For 2-D cases, of course, 3 is an invalid value, as are negative values related to the z direction. The default value is 5, corresponding to the distance along the specified grid line.

    IDIR An integer specifying the computational coordinate direction of the grid line(s) of interest. For 3-D cases, the valid values are:

1    For the ξ direction
2 For the η direction
3 For the ζ direction

For 2-D cases, of course, 3 is an invalid value. The default value is 1, corresponding to the ξ direction.

    IND An array of up to 100 integers specifying exactly which grid line(s) in direction IDIR are of interest.

For 3-D cases, each pair of values represents a separate curve in the plot. If IDIR = 1, corresponding to grid lines in the ξ direction, the first pair of values specifies the η and ζ indices of the first grid line of interest, the second pair specifies the η and ζ indices of the second grid line of interest, etc. Similarly, if IDIR = 2, corresponding to grid lines in the η direction, these values specify the ξ and ζ indices. And if IDIR = 3, corresponding to grid lines in the ζ direction, these values specify the ξ and η indices. For 3-D cases the default for the first pair of values is 1,1, and the default for the remaining values is 0.

For 2-D cases, each value represents a separate curve in the plot. If IDIR = 1, corresponding to grid lines in the ξ direction, the first value specifies the η index of the first grid line of interest, the second value specifies the η index of the second grid line of interest, etc. Similarly, if IDIR = 2, corresponding to grid lines in the η direction, these values specify the ξ indices. For 2-D cases the default for the first value is 1, and the default for the remaining values is 0.

    INEAR An integer specifying the location of the solid wall for plots of y+ or u+. This parameter is only needed if IFCT = 108 or 109, or if IABSC = −108 or −109. For 3-D cases, the valid values are:

1    For a wall at ξ = 0
2 For a wall at ξ = 1
3 For a wall at η = 0
4 For a wall at η = 1
5 For a wall at ζ = 0
6 For a wall at ζ = 1

For 2-D cases, of course, 5 and 6 are invalid values. The default value is 3, corresponding to a wall at η = 0.

    IBLOCK The block number for multi-block xyz and q files. The default value is 0, indicating that the xyz and q files are in single-block form.

Function Definitions

This section describes how the various functions that may be plotted are computed from information in the xyz and q files. For turbulent flow, functions 100-107 and 120-128 also require a turbulence data file. The equations in this section are written for 3-D flow. Those for 2-D flow are similar.

The xyz file contains the Cartesian coordinates x, y, and z at each grid point. The q file contains the static density q1, the momentum components q2 through q4, and the total energy per unit volume q5. In the xyz and q files, lengths are non-dimensionalized by the reference length Lr, density by the reference density ρr, velocity by the reference speed of sound ar, and total energy per unit volume by ρr ar2. The q file also contains the reference Mach number Mr = ur / ar and the reference Reynolds number Rer = ρr ar Lr / μr, where ur and μr are the reference velocity and the reference viscosity. The format of the xyz and q files is described by Walatka, et. al. [Walatka, P. P., Buning, P. G., Pierce, L., and Elson, P. A. (1990) "PLOT3D User's Manual," NASA TM 101067.]

The turbulence data file contains the turbulent viscosity coefficient μt, the turbulent kinetic energy k, and the turbulent dissipation rate ε. These three parameters are non-dimensionalized by μr, ur2, and ρr ur4 / μr, respectively. This file also contains a "reference" Prandtl number defined as Prr = μr ur2 / kr Tr, where kr is the reference thermal conductivity.

In the following equations, all parameters are non-dimensional, except for those with an overbar and reference conditions like ρr, etc. The parameter γr is assumed to be 1.4.

Velocities

The velocities in the Cartesian coordinate directions are defined as

u = q2 / ρMr
v = q3 / ρMr
w = q4 / ρMr

where the static density ρ = q1. The division by Mr causes plotted velocities to be non-dimensionalized by ur instead of ar. The Cartesian momentum components are then simply ρu, ρv, and ρw.

The velocity magnitude is

|V| = (u2 + v2 + w2)1/2

The speed of sound is
a = (γrRT)1/2

Here T is the static temperature, defined by

Equation for temperature

where ET is the total energy per unit volume, defined by
ET = q5 / Mr2

The division by Mr2 in the definition of the total energy per unit volume causes it to be non-dimensionalized by ρr ur2 instead of ρr ar2. The parameter R = Rdim Tr / ur2 = 1 / γr Mr2 is the dimensionless gas constant, and Tr is the reference temperature consistent with the reference speed of sound ar.

The Mach number is then simply

M = |V| / a

The contravariant velocities (i.e., velocities normal to constant ξ, η, and ζ surfaces) are given by

U = ξxu + ξyv + ξzw
V = ηxu + ηyv + ηzw
W = ζxu + ζyv + ζzw

where the metrics ξx, ξy, etc., are computed numerically from the coordinates in the xyz file, as explained below under Metrics.

The velocities in the ξ, η, and ζ directions are

Vξ = (xξu + yξu + zξw) / (xξ2 + yξ2 + zξ2)1/2

Vη = (xηu + yηu + zηw) / (xη2 + yη2 + zη2)1/2

Vζ = (xζu + yζu + zζw) / (xζ2 + yζ2 + zζ2)1/2

where the subscripts on x, y, and z denote partial differentiation. These terms are computed from the metrics, as follows:

xξ = ηyζzηzζy
yξ = ηzζxηxζz
zξ = ηxζyηyζx
xη = ξzζyξyζz
yη = ξxζzξzζx
zη = ξyζxξxζy
xζ = ξzηyξyηz
yζ = ξxηzξzηx
zζ = ξyηxξxηy

The flow angles are in degrees, and are defined by

αv = tan−1 (v/u)
αw = tan−1 (w/u)

Densities

As noted in the previous section, the static density is simply

ρ = q1

The total density is then

Equation for total density

Pressures

The static and total pressures are defined as

p = p bar / p sub r = rho T

Equation for total pressure

where the overbar represents a dimensional quantity, pr = ρr Rdim Tr is the reference pressure, and Rdim is the dimensional gas constant.

The static pressure coefficient is defined as

Equation for static pressure coefficient

This definition for cp turns out to be equivalent to

cp = 2R(p − 1)

Similarly, the total pressure coefficient is defined as

Equation for total pressure coefficient

where (pT)r is the total pressure at the reference conditions. This definition for cpT turns out to be equivalent to
cpT = 2R [(pT − (pT)0]

where

Equation for (p sub T) sub 0

For M ≤ 1 the pitot pressure pp = pT. For M > 1 the pitot pressure is

Equation for supersonic pitot pressure

The dynamic pressure is defined as

Equation for dynamic pressure

where the overbar represents a dimensional quantity.

Temperatures

The static and total temperatures are defined as

Equation for static temperature

Equation for total temperature

Energies

The total energy per unit volume is

ET = q5 / Mr2

The division by Mr2 causes it to be non-dimensionalized by ρr ur2 instead of ρr ar2. The total energy itself is then ET / ρ.

The internal energy is defined as

Equation for internal energy

where cv is the specific heat at constant volume, and the overbar represents a dimensional quantity.

The kinetic energy is defined as

ek = |V|2 / 2

Enthalpies

The static enthalpy is defined as

Equation for static enthalpy

Similarly, the total enthalpy is

Equation for total enthalpy

Vorticity

The vorticity components in the x, y, and z directions are defined as

Ωx = ∂w/∂y∂v/∂z
Ωy = ∂u/∂z∂w/∂x
Ωz = ∂v/∂x∂u/∂y

These are actually computed using

Ωx = ξywξ + ηywη + ζywζξzvξηzvηζzvζ
Ωy = ξzuξ + ηzuη + ζzuζξxwξηxwηζxwζ
Ωz = ξxvξ + ηxvη + ζxvζξyuξηyuηζyuζ

where the subscripts on u, v, and w denote partial differentiation. The velocity derivatives are computed using second-order central differences at interior points, and second-order one-sided differences at boundaries. The metrics are also computed numerically, as explained below under Metrics.

The total vorticity magnitude is simply

|Ω| = (Ωx2 + Ωy2 + Ωz2)1/2

Entropy

The entropy is defined as

s = cv ln pcp ln ρ

where cv and cp are the specific heats at constant volume and pressure, and are computed assuming the reference temperature Tr = 519 °R, as described in the next section.

Temperature-Dependent Parameters

The laminar viscosity coefficient is computed from the following formula, which is valid for air at temperatures from about 400 to 3400 °R [White, F. M. (1974) Viscous Fluid Flow, McGraw-Hill Book Company, New York]:

μl = T 0.67

The second coefficient of laminar viscosity λl = −2μ/3.

The laminar thermal conductivity coefficient is computed from the following formula, which is valid for air at temperatures from about 375 to 1800 °R [White, F. M. (1974) Viscous Fluid Flow, McGraw-Hill Book Company, New York]:

kl = T 0.81

The specific heat at constant pressure is computed from the following formula, which is valid for air at temperatures from about 540 to 9000 °R [Hesse, W. J., and Mumford, N. V. S. (1964) Jet Propulsion for Aerospace Applications, Pitman Publishing Corporation, New York]

Formula for specific heat at constant pressure

where the overbar represents a dimensional quantity. The dimensional temperature is computed assuming a reference temperature of 519 °R, and the dimensional gas constant is assumed to be 1716 ft2/sec2-°R. The specific heat at constant volume is then
cv = cpR

and the ratio is
γ = cp / cv

Turbulence Parameters

Functions 100-107 require a turbulence data file, in addition to the usual xyz and q files. This file contains the turbulent viscosity coefficient μt, the turbulent kinetic energy k, and the turbulent dissipation rate ε. The second coefficient of turbulent viscosity λt = −2μt / 3.

The turbulent thermal conductivity coefficient is defined as

Equation for turbulent thermal conductivity coefficient

where the overbar denotes a dimensional quantity, and Prt = 0.9 is the turbulent Prandtl number. This turns out to be equivalent to

kt = cp μt Prr / Prt

The effective viscosity coefficient, second coefficient of viscosity, and thermal conductivity coefficient are simply

μe = μl + μt
λe = λl + λt
ke = kl + kt

Computing the inner region variables y+ and u+ requires knowledge of the wall location. Since this information is not in the xyz, q, or turbulence data files, the user must supply it in namelist P3D when these parameters are being plotted. The inner region velocity is defined as

u+ = |V| / uτ

Here uτ is the friction velocity, computed as

Equation for friction velocity

where the subscript w indicates wall conditions.

The inner region coordinate is defined as

y+ = (ρwuτyn / μw) Rer Mr

where yn is the distance to the wall.

Gradients

For turbulent flow, functions 120-128 require a turbulence data file, in addition to the usual xyz and q files. The shear stresses and heat fluxes are defined as

&tauxx = 2 μe ∂u/∂x + λe (∂u/∂x + ∂v/∂y + ∂w/∂z)
&tauyy = 2 μe ∂v/∂y + λe (∂u/∂x + ∂v/∂y + ∂w/∂z)
&tauzz = 2 μe ∂w/∂z + λe (∂u/∂x + ∂v/∂y + ∂w/∂z)

&tauxy = μe (∂u/∂y + ∂v/∂x)
&tauxz = μe (∂u/∂z + ∂w/∂x)
&tauyz = μe (∂v/∂z + ∂w/∂y)

qx = −ke ∂T/∂x
qy = −ke ∂T/∂y
qz = −ke ∂T/∂z

In the above equations, the derivatives of u with respect to x, y, and z are computed as

ux = ξxuξ + ηxuη + ζxuζ
uy = ξyuξ + ηyuη + ζyuζ
uz = ξzuξ + ηzuη + ζzuζ

where the subscripts on u denote partial differentiation. The derivatives of v, w, and T are computed similarly. The velocity derivatives are computed using second-order central differences at interior points, and second-order one-sided differences at boundaries. The metrics are also computed numerically, as explained below under Metrics.

Coordinates

The Cartesian coordinates x, y, and z are obtained directly from the xyz file.

Metrics

The Jacobian of the generalized nonorthogonal grid transformation is defined as J = 1/J −1, where

J −1 = xξ (yηzζyζzη) + xη (yζzξyξzζ) + xζ (yξzηyηzξ)

and the subscripts denote partial differentiation. The metric coefficients themselves are defined as

ξx = J (yηzζyζzη)
ξy = J (xζzηxηzζ)
ξz = J (xηyζxζyη)
ηx = J (yζzξyξzζ)
ηy = J (xξzζxζzξ)
ηz = J (xζyξxξyζ)
ζx = J (yξzηyηzξ)
ζy = J (xηzξxξzη)
ζz = J (xξyηxηyξ)

The derivatives xξ, xη, etc., are computed using second-order central differences at interior points, and second-order one-sided differences at boundaries.

Turbulence Data File

For turbulent flow, functions 100-107 and 120-128 require a turbulence data file, in addition to the Plot3d xyz and q files. This file is analogous to the q file in format. Like the q file, it may be whole, planes, or 2-D, and unformatted, binary, or formatted. It may also be single- or multi-block.

The following code fragments show how this file may be written, in unformatted or binary form, using Fortran write statements. A formatted file may be written by replacing (iunit) with (iunit,*)

The Fortran variable nblock is the number of grid blocks; idim, jdim, and kdim are the grid sizes in the ξ, η, and ζ directions for each block; machr is the reference Mach number Mr; prr is the ``reference'' Prandtl number Prr = μr ur2 / kr Tr; rer is the reference Reynolds number Rer = ρr ar Lr / μr; time is an unused parameter; and mut, ke, and eps are the turbulent viscosity μt, the turbulent kinetic energy k, and the turbulent dissipation rate ε.

Single-block, 2-D

   write (iunit) idim,jdim
   write (iunit) machr,prr,rer,time
   write (iunit) ((mut(i,j),i=1,idim),j=1,jdim), &
                 ((ke (i,j),i=1,idim),j=1,jdim), &
                 ((eps(i,j),i=1,idim),j=1,jdim)
Single-block, 3-D, whole
   write (iunit) idim,jdim,kdim
   write (iunit) machr,prr,rer,time
   write (iunit) (((mut(i,j,k),i=1,idim),j=1,jdim),k=1,kdim), &
                 (((ke (i,j,k),i=1,idim),j=1,jdim),k=1,kdim), &
                 (((eps(i,j,k),i=1,idim),j=1,jdim),k=1,kdim)
Single-block, 3-D, planes
   write (iunit) idim,jdim,kdim
   write (iunit) machr,prr,rer,time
   do k = 1,kdim
      write (iunit) ((mut(i,j),i=1,idim),j=1,jdim), &
                    ((ke (i,j),i=1,idim),j=1,jdim), &
                    ((eps(i,j),i=1,idim),j=1,jdim)
   end do
Multi-block, 2-D
   write (iunit) nblock
   write (iunit) (idim(ibl),jdim(ibl),ibl=1,nblock)
   do ibl = 1,nblock
      write (iunit) machr,prr,rer,time
      write (iunit) ((mut(i,j),i=1,idim(ibl)),j=1,jdim(ibl)), &
                    ((ke (i,j),i=1,idim(ibl)),j=1,jdim(ibl)), &
                    ((eps(i,j),i=1,idim(ibl)),j=1,jdim(ibl))
   end do
Multi-block, 3-D, whole
   write (iunit) nblock
   write (iunit) (idim(ibl),jdim(ibl),kdim(ibl),ibl=1,nblock)
   do ibl = 1,nblock
      write (iunit) machr,prr,rer,time
      write (iunit) (((mut(i,j,k),i=1,idim(ibl)),j=1,jdim(ibl)),k=1,kdim(ibl)), &
                    (((ke (i,j,k),i=1,idim(ibl)),j=1,jdim(ibl)),k=1,kdim(ibl)), &
                    (((eps(i,j,k),i=1,idim(ibl)),j=1,jdim(ibl)),k=1,kdim(ibl))
   end do
Multi-block, 3-D, planes
   write (iunit) nblock
   write (iunit) (idim(ibl),jdim(ibl),kdim(ibl),ibl=1,nblock)
   do ibl = 1,nblock
      write (iunit) machr,prr,rer,time
      do k = 1,kdim(ibl)
         write (iunit) ((mut(i,j,k),i=1,idim(ibl)),j=1,jdim(ibl)), &
                       ((ke (i,j,k),i=1,idim(ibl)),j=1,jdim(ibl)), &
                       ((eps(i,j,k),i=1,idim(ibl)),j=1,jdim(ibl))
      end do
   end do

Example

plotc_p3d was used to generate a plot comparing the computed and experimental static pressure distribution along the upper and lower surfaces of a two-dimensional transonic diffuser. The calculations were done using Proteus, an unsteady 2-D/axisymmetric Navier-Stokes computer code. [Towne, C. E., Schwab, J. R., and Bui, T. T. (1993) "Proteus Two-Dimensional Navier-Stokes Computer Code - Version 2.0, Volumes 1-3," NASA TM's 106336, 106338, 106339.] The experimental data were taken by Hsieh et. al. [Hsieh, T., Wardlaw, A. B., Jr., Collins, P., and Coakley, T. J. (1987) "Numerical Investigation of Unsteady Inlet Flow Fields," AIAA Journal, Vol. 25, No. 1, pp. 75-81]

The Plot3d code, of course, was designed for 3-D problems. The unsteady 2-D Proteus code writes results into the Plot3d files with time stored in the z slot in the xyz file. This particular problem was a steady flow problem. Therefore only one time level, with the final solution, was written into the file.

The namelist input file was called sajben.plotin, and is listed below. Note that the coordinates of the points to be plotted as symbols, representing the experimental data, are read in using the default POINTS routine. These data are thus included in the namelist input file, as described in the section POINTS Input.

Note also that NCURV = −1 even though we want to plot 2 curves, showing the computed static pressure along the upper and lower surfaces of the diffuser. plotc_p3d will automatically determine the number of curves based on the input in namelist P3D. Therefore, only the sign on NCURV is significant. [This is only true if the input parameter OFFSET = 0.0. If OFFSET > 0.0, the number of curves to be plotted must be specified.] As described under namelist PTYPE, the sign determines whether each curve is to be plotted using a solid line, or using different line types.

 &ptype
  ncurv=-1, nsymb=-2,                      Use different line types for curves,
                                              and plot two sets of symbols.
  isize1=5,                                Size of symbols.
  ititle(1)=1,                             Include plot title.
  isizet=11, isizel=10,                    Size of characters in titles and labels.
  ilegnd=1, xleg=3.0, yleg=0.6,            Add a legend.
  isizeg=8,                                Size of characters in legend.
  ilegbx=-1,                               Put box around legend.
  aleg(1,2)='Bottom Wall - Proteus',       Legend contents, column 2.
            'Top Wall - Proteus',	
            'Bottom Wall - Experiment', 
            'Top Wall - Experiment',
 &end
 &axes
  iscale=1,                                Specify scales for both axes.
  xmin=-5., xmax=10., nintx=6, xlen=5.,    x-axis information.
  ymin=.3,  ymax=1.,  ninty=7, ylen=3.125, y-axis information.
  iframe=2,                                Draw frame around plot.
  ptitle='Transonic Diffuser Flow',        Title for top of plot.
 &end
 &p3d
  ifct=30,                                 Plot static pressure,
  iabsc=1,                                 vs. the x coordinate,
  idir=1,                                  along lines in the ξ direction,
  ind=1,1,51,1,                            with these η and ζ indices.
 &end
    38                                     Experimental values, lower surface.
   -4.0101   -3.3134   -2.4344   -1.9845   -1.6942   -0.9468   -0.6368   -0.5023
   -0.3008   -0.0504    0.0203    0.1383    0.3682    0.5759    0.7057    0.9142
    1.0316    1.1592    1.2952    1.4388    1.5355    1.5497    1.7481    1.7434
    2.0053    2.2696    2.4902    2.8756    3.3169    3.9725    4.4024    5.0671
    5.8317    6.3346    6.9666    7.4592    8.0546    8.6307
    0.8617    0.8621    0.8467    0.8218    0.7887    0.6771    0.6496    0.5823
    0.5685    0.5670    0.5496    0.5369    0.5259    0.4977    0.4965    0.4721
    0.4565    0.4448    0.4292    0.4939    0.5118    0.5797    0.5955    0.6175
    0.6265    0.6470    0.6799    0.7020    0.7250    0.7512    0.7637    0.7890
    0.8035    0.8100    0.8125    0.8142    0.8187    0.8202
    38                                     Experimental values, upper surface.
   -3.9303   -3.2281   -2.6103   -1.8224   -1.5536   -0.8820   -0.6452   -0.3465
   -0.1869    0.0125    0.2211    0.3900    0.5292    0.6399    0.7798    0.9111
    1.0512    1.2204    1.4180    1.5493    1.5157    1.7092    1.7050    1.9448
    2.1293    2.3701    2.6292    3.0134    3.4348    4.1133    4.5805    5.2556
    6.0164    6.5299    7.1564    7.6785    8.2383    8.8267
    0.8646    0.8646    0.8722    0.8740    0.8260    0.6671    0.5929    0.5552
    0.5428    0.5435    0.5423    0.5280    0.5045    0.4800    0.4621    0.4507
    0.4337    0.4213    0.4089    0.3975    0.5013    0.5291    0.5684    0.5877
    0.6193    0.6461    0.6672    0.7023    0.7307    0.7663    0.7825    0.7928
    0.8049    0.8127    0.8147    0.8159    0.8152    0.8153

A terminal session using the above namelist input file is shown below. The first line, in slanted type, is entered by the user. The xyz and q files are in whole binary form, and this information is specified via the -r and -f options on the plotc_p3d command line. The command plotc_p3d is the shell script used to run the plotting program plotc_p3d. This example assumes the Plot3d xyz and q files are named sajben.px and sajben.pq, respectively.

plotc_p3d -r w -f b sajben.px sajben.pq sajben.plotin
Using plot3d xyz file sajben.px
Using plot3d q file sajben.pq
Using namelist input file sajben.plotin
 Reading xyz and q files

PostScript output is in plotc_p3d.ps

As with plotc, the plot will appear in a window on the graphics monitor, drawn using OpenGL routines. The PostScript version of the plot will be stored in a file called plotc_p3d.ps in your current directory. Subsequent runs using plotc_p3d will overwrite this file, so change the file name if you want to keep it around. Or, alternatively, you can specify a name for this file from the command line with the -o option, as described in the plotc_p3d man page. The PostScript plot is shown below.

Resulting plot from plotc_p3d example.

Resulting plot from plotc_p3d example.

plotc_p3d Man Page

The following man page describes how to use the shell script plotc_p3d.

NAME
    plotc_p3d - a 2-D plotting program for Plot3d xyz and q files

SYNOPSIS
    plotc_p3d [-b input9] [-o outps] [-g outdb] [-t tfile] [-f u|b|f] [-r w|p|2] [-i] [-V] xyzfile qfile namelist

DESCRIPTION
    plotc_p3d is a Bourne shell script used to run the plotting program plotc_p3d.ex. This program can be used to create two-dimensional line plots from the xyz and q files created by many CFD codes for the three-dimensional Plot3d plotting program. Plots may be created showing the variation of various functions along specified grid lines in the three-dimensional mesh. The names of the xyz and q files are given by the arguments xyzfile and qfile, respectively. The namelist input to plotc_p3d.ex must be supplied in the file namelist, and is described in detail in the Plotc User's Manual.

OPTIONS
    -b   Links the file input9 to fort.9. This is the file used for the coordinates of the symbol sets being plotted when IFILEP = 1.

    -o Use outps as the name of the output PostScript file. The default is plotc_p3d.ps.

    -g Use outdb as the name of the output debug file. The default is plotc_p3d.debug.

    -t In addition to the xyz and q files, read the turbulence data file tfile.

    -f Specifies the file format for the xyz, q, and turbulence data files. The options are u, b, or f, corresponding to unformatted, binary, and formatted, respectively. The default is b.

    -r Specifies the record format for the xyz, q, and turbulence data files. The options are w, p, or 2, corresponding to 3-D whole format, 3-D planes format, and 2-D format, respectively. The default is w.

    -i If specified, the xyz file includes the integer IBLANK array. The default is an xyz file without the IBLANK array.

    -V Print the current version number and usage information for plotc_p3d, and immediately exit.

NOTES
    plotc_p3d.ex is simply a specialized version of plotc.ex, a general-purpose two-dimensional plotting program, with a COORS routine that reads the Plot3d xyz and q files and computes coordinates for various two-dimensional line plots.

Please contact Charlie Towne (towne@nasa.gov) to report bugs and/or to suggest improvements.

BUGS
    The -i option allows xyz files with IBLANK'ing to be read, but currently the IBLANK array is ignored.

The input parameter FONTS, which allows the user to specify the font to be used for plot titles, labels, legend, and text strings, is supported only for the PostScript plot.

The input parameters ISIZEL, ISIZET, ISIZEG, and ISIZES, which allow the user to specify the size of characters in the labels, titles, legend, and strings, are supported only for the PostScript plot.

Probably others yet to be discovered.

FILES
    plotc_p3d accesses or creates the following files:

    plotc_p3d.ex   Executable for plotc_p3d.

    plotc_p3d.debug Debug output file, symbolically linked to fort.30.

    plotc_p3d.ps PostScript output file, symbolically linked to fort.31.

    plotc.psprolog Prolog used in PostScript output file.

SEE ALSO
    Plotc User's Manual.
    PLOT3D User's Manual, NASA TM 101067.

AUTHOR
    Charlie Towne


Last updated 2 Nov 2005