KULI newsletter background

KULI Coupling and Automation

KULI provides a flexible and easy way to interface with third-party software. Thus, both very simple and complex co-simulation scenarios can be realized. For example, a larger number of KULI models can be run in parallel in batch mode. Or you couple KULI with other simulation models in a complete vehicle simulation environment.

PyKuli - A Python Interface for KULI

For low level (source code based) integration, a Python module was introduced which wraps KULI Analysis to allow an easy automation of KULI in a Python script. The user does not have to worry about how to connect the KULI COM server - this is done by the wrapper. Moreover, the wrapper does not rely on a specific KULI version, but is compatible with KULI 8 and newer versions. To target a KULI version it's only necessary to specify the corresponding version string.

See the following code snippet which utilizes KULI 13.1 to simulate "ExCar":

kuli = KuliAnalysis("13.1")

kuli.kuli_file_name = r"C:\ECS\KULI_131000\data\CoolingSystems\ExCAR.scs"

kuli.initialize()

kuli.simulate_operating_point(0)

kuli.clean_up()

 

del kuli

 

More scripts and automation examples, also in other languages, can be found here.

 

 

KULI Simulink Toolbox

Depending on the software or simulation environment in which KULI is to be integrated, there exist add-ons or extensions that simplify the integration of KULI into these tools.

As an example, the KULI Simulink Toolbox integrates a KULI model into Matlab Simulink with only a few clicks.

In the latest version of the Toolbox there have been made noticeable enhancements. As an example, it now supports KULI 13 and 13.1 as well as a relative path definition for the KULI model file. Furthermore, the UI has been cleaned-up to give you a better usage experience. KULI messages and errors are now (optionally) forwarded to the Matlab console and multiple bugs have been fixed.

 

 

The toolbox is free of charge and can be downloaded from the KULI Homepage.

 

 

KULI FMI/FMU support

The coupling capabilities of KULI are currently extended in the support of FMI/FMU. KULI will then offer the possibility to export a cooling system model as a FMU for co-simulation, following the FMI 2.0 standard.

The main focus is set on the simplest possible creation workflow for a FMU. Therefore, the interface of the FMU can be modelled in KULI by using the well-known COM objects.

The generation process of the FMU is dialog based and does not require any source code hacking or compilation tasks.

See the screenshot of the FMU generator application:

 

 

The KULI FMU is self-contained which means that the FMU user does not require a KULI installation on its system.

For the simulation a low-cost FMU runtime license or existing KULI simulation licenses can be used.