by Bas van der Hulst
Learn how you (developer, engineer, end-user, domain expert, project manager, etc.) can contribute to the creation of apps that provide real value to your work.
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 at all). This makes it even easier to integrate a complete analysis/design process in a single app, and 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) both 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.
Visualization of a reinforced cross-section in VIKTOR (top) and IDEA (bottom)
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, since the required code is concise. Below is an example of a simple beam model (dummy) with reinforcement bars under frequent and fundamental extreme cases:
1from viktor.external.idea_rcs import Model
2# Initialize the model.
3model = model()
4
5# Create the desired material(s).
6cs_mat = model.create_concrete_material(ConcreteMaterial.C12_15)
7mat_reinf = model.create_reinforcement_material(ReinforcementMaterial.B_400A)
8
9# Create a beam (or other type of member) to be checked.
10cross_section = RectSection(0.5, 1.0)
11beam = model.create_beam(cross_section, cs_mat)
12
13# Create bars (and stirrups)_as desired
14bar_locations = [(-0.101, -0.175), (0.101, -0.175), (-0.101, 0.175)]
15bar_diameters = [0.016, 0.016, 0.016, 0.016]
16
17for coords, diameter in zip(bar_locations, bar_diameters):
18 beam.create_bar(coords, diameter, mat_reinf)
19
20# Add extreme(s)
21freq = LoadingSLS(ResultOfInternalForces(N=-100000, My=21000))
22fund = LoadingURL(ResultOfInternalForces(N=-99999, My=200000))
23beam.create_extreme(frequent=freq, fundamental=fund)
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:
1from viktor.external.idea_rcs import OpenModel 2# Initialize the model. 3model = OpenModel() 4 5# Create the concrete section. 6mat = model.create_matconcrete_ec(ConcreteMaterial.C12_15) 7cs = model.create_cross_section_parameter(name=‘c’, cross_section_type=CrossSectionType, RECT, 8 Material=mat, Width=2.0, Heigth=2.0) 9 10# Create the reinforced cross section. 11rcs = model.create_reinforced_cross_section(name=‘rcs’, cross_section=cs) 12 13# Create bars (and stirrups) as desired 14mat_reinf = model.create_mareinforcement_ec2(ReinforcementMaterial.B_400A) 15 16bar_locations = [(-0.101, -0.175), (0.101, -0.175), (-0.101, 0.175)] 17bar_diameters = [0.016, 0.016, 0.016, 0.016] 18 19for coord, diameter in zip(bar_locations, bar_diameters): 20 rcs.create_bar(coords, diameter, mat_reinf) 21 22# Create a CheckMember. 23member = model.create_check_member1d() 24 25# ‘Assign’ the CheckMember to a CheckSection with the previously defined reinforced section and add extremes. 26check_section = model.add_check_section(description=‘S 1’, check_member=member, reinf_section=rcs) 27freq = LoadingSLS(ResultOfInternalForces(N=-100000, My=210000)) 28fund = LoadingULS(ResultOfInternalForces(N=-99999, My=200000)) 29check_section.create_extreme(frequent=freq, fundamental=fund) 30 31# ‘Assign’ the necessary additional data to the CheckMember. 32model.add_member_data_ec2(member, MemberType, BEAM_SLAB, TwoWaySlabType, SHELL_AS_PLATE) 33
A valid IDEA input file can subsequently be generated by calling model. generate_xml_input().
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 it 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:
1from viktor.external.idea_rcs import IdeaRcsAnalysis 2analysis = IdeaRcsAnalysis(mu_idea_input_file, return_rcs_file=True) 3analysis.execute() 4ouput_file = analysis.get_output_file() 5idea_rcs_file = analysis.get_idea_rcs_file()
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.
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:
1from viktor.external.idea_rcs import OutputFileParser
2parser = OutputFileParser(output_file)
3for section in parser.section_ids:
4 capacity_results_section = parser.capacity_results(section)
5 shear_results_section = parser.shear_results(section)
6 crack_width_results_section = parser.crack_width_results(section)
7 detailing_results_section = parser.detailing_results(section)
8 stress_limitation_results_section = parser.stress_limitations_results(section)
These numerical results can be further processed within your VIKTOR web application and used 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, to performing FE calculation(s), performing IDEA StatiCa Concrete checks, and providing valuable (visual) feedback to the user, all with the tools you are already 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 as well.
Are you interested in a complete overview of the VIKTOR – IDEA binding and integration possibilities? Please contact us and join the VIKTOR community!