Speed up with VIKTOR and Python
VIKTOR offers a binding with IDEA StatiCa Concrete, as one of its digital building blocks, making it easy to generate such models with minimal Python code and to perform analyses all from within your VIKTOR web application (without the need to open the IDEA interface). This makes it even easier to integrate a complete analysis/design process in a single app, with the tools you are familiar with. For example, by integrating VIKTOR with SCIA and IDEA StatiCa Concrete, a structure can be verified by Finite Element Analysis (FEA) on a structural scale as well as on a reinforced member-scale. Practice has shown that such VIKTOR web apps contribute to a huge increase in effectiveness and a significant decrease in errors, by providing a common, standardized interface for the engineers involved in the process.
Creating the IDEA model with a few lines of Python code
VIKTOR provides two ways of building the IDEA model. One follows IDEA’s Open Model API (OpenModel class), the other resembles IDEA’s clickable interface (Model class). Both classes can be found in viktor.external.idea_rcs.
Creating the model using VIKTOR’s Model class is straightforward, the required code concise. Below is an example of a simple beam model (dummy) with reinforcement bars under frequent and fundamental extreme cases:
Creating the (same) model using VIKTOR’s OpenModel class feels similar to creating it using IDEA’s Open Model API (but then in Python code). Compared to the Model class it is slightly more verbose and therefore recommended only for people familiar with IDEA’s Open Model API:
A valid IDEA input file can subsequently be generated by calling model. generate_xml_input().
Running the analysis in the VIKTOR web application
With VIKTOR you can run an IDEA StatiCa Concrete analysis from within your web application, without having to open the IDEA interface manually, so that can be easily integrated in a fully automated design process. The analysis can be performed using the IdeaRcsAnalysis class, by providing an IDEA StatiCa Concrete Open Model input file. This could be an input file generated with generate_xml_input (see above), or one obtained in a different way, as long IDEA considers it valid:
Executing the analysis invokes the input file to be sent to a designated (virtual) machine that executes the job (on a so-called ‘worker’), using the local IDEA software and license. After execution, the resulting output file (.xml) and/or IDEA StatiCa Concrete file (.rcs) can be retrieved for further processing.
Parsing the Results
For convenience, VIKTOR is shipped with an output file parser (OutputFileParser) that simplifies the extraction of results from the XML output file (obtained from IdeaRcsAnalysis, or in any other way). This way, the most common results (e.g. capacity, shear or crack-width results) can be obtained for each of the sections, with only a few lines of code:
These numerical results can be further processed within your VIKTOR web application, to create graphs and tables and the like, giving the user valuable (visual) feedback.
Creating web apps with VIKTOR enables you to cover the full analysis/design cycle, from the parametrization and creation of a (structural) model, performing FE calculation(s), performing IDEA StatiCa Concrete checks and providing valuable (visual) feedback to the user, with the tools you are familiar with. By having all engineers work in a single, standardized web application, errors in the process can be reduced and effectiveness can be significantly increased.
Are you interested in a complete overview of the VIKTOR – IDEA binding and integration possibilities, please contact us and join the VIKTOR community!
Written by: Bas van der Hulst