From e631857e2f45b02870bc58c3ad60a28f7db72c73 Mon Sep 17 00:00:00 2001 From: Peter Sharpe Date: Mon, 4 Dec 2023 23:08:31 -0500 Subject: [PATCH] Add WIP paper --- paper/TeX/main.bib | 111 ++ paper/TeX/main.tex | 247 +++ paper/TeX/new-aiaa.bst | 1678 +++++++++++++++++++++ paper/TeX/new-aiaa.cls | 108 ++ paper/TeX/preamble.tex | 135 ++ paper/TeX/runConfigurations/Build.run.xml | 23 + 6 files changed, 2302 insertions(+) create mode 100644 paper/TeX/main.bib create mode 100644 paper/TeX/main.tex create mode 100644 paper/TeX/new-aiaa.bst create mode 100644 paper/TeX/new-aiaa.cls create mode 100644 paper/TeX/preamble.tex create mode 100644 paper/TeX/runConfigurations/Build.run.xml diff --git a/paper/TeX/main.bib b/paper/TeX/main.bib new file mode 100644 index 0000000..e72bb38 --- /dev/null +++ b/paper/TeX/main.bib @@ -0,0 +1,111 @@ +@thesis{tao_bs_thesis, + title = {Design of a Series of Airfoils for the {PSU} {Zephyrus} Human-Powered Aircraft}, + author = {Tao, Tony S.}, + year = {2010}, + school = {Pennsylvania State University}, + type = {Bachelor's Thesis}, + +} + +@article{kuzmin2012non, + title={Non-unique transonic flows over airfoils}, + author={Kuzmin, Alexander}, + journal={Computers \& Fluids}, + volume={63}, + pages={1--8}, + year={2012}, + publisher={Elsevier} +} + +@article{morgado2016xfoil, + title={{XFOIL} vs {CFD} performance predictions for high lift low {Reynolds} number airfoils}, + author={Morgado, J and Vizinho, R and Silvestre, MAR and P{\'a}scoa, JC}, + journal={Aerospace Science and Technology}, + volume={52}, + pages={207--214}, + year={2016}, + publisher={Elsevier} +} + +@article{he2019robust, + title={Robust aerodynamic shape optimization—from a circle to an airfoil}, + author={He, Xiaolong and Li, Jichao and Mader, Charles A and Yildirim, Anil and Martins, Joaquim RRA}, + journal={Aerospace Science and Technology}, + volume={87}, + pages={48--61}, + year={2019}, + publisher={Elsevier} +} + +@article{liebeck1973class, + title={A class of airfoils designed for high lift in incompressible flow}, + author={Liebeck, Robert H}, + journal={Journal of Aircraft}, + volume={10}, + number={10}, + pages={610--617}, + year={1973} +} + +@article{eleshaky1993airfoil, + title={Airfoil shape optimization using sensitivity analysis on viscous flow equations}, + author={Eleshaky, Mohamed E and Baysal, Oktay}, + year={1993} +} + +@manual{mses, + title = {A User’s Guide to MSES 3.05}, + author = {Mark Drela}, + organization = {Massachusetts Institute of Technology}, + address = {Cambridge, MA, USA}, + year = {2007}, + howpublished = {\url{https://web.mit.edu/drela/Public/web/mses/}}, +} + + +@misc{profil, + title = {Airfoil Design and Data}, + author = {Eppler, Richard}, + year = {1990}, +} + +@book{wahba, + author = {Grace Wahba}, + title = {Spline Models for Observational Data}, + year = {1990}, +} + +@book{elements_of_statistical_learning, + edition = {2}, + title = {The {Elements} of {Statistical} {Learning}: {Data} {Mining}, {Inference}, and {Prediction}}, + url = {https://hastie.su.domains/ElemStatLearn/}, + language = {en}, + year = {2017}, + author = {{Trevor Hastie} and {Robert Tibshirani} and {Jerome Friedman}}, + publisher = {Springer Series in Statistics}, +} + + +@article{unified_propellers, + title = {{MIT Unified Engineering Course Notes, Thermodynamics and Propulsion}: Performance of Propellers}, + author = {Spakovszky, Zoltan and E. M. Greitzer and I. A. Waitz}, + url = {https://web.mit.edu/16.unified/www/FALL/thermodynamics/notes/node86.html}, + year = {2007}, +} + +@book{brunton, + title = {Data {Driven} {Science} \& {Engineering}}, + language = {en}, + author = {Brunton, Steven L and Kutz, J Nathan}, + year = {2017}, + file = {Brunton and Kutz - 2017 - Data Driven Science & Engineering.pdf:C\:\\Users\\peter\\Zotero\\storage\\4JIQ5JL2\\Brunton and Kutz - 2017 - Data Driven Science & Engineering.pdf:application/pdf}, +} + +@book{surrogates, + title = {Surrogates: {G}aussian Process Modeling, Design and Optimization for the Applied Sciences}, + author = {Robert B. Gramacy}, + publisher = {Chapman Hall/CRC}, + address = {Boca Raton, Florida}, + note = {\url{http://bobby.gramacy.com/surrogates/}}, + year = {2020} +} \ No newline at end of file diff --git a/paper/TeX/main.tex b/paper/TeX/main.tex new file mode 100644 index 0000000..64302cd --- /dev/null +++ b/paper/TeX/main.tex @@ -0,0 +1,247 @@ +%! suppress = TooLargeSection +\documentclass[conf]{new-aiaa} +%\documentclass[journal]{new-aiaa} for journal papers + +\input{preamble} + +\title{NeuralFoil: An Airfoil Aerodynamics Analysis Tool Using Physics-Informed Machine Learning} + +\author{Peter Sharpe\footnote{PhD Candidate, AIAA Student Member} and R. John Hansman\footnote{T. Wilson Professor in Aeronautics, AIAA Fellow}} +\affil{Massachusetts Institute of Technology, Cambridge, MA} + +\begin{document} + + \maketitle + + \begin{abstract} + + TODO + + \end{abstract} + + \section{Nomenclature} + + {\renewcommand\arraystretch{1.0} + \noindent\begin{longtable*}{@{}l @{\quad=\quad} l@{}} + BL & boundary layer \\ + CFD & computational fluid dynamics \\ + $C_D$ & drag coefficient \\ + $C_L$ & lift coefficient \\ + $C_M$ & moment coefficient \\ + $C_p$ & local pressure coefficient \\ + $c_\mathcal{D}$ & dissipation coefficient \\ + $c_f$ & skin friction coefficient \\ + $H$ & BL shape parameter, defined as $\delta^*/\theta$ \\ + $H^*$ & BL kinetic energy shape parameter, defined as $\theta^*/\theta$ \\ + RANS & Reynolds-averaged Navier-Stokes \\ + $u_\infty$ & freestream velocity magnitude \\ + $u_{\rm max}$ & maximum velocity magnitude at any point in the flowfield \\ + $x_{\rm tr}$ & laminar-turbulent transition location, relative to the leading edge; appropriate suffixes denote top- and bottom-surface measures \\ +% $D$ & drag force \\ +% $d$ & order of noise estimator\\ +% $f_{\rm sample}$ & frequency of sensor measurements \\ +% $f_{\rm signal}$ & highest-relevant frequency of true signal \\ +% $g$ & gravitational acceleration \\ +% $h(t)$ & altitude at time $t$ \\ +% $J$ & propeller advance ratio \\ +% $L$ & lift force \\ +% $m$ & instantaneous aircraft mass \\ +% $\eta_{\rm propulsive}$ & propulsive efficiency \\ +% $N$ & number of samples in dataset \\ +% $n(t)$ & noise component of measurement at time $t$ \\ +% $n$ & propeller rotational rate \\ +% $P_{\rm loss}$ & power lost from the aircraft at time $t$; primarily drag, but also other system losses\\ +% $P_{\rm in}$ & input power to propulsion system \\ +% $P_{\rm thrust}$ & useful power at airstream, $T \cdot U$\\ +% $\sigma_n$ & standard deviation of noise component \\ +% $s(t)$ & true signal component of measurement at time $t$ \\ +% $\theta_i$ & various unknown parameters of the aircraft's performance curves\\ +% $T$ & thrust force \\ +% $t$ & time \\ +% $U(t)$ & true airspeed at time $t$ \\ +% $V(t)$ & battery voltage at time $t$ \\ +% $x(t)$ & measured data (signal + noise) of a generic sensor at time $t$ \\ + \end{longtable*}} + + + \section{Introduction} + + In conceptual aircraft design, the problem of shaping a typical wing can be decomposed into two parts: planform design and airfoil design. The latter, which is the focus of this work, is a multidisciplinary design problem that requires consideration of a variety of aerodynamic, structural, and manufacturing objectives and constraints. A non-exhaustive list of major considerations could include: + \begin{itemize} + \item Profile drag across the expected operating range of the airfoil (spanning lift coefficients, Reynolds numbers, and Mach numbers), including adequate off-design performance \cite{drela_pros_1998} + \item Pitching moment coefficients, which can drive tail sizing (modifying trim drag) and affect divergence speed + \item Hinge moments and control effectiveness of any control surfaces, which drive actuator design and weight + \item Stall behavior, which can affect handling qualities and safety + \item Thickness at various points, in order to accommodate fuel volume and required structural members to resist failure (e.g., by bending, buckling, divergence, flutter, or control reversal) \cite{sharpe_tailerons_2023} + \item Sensitivity to boundary layer performance, which places constraints on surface finish, cleanliness, and manufacturing tolerances \cite{eleshaky1993airfoil, selig_highlift_1997, liebeck1973class} + \item Peak suction pressures, which affect the critical Mach number in transonic applications or cavitation in hydrodynamic applications + \item Shock stability and buffet considerations in transonic applications + \item Manufacturability, which might include flat-bottom airfoil sections, strictly-convex airfoil shapes (e.g., to accomodate shrink-coverings, which are common in ultra-lightweight applications \cite{drela_lowreynoldsnumber_1988}), restrictions on trailing-edge angle + \end{itemize} + + These airfoil requirements often differ considerably at different points along the span of the wing, which often leads to a family of airfoils being used in the design of a given wing. To fulfill such design requirements, a designer will typically either find an existing airfoil or design a new airfoil. Given the specificity of the requirements illustrated in the list above, the latter is often necessary. + + Three approaches are commonly used to computationally design new airfoils: inverse design methods, direct manual methods, and optimization methods. In the inverse design approach, popularized by Drela's XFoil code \cite{drela_xfoil_1989} and Eppler's Profil code \cite{profil, tao_bs_thesis}, conformal mapping methods are used to reconstruct a new airfoil shape from a desired pressure distribution. This has the benefit of allowing the engineer to directly operate on the most relevant aerodynamic quantities, but it can struggle to produce airfoils that satisfy non-aerodynamic constraints (e.g., manufacturability) due to the lack of direct control here. Conformal mapping methods are also only applicable to potential-flow-governed regions, so the specified pressure distribution is often the invsicid, rather than viscous (true) pressure distribution\footnote{This can be alleviated by using nonlinear optimization to target the viscous pressure distribution, albeit with reduced numerical robustness.}. + + In the direct manual method (or ``geometric design'' method, using parlance from XFoil), an engineer formulates an airfoil shape directly and modifies this iteratively by hand. Aerodynamic analysis is performed by any code that will perform the forward problem (geometry $\rightarrow$ aerodynamics), such as XFoil, MSES \cite{mses}, or any RANS-based CFD code \cite{adler_cfd_2022}. This allows for easier satisfaction of non-aerodynamic constraints, but it is difficult to directly target aerodynamic quantities. Significant user expertise is also required to identify the most relevant geometric parameters and to make effective changes to the airfoil shape. + + In the optimization approach, a parameterized airfoil shape is optimized to minimize a cost function and satisfy specified constraints. At first glance, this appears to be an automation of the direct manual method. However, Drela and others note the surprising difficulty of posing the correct optimization problem \cite{drela_pros_1998, kroo_multidisciplinary_1997}, so this approach requires just as much (if not more) human expertise than the direct manual method. As stated by Drela \cite{drela_pros_1998}, optimization-based airfoil design ``is still an iterative cut-and-try undertaking. But compared to [direct] techniques, the cutting-and-trying is not on the geometry, but rather on the precise formulation of the optimization problem.'' To support this, Drela gives compelling case studies of how airfoil design optimization can go awry in the absence of user review and care. Some codes, like the LINDOP \cite{mses} optimization routine coupled with XFoil, alleviate this somewhat by using a hybrid of the direct and optimization approaches: update directions are computed by an optimizer, but the actual changes are reviewed and implemented by a human between iterations. Despite the potential challenges of this optimization-based airfoil design approach, it offers compelling benefits: resulting airfoil performance is competitive with expert-designed airfoils \cite{drela_pros_1998}, and optimization can provide a systematic and robust approach that solves challenging design problems from poor initial guesses \cite{he2019robust}. + + In all of these methods, some form of a computational tool for airfoil aerodynamics analysis is required. For subsonic airfoils, the gold standard of such tools is XFoil \cite{drela_xfoil_1989}. XFoil is more accurate than RANS-CFD-based tools \cite{morgado2016xfoil}, yet it has a computational cost that is roughly 1,000x lower -- a testament to the power of its modeling approach, which couples integral boundary layer and potential flow methods. A complete description of this modeling approach is available in Drela's \textit{Aerodynamics of Viscous Fluids} \cite{drela_aerodynamics_2019}, and in recent state-of-the-art work by Zhang \cite{zhang_threedimensional_2022, zhang_nonparametric_2017}. However, XFoil has several attributes that make it less-than-ideal for directly driving numerical optimization studies: + + \begin{itemize} + \item XFoil is not guaranteed to produce a solution. When an ``ambitious'' calculations are attempted, XFoil often fails to provide a converged solution; the unconverged result often has wildly-diverging values and is effectively unusable. In some cases, calculations can lead to infinite loops or process crashes due to unhandled exceptions. While this is acceptable in certain applications (e.g., manual direct analysis), it is generally unacceptable for use in numerical optimization. Instead, optimization strongly benefits from a robust analysis tool that always produces a result, even if that result has slightly degraded accuracy. This allows the analysis to steer the optimizer back towards the design space of reasonable airfoils \cite{he2019robust}. A particularly useful case is when the model is deliberately made to be slightly pessimistic (e.g., overpredict drag) in regions of the design space with high uncertainty, adding further optimization pressure towards reasonable designs. + \begin{itemize} + \item More generally, design optimization is not the only application that strongly benefits from an aerodynamics analysis tool that always produces an answer. Other examples where a non-answer, infinite loop, or crashed process are unacceptable include real-time control (e.g., as an aerodynamic model for a model-predictive controller onboard an aircraft) and flight simulation. + \end{itemize} + \item XFoil solutions are not necessarily unique, and slightly different solutions can be obtained for the same analysis problem (airfoil shape, angle of attack, and Reynolds and Mach numbers). In practice, this manifests as an effective hysteresis depending on whether angle of attack is swept up or down. This flow non-uniqueness is in fact a real physical\footnote{For example, flow over an airfoil may separate as its angle of attack increases past $12\degree$, but it may not fully reattach until the angle of attack descends back to below $11\degree$} effect \cite{jameson_airfoils_1991, kuzmin2012non, he2019robust}. However, this non-uniqueness can be exceptionally problematic for numerical optimization, as there is no limit to how sensitive performance can be to input parameters (precluding approaches such as finite-differencing for gradient-based optimization). + \item XFoil solutions are non-smooth\footnote{precisely, they are $C^0$ continuous but not $C^1$ continuous} with respect to input parameters, which makes it fundamentally incompatible with gradient-based optimization. This is a consequence of how laminar-turbulent transition is handled by XFoil's integral boundary layer solver. This solve requires the use of laminar and turbulent boundary layer \emph{closure models}, which are curve-fitted functions that yield various necessary quantities ($H^*$, $c_f$, $c_\mathcal{D}$, etc.) of the von Karman integral momentum and kinetic energy equations as a function of the two values that parameterize the boundary layer ($H$, $\Rey_\theta$). The laminar and turbulent versions of these functions differ. XFoil implements a cut-cell approach on the transitioning interval, which restores $C^0$-continuity (i.e., transition won't truly ``jump'' from one node to another discretely); however, a sharp change in gradient occurs whenever an individual node switches its equation from laminar to turbulent. Adler et al. provide a graphical depiction of this phenomenon \cite{adler_cfd_2022}. + \item Most interfaces between an optimizer and XFoil communicate through a series of text files (i.e., hard disk), rather than by sharing data in memory (i.e., RAM). Given the quick speed of an individual XFoil run, this input-output overhead can impose a significant performance penalty. + \end{itemize} + + This motivates the development of a new airfoil aerodynamics analysis tool that captures the advantages of XFoil (accuracy, speed) while mitigating these drawbacks. In recent years, many fields have benefited from a hybrid data-and-theory approach, where data-driven models are used to augment traditional physics-based models with learned closures. This work presents a similar physics-informed approach as applied to analyzing airfoil aerodynamics. + + % TODO write about other physics-informed ML approaches, webfoil? + + + \section{NeuralFoil Tool Description} + + \subsection{Overview} + + NeuralFoil is a tool for rapid aerodynamics analysis of airfoils, similar to XFoil \cite{drela_xfoil_1989}. Fundamentally, NeuralFoil consists of physics-informed neural networks trained on tens of millions of XFoil runs, with appropriate physics-based constraints structurally embedded into the model architecture. NeuralFoil focuses on estimating bulk quantities (e.g., lift and drag forces) rather than flow-field quantities (e.g., pressure distribution), as the former are most directly relevant to conceptual aircraft design. A more precise list of inputs and outputs to NeuralFoil is given in Figure \ref{fig:neuralfoil_io}. + + \begin{figure}[H] + \centering + \begin{tikzpicture}[ + node distance=1 cm and 1 cm, + auto, + box/.style={ + rectangle, + rounded corners, + draw=#1!50!black, + fill=#1!20, + thick, + text width=5cm, + align=center, + minimum height=1cm + }, + title/.style={font=\bfseries}, + list/.style={align=left} + ] + + % Nodes + \node[box=myorange] (inputs) { + \textbf{Inputs} + \begin{itemize} + \item Airfoil shape, parameterized as described in Section \ref{sec:airfoil-parameterization} + \item Angle of attack $\alpha$ + \item Reynolds number $\Rey$ + \item Mach number $M$ + \item Control surfaces (both hinge points and deflection angles) + \end{itemize} + }; + + \node[box=mydarkseagreen, right=of inputs, text width=3cm] (neuralfoil) { + \textbf{NeuralFoil} + }; + + \node[box=mydodgerblue, right=of neuralfoil] (outputs) { + \textbf{Outputs} + \begin{itemize} + \item Lift coefficient $C_L$ + \item Drag coefficient $C_D$ + \item Moment coefficient $C_M$ + \item Maximum overspeed $u_{\rm max} / u_\infty$ + \item Upper-surface transition location $x_{\rm tr,top}/c$ + \item Lower-surface transition location $x_{\rm tr,bot}/c$ + \end{itemize} + }; + + % Arrows + \draw[-Latex] (inputs) -- (neuralfoil); + \draw[-Latex] (neuralfoil) -- (outputs); + \end{tikzpicture} + \caption{Inputs and outputs of the NeuralFoil model.} + \label{fig:neuralfoil_io} + \end{figure} + + NeuralFoil has a mathematical form that is fully explicit\footnote{meaning no iterative solvers are used} and guaranteed to produce a unique solution with a bounded amount of computational effort for any input. Reasonable aerodynamics estimates can be expected: + \begin{itemize} + \item For any practical airfoil shape\footnote{only single-element airfoils are allowed}, including modifications for trailing-edge control deflections up to reasonable deflections (e.g., $\pm 25\degree$) + \item Across the $360\degree$ angle of attack range, by leveraging analytical post-stall models regressed from high-$\alpha$ wind tunnel data by Truong \cite{truong_analytical_2020} + \item At any practical Reynolds number ($10^2$ to $10^9$) with physically-correct extrapolation even beyond these ranges (e.g., Stokes flow limit) + \item At subsonic and transonic Mach numbers, from zero to slightly above the drag-divergent Mach number + \end{itemize} + + NeuralFoil is implemented as an open-source lightweight Python package with minimal dependencies (only NumPy \cite{harris_array_2020} for the actual aerodynamic modeling), allowing easy installation across a variety of platforms. + + \subsection{Airfoil Geometry Parameterization} + + A user can specify input airfoil in many different forms -- for example, as an array of $(x, y)$ coordinates, as a standard \texttt{*.dat} file, or as an Airfoil-class object within the AeroSandbox \cite{sharpe_aerosandbox_2021} framework. + + + However, underneath this interface layer, the actual airfoil geometry given to NeuralFoil's neural networks is parameterized as an 8-parameter-per-side CST (Kulfan) parameterization, with Kulfan's added leading-edge-modification (LEM) and trailing-edge thickness parameter \cite{kulfan_universal_2008, kulfan_modification_2020}. This gives a total of 18 parameters (corresponding to linear modes) to describe a given airfoil shape, which are illustrated in Figure \ref{fig:neuralfoil_parameterization}. This parameterization was chosen as Masters \cite{masters_geometric_2017} shows that this is one of the most parameter-efficient representations of airfoil shape and flexible enough to represent essentially all practical airfoil shapes. Moreover, this formulation, is linear and relatively interpretable, and is already common in existing aerospace tools such as OpenVSP \cite{mcdonald_open_2022}. + + \begin{figure}[H] + \centering + \includegraphics[width=0.8\textwidth]{../../media/kulfan_parameterization_illustration.pdf} + \caption{Geometry input parameterization used by NeuralFoil.} + \label{fig:neuralfoil_parameterization} + \end{figure} + + Conversion of user-specified airfoils to this format for NeuralFoil to use is efficiently handled using the AeroSandbox framework, which formulates this as a least-squares fitting problem. + + \subsection{Model Architecture} + + NeuralFoil offers eight different deep neural network models, which offer a tradeoff between accuracy and computational cost. This tradeoff is implemented as differences in the number and size of hidden layers. Table \ref{tab:model-sizes} lists the different models, along with their number of hidden layers and neurons per hidden layer. + + \begin{table} + \centering + \caption{Neural network models offered in NeuralFoil.} + \label{tab:model-sizes} + \begin{tabular}{lll} + \toprule + Model & Hidden Layers & Neurons per Hidden Layer \\ \midrule + ``xxsmall'' & 2 & 32 \\ + ``xsmall'' & 3 & 32 \\ + ``small'' & 3 & 48 \\ + ``medium'' & 4 & 64 \\ + ``large'' & 4 & 128 \\ + ``xlarge'' & 4 & 256 \\ + ``xxlarge'' & 5 & 256 \\ + ``xxxlarge'' & 5 & 512 \\ + \bottomrule + \end{tabular} + \end{table} + + Each layer is a fully-connected linear layer. The activation function applied between each layer is a hyperbolic tangent function, which is chosen because the resulting model is $C^\infty$-continuous. + + \subsection{Training Data Generation} + + Training data was generated by + + \subsection{Training Process} + + \subsubsection{Loss Function} + + % TODO asymmetric CD penalty + + \subsection{Performance} + + XFoil + + + \section{Reproducibility Statement} + + All code and data used in this paper is publicly available at \url{https://github.com/peterdsharpe/neuralfoil}. NeuralFoil itself is best accessed through the AeroSandbox \cite{sharpe_aerosandbox_2021} package, which provides some of the advanced features (e.g., $360\degree$ angle of attack, transonic effects, and control surface deflections) that are not yet available in the standalone NeuralFoil package. + + + \section{Conclusion} + \label{sec:conclusion} + + \section*{Acknowledgments} + The authors acknowledge the MIT SuperCloud and Lincoln Laboratory Supercomputing Center for providing high-performance computing resources that have contributed to the research results reported within this work. + + \bibliography{main, C:/Users/peter/Documents/Zotero/library, C:/Users/peter/Documents/Zotero/library-zotero} + +\end{document} diff --git a/paper/TeX/new-aiaa.bst b/paper/TeX/new-aiaa.bst new file mode 100644 index 0000000..5c41533 --- /dev/null +++ b/paper/TeX/new-aiaa.bst @@ -0,0 +1,1678 @@ +%% +%% This is file `new-aiaa.bst', +%% generated with the docstrip utility +%% and modified further by Overleaf for AIAA. +%% v1.3 2020/06/06 +%% +%% The original source files were: +%% +%% merlin-fixed.mbs (with options: `ay,nat,seq-no,nm-rev,jnrlst,keyxyr,dt-jnl,yr-com,aymth,note-yr,tit-qq,atit-u,thtit-a,vnum-nr,volp-com,jdt-pc,jwdpg,pp-last,jwdvol,num-xser,numser,ser-vol,ser-ed,pub-date,pub-xpar,pre-pub,doi,edpar,edby,blk-com,in-x,pp,ed,abr,ednx,ord,and-com,url,url-blk,nfss,') +%% ---------------------------------------- +%% *** New AIAA Bibliography Style *** +%% +%% Copyright 1994-2011 Patrick W Daly + % =============================================================== + % IMPORTANT NOTICE: + % This bibliographic style (bst) file has been generated from one or + % more master bibliographic style (mbs) files, listed above. + % + % This generated file can be redistributed and/or modified under the terms + % of the LaTeX Project Public License Distributed from CTAN + % archives in directory macros/latex/base/lppl.txt; either + % version 1 of the License, or any later version. + % =============================================================== + % Name and version information of the main mbs file: + % \ProvidesFile{merlin.mbs}[2011/11/18 4.33 (PWD, AO, DPC)] + % For use with BibTeX version 0.99a or later + %------------------------------------------------------------------- + % This bibliography style file is intended for texts in ENGLISH + % This is an author-year citation style bibliography. As such, it is + % non-standard LaTeX, and requires a special package file to function properly. + % Such a package is natbib.sty by Patrick W. Daly + % The form of the \bibitem entries is + % \bibitem[Jones et al.(1990)]{key}... + % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}... + % The essential feature is that the label (the part in brackets) consists + % of the author names, as they should appear in the citation, with the year + % in parentheses following. There must be no space before the opening + % parenthesis! + % With natbib v5.3, a full list of authors may also follow the year. + % In natbib.sty, it is possible to define the type of enclosures that is + % really wanted (brackets or parentheses), but in either case, there must + % be parentheses in the label. + % The \cite command functions as follows: + % \citet{key} ==>> Jones et al. (1990) + % \citet*{key} ==>> Jones, Baker, and Smith (1990) + % \citep{key} ==>> (Jones et al., 1990) + % \citep*{key} ==>> (Jones, Baker, and Smith, 1990) + % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2) + % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990) + % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., 1990, p. 32) + % \citeauthor{key} ==>> Jones et al. + % \citeauthor*{key} ==>> Jones, Baker, and Smith + % \citeyear{key} ==>> 1990 + %--------------------------------------------------------------------- + +ENTRY + { address + author + booktitle + chapter + doi + edition + editor + eid + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + type + url + volume + year + } + {} + { label extra.label sort.label short.list } +INTEGERS { output.state before.all mid.sentence after.sentence after.block } +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := +} +STRINGS { s t} +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} +FUNCTION {add.blank} +{ " " * before.all 'output.state := +} + +FUNCTION {date.block} +{ + skip$ +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} +FUNCTION {non.stop} +{ duplicate$ + "}" * add.period$ + #-1 #1 substring$ "." = +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\emph{" swap$ * "}" * } + if$ +} +FUNCTION {tie.or.space.prefix} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ +} + +FUNCTION {capitalize} +{ "u" change.case$ "t" change.case$ } + +FUNCTION {space.word} +{ " " swap$ * " " * } + % Here are the language-specific definitions for explicit words. + % Each function has a name bbl.xxx where xxx is the English word. + % The language selected here is ENGLISH +FUNCTION {bbl.and} +{ "and"} + +FUNCTION {bbl.etal} +{ "et~al." } + +FUNCTION {bbl.editors} +{ "eds." } + +FUNCTION {bbl.editor} +{ "ed." } + +FUNCTION {bbl.edby} +{ "edited by" } + +FUNCTION {bbl.edition} +{ "ed." } + +FUNCTION {bbl.volume} +{ "Vol." } + +FUNCTION {bbl.of} +{ "of" } + +FUNCTION {bbl.number} +{ "No." } + +FUNCTION {bbl.nr} +{ "No." } + +FUNCTION {bbl.in} +{ "in" } + +FUNCTION {bbl.pages} +{ "pp." } + +FUNCTION {bbl.page} +{ "p." } + +FUNCTION {bbl.chapter} +{ "Chap." } + +FUNCTION {bbl.chapters} +{ "Chaps." } + + +FUNCTION {bbl.techrep} +{ "Tech. Rep." } + +FUNCTION {bbl.mthesis} +{ "Master's thesis" } + +FUNCTION {bbl.phdthesis} +{ "Ph.D. thesis" } + +FUNCTION {bbl.first} +{ "1\textsuperscript{st}" } + +FUNCTION {bbl.second} +{ "2\textsuperscript{nd}" } + +FUNCTION {bbl.third} +{ "3\textsuperscript{rd}" } + +FUNCTION {bbl.fourth} +{ "4\textsuperscript{th}" } + +FUNCTION {bbl.fifth} +{ "5\textsuperscript{th}" } + +FUNCTION {bbl.st} +{ "\textsuperscript{st}" } + +FUNCTION {bbl.nd} +{ "\textsuperscript{nd}" } + +FUNCTION {bbl.rd} +{ "\textsuperscript{rd}" } + +FUNCTION {bbl.th} +{ "\textsuperscript{th}" } + +MACRO {jan} {"Jan."} + +MACRO {feb} {"Feb."} + +MACRO {mar} {"Mar."} + +MACRO {apr} {"Apr."} + +MACRO {may} {"May"} + +MACRO {jun} {"Jun."} + +MACRO {jul} {"Jul."} + +MACRO {aug} {"Aug."} + +MACRO {sep} {"Sep."} + +MACRO {oct} {"Oct."} + +MACRO {nov} {"Nov."} + +MACRO {dec} {"Dec."} + +FUNCTION {eng.ord} +{ duplicate$ "1" swap$ * + #-2 #1 substring$ "1" = + { bbl.th * } + { duplicate$ #-1 #1 substring$ + duplicate$ "1" = + { pop$ bbl.st * } + { duplicate$ "2" = + { pop$ bbl.nd * } + { "3" = + { bbl.rd * } + { bbl.th * } + if$ + } + if$ + } + if$ + } + if$ +} + +MACRO {acmcs} {"ACM Computing Surveys"} + +MACRO {acta} {"Acta Informatica"} + +MACRO {cacm} {"Communications of the ACM"} + +MACRO {ibmjrd} {"IBM Journal of Research and Development"} + +MACRO {ibmsj} {"IBM Systems Journal"} + +MACRO {ieeese} {"IEEE Transactions on Software Engineering"} + +MACRO {ieeetc} {"IEEE Transactions on Computers"} + +MACRO {ieeetcad} + {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} + +MACRO {ipl} {"Information Processing Letters"} + +MACRO {jacm} {"Journal of the ACM"} + +MACRO {jcss} {"Journal of Computer and System Sciences"} + +MACRO {scp} {"Science of Computer Programming"} + +MACRO {sicomp} {"SIAM Journal on Computing"} + +MACRO {tocs} {"ACM Transactions on Computer Systems"} + +MACRO {tods} {"ACM Transactions on Database Systems"} + +MACRO {tog} {"ACM Transactions on Graphics"} + +MACRO {toms} {"ACM Transactions on Mathematical Software"} + +MACRO {toois} {"ACM Transactions on Office Information Systems"} + +MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} + +MACRO {tcs} {"Theoretical Computer Science"} +FUNCTION {bibinfo.check} +{ swap$ + duplicate$ missing$ + { + pop$ pop$ + "" + } + { duplicate$ empty$ + { + swap$ pop$ + } + { swap$ + pop$ + } + if$ + } + if$ +} +FUNCTION {bibinfo.warn} +{ swap$ + duplicate$ missing$ + { + swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ + "" + } + { duplicate$ empty$ + { + swap$ "empty " swap$ * " in " * cite$ * warning$ + } + { swap$ + pop$ + } + if$ + } + if$ +} +FUNCTION {format.url} +{ + url + duplicate$ empty$ + { pop$ "" } + { "\urlprefix\url{" swap$ * "}" * } + if$ +} + +INTEGERS { nameptr namesleft numnames } + + +STRINGS { bibinfo} + +FUNCTION {format.names} +{ 'bibinfo := + duplicate$ empty$ 'skip$ { + 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}{, f.}{, jj}" + format.name$ + bibinfo bibinfo.check + 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + "," * + t "others" = + { + " " * bbl.etal * + } + { + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } if$ +} +FUNCTION {format.names.ed} +{ + 'bibinfo := + duplicate$ empty$ 'skip$ { + 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{f.~}{vv~}{ll}{, jj}" + format.name$ + bibinfo bibinfo.check + 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + numnames #2 > + { "," * } + 'skip$ + if$ + t "others" = + { + + " " * bbl.etal * + } + { + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } if$ +} +FUNCTION {format.key} +{ empty$ + { key field.or.null } + { "" } + if$ +} + +FUNCTION {format.authors} +{ author "author" format.names +} +FUNCTION {get.bbl.editor} +{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } + +FUNCTION {format.editors} +{ editor "editor" format.names duplicate$ empty$ 'skip$ + { + " " * + get.bbl.editor + "(" swap$ * ")" * + * + } + if$ +} +FUNCTION {format.doi} +{ doi empty$ + { "" } + { + "\doi{" doi * "}" * + } + if$ +} +FUNCTION {format.note} +{ + note empty$ + { "" } + { note #1 #1 substring$ + duplicate$ "{" = + 'skip$ + { output.state mid.sentence = + { "l" } + { "u" } + if$ + change.case$ + } + if$ + note #2 global.max$ substring$ * "note" bibinfo.check + } + if$ +} + +FUNCTION {format.title} +{ title + "title" bibinfo.check + duplicate$ empty$ 'skip$ + { + "\enquote{" swap$ * + non.stop + { ",} " * } + { "} " * } + if$ + } + if$ +} +FUNCTION {end.quote.title} +{ title empty$ + 'skip$ + { before.all 'output.state := } + if$ +} +FUNCTION {format.full.names} +{'s := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv~}{ll}" format.name$ + 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + " " * bbl.etal * + } + { + numnames #2 > + { "," * } + 'skip$ + if$ + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {author.editor.key.full} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.full.names } + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {author.key.full} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {editor.key.full} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.full.names } + if$ +} + +FUNCTION {make.full.names} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.full + { type$ "proceedings" = + 'editor.key.full + 'author.key.full + if$ + } + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem[{" write$ + label write$ + ")" make.full.names duplicate$ short.list = + { pop$ } + { * } + if$ + "}]{" * write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {n.dashify} +{ + 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {word.in} +{ "" } + +FUNCTION {format.date} +{ year "year" bibinfo.check duplicate$ empty$ + { + "empty year in " cite$ * "; set to ????" * warning$ + pop$ "????" + } + 'skip$ + if$ + month "month" bibinfo.check duplicate$ empty$ + 'skip$ + { + " " * swap$ + } + if$ + * + extra.label * + before.all 'output.state := + ", " swap$ * +} +FUNCTION{format.year} +{ year "year" bibinfo.check duplicate$ empty$ + { "empty year in " cite$ * + "; set to ????" * + warning$ + pop$ "????" + } + { + } + if$ + extra.label * + % "(" swap$ * ")" * +} +FUNCTION {format.btitle} +{ title "title" bibinfo.check + duplicate$ empty$ 'skip$ + { + emphasize + } + if$ +} +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { bbl.volume volume tie.or.space.prefix + "volume" bibinfo.check * * + series "series" bibinfo.check + duplicate$ empty$ 'pop$ +% { emphasize ", " * swap$ * } + { ", " * swap$ * } + if$ + "volume and number" number either.or.check + } + if$ +} +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { series empty$ + { number "number" bibinfo.check } + { output.state mid.sentence = + { bbl.number } + { bbl.number capitalize } + if$ + number tie.or.space.prefix "number" bibinfo.check * * + bbl.in space.word * + series "series" bibinfo.check * + } + if$ + } + if$ + } + { "" } + if$ +} +FUNCTION {is.num} +{ chr.to.int$ + duplicate$ "0" chr.to.int$ < not + swap$ "9" chr.to.int$ > not and +} + +FUNCTION {extract.num} +{ duplicate$ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ + t #2 global.max$ substring$ 't := + duplicate$ is.num + { s swap$ * 's := } + { pop$ "" 't := } + if$ + } + while$ + s empty$ + 'skip$ + { pop$ s } + if$ +} + +FUNCTION {convert.edition} +{ extract.num "l" change.case$ 's := + s "first" = s "1" = or + { bbl.first 't := } + { s "second" = s "2" = or + { bbl.second 't := } + { s "third" = s "3" = or + { bbl.third 't := } + { s "fourth" = s "4" = or + { bbl.fourth 't := } + { s "fifth" = s "5" = or + { bbl.fifth 't := } + { s #1 #1 substring$ is.num + { s eng.ord 't := } + { edition 't := } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + t +} + +FUNCTION {format.edition} +{ edition duplicate$ empty$ 'skip$ + { + convert.edition + output.state mid.sentence = + { "l" } + { "t" } + if$ change.case$ + "edition" bibinfo.check + " " * bbl.edition * + } + if$ +} +INTEGERS { multiresult } +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} +FUNCTION {format.pages} +{ pages duplicate$ empty$ 'skip$ + { duplicate$ multi.page.check + { + bbl.pages swap$ + n.dashify + } + { + bbl.page swap$ + } + if$ + tie.or.space.prefix + "pages" bibinfo.check + * * + } + if$ +} +FUNCTION {format.journal.pages} +{ pages duplicate$ empty$ 'pop$ + { swap$ duplicate$ empty$ + { pop$ pop$ format.pages } + { + ", " * +% v1.1: uncouple year and pages +% format.year * ", " * + swap$ + n.dashify + pages multi.page.check + 'bbl.pages + 'bbl.page + if$ + swap$ tie.or.space.prefix + "pages" bibinfo.check + * * + * + } + if$ + } + if$ +} +FUNCTION {format.journal.eid} +{ eid "eid" bibinfo.check + duplicate$ empty$ 'pop$ + { swap$ duplicate$ empty$ 'skip$ + { + ", " * + } + if$ + swap$ * + } + if$ +} +FUNCTION {format.vol.num.pages} +{ volume field.or.null + duplicate$ empty$ 'skip$ + { + bbl.volume swap$ tie.or.space.prefix + "volume" bibinfo.check + * * + } + if$ + number "number" bibinfo.check duplicate$ empty$ 'skip$ + { + swap$ duplicate$ empty$ + { "there's a number but no volume in " cite$ * warning$ } + 'skip$ + if$ + swap$ + ", " bbl.nr * number tie.or.space.prefix pop$ * swap$ * + } + if$ * +} + +%% If chapter contains "," use "Chaps." else "Chap" +FUNCTION {format.chapter.pages} +{ chapter empty$ + { "" } + { type empty$ +% { bbl.chapter } + { chapter multi.page.check + {bbl.chapters} + {bbl.chapter} + if$ + } + { type "l" change.case$ + "type" bibinfo.check + } + if$ + chapter tie.or.space.prefix + "chapter" bibinfo.check + * * + } + if$ +} + +FUNCTION {format.booktitle} +{ + booktitle "booktitle" bibinfo.check + emphasize +} +FUNCTION {format.in.ed.booktitle} +{ format.booktitle duplicate$ empty$ 'skip$ + { + format.bvolume duplicate$ empty$ 'pop$ + { ", " swap$ * * } + if$ + editor "editor" format.names.ed duplicate$ empty$ 'pop$ + { + bbl.edby + " " * swap$ * + swap$ + "," * + " " * swap$ + * } + if$ + word.in swap$ * + } + if$ +} +FUNCTION {format.thesis.type} +{ type duplicate$ empty$ + 'pop$ + { swap$ pop$ + "t" change.case$ "type" bibinfo.check + } + if$ +} +FUNCTION {format.tr.number} +{ number "number" bibinfo.check + type duplicate$ empty$ + { pop$ bbl.techrep } + 'skip$ + if$ + "type" bibinfo.check + swap$ duplicate$ empty$ + { pop$ "t" change.case$ } + { tie.or.space.prefix * * } + if$ +} +FUNCTION {format.article.crossref} +{ + word.in + " \cite{" * crossref * "}" * +} +FUNCTION {format.book.crossref} +{ volume duplicate$ empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + pop$ word.in + } + { bbl.volume + swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * + } + if$ + " \cite{" * crossref * "}" * +} +FUNCTION {format.incoll.inproc.crossref} +{ + word.in + " \cite{" * crossref * "}" * +} +FUNCTION {format.org.or.pub} +{ 't := + "" + t empty$ + { address "address" bibinfo.check * + } + { t * + address empty$ + 'skip$ + { ", " * address "address" bibinfo.check * } + if$ + } + if$ + year duplicate$ empty$ + { "empty year in " cite$ * "; set to ????" * warning$ + pop$ "????" } + { "year" bibinfo.check extra.label * } + if$ + t empty$ address empty$ and + { * } + { ", " swap$ * * } + if$ +} +FUNCTION {format.publisher.address} +{ publisher "publisher" bibinfo.warn format.org.or.pub +} + +FUNCTION {format.organization.address} +{ organization "organization" bibinfo.check format.org.or.pub +} + +FUNCTION {article} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.title "title" output.check + end.quote.title + crossref missing$ + { + journal + "journal" bibinfo.check + emphasize + "journal" output.check + format.vol.num.pages output + } + { format.article.crossref output.nonnull + } + if$ + % v1.1: uncouple year and pages + format.year output + eid empty$ + { format.journal.pages } + { format.journal.eid } + if$ + new.block + format.doi output + format.url output + format.note output + fin.entry +} +FUNCTION {book} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check + editor format.key output + } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + format.btitle "title" output.check + format.edition output + crossref missing$ + { format.bvolume output + format.number.series output + format.publisher.address output + } + { + format.book.crossref output.nonnull + format.date "year" output.check + } + if$ + new.block + format.doi output + format.url output + format.note output + fin.entry +} +FUNCTION {booklet} +{ output.bibitem + format.authors output + author format.key output + format.title "title" output.check + end.quote.title + howpublished "howpublished" bibinfo.check output + address "address" bibinfo.check output + format.date "year" output.check + new.block + format.doi output + format.url output + format.note output + fin.entry +} + +FUNCTION {inbook} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check + editor format.key output + } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + format.btitle "title" output.check + format.edition output + crossref missing$ + { + format.number.series output + format.publisher.address output + format.bvolume output + format.chapter.pages "chapter and pages" output.check + } + { + format.chapter.pages "chapter and pages" output.check + format.book.crossref output.nonnull + } + if$ + format.pages "pages" output.check + new.block + format.doi output + format.url output + format.note output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.title "title" output.check + end.quote.title + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.number.series output + format.publisher.address output + format.chapter.pages output + format.edition output + } + { format.incoll.inproc.crossref output.nonnull + format.chapter.pages output + } + if$ + format.pages "pages" output.check + new.block + format.doi output + format.url output + format.note output + fin.entry +} +FUNCTION {inproceedings} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.title "title" output.check + end.quote.title + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + %format.number.series output + publisher empty$ + { format.organization.address output } + { organization "organization" bibinfo.check output + format.publisher.address output + } + if$ + %format.bvolume output + } + { format.incoll.inproc.crossref output.nonnull + } + if$ + format.pages "pages" output.check + new.block + format.doi output + format.url output + format.note output + fin.entry +} +FUNCTION {conference} { inproceedings } +FUNCTION {manual} +{ output.bibitem + format.authors output + author format.key output + format.btitle "title" output.check + organization "organization" bibinfo.check output + address "address" bibinfo.check output + format.edition output + format.date "year" output.check + new.block + format.doi output + format.url output + format.note output + fin.entry +} + +FUNCTION {mastersthesis} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.title + "title" output.check + end.quote.title + bbl.mthesis format.thesis.type output.nonnull + school "school" bibinfo.warn output + address "address" bibinfo.check output + format.date "year" output.check + new.block + format.doi output + format.url output + format.note output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + author format.key output + format.title output + end.quote.title + howpublished "howpublished" bibinfo.check output + format.date "year" output.check + new.block + format.doi output + format.url output + format.note output + fin.entry +} +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.title + "title" output.check + end.quote.title + bbl.phdthesis format.thesis.type output.nonnull + school "school" bibinfo.warn output + address "address" bibinfo.check output + format.date "year" output.check + new.block + format.doi output + format.url output + format.note output + fin.entry +} + +FUNCTION {proceedings} +{ output.bibitem + format.editors output + editor format.key output + format.btitle "title" output.check + format.bvolume output + format.number.series output + publisher empty$ + { format.organization.address output } + { organization "organization" bibinfo.check output + format.publisher.address output + } + if$ + new.block + format.doi output + format.url output + format.note output + fin.entry +} + +FUNCTION {techreport} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.title + "title" output.check + end.quote.title + format.tr.number output.nonnull + institution "institution" bibinfo.warn output + address "address" bibinfo.check output + format.date "year" output.check + new.block + format.doi output + format.url output + format.note output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + format.authors "author" output.check + author format.key output + format.title "title" output.check + end.quote.title + format.date "year" output.check + new.block + format.doi output + format.url output + format.note "note" output.check + fin.entry +} + +FUNCTION {default.type} { misc } +READ +FUNCTION {sortify} +{ purify$ + "l" change.case$ +} +INTEGERS { len } +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} +FUNCTION {format.lab.names} +{ 's := + "" 't := + s #1 "{vv~}{ll}" format.name$ + s num.names$ duplicate$ + #2 > + { pop$ + " " * bbl.etal * + } + { #2 < + 'skip$ + { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { + " " * bbl.etal * + } + { bbl.and space.word * s #2 "{vv~}{ll}" format.name$ + * } + if$ + } + if$ + } + if$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {editor.key.label} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ +} + +FUNCTION {calc.short.authors} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "proceedings" = + 'editor.key.label + 'author.key.label + if$ + } + if$ + 'short.list := +} + +FUNCTION {calc.label} +{ calc.short.authors + short.list + "(" + * + year duplicate$ empty$ + short.list key field.or.null = or + { pop$ "" } + 'skip$ + if$ + * + 'label := +} + +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" + format.name$ 't := + nameptr #1 > + { + " " * + namesleft #1 = t "others" = and + { "zzzzz" 't := } + 'skip$ + if$ + t sortify * + } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} +FUNCTION {editor.sort} +{ editor empty$ + { key empty$ + { "to sort, need editor or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ +} +INTEGERS { seq.num } +FUNCTION {init.seq} +{ #0 'seq.num :=} +EXECUTE {init.seq} +FUNCTION {int.to.fix} +{ "000000000" swap$ int.to.str$ * + #-1 #10 substring$ +} +FUNCTION {presort} +{ calc.label + label sortify + " " + * + seq.num #1 + 'seq.num := + seq.num int.to.fix + 'sort.label := + sort.label + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {presort} +SORT +STRINGS { last.label next.extra } +INTEGERS { last.extra.num last.extra.num.extended last.extra.num.blank number.label } +FUNCTION {initialize.extra.label.stuff} +{ #0 int.to.chr$ 'last.label := + "" 'next.extra := + #0 'last.extra.num := + "a" chr.to.int$ #1 - 'last.extra.num.blank := + last.extra.num.blank 'last.extra.num.extended := + #0 'number.label := +} +FUNCTION {forward.pass} +{ last.label label = + { last.extra.num #1 + 'last.extra.num := + last.extra.num "z" chr.to.int$ > + { "a" chr.to.int$ 'last.extra.num := + last.extra.num.extended #1 + 'last.extra.num.extended := + } + 'skip$ + if$ + last.extra.num.extended last.extra.num.blank > + { last.extra.num.extended int.to.chr$ + last.extra.num int.to.chr$ + * 'extra.label := } + { last.extra.num int.to.chr$ 'extra.label := } + if$ + } + { "a" chr.to.int$ 'last.extra.num := + "" 'extra.label := + label 'last.label := + } + if$ + number.label #1 + 'number.label := +} +FUNCTION {reverse.pass} +{ next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + extra.label 'next.extra := + extra.label + duplicate$ empty$ + 'skip$ + { "{\natexlab{" swap$ * "}}" * } + if$ + 'extra.label := + label extra.label * 'label := +} +EXECUTE {initialize.extra.label.stuff} +ITERATE {forward.pass} +REVERSE {reverse.pass} +FUNCTION {bib.sort.order} +{ sort.label + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} +ITERATE {bib.sort.order} +SORT +FUNCTION {begin.bib} +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" number.label int.to.str$ * "}" * + write$ newline$ + "\newcommand{\enquote}[1]{``#1''}" + write$ newline$ + "\providecommand{\natexlab}[1]{#1}" + write$ newline$ + "\providecommand{\url}[1]{\texttt{#1}}" + write$ newline$ + "\providecommand{\urlprefix}{URL }" + write$ newline$ + "\expandafter\ifx\csname urlstyle\endcsname\relax" + write$ newline$ + " \providecommand{\doi}[1]{\discretionary{}{}{}https://doi.org/#1}\else" + write$ newline$ + " \providecommand{\doi}[1]{\discretionary{}{}{}\urlstyle{rm}\url{https://doi.org/#1}}\fi" + write$ newline$ +} +EXECUTE {begin.bib} +EXECUTE {init.state.consts} +ITERATE {call.type$} +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} +EXECUTE {end.bib} +%% End of customized bst file +%% +%% End of file `new-aiaa.bst'. diff --git a/paper/TeX/new-aiaa.cls b/paper/TeX/new-aiaa.cls new file mode 100644 index 0000000..d0030ee --- /dev/null +++ b/paper/TeX/new-aiaa.cls @@ -0,0 +1,108 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% new-aiaa.cls, v1.2, 2018/01/10 +% Developed by Overleaf +% +% This class file enables authors to prepare papers +% for submission to AIAA Technical Journals and +% Conferences. +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +\ProvidesClass{new-aiaa}[2018/01/10, v1.2] + +\newif\if@conf +\newif\if@journal +\DeclareOption{conf}{\@conftrue} +\DeclareOption{journal}{\@journaltrue} + +\ExecuteOptions{} +\ProcessOptions\relax +\LoadClass[10pt]{article} + +\RequirePackage[T1]{fontenc} +\RequirePackage[utf8]{inputenc} +\RequirePackage{microtype} +\RequirePackage{newtxtext,newtxmath} + +\RequirePackage[letterpaper,margin=1in]{geometry} +\RequirePackage{enumitem} +\setlist{labelindent=\parindent,leftmargin=*,nosep} +\setlist[enumerate]{label={\arabic*)}} + +\RequirePackage[symbol*]{footmisc} + +\RequirePackage{setspace} +\if@conf +\fi +\if@journal + \doublespacing +\fi + +\RequirePackage[style]{abstract} +\renewcommand{\abstitlestyle}[1]{} +\renewcommand{\abstracttextfont}{\bfseries\normalsize} +\setlength{\absleftindent}{0.5in} +\setlength{\absrightindent}{0.5in} + + +\RequirePackage[blocks]{authblk} +\renewcommand{\Authfont}{\normalsize\upshape} +\renewcommand{\Affilfont}{\normalsize\itshape} +\setlength{\affilsep}{0pt} + +\renewcommand{\maketitle}{% + \begingroup + \renewcommand\and{\\[\baselineskip]} + \centering\singlespacing + {\LARGE\bfseries\@title\par} + \vskip2\baselineskip + \@author\par + \endgroup + \vskip\baselineskip + \if@journal + \thispagestyle{empty} + \fi + \setcounter{footnote}{0} +} + + +\RequirePackage[explicit]{titlesec} +\renewcommand{\thesection}{\Roman{section}} +\renewcommand{\thesubsection}{\thesection.\Alph{subsection}} +\renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}} +\titleformat{\section} + {\large\bfseries\singlespacing\centering} + {\thesection.\space}{0pt}{#1}[] +\titlespacing{\section}{0pt}{0.5\baselineskip}{0pt} +\titleformat{\subsection} + {\normalsize\bfseries\singlespacing} + {\Alph{subsection}.\space}{0pt}{#1}[] +\titlespacing{\subsection}{0pt}{0.5\baselineskip}{0pt} +\titleformat{\subsubsection} + {\normalsize\itshape\singlespacing} + {\arabic{subsubsection}.\space}{0pt}{#1}[] +\titlespacing{\subsubsection}{0pt}{0.5\baselineskip}{0pt} + +\RequirePackage{lettrine} +\setlength{\DefaultNindent}{0pt} + +\RequirePackage[tableposition=top]{caption} +\renewcommand{\figurename}{Fig.} +\captionsetup*{font=bf,labelsep=quad} +\renewcommand{\arraystretch}{1.2} + +\RequirePackage[indentfirst=false,font+=small,leftmargin=0.4in,rightmargin=0pt,vskip=0pt] +{quoting} + +\setlength{\abovedisplayskip}{\baselineskip} +\setlength{\belowdisplayskip}{\baselineskip} +\setlength{\abovedisplayshortskip}{\baselineskip} +\setlength{\belowdisplayshortskip}{\baselineskip} + +\RequirePackage[sort&compress,numbers]{natbib} +% \bibliographystyle{aiaa} +\bibliographystyle{new-aiaa} +\renewcommand{\bibfont}{\small} + +\RequirePackage[hyphens]{url} +\RequirePackage{hyperref} diff --git a/paper/TeX/preamble.tex b/paper/TeX/preamble.tex new file mode 100644 index 0000000..bb38d55 --- /dev/null +++ b/paper/TeX/preamble.tex @@ -0,0 +1,135 @@ +%\usepackage{lgrind} +\usepackage{cmap} +\usepackage[T1]{fontenc} + +\usepackage{microtype} +\usepackage{amsmath} +\let\Bbbk\relax +\usepackage{amssymb} +\usepackage{gensymb} +\usepackage{graphicx} +\usepackage{pgf} +\usepackage{float} +\usepackage{optidef} +\usepackage{ifdraft} +\usepackage[hyphens]{url} +\usepackage{hyperref} +\usepackage{enumitem} + +\renewcommand{\labelitemii}{$\circ$} + +\usepackage{eqexpl} +\eqexplSetIntro{where:} % set parenthesis in the left of the first item +\eqexplSetDelim{=} % set delimiter to "=" + +\usepackage{ar} + +\usepackage{multicol} + +\usepackage{siunitx} +\sisetup{} + +\usepackage{tabularx} +\usepackage{booktabs} +\usepackage{multirow} +\usepackage{tablefootnote} +\usepackage{tabularray} +\UseTblrLibrary{booktabs} + +\usepackage{mdframed} +\newmdenv[ + topline=false, + bottomline=false, + skipabove=\topsep, + skipbelow=\topsep, + innerleftmargin=30pt, + innerrightmargin=30pt, + backgroundcolor=black!5 +]{example} + +%\usepackage{fontspec} +%\setmonofont{Source Code Pro} +%\setmainfont{TeX Gyre Pagella} + +\usepackage{tikz} +\usetikzlibrary{positioning} +\usetikzlibrary{shapes.geometric} +\usetikzlibrary{shapes.arrows} +\usetikzlibrary{decorations.pathmorphing, decorations.pathreplacing, calc} +\usetikzlibrary{arrows.meta, positioning} + +\usepackage{tikz-cd} +\tikzcdset{ + math mode=false +} + +\usepackage[outputdir=../out,final=true]{minted} +\PassOptionsToPackage{table,xcdraw}{xcolor} +\usepackage{xcolor} + +\definecolor{c1}{HTML}{64ACBE} +\definecolor{c2}{HTML}{EE442F} +\definecolor{c3}{HTML}{601A4A} + +\definecolor{myorange}{RGB}{255, 165, 0} +\definecolor{mydarkseagreen}{RGB}{143, 188, 143} +\definecolor{mydodgerblue}{RGB}{30, 144, 255} + +\renewcommand{\theFancyVerbLine}{\sffamily + \textcolor[rgb]{0.8,0.8,0.8}{\scriptsize\oldstylenums{\arabic{FancyVerbLine}}} +} +\usemintedstyle{pastie} +%\usemintedstyle{jupyter_python} +%\usemintedstyle{rainbow_dash} +%\usemintedstyle{colorful} +\setminted{ + frame=lines, + framesep=2mm, +% numbers=left, + fontsize=\footnotesize, + autogobble=true, + baselinestretch=1.15, + breaklines +} +\setmintedinline{ + breaklines +} + +\usepackage{titlesec} +%\newcommand{\sectionbreak}{\clearpage} + +\usepackage{enumitem} + +\usepackage{caption} +\captionsetup[table]{skip=6pt} + +\usepackage[numbers,sort&compress]{natbib} + +\usepackage{adjustbox} + +\usepackage[titletoc,title]{appendix} + +%\usepackage{geometry} +%\geometry{ +% letterpaper, +% left=1.0in, +% right=1.0in, +% top=1.0in, +% bottom=1.0in +%} + +\usepackage{longtable} + +%\usepackage{setspace} +%\setstretch{1.25} + +\usepackage{svg} + +\usepackage{subcaption} + +\usepackage{afterpage} +\usepackage[section]{placeins} + +\newcommand{\Rey}{\rm Re} +\newcommand{\M}{\rm M} + diff --git a/paper/TeX/runConfigurations/Build.run.xml b/paper/TeX/runConfigurations/Build.run.xml new file mode 100644 index 0000000..c55d9d3 --- /dev/null +++ b/paper/TeX/runConfigurations/Build.run.xml @@ -0,0 +1,23 @@ + + + + LATEXMK + + + NONE + + -shell-escape -xelatex + + $PROJECT_DIR$/paper/TeX/main.tex + $PROJECT_DIR$/paper/out + {projectDir}/auxil + false + PDF + TEXLIVE + true + [] + [] + + + + \ No newline at end of file