From ae69de922158dfba2b313e9c11ee221728630369 Mon Sep 17 00:00:00 2001 From: Thomas Lambert <t.lambert@uliege.be> Date: Thu, 2 Jun 2022 17:59:10 +0200 Subject: [PATCH] doc(input): config validation --- contents/user-input.tex | 31 +++++++++++++++++++++++++- doc-setup.tex | 1 + style/definitions.sty | 49 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 style/definitions.sty diff --git a/contents/user-input.tex b/contents/user-input.tex index 0b03896..c6b0faa 100644 --- a/contents/user-input.tex +++ b/contents/user-input.tex @@ -10,5 +10,34 @@ % International License (<https://creativecommons.org/licenses/by-sa/4.0/>) % ------------------------------------------------------------------------------ -\chapter{Input file} +\chapter{Configuration file} \label{chap:user:input} + +A simulation with \rotare is controlled by a single configuration file. This +file contains all data related to the behavior of the software, the models and +solvers to use, the flow, the operating points to analyze and the rotor +geometry itself. These five types of input are collected inside five different +structures for easier handling in the code. + +This input file should be a \matlab script (not a function). Examples of +configuration are given in src/config. In order to always have a fully-defined, +working configuration available, it is suggested to just copy the template and +edit your copy instead of directly working in the template. + + +\section{Input variables} + + +\section{Configuration validation} + +Before initiating a simulation, the user input file is passed through a +validation function. This function checks if all inputs are properly defined and +formatted before starting the simulation. It also fixes small typos in the +string parameters whenever possible to ensure proper behavior of the software. + +If the validation of a parameter fails, a comprehensive error message will be +returned. This should help the user to fix their issues easily. + +The validation function will also return preliminary warnings whenever some +parameters may lead to potential issues. These warnings can easily be turned +off. diff --git a/doc-setup.tex b/doc-setup.tex index 08fcb60..22a7d6a 100644 --- a/doc-setup.tex +++ b/doc-setup.tex @@ -82,3 +82,4 @@ % ============================================================================== \usepackage{scrhack} % So other packages play nice with KOMA-Scripts +\usepackage{definitions} % Custom definitions (see style/definitions.sty) diff --git a/style/definitions.sty b/style/definitions.sty new file mode 100644 index 0000000..7193ed6 --- /dev/null +++ b/style/definitions.sty @@ -0,0 +1,49 @@ +% ----------------------------------------------------------------------------- +% List of definitions to ensure coherence in the notation between the abstract, +% the paper and the presentation. +% +% Author: Thomas Lambert <t.lambert@uliege.be> +% ULiege - Aeroelasticity and Experimental Aerodynamics +% MIT License +% https://gitlab.uliege.be/thlamb/bemt +% ------------------------------------------------------------------------------ + +\RequirePackage{xspace} +\RequirePackage{fontawesome5} +\RequirePackage{xcolor} + + +% --- Better colors ------------------------------------------------------------ + +\definecolor{myRed}{RGB}{230,45,49} +\definecolor{myGreen}{RGB}{40,155,56} +\definecolor{myOrange}{RGB}{248,170,0} + +% --- Shortcuts ---------------------------------------------------------------- +\newcommand{\todo}[1]{\textcolor{red}{TODO: #1} \noindent} + +\newcommand{\latin}[1]{\textit{#1}} +\newcommand{\ie}{\latin{i.e.}} +\newcommand{\eg}{\latin{e.g.}} +\newcommand{\etal}{\latin{et~al.}~} + +\newcommand{\coderepoURL}{https://gitlab.uliege.be/thlamb/rotare} +\newcommand{\codedocURL}{https://gitlab.uliege.be/thlamb/rotare-doc} + +\newcommand{\gV}{\textcolor{myGreen}{\faCheck}} +\newcommand{\rX}{\textcolor{myRed}{\faTimes}} +\newcommand{\yQ}{\textcolor{myOrange}{\faQuestion}} +\newcommand{\oV}{\textcolor{myOrange}{\faCheck}} + +% --- Code & software names, --------------------------------------------------- +\newcommand\rotare{\textsc{Rotare}\xspace} +\newcommand\matlab{\textsc{Matlab}\xspace} +\newcommand\QBlade{\textsc{QBlade}\xspace} +\newcommand\JBlade{\textsc{JBlade}\xspace} +\newcommand\pyBEMT{\textsc{pyBEMT}\xspace} +\newcommand\AeroDyn{\textsc{AeroDyn}\xspace} + +% --- Velocities --------------------------------------------------------------- + +% --- Angles ------------------------------------------------------------------- + -- GitLab