IDEA StatiCa Concrete
New in v12.7.0
General cross-sections can be created, defined by a set of coordinates.
New in v12.3.0
Fatigue calculations can be performed.
An IDEA StatiCa Concrete binding has been developed by VIKTOR to simplify the process of creating a model, running an analysis (worker required) and parsing the results. VIKTOR's IDEA-RCS integration requires a specific IDEA worker which can be downloaded here.
note
This module makes use of OpenModel, which is only available in IDEA StatiCa v10.1 or higher.
Creating a model
A model can be created using the binding in two different ways:
Model
: create a model with the least effort. Limited set of features.OpenModel
: resembles the API of IDEA StatiCa Concrete. Less intuitive thanModel
, but can be used if the latter lacks desired features.
Creating a model using Model
The process consists of the following steps:
- Create the 'empty'
Model
. OptionallyProjectData
and/orCodeSettings
can be specified (see this section) - Create one or more materials for the cross section(s) using
Model.create_concrete_material
. - Create one or more materials for the reinforcement(s) using
Model.create_reinforcement_material
. - Create members to be checked using
Model.create_beam
(or similar methods, see below). - Create reinforcement(s) using
Beam.create_bar
. - Create extreme(s) with corresponding internal forces using
Beam.create_extreme
(or similar). - Generate the input XML file using
Model.generate_xml_input
.
from viktor.external.idea_rcs import Model, ConcreteMaterial, ReinforcementMaterial, \ ResultOfInternalForces, LoadingSLS, LoadingULS, RectSectionmodel = Model() # Initialize the model.# Create the desired material(s).cs_mat = model.create_concrete_material(ConcreteMaterial.C12_15)mat_reinf = model.create_reinforcement_material(ReinforcementMaterial.B_400A)# Create a beam (or other type of member) to be checked.cross_section = RectSection(0.5, 1.0)beam = model.create_beam(cross_section, cs_mat)# Create bars (and stirrups) as desiredbar_locations = [(-0.101, -0.175), (0.101, -0.175), (0.101, 0.175), (-0.101, 0.175)]bar_diameters = [0.016, 0.016, 0.016, 0.016]for coords, diameter in zip(bar_locations, bar_diameters): beam.create_bar(coords, diameter, mat_reinf)# Add extreme(s)freq = LoadingSLS(ResultOfInternalForces(N=-100000, My=210000))fund = LoadingULS(ResultOfInternalForces(N=-99999, My=200000))beam.create_extreme(frequent=freq, fundamental=fund)# Generate the input XML file.input_file = model.generate_xml_input()
caution
Model.generate_xml_input
needs to be
mocked within the context of (automated) testing.
Currently, Model
supports the following member types:
Currently, Model
supports the following section types:
- General (>= v12.7.0)
- Rectangular
Creating a model using OpenModel
The process consists of the following steps:
Create the 'empty'
OpenModel
. OptionallyProjectData
and/orCodeSettings
can be specified (see this section)Create one or more materials for the cross section(s) using
OpenModel.create_matconcrete_ec2
.Create a concrete cross-section using one of:
note
In case of a
CrossSectionParameter
, the**parameters
argument should contain keys and values corresponding to thecross_section_type
, else the input file will be invalid. For more information on what**parameters
are required for a certaincross_section_type
, please seecreate_cross_section_parameter
Create one or more materials for the reinforcement(s) using
OpenModel.create_matreinforcement_ec2
.Create the reinforced cross section(s) using
OpenModel.create_reinforced_cross_section
.Create reinforcement(s) using
ReinforcedCrossSection.create_bar
.Create check member(s) using
OpenModel.create_check_member1d
.Couple the check member and reinforced cross section using
OpenModel.add_check_section
.Create extreme(s) with corresponding internal forces using
CheckSection.create_extreme
.Add additional data to the check member using
OpenModel.add_member_data_ec2
.note
The
member_type
andtwo_way_slab_type
should correspond to the chosen reinforced cross sectionGenerate the input XML file using
OpenModel.generate_xml_input
.
from viktor.external.idea_rcs import OpenModel, ConcreteMaterial, ReinforcementMaterial, CrossSectionType, \ ResultOfInternalForces, LoadingSLS, LoadingULS, MemberType, TwoWaySlabTypemodel = OpenModel() # Initialize the model.# Create the concrete section.mat = model.create_matconcrete_ec2(ConcreteMaterial.C12_15)cs = model.create_cross_section_parameter(name='cs', cross_section_type=CrossSectionType.RECT, material=mat, Width=2.0, Height=2.0)# Create the reinforced cross section.rcs = model.create_reinforced_cross_section(name='rcs', cross_section=cs)# Create bars (and stirrups) as desiredmat_reinf = model.create_matreinforcement_ec2(ReinforcementMaterial.B_400A)bar_locations = [(-0.101, -0.175), (0.101, -0.175), (0.101, 0.175), (-0.101, 0.175)]bar_diameters = [0.016, 0.016, 0.016, 0.016]for coords, diameter in zip(bar_locations, bar_diameters): rcs.create_bar(coords, diameter, mat_reinf)# Create a CheckMember.member = model.create_check_member1d()# 'Assign' the CheckMember to a CheckSection with the previously defined reinforced section and add extremes.check_section = model.add_check_section(description='S 1', check_member=member, reinf_section=rcs)freq = LoadingSLS(ResultOfInternalForces(N=-100000, My=210000))fund = LoadingULS(ResultOfInternalForces(N=-99999, My=200000))check_section.create_extreme(frequent=freq, fundamental=fund)# 'Assign' the necessary additional data to the CheckMember.model.add_member_data_ec2(member, MemberType.BEAM_SLAB, TwoWaySlabType.SHELL_AS_PLATE)# Generate the input XML file.input_file = model.generate_xml_input()
caution
OpenModel.generate_xml_input
needs to be
mocked within the context of (automated) testing.
ProjectData and CodeSettings
When a Model
or OpenModel
is initialized, optionally project data and/or code settings can be specified.
Currently, ProjectData
supports:
- National Annex (no annex, Dutch, Belgium)
- Fatigue check
Currently, CodeSettings
supports:
EvaluationInteractionDiagram
NoResistanceConcreteTension1d
TypeSLSCalculation
theta
,theta_min
,theta_max
(>= v12.7.0)n_cycles_fatigue
(>= v12.7.0)
Running an analysis
After having generated an input XML file, it can be fed to the
IdeaRcsAnalysis
:
from viktor.external.idea_rcs import IdeaRcsAnalysis# Generate the input XML file from `Model` or `OpenModel`, or generate one yourself.input_file = ...# Run the analysis and obtain the output file.analysis = IdeaRcsAnalysis(input_file)analysis.execute(60)output_file = analysis.get_output_file()
caution
IdeaRcsAnalysis.execute
needs to be
mocked within the context of (automated) testing.
Extracting results using RcsOutputFileParser
New in v12.5.0
After running an analysis, the obtained output file can be fed to the RcsOutputFileParser
for convenient extraction
of the results:
from viktor.external.idea_rcs import RcsOutputFileParser# Obtain the XML output file from `IdeaRcsAnalysis`, or obtain one yourself.xml_file = idea_rcs_analysis.get_output_file(as_file=True)# Obtain the results for specific or all section(s).with xml_file.open_binary() as f: parser = RcsOutputFileParser(f) # loop through all sections for section in parser.section_results(): capacity_results = section.capacity() shear_results = section.shear() # or get results for a single section section_4 = parser.section_result(4) ...
Currently, RcsOutputFileParser
supports the following results (partially):
In case you require results which are not supported, you can retrieve the raw results using the
OutputFileParser
. We do not advice to use this when
handling very large result files:
# Obtain the raw results as a dictionary
xml_file = idea_rcs_analysis.get_output_file(as_file=True)
parser = OutputFileParser(xml_file)
raw_results = parser.raw_results()