viktor.external.idea
Beam
- class viktor.external.idea_rcs.idea_rcs.Beam(rcs, check_section)
Bases:
Member
Do not use this __init__ directly, but create the object by
Model.create_beam()
.
CompressionMember
- class viktor.external.idea_rcs.idea_rcs.CompressionMember(rcs, check_section)
Bases:
Member
Do not use this __init__ directly, but create the object by
Model.create_compression_member()
.
GeneralShape
- class viktor.external.idea_rcs.idea_rcs.GeneralShape(outline, *, openings=None)
Bases:
SectionPrototype1D
General cross-section, defined by a set of coordinates.
- Parameters:
outline (
Sequence
[Tuple
[float
,float
]]) – Vertices which define the outline of the section (y, z). A minimum of 3 vertices is required, the outline is automatically closed.openings (
Sequence
[Sequence
[Tuple
[float
,float
]]]) – One or multiple openings, defined by vertices (y, z). A minimum of 3 vertices per opening is required, the opening is automatically closed.
IdeaRcsAnalysis
- class viktor.external.idea_rcs.idea_rcs.IdeaRcsAnalysis(input_file, *, return_result_xml=None, return_rcs_file=None)
Bases:
ExternalProgram
Can be used to perform an analysis using IDEA StatiCa RCS on a third-party worker. To start an analysis call the method
execute()
, with an appropriate timeout (in seconds). To retrieve the results call the methodget_output_file()
, afterexecute()
.Usage:
idea_rcs_file = File.from_data("idea rcs input file content") idea_rcs_analysis = IdeaRcsAnalysis(input_file=idea_rcs_file) idea_rcs_analysis.execute(timeout=10) result = idea_rcs_analysis.get_output_file()
Exceptions which can be raised during calculation:
viktor.errors.ExecutionError
: generic error. Error message provides more information
- Parameters:
input_file (
Union
[BytesIO
,File
]) – IDEA (Open)Model input XML file.return_result_xml (
bool
) – Result .xml file will be available if set to True (default: True).return_rcs_file (
bool
) – Input .ideaRcs file will be available if set to True (default: False).
- get_idea_rcs_file(*, as_file=False)
Method can be used to retrieve the .ideaRcs file which is converted from the (Open)Model input XML. The file is only available when return_rcs_file=True.
execute()
must be called first.- Return type:
Union
[BytesIO
,File
,None
]- Returns:
File, if as_file = True
BytesIO, if as_file = False (default)
- get_output_file(*, as_file=False)
Method can be used to retrieve the results generated by running an external analysis. The file is only available when return_result_xml=True.
execute()
must be called first.- Return type:
Union
[BytesIO
,File
,None
]- Returns:
File (encoding=’utf-16’), if as_file = True
BytesIO (encoding=’utf-16’), if as_file = False (default)
Member
- class viktor.external.idea_rcs.idea_rcs.Member(rcs, check_section)
-
Base class of all member types.
- property bars: List[ReinforcedBar]
- create_bar(coordinates, diameter, material)
Create a reinforced bar on the reinforced cross-section.
- Parameters:
coordinates (
Tuple
[float
,float
]) – (X, Y) coordinate of the bar [m].diameter (
float
) – Diameter of the bar [m].material (
MatReinforcement
) – Reinforcement material (created bycreate_matreinforcement_ec2()
).
- Return type:
None
- create_bar_layer(*, origin, diameter, material, number_of_bars, delta_y=None, delta_z=None)
Create multiple reinforced bars on the reinforced cross-section, positioned on a line.
- Parameters:
origin (
Tuple
[float
,float
]) – Origin point (Y, Z) [m].diameter (
float
) – Diameter of the bar [m].material (
MatReinforcement
) – Reinforcement material (created bycreate_matreinforcement_ec2()
).number_of_bars (
int
) – Number of bars (minimum of 2).delta_y (
float
) – Distance between origin bar and the last bar in y-direction [m].delta_z (
float
) – Distance between origin bar and the last bar in z-direction [m].
- Return type:
None
- create_extreme(*, description=None, accidental=None, fatigue=None, frequent=None, fundamental=None, characteristic=None, quasi_permanent=None)
Create an extreme case with corresponding internal forces on the beam for checking.
- Parameters:
description (
str
) – Description of the extreme (default: ‘{section_name} - E {i}’).New in v14.6.0accidental (
LoadingULS
) – Accidental loading.fatigue (
FatigueLoading
) – Fatigue loading.frequent (
LoadingSLS
) – Frequent loading.fundamental (
LoadingULS
) – Fundamental loading.characteristic (
LoadingSLS
) – Characteristic loading.quasi_permanent (
LoadingSLS
) – Quasi-Permanent loading.
- Return type:
None
- create_stirrup(points, diameter, material, distance, shear_check=None, torsion_check=None, mandrel_diameter_factor=None, anchorage_length=None)
Create a stirrup on the reinforced cross-section.
- Parameters:
points (
Sequence
[Union
[Tuple
[float
,float
],Tuple
[Tuple
[float
,float
],Tuple
[float
,float
]]]]) – Sequence of (X, Y) coordinates [m] of the stirrup vertices, connected by straight line segments. For arc-segments use ((X_end, Y_end), (X_on_arc, Y_on_arc)).diameter (
float
) – Diameter of the stirrup [m].material (
MatReinforcement
) – Reinforcement material (created bycreate_matreinforcement_ec2()
).distance (
float
) – Longitudinal distance between stirrups [m].shear_check (
bool
) – Take stirrup into account in shear check (default: False).torsion_check (
bool
) – Take stirrup into account in torsion check (default: False).mandrel_diameter_factor (
float
) – Inner diameter of mandrel as multiple of stirrup diameter [-] (default: 1.0).anchorage_length (
float
) – Anchorage length [m] (default: 0.0).
- Return type:
None
- property extremes: List[CheckSectionExtreme]
Model
- class viktor.external.idea_rcs.idea_rcs.Model(*, project_data=None, code_settings=None)
Bases:
_Model
Can be used to construct an IDEA-RCS model and generate its corresponding input XML file. This file can in turn be used as input of
IdeaRcsAnalysis
. For a more detailed elaboration, please see the guide.Alternatively, you can use
OpenModel
.Warning
Use this binding at own risk. Whether an input XML file represents a valid model is dependent on many things, e.g. on the combination of certain parameters. The Model does not give any guarantees on this. It is therefore important to always validate your model by hand thoroughly, before using it in an automated way within your app!
Example usage:
# Initialize the model. model = Model() # empty model, or optionally pass ProjectData and/or CodeSettings # 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 desired 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): 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_xml = model.generate_xml_input()
- Parameters:
project_data (
ProjectData
) – project_data (default: IDEA-RCS default project_data)code_settings (
CodeSettings
) – code and calculation settings (default: IDEA-RCS default settings)
- project_data
- code_settings
- generate_xml_input(*, as_file=False)
Generates the input file XML representation of the IDEA-RCS model.
Warning
Whether an input XML file represents a valid model is dependent on many things, e.g. on the combination of certain parameters. The OpenModel does not give any guarantees on this. It is therefore important to always validate your model by hand thoroughly, before using it in an automated way within your app!
Note
This method needs to be mocked in (automated) unit and integration tests.
- Parameters:
as_file (
bool
) – return as BytesIO (default) or FileNew in v13.5.0- Return type:
Union
[BytesIO
,File
]
- create_beam(cs, material, *, calculation_control=None, name=None, rcs_name=None, design_member_name=None, exposure_classes=None, coeff_kx=None, creep_coefficient=None, relative_humidity=None)
Create a beam section.
- Parameters:
cs (
SectionPrototype1D
) – Cross-section prototype.material (
MatConcrete
) – Material for the cross-section (created bycreate_concrete_material()
).calculation_control (
CalculationSetup
) – Calculation control settings (default: Capacity N-M(-M) | Shear | Interaction | Stress Limitation | Crack width | Detailing).name (
str
) – Name of the cross-section (default: ‘S{i}’).rcs_name (
str
) – Name of the reinforced cross-section (default: ‘R{i}’).design_member_name (
str
) – Name of the design member (default: ‘M {i}’).New in v14.6.0exposure_classes (
ExposureClassesDataEc2
) – Corrosion exposure classes (default: no corrosion).coeff_kx (
float
) – (Dutch annex only) Coefficient k_x acc. 7.3.1 (default: 1.0).creep_coefficient (
float
) – Final value of creep coefficient (default: calculated by IDEA-RCS).relative_humidity (
float
) – Percentage of relative humidity (default: 65).
- Return type:
- create_compression_member(cs, material, *, calculation_control=None, name=None, rcs_name=None, design_member_name=None, exposure_classes=None, coeff_kx=None, creep_coefficient=None, relative_humidity=None)
Create a compression member section.
- Parameters:
cs (
SectionPrototype1D
) – Cross-section prototype.material (
MatConcrete
) – Material for the cross-section (created bycreate_concrete_material()
).calculation_control (
CalculationSetup
) – Calculation control settings (default: Capacity N-M(-M) | Shear | Interaction | Stress Limitation | Crack width | Detailing).name (
str
) – Name of the cross-section (default: ‘S{i}’).rcs_name (
str
) – Name of the reinforced cross-section (default: ‘R{i}’).design_member_name (
str
) – Name of the design member (default: ‘M {i}’).New in v14.6.0exposure_classes (
ExposureClassesDataEc2
) – Corrosion exposure classes (default: no corrosion).coeff_kx (
float
) – (Dutch annex only) Coefficient k_x acc. 7.3.1 (default: 1.0).creep_coefficient (
float
) – Final value of creep coefficient (default: calculated by IDEA-RCS).relative_humidity (
float
) – Percentage of relative humidity (default: 65).
- Return type:
- create_concrete_material(base_material, name=None, *, unit_mass=2500, fck=None, stone_diameter=0.016, cement_class=ConcCementClass.R, aggregate_type=ConcAggregateType.QUARTZITE, diagram_type=ConcDiagramType.PARABOLIC, silica_fume=False, plain_concrete_diagram=False, dep_params=None)
Create a concrete material, to be used in
create_beam()
and similar methods.- Parameters:
base_material (
ConcreteMaterial
) – IDEA-RCS base material to start with.name (
str
) – Name of the material (default: base_material name).unit_mass (
float
) – Unit mass [kg/m3] (default: 2500 kg/m3).fck (
float
) – Characteristic compressive cylinder strength of concrete at 28 days [MPa] (default: base_material fck).stone_diameter (
float
) – Aggregate size (default: 16 mm).cement_class (
ConcCementClass
) – Cement class (default: R).aggregate_type (
ConcAggregateType
) – Aggregate type (default: Quartzite).diagram_type (
ConcDiagramType
) – Type of stress-strain diagram for ULS calculation (default: Parabolic).silica_fume (
bool
) – Contains silica fume (default: False) (EN 1992-2:2008-07 only).plain_concrete_diagram (
bool
) – Stress strain diagram with tension part (default: False).dep_params (
ConcDependentParams
) – Collection of a series of dependent parameters (see ConcDependentParams for more info). If None, values will be calculated based on ‘fck’ (default: None).
- Return type:
- create_one_way_slab(cs, material, *, calculation_control=None, name=None, rcs_name=None, design_member_name=None, exposure_classes=None, coeff_kx=None, creep_coefficient=None, relative_humidity=None)
Create a one-way slab member section.
- Parameters:
cs (
SectionPrototype1D
) – Cross-section prototype.material (
MatConcrete
) – Material for the cross-section (created bycreate_concrete_material()
).calculation_control (
CalculationSetup
) – Calculation control settings (default: Capacity N-M(-M) | Shear | Interaction | Stress Limitation | Crack width | Detailing).name (
str
) – Name of the cross-section (default: ‘S{i}’).rcs_name (
str
) – Name of the reinforced cross-section (default: ‘R{i}’).design_member_name (
str
) – Name of the design member (default: ‘M {i}’).New in v14.6.0exposure_classes (
ExposureClassesDataEc2
) – Corrosion exposure classes (default: no corrosion).coeff_kx (
float
) – (Dutch annex only) Coefficient k_x acc. 7.3.1 (default: 1.0).creep_coefficient (
float
) – Final value of creep coefficient (default: calculated by IDEA-RCS).relative_humidity (
float
) – Percentage of relative humidity (default: 65).
- Return type:
- create_reinforcement_material(base_material, name=None, *, unit_mass=7850, e_modulus=200000, fyk=None, ftk_by_fyk=None, epsuk=None, type_=ReinfType.BARS, bar_surface=BarSurface.RIBBED, class_=ReinfClass.B, fabrication=ReinfFabrication.HOT_ROLLED, diagram_type=ReinfDiagramType.BILINEAR_INCLINED)
Create a reinforcement material, to be used in
create_reinforcement_bar()
.- Parameters:
base_material (
ReinforcementMaterial
) – IDEA-RCS base material to start with.name (
str
) – Name of the material (default: base_material name).unit_mass (
float
) – Unit mass [kg/m3] (default: 7850 kg/m3).e_modulus (
float
) – Young’s modulus [MPa] (default: 200000 MPa).fyk (
float
) – Characteristic yield strength of reinforcement (default: base_material fyk).ftk_by_fyk (
float
) – factor k = ratio ftk / fyk (default: base_material k).epsuk (
float
) – Characteristic strain of reinforcement at maximum load - εuk [x 1e-4].type – Type of reinforcement (default: Bars).
bar_surface (
BarSurface
) – Bar surface (default: Ribbed).class – Class of reinforcement (default: B).
fabrication (
ReinfFabrication
) – Fabrication of reinforcement (default: Hot rolled).diagram_type (
ReinfDiagramType
) – Type of material diagram (default: Bilinear with an inclined top branch).
- Return type:
OneWaySlab
- class viktor.external.idea_rcs.idea_rcs.OneWaySlab(rcs, check_section)
Bases:
Member
Do not use this __init__ directly, but create the object by
Model.create_one_way_slab()
.
OpenModel
- class viktor.external.idea_rcs.idea_rcs.OpenModel(*, project_data=None, code_settings=None)
Bases:
_Model
Can be used to construct an IDEA-RCS model and generate its corresponding input XML file. This file can in turn be used as input of
IdeaRcsAnalysis
. For a more elaborate example implementation, please see the guide.The OpenModel follows IDEA’s underlying API. Alternatively, you can use
Model
.Warning
Use this binding at own risk. Whether an input XML file represents a valid model is dependent on many things, e.g. on the combination of certain parameters. The OpenModel does not give any guarantees on this. It is therefore important to always validate your model by hand thoroughly, before using it in an automated way within your app!
Example usage:
# Initialize the model. model = OpenModel() # empty model, or optionally pass ProjectData and/or CodeSettings # 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 desired mat_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_xml = model.generate_xml_input()
- Parameters:
project_data (
ProjectData
) – project_data (default: IDEA-RCS default project_data)code_settings (
CodeSettings
) – code and calculation settings (default: IDEA-RCS default settings)
- project_data
- code_settings
- generate_xml_input(*, as_file=False)
Generates the input file XML representation of the IDEA-RCS model.
Warning
Whether an input XML file represents a valid model is dependent on many things, e.g. on the combination of certain parameters. The OpenModel does not give any guarantees on this. It is therefore important to always validate your model by hand thoroughly, before using it in an automated way within your app!
Note
This method needs to be mocked in (automated) unit and integration tests.
- Parameters:
as_file (
bool
) – return as BytesIO (default) or FileNew in v13.5.0- Return type:
Union
[BytesIO
,File
]
- add_check_section(check_member, reinf_section, description=None)
Adds a single section check on the given CheckMember. Note that
add_member_data_ec2()
must be called subsequently.- Parameters:
check_member (
CheckMember
) – CheckMember (created bycreate_check_member1d()
).reinf_section (
ReinforcedCrossSection
) – Reinforcement of cross-section (created bycreate_reinforced_cross_section()
).description (
str
) – Description/name of the section (default: ‘S{i}’).
- Return type:
- add_member_data_ec2(member, member_type, two_way_slab_type, *, calculation_setup=None, coeff_kx_for_wmax=None, exposure_class_data=None, creep_coefficient=None, relative_humidity=None)
Adds a concrete member Ec2 data to the model.
- Parameters:
member (
CheckMember
) – CheckMember (created bycreate_check_member1d()
). Should be previously added to a check section viaadd_check_section()
.member_type (
MemberType
) – Structural type of member. Must be a valid type corresponding to the reinf_section assigned to the member inadd_check_section()
.two_way_slab_type (
TwoWaySlabType
) – Two-way slab type. Must be a valid type corresponding to the reinf_section assigned to the member inadd_check_section()
.calculation_setup (
CalculationSetup
) – Calculation control settings (default: Capacity N-M(-M) | Shear | Interaction | Stress Limitation | Crack width | Detailing).coeff_kx_for_wmax (
float
) – (Dutch annex only) Coefficient kx to increase limited concrete crack (default: 1.0).exposure_class_data (
ExposureClassesDataEc2
) – Exposure classes (default: no corrosion).creep_coefficient (
float
) – Final value of creep coefficient (default: calculated by IDEA-RCS).relative_humidity (
float
) – Percentage of relative humidity (default: 65).
- Return type:
None
- create_check_member1d(name=None)
Create a member 1D check, which can be used in
add_check_section()
andadd_member_data_ec2()
.- Return type:
- create_cross_section_component(name=None)
Create a cross-section object defined by one or multiple components and add it to the model.
- Parameters:
name (
str
) – Name of cross-section (default: ‘’).- Return type:
- create_cross_section_parameter(cross_section_type, material, name=None, **parameters)
Create a cross-section object defined by parameters and add it to the model.
- Parameters:
cross_section_type (
CrossSectionType
) – Type of cross-section.material (
MatConcrete
) – Material (created bycreate_matconcrete_ec2()
).name (
str
) – Name of cross-section (default: ‘’).parameters (
Any
) – keyword naming should correspond to chosen cross_section_type(!).
- Return type:
The following combinations of cross_section_type and parameters can be used (see the IDEA StatiCa interface for the naming convention):
O
: DRECT
: Width, HeightTRAPEZOID
: H, Bb, BtIGN
: H, Bh, Bs, Ts, Th, TwIGH
: H, Bh, Bs, Ts, Th, Tw, Bfh, TfhBEAM_SHAPE_I_HAUNCH_CHAMFER
: Bbf, Hbf, Hbfh, Bw, H, Htfh, Htf, Btf, BwhTG
: Height, Width, TopFlangeWidth, WallWidthTTFH
: Height, Width, TopFlangeWidth, WallWidth, TopFlangeHaunchTGREV
: Height, Width, TopFlangeWidth, WallWidthTCHAMFER_1
: Height, Width, TopFlangeWidth, WallWidth, TopFlangeHaunch2, WallHaunch2TCHAMFER_2
: Height, Width, TopFlangeWidth, WallWidth, TopFlangeHaunch2, WallHaunch1, WallHaunch2TWH
: Height, Width, TopFlangeWidth, WallWidth, WallHaunchTTFHREV
: Height, Width, TopFlangeWidth, WallWidth, TopFlangeHaunchTWHREV
: Height, Width, TopFlangeWidth, WallWidth, WallHaunch
- create_matconcrete_ec2(base_material, name=None, *, e_modulus=32800, g_modulus=13667, poisson=0.2, unit_mass=2500, specific_heat=0.6, thermal_expansion=1e-05, thermal_conductivity=45, is_default=False, order_in_code=1, thermal_state=None, fck_28=None, stone_diameter=0.016, cement_class=ConcCementClass.R, aggregate_type=ConcAggregateType.QUARTZITE, diagram_type=ConcDiagramType.PARABOLIC, silica_fume=False, plain_concrete_diagram=False, dep_params=None)
Create a material concrete Ec2 object and add it to the model.
- Parameters:
base_material (
ConcreteMaterial
) – IDEA-RCS base material to start with.name (
str
) – Name of the material (default: base_material name).e_modulus (
float
) – Young’s modulus [MPa] (default: 32800 MPa).g_modulus (
float
) – Shear modulus [MPa] (default: 13667 MPa).poisson (
float
) – Poisson’s ratio (default: 0.2).unit_mass (
float
) – Unit mass [kg/m3] (default: 2500 kg/m3).specific_heat (
float
) – Specific heat capacity (default: 0.6).thermal_expansion (
float
) – Thermal expansion [1/K] (default: 1e-05).thermal_conductivity (
float
) – Thermal conductivity (default: 45).is_default (
bool
) – True if material is default material in IDEA-RCS code (default: False).order_in_code (
int
) – Order of this material in the IDEA-RCS code (default: 1).thermal_state (
ThermalState
) – Collection of thermal states for expansion, conductivity, specific heat, stress-strain and strain curvatures (default: ThermalState()).fck_28 (
float
) – Characteristic compressive cylinder strength of concrete at 28 days [MPa] (default: base_material fck).stone_diameter (
float
) – Aggregate size (default: 16 mm).cement_class (
ConcCementClass
) – Cement class (default: R).aggregate_type (
ConcAggregateType
) – Aggregate type (default: Quartzite).diagram_type (
ConcDiagramType
) – Type of stress-strain diagram for ULS calculation (default: Parabolic).silica_fume (
bool
) – Contains silica fume (default: False) (EN 1992-2:2008-07 only).plain_concrete_diagram (
bool
) – Stress strain diagram with tension part (default: False).dep_params (
ConcDependentParams
) – Collection of a series of dependent parameters (see ConcDependentParams for more info). If None, values will be calculated based on ‘fck’ (default: None).
- Return type:
- create_matreinforcement_ec2(base_material, name=None, *, e_modulus=200000, g_modulus=83333, poisson=0.2, unit_mass=7850, specific_heat=0.6, thermal_expansion=1e-05, thermal_conductivity=45, is_default=False, order_in_code=1, thermal_state=None, bar_surface=BarSurface.RIBBED, fyk=None, ftk_by_fyk=None, epsuk=None, ftk=None, class_=ReinfClass.B, type_=ReinfType.BARS, fabrication=ReinfFabrication.HOT_ROLLED, diagram_type=ReinfDiagramType.BILINEAR_INCLINED)
Create a material reinforcement Ec2 object and add it to the model.
- Parameters:
base_material (
ReinforcementMaterial
) – IDEA-RCS base material to start with.name (
str
) – Name of the material (default: base_material name).e_modulus (
float
) – Young’s modulus [MPa] (default: 200000 MPa).g_modulus (
float
) – Shear modulus [MPa] (default: 83333 MPa).poisson (
float
) – Poisson’s ratio (default: 0.2).unit_mass (
float
) – Unit mass [kg/m3] (default: 7850 kg/m3).specific_heat (
float
) – Specific heat capacity (default: 0.6).thermal_expansion (
float
) – Thermal expansion [1/K] (default: 1e-05).thermal_conductivity (
float
) – Thermal conductivity (default: 45).is_default (
bool
) – True if material is default material in IDEA-RCS code (default: False).order_in_code (
int
) – Order of this material in the IDEA-RCS code (default: 1).thermal_state (
ThermalState
) – Collection of thermal states for expansion, conductivity, specific heat, stress-strain and strain curvatures (default: ThermalState()).bar_surface (
BarSurface
) – Bar surface (default: Ribbed).fyk (
float
) – Characteristic yield strength of reinforcement (default: base_material fyk).ftk_by_fyk (
float
) – factor k = ratio ftk / fyk (default: base_material k).epsuk (
float
) – Characteristic strain of reinforcement at maximum load - εuk [x 1e-4].ftk (
float
) – Characteristic tensile strength of reinforcement (default: base_material ftk).class – Class of reinforcement (default: B).
type – Type of reinforcement (default: Bars).
fabrication (
ReinfFabrication
) – Fabrication of reinforcement (default: Hot rolled).diagram_type (
ReinfDiagramType
) – Type of material diagram (default: Bilinear with an inclined top branch).
- Return type:
- create_reinforced_cross_section(cross_section, name=None)
Create a reinforced cross-section object and add it to the model.
- Parameters:
cross_section (
CrossSection
) – Cross-section (created bycreate_cross_section_parameter()
orcreate_cross_section_component()
).name (
str
) – Name of cross-section (default: ‘R{i}’).
- Return type:
OutputFileParser
- class viktor.external.idea_rcs.idea_rcs.OutputFileParser(xml_file)
-
Helper class to extract results from a IDEA-RCS output file (.xml).
Note, for very large result files we advise to make use of
RcsOutputFileParser
instead.- Parameters:
xml_file (
StringIO
) – valid IDEA-RCS XML output file.- Raises:
ParsingError – if ‘xml_file’ can not be parsed (not a valid format).
Example usage:
parser = OutputFileParser(xml_file) for section in parser.section_ids: capacity_results = parser.capacity_results(section) ...
In case you require results which are not supported, you can retrieve the raw results using the
raw_results()
method.- capacity_results(section_id)
Get the result of applied internal forces of all extremes for the section with provided ‘section_id’.
- Parameters:
section_id (
int
) – id of the check section. Must be present in the output file.- Raises:
ParsingError – if ‘section_id’ is not present in output file.
- Return type:
List
[Optional
[Dict
[str
,Any
]]]
See
capacity()
for return format.
- crack_width_results(section_id)
Get the crack width (short/long) results for all extremes for the section with provided ‘section_id’.
- Parameters:
section_id (
int
) – id of the check section. Must be present in the output file.- Raises:
ParsingError – if ‘section_id’ is not present in output file.
- Return type:
List
[Optional
[Dict
[str
,Optional
[Dict
[str
,Any
]]]]]
See
crack_width()
for return format.
- detailing_results(section_id)
Get the unity checks of the longitudinal reinforcement and shear reinforcement for all extremes for the section with provided ‘section_id’.
- Parameters:
section_id (
int
) – id of the check section. Must be present in the output file.- Raises:
ParsingError – if ‘section_id’ is not present in output file.
- Return type:
List
[Optional
[Dict
[str
,Optional
[float
]]]]
See
detailing()
for return format.
- fatigue_results(section_id)
Get the fatigue results for all extremes for the provided ‘section_id’.
- Parameters:
section_id (
int
) – id of the check section. Must be present in the output file.- Raises:
ParsingError – if ‘section_id’ is not present in output file.
- Return type:
List
[Optional
[dict
]]
See
fatigue()
for return format.
- raw_results()
Get the (complete) raw results in dict form. Can be used if results need to be extracted that are not supported by the available methods.
- Return type:
dict
- property section_ids: List[int]
Get all section ids for which results are present in the result file.
- shear_results(section_id)
Get the shear resistances for all extremes for the section with provided ‘section_id’.
- Parameters:
section_id (
int
) – id of the check section. Must be present in the output file.- Raises:
ParsingError – if ‘section_id’ is not present in output file.
- Return type:
List
[Optional
[Dict
[str
,Any
]]]
See
shear()
for return format.
- stress_limitation_results(section_id)
Get the short- and long-term stress limitation results for all extremes for provided ‘section_id’.
- Parameters:
section_id (
int
) – id of the check section. Must be present in the output file.- Raises:
ParsingError – if ‘section_id’ is not present in output file.
- Return type:
List
[Optional
[Dict
[str
,Optional
[float
]]]]
See
stress_limitation()
for return format.
RcsOutputFileParser
- class viktor.external.idea_rcs.idea_rcs.RcsOutputFileParser(xml_file)
-
Parser to extract results from an IDEA-RCS output file (.xml).
Currently the following data can be extracted:
torsion()
(new in v13.4.0)interaction()
(new in v13.4.0)
Example using
File
:xml_file = idea_rcs_analysis.get_output_file(as_file=True) 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) ... # or loop through all extremes within a section for extreme in section_4.extremes(): capacity = extreme['capacity'] ...
Example using BytesIO:
xml_file = idea_rcs_analysis.get_output_file() parser = RcsOutputFileParser(xml_file) for section in parser.section_results(): ...
- Parameters:
xml_file (
BinaryIO
) – IDEA-RCS XML output file (.xml).
- class SectionResult(id_, element)
-
Parsed result section, on which specific results can be retrieved.
Do not instantiate this object directly, but retrieve it through
RcsOutputFileParser.section_results()
.- capacity()
Get the capacity results of all extremes for the current section.
Returns a list of dictionaries (or None if not present for a certain extreme) in the following format:
[ { 'Fu': { 'N': <float>, 'Qy': <float>, 'Qz': <float>, 'Mx': <float>, 'My': <float>, 'Mz': <float> }, 'Fu1': { ... # see 'Fu' } | None, # IDEA-RCS >= v10.1 only, else None 'Fu2': { ... # see 'Fu' } | None, # IDEA-RCS >= v10.1 only, else None 'CheckValue': <float>, 'Result': <str> # new in v13.4.0 } | None, ... ]
- Return type:
List
[Optional
[dict
]]
- crack_width()
Get the crack width (short/long) results for all extremes for the current section.
Returns a list of dictionaries (or None if not present for a certain extreme) in the following format:
[ { 'short': { 'N': <float>, 'My': <float>, 'Mz': <float>, 'W': <float>, 'Wlim': <float>, 'CheckValue': <float>, 'Result': <str> # new in v13.4.0 } | None, 'long': { ... # see 'short' } | None, } | None, ... ]
- Return type:
List
[Optional
[dict
]]
- detailing()
Get the unity checks of the longitudinal reinforcement and shear reinforcement for all extremes for the current section.
Returns a list of dictionaries (or None if not present for a certain extreme) in the following format:
[ { 'longitudinal': <float> | None, 'shear': <float> | None, 'CheckValue': <float>, # new in v13.4.0 'CheckValueLongReinf': <float>, # new in v13.4.0 'CheckValueShearReinf': <float>, # new in v13.4.0 'Result': <str> # new in v13.4.0 } | None, ... ]
- Return type:
List
[Optional
[dict
]]
- extremes()
Get all results combined per extreme for the current section.
Returns a list of dictionaries in the following format:
[ { 'capacity': {...} | None, 'shear': {...} | None, 'torsion': {...} | None, # new in v13.4.0 'interaction': {...} | None, # new in v13.4.0 'crack_width': {...} | None, 'detailing': {...} | None, 'stress_limitation': {...} | None, 'fatigue': {...} | None, }, ... ]
- Return type:
List
[dict
]
- fatigue()
Get the fatigue results for all extremes for the current section.
Returns a list of dictionaries (or None if not present for a certain extreme) in the following format:
[ { 'fatigue': { 'CheckValue': <float>, 'DecisionMethod': <str>, 'Result': <str> # new in v13.4.0 }, 'shear': { 'max': { 'Ved': <float>, 'Vrdc': <float>, 'Vrd': <float>, 'Vrdmax': <float>, 'Vrdr': <float>, 'Vrds': <float>, 'CheckValue': <float>, 'Result': <str> # new in v13.4.0 }, 'min': { ... # see 'max' }, } } | None, ... ]
- Return type:
List
[Optional
[dict
]]
- property id_: int
Returns the ‘SectionId’ of current section.
- interaction()
- New in v13.4.0
Get the interaction results for all extremes for the current section.
Returns a list of dictionaries (or None if not present for a certain extreme) in the following format:
[ { 'Ned': <float>, 'Medy': <float>, 'Medz': <float>, 'Ved': <float>, 'Ted': <float>, 'CheckValue': <float>, 'CheckValueShearAndTorsion': <float>, 'CheckValueShearTorsionAndBending': <float>, 'Result': <str> } | None, ... ]
- Return type:
List
[Optional
[dict
]]
- shear()
Get the shear resistances for all extremes for the current section.
Returns a list of dictionaries (or None if not present for a certain extreme) in the following format:
[ { 'Ved': <float>, 'Vrdc': <float>, 'Vrd': <float>, 'Vrdmax': <float>, 'Vrdr': <float>, 'Vrds': <float>, 'CheckValue': <float>, 'Result': <str> # new in v13.4.0 } | None, ... ]
- Return type:
List
[Optional
[dict
]]
- stress_limitation()
Get the short- and long-term stress limitation results for all extremes for the current section.
Returns a list of dictionaries (or None if not present for a certain extreme) in the following format:
[ { 'Check_7_2_2_Concrete_fck': { # new in v13.4.0 'short': { 'Stress': <float> | None, 'CheckValue': <float>, 'Result': <str> } | None, 'long': { ... # see 'short' } | None } | None, 'Check_7_2_3_Concrete_fck': { # new in v13.4.0 ... # see 'Check_7_2_2_Concrete_fck' } | None, 'Check_7_2_5_Tendons_fpk': { # new in v13.4.0 ... # see 'Check_7_2_2_Concrete_fck' } | None, 'Check_7_2_5_ReinforcementBars_fyk': { # new in v13.4.0 ... # see 'Check_7_2_2_Concrete_fck' } | None, 'Check_5_10_3_2_Tendons': { # new in v13.4.0 ... # see 'Check_7_2_2_Concrete_fck' } | None, 'Check_5_10_2_1_1_Tendons': { # new in v13.4.0 ... # see 'Check_7_2_2_Concrete_fck' } | None, 'short': { 'Check_7_2_2_Concrete_fck': <float> | None, ... # see above for all keys } | None, 'long': { 'Check_7_2_2_Concrete_fck': <float> | None, ... # see above for all keys } | None, } | None, ... ]
- Return type:
List
[Optional
[dict
]]
- torsion()
- New in v13.4.0
Get the torsion results for all extremes for the current section.
Returns a list of dictionaries (or None if not present for a certain extreme) in the following format:
[ { 'Ted': <float>, 'Trdc': <float>, 'Trdmax': <float>, 'Trds': <float>, 'Trd': <float>, 'CheckValue': <float>, 'Result': <str> } | None, ... ]
- Return type:
List
[Optional
[dict
]]
- section_result(id_)
Retrieve the section result of the provided id.
- Return type:
- section_results()
Iterates through all section results.
Usage:
for section in parser.section_results(): capacity_results = section.capacity() if section.id_ == 3: ...
- Return type:
Iterator
[SectionResult
]