### Generate a template project Source: https://pytornado.readthedocs.io/en/latest/user_guide/cli.html Creates a clean project directory with a minimal working example. Useful when starting a new project. ```bash pytornado --make-example ``` -------------------------------- ### Project directory structure for the example settings file Source: https://pytornado.readthedocs.io/en/latest/user_guide/input_file_settings.html The file structure corresponding to the example settings file. It shows where the aircraft and state files are located: the aircraft file in the aircraft folder and the state file in the state folder. ```text . ├── aircraft │ └── template_aircraft.json ├── airfoils ├── deformation ├── log.txt ├── _plots ├── _results ├── settings │ └── template.json └── state └── template.json ``` -------------------------------- ### pytornado.stdfun.setup.setup_wkdir Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.stdfun.html Creates a template working directory with a minimal working example. ```APIDOC ## pytornado.stdfun.setup.setup_wkdir ### Description Creates a template working directory with a minimal working example. ### Method Function call ### Endpoint `pytornado.stdfun.setup.setup_wkdir(aircraft_file=None)` ### Parameters - **aircraft_file** (str) - Optional - Full aircraft file path ### Request Example ```python setup_wkdir(aircraft_file=None) ``` ### Response No return value documented. ``` -------------------------------- ### Example PyTornado settings file (JSON) Source: https://pytornado.readthedocs.io/en/latest/user_guide/input_file_settings.html A complete example settings file for PyTornado. It defines the aircraft and state files, optional deformation, VLM autopanels, result saving options, and plot settings. The file must be located in the settings folder of the project directory. ```json { "aircraft": "template_aircraft.json", "state": "template.json", "deformation": null, "vlm_autopanels_c": 5, "vlm_autopanels_s": 20, "save_results": { "global": false, "panelwise": false, "aeroperformance": false, "matrix_system": false }, "plot": { "geometry": { "opt": [], "show": false, "save": false }, "lattice": { "opt": [], "show": false, "save": false }, "matrix_downwash": { "opt": [], "show": false, "save": false }, "results": { "opt": [ "cp" ], "show": false, "save": true } } } ``` -------------------------------- ### Install PyTornado from source with pip Source: https://pytornado.readthedocs.io/en/latest/user_guide/installation.html Compile and install PyTornado from the source archive root using pip. The --user flag is recommended; on Linux/Ubuntu the executable may be called pip3 instead of pip. ```bash pip install --user . ``` -------------------------------- ### Create and run a minimal PyTornado example Source: https://pytornado.readthedocs.io/en/latest/user_guide/getting_started.html Run these commands in order to create and execute a minimal PyTornado example. The first command creates a folder named pytornado in the current directory. After changing into that folder, the second command runs a VLM analysis in verbose mode using the main settings file settings/template.json. ```bash pytornado --make-example ``` ```bash pytornado -v --run settings/template.json ``` -------------------------------- ### Install pip and Numpy on Linux Source: https://pytornado.readthedocs.io/en/latest/user_guide/installation.html Install pip and Numpy on Ubuntu 18.04. Numpy is required because it provides C++ header files needed for building PyTornado. ```bash sudo apt install python3-pip pip3 install --user numpy ``` -------------------------------- ### Run PyTornado with a settings file Source: https://pytornado.readthedocs.io/en/latest/user_guide/cli.html Starts a VLM analysis using the specified settings file. The path can be relative or absolute; PyTornado automatically detects the project directory. ```bash pytornado --run settings/template.json ``` -------------------------------- ### Simple state file example Source: https://pytornado.readthedocs.io/en/latest/user_guide/input_file_state.html Defines a single aerodynamic state with airspeed, angle of attack, and rotation rates. The altitude and mach fields are set to null, while density is provided directly. ```json { "aero": { "airspeed": 100, "alpha": 2, "altitude": null, "beta": 0, "density": 1.225, "mach": null, "rate_P": 0, "rate_Q": 0, "rate_R": 0 } } ``` -------------------------------- ### Example default dictionary generated by get_default_dict Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.objects.html The resulting dictionary with default values extracted from the template dictionary. ```python default_dict = { 'test_key1': 'default_value1', 'test_key2': 1792, } ``` -------------------------------- ### Aero-performance map state file example Source: https://pytornado.readthedocs.io/en/latest/user_guide/input_file_state.html Defines three flight states for an aero-performance map analysis by using lists of values. Each list must have the same number of items, and the first item of each list defines the first flight state, the second item the second, etc. ```json { "aero": { "altitude": [0, 10e3, 10e3], "mach": [0.2, 0.4, 0.4], "alpha": [5.0, 5.0, 5.0], "beta": [0.0, 0.0, 0.0], "rate_P": [0.0, 0.0, 0.0], "rate_Q": [0.0, 0.0, 0.0], "rate_R": [0.0, 0.0, 0.0] } } ``` -------------------------------- ### Aircraft file example (JSON) Source: https://pytornado.readthedocs.io/en/latest/user_guide/input_file_aircraft.html A minimal aircraft definition file showing the hierarchical structure: an aircraft with one wing, one segment, and one control surface. All geometry values are null except the reference area, span, and chord, and the airfoils are set to NACA0000. The control surface is a flap with a deflection of 5 degrees and a mirrored deflection of -5 degrees. ```json { "uid": "template_aircraft", "refs": { "area": 10, "span": 5, "chord": 2, "gcenter": [ 0, 0, 0 ], "rcenter": [ 0, 0, 0 ], "comment": null }, "wings": [ { "uid": "template_wing", "symmetry": 2, "segments": [ { "uid": "template_segment", "vertices": { "a": [ 0, 0, 0 ], "b": [ 0, 5, 0 ], "c": [ 2, 5, 0 ], "d": [ 2, 0, 0 ] }, "geometry": { "inner_chord": null, "inner_alpha": null, "inner_beta": null, "inner_axis": null, "outer_chord": null, "outer_alpha": null, "outer_beta": null, "outer_axis": null, "span": null, "sweep": null, "dihedral": null }, "airfoils": { "inner": "NACA0000", "outer": "NACA0000" }, "panels": { "num_c": null, "num_s": null } } ], "controls": [ { "uid": "template_control", "device_type": "flap", "deflection": 5, "deflection_mirror": -5, "segment_uid": { "inner": "template_segment", "outer": "template_segment" }, "rel_vertices": { "eta_inner": 0.2, "eta_outer": 0.8, "xsi_inner": 0.7, "xsi_outer": 0.7 }, "rel_hinge_vertices": { "xsi_inner": 0.7, "xsi_outer": 0.7 }, "panels": { "num_c": null } } ] } ] } ``` -------------------------------- ### Example test dictionary that passes check_dict Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.objects.html A dictionary that matches the template structure and would pass the check. ```python test_dict = { 'test_key1': 'some_string', 'test_key2': 1111, } ``` -------------------------------- ### Combine clean, verbose, and run flags Source: https://pytornado.readthedocs.io/en/latest/user_guide/cli.html Combines -c (clean), -v (verbose), and -r (run) in one command. PyTornado first removes files in _results and _plots, then starts a VLM analysis in verbose mode. ```bash pytornado -cvr settings/template.json ``` -------------------------------- ### Example template dictionary for check_dict Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.objects.html A template dictionary used for the check_dict function; values must be tuples with a default value and expected types. ```python template_dict = { 'test_key1': ('default_value1', str), 'test_key2': (1792, (int, float)), } ``` -------------------------------- ### NDArrayEncoder.default example: serializing arbitrary iterators Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.fileio.html Example implementation of the default method for a JSONEncoder subclass, as shown in the documentation for NDArrayEncoder. It converts an iterable object to a list, or falls back to the base class implementation to raise a TypeError. ```python def default(self, o): try: iterable = iter(o) except TypeError: pass else: return list(iterable) # Let the base class default method raise the TypeError return JSONEncoder.default(self, o) ``` -------------------------------- ### PyTornado CLI help output Source: https://pytornado.readthedocs.io/en/latest/user_guide/cli.html Shows the usage and optional arguments for the pytornado command line tool. Run 'pytornado' without arguments to print this help page. ```text usage: pytornado 0.5.4 [-h] [-r | --cpacs2json | --make-example | --list-example-from-db | --make-example-from-db ] [-v | -d | -q] [-c | --clean-only] optional arguments: -h, --help show this help message and exit -r , --run Settings file (entry point for pytornado) --cpacs2json Convert a CPACS file to native JSON format --make-example Generate a minimal working example --list-example-from-db, --ldb List example aircraft in the database --make-example-from-db , --mdb Pick an aircraft from the database and generate a project directory -v, --verbose -d, --debug -q, --quiet -c, --clean remove old project files --clean-only clean and exit ``` -------------------------------- ### StripSubdivision.abs_hinge_vertices Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.objects.html Gets absolute coordinates of subarea hinge points, accounting for wing deformations. ```APIDOC ## StripSubdivision.abs_hinge_vertices ### Description Gets absolute coordinates of subarea hinge points, accounting for wing deformations. ### Method abs_hinge_vertices ### Parameters - **mirror** (bool) - Optional - If true, mirror is returned ### Returns - **abs_hinge_vertices** - Absolute hinge vertices ``` -------------------------------- ### Example test dictionary that fails check_dict Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.objects.html A dictionary that does not match the template structure and will raise a Type-Error. ```python test_dict = { 'test_key1': 'this is okay...', 'test_key2': '... but a string is not allowed here', } ``` -------------------------------- ### Settings.generate_paths Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.objects.html Method to initialise the file structure. ```APIDOC ## Method: Settings.generate_paths ### Description Initialises the file structure. ### Method Method ### Endpoint pytornado.objects.settings.Settings.generate_paths() ### Parameters None ### Response No return value ``` -------------------------------- ### StripSubdivision.abs_hinge_axis Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.objects.html Gets the hinge axis vector in the global coordinate system, accounting for wing deformations. ```APIDOC ## StripSubdivision.abs_hinge_axis ### Description Gets the hinge axis vector in the global coordinate system, accounting for wing deformations. ### Method abs_hinge_axis ### Parameters - **mirror** (bool) - Optional - If true, mirror axis is returned ### Returns - **abs_hinge_axis** - Absolute hinge axis in global system ``` -------------------------------- ### pytornado.stdfun.run.get_settings Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.stdfun.html Reads settings from a file path and returns a settings instance. ```APIDOC ## pytornado.stdfun.run.get_settings ### Description Reads settings from a file path and returns a settings instance. ### Method Function call ### Endpoint `pytornado.stdfun.run.get_settings(settings_filepath)` ### Parameters - **settings_filepath** (string) - Required - Path to the settings file ### Request Example ```python settings = get_settings(settings_filepath) ``` ### Response Returns a settings instance. ``` -------------------------------- ### load Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.fileio.native.html Reads flight state from a PyTornado state file, searching for 'state.*' in the 'state' folder of the WKDIR. ```APIDOC ## load(settings) ### Description Read flight state from a PyTornado state file. Searches for file 'state.*' in the 'state' folder of the WKDIR. ### Parameters - **settings** (object) - Required - Data structure for execution settings. ### Request Example ```python import pytornado.fileio.native.state as state state.load(settings) ``` ### Response Returns the flight state data structure (object) for operating conditions. ``` -------------------------------- ### pytornado.fileio.native.results.save_all Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.fileio.native.html Evaluates all 'save' settings and creates result files. Takes settings, aircraft, state, and vlmdata as arguments. ```APIDOC ## save_all(settings, aircraft, state, vlmdata) ### Description Evaluate all 'save' settings and create result files. ### Parameters - **settings** - Required - settings instance - **aircraft** (object) - Required - data structure for aircraft model - **state** (object) - Required - data structure for operating conditions - **vlmdata** (object) - Required - data structure for VLM calculation data ``` -------------------------------- ### Subarea.abs_vertices(mirror) Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.objects.html Method to get absolute coordinates of subarea vertices, taking wing deformations into account. ```APIDOC ## Subarea.abs_vertices(mirror) ### Description Get absolute coordinates of subarea vertices. Wing deformations are taken into account. ### Parameters - **mirror** (bool) - Optional flag, if true mirror is returned. ### Returns - **abs_vertices** (dict) - Dictionary with absolute coordinates of subarea vertices. ``` -------------------------------- ### StripSubdivision.abs_camber_line_rot_axis_vertices Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.objects.html Gets the rotation axis for the camber line, defined by two points, in the global coordinate system. ```APIDOC ## StripSubdivision.abs_camber_line_rot_axis_vertices ### Description Gets the rotation axis for the camber line, defined by two points, in the global coordinate system. ### Method abs_camber_line_rot_axis_vertices ### Parameters - **mirror** (bool) - Optional - If true, mirror axis is returned ### Returns - **abs_vertices** - Absolute axis vertices in global system ``` -------------------------------- ### save(settings) Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.fileio.native.html Writes settings to a native settings file. ```APIDOC ## save(settings) ### Description Write settings to native settings file. ### Method save ### Parameters - **settings** (object) - Required - Data structure for execution settings. ``` -------------------------------- ### clean_dict(dictionary, to_del='_') Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.fileio.native.html Deletes dictionary items with keys starting with a specified string, working recursively. ```APIDOC ## clean_dict(dictionary, to_del='_') ### Description Delete dictionary items with keys starting with specified string. Works recursively. ### Method clean_dict ### Parameters - **dictionary** (object) - Required - Dictionary object - **to_del** (string) - Optional - Starts-with identifier ``` -------------------------------- ### StripSubdivision.abs_camber_line_rot_axis Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.objects.html Gets the axis vector for camber line rotations in the global coordinate system, accounting for wing deformations. ```APIDOC ## StripSubdivision.abs_camber_line_rot_axis ### Description Gets the axis vector for camber line rotations in the global coordinate system, accounting for wing deformations. ### Method abs_camber_line_rot_axis ### Parameters - **mirror** (bool) - Optional - If true, mirror axis is returned ### Returns - **abs_axis** - Absolute axis in global system ``` -------------------------------- ### load(settings_filepath) Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.fileio.native.html Reads PyTornado settings from a settings file. ```APIDOC ## load(settings_filepath) ### Description Read PyTornado settings from PyTornado settings file. ### Method load ### Parameters - **settings_filepath** (string) - Required - Path to the settings file. ``` -------------------------------- ### pytornado.stdfun.setup.cpacs2pytornado Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.stdfun.html Loads a CPACS file and exports JSON Aircraft and state files. ```APIDOC ## pytornado.stdfun.setup.cpacs2pytornado ### Description Loads a CPACS file and exports JSON Aircraft and state files. ### Method Function call ### Endpoint `pytornado.stdfun.setup.cpacs2pytornado(file_cpacs)` ### Parameters - **file_cpacs** (string) - Required - Absolute path to project directory ### Request Example ```python cpacs2pytornado(file_cpacs) ``` ### Response No return value documented. ``` -------------------------------- ### Settings.clean Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.objects.html Method to remove old files in the project directory. ```APIDOC ## Method: Settings.clean ### Description Removes old files in the project directory. ### Method Method ### Endpoint pytornado.objects.settings.Settings.clean() ### Parameters None ### Response No return value ``` -------------------------------- ### Airfoil file format a: header and coordinate pairs Source: https://pytornado.readthedocs.io/en/latest/user_guide/input_file_airfoil.html First row is the airfoil name or comment, followed by two columns for x- and y-coordinates. Data typically starts at x=1. ```text AIRFOIL NAME 1.00 0.00 0.80 0.05 0.60 0.10 0.40 0.10 0.20 0.05 0.00 -0.01 0.20 -0.05 0.40 -0.10 0.60 -0.10 0.80 -0.10 1.00 -0.00 ``` -------------------------------- ### dump_pretty_json(obj, fp, *, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=NDArrayEncoder, indent=4, separators=(',', ': '), default=None, sort_keys=False, **kw) Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.fileio.native.html Serializes an object as a JSON formatted stream to a file-like object with pretty-printing options. ```APIDOC ## dump_pretty_json(obj, fp, *, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=NDArrayEncoder, indent=4, separators=(',', ': '), default=None, sort_keys=False, **kw) ### Description Serialize `obj` as a JSON formatted stream to `fp` (a `.write()`-supporting file-like object). ### Method dump_pretty_json ### Parameters - **obj** (object) - Required - Object to serialize - **fp** (file-like) - Required - A `.write()`-supporting file-like object - **skipkeys** (bool) - Optional - If true, dict keys that are not basic types will be skipped instead of raising a TypeError. - **ensure_ascii** (bool) - Optional - If false, strings written to fp can contain non-ASCII characters. - **check_circular** (bool) - Optional - If false, the circular reference check for container types will be skipped. - **allow_nan** (bool) - Optional - If false, it will be a ValueError to serialize out of range float values. - **cls** (class) - Optional - Custom JSONEncoder subclass. - **indent** (int) - Optional - Non-negative integer for pretty-printing. - **separators** (tuple) - Optional - An (item_separator, key_separator) tuple. - **default** (function) - Optional - Function that should return a serializable version of obj or raise TypeError. - **sort_keys** (bool) - Optional - If true, the output of dictionaries will be sorted by key. - **kw** (dict) - Optional - Additional keyword arguments. ``` -------------------------------- ### save Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.fileio.native.html Writes flight state to a PyTornado state file. ```APIDOC ## save(state, settings) ### Description Write flight state to a PyTornado state file. ### Parameters - **state** (object) - Required - Data structure for operating conditions. - **settings** (object) - Required - Data structure for execution settings. ### Request Example ```python import pytornado.fileio.native.state as state state.save(state, settings) ``` ### Response No return value; writes the flight state to a file. ``` -------------------------------- ### pytornado.fileio.native.deformation.load Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.fileio.native.html Loads the aircraft deformation file if it exists. Takes the aircraft and settings objects as arguments. ```APIDOC ## load(aircraft, settings) ### Description Loads the aircraft deformation file if it exists. ### Parameters - **aircraft** (obj) - Required - aircraft object - **settings** (obj) - Required - settings object ``` -------------------------------- ### pytornado.stdfun.run.standard_run Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.stdfun.html Runs a standard analysis using the provided arguments. ```APIDOC ## pytornado.stdfun.run.standard_run ### Description Runs a standard analysis using the provided arguments. ### Method Function call ### Endpoint `pytornado.stdfun.run.standard_run(args)` ### Parameters - **args** (StdRunArgs) - Required - Arguments (see StdRunArgs) ### Request Example ```python standard_run(args) ``` ### Response No return value documented. ``` -------------------------------- ### Wing.generate() Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.objects.html Method to generate a wing and components. ```APIDOC ## Wing.generate() ### Description Generate a wing and components. ``` -------------------------------- ### show_and_save(plot_settings, *figures) Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.plot.html Saves and/or shows plots. ```APIDOC ## show_and_save(plot_settings, *figures) ### Description Save and/or show plots. ### Parameters - **plot_settings** (Plot settings) - Required - Plot settings - **figures** (tuple) - Required - Tuples with (figure_object, 'name_of_plot') ``` -------------------------------- ### pytornado.stdfun.run.clean_project_dir Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.stdfun.html Removes old files in the project directory. ```APIDOC ## pytornado.stdfun.run.clean_project_dir ### Description Removes old files in the project directory. ### Method Function call ### Endpoint `pytornado.stdfun.run.clean_project_dir(settings)` ### Parameters - **settings** (settings instance) - Required - Settings instance ### Request Example ```python clean_project_dir(settings) ``` ### Response No return value documented. ``` -------------------------------- ### pytornado.aero.vlm.pre_panelling Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.aero.html Creates subdivisions and subareas for all aircraft wings. ```APIDOC ## pytornado.aero.vlm.pre_panelling(aircraft) ### Description Create subdivisions and subareas for all aircraft wings. This routine divides the wing into subdivisions and subareas in order to generate a suitable mesh for wing with control surfaces. In a first step “mandatory” subdivisions are made: The wing is divided into a minimum amount of subareas according to the leading and trailing edge control surfaces. In a second step further spanwise subdivisions are added. ### Parameters - **aircraft** (obj) - Required - aircraft object ### Returns None ``` -------------------------------- ### Set chordwise panels for control surface Source: https://pytornado.readthedocs.io/en/latest/user_guide/input_file_aircraft.html The panels setting allows manual configuration of the number of chordwise panels for a control surface. ```json "panels": { "num_c": 5 } ``` -------------------------------- ### Plot sub-keyword format in settings file Source: https://pytornado.readthedocs.io/en/latest/user_guide/input_file_settings.html The format for plot sub-keywords in the settings file. Each sub-keyword includes an opt list of optional settings, and show and save booleans to display or save the plot. ```json "sub-key-name": { "opt": ["some_optional_setting", "another_optional_setting"], "show": true, "save": false }, ``` -------------------------------- ### pytornado.fileio.native.aircraft.load Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.fileio.native.html Reads an aircraft model from a PyTornado aircraft definition file. It searches for the file 'aircraft.*' in the 'aircraft' folder of the working directory. ```APIDOC ## load ### Description Read aircraft model from PyTornado aircraft definition file. Searches for file 'aircraft.*' in the 'aircraft' folder of the WKDIR. ### Method Function ### Signature `pytornado.fileio.native.aircraft.load(settings)` ### Parameters - **settings** (object) - Required - Data structure for execution settings. ### Returns - **aircraft** (object) - Data structure for aircraft model. ``` -------------------------------- ### Define wing control surfaces list Source: https://pytornado.readthedocs.io/en/latest/user_guide/input_file_aircraft.html The controls keyword is followed by a list of control surface objects. ```json "controls": [ { << description of wing control object 1 >> }, { << description of wing control object 2 >> } ] ``` -------------------------------- ### Using __CPACS keyword for state in settings file Source: https://pytornado.readthedocs.io/en/latest/user_guide/input_file_settings.html To load and evaluate a CPACS aero-performance map, the state field must be set to the special keyword __CPACS. The aircraft must also be provided in CPACS format. ```json "state": "__CPACS", ``` -------------------------------- ### plot2d3d(aircraft, plot_name, plot_settings) Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.plot.html Context manager for 2D and 3D plots. ```APIDOC ## plot2d3d(aircraft, plot_name, plot_settings) ### Description Context manager for 2D and 3D plots. Yields a tuple with (figure_2d, axes_2d, figure_3d, axes_3d). ### Parameters - **aircraft** (Aircraft model) - Required - Aircraft model - **plot_name** (str) - Required - Name if file is to be saved - **plot_settings** (dict) - Required - Dictionary with plot settings ### Yields - A tuple with (figure_2d, axes_2d, figure_3d, axes_3d) ### Note - 'plot_name' is used to generate a file name if plots are to be saved. A suffix '2D' or '3D' is added to 'plot_name'. ``` -------------------------------- ### Wing.check_deformation_continuity() Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.objects.html Method to check the continuity of the wing deformation. ```APIDOC ## Wing.check_deformation_continuity() n ### Description Check the continuity of the wing deformation. The deformation at the border of two neighbouring segments must be the same. Otherwise, there will be 'gaps' in the wing which we will refuse to model. ``` -------------------------------- ### mirror_vertices(vertices, plane) Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.objects.html Mirrors vertices and keep vertex points consistently ordered. This is a wrapper combining the mirroring and ordering. ```APIDOC ## mirror_vertices(vertices, plane) ### Description Mirrors vertices and keep vertex points consistently ordered. This is a wrapper combining the mirroring and ordering. ### Parameters - **vertices** (tuple) - Required - Vertices like (a, b, c, d) - **plane** (str) - Required - Plane ('xy', 'xz' or 'yz') ### Returns - **ordered_vertices** (tuple) - Ordered vertices ``` -------------------------------- ### add_subdivision_for_control(eta_a, eta_b, parent_control, xsi1, xsi2, xsi_h1=None, xsi_h2=None) Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.objects.html Adds a subdivision with a control device for a specified range. Returns a list of subdivision objects. ```APIDOC ## add_subdivision_for_control(eta_a, eta_b, parent_control, xsi1, xsi2, xsi_h1=None, xsi_h2=None) ### Description Adds a subdivision with a control device for a specified range. ### Parameters - **eta_a** (float) - Required - Inner eta position of control surface - **eta_b** (float) - Required - Outer eta position of control surface - **parent_control** (obj) - Required - Reference to the parent control surface - **xsi1** (float) - Required - Inner xsi position of control surface - **xsi2** (float) - Required - Outer xsi position of control surface - **xsi_h1** (float) - Optional - Inner position of the hinge line (defaults to xsi1 if not specified) - **xsi_h2** (float) - Optional - Outer position of the hinge line (defaults to xsi2 if not specified) ### Returns - **sd_list** (obj-list) - List of subdivision objects ``` -------------------------------- ### Wing.add_control(control_uid) Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.objects.html Method to add a new control surface to the wing. ```APIDOC ## Wing.add_control(control_uid) ### Description Add a new control surface. ### Parameters - **control_uid** (string) - Control identifier. ### Returns - **control** (obj) - New segment object. ``` -------------------------------- ### generate() Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.objects.html Computes wing segment vertices and geometry from provided data. The procedure checks if properties are correctly defined, checks if the definition is complete, and generates vertices and geometry if possible. ```APIDOC ## generate() ### Description Computes wing segment vertices and geometry from provided data. The procedure is as follows: - Check if wing segment properties are correctly defined - Check if wing segment definition is complete - Generate wing segment vertices, geometry if possible ### Notes - Points are computed from geometric properties specified in geometry - At least one of A, B, C, D must be defined as reference point - Will compute corresponding properties in GEOMETRY given points A, D - Will compute corresponding properties in GEOMETRY given points B, C - Will compute all properties in GEOMETRY given points A, B, C, D - No other combination of properties and coordinates is accepted - Correct ordering of the vertices A, B, C, D is enforced: - A = (x_min, y_min, z_a) or A = (x_min, y_a, z_min) if vertical - B = (x_min, y_max, z_b) or B = (x_min, y_a, z_max) if vertical - C = (x_max, y_max, z_c) or C = (x_max, y_a, z_max) if vertical - D = (x_max, y_min, z_d) or D = (x_max, y_a, z_min) if vertical ``` -------------------------------- ### Settings.update_from_dict Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.objects.html Method to update settings from dictionary structures. ```APIDOC ## Method: Settings.update_from_dict ### Description Updates settings from dictionary structures. ### Method Method ### Endpoint pytornado.objects.settings.Settings.update_from_dict(settings_dict) ### Parameters #### Path Parameters - **settings_dict** (dict) - Required - Dictionary with general settings and plot settings ### Response No return value ``` -------------------------------- ### Include NumPy header Source: https://pytornado.readthedocs.io/en/latest/dev_doc/c_api.html Required header inclusion and macro definition for accessing the NumPy C API. ```cpp #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION #include ``` -------------------------------- ### check_panels() Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.objects.html Checks the type and value of properties in WINGSEGMENT.PANELS. ```APIDOC ## check_panels() ### Description Checks the type and value of properties in WINGSEGMENT.PANELS. ``` -------------------------------- ### Wing.span Source: https://pytornado.readthedocs.io/en/latest/dev_doc/pytornado.objects.html Property returning the wing span. ```APIDOC ## Wing.span ### Description Return the wing span. ```