Layout: tidy and not so tidy

I’ve been having a look at some models recently and seeking to make them more “readable” and easier on the eye. This blog post looks at why poorly laid out models can be detrimental to our modelling efficiency. Some of these principles can also be applied to other activities and spaces we operate within.

Let’s consider the scenario where the control model for a thermal management system is being developed. Inherited or indeed being given a model to debug can sometimes be challenging. If we ourselves are not the author of the model we will need to figure out what the model is designed to do. A well documented model can help in these cases and the documentation should not limit itself to the documentation layer in Dymola. We should extend that documentation to the diagram layer if this layer is being used. A tidy diagram layer will also help so that we can easily determine the flow of information (in the case of blocks) or the physical relationships (in the case of a plant model).

The model shown in figure 1 is an example of a diagram layer that can be easily improved on by object and connection alignment as well as grouping of objects into areas for the control of specific parts of the plant model.

Figure 1. Example of a poorly laid out and labelled model: 1. inconsistent naming of objects, 2. Excessive overlapping of connection lines, 3. misalignment of objects

In figure 3, the objects have been aligned to a grid. We have turned the grid off in this example using the following button in the taskbar.

Figure 2. Toggle grid button in Dymola 2020x
Figure 3. Revamped model layout and object naming of the controller shown in figure 1.

Figure 3 is an improved version of the same model we showed in figure 1. By aligning, grouping and labelling parts of the diagram layer, it becomes more obvious to the user what each section does and there is reduced confusion with regards to intersecting connections. The model is now tidy enough for debugging purposes. Further improvements to the layout will be made once the functional development of the model is complete.

I hope this has given you an example of how a model can be much easier to read if we arrange the diagram layer carefully. The same can be said for a text layer by using commenting characters to section the code into chunks rather than just one lengthy piece of coding.

At Claytex we offer courses and assistance on how to lay out models including diagrams, icons, text, and documentation layers. We can deliver this help face to face or on-line. Please get in touch to find out more.

Written by: Alessandro Picarelli – Engineering Director

Please get in touch if you have any questions or have got a topic in mind that you would like us to write about. You can submit your questions / topics via: Tech Blog Questions / Topic Suggestion


Got a question? Just fill in this form and send it to us and we'll get back to you shortly.


© Copyright 2010-2024 Claytex Services Ltd All Rights Reserved

Log in with your credentials

Forgot your details?