# AcuGetCpCf

Extract the coefficient of pressure (Cp) and the coefficient of friction (Cf) from an AcuSolve solution database.

## Syntax

acuGetCpCf [options]

## Type

AcuSolve Post-Processing Program

## Description

AcuGetCpCf is a post-processing utility that uses the AcuSolve solution database of nodal pressure and shear stress to compute the coefficient of pressure (Cp) and the coefficient of friction (Cf) on a specified set of points. The Cp and Cf values are computed on a curve that is projected onto a user requested surface(s) or explicitly defined by you in three-dimensional space. The selected surfaces, determined by the osis flag, are queried for, and obtained during the execution of the application. The nodal values of pressure (shear stress) from those surfaces are extracted from the user specified point_type attribute, specified as auto by default. When point_type=auto, you must select the radial_locations and cutplane_normal_direction attributes to define the location and cut plane direction corresponding to the requested surface definition. The quantities obtained at the requested locations are then normalized according to the calculated dynamic pressure, as shown in the following relationship.(1)

(2)

Where, is the coefficient of pressure, is the local pressure, is the freestream pressure, is the freestream density and is the freestream velocity, defined by the nodal pressure, reference_pressure, reference_density and reference_velocity, respectively.

is the coefficient of friction, computed from the magnitude of wall shear stress, and the same normalization parameters.

In the following, the full name of each option is followed by its abbreviated name and its type. For a general description of option specifications, see Command Line Options and Configuration Files. See below for more individual option details:

help or h (boolean)
If set, the program prints a usage message and exits. The usage message includes all available options, their current values, and the place where each option is set.
problem or pb (string)
The name of the problem is specified via this option. This name is used to generate input file names and extracted surface file names.
working_directory or dir (string)
All internal files are stored in this directory. This directory does not need to be on the same file system as the input files of the problem.
run_id or run (integer)
Number of the run in which the extraction is requested. If run_id is set to 0, the last run in the working directory is assumed.
time_step or ts (integer)
Time step from which to extract selected data.
surface_integral_output_sets or osis (string)
Comma-separated list of surface_output sets. These are the user-given names specified as the user-given name of the SURFACE_OUTPUT commands in the input file. If surface_integral_output_sets is set to _all, all output sets are included into the coefficient computation.
curve_type or type (enumerated)
Specifies the type of data to generate during the normalization computation. You can specify either cp or cf to compute the coefficient of pressure and coefficient of friction, respectively.
point_type or pttype (enumerated)
Specifies the type of data extraction method used to obtain nodal data. You can specify either auto or file. Selecting auto will automatically project the data from the requested surfaces onto a three-dimensional curve. When file is selected, the application requires an explicitly defined set of x, y, z point locations to project the data to.
points_file or pts (string)
Specifies the file used when point_type=file and defines the set of x, y, z point locations to extract data from. The points_file contains rows of point locations with format, row index, x, y, z (using any delimiter).
Specifies the location(s) of the cut plane along the cutplane_normal_direction when point_type=auto. Comma separated string is accepted to run the extraction at multiple cut planes.
cutplane_normal_direction or cut_dir (enumerated)
Specifies the cut plane normal direction when point_type=auto. Used in conjunction with the radial_location to define the projection direction and cut location.
gauge_pressure or gauge_pres (real)
Specifies the gauge pressure conversion from relative to absolute pressure if required. Used when absolute_pressure_offset is not equal to 0.0 when the AcuSolve solution was run.
reference_density or ref_rho (real)
Specifies the reference density used to normalize the pressure (friction) values into coefficients. It should be specified as the freestream density.
reference_velocity or ref_vel (real)
Specifies the reference velocity used to normalize the pressure (friction) values into coefficients. It should be specified as the magnitude of the freestream velocity.
reference_pressure or ref_pres(real)
Specifies the reference pressure used to offset the pressure values for the coefficient computation. It should be specified as the freestream pressure.
reference_viscosity or ref_vis (real)
Specifies the reference dynamic viscosity for the Reynolds number calculation.
specific_heat_ratio or gamma (real)
Specifies the ratio of specific heats for the Mach number calculation.
normalize_chord or nc (boolean)
If this option is set to TRUE, the output location will be normalized by the local chord length.
chord_scale_fac or csf (real)
Specifies the scaling factor to apply to the coordinate locations. Used prior to scaling by the local chord length when normalize_chord=true.
cp_scale_fac or cpsf (real)
Specifies the scaling factor to apply to the coefficients after they are calculated according to the provided reference quantities.
inviscid_flow or inviscid (boolean)
If this option is set to True, the cp calculation will be normalized by the reference_velocity alone and not include effects of surface velocity if non-zero.
query or q (boolean)
If this option is set to TRUE, the application will run in query mode. Query mode will simply print a list of surfaces that are available for coefficient computation. The list of surfaces is queried from the list of surface_output sets available in the solution database.
If this option is set to TRUE, the application will write the variable names for each data column in the output file.
output_file_format or ofmt (enumerated)
Specifies the output format of the files written to disk. Ascii for text readable space delimited file, binary for compressed binary format.
output_coordinate or out_crd (boolean)
If this option is set to TRUE, the application will also output the x-,y-,z-coordinate in addition to x/c,Cp.
verbose or v (integer)
Set the verbose level for printing information to the screen. Each higher verbose level prints more information. If verbose is set to 0 (or less), only warning and error messages are printed. If verbose is set to 1, basic processing information is printed in addition to warning and error messages. This level is recommended. verbose levels greater than 1 provide information useful only for debugging.

## Examples

Consider the computation of the pressure coefficient of a three-dimensional wing at multiple spanwise locations:
acuGetCpCf -pb wing -osis 'Wall - Output' -reference_pressure 94760.7 -
reference_velocity 291.7 -reference_density 1.1 -rad_locs 0.23926,0.526372,0.777595
-cut_dir y -type cp
or alternatively the options may be put into the configuration file Acusim.cnf as follows:
acuGetCpCf.pb=wing
acuGetCpCf.osis=”Wall – Output”
acuGetCpCf.reference_pressure=94760.7
acuGetCpCf.reference_velocity=291.7
acuGetCpCf.reference_density=1.1
acuGetCpCf.cut_dir=y
acuGetCpCf.type=cp
The following will be printed to the standard output of the terminal:
acuGetCpCf:
acuGetCpCf:  Opening the AcuSolve solution data base
acuGetCpCf:  Problem <onera> directory <ACUSIM.DIR> runId <0>
acuGetCpCf:
acuGetCpCf:  Opened run id <1>
acuGetCpCf:
acuGetCpCf:  Extracting <pressure> field from step <1500>
acuGetCpCf:
acuGetCpCf:  Projecting a circle of radius: 1.34e+00
acuGetCpCf:
acuGetCpCf:  Cut plane: x-z
acuGetCpCf:
acuGetCpCf:  Building projection object
acuGetCpCf:
acuGetCpCf:  Processing location:  1
acuGetCpCf:     Cut coordinate:             y = 0.23926
acuGetCpCf:     Local chord:                0.740
acuGetCpCf:     Rotational velocity:        0.0
acuGetCpCf:     Total velocity:             291.668
acuGetCpCf:     Reference dynamic pressure: 4.68e+04
acuGetCpCf:     Cp min/max:                 -0.70275/0.90013
acuGetCpCf:     Chord Reynolds number:      1.33e+07
acuGetCpCf:     Writing file:               onera.cp.1.dat
acuGetCpCf:
acuGetCpCf:  Processing location:  2
acuGetCpCf:     Cut coordinate:             y = 0.526372
acuGetCpCf:     Local chord:                0.654
acuGetCpCf:     Rotational velocity:        0.0
acuGetCpCf:     Total velocity:             291.668
acuGetCpCf:     Reference dynamic pressure: 4.68e+04
acuGetCpCf:     Cp min/max:                 -0.8154/0.8739
acuGetCpCf:     Chord Reynolds number:      1.18e+07
acuGetCpCf:     Writing file:               onera.cp.2.dat
acuGetCpCf:
acuGetCpCf:  Processing location:  3
acuGetCpCf:     Cut coordinate:             y = 0.777595
acuGetCpCf:     Local chord:                0.580
acuGetCpCf:     Rotational velocity:        0.0
acuGetCpCf:     Total velocity:             291.668
acuGetCpCf:     Reference dynamic pressure: 4.68e+04
acuGetCpCf:     Cp min/max:                 -0.8926/0.85577
acuGetCpCf:     Chord Reynolds number:      1.04e+07
acuGetCpCf:     Writing file:               onera.cp.3.dat
acuGetCpCf:
acuGetCpCf:  Freestream Mach number:        0.84
acuGetCpCf:  Theoretical compressible Cp:
acuGetCpCf:     At stagnation point (max):   1.18899
acuGetCpCf:     At sonic point (Mach = 1):  -0.32728

The above example produces three output files containing the last time-step from the solution with normalized x/C and pressure coefficient called onera.cp.[1-3].dat.

The output file contains the following columns:
 x/C location Cp 1.0000000000000000e+00 1.4607121703357254e-01

For a steady state simulation, only the last value is likely of interest to you, as it would be the converged solution for a Reynolds Averaged Navier-Stokes simulation. This time-step is output by default. Additional time-steps, if specified in the NODAL_OUTPUT command, can be requested with the -ts option as described above.

To simply query the solution database, use the following command:
acuGetCpCf -q
The following will be printed to the standard output of the terminal:
acuGetCpCf:
acuGetCpCf:  Opening the AcuSolve solution data base
acuGetCpCf:  Problem <onera> directory <ACUSIM.DIR> runId <0>
acuGetCpCf:
acuGetCpCf:  Opened run id <1>
acuGetCpCf:
acuGetCpCf:  Surface output name:                    Far field - Output
acuGetCpCf:       Number of surface nodes:           4713
acuGetCpCf:       Number of integrated output steps: 1500
acuGetCpCf:  Surface output name:                    Symmetry - Output
acuGetCpCf:       Number of surface nodes:           33631
acuGetCpCf:       Number of integrated output steps: 1500
acuGetCpCf:  Surface output name:                    Wall - Output
acuGetCpCf:       Number of surface nodes:           121282
acuGetCpCf:       Number of integrated output steps: 1500
Consider the computation of the pressure coefficient of a three-dimensional wing
acuGetCpCf -reference_pressure  94760.7 -reference_velocity  291.7 -
reference_density 1.1 -type cp -output_coordinate -normalize_chord -pttype file
-pts point_locations.txt

acuGetCpCf:
acuGetCpCf:  Opening the AcuSolve solution data base
acuGetCpCf:  Problem <onera> directory <ACUSIM.DIR> runId <0>
acuGetCpCf:
acuGetCpCf:  Opened run id <1>
acuGetCpCf:
acuGetCpCf:  Extracting <wall_shear_stress> field from step <1500>
acuGetCpCf:
acuGetCpCf:  Projecting a circle of radius: 1.34e+00
acuGetCpCf:
acuGetCpCf:  Building projection object
acuGetCpCf:
acuGetCpCf:  Processing location:  1
acuGetCpCf:     Local chord:                0.833
acuGetCpCf:     Rotational velocity:        0.0
acuGetCpCf:     Total velocity:             291.667
acuGetCpCf:     Reference dynamic pressure: 4.68e+04
acuGetCpCf:     Cf-x min/max:               2.96307690806e-06/0.00304619492264
acuGetCpCf:     Cf-y min/max:               -0.000470032309125/0.00153358625221
acuGetCpCf:     Cf-z min/max:               -0.00158707581029/0.0021541080237
acuGetCpCf:     Cf-mag min/max:             7.05953432918e-06/0.0033957476328
acuGetCpCf:     Chord Reynolds number:      1.33e+07
acuGetCpCf:     Writing file:               onera.cf.dat
acuGetCpCf:
acuGetCpCf:  Freestream Mach number:        0.84
acuGetCpCf:  Theoretical compressible Cp:
acuGetCpCf:     At stagnation point (max):   1.18899
acuGetCpCf:     At sonic point (Mach = 1):  -0.32725
The output file contains the following columns:
 x/C Cf(x) Cf(y) Cf(z) Cf(mag) X Y Z 1.00e+00 2.85e-04 1.12e-04 2.33e-06 3.07e-04 8.77e-01 2.39e-01 -4.84e-10