4.2.13. Automated Report Generation with LaTeX¶
The automated report syntax is almost entirely general to all Cape solvers, and so most of the documentation is in the Cape Report page. Some sample JSON syntax is provided below.
The section in pyCart.json
labeled “Report” is for generating automated
reports of results. It requires a fairly complete installation of pdfLaTeX.
Further, an installation of Tecplot 360 enhances the capability of the report
generation.
"Report": { "Archive": false, "Reports": ["case"], "case": { "Title": "Automated Cart3D Report", "Figures": ["Summary", "Forces"], "FailFigures": ["Summary", "Surface"], "ZeroFigures": ["Summary", "Surface"] }, "Figures": { "Summary": { "Alignment": "left", "Subfigures": ["Conditions", "Summary"] }, "Forces": { "Alignment": "center", "Header": "Force, moment, \\& residual histories", "Subfigures": ["CA", "CY", "CN", "L1"] } }, "Subfigures": { "Conditions": { "Type": "Conditions", "Alignment": "left", "Width": 0.35, "SkipVars": [] }, "Summary": { "Type": "Summary" }, "Surface": { "Type": "Tecplot", "Layout": "surface.lay" }, "wingFM": { "Type": "PlotCoeff", "Component": "wing", "Width": 0.5, "StandardDeviation": 1.0, "nStats": 200 }, "CA": {"Type": "wingFM", "Coefficient": "CA"}, "CY": {"Type": "wingFM", "Coefficient": "CY"}, "CN": {"Type": "wingFM", "Coefficient": "CN"}, "L1": {"Type": "PlotL1"} } }
The basic report definitions, sweep definitions, and figure definitions are completely unchanged. While most of the content of the subfigure definition section also applies, there are some additional specific capabilities.
4.2.13.1. Subfigure Definitions¶
Each subfigure contains several key options including heading and caption and two alignment options. The key option is Type, which categorizes which kind of subfigure is being generated, and it must be traceable to one of several defined subfigure types.
The list of options common to each subfigure is shown below.
- Subfigures: {
{}
} |{sfig: U}
|dict
(dict
)Dictionary of subfigure definitions
- sfig:
str
Name of subfigure
- U:
dict
Dictionary of settings for subfigure sfig
Type:
"Conditions"
|"SweepConditions"
|"SweepCases"
|"Summary"
|"PlotCoeff"
|"SweepCoeff"
|"PlotL1"
|"Tecplot3View"
|"Tecplot"
|str
Subfigure type
- Header: {
""
} |str
Heading to be placed above the subfigure (bold, italic)
- Caption: {
""
} |str
Caption to be placed below figure
- Position: {
"t"
} |"c"
|"b"
Vertical alignment of subfigure; top or bottom
- Alignment:
"left"
| {"center"
}Horizontal alignment of subfigure
- Width:
float
Width of subfigure as a fraction of text width
However, the Type value does not always have to be from the list of possible values above. Another option is to define one subfigure and use that subfigure’s options as the basis for another one. An example of this is below.
"Subfigures": { "Wing": { "Type": "PlotCoeff", "Component": "wing", }, "CN": { "Type": "Wing", "Coefficient": "CN" }, "CLM": { "Type": "Wing", "Coefficient": "CLM" } }
This defines two coefficient plots, which both use the Component named
"wing"
. When using a previous template subfigure is used as Type, all of
the options from that subfigure are used as defaults, which can save many lines
in the JSON file when there are several similar figures defined.
The subsections that follow describe options that correspond to options for each base type of subfigure.
4.2.13.1.1. Tecplot Layout Figure¶
The capability to create an image using a Tecplot layout file is provided by the
"Tecplot"
subfigure type. It has pretty generic subfigure options except
that it has an additional parameter "Mach"
that pyCart needs to know in
order to calculate pressure coefficient. The plt
files created by Cart3D do
not include the freestream Mach number, so pyCart needs to read it from the run
matrix.
- P:
dict
Dictionary of settings for Tecplot subfigure
- Type: {
"Tecplot"
} |str
Subfigure type
- Header: {
""
} |str
Heading placed above subfigure (bold, italic)
- Position:
"t"
|"c"
| {"b"
}Vertical alignment of subfigure
- Alignment:
"left"
| {"center"
}Horizontal alignment
- Width: {
0.5
} |float
Width of subfigure as a fraction of page text width
- Caption: {
""
} |str
Caption text
- Layout: {
"layout.lay"
} |str
Name of Tecplot layout file
- Mach: {
"mach"
} |str
Name of trajectory key that determines freestream Mach number
4.2.13.1.2. Tecplot 3-View Figure¶
The pyCart report also contains a special type of subfigure that shows a 3-view for a specific component. The component can be either a name (as defined in the config file) or a component ID number.
- P:
dict
Dictionary of settings for Tecplot subfigure
- Type: {
"Tecplot3View"
} |str
Subfigure type
- Header: {
""
} |str
Heading placed above subfigure (bold, italic)
- Position:
"t"
|"c"
| {"b"
}Vertical alignment of subfigure
- Alignment:
"left"
| {"center"
}Horizontal alignment
- Width: {
0.66
} |float
Width of subfigure as a fraction of page text width
- Component: {
"entire"
} |str
|int
Name or number of component to show
4.2.13.1.3. Paraview Figure¶
A capability similar to the Tecplot layout is provided for the Paraview
visualization software. This is a somewhat different capability but has many
similarities. For some typical installations of Paraview, reading plt
files
is not supported, so Cart3D must be called with the tecIO option turned off.
- P:
dict
Dictionary of settings for Tecplot subfigure
- Type: {
"Paraview"
} |str
Subfigure type
- Header: {
""
} |str
Heading placed above subfigure (bold, italic)
- Position:
"t"
|"c"
| {"b"
}Vertical alignment of subfigure
- Alignment:
"left"
| {"center"
}Horizontal alignment
- Width: {
0.5
} |float
Width of subfigure as a fraction of page text width
- Caption: {
""
} |str
Caption text
- Layout: {
"layout.py"
} |str
Name of Paraview python script
- ImageFile: {
"export.png"
} |str
Name of file produced by the Paraview python script
- Format: {
"png"
} |str
Format of the image produced by the Paraview python script
- Mach: {
"mach"
} |str
Name of trajectory key that determines freestream Mach number
- Command: {
"pvpython"
} |str
Command-line command used to run Python script