DISCLAIMER: The updated GUI implementation described here is currently in the develop branch and will be part of the V-HAB 2.4.1 release. If you want to use it beforehand, please switch to the develop branch. (See Switching to Another Branch for more information on how to do so if necessary)

The GUI for V-HAB is based on the XML drawing tool draw.io for which a dedicated library containing V-HAB components and subsystem is available. The library file is located in the folder "user\+examples\+DrawIoGUI" and is called "V-HAB_Library.xml".The following figure shows the folder structure within V-HAB and the location of the file:

In addition, example files are located in the same folder. Especially the "SpacecraftOne.xml" file is intended as an example of a ECLSS model defined with the GUI which utilizes a large variety of subsystems. Both the library and the examples can be added to a draw.io diagram either through drag and drop or by using "file → import from → device" and then selecting the file. After importing the library you will see the following overview on the left side:

This contains all necessary components to define a V-HAB model. In the available example "SpacecraftOne" this has been done with a mixture of ISS ECLSS and bioregenerative ECLSS. The draw.io diagram then looks like this:

Here you can observe various subsystems like e.g. the "Human" subsystem or the "Plants" subsystem as well as ISS subsystems like the "CCAA" or the "CDRA beeing used. Each subsystem has in- and outputs which can be rearranged to suit your needs in the diagram. However, it is important that the hierarchical structure is maintained and each in- and output is actually placed as child in its corresponding subsystem. In addition, if you right click any interface and then select "Edit Data" you will find a property called "sType" which is defined and specifies it as either in- or output. So you cannot just change the direction of the arrow to change an input to an output you have to adjust this property as well!

Using these properties additional settings for the subsystems can be defined. For example, for the human subsystem the following properties are set:

The first two properties "bCreateBaseLogging" and "bCreateBasePlotting" can be used to define standard logging of parameters commonly logged for this subsystem and to define commonly used plots for this subsystem respectivly. If you set these to false, no logging and plotting will be performed. The age, sex, height and mass are currently place holders as the V-HAB human model is not capable of modelling them. However, the "fExercise" and "fSleep" properties define how many hours of exercise the humans should perform and how many hours they should sleep. With "iNumberOfCrew" you can also easily adjust how many humans should be represented by this subsystem block. The plant subsystem has different inputs which allow the definition of mutliple different plants with various inputs. Basically for the plant subsystem each property with "mf" before the name (like "mfEmergeTime") is a vector with an entry for every plant species used and the property "sPlantSpecies" defines which entry represents which plant. Currently a basic composition for a full diet of a human is modelled, if you want to remove plants from the model, simply set their area to 0. The property "bMultiplyPlantAreaWithNumberOfCrew" will automatically scale the plant growth area with the number of humans defined in the human subsystem block. (so here the plant areas will be multiplied with 6, for the 6 crew members). The "iAssumedPreviousPlantGrowthDays" represents the initialization conditions of the plants. Here the plants are assumed to have a growth period of 118 days before the simulation starts, so you will have almost fully grown plants or even be in a later generation of plants. Through this property you can model specific times of plant growth in detail without first simulation 118 days in V-HAB.

The other subsystem also have properties but not as many as these two. In the "setup" block of the diagram you can also define the desired simulation time and other things usually defined in the V-HAB setup file.

If you now take a look at the properties of the atmosphere phase in the cabin store:

You will find that you can define the composition of the gas phase by adding properties called "fPressure" followed by the desired substance (as it is defined in the V-HAB matter table). By adding the term "PLOT_" before a property you will also add it to the plotting created for this simulation. You can define all different types of phases (normal, flow, boundary for all phase types) through the GUI and will find the necessary pre defined blocks in the library. However, if you want to include other substances you may have to remove the current properties for the composition and add new one, as it would be very confusing to have all ~300 substances available in V-HAB listed here.

You may have also noticed the "Exec" block in the SpacecraftOne example above. You can use this to add Exec code to a V-HAB system. Here for example the exec code includes the calculation for heat released from plant lighting and a CO2 buffer supplying CO2 to the atmosphere in case the value drops too far.

Importing a Model defined with the GUI into V-HAB

V-HAB can only import XML files which are saved uncompressed. The standard draw.io save uses compression, so you have to select "file → export as → xml → unselect compressed" when saving the files for the import to work!

In order to import a draw.io file into V-HAB you can use the command:

tools.import.DrawIo('user\+examples\+DrawIoGUI\SpacecraftOne.xml')

Do not forget to perform "vhab.init()" beforehand to initialize the V-HAB folder structure! The import command will create a folder named after the xml file in "user\DrawIoImport" and place the corresponding V-HAB code within it. Therefore you can execute the model after its import using e.g.

vhab.exec('DrawIoImport.SpacecraftOne.setup')


Closing Remarks


Overall, this should give you a good overview of the features available in the GUI and how to use it to define systems. The GUI is intended to ease the definition of ECLSS especially with exisiting subsystem models, however it is not as powerful as using Matlab code to define systems and not all features of V-HAB are available in the GUI. Therefore, the GUI can be complemented by additional coding after the system was imported, as the GUI creates the corresponding V-HAB code which can then be further adjusted/improved. Within the GUI you have to be careful e.g. when defining branches that they actually start and end at the corresponding components and that components are placed correctly within the corresponding parent (e.g. the in- and output in the subsystem, the phase in the store etc.)


  • Keine Stichwörter