$Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/TODO,v 1.159 2017/01/12 14:40:30 masarati Exp $

MBDyn (C) is a multibody analysis code.
http://www.mbdyn.org

Copyright (C) 1996-2017

Pierangelo Masarati     <masarati@aero.polimi.it>
Paolo Mantegazza        <mantegazza@aero.polimi.it>


################################################################
#                                                              #
#  See <https://www.mbdyn.org/?Developers_corner___TODO_list>  #
#                                                              #
################################################################



A. Configuration:

	- test for '_' appended to F77 symbols (recent autoconf does that)
	- audit all the suite for not-so-GNU systems
	- add check for make



B. Package:

	- add a comprehensive test suite
	- make more compliant to GNU style



C. Libraries:

	- make the libraries installable
	- abstract libraries in a rational manner, to reduce/eliminate
	  cross-dependencies



D. Code:

	Large Projects:
	- implement binary, or hard, restart
	- add MATLAB/Octave/Scilab and Simulink/Scicos hooks.
		Large project: turn mbdyn into a module for Simulink/Scicos
		(see contrib/SimulinkInterface/; need an implicit extension).
	- remove node/element type listing from "control data" block;
	  use STL containers to keep track of model components
	  (partially DONE for elements & nodes)
	- implement contacts with non-flat surfaces
	- implement "smart" structural nodes, so that static/dynamic
		is detected
	- implement optional binary/ascii output (use NetCDF; partially DONE)
	- abstract NetCDF use for aggregate data (e.g. Vec3)
	- add relative reference frame overall dynamics
		- rigid body (DONE)
		- modal element
		- air properties (DONE)
		- gravity (?)
	- add absolute/relative reference frame dynamics interface
	- generalize inflow models for fixed wing lifting surfaces
	  (partially DONE)

	Medium Projects:
	- recover existing soft restart (Michele Attolico worked at it)
	- add MATLAB hooks
	- add Octave hooks
	- add Scilab hooks
	- add Simulink hooks (DONE by Michele Attolico:
		see contrib/SimulinkInterface).
	- add Scicos hooks (partially DONE by Tommaso Solcia:
		see contrib/ScicosInterface).
	- add a "shell" element that executes external programs,
	  and allow exploitation for entities like elements, drives,
	  constitutive laws and so
	- develop a trim control as external command that drives simulations.
	- improve friction and add it to all joints (Marco Morandini is
		working at it; suggestion: try a transition force from stick
		to slip that is higher than slip force)
	- review output to allow selective ascii/binary output (see NetCDF)
	- replace MyLList and LLStack with STL containers (DONE)
	- add friction to contacts
	- rework modal element to be static/dynamic (DONE)
	- rework modal element to use momentum and momenta moment instead
		of linear and angular velocities (so the "modal" node
		is no longer required)
	- rework revolute joints to allow normal force to be computed
		as a combination of constraint reactions (constraint location)
	- implement modal element binary data using netcdf:
		.fem:
			femgen > ascii
			femgen > netcdf
			mbdyn < ascii > netcdf
		.mod:
			mbdyn > ascii
			mbdyn > netcdf (in global output database)
	- add aerodynamic elements Jacobian matrix contribution
	  (DONE by Alessandro Fumagalli and Mattia Mattaboni)
	- add sparse eigenvalue extraction (DONE, using ARPACK)
	- add center of mass computation (DONE)/constraint
	- add matrix scaling (partially DONE; needs test)

	Small Projects:
	- add MATLAB/Octave and Simulink hooks.
		``shell'' element, drive and so that executes unix commands 
		including scripts, significantly matlab scripts. (see module-octave)
	- move critical Reynolds numbers from constants to fluid properties
		with pressure/temperature dependencies.
	- add Reynolds dependence to AeroData
	- improve symbolic constitutive law (based on GiNaC)
	- move exception handling towards <stdexcept> (DONE otherwise)
	- review/improve user-configurable statistics output (partially DONE;
		see "output:" statement in integrator data block)
	- add Matlab-compatible sparse matrix generation for sparse
		matrix eigenvalue analysis (eigs; DONE)
	- add selected output streamed on sockets for interactive analysis
		by implementing sort of "sensors", possibly based on the
		elements' "private data" (DONE: Michele Attolico worked at it;
		see "output elements" and RTAI-related features; DONE)
	- add rot2any/any2rot utilities
	- try to rewrite hydraulic nodes as scalar differential (?)
	- add joints like:
		- 2-node clamp (spherical + prismatic; DONE: total)
		- universal without displacement constraints (DONE)
		- inplane and inline between a node and the ground
		  (DONE: total pin joint)
	- allow to define modules as separate entities which are later
		referred to by labels, like c81 data or hydraulic fluids.
		(this is no longer required, since using ltdl one can set
		the module path and then use the file name as a label;
		the underlying library will open modules exactly once
		despite they're loaded many times; however, this would
		allow to use statically linked modules as loadable
		elements) (DONE)
	- link to Taucs sparse solver: http://www.tau.ac.il/~stoledo/taucs
		(Marco Morandini is working at it)
	- add aircraft instruments as sensors (e.g. writing measures
		to parameter nodes; refer to
		http://www.allstar.fiu.edu/aero/FlightIns.htm ):
		- airspeed indicator		(V-Vinf).Norm()
		- ground speed indicator	((I-e3.Tens(e3))*V).Norm()
		- altimeter			e3.Dot(X)
		- attitude indicator (pitch and bank)	*
		- turn and slip indicator		+
		- vertical speed indicator	e3.Dot(V-Vinf)
		- angle of attack indicator	v=R.Transpose()*(V-Vinf);
						atan2(v(3),v(1))

		*:	pitch=atan2(e1(3),e1(1));
			bank=atan2(e2(3),e2(2));
		+:	turn=Omega(3);
			slip=?
		(partially DONE: the "aircraft instruments" element provides
		measures as private data, and as output to .aer files).
	- allow the FEM data filename as command-line arg in utils/femgen
	- add orthogonality test when reading orientation matrix
	- append constitutive law output, if any, to elements' output
	  (DONE infrastructure, shock absorber and rods)
	- merge tool to generate ADAMS/View .cmd models from raw output
		(Gian Luca Ghiringhelli is working at it; OBSOLETE)
	- add piecewise linear or other simple generic elastic constitutive
		laws (DONE: scalar function-based CL)
	- allow runtime load of constitutive laws (DONE)
	- allow runtime load of drive callers (DONE)
	- generate a binary form of the .fem data for the modal element
		that can be loaded instead of the text version according
		to time stamps, to speed-up large models input (DONE)
	- add an optional configuration-dependent constitutive law
	  to the unconstrained displacements/rotations of selected joints:
	  - the revolute family
	  - ...
	- add function max(), min() to math parser (DONE)
	- implement an output trigger (replaces output frequency; DONE)
	- modal element:
	  - add singularity checks (warn if modal k is singular; ???)
	  - add consistency checks of modal mass matrices (m = X^T*M*X; DONE)
	- modal interface node: accelerations can be recovered
	  for use in loose connections; design and implement a solution (DONE)
	- turn the modal joint into sets of elements:
		- modal database: FEM model; split const from local data;
		  const in database, local in modal joint; avoid copying memory;
		  for example, 
			Mat3xN *pOffsetFEMNodes --> std::vector<Vec3> (same as d1rig?)
		        Mat3xN *pOffsetMBNodes --> std::vector<Vec3> (same as d2?)
		        Mat3xN *pRotMBNodes --> std::vector<Mat3x3> (not used???)
		- modal dynamics as a "deformable body"
		- modal clamp constraint (as now, but separate from dynamics)
		- total modal joint (Was: specialized modal constraints,
		  as opposed to clamping a node with the clamp constraint
		  plus a regular joint)
		- modal force (DONE)
	  this allows to add arbitrary elements connected to the modal element
	- use getopt(3) in utils/*
	- add package-wide support for WinSocks in communication entities,
	  including SimulinkInterface and ScicosInterface (using MSYS/MinGW)
	- add pseudo-realtime support based on nanosleep(2) (DONE)
	- add RTAI-based motion output (DONE)
	- use 3D (or 6D) templates for force and couple elements, preserving
	  backward compatibility of the input as much as possible (DONE, 3D)
	- add modal constraint: framework for generic constraints among
	  modal variables; constraint that imposes the value of modal vars
	- add "static" modal element (no dynamics equations)
	- allow deformable hinge to have optional (useless) "position" spec
	- output of incremental Euler vector (?)
	- check computed inertia with that from block 12 in modal joint (DONE)
	- add linear time variant constitutive law (DONE)
	- add elastic and viscous variants of linear time variant const law
	- add record for damping matrix to modal input format (DONE, RECORD 13)
	- define a UserDefinedElem class; inherit LoadableElem from it;
	  allow UserDefined elements to be loaded run-time
	  (obsoletes LoadableElem; UserDefinedElem, DONE)
	- write macros to add items for mbdyn2easyanim (DONE)
	- let symbolic constitutive law optionally know about "Time" & so
	- allow math parser to generate expression tree (bison, ...)
	- replace math parser symbol table with STL container (DONE)
	- allow to switch on/off iteration, residual, ... output with meter
	- NetCDF output of aerodynamic elements (DONE)
	- eigenanalysis at different time steps, with output on separate files (DONE)
	- merge c81 data: interpolate data sets w/ same AoA/Mach resol. (DONE)
	- allow multiple/interpolated c81 data in Theodorsen correction (DONE)
	- allow configurable float, int, bool (string?) & hton in stream I/O
	- allow to specify parameters independently for each eigenanalysis
	- implement incremental load element inspired by Riks' method
	  (DONE, module-loadinc)
	- implement coaxial rotor inflow model (which?)
	- implement constitutive law wrapper that combines (adds) constitutive laws (DONE)
	- allow strain sign in hunt-crossley module (DONE; in all constitutive laws?)
	- implement bistop constitutive law as a wrapper (DONE)
	- exponential viscoelastic const law 1D
	- wrapper for axial const laws (DONE)



E. Bugs/missing features:

	- fix deadlock when string drive callers are nested (DONE)
	- check for nested /* */ comments in parsers (DONE)
	- eliminate nasty dependence from f2c typedef's (doublereal and so)
	- review deformable viscous/viscoelastic hinge according to the elastic one (DONE)
	- check "universal pin"
	- fix etc/modal.d/MBDyn_NASTRAN_alter_[1-2].nas;
          allow the use of node sets to reduce the amount of FEM nodes 
	  that are passed to the model element (e.g. no nodes without
	  inertia that do not participate in the interface)
	- clarify how to increase the size of models utils/femgen can handle
	  (change parameter(maxnod=20000,maxmod=1000) accordingly?)
	- introduce references for hints (?)
	- allow strings as mode names in modal elements (joint, force, ...)
	- add SetInitialValue to modal element
	- allow to override initial modal value and derivative in .fem (DONE)
	- check initial assembly of joints in slidercrank_r example
	- export private data from dummy structural nodes (DONE)
	- allow 0 modes in modal element (nearly useless except for testing)
	- UseSocket without host listens only on localhost (BY DESIGN)
	- external modal force needs work in "loose" coupling (FIXED)
	- allow preamble in communications with pairs {string,value}
	- rework rejected modes handling in modal joint
	- check initial assembly of "distance" when nodes velocity is not null
	- check & fix NetCDF library detection
	- allow re-orientation of FEM reference system in modal node
	- allow offset & re-orientation of exported motion in external structural [mapping]
	- send "delta" instead of position in external structural [mapping]
	- add "output" flag to .out (DONE)
	- support float instead of double in NetCDF output
	- support "med" in output
	- reject "mt" from naive when configured without support
	- allow "mt" from command-line (DONE; "-N" switch)
	- allow make of mod-* and moddae-* modules
	- implement referenceable template drive callers (much like regular drive callers) (DONE)
	- implement support for pardiso linear solver when compiled with icc (need icc...)
	- check "new" distance joint
	- take care of nodes with output "off" in mbdyn2easyanim.sh
	- allow "relative" node view in EasyAnim
	- fix "use binary" in modal joint (DONE)
	- string drive caller: "<stmt1> <stmt2>" is accepted; <stmt2> is used (DONE)
	- GetPosAbs/GetRotAbs dependent on other (pos, rot, ...) (use Get.*Rel(AbsRefFrame, ...) instead)
	- print name of entities when present (DONE)
	- call nodes/elements in the order of definition (DONE)
	- modal joint: binary file written in input order, but parsed in block ascending order (DONE)
	- module-loadinc: improve initialization and handling of driven load increment element
	- math parser: handle uninitialized values (DONE?)
	- handle .rfm files in mbdyn2easyanim
	- use "dot" to generate model graph (DONE, in module-dot)
	- add capability to run-time load a generic (context-dependent?) "description" (DONE; context-dependent TODO)
	- add namespace-specific symbol tables (DONE)
	- add capability to register namespaces (DONE, in module-namespace)
	- add stream drives capable to read from configurable type channels (DONE; test)
	- add stream output elements capable to write to configurable type channels (DONE; test)



F. Documentation:

	- document the utilities in a separate man page (utils & scripts)
	- update and audit the input manual (partially DONE)
	- document output (partially DONE)
	- document element private data names (partially DONE)
	- document piezo beam (DONE)
	- tutorial for piezo beam (DONE)
	- clarify (with demos) the functionality of the modal element (DONE)
	- document electric elements and sensors (DONE)
	- document additional output of rotations (DONE)

