Home News Downloads Docs
Home Introduction Getting Started Examples
Contact Publications

24 April 2019

New section: C++ Examples

A new section C++ Examples has been added to the documentation. It contains re-implementation of Python tutorials in C++.

1 April 2019

New section: OpenCS Examples

A new section OpenCS Examples has been added to the documentation. It contains re-implementation of C++ ODE and DAE problems in Python.

1 April 2019

DAE Tools 1.9.0 released

The new version brings an improved support for the OpenCS framework, OpenCS Python wrappers (pyOpenCS module), reduced memory requirements, new OpenCS code generator and single step integration mode.

Changelog:

- Dimensionless quantity objects now use a global dimensionless unit object.
  This saves a lot of memory (500 MB out of 2-3GB in some cases).
- Finite Element models clear the unused memory saving a lot of memory.
- adNode classes can optionally use boost memory pools for allocation of setup and runtime nodes.  
  The most often used node types (in particular for FE models) are:
  Constants, Unary and Binary operators/functions and FloatCoefficientVariableSum.
  This is controlled in daetools.cfg:
   - nodes.useNodeMemoryPools: if true switches on pool usage
   - nodes.deleteNodesThreshold: the number of equations when the setup and runtime nodes 
     deallocated and the memory freed
- Added python wrappers (pyOpenCS) for OpenCS. The following classes are supported:
   - Abstract csLog_t, csDataReporter_t and csGraphPartitioner_t classes and their
     StdOut/TextFile, CSV/HDF5 and Simple/Metis/2D_Npde implementations
   - csNumber_t, csModel_t and csModelBuilder_t classes
   - csSimulate functions
- Added a replacement for daeCodeGenerator_MPI - daeCodeGenerator_OpenCS which uses
  pyOpenCS python module and a new csNode_wrapper class to handle daetools equations
  without duplicating the memory for csNodes. It supports all daetools features except:
   - Discontinuous equations (STNs and IFs)
   - External functions
   - Thermo-physical property packages
- Compute Stack Machine for evaluation of equation uses the evaluate funcion that
  works on the plain real_t (not adouble_t) avoiding caculation of derivatives 
  when they are not required. 
- Re-implemented ODE 1-3 and DAE 1-3 examples in python and added a new section to 
  DAE Tools tutorials: OpenCS Examples.
- New data reporter: daePickleDataReporter which saves the results as the Python pickle 
  file which can be opened in DAE Plotter or unpickled directly from Python.
- Added new integration mode: OneStep, new function daeSimulation.IntegrateForOneStep and
  new options in daetools.cfg to control the integration mode:
   - integrationMode - "Normal" or "OneStep"
   - reportDataInOneStepMode - if true and integrationMode is OneStep the data will be 
     reported after every time step (not only at the specified reporting intervals).
  Updated tutorial 7 to introduce the new IntegrateForOneStep function.
                    

1 April 2019

OpenCS 1.1.0 released

The major revision of the OpenCS framework. Improved Compute Stack Machine implementation and OpenCS API, added logging and data reporting interfaces, added OpenCS Python wrappers (pyOpenCS; part of DAE Tools), Python examples, and a single csSimulator binary for both ODE and DAE systems. Compute Stack models can be loaded from a directory or directly from the existing objects resulting from the partitioning algorithm, and improved error handling.

Changelog:

The major revision of OpenCS:
- Compute Stack Machine for evaluation of equation uses the evaluate funcion that
  works on the plain real_t (not adouble_t) avoiding caculation of derivatives 
  when they are not required. 
- Added csSimulationOptions class based on RapidJSON for setting options in the user code.
- csModelBuilder_t::GetSimulationOptions returns default options from:
   - default_simulation_options-dae.json (for DAE systems)
   - default_simulation_options-ode.json (for ODE systems).
- Added csLog_t interface and StdOut and TextFile implementations.
- Added csDataReporter_t interface and CSV and HDF5 implementations.
- Added create_ functions for all existing log, data_reporter, graph partitioner and 
  evaluator implementations.
- Added python wrappers (pyOpenCS) as a part of DAE Tools.
- csSimulator_ODE and csSimulator_DAE binaries replaced with a single csSimulator binary
  which starts a simulation based on the model type (ODE or DAE).
- csSimulate function can initialise MPI if requested. This is useful for python extension 
  modules on GNU/Linux where Python uses dlopen with RTLD_LAZY flag and the symbols are not
  resolved after loading a shared library.
- Simulation now uses shared_ptr, shared_ptr, 
  shared_ptr and shared_ptr instances
  to prevent problems with the NULL pointers if an exception has been thrown
  and the destructors are called for not completely initialised objects.
- csNode_t now accepts csModelBuilder_t pointer as an argument and saves
  equations with the actual variable/dof names and not the generic names: xt, x and y.
- csSimulate_ODE and csSimulate_DAE functions replaced with a single csSimulate function
  which starts a simulation based on the model type (ODE or DAE).
- csSimulate functions accept csLog_t and csLog_t user-defined objects.
- csSimulate functions can optionally initialise MPI (used mostly by python wrappers 
  due to the problems with calling extension modules that use MPI).
- Re-implemented ODE 1-3 and DAE 1-3 examples in python (part of DAE Tools tutorials).
- If reportingInterval = 0.0 the simulation is run and data reported at t=0 and t=end.
  If reportingInterval < 0.0 the simulation is performed normally but the data are not reported.
- OutputDirectory can be:
   - Empty string (the default results is used and the current date and time appended)
   - Relative path (the data are stored in the inputFilesDirectory/OutputDirectory)
   - Absolute path (the data are stored in the specified directory).
- csDifferentialEquationModel_t is not derived from csModel_t anymore.
  Now composition is used instead: added a new public data member: csModelPtr csModel.
  Implemented the csDifferentialEquationModel_t::Load(rank, csModelPtr) overload which
  does not create a new csModel_t but (re-)uses the model specified as an argument.
  Now, Differential Equation Models can be loaded from a directory or from an existing csModel_t,
  and the same csModel_t can be used by several Differential Equation Models objects.
- Added fuction csDifferentialEquationModel_t::GetModel which returns csModel smart pointer. 
- Removed argument csEvaluator from csDifferentialEquationModel_t::Load functions
- Added function csDifferentialEquationModel_t::SetComputeStackEvaluator.
- csModelStructure_t has a bool isODESystem data member (set by the Model Builder).
- Added csModelBuilder_t::SetDegreeOfFreedomNames function. DOF names are also
  added to csModel_t and now are saved into the model_structure-pe.csdata file.
- Improved exception handling.
                    

22 August 2018

DAE Tools 1.8.1 released

The new version brings the support for Open Compute Stack (OpenCS) framework and fully working iterative linear solvers (Sundials and Trilinos AztecOO GMRES).

Changelog:

- Open Compute Stack (OpenCS) framework:
   - Libraries:
      - OpenCS_Models
      - OpenCS_Evaluators
      - OpenCS_Simulators
   - Concepts:
      - Compute Stack (header-only C99: a postfix notation expression stack)
      - Compute Stack Machine (header-only C99: a stack machine for evaluation of a single equation)
      - Compute Stack Evaluator (C++: an interface for parallel evaluation of systems of equations)
      - Compute Stack Model (C++: model specification data structures)
      - Compute Stack Differential Equations Model (C++: an interface providing API for ODE/DAE solvers)
      - Compute Stack Simulator (csSimulator_ODE and csSimulator_DAE generic seqential/parallel simulators 
                                 based on the Compute Stack interface)
      - Model Builder: a class for creation of ODE/DAE Compute Stack models, including the
                       partitioning algorithm (re-implemented in C++) and export of input files with 
                       the model specification for sequential/parallel ODE/DAE simulations: 
		 - model_structure-[pe].bin: model variables data
		 - model_equations-[pe].bin: compute stacks and active equation set indexes
		 - sparsity_pattern-[pe].bin: the sparsity pattern (for evaluation of derivatives)
		 - partition_data-[pe].bin: inter-process communication data
		 - solver_options.json: simulation, model, ODE/DAE and linear solver options
        All input files contain a header with two int32_t items: fileType and OpenCS version
   - Examples:
      - ODE problems:
         1. The Roberts chemical kinetics problem with 3 rate equations (cvsRoberts_dns example from CVodes)
         2. Simple advection-diffusion in 2D (cvsAdvDiff_bnd example from CVodes)
         3. 2-species diurnal kinetics advection-diffusion PDE system in 2D (cvsDiurnal_kry example from CVodes)
      - DAE problems:
         1. The chemical kinetics problem with 6 non-linear diff. equations (idasAkzoNob_dns example from IDAS)
         2. A simple heat conduction problem in 2D (tutorial1 from DAE Tools)
         3. A chemically reacting system known as Brusselator PDE (idasBruss_kry_bbd_p example from IDAS)
  CMake-based compilation.
  All daetools modules now use the functionality from OpenCS (compute_stack.h is removed, OpenCS/cs_machine.h is used now). 
  Evaluator_OpenCL library removed (not required anymore) while pyEvaluator_OpenCL links to libOpenCS_Evaluators.
- Changes in the MPI code generator
  - Fixed bugs:
    - Vertex weights were in a wrong format (should be flat vweights[Nvariables, Ncnstraints] array)
    - The argument recursive is set to True
  - It generates input files for compute stack simulators:
    In addition, it produces:
     - sparsity_pattern-pe.png
     - partition_graph.png
     - partition_stats.tex and partition_stats.csv (statistcs of the partition results)
   The Partition algorithm (using METIS) performs edge-cut minimisation and takes into account 
   four additional balancing constrains:
   - Ncs: number of Compute Stack items
   - Nflops: number of FLOPS for evaluation of residuals
   - Nnz: number of non-zero items in the incidence matrix
   - Nflops_j: number of FLOPS for evaluation of the Jacobian matrix

Simulation statistics:
- Added detailed statistics and timings/counts for:
  - Simulation (Initialization, SolveInitial, Integrate)
  - DAE solver (LASetup, LASolve, Residuals, Jacobian, SensitivityResiduals, Roots, 
    PreconditionerSetup, PreconditionerSolve, JacobianVectorMultiply)
  - NL solver (N iterations, error test fails)
  - LA solver (Create, Reinitialize, Setup, Solve, Jacobian)
  - Preconditioner (Create, Reinitialize, Setup, Solve, Jacobian, JacobianVectorMultiply)
- Added new function daeSimulation::PrintStats
- Added namespace call_stats with two classes TimeAndCount and TimerCounter.
  They are used to count the number of calls and the duration of specified
  functions or blocks of code.
- Added new function GetCallStats to daeSimulation_t, daeBlock_t, daeDAESolver_t,
  daeLASolver_t, daePrecondiitoner_t and adComputeStackEvaluator_t classes that returns
  a dictionary with the calls stats: std::map.
- GetTimeInSeconds now uses OpenMP function omp_get_wtime 
  (the old could not measure time in functions that use OpenMP functions)

Linear solver and preconditioners:
- daeIDASolver.SetLASolver now accepts the solver type and the preconditioner 
  (if Sundials gmres is used)
- New classes: 
   - daePreconditioner_t abstract base class for Sundials gmres preconditioners
   - daePreconditioner_Ifpack
   - daePreconditioner_ML 
- daetools.cfg: 
   - New section daetools.IDAS.gmres with the options for Sundials gmres linear solver
   - New option daetools.activity.printStats
- Removed daeIDALASolver_t abstract class (not required anymore).
  All functions modified to use daeLASolver_t abstract class.
- Trilinos solvers have only one attribute ParameterList 
  (separate lists for individual solvers/preconditioners are removed).
  Only ML complains about options from AztecOO solver; can be suppressed 
  by setting "ML validate parameter list" parameter to false.
- All solvers/preconditioners have functions for getting/setting solver options.
  daeLASolver_t and daePreconditioner_t abstract classes now have functions:
   GetOption_string, GetOption_bool, GetOption_int, GetOption_float,
   SetOption_string, SetOption_bool, SetOption_int, SetOption_float.
  Currently they only work in Trilinos solvers and preconditioners.
- Fixed bugs in Trilinnos_AztecOO solver (preconditioner re-compute after change in Jacobian matrix).
  Known issues:
   - Somewhat lower performance of AztecOO with native preconditioners
     (preconditioner is first destroyed and then regenerated)
- Linear solvers do not depend on IDA library and all functions (such as la_init, ..., la_free)
  moved to daeIDASolver. Changed the interface of daeIDALASolver_t (everything is in the base class).

Changes in the core detools functionality (for OpenCS support):
- New functions:
   - adNode::EstimateComputeStackFlops, adNode::GetNodeCount and adNode::SizeOf
   - daeEquationExecutionInfo::GetComputeStackInfo, daeEquationExecutionInfo::GetDiffVariableIndexes
   - daeBlock::ExportComputeStackStructs, daeBlock::GetActiveEquationSetMemory, 
     daeBlock::GetActiveEquationSetNodeCount, daeBlock::ExportComputeStackStructs
   - daeSimulation::ExportComputeStackStructs
- New classes:
   - daeBlockOfEquations_t for decoupling the DAE solver from daetools
                    

22 August 2018

OpenCS 1.0.0 released

The first release of the Open Compute Stack (OpenCS).
OpenCS is a framework for modelling of large scale ODE/DAE systems, parallel evaluation of model equations and parallel simulations on shared and distributed memory systems.

20 March 2018

DAE Tools 1.8.0 released

The new version brings improved parallelisation capabilities.
Model equations can be transformed into the postfix notation expression stacks and evaluated using:
(a) OpenMP (on general purpose processors), and
(b) OpenCL (on streaming processors and heterogeneous systems).
The new evaluation approach is in some cases up to one order of magnitude faster.

Changelog:

  • Implemented a new approach to parallel evaluation of model equations (the Compute Stacks).
    • Added Evaluator_OpenCL library and pyEvaluator_OpenCL (as external modules) and a new project to compile.sh script: evaluator_opencl
    • Added daeSimulation.SetComputeStackEvaluator function
    • Added AvailableOpenCLPlatforms and AvailableOpenCLDevices functions to pyEvaluator_OpenCL. They return platform/device IDs used to instantiate daeComputeStackEvaluator_OpenCL objects.
    • Added daeComputeStackEvaluator_OpenCL class (OpenCL implementation for single devices), daeComputeStackEvaluator_OpenCL_multi class (for multiple devices - heterogeneous computing) which requires specification of the percentages of the total work to be performed by each device.
    • Added new option evaluationMode to daetools.cfg config file (can be one of: evaluationTree_OpenMP and computeStack_OpenMP)
    • Added tutorial21.py
    • Changed a way of storing values of degrees of freedom in data proxy and a way of creating and storing the currently active set of equations (to support OpenCL kernels).
  • Fixed bug in setting the number of threads for superlu_mt and intel_pardiso solvers.
    Added new options to deatools.cfg: superlu_mt.numThreads and intel_pardiso.numThreads.
  • Implemented Sundials IDA way of imposing constraints on variables (<=0, <0, >=0 and >0).
    Constraints can be set in daeVariableType constructor (valueConstraint argument) and changed for individual variables using daeVariable.SetValueConstraint functions. Added tutorial 20 with two numerical examples.
  • Updated User Guide.

24 October 2017

DAE Tools 1.7.3 released

The new version brings DAE Tools web services with RESTful API (ordinary simulations and FMI for co-simulation objects), updates to model reports, root functions handling, HR upwind scheme for the reversed flow, and a number of other small fixes and updates.

Changelog:

  • Added daetools REST web service implemented in python (daetools_ws.py). It provides loading and running of daetools simulations using the RESTful API. daetools_ws_test.html provides a test page that can load, simulate and plot the results from tutorials. It accesses the web service using the javascript classes from daetools_ws.js. Plotly library is used for plotting of results.
  • Added FMI REST web service implemented in python (daetools_fmi_ws.py). It provides loading and running of daetools FMU objects using the RESTful API. daetools_fmi_ws_test.html provides a test page that can load, simulate and plot the results from .fmu files exported by daetools. It accesses the web service using the javascript classes from daetools_fmi_ws.js. Plotly is used for plotting of results.
  • Added fmi_ws project (fmi REST web service client). It produces cdaeFMU_CS_WS shared library that can be packed into a .fmu file to load and execute FMI simulations. It can automatically start the local daetools FMI web service using the boost::process:spawn function. It uses the statically compiled boost libarary that can be compiled using sh compile_libraries.sh boost_static (python independent).
  • Web services return 200 (OK), 400 (bad request - it's client error) and 500 (internal server error) status codes.
  • Updated saving of model and runtime model reports (only Latex, no MathML).
  • Updated xsl files for transformation of model reports into the html. Now dae-tools.xsl and dae-tools-rt.xsl use w3.css to layout the reports.
  • Updated xsl transformation of modelDescription.xml files in exported .fmu files. It also uses w3.css to layout the report.
  • Added reversed flow mode to high-resolution upwind scheme. Added tutorial_cv_11.py for testing of the reversed flow (the same problem as in tutorial_cv_6.py).
  • Boost updated to 1.65.1 (boost::process library available only in 1.64+). Bonmin updated to 1.8.6 (in Windows as well).
  • Names can contain characters: '\', '{' and '}' (for convenient display of parameters' and variables' names in Latex equations).
  • TCP/IP data reporter can automatically start DAE Plotter application using the boost::process:spawn function.
  • Updated discontinuity handling (root functions) in IF and STN block conditions.
  • Fixed bug in daeIDASolver::GetSensitivities after calling to Reset function.
  • Fixed bug when daetools.core.printInfo flag is turned on (causing the seg. faults).
  • DAE Examples now use the online docs.
  • First few basic tutorials report time derivatives. All opt_tutorials report sensitivites.
  • Updated IntelPardiso LA solver (proper handling of number of threads). By the default it does not set anything. The number of threads can be set using MKL_NUM_THREADS or OMP_NUM_THREADS environment variables.
  • Two new scalar extenal function classes:
    • daeLinearInterpolationFunction: c++ implementation of the linear interpolation external function.
    • daeCTypesExternalFunction: uses functions in external libraries loaded by python ctypes.
  • The usage of the new classes added to the tutorial14.py.
  • TCP/IP data reporter automatically starts DAE Plotter application only if it can't connect.
  • Updated user guide.

12 September 2017

DAE Tools 1.7.2 updates

Changelog:

  • DAE Tools Windows 64 bit is available (downloads).
  • Updated FMI code generator. Exported FMU files now contain win64 binaries Model description now contains the xslt transformation.
  • Python wrapper keep the references to the python objects so they do not get destroyed if they go out of scope in python.
  • Updated all data reporters. Now all file data reporters export Units, DomainNames, Domains, Times and Values for all variables. daeExcelFileDataReporter uses openpyxl used instead of xlwt library.
  • Intel Pardiso solver available on win32, win64 and GNU/Linux x86_64
  • Install script (setup.py) now uses setuptools (not distutils).

30 August 2017

DAE Tools 1.7.2

The new 1.7.2 version is available.

Changelog:

  • New class daeActivity with two static functions: simulate and optimize. Updated all tutorials with the new, simpler way of executing simulations.
  • Fixed FMI code generator, SimulationLoader and FMU_CS libraries:
    • FMU_CS library does not link cdaeConfig shared library anymore
    • Fixed resources['simulationFile'] value in fmi.py (it should be only the filename not the full path).
    • In Windows python/Lib and Python/DLLs directories are programmatically added to the PATH/PYTHONPATH (in the SimulationLoader library).
    • In GNU/Linux Python/lib directory needs to be manually added to the LD_LIBRARY_PATH (only for custom python installations and virtual environments; system python installations do not need this)
    • In GNU/Linux python shared library needs to be loaded using dlopen (despite it was already loaded by FMI_CS library). Otherwise the code does not work: for instance, numpy cowardly refuses to import.
    • Variables from the top-level model can be exported as 'local' or 'output' FMI variables.
    • Added function create_simulation_for_cosimulation to pyDAE/__init__.py that can be used as a default simulation instantiation/initialisation function in daetools_mex, daetools_s and daetools_fmi_cs. It accepts simulation class name and some optional arguments (i.e. relativeTolerance).
    • Additional files argument of the daeCodeGenerator_FMI.generateSimulation function is now a list of tuples: [('file_path', 'resources_dir_relative_path'), ...] i.e. in tutorial_dealii_1: [(mesh_file, 'meshes/step-49.msh')]
    • Added a new optional argument to the daeCodeGenerator_FMI.generateSimulation function: localsAsOutputs = False. If it is true, variables from the top-level model are added as output FMI variables; otherwise, they are added as local FMI variables.
    • Function daeModel::GetCoSimulationInterface now has a new argument std::vector<daeVariable_t*> ptrarrModelVariables filled with the variables from the top-level model (treated as locals in FMI).
    • Function daeModel::GetFMIInterface now also adds variables from the top-level model to the std::map<size_t, daeFMI2Object_t> map as FMI 'Local' variables.
    • Function daeSimulationLoader::GetFMIValue now also returns values for 'Local' FMI variables.
    • Fixed bug in getFolderFromURI function (handling of file:/// in Windows).
    • Added a new function: daeSimulationLoader::SetRelativeTolerance. It is used in the fmi2SetupExperiment function to handle the tolerance argument (if toleranceDefined argument is true).
    • Updated generate_fmus.py file. It generates the FMU files for selected tutorials and generates all files required for the FMI ComplianceChecker (i.e. scripts to run .fmu files with the ComplianceChecker, the reference solution from the exporting tool, the .opt options and ReadMe.txt files).
  • daetools.cfg config file is now properly located on all platforms.
  • New daeSimulation properties: StopAtModelDiscontinuity and ReportDataAroundDiscontinuities and new boolean options stopAtModelDiscontinuity and reportDataAroundDiscontinuities in daetools.activity section n daetools.cfg. The properties control the default behaviour of daeSimulation.Run function. If StopAtModelDiscontinuity=true the simulation will stop at every discontinuty. If ReportDataAroundDiscontinuities=true the data will be reported before and after the discontinuity.
  • Added a new daeCSVFileDataReporter (saves the results into a .csv file).
  • OpenMP assembly refactored into the OpenMP_WorkStream::run function.
  • Added OpenMP shared library (vcomp.dll) to the setup.py in Windows.
  • Fixed bug in daeVariable::GetType function.

17 August 2017

DAE Tools 1.7.1

The new 1.7.1 version is available.

Changelog:

  • Added a new section: Code Verification Tests (The Method of Exact Solutions and Method of Manufactured Solutions). The section contains 10 tests.
  • Added a new section: Sensitivity Analysis Examples. Sensitivity analysis can be performed using the local methods (derivative-based, using sensitivities calculated by IDAS solver) or global methods available in SALib python library: Elementary Effect (Morris) and Variance-based (FAST, Sobol).
  • The global Sensitivity Analysis methods (tutorial_sa_3.py) can use python multiprocessing module to calculate the outputs in parallel (i.e. using a pool of workers and the Pool.map function).
  • Implemented high-resolution cell-centered upwind scheme with flux limiter (daeHRUpwindScheme).
  • Equation residuals/Jacobian/sensitivity residuals can be evaluated in parallel using the OpenMP. Number of OpenMP threads (and other options) can be specified in the daetools.cfg file (section "daetools.core.equations").
  • Equations have a new boolean property: SimplifyExpressions. The default value (false) is specified in daetools.cfg file ("daetools.core.equations.simplifyExpressions").
  • eQuasySteadyState renamed to eQuasiSteadyState. eQuasiSteadyState initial condition mode applied to the simulation in the tutorial7.py
  • Finite Element systems can be assembled in parallel. There are three options: Sequential, OpenMP and TBB (deal.II WorkStream) which can be specified in the daetools.cfg file (section "daetools.deal_II.assembly"). Multithreded TBB is available only in GNU/Linux.
  • Expressions in deal.II mass/stiffness matrices and load vector are much simpler now by skipping addition of contributions that always evaluate to zero (tests performed by hasNonzeroValue() function).
  • Finite Element equations and surface/volume integrals expressions are simplified by default.
  • Significantly improved the adNode::SimplifyNode function.
  • dealiiFiniteElementDof<dim> constructor now also accepts the variable type (the default is no_t).
  • setFEInitialConditions function also accepts a callable with two arguments: variableIndex, overallIndex.
  • Two new deal.ii tutorials: 2D transient Stokes flow driven by the differences in buoyancy (tutorial_dealii_7.py) and a small parallel-plate reactor with an active surface (tutorial_dealii_8.py).
  • Updated dof_approximation, dof_gradient_approximation, vector_dof_approximation, vector_dof_gradient_approximation and dof_gradient_approximation functions. As the result, the created expressions are much simpler and require less memory and time to evaluate.
  • New FE functions: symmetric_gradient<dim>, feExpression<dim>::scalar_product and feExpression<dim>::double_contract.
  • New functions in dealiiFiniteElementSystem<dim>:
    • ClearAssembledData (clears the arrays/matrices allocated during the assembly phase)
    • GetBoundaryDOFs (returns a list of boolean flags indicating whether the specified DOF is on one of the given boundaries)
    • GetDOFSupportPoints (returns a list of Point<dim> objects for all DOFs, if there are supports points in the FiniteElement object)
  • WeakForm now accepts contributions as either a single feExpression<dim> object or or as the python list objects. The items in the list can be individual feExpression<dim> objects a tuple of feExpression<dim> objects (q_loop, i_loop, j_loop). Splitting of weak form expressions results in simpler expressions and a faster execution.
  • Added pickling/unpickling of daeDataReceiverProcess and related objects. Now the simulation data in the DAE Plotter can be saved/loaded from a file.
  • Fixed zoom problems in 2D plots.
  • Added a new type of 2D plots: variable 1 vs. variable 2.
  • Animated 2D plot can show more than one curve.
  • New property daeIDAS.IntegratorStats returns a dictionary with the stats from the solver.
  • A new class: daeNodeGaph that generates graphs based on equation expressions. The generated graphs can be saved as images.
  • Updated documentation: sensitivity analysis, numerical methods for PDE, logging, DAE solvers, LA solvers, optimisation, data reporting. deal.ii tutorials now show animated gifs with the results.
  • Fixed issue with minpack solver.

17 August 2017

New section: Code Verification Tests

Not sure that DAE Tools can perform the job?
A new section Code Verification Tests has been added. The section contains problems that use formal code verification methods such as the Method of Exact Solutions (MES) and the Method of Manufactured Solutions (MMS). The main advantage of the MMS method is that it tests the code capabilities in full generality and therefore results in a high degree of confidence that all coding mistakes which prevent the equations being solved correctly have been identified.

17 August 2017

New section: Sensitivity Analysis Examples

A new section Sensitivity Analysis Examples has been added to the documentation. The local (derivative-based) and the global Sensitivity Analysis methods such as Morris Elementary Effect, and FAST/Sobol variance-based methods are available via the Python SAlib library.

02 June 2017

DAE Tools 1.7.0

The new 1.7.0 version is available.

Changelog:

  • Updated User Guide with new sections (user-defines actions, external functions, simulation explorer, executing simulations/optimisations and performing sensitivity analysis).
  • Updated tutorials.
  • MacOS version is again available (only for 64 bit x86 architecture). XCode's clang does not work since openmp is not available. gcc 6.3 from HPC for Mac is used. -rpath issue resolved (using @rpath/... in shared libs and @loader_path/../../solibs/Darwin_x86_64/... in python extension modules).
  • Support for thermophysical property packages (tutorial 19).
  • Sensitivity matrices can be obtained using the daesolver.SensitivityMatrix property and saved to .mmx files in the user-specified directory using the simulation.SensitivityDataDirectory property (tutorial 20).
  • Sensitivity data can be reported using the simulation.ReportSensitivities boolean property. For instance, in this case the sensitivity of the variable with the canonical name "m1.m2.variable" per sensitivity parameter "p1" is reported as "m1.m2.sensitivities.d(variable)/d(p1)".
  • Two sensitivity analysis benchmarks are added:
    • tutorial21.py where the usage of DAESolver.SensitivityMatrix is illustrated and where numerical sensitivities are compared to analytical ones for the constant coefficient first order differential equations.
    • tutorial_che_9.py where numerical sensitivities are compared to the literature data for the Dow Chemicals Company reaction network problem described in Caracotsios and Stewart (1985).
  • Time derivatives can be reported using the simulation.ReportTimeDerivatives boolean property. Here, the time derivative of the variable with the canonical name "m1.m2.variable" is reported as "m1.m2.time_derivatives.d(variable)/dt".
  • Variables have BlockIndexes ndarray properties with the block indexes for all points in the variable. If the variable is not distributed on domains then the BlockIndexes returns an integer.
  • Functions __call__, array, dt_array, d_array and d2_array in daeParameter and daeVariable can use -1 as an argument. Similar to python/numpy arrays, -1 selects the last point from the corresponding domain.
  • Operators __bool__ and __nonzero__ added to adouble and adouble_array classes. They raise not-implemented exceptions preventing inadvertent calls to Python's built-in operators not, and, or.
  • Standard mathematical functions also added to adouble_array class.
  • The script install_python_dependencies.sh updated to enable python versions.
  • Fixed daetools.cfg detection using boost::filesystem::canonical() function.

16 March 2017

DAE Tools 1.6.1

The new 1.6.1 version is available. This is an update to DAE Tools v1.6.0 with some improvements.

Changelog:

  • Python versions supported: 2.7, 3.4, 3.5 and 3.6.
  • All GUI features switched to PyQt5.
  • DAE Toools Examples now shows tutorials' description in html.
  • This version provides a native support for MSVC++ compiler
  • The latest boost and solver libraries:
    • boost: 1.52.0 -> 1.62.0
    • idas: 1.1.0 -> 1.3.0
    • superlu: 4.1 -> 5.2.1
    • superlu_mt: 2.0 -> 3.1
    • trilinos: 10.8.0 -> 12.10.1
    • nlopt: 2.4.1 -> 2.4.2
    • bonmin: 1.8.4
    • deal.ii: 8.4.1
  • The bonmin version for windows uses an old 1.4.1.
  • Superlu_MT now uses OpenMP (not pthreads).
  • compile_libraries_linux.sh and compile_linux.sh renamed to compile_libraries.sh and compile.sh (since they perform build for all three platforms).

1 March 2017

DAE Tools 1.6.0

The new 1.6.0 version is available.

Changelog:

  • Updated documentation.
  • daeSimulation.SetContinuousOptimizationVariable also accepts quantity arguments (not only plain floats).
    daeDomain.CreateStructuredGrid also accepts quantity arguments (not only plain floats).
  • IPOPT solver has the scaling parameters.
  • daeFunctionWithGradients and daeOptimizationVariable have scaling parameters (the defaults is 1.0).
  • DAESolver now has the SetTimeHorizon function to prevent the solver to integrate past the specified time horizon (internally it uses SetStopTime).
  • Config files under Windows are now located properly.
    Created a new shared library daeConfig-pyMM. Now, the config is shared among modules (before, every module had its own instance of it) and changes will be reflected on all modules. Config files have the global daeSetConfigFile(configFilePath) function to set user-specified daetools.cfg file.
  • Updated support for optimisation problems and optimisation solvers.
  • A new Chemical Engineering Optimisation Examples section has been added with 5 COPS optimisation, optimal control and parameter estimation tests.
  • Updated the global functions d(), d2() and dt(). Now they accept all types of expressions/functions from math.h (except min, max, erf, floor, and ceil).
  • Old tutorials split into 4 sections:
    • Basic
    • Advanced
    • Finite Element
    • Optimisation

    and a new section Chemical Engineering Examples is added to the documentation.

    It contains the following models:

    • CSTR
    • Plug Flow Reactor
    • Binary distillation column
    • Batch crystalliser
    • Discretised Population Balance equations solved using high-resoluton upwind scheme with flux limiter (2x)
    • Li-ion battery (porous electrode theory by J.Newman and coworkers)
    • Porous membrane model employing Generalised Maxwell-Stefan equations

    Tutorials 16, 18, 20 and 23 are moved to the advanced section and became tutorial_adv_1,2,3,4.

    Tutorial 19 is now 16, and tutorial 21 is now 18.

    The deal.II tutorials now include:

    • Transient heat conduction
    • Transient heat convection
    • Cahn-Hilliard equation
    • Flow through the porous media
    • Steady-state diffusion and first-order reaction in an irregular catalyst shape

    All tutorials has been updated with the more detailed descriptions, equations and plots of the results.

    Updated sphinx documentation with the new theme (bootstrap, bootswatch_theme: readable) and its options.

  • Windows port updates:

    • No installers are provided anymore. The installation process is the same for all platforms: python setup.py install
    • Added daeplotter.bat and daeexamples.bat files so the DAE Plotter and DAEExamples can be started from the command line.
    • Only win32 architecture left (win64 were causing errors when using 32 bit daetools on 64 bit Windows). Changes made to setup.py and daetools/__init__.py
  • A major revision of the support for Finite Elements (through deal.II library)

    • Multi-scalar FE systems work well now. Vector systems need to be tested (still not ready).
    • Weak form expressions can contain adouble objects that is the expressions with daeVariable and daeParameter objects. Consequently, the non-linear finite elements are automatically supported.
    • The weak form now consists of the following contributions:
      1. Aij - cell contribution to the system stiffness matrix.
      2. Mij - cell contribution to the mass stiffness matrix.
      3. Fi - cell contribution to the load vector.
      4. boundaryFaceAij - boundary face contribution to the system stiffness matrix.
      5. boundaryFaceFi - boundary face contribution to the load vector
      6. innerCellFaceAij - inner cell face contribution to the system stiffness matrix.
      7. innerCellFaceFi - inner cell face contribution to the load vector
      8. functionsDirichletBC - Dirichlet boundary conditions
      9. surfaceIntegrals - surface integrals
      10. volumeIntegrals - volume integrals
    • The list of functions for building weak form expressions:
      • phi (variableName, shapeFunction, quadraturePoint): corresponds to shape_value in deal.II
      • dphi (variableName, shapeFunction, quadraturePoint): corresponds to shape_grad in deal.II
      • d2phi (variableName, shapeFunction, quadraturePoint): corresponds to shape_hessian in deal.II
      • phi_vector (variableName, shapeFunction, quadraturePoint): corresponds to shape_value of vector dofs in deal.II
      • dphi_vector (variableName, shapeFunction, quadraturePoint): corresponds to shape_grad of vector dofs in deal.II
      • d2phi_vector (variableName, shapeFunction, quadraturePoint): corresponds to shape_hessian of vector dofs in deal.II
      • div_phi (variableName, shapeFunction, quadraturePoint): corresponds to divergence in deal.II
      • JxW (quadraturePoint): corresponds to the mapped quadrature weight in deal.II
      • xyz (quadraturePoint): returns the point for the specified quadrature point in deal.II
      • normal (quadraturePoint): corresponds to the normal_vector in deal.II
      • function_value (functionName, function, point, component): wraps Function<dim> object that returns a value
      • function_gradient (functionName, function, point, component): wraps Function<dim> object that returns a gradient
      • function_adouble_value (functionName, function, point, component): wraps Function<dim> object that returns adouble value
      • function_adouble_gradient (functionName, function, point, component): wraps Function<dim> object that returns adouble gradient
      • dof (variableName, shapeFunction): returns daetools variable at the given index (adouble object)
      • dof_approximation (variableName, shapeFunction): returns FE approximation of a quantity as a daetools variable (adouble object)
      • dof_gradient_approximation (variableName, shapeFunction): returns FE gradient approximation of a quantity as a daetools variable (adouble object)
      • dof_hessian_approximation (variableName, shapeFunction): returns FE hessian approximation of a quantity as a daetools variable (adouble object)
      • vector_dof_approximation (variableName, shapeFunction): returns FE approximation of a vector quantity as a daetools variable (adouble object)
      • vector_dof_gradient_approximation (variableName, shapeFunction): returns FE approximation of a vector quantity as a daetools variable (adouble object)
      • adouble (ad): wraps any daetools expression to be used in matrix assembly
      • tensor1 (t): wraps deal.II Tensor<rank=1>
      • tensor2 (t): wraps deal.II Tensor<rank=2>
      • tensor2 (t): wraps deal.II Tensor<rank=3>
    • Supported almost all FiniteElement classes from deal.II:
      • FE_Q, FE_Bernstein
      • FE_ABF, FE_BDM, FE_Nedelec, FE_RaviartThomas
      • FE_DGP, FE_DGQ, FE_DGBDM, FE_DGNedelec, FE_DGRaviartThomas
    • Supported almost all quadrature rules: QGauss, QGaussLobatto, QMidpoint, QSimpson, QTrapez, QMilne, QWeddle, QGaussLog, QGaussLogR, QGaussOneOverR, QGaussChebyshev, QGaussLobattoChebyshev
    • Added support for surface/volume integrals over boundaries.
    • Initial conditions are now set using the function setFEInitialConditions().
  • New VTK data reporter (daeVTKDataReporter).

  • The macro CLONE_NODE, the copy constructor and operator = do not deep copy adNode-derived objects anymore but just take the source node smart pointer. The memory used is lower now.

  • Added a new boolean option daetools.core.checkForInfiniteNumbers to daetools.cfg and a function to the daeDataProxy class CheckForInfiniteNumbers(). This options can be used while calculating residuals, Jacobian and sensitivity residuals to check if a value/derivative is a finite number (that is not +inf, -inf, nan). By the default it is disabled (for performance reasons).

  • Added try/catch statements in Residual/Jacobian/SensitivityResiduals calculation to be able to track equations which are the source of errors. Exceptions are re-thrown so the simulation will still fail but this time with the name of the equation and the reason of the failure. Useful when sqrt or logarithm functions are called for negative basis, for instance.

  • Added diagnostics in adNode-derived runtime classes that checks values for nan, -inf, +inf

  • DAE solver now also reports data after a failure in SolveInitial() and Reinitalize() functions.

  • adSetupVariableNode and adRuntimeVariableNode objects are stored in std::map<overall_index,node*> to reduce the memory requirements.

  • Modified model reports .xslt and .css files.

  • Fixed bug with the propagation of the global execution context. It has been propagated only from the current level model downwards. Now, it is always propagated from the top level model.

  • Small bug fix in unit::toLatex() function.

  • Fixed bug in quantity::operator /(double, adouble).

  • Fixed small bug when saving 2D plot templates (domainIndexes are reset by the ChooseVariable dialog) causing the empty list in the json template.

  • Equations and EquationExecutionInfos are not exported into MathML but Latex instead. The file size of the runtime reports is shrank from tens of mb to 100 kb. MathJax used to render Latex into html+css.

  • Equations now do not save the residual node in xml (Expression tag) since it was not used anywhere and required huge files.

  • Greek html symbols (i.e. &lambda;) are converted into the Latex (i.e. lambda).

  • Other small updates/fixes.

13 December 2016

DAE Tools 1.6.0-beta4

The new 1.6.0-beta4 version is available. Some of the new examples will only work with the latest 1.6.0-b4 version.

New features since beta3:

  • Updated support for optimisation problems and optimisation solvers.
  • A new Chemical Engineering Optimisation Examples section has been added with 5 COPS optimisation, optimal control and parameter estimation tests.

1 December 2016

New section: Chemical Engineering Optimisation Examples

A new section Chemical Engineering Optimisation Examples has been added to the documentation with large-scale Constrained Optimization Problem Set (COPS) optimisation, parameter estimation and optimal control tests:

  • 5 (isomerisation of α-pinene)
  • 6 (marine population balance)
  • 12 (catalytic cracking of gas oil)
  • 13 (conversion of methanol into hydrocarbons)
  • 14 (catalyst mixing in a tubular plug flow reactor)

26 November 2016

DAE Tools 1.6.0-beta3

The new 1.6.0-beta3 version is available. Additional features:

  • Updated the global functions d(), d2() and dt(). Now they accept all types of expressions/functions from math.h (except min, max, erf, floor, and ceil).
  • Old tutorials split into 4 sections:
    • Basic
    • Advanced
    • Finite Element
    • Optimisation

    and a new section Chemical Engineering Examples is added to the documentation.

    It contains the following models:

    • CSTR
    • Plug Flow Reactor
    • Binary distillation column
    • Batch crystalliser
    • Discretised Population Balance equations solved using high-resoluton upwind scheme with flux limiter (2x)
    • Li-ion battery (porous electrode theory by J.Newman and coworkers)
    • Porous membrane model employing Generalised Maxwell-Stefan equations

    Tutorials 16, 18, 20 and 23 are moved to the advanced section and became tutorial_adv_1,2,3,4.

    Tutorial 19 is now 16, and tutorial 21 is now 18.

    The deal.II tutorials now include:

    • Transient heat conduction
    • Transient heat convection
    • Cahn-Hilliard equation
    • Flow through the porous media
    • Steady-state diffusion and first-order reaction in an irregular catalyst shape

    All tutorials has been updated with the more detailed descriptions, equations and plots of the results.

    Updated sphinx documentation with the new theme (bootstrap, bootswatch_theme: readable) and its options.

  • Windows port updates:

    • No installers are provided anymore. The installation process is the same for all platforms: python setup.py install
    • Added daeplotter.bat and daeexamples.bat files so the DAE Plotter and DAEExamples can be started from the command line.
    • Only win32 architecture left (win64 were causing errors when using 32 bit daetools on 64 bit Windows). Changes made to setup.py and daetools/__init__.py
  • A major revision of the support for Finite Elements (through deal.II library)

    • Multi-scalar FE systems work well now. Vector systems need to be tested (still not ready).
    • Weak form expressions can contain adouble objects that is the expressions with daeVariable and daeParameter objects. Consequently, the non-linear finite elements are automatically supported.
    • The weak form now consists of the following contributions:
      1. Aij - cell contribution to the system stiffness matrix.
      2. Mij - cell contribution to the mass stiffness matrix.
      3. Fi - cell contribution to the load vector.
      4. boundaryFaceAij - boundary face contribution to the system stiffness matrix.
      5. boundaryFaceFi - boundary face contribution to the load vector
      6. innerCellFaceAij - inner cell face contribution to the system stiffness matrix.
      7. innerCellFaceFi - inner cell face contribution to the load vector
      8. functionsDirichletBC - Dirichlet boundary conditions
      9. surfaceIntegrals - surface integrals
      10. volumeIntegrals - volume integrals
    • The list of functions for building weak form expressions:
      • phi (variableName, shapeFunction, quadraturePoint): corresponds to shape_value in deal.II
      • dphi (variableName, shapeFunction, quadraturePoint): corresponds to shape_grad in deal.II
      • d2phi (variableName, shapeFunction, quadraturePoint): corresponds to shape_hessian in deal.II
      • phi_vector (variableName, shapeFunction, quadraturePoint): corresponds to shape_value of vector dofs in deal.II
      • dphi_vector (variableName, shapeFunction, quadraturePoint): corresponds to shape_grad of vector dofs in deal.II
      • d2phi_vector (variableName, shapeFunction, quadraturePoint): corresponds to shape_hessian of vector dofs in deal.II
      • div_phi (variableName, shapeFunction, quadraturePoint): corresponds to divergence in deal.II
      • JxW (quadraturePoint): corresponds to the mapped quadrature weight in deal.II
      • xyz (quadraturePoint): returns the point for the specified quadrature point in deal.II
      • normal (quadraturePoint): corresponds to the normal_vector in deal.II
      • function_value (functionName, function, point, component): wraps Function<dim> object that returns a value
      • function_gradient (functionName, function, point, component): wraps Function<dim> object that returns a gradient
      • function_adouble_value (functionName, function, point, component): wraps Function<dim> object that returns adouble value
      • function_adouble_gradient (functionName, function, point, component): wraps Function<dim> object that returns adouble gradient
      • dof (variableName, shapeFunction): returns daetools variable at the given index (adouble object)
      • dof_approximation (variableName, shapeFunction): returns FE approximation of a quantity as a daetools variable (adouble object)
      • dof_gradient_approximation (variableName, shapeFunction): returns FE gradient approximation of a quantity as a daetools variable (adouble object)
      • dof_hessian_approximation (variableName, shapeFunction): returns FE hessian approximation of a quantity as a daetools variable (adouble object)
      • vector_dof_approximation (variableName, shapeFunction): returns FE approximation of a vector quantity as a daetools variable (adouble object)
      • vector_dof_gradient_approximation (variableName, shapeFunction): returns FE approximation of a vector quantity as a daetools variable (adouble object)
      • adouble (ad): wraps any daetools expression to be used in matrix assembly
      • tensor1 (t): wraps deal.II Tensor<rank=1>
      • tensor2 (t): wraps deal.II Tensor<rank=2>
      • tensor2 (t): wraps deal.II Tensor<rank=3>
    • Supported almost all FiniteElement classes from deal.II:
      • FE_Q, FE_Bernstein
      • FE_ABF, FE_BDM, FE_Nedelec, FE_RaviartThomas
      • FE_DGP, FE_DGQ, FE_DGBDM, FE_DGNedelec, FE_DGRaviartThomas
    • Supported almost all quadrature rules: QGauss, QGaussLobatto, QMidpoint, QSimpson, QTrapez, QMilne, QWeddle, QGaussLog, QGaussLogR, QGaussOneOverR, QGaussChebyshev, QGaussLobattoChebyshev
    • Added support for surface/volume integrals over boundaries.
    • Initial conditions are now set using the function setFEInitialConditions().
  • New VTK data reporter (daeVTKDataReporter).

  • The macro CLONE_NODE, the copy constructor and operator = do not deep copy adNode-derived objects anymore but just take the source node smart pointer. The memory used is lower now.

  • Added a new boolean option daetools.core.checkForInfiniteNumbers to daetools.cfg and a function to the daeDataProxy class CheckForInfiniteNumbers(). This options can be used while calculating residuals, Jacobian and sensitivity residuals to check if a value/derivative is a finite number (that is not +inf, -inf, nan). By the default it is disabled (for performance reasons).

  • Added try/catch statements in Residual/Jacobian/SensitivityResiduals calculation to be able to track equations which are the source of errors. Exceptions are re-thrown so the simulation will still fail but this time with the name of the equation and the reason of the failure. Useful when sqrt or logarithm functions are called for negative basis, for instance.

  • Added diagnostics in adNode-derived runtime classes that checks values for nan, -inf, +inf

  • DAE solver now also reports data after a failure in SolveInitial() and Reinitalize() functions.

  • adSetupVariableNode and adRuntimeVariableNode objects are stored in std::map<overall_index,node*> to reduce the memory requirements.

  • Modified model reports .xslt and .css files.

  • Fixed bug with the propagation of the global execution context. It has been propagated only from the current level model downwards. Now, it is always propagated from the top level model.

  • Small bug fix in unit::toLatex() function.

  • Fixed bug in quantity::operator /(double, adouble).

  • Fixed small bug when saving 2D plot templates (domainIndexes are reset by the ChooseVariable dialog) causing the empty list in the json template.

  • Equations and EquationExecutionInfos are not exported into MathML but Latex instead. The file size of the runtime reports is shrank from tens of mb to 100 kb. MathJax used to render Latex into html+css.

  • Equations now do not save the residual node in xml (Expression tag) since it was not used anywhere and required huge files.

  • Greek html symbols (i.e. &lambda;) are converted into the Latex (i.e. lambda).

  • Other small updates/fixes.

23 November 2016

New: Chemical Engineering Examples

Added a new section Chemical Engineering Examples to the documentation:

  • CSTR
  • Plug Flow Reactor
  • Binary distillation column
  • Batch crystalliser
  • Discretised Population Balance equations solved using high-resoluton upwind scheme with flux limiter
  • Li-ion battery (porous electrode theory by J.Newman and coworkers)
  • Porous membrane model employing Generalised Maxwell-Stefan equations
  • More details: Chemical Engineering Examples.

16 November 2016

Updated tutorials

All tutorials has been updated with the more detailed descriptions, equations and plots of the results.

2 November 2016

New website

The project switched to a new website format.

21 October 2016

DAE Tools 1.6.0-beta2

The new 1.6.0-beta2 version is available.

Changelog:

  • A major revision of the support for the Finite Elements Method (through the deal.II library).
  • New VTK data reporter (daeVTKDataReporter).
  • New boolean option in daetools.cfg: daetools.core.CheckForInfiniteNumbers. If it is on the software checks all residuals, Jacobian items and sensitivity residuals values if they are +inf, -inf or NaN.
  • adSetupVariableNode and adRuntimeVariableNode objects are stored in std::map<overall_index,node*> to reduce the memory requirements.
  • Other small updates/fixes.

29 June 2016

DAE Tools 1.5.0

The new 1.5.0 version has been released.

Changelog:

  • The new c++/MPI code generator. It can generate the c++ source code that contains the exported simulation, data partitioning and interprocess communication using MPI. At the moment it is in the prrof of the concept stage.
  • Updated other code generators. FMI code generator tested using the available tests.
  • New types of plots in the DAE Plotter: animated 2D plot (including the video export), user-defined plots (through user-specified python source code) and plotting of user specified data.
  • Fixed bugs in calculation of initial conditions in daeSimulation.SolveInitial() and daeSimulation.Reinitialize() functions.
  • Added global dt, d, d2, dt_array, d_array and d2_array functions that calculate time/partial derivatives.
  • Fixed LastSatisfiedCondition (was not always set)
  • boost thread uses win32 threadapi
  • All tutorials updated to work with python 3
  • Config files (daetools.cfg and bonmin.cfg) are located in daetools root directory. However, the user-defined files can be specified in the directories with the following search order: 1) $HOME/.daetools, 2) application folder, and 3) daetools folder in the python install.
  • Installation into the python virtual environments is supported. in addition, daetools can be used just by adding the daetools folder to python root.
  • All shared libraries are now in daetools/solibs directory and python extension modules use -rpath to locate them relative to the $ORIGIN.
  • Added units to data reporters/receivers and to the DAE Plotter plots.
  • Added new types of variables.
  • ChooseVariable dialog now keeps the current position in the tree for easier plotting of multiple variables.
  • install_dependencies_linux does not install python modules anymore. A new script has been added for that purpose (install_python_dependencies_linux.sh).
  • Fixed some module imports to work with both python 2 and 3.
  • Fixed bug in daeReceiverVariable.Times
  • daeSimulation.Pause() and daeSimulation.Resume() fixed.
  • daeVariable.d_array/d2_array are now deprecated.
  • A number of other small fixes and updates

8 April 2016

DAE Tools journal article

The first article on DAE Tools has been published in PeerJ Computer Science: Nikolić DD. (2016) DAE Tools: equation-based object-oriented modelling, simulation and optimisation software. PeerJ Computer Science 2:e54. doi:10.7717/peerj-cs.54.

28 December 2014

DAE Tools 1.4.0

Changelog:

  • Code generators for Modelica, gPROMS and c99. They can be found in daetools/code_generators. Almost all features available in daetools are supported except event ports, user defined actions, external functions and finite element objects whose equations need to be updated during a simulation.
  • Support for simulation in other simulators using standard interfaces for Co-Simulation: Functional Mockup Interface (FMI), Matlab MEX-functions and Simulink S-functions.
  • Added SimulationLoader project with c and c++ interface that can load a simulation from a python file and perform all other available operations on it. It is used by daetools_mex (Matlab MEX wrapper), daetools_s (Simulink S-function wrapper) and daetools_fmi_cs (FMI for Co-Simulation wrapper).
  • DAE Tools objects such as adouble can be used as NumPy native data type. The most of the NumPy and SciPy functions are supported.
  • New data reporters that export the simulation results to various file formats (MS Excel, hdf5, xml, json) and to Pandas data sets.
  • Added new math functions: Sinh, Cosh, Tanh, ASinh, ACosh, ATanh, ATan2, Erf and Erf to adouble/adouble_array.
  • Added Pardiso linear solver.
  • Added SimulationExplorer GUI that lists all domains, parameters, initial conditions, degrees of freedom and state transition networks.
  • Simulations can export the initialization values to JSON format (daeSimulationExplorer.generateJSONSettings, daeSimulationExplorer.saveJSOnSettings) and initialize using a JSON string (auxiliary.InitializeSimulation function). daeSimulation.Initialize accepts an optional argument jsonRuntimeSettings. daetools.cfg config file is now in JSON format.
  • Condition nodes can be exported to Latex.
  • All node classes have NodeAsPlainText and NodeAsLatex functions.
  • Added new function dictVariableValues that returns a tuple (values:ndarray, times:ndarray, domains:list).
  • Domains and parameters can now be propagated through the whole model hierarchy (daeModel.PropagateDomain() and daeModel.PropagateParameter()). All domains/parameters with the same name will have identical properties.
  • daeVariable functions SetValues, SetInitialConditions, AssignValues etc. accept NumPy arrays as arguments. Now, values and initial conditions can be set using numpy float or quantity arrays.
  • Runtime model reports show completely expanded equations now. Consequently, many adRuntimeNode-classes are deleted.
  • Functions that operate on adouble_array objects always generate setup nodes and never perform any calculations
  • All data reporters have ConnectString and ProcessName attributes.
  • Fixed bug in unit class (one day has 83400 seconds).
  • All equation can generate Jacobian expressions by setting daeEquation.BuildJacobianExpressions to True. This is useful when an expression is huge and contains a large number of variables. Calculation of a Jacobian for such equation would take a very long time. Generation of Jacobian expressions will increase the memory requirements but may tremendously decrease the computational time. They are stored in daeEquationExecutionInfo.JacobianExpressions and the equation execution infos are stored in daeEquation.EquationExecutionInfos.
  • daeConfig first looks for config files in /etc/daetools and then in HOME/.daetools directory. If it can’t find any config file it remains empty and consequently the defaults are used.
  • Added operator ~ (logical NOT) to adouble class.
  • Fixed bug in unit::toString function.
  • Other small improvements and minor bugs fixes

1 October 2014

DAE Tools 1.3.0-beta3

Changelog:

  • Fixed bug in 3D plot
  • Functions Sum, Product, Average, Min, Max, d, dt moved to the global namespace
  • adouble_array objects can be manipulated from python now. Two new static functions are added to adouble_array: FromList and FromNumpyArray which take as an argument a list/ndarray of double objects and return adouble_array. Several new functions were added: __len__, __getitem__, __setitem__, items
  • Functions GetNumpyArray from daeVariable, daeParameter and daeDomain replaced with npyValues attribute.
  • Added new function to daeVariable: GetDomainsIndexesMap
  • Added new attributes to daeVariable: npyIDs, npyValues, npyTimeDerivatives
  • operator() in daeDomain does the same as operator[]
  • Equations have EquationType attribute
  • daeModel has GetModelType function that returns one of: eSteadyState, eDynamic, eODE
  • Added operators +=, -+, *= and /+ to adouble
  • Added new constructors to adouble and adouble_array
  • All python wrapper classes have updated __str__ and __repr__ functions
  • New documentation in Sphinx
  • Removed daeStateTransition class from pyCore Added a new class daeOnConditionActions
  • Changed ON_CONDITION function and now accepts a list of tuples (STN_Name, State_Name). This way an unlimited number of active states can be set
  • Added some unit tests
  • Folders daePlotter and daeSimulator renamed to dae_plotter and dae_simulator Many other files renamed to lower case names
  • Fixed bug with nested STNs and IFs
  • Updated daetools.xslt and daetools-rt.xslt files
  • Added LastSatisfiedCondition to daeSimulation class that returns the condition that caused a discontinuity
  • daeDataReporterProcess renamed to daeDataReceiverProcess. Added new attributes: dictDomains and dictVariables to enable access to the results through dictionary like interface. The same attributes added to daeDataReporterLocal
  • Implemented daeTCPIPLog and daeTCPIPLogServer
  • Added daeDelegateLog with the same functionality as daeDelegateDataReporter
  • Added new tutorials and optimization tutorials
  • Fixed bugs in SaveAsMathML functions for some nodes
  • Added function array to daeDomain
  • Fixed bug in units for constraints and objective function. Now they have the same units as their residual function
  • New functions in daeOptimization: StartIterationRun and EndIterationRun
  • Added a new argument ‘name’ to daeEquation.DistributeOnDomain function. Now distribution domains can have a user-defined names
  • Options for IDA solver can be set through daetools.cfg config file
  • Fixed bug in the eQuasySteadyState initialization mode in daeSimulation
  • Function DeclareEquations must be called from derived-classes’ DeclareEquations function
  • Unit consistency test can be switched on or off for individual equations through CheckUnitConsistency attribute in daeEquation class
  • Added functions to daeIDAS DAE solver: OnCalculateResiduals, OnCalculateJacobian, OnCalculateConditions, OnCalculateSensitivityResiduals, and new attributes: Values, TimeDerivatives, Residuals, Jacobian, SensitivityResiduals
  • Fixed but in initialization of the DAE system where discontinuities were not properly handled
  • Fixed bug in daeSimulation.Reinitialize function where the root functions were not being updated
  • Fixed bug with taking the variables’ indexes from quations located in STN or IF blocks, causing the Jacobian matrix to be invalid in certain cases
  • Fixed bug in daeExternalFunction_t related to processing of adouble_array type of arguments
  • Added new node class: adSetupCustomNodeArray and new static functions to adouble_array: FromNumpyArray and FromList that create adouble_array object from the given list/ndarray of adoubles with setup nodes. Useful when using daetools array functions on arrays of adoubles that are a product of numpy operations.
  • Implemented daeVectorExternalFunction
  • Added EstLocalErrors and ErrWeights functions to daeIDAS dae solver
  • IDAS solver now takes abs. tolerances from the daetools.cfg config file
  • Fixed memory leaks with smart pointers (in boost::intrusive_ptr)
  • Fixed but with the reset of DAE solver during optimization
  • Now before every optimization iteration the initialization file is loaded
  • Added daeFiniteElementModel and daeFiniteElementEquation classes
  • Added pyDealII FE solver
  • Added daeSimulationExplorer
  • Other small improvements and minor bugs fixes

11 October 2012

Bug fixes

  • 3D plot bug fix when detecting free domains (by Caleb Huttingh)

14 June 2012

DAE Tools 1.2.1

Changelog:

  • Integration speed improvements (more than an order of magnitude, in some cases); no need for a memory copy from/to the DAE solver, a better integration step control and an option to avoid sparse matrix re-creations after a discontinuity
  • A new option added to the daetools.cfg config. file: resetLAMatrixAfterDiscontinuity; it applies only to sparse matrix LA solvers; if true LA solvers will recreate sparse matrix each time a discontinuity is detected (since the sparsity pattern might be changed); if false the DAE solver will create a single sparse matrix that includes a sparsity pattern from all states so that there is no need to recreate matrix each time a discontinuity is located; this obviously introduces higher memory requirements but brings significant integration speed improvements
  • SuperLU LA solver can choose between two modes of reusing the factorization information from the previous steps: SamePattern and SamePattern_SameRowPerm (for more info see the superlu documentation); a new option added to the daetools.cfg config. file: factorizationMethod which can have one of the values above
  • SuperLU LA solver can be instructed to create all the memory it needs at the beginning of simulation; this can be controlled in the daetools.cfg file by setting the useUserSuppliedWorkSpace option to true and adjusting the workspaceSizeMultiplier and workspaceMemoryIncrement options (for more info see the superlu ocumentation)
  • Added support for units; variables, parameters, domains must have a numerical value in terms of a unit of measurement (quantity) and units-consistency is strictly enforced (although it can be switched off in the daetools.cfg config file); added three new classes: base_unit, unit and quantity and a new module: pyUnits
  • A new option added to the daetools.cfg config. file: checkUnitsConsistency; if true the system will perform units-consistency tests for equations and logical expressions during the initialization phase
  • Functions (Re)SetInitialCondition, SetInitialGuess, (Re)AssignValue in daeVariable and SetValue in daeParameter accept both floating point values and quantities; in the former case it is assumed that the value is in the units of the parameter/variable while in the later the numerical values is first converted to the parameter/variable units
  • C++ tutorials and the python modules reorganized; now c++ tutorials are in the folder cxx-tutorials while the completely new folder tree has been created for python modules: all files are in the daetools-package folder
  • Added platform specific folders for python extension modules
  • Added support for python dist-utils (the file setup.py in the daetools-package folder)
  • New functions in daeVariable: (Re)SetInitialConditions, SetInitialGuesses, (Re)AssignValues that set init. conditions, init. guesses or assign values of all points in a distributed variable
  • All constants in equations must be dimensional and assigned units; two new functions (Constant and Array) are added that create single or an array of dimensional quantities
  • Added new node class: adVectorNodeArray.
  • The functions Time and Constant moved from the daeModel class to the global namespace
  • A basic support for external functions (daeScalarExternalFunction and daeVectorExternalFunction) that can handle and evaluate functions existing in external libraries; in the future versions of daetool certain software components such as thermodynamic property packages will be supported
  • A new type of 2D plots: Animated2D plot
  • Trilinos family of LA solvers have also cDAE version
  • Added a new function to daeSimulation: CleanUpData; in case of very large systems a lot of memory can be freed and made available to the system after the initialization; this is still an experimental option
  • Array_xxx functions in daeVariable/daeParameter accept python lists and slices
  • Equations can have an optional scaling; added two new functions: GetScaling/SetScaling (the property Scaling in pyDAE)
  • Improved data reporting speed
  • Parameters values can also be reported
  • Changes in data reporting during an optimization (now all iterations are reported independently)
  • A new data reporter class: daeNoOpDataReporter; it just collects the reported values and does not do any processing (useful for building custom data reporters)
  • OnEvent function can also accept events from outlet ports
  • Enabled the option for the Lapack LA solver in Sundials IDAS
  • Mac OSX port
  • c++ (cDAE) tutorials
  • Added several new functions to the daeLog_t and a progress bar to the daeSimulator; the new functions are GetProgress/SetProgress (property Progress), GetEnabled/SetEnabled (property Enabled), GetPrintProgress/SetPrintProgress (property PrintProgress), GetPercentageDone/SetPercentageDone (property PercentageDone) and GetETA (read-only property ETA)
  • daeStdOutLog and daePythonStdOutLog print the progress information to the console
  • Fixed bug in all versions of LA solvers in cDAE (a responsibility to destroy objects and to free memory was done automatically by a DAE solver: now it is users responsibility)
  • SuperLU and SuperLU_MT now statically linked
  • Removed dependence on the system version of the boost libraries; all platforms now use the same version of the custom built boost libs (1.49.0)
  • Fixed bug in python wrappers (“pure virtual function called”) that was related to the sequence of datareporter and simulation objects instantiation
  • Updated stylesheets and xsl transformation files for model reports
  • Other small improvements and minor bugs fixes

29 September 2011

DAE Tools 1.1.2

Changelog:

  • daeObjectiveFunction, daeOptimizationVariable, and daeOptimizationConstraint classes have two new attributes (Value and Gradients). daeSimulation::Initialize function accepts an additional argument bCalculateGradients (default is false) which instructs simulation object to calculate gradients of the objective function and optimization variables specified in daeSimulation::SetUpSensitivityAnalysis overloaded function. These changes allow much easier coupling of daetools with some external software (as given in optimization tutorials 4 and 5).
  • New type of ports: event ports (daeEventPort class). Event ports allow sending of messages (events) between two units (models). Events can be triggered manually or as a result of a state transition in a model. The main difference between event and ordinary ports is that the former allow a discrete communication between units while latter allow a continuous exchange of information. A single outlet event port can be connected to unlimited number of inlet event ports. Messages contain a floating point value that can be used by a recipient; that value might be a simple number or an expression involving model variables/parameters.
  • A new function ON_EVENT in the daeModel class that specifies how the incoming events on a specific event port are handled (that is the actions to be undertaken when the event is received; class: daeAction). ON_EVENT handlers can be specified in models and in states so that the actions executed when the event is trigerred can differ subject to the current active state. Four different types of actions can be specified:
    • Change the active state in the specified state transition network
    • Trigger an event on the specified outlet event port
    • Reassign or reinitialize a value of the specified variable
    • Execute the user-defined action (users should derive a new class from daeAction and overload the function Execute)
  • A new way of handling state transitions: the function ON_CONDITION in daeModel that specifies actions to be undertaken when the logical condition is satisfied. The same types of actions as in the function ON_EVENT are supported. The old function SWITCH_TO is still supported but the new one should be used for it is much flexible.
  • Non-linear least square minimization with daeMinpackLeastSq (scipy wrapper of Levenberg-Marquardt algorithm from Minpack)
  • Examples of DAE Tools and Scipy interoperabilty (scipy.optimize.fmin, scipy.optimize.leastsq)
  • Fixed sensitivity calculation in steady-state models. There was no bug in the previous versions, but if the objective function or constraint did not explicitly depend on some of the optimization variables the calculated sensitivity for these variables was zero.
  • Developed shell scripts to compile third party libraries (Sundials IDAS, SuperLU/SuperLU_MT, Trilinos, Bonmin, and NLopt), DAE Tools core libraries and boost.python extension modules (compile_libraries_linux.sh, compile_linux.sh).
  • The new function time in daeModel class; it returns adouble object with the current time elapsed in the simulation that can be used in define equations’ residuals.
  • The new property ‘ReportingTimes’ in daeSimulation class that returns time points when data should be reported.
  • Fixed bug in daePlotter when there was a variable and a port with the same name within the model. Now a port and a variable can have the same name.
  • Some of the tutorials are available in c++ (cDAE) too.
  • Because of the way how the standard c++ library handles the ‘’std::vector’ internal memory storage the memory requiremens could possibly grow rather high for large models. That is fixed now and vectors will not demand more memory than required for elements storage; that is achieved by explicitly allocating memory for all elements and comes with some penalties (small speed loss during the creation of the system, approximately 1%; however, the system creation time is very low and there is no overall performance degradation).
  • Added __true_div__ and __floor_div__ functions to adouble.
  • Some API polishing

17 June 2011

DAE Tools 1.1.1

Changelog:

  • The main focus was to find and adapt a free multithreaded sparse direct solver for use with DAE Tools and it turned out that the best candidate is SuperLU_MT. As of DAE Tools v1.1.1 SuperLU (singlethreaded) and SuperLU_MT (multithreaded) are recommended linear equation solvers. All the other (Trilinos group of solvers, Intel Pardiso, ...) will remain there but with less support.
  • A set of Krylov iterative solvers has been added. Trilinos AztecOO solver with IFPACK, ML or built-in preconditioners is available. However, iterative solvers are not fully working yet and these solvers are still in an early/experimental phase.
  • As the GPGPUs become more and more attractive an effort is made to try to offload computation of the most demanding tasks to GPU. The starting point is obviously a linear equation solver and two options are offered:
    • CUSP
    • SuperLU_CUDA (OpenMP version of SuperLU_MT modifed to work on CUDA GPU devices). The solver is still in the early development phase and the brief description is given in SuperLU_CUDA. Few issues still remain unsolved and a help from CUDA experienced developers is welcomed!
  • The new NLP solver has been added (NLOPT from the Massachusetts Institute of Technology). More information about NLOPT and available solvers can be found on NLOPT wiki pages.
  • To separate NLP from MINLP problems the IPOPT is now a standalone solver.
  • All linear solvers are located in daetools/solvers directory.
  • Now all linear solvers support exporting sparse/dense matrices in .xpm image and matrix market file formats.
  • Models and ports now can be exported into some other modelling language. At the moment, models can be exported into pyDAE (python) and cDAE (c++) but other languages will be supported in the future (such as OpenModelica, EMSO, perhaps some proprietary etc...).
  • New data reporter (daeMatlabMATDataReporter) has been added that allows user to export the result into the Matlab MAT file format.
  • Operators + and - for daeDistributedEquationDomainInfo (daeDEDI) class which enable getting values/derivatives in distributed equations that are not equal to the index of the current iterator (see distillation column example for usage).
  • daeParameter/daeVariable constructors accept a list of domains (analogous to calling DistributeOnDomain for each domain).
  • Now all constraints are specified in the following way:
    • Inequality constraints: g(i) <= 0
    • Equality constraints: h(i) = 0
  • DAE Tools source code has been checked by Valgrind and no memory leaks has been detected.
  • Development of some useful models has been started. The models are located in model_library directory.
  • A set of standard variable types has been developed. Variable types are located in daeVariableTypes.py file.
  • Several minor bug fixes.

Copyright: Dragan D. Nikolić, DAE Tools Project 2009-2019