viktor.external.scia
CalcSetting
- class viktor.external.scia.scia.CalcSetting(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
Enumeration of calculation settings:
- CSS:
CalcSetting
= 'CSS'
- EIG:
CalcSetting
= 'EIG'
- INF:
CalcSetting
= 'INF'
- LIN:
CalcSetting
= 'LIN'
- MOB:
CalcSetting
= 'MOB'
- NEL:
CalcSetting
= 'NEL'
- NOC:
CalcSetting
= 'NOC'
- NONE:
CalcSetting
= 'NONE'
- NPH:
CalcSetting
= 'NPH'
- NST:
CalcSetting
= 'NST'
- PHA:
CalcSetting
= 'PHA'
- SLN:
CalcSetting
= 'SLN'
- STB:
CalcSetting
= 'STB'
- TDA:
CalcSetting
= 'TDA'
- TID:
CalcSetting
= 'TID'
- CSS:
Model
- class viktor.external.scia.scia.Model(*, mesh_setup=None, solver_setup=None, project_data=None)
-
This Model can be used to construct a SCIA model and generate its corresponding input XML file. This file can in turn be used as input of
SciaAnalysis
. For a more detailed elaboration, please see the tutorial.Example usage:
# Initialize the model model = Model() # Construct the geometry n1 = model.create_node('K:1', 0, 0, 0) n2 = model.create_node('K:2', 1, 0, 0) css = model.create_circular_cross_section('css', Material(123, 'some_material'), 100) beam = model.create_beam(n1, n2, css) #Construct the boundary conditions freedom = (PointSupport.Freedom.RIGID, PointSupport.Freedom.RIGID, PointSupport.Freedom.RIGID, PointSupport.Freedom.RIGID, PointSupport.Freedom.RIGID, PointSupport.Freedom.RIGID) model.create_point_support('Sn1', n1, PointSupport.Type.STANDARD, freedom, (0, 0, 0, 0, 0, 0), PointSupport.CSys.GLOBAL) # Construct a load combination load_group = model.create_load_group('LG1', LoadGroup.LoadOption.VARIABLE, LoadGroup.RelationOption.STANDARD, LoadGroup.LoadTypeOption.CAT_A) load_case = model.create_variable_load_case('LC1', 'My first load case', load_group, LoadCase.VariableLoadType.STATIC, LoadCase.Specification.STANDARD, LoadCase.Duration.SHORT) model.create_load_combination('C1', LoadCombination.Type.ENVELOPE_ULTIMATE, {load_case: 1}) # Generate the input XML file input_xml = model.generate_xml_input()
- Parameters:
mesh_setup (
MeshSetup
) – Optional mesh settings.solver_setup (
SolverSetup
) – Optional solver settingsNew in v13.1.0.project_data (
ProjectData
) – Optional project settingsNew in v13.1.0.
- property arbitrary_profiles: Tuple[ArbitraryProfile, ...]
- property averaging_strips: Tuple[AveragingStrip, ...]
- create_arbitrary_profile(name, beam, c_def, cross_section, spans)
Method to construct an arbitrary profile.
- Parameters:
name (
str
) – name which will be shown in SCIAbeam (
Beam
) – beam object (create_beam()
).c_def (
CDef
) – enumeration of coordinate definition typescross_section (
CrossSection
) – previously created cross-section objectspans (
List
[ArbitraryProfileSpan
]) – list of arbitrary profile span objects (create_arbitrary_profile_span()
).
- Return type:
- create_arbitrary_profile_span(length, type_of_css, cross_section_start, cross_section_end, alignment)
Method to construct an arbitrary profile span, which is necessary to construct an arbitrary profile.
- Parameters:
length (
float
) – length of the spantype_of_css (
TypeOfCss
) – enumeration of cross-section typescross_section_start (
CrossSection
) – previously created cross-section object at the start pointcross_section_end (
CrossSection
) – previously created cross-section object at the end pointalignment (
Alignment
) – enumeration of alignment types
- Return type:
- create_averaging_strip(plane, *, strip_type, point_1, width, length, angle, direction, name=None)
- New in v14.3.0
Method to construct an averaging strip, which can be used for the automatic averaging of peak results.
- Parameters:
plane (
Plane
) – plane object (create_plane()
).strip_type (
Type
) – Currently only Point type is supportedpoint_1 (
Tuple
[float
,float
,float
]) – tuple of coordinates (x, y, z) of the center position in [m]width (
float
) – width of the strip in [m]length (
float
) – length of the strip in [m]angle (
float
) – defines the direction of the strip [deg]direction (
Direction
) – direction in which the averaging is to be calculatedname (
str
) – name which will be shown in SCIA (default: ‘RS{i}’)
- Return type:
- create_beam(begin_node, end_node, cross_section, *, name=None, ez=None, lcs_rotation=None, layer=None)
Method to construct a beam.
- Parameters:
begin_node (
Node
) – node object (create_node()
) at the start of the beam.end_node (
Node
) – node object (create_node()
) at the end of the beam.cross_section (
CrossSection
) – previously created cross-section objectname (
str
) – name which will be shown in SCIA (default: ‘B{i}’)ez (
float
) – eccentricity in Z-direction w.r.t. the beam’s center line in [m] (default: 0)lcs_rotation (
float
) – rotation of local coordinate system [deg] (default: 0)layer (
Layer
) – layer object (create_layer()
) to which the beam will be added
- Return type:
- create_circular_composed_cross_section(name, material, material_2, diameter, thickness)
Method to construct a circular cross-section, composed of two materials.
- Parameters:
- Return type:
- create_circular_cross_section(name, material, diameter)
Method to construct a circular cross-section.
- Parameters:
name (
str
) – name which will be shown in SCIAmaterial (
Material
) – material of the cross-sectiondiameter (
float
) – diameter of the cross-section in [m]
- Return type:
- create_circular_hollow_cross_section(name, material, diameter, thickness)
Method to construct a circular hollow cross-section.
- Parameters:
name (
str
) – name which will be shown in SCIAmaterial (
Material
) – material of the cross-sectiondiameter (
float
) – diameter of the cross-section in [m]thickness (
float
) – thickness in [m]
- Return type:
- create_circular_plane(center_node, diameter, thickness, *, material, axis=None, name=None, plane_type=None, layer=None, internal_nodes=None, swap_orientation=None, lcs_rotation=None, fem_model=None, orthotropy=None)
Method to construct a circular 2D member.
- Parameters:
center_node (
Node
) – node object (create_node()
) located at the center of the planediameter (
float
) – diameter of the plane [m]thickness (
float
) – thickness of the plane [m]material (
Material
) –Material
of the planeaxis (
Union
[Vector
,Tuple
[float
,float
,float
]]) – axis direction (default: (0, 0, 1))name (
str
) – name which will be shown in SCIA (default: ‘S{i}’)plane_type (
Type
) – enumeration of plane types (default: PLATE)layer (
Layer
) – layer object (create_layer()
) to which the plane will be addedinternal_nodes (
List
[Node
]) – list of internal node objects (default: None)swap_orientation (
bool
) – whereas to swap the plate orientation (default: False)lcs_rotation (
float
) – rotation of the local coordinate system [deg] (default: 0.0)fem_model (
FEMModel
) – FEM model to be used in the calculation (default: isotropic)orthotropy (
Orthotropy
) – type of orthotropy (only for fem_model = ORTHOTROPIC)
- Return type:
- create_cross_link(beam_1, beam_2, *, name=None)
- New in v13.1.0
Method to construct a cross-link, connecting two beams.
- Parameters:
beam_1 (
Beam
) – first beam (create_beam()
)beam_2 (
Beam
) – second beam (create_beam()
)name (
str
) – name which will be shown in SCIA (default: ‘CL{i}’)
- Return type:
- create_free_line_load(name, load_case, point_1, point_2, direction, magnitude_1, magnitude_2)
Method to construct a free line load.
- Parameters:
name (
str
) – name which will be shown in SCIAload_case (
LoadCase
) – previously created load case object in which the load should be placedpoint_1 (
Tuple
[float
,float
]) – XY coordinate of the first pointpoint_2 (
Tuple
[float
,float
]) – XY coordinate of the second pointdirection (
Direction
) – enumeration of direction optionsmagnitude_1 (
float
) – magnitude of the load in point_1 in [N]magnitude_2 (
float
) – magnitude of the load in point_2 in [N]
- Return type:
- create_free_point_load(name, load_case, direction, magnitude, position)
Method to construct a free point load.
- Parameters:
name (
str
) – name which will be shown in SCIAload_case (
LoadCase
) – previously created load case object in which the load should be placeddirection (
Direction
) – enumeration of direction optionsmagnitude (
float
) – magnitude of the load in [N]position (
Tuple
[float
,float
]) – XY coordinate of the load
- Return type:
- create_free_surface_load(name, load_case, direction, q1, q2=None, q3=None, points=None, *, distribution=None, selection=None)
Method to construct a free surface load.
Note: can only be defined in XY-plane.
- Parameters:
name (
str
) – name which will be shown in SCIAload_case (
LoadCase
) – previously created load case object in which the load should be placeddirection (
Direction
) – direction of the loadq1 (
float
) – magnitude of the load in the first point in [N]q2 (
float
) – magnitude of the load in the second point in [N] (distribution = DIR_X | DIR_Y | POINTS only)q3 (
float
) – magnitude of the load in the third point in [N] (distribution = POINTS only)points (
List
[Tuple
[float
,float
]]) – list of XY coordinates (at least 3). If distribution = DIR_X | DIR_Y: q1 and q2 are applied to points[0] and points[1] respectively. If distribution = POINTS: q1, q2 and q3 are applied to points[0], points[1] and points[2] respectively.distribution (
Distribution
) – distribution of the load (default: POINTS)selection (
List
[Plane
]) – selection of 1 or more planes (create_plane()
) to generate the load on (default: select = auto)
- Return type:
- create_general_cross_section(elements, *, name=None)
- New in v14.7.0
Construct a general cross-section.
- Parameters:
name (
str
) – name of the cross-section (default: ‘CS{i}’)elements (
Sequence
[GeneralCrossSectionElement
]) – elements (polygon + openings) that build up the cross-section
- Return type:
- create_general_cross_section_element(name, element_type, points, *, material=None)
- New in v14.7.0
Construct a general cross-section element, which is necessary to construct a general cross-section.
- Parameters:
- Return type:
- create_hinge_on_beam(beam, position, *, name=None, freedom_ux=Freedom.RIGID, freedom_uy=Freedom.RIGID, freedom_uz=Freedom.RIGID, freedom_fix=Freedom.RIGID, freedom_fiy=Freedom.FREE, freedom_fiz=Freedom.RIGID, stiffness_ux=0, stiffness_uy=0, stiffness_uz=0, stiffness_fix=0, stiffness_fiy=0, stiffness_fiz=0)
Create a hinge on a beam.
- Parameters:
beam (
Beam
) – Beam of appliance (create_beam()
).position (
Position
) – Position of appliance.name (
str
) – Name of the hinge (default: ‘H{i}’).freedom_ux (
Freedom
) – Freedom in ux (default: rigid).freedom_uy (
Freedom
) – Freedom in uy (default: rigid).freedom_uz (
Freedom
) – Freedom in uz (default: rigid).freedom_fix (
Freedom
) – Freedom in fix (default: rigid).freedom_fiy (
Freedom
) – Freedom in fiy (default: free).freedom_fiz (
Freedom
) – Freedom in fiz (default: rigid).stiffness_ux (
float
) – Stiffness in ux [N/m], only used if freedom in ux = flexible (default: 0.0).stiffness_uy (
float
) – Stiffness in uy [N/m], only used if freedom in uy = flexible (default: 0.0).stiffness_uz (
float
) – Stiffness in uz [N/m], only used if freedom in uz = flexible (default: 0.0).stiffness_fix (
float
) – Stiffness in fix [Nm/rad], only used if freedom in fix = flexible (default: 0.0).stiffness_fiy (
float
) – Stiffness in fiy [Nm/rad], only used if freedom in fiy = flexible (default: 0.0).stiffness_fiz (
float
) – Stiffness in fiz [Nm/rad], only used if freedom in fiz = flexible (default: 0.0).
- Return type:
- create_hinge_on_plane(edge, *, name=None, ux=None, stiffness_ux=None, uy=None, stiffness_uy=None, uz=None, stiffness_uz=None, fix=None, stiffness_fix=None, c_def=None, position_x1=None, position_x2=None, origin=None)
Method to construct a hinge on a plane edge.
- Parameters:
edge (
Union
[Tuple
[Plane
,int
],InternalEdge
]) – tuple of a plane object (create_plane()
) and edge number to which the hinge will be attached (1 = between plane.corner_nodes[0] and plane.corner_nodes[1], etc.), or InternalEdge (create_internal_edge()
)name (
str
) – name which will be shown in SCIA (default: ‘L{i}’)ux (
Freedom
) – Freedom in ux (default: RIGID).stiffness_ux (
float
) – Stiffness in ux [N/m2], only used if freedom in ux = flexible (default: 0.0).uy (
Freedom
) – Freedom in uy (default: RIGID).stiffness_uy (
float
) – Stiffness in uy [N/m2], only used if freedom in uy = flexible (default: 0.0).uz (
Freedom
) – Freedom in uz (default: RIGID).stiffness_uz (
float
) – Stiffness in uz [N/m2], only used if freedom in uz = flexible (default: 0.0).fix (
Freedom
) – Freedom in fix (default: FREE).stiffness_fix (
float
) – Stiffness in fix [Nm/m/rad], only used if freedom in fix = flexible (default: 0.0).c_def (
CDef
) – coordinate definition (default: RELATIVE)position_x1 (
float
) – position of p1 along the edge with respect to origin ([m] if c_def = ABSOLUTE, else [-]) (default: 0.0)position_x2 (
float
) – position of p2 along the edge with respect to origin ([m] if c_def = ABSOLUTE, else [-]) (default: 1.0)origin (
Origin
) – reference for position_x1 and position_x2 (default: FROM_START)
- Return type:
- create_integration_strip(plane, point_1, point_2, width)
Method to construct an integration strip, which can be used to receive calculation results on its position.
- Parameters:
plane (
Plane
) – plane object (create_plane()
).point_1 (
Tuple
[float
,float
,float
]) – tuple of coordinates (x, y, z) of the start position in [m]point_2 (
Tuple
[float
,float
,float
]) – tuple of coordinates (x, y, z) of the end position in [m]width (
float
) – width of the strip in [m]
- Return type:
- create_internal_edge(plane, node_1, node_2, *, name=None)
Method to construct an internal edge in a 2D member.
- Parameters:
plane (
Plane
) – plane object (create_plane()
)node_1 (
Node
) – node object (create_node()
) at the start of the edgenode_2 (
Node
) – node object (create_node()
) at the end of the edgename (
str
) – name which will be shown in SCIA (default: ‘ES{i}’)
- Return type:
- create_layer(name=None, *, comment=None, structural_model_only=None, current_used_activity=None)
Method to construct a layer.
Duplicate layer names are not allowed.
- Parameters:
name (
str
) – name of the layer (default: ‘Layer{i}’)comment (
str
) – optional commentstructural_model_only (
bool
) – when ‘True’, the layer is NOT taken into account for the calculation (default: False)current_used_activity (
bool
) – defines if the layer is visible or not on the screen (default: True)
- Return type:
- create_library_cross_section(section, profile, material, *, name=None)
- New in v13.1.0
Method to construct a cross-section that is part of the cross-section library.
- Parameters:
- Return type:
- create_line_load(name, load_case, beam, load_type, distribution, load_start, load_end, direction, position_start, position_end, c_def, c_sys, origin, ey, ez)
Method to construct a line load on a beam.
- Parameters:
name (
str
) – name which will be shown in SCIAload_case (
LoadCase
) – previously created load case object in which the load should be placedbeam (
Beam
) – beam object (create_beam()
) to which the load should be appliedload_type (
Type
) – enumeration of load typesdistribution (
Distribution
) – enumeration of distribution optionsload_start (
float
) – magnitude of the load at the start point in [N]load_end (
float
) – magnitude of the load at the end point in [N]direction (
Direction
) – enumeration of directionsposition_start (
float
) – position of the start point on the beam in [m]position_end (
float
) – position of the end point on the beam in [m]c_def (
CDef
) – enumeration of coordinate definition typesc_sys (
CSys
) – enumeration of coordinate system typesorigin (
Origin
) – enumeration of origin typesey (
float
) – eccentricity in Y-direction w.r.t. the beam’s center line in [m]ez (
float
) – eccentricity in Z-direction w.r.t. the beam’s center line in [m]
- Return type:
- create_line_load_on_plane(edge, p1, p2=None, *, load_case, direction=None, name=None, location=None, c_sys=None, c_def=None, position_x1=None, position_x2=None, origin=None)
Method to construct a line load on a plane edge.
- Parameters:
edge (
Union
[Tuple
[Plane
,int
],InternalEdge
]) – tuple of a plane object (create_plane()
) and edge number to which the load will be applied (1 = between plane.corner_nodes[0] and plane.corner_nodes[1], etc.), or InternalEdge (create_internal_edge()
)p1 (
float
) – magnitude of the load [N/m] on point 1p2 (
float
) – magnitude of the load [N/m] on point 2. None for uniform load (with magnitude p1) (default: None)load_case (
LoadCase
) – previously created load case object in which the load should be applieddirection (
Direction
) – direction of the load (default: Z)name (
str
) – name which will be shown in SCIA (default: ‘LFS{i}’)location (
Location
) – location type (default: LENGTH)c_sys (
CSys
) – coordinate system (default: LOCAL)c_def (
CDef
) – coordinate definition (default: RELATIVE)position_x1 (
float
) – position of p1 along the edge with respect to origin ([m] if c_def = ABSOLUTE, else [-]) (default: 0.0)position_x2 (
float
) – position of p2 along the edge with respect to origin ([m] if c_def = ABSOLUTE, else [-]) (default: 1.0)origin (
Origin
) – reference for position_x1 and position_x2 (default: FROM_START)
- Return type:
- create_line_moment_on_beam(beam, load_case, m1, m2=None, *, name=None, direction=None, c_def=None, position_x1=None, position_x2=None, origin=None)
Method to construct a line moment on a beam.
- Parameters:
beam (
Beam
) – beam object (create_beam()
) to which the load should be appliedload_case (
LoadCase
) – previously created load case object in which the load should be appliedm1 (
float
) – magnitude of the moment [Nm/m] on point 1m2 (
float
) – magnitude of the moment [Nm/m] on point 2. None for uniform load (with magnitude m1) (default: None)name (
str
) – name which will be shown in SCIA (default: ‘LM{i}’)direction (
Direction
) – direction of the moment (default: Z)c_def (
CDef
) – coordinate definition (default: RELATIVE)position_x1 (
float
) – position of p1 along the beam with respect to origin ([m] if c_def = ABSOLUTE, else [-]) (default: 0.0)position_x2 (
float
) – position of p2 along the beam with respect to origin ([m] if c_def = ABSOLUTE, else [-]) (default: 1.0)origin (
Origin
) – reference for position_x1 and position_x2 (default: FROM_START)
- Return type:
- create_line_moment_on_plane(edge, m1, m2=None, *, load_case, name=None, direction=None, c_def=None, position_x1=None, position_x2=None, origin=None)
Method to construct a line moment on a plane edge.
- Parameters:
edge (
Union
[Tuple
[Plane
,int
],InternalEdge
]) – tuple of the plane object (create_plane()
) and edge number to which the load should be applied (1 = between plane.corner_nodes[0] and plane.corner_nodes[1], etc.), or InternalEdge (create_internal_edge()
)m1 (
float
) – magnitude of the moment [Nm/m] on point 1m2 (
float
) – magnitude of the moment [Nm/m] on point 2. None for uniform load (with magnitude m1) (default: None)load_case (
LoadCase
) – previously created load case object in which the load should be appliedname (
str
) – name which will be shown in SCIA (default: ‘LMS{i}’)direction (
Direction
) – direction of the moment (default: Z)c_def (
CDef
) – coordinate definition (default: RELATIVE)position_x1 (
float
) – position of p1 along the edge with respect to origin ([m] if c_def = ABSOLUTE, else [-]) (default: 0.0)position_x2 (
float
) – position of p2 along the edge with respect to origin ([m] if c_def = ABSOLUTE, else [-]) (default: 1.0)origin (
Origin
) – reference for position_x1 and position_x2 (default: FROM_START)
- Return type:
- create_line_support_on_beam(beam, *, name=None, x=None, stiffness_x=None, function_x=None, y=None, stiffness_y=None, function_y=None, z=None, stiffness_z=None, function_z=None, rx=None, stiffness_rx=None, function_rx=None, ry=None, stiffness_ry=None, function_ry=None, rz=None, stiffness_rz=None, function_rz=None, c_sys=None, extent=None, c_def=None, position_x1=None, position_x2=None, origin=None)
Method to construct a line support on a beam.
- Parameters:
beam (
Beam
) – beam object (create_beam()
) to which the line support will be appliedname (
str
) – name which will be shown in SCIA (default: ‘Slb{i}’)x (
Freedom
) – constraint type in X-direction (default: RIGID)stiffness_x (
float
) – stiffness in X-direction [N/m2] (only for x = FLEXIBLE | FLEXIBLE_PRESS_ONLY | FLEXIBLE_TENSION_ONLY | NONLINEAR)function_x (
NonLinearFunction
) – non-linear function in X-direction (only for x = NONLINEAR)y (
Freedom
) – constraint type in Y-direction (default: RIGID)stiffness_y (
float
) – stiffness in Y-direction [N/m2] (only for y = FLEXIBLE | FLEXIBLE_PRESS_ONLY | FLEXIBLE_TENSION_ONLY | NONLINEAR)function_y (
NonLinearFunction
) – non-linear function in Y-direction (only for y = NONLINEAR)z (
Freedom
) – constraint type in Z-direction (default: RIGID)stiffness_z (
float
) – stiffness in Z-direction [N/m2] (only for z = FLEXIBLE | FLEXIBLE_PRESS_ONLY | FLEXIBLE_TENSION_ONLY | NONLINEAR)function_z (
NonLinearFunction
) – non-linear function in Z-direction (only for z = NONLINEAR)rx (
Freedom
) – constraint type in X-rotation (default: RIGID)stiffness_rx (
float
) – stiffness in X-rotation [Nm/m/rad] (only for rx = FLEXIBLE | NONLINEAR)function_rx (
NonLinearFunction
) – non-linear function in X-rotation (only for rx = NONLINEAR)ry (
Freedom
) – constraint type in Y-rotation (default: RIGID)stiffness_ry (
float
) – stiffness in Y-rotation [Nm/m/rad] (only for ry = FLEXIBLE | NONLINEAR)function_ry (
NonLinearFunction
) – non-linear function in Y-rotation (only for ry = NONLINEAR)rz (
Freedom
) – constraint type in Z-rotation (default: RIGID)stiffness_rz (
float
) – stiffness in Z-rotation [Nm/m/rad] (only for rz = FLEXIBLE | NONLINEAR)function_rz (
NonLinearFunction
) – non-linear function in Z-rotation (only for rz = NONLINEAR)c_sys (
CSys
) – coordinate system (default: LOCAL)extent (
Extent
) – extension of support (default: FULL)c_def (
CDef
) – coordinate definition (default: RELATIVE)position_x1 (
float
) – start of support along the edge with respect to origin ([m] if c_def = ABSOLUTE, else [-]) (default: 0.0)position_x2 (
float
) – end of support along the edge with respect to origin ([m] if c_def = ABSOLUTE, else [-]) (default: 1.0)origin (
Origin
) – reference for position_x1 and position_x2 (default: FROM_START)
- Return type:
- create_line_support_on_plane(edge, *, name=None, x=None, stiffness_x=None, y=None, stiffness_y=None, z=None, stiffness_z=None, rx=None, stiffness_rx=None, ry=None, stiffness_ry=None, rz=None, stiffness_rz=None, c_sys=None, c_def=None, position_x1=None, position_x2=None, origin=None)
Method to construct a line support on a plane edge.
- Parameters:
edge (
Union
[Tuple
[Plane
,int
],InternalEdge
]) – tuple of the plane object (create_plane()
) and edge number to which the load should be applied (1 = between plane.corner_nodes[0] and plane.corner_nodes[1], etc.), or InternalEdge (create_internal_edge()
)name (
str
) – name which will be shown in SCIA (default: ‘Sle{i}’)x (
Freedom
) – constraint type in X-direction (default: FREE)stiffness_x (
float
) – stiffness in X-direction [N/m2] (only for x = FLEXIBLE)y (
Freedom
) – constraint type in Y-direction (default: FREE)stiffness_y (
float
) – stiffness in Y-direction [N/m2] (only for y = FLEXIBLE)z (
Freedom
) – constraint type in Z-direction (default: FREE)stiffness_z (
float
) – stiffness in Z-direction [N/m2] (only for z = FLEXIBLE)rx (
Freedom
) – constraint type in X-rotation (default: FREE)stiffness_rx (
float
) – stiffness in X-rotation [Nm/m/rad] (only for rx = FLEXIBLE)ry (
Freedom
) – constraint type in Y-rotation (default: FREE)stiffness_ry (
float
) – stiffness in Y-rotation [Nm/m/rad] (only for ry = FLEXIBLE)rz (
Freedom
) – constraint type in Z-rotation (default: FREE)stiffness_rz (
float
) – stiffness in Z-rotation [Nm/m/rad] (only for rz = FLEXIBLE)c_sys (
CSys
) – coordinate system (default: GLOBAL)c_def (
CDef
) – coordinate definition (default: RELATIVE)position_x1 (
float
) – start of support along the edge with respect to origin ([m] if c_def = ABSOLUTE, else [-]) (default: 0.0)position_x2 (
float
) – end of support along the edge with respect to origin ([m] if c_def = ABSOLUTE, else [-]) (default: 1.0)origin (
Origin
) – reference for position_x1 and position_x2 (default: FROM_START)
- Return type:
- create_load_combination(name, load_type, load_cases, *, description=None)
Method to construct a load combination.
- Parameters:
- Return type:
- create_load_group(name, load_option, relation=None, load_type=None)
Method to construct a load group.
- Parameters:
name (
str
) – name which will be shown in SCIAload_option (
LoadOption
) – enumeration of load option typesrelation (
RelationOption
) – enumeration of relation typesload_type (
LoadTypeOption
) – enumeration of load types
- Return type:
- create_node(name, x, y, z)
Method to construct a node.
- Parameters:
name (
str
) – name which will be shown in SCIAx (
float
) – X-coordinate in [m]y (
float
) – Y-coordinate in [m]z (
float
) – Z-coordinate in [m]
- Return type:
- create_nonlinear_function(name, function_type, positive_end, negative_end, impulse)
Method to construct a non-linear function.
- Parameters:
name (
str
) – name of the functionfunction_type (
Type
) – type of functionpositive_end (
Support
) – type of support at positive endnegative_end (
Support
) – type of support at negative endimpulse (
List
[Tuple
[float
,float
]]) – impulse function X-Y values in [m, N] (if function_type = TRANSLATION), [rad, Nm] (if function_type = ROTATION), or [m, Pa] (if function_type = NONLINEAR_SUBSOIL)
- Return type:
- create_nonlinear_load_combination(load_type, load_cases, *, name=None, description=None)
Create a non-linear load combination.
- Parameters:
- Return type:
- create_numerical_cross_section(name, material, *, A=None, Ay=None, Az=None, AL=None, AD=None, cYUCS=None, cZUCS=None, alpha=None, Iy=None, Iz=None, Wely=None, Welz=None, Wply=None, Wplz=None, Mply_plus=None, Mply_min=None, Mplz_plus=None, Mplz_min=None, dy=None, dz=None, It=None, Iw=None, beta_y=None, beta_z=None)
Method to construct a numerical cross-section.
- Parameters:
name (
str
) – name which will be shown in SCIAmaterial (
Material
) – material of the cross-sectionA (
float
) – cross-sectional area [m²]Ay (
float
) – shear area in y-direction [m²]Az (
float
) – shear area in z-direction [m²]AL (
float
) – circumference per unit length [m²/m]AD (
float
) – drying surface per unit length [m²/m]cYUCS (
float
) – centroid in y-direction of input axis system [mm]cZUCS (
float
) – centroid in z-direction of input axis system [mm]alpha (
float
) – rotation angle of axis system [deg]Iy (
float
) – moment of inertia about the y-axis [m⁴]Iz (
float
) – moment of inertia about the z-axis [m⁴]Wely (
float
) – elastic section modulus about the y-axis [m³]Welz (
float
) – elastic section modulus about the z-axis [m³]Wply (
float
) – plastic section modulus about the y-axis [m³]Wplz (
float
) – plastic section modulus about the z-axis [m³]Mply_plus (
float
) – plastic moment about the y-axis for positive My moment [Nm]Mply_min (
float
) – plastic moment about the y-axis for negative My moment [Nm]Mplz_plus (
float
) – plastic moment about the z-axis for positive My moment [Nm]Mplz_min (
float
) – plastic moment about the z-axis for negative My moment [Nm]dy (
float
) – shear center coordinate in y-axis, measured from centroid [mm]dz (
float
) – shear center coordinate in z-axis, measured from centroid [mm]It (
float
) – torsional constant [m⁴]Iw (
float
) – warping constant [m⁶]beta_y (
float
) – mono-symmetry constant about the y-axis [mm]beta_z (
float
) – mono-symmetry constant about the z-axis [mm]
- Return type:
- create_open_slab(name, plane, corner_nodes)
Method to construct an open slab in a 2D member.
- Parameters:
name (
str
) – name which will be shown in SCIAplane (
Plane
) – plane object (create_plane()
).corner_nodes (
List
[Node
]) – list of node objects located at the corners
- Return type:
- create_orthotropy(name, material, thickness, D11=None, D22=None, D12=None, D33=None, D44=None, D55=None, d11=None, d22=None, d12=None, d33=None, kxy=None, kyx=None)
Method to construct a type of orthotropy.
- Parameters:
name (
str
) – name of the orthotropymaterial (
Material
) – materialthickness (
float
) – thickness of the plate / wall [m]D11 (
float
) – (plate) stiffness matrix parameter [Nm]D22 (
float
) – (plate) stiffness matrix parameter [Nm]D12 (
float
) – (plate) stiffness matrix parameter [Nm]D33 (
float
) – (plate) stiffness matrix parameter [Nm]D44 (
float
) – (plate) stiffness matrix parameter [N/m]D55 (
float
) – (plate) stiffness matrix parameter [N/m]d11 (
float
) – (membrane) stiffness matrix parameter [N/m]d22 (
float
) – (membrane) stiffness matrix parameter [N/m]d12 (
float
) – (membrane) stiffness matrix parameter [N/m]d33 (
float
) – (membrane) stiffness matrix parameter [N/m]kxy (
float
) – stiffness coefficient [N/m]kyx (
float
) – stiffness coefficient [N/m]
- Return type:
- create_permanent_load_case(name, description, load_group, load_type, direction=None, primary_effect=None)
Method to construct a permanent load case.
- Parameters:
name (
str
) – name which will be shown in SCIAdescription (
str
) – description which will be shown in SCIAload_group (
LoadGroup
) – load group object (create_load_group()
) in which the load case should be placed.load_type (
PermanentLoadType
) – permanent load typesdirection (
Direction
) – load direction in case of a SELF_WEIGHT load type (default: NEG_Z)primary_effect (
LoadCase
) – previously created load case object in case the selected load type is PRIMARY_EFFECT
- Return type:
- create_plane(corner_nodes, thickness, *, material, name=None, plane_type=None, layer=None, internal_nodes=None, swap_orientation=None, lcs_rotation=None, fem_model=None, orthotropy=None)
Method to construct a 2D member.
- Parameters:
corner_nodes (
List
[Node
]) – list of node objects located at the cornersthickness (
float
) – thickness of the plane in [m]material (
Material
) –Material
of the planename (
str
) – name which will be shown in SCIA (default: ‘S{i}’)plane_type (
Type
) – enumeration of plane types (default: PLATE)layer (
Layer
) – layer object (create_layer()
) to which the plane will be addedinternal_nodes (
List
[Node
]) – list of internal node objects (default: None)swap_orientation (
bool
) – whereas to swap the plate orientation (default: False)lcs_rotation (
float
) – rotation of the local coordinate system [deg] (default: 0.0)fem_model (
FEMModel
) – FEM model to be used in the calculation (default: isotropic)orthotropy (
Orthotropy
) – type of orthotropy (only for fem_model = ORTHOTROPIC)
- Return type:
- create_point_load(name, load_case, beam, direction, load_type, load_value, c_sys=None, c_def=None, position_x=None, origin=None, repeat=None, ey=None, ez=None, *, angle=None)
Method to construct a point load on a beam.
- Parameters:
name (
str
) – name which will be shown in SCIAload_case (
LoadCase
) – previously created load case object in which the load should be placedbeam (
Beam
) – beam object (create_beam()
) to which the load should be applieddirection (
Direction
) – enumeration of directionsload_type (
Type
) – enumeration of load typesload_value (
float
) – magnitude of the load in [N]c_sys (
CSys
) – enumeration of coordinate system types (default: global)c_def (
CDef
) – enumeration of coordinate definition types (default: relative)position_x (
float
) – position of the load (default: 0)origin (
Origin
) – enumeration of origin types (default: from start)repeat (
int
) – number of loads acting on the beam, distributed uniformly (default: 1)ey (
float
) – eccentricity in Y-direction w.r.t. the beam’s center line in [m] (default: 0)ez (
float
) – eccentricity in Z-direction w.r.t. the beam’s center line in [m] (default: 0)angle (
Tuple
[float
,float
,float
]) – angle (Rx, Ry, Rz) [deg] of the load around the respective X-, Y- and Z-axis (default: 0)
- Return type:
- create_point_load_node(node, load_case, load, *, name=None, direction=None, c_sys=None, angle=None)
Method to construct a point load in a node.
- Parameters:
node (
Node
) – node object (create_node()
) on which the load should be appliedload_case (
LoadCase
) – previously created load case object in which the load should be placedload (
float
) – magnitude of the load in [N]name (
str
) – name which will be shown in SCIA (default: ‘F{i}’)direction (
Direction
) – direction of the load (default: Z)c_sys (
CSys
) – coordinate system (default: global)angle (
Tuple
[float
,float
,float
]) – angle (Rx, Ry, Rz) [deg] of the load around the respective global X-, Y- and Z-axis
- Return type:
- create_point_moment_node(node, load_case, load, direction, name=None, c_sys=CSys.GLOBAL)
Create a point moment on an existing node.
- Parameters:
node (
Node
) – Node of appliance (create_node()
).load_case (
LoadCase
) – Previously created load case of appliance.load (
float
) – Magnitude of the load [Nm].direction (
Direction
) – Direction of the load.name (
str
) – Name of the load in SCIA (default: ‘M{i}’).c_sys (
CSys
) – Coordinate system (default: global).
- Return type:
- create_point_support(name, node, spring_type, freedom, stiffness, c_sys, default_size=0.2, *, angle=None)
Method to construct a point support.
- Parameters:
name (
str
) – name which will be shown in SCIAnode (
Node
) – node object (create_node()
) to which the support will be attached.spring_type (
Type
) – enumeration of spring typesfreedom (
Tuple
[Freedom
,Freedom
,Freedom
,Freedom
,Freedom
,Freedom
]) – tuple of component constraints in the order (X, Y, Z, Rx, Ry, Rz)stiffness (
Tuple
[float
,float
,float
,float
,float
,float
]) – tuple of component stiffness in the order (X, Y, Z, Rx, Ry, Rz) in [N/m]c_sys (
CSys
) – enumeration of coordinate system typesdefault_size (
float
) – default size in [m]angle (
Tuple
[float
,float
,float
]) – angle (Rx, Ry, Rz) [deg] of the support around the respective global X-, Y- and Z-axis
- Return type:
- create_point_support_on_beam(beam, *, name=None, x=None, stiffness_x=None, y=None, stiffness_y=None, z=None, stiffness_z=None, rx=None, stiffness_rx=None, ry=None, stiffness_ry=None, rz=None, stiffness_rz=None, default_size=None, c_sys=None, c_def=None, position_x=None, origin=None, repeat=None, delta_x=None)
Method to construct a point support on a beam.
- Parameters:
beam (
Beam
) – beam object (create_beam()
) to which the line support will be appliedname (
str
) – name which will be shown in SCIA (default: ‘Sb{i}’)x (
Freedom
) – constraint type in X-direction (default: RIGID)stiffness_x (
float
) – stiffness in X-direction [N/m] (only for x = FLEXIBLE)y (
Freedom
) – constraint type in Y-direction (default: RIGID)stiffness_y (
float
) – stiffness in Y-direction [N/m] (only for y = FLEXIBLE)z (
Freedom
) – constraint type in Z-direction (default: RIGID)stiffness_z (
float
) – stiffness in Z-direction [N/m] (only for z = FLEXIBLE)rx (
Freedom
) – constraint type in X-rotation (default: RIGID)stiffness_rx (
float
) – stiffness in X-rotation [Nm/rad] (only for rx = FLEXIBLE)ry (
Freedom
) – constraint type in Y-rotation (default: RIGID)stiffness_ry (
float
) – stiffness in Y-rotation [Nm/rad] (only for ry = FLEXIBLE)rz (
Freedom
) – constraint type in Z-rotation (default: RIGID)stiffness_rz (
float
) – stiffness in Z-rotation [Nm/rad] (only for rz = FLEXIBLE)default_size (
float
) – size of the support [m] (default: 0.2)c_sys (
CSys
) – coordinate system (default: GLOBAL)c_def (
CDef
) – c_def: coordinate definition (default: RELATIVE)position_x (
float
) – position of the load ([m] if c_def = ABSOLUTE, else [-]) (default: 0)origin (
Origin
) – reference for position_x (default: FROM_START)repeat (
int
) – number of uniformly distributed supports (default: 1)delta_x (
float
) – distance between supports ([m] if c_def = ABSOLUTE, else [-]) (only for repeat > 1)
- Return type:
- create_rectangular_cross_section(name, material, width, height)
Method to construct a rectangular cross-section.
- Parameters:
name (
str
) – name which will be shown in SCIAmaterial (
Material
) – material of the cross-sectionwidth (
float
) – width of the cross-section in [m]height (
float
) – height of the cross-section in [m]
- Return type:
- create_result_class(name, combinations=None, nonlinear_combinations=None)
Method to construct a result class.
- Parameters:
name (
str
) – name which will be shown in SCIAcombinations (
List
[LoadCombination
]) – list of load combination objects (create_load_combination()
)nonlinear_combinations (
List
[NonLinearLoadCombination
]) – list of nonlinear load combination objects (create_nonlinear_load_combination()
)
- Return type:
- create_rigid_arm(name, master_node, slave_node, hinge_on_master, hinge_on_slave)
Method to construct a rigid arm.
- Parameters:
name (
str
) – name which will be shown in SCIAmaster_node (
Node
) – node object (create_node()
).slave_node (
Node
) – node object (create_node()
).hinge_on_master (
bool
) – True to insert a hinge on the master nodehinge_on_slave (
bool
) – True to insert a hinge on the slave node
- Return type:
- create_section_on_beam(name, beam, c_def, position_x, origin, repeat, delta_x)
Method to construct a section on a beam, which can be used to receive calculation results on its position.
- Parameters:
name (
str
) – name which will be shown in SCIAbeam (
Beam
) – beam object (create_beam()
).c_def (
CDef
) – enumeration of coordinate definition typesposition_x (
float
) – position of the section on the beamorigin (
Origin
) – enumeration of origin typesrepeat (
int
) – number of section defined at the same timedelta_x (
float
) – if repeat is greater than 1, this value defines the distance between individual sections
- Return type:
- create_section_on_plane(point_1, point_2, *, name, draw=None, direction_of_cut=None)
Method to construct a section on a plane, which can be used to receive calculation results on its position.
- Parameters:
point_1 (
Tuple
[float
,float
,float
]) – tuple of coordinates (x, y, z) of the start position in [m]point_2 (
Tuple
[float
,float
,float
]) – tuple of coordinates (x, y, z) of the end position in [m]name (
str
) – name which will be shown in SCIA (default: SE{i})draw (
Draw
) – defines the plane in which the section is drawn (default: Z_DIRECTION)direction_of_cut (
Tuple
[float
,float
,float
]) – in-plane vector (x, y, z) which defines the direction of cut in [m] (default: (0, 0, 1))
- Return type:
- create_selection(name, objects)
- New in v14.1.0
Method to construct a named selection.
- Parameters:
name (
str
) – name which will be shown in SCIAobjects (
List
[SciaObject
]) – object(s) created within this model
- Return type:
- create_subsoil(name, *, stiffness, c1x=None, c1y=None, c1z=None, nonlinear_function=None, c2x=None, c2y=None, is_drained=None, water_air_in_clay_subgrade=None, specific_weight=None, fi=None, sigma_oc=None, c=None, cu=None)
Method to construct a subsoil.
- Parameters:
name (
str
) – name of the subsoilstiffness (
float
) – stiffness c1z [N/m3]c1x (
float
) – stiffness c1x [N/m3] (default: 50000000)c1y (
float
) – stiffness c1y [N/m3] (default: 50000000)c1z (
C1z
) – type for c1z (default: FLEXIBLE)nonlinear_function (
NonLinearFunction
) – nonlinear function (create_nonlinear_function()
) (c1z = NONLINEAR_FUNCTION only)c2x (
float
) – [N/m]c2y (
float
) – [N/m]is_drained (
bool
) – True for ‘drained’, False for ‘undrained’ (default: False)water_air_in_clay_subgrade (
bool
) – (default: False)specific_weight (
float
) – specific weight [kg/m3] (default: 0.0)fi (
float
) – fi’ [deg] (default: 0.0)sigma_oc (
float
) – sigma oc [Pa] (default: 0.0)c (
float
) – c’ [Pa] (default: 0.0)cu (
float
) – [Pa] (default: 0.0)
- Return type:
- create_surface_load(name, load_case, plane, direction, load_type, load_value, c_sys, location)
Method to construct a surface load on a plane.
- Parameters:
name (
str
) – name which will be shown in SCIAload_case (
LoadCase
) – previously created load case object in which the load should be placedplane (
Plane
) – plane object (create_plane()
) to which the load should be applieddirection (
Direction
) – enumeration of directionsload_type (
Type
) – enumeration of load typesload_value (
float
) – magnitude of the load in [N]c_sys (
CSys
) – enumeration of coordinate system typeslocation (
Location
) – enumeration of location options
- Return type:
- create_surface_support(plane, subsoil, *, name=None)
Method to construct a surface support.
- Parameters:
plane (
Plane
) – plane object (create_plane()
) to which the support will be attachedsubsoil (
Subsoil
) – subsoil object (create_subsoil()
) representing the supportname (
str
) – name which will be shown in SCIA
- Return type:
- create_thermal_load(name, load_case, beam, distribution, delta, left_delta, right_delta, top_delta, bottom_delta, position_start, position_end, c_def, origin)
Method to construct a temperature load on a beam.
- Parameters:
name (
str
) – name which will be shown in SCIAload_case (
LoadCase
) – previously created load case object in which the load should be placedbeam (
Beam
) – beam object (create_beam()
) to which the load should be applieddistribution (
Distribution
) – enumeration of distribution optionsdelta (
float
) – temperature difference in case of a CONSTANT distributionleft_delta (
float
) – temperature difference in +Y directionright_delta (
float
) – temperature difference in -Y directiontop_delta (
float
) – temperature difference in +Z directionbottom_delta (
float
) – temperature difference in -Z directionposition_start (
float
) – position of the start point on the beam in [m]position_end (
float
) – position of the end point on the beam in [m]c_def (
CDef
) – enumeration of coordinate definition typesorigin (
Origin
) – enumeration of origin types
- Return type:
- create_thermal_surface_load(name, load_case, plane, delta=None, top_delta=None, bottom_delta=None)
Method to construct a temperature load on a plane.
- Parameters:
name (
str
) – name which will be shown in SCIAload_case (
LoadCase
) – previously created load case object in which the load should be placedplane (
Plane
) – plane object (create_plane()
) to which the load should be applieddelta (
float
) – temperature difference in case of a constant distributiontop_delta (
float
) – temperature difference in +Z directionbottom_delta (
float
) – temperature difference in -Z direction
- Return type:
- create_variable_load_case(name, description, load_group, load_type, specification=None, duration=None, primary_effect=None)
Method to construct a variable load case.
- Parameters:
name (
str
) – name which will be shown in SCIAdescription (
str
) – description which will be shown in SCIAload_group (
LoadGroup
) – load group object (create_load_group()
) in which the load case should be placed.load_type (
VariableLoadType
) – enumeration of variable load typesspecification (
Specification
) – enumeration of specification typesduration (
Duration
) – enumeration of duration typesprimary_effect (
LoadCase
) – previously created load case object in case the selected load type is PRIMARY_EFFECT
- Return type:
- property cross_sections: Tuple[CrossSection, ...]
- property free_line_loads: Tuple[FreeLineLoad, ...]
- property free_point_loads: Tuple[FreePointLoad, ...]
- property free_surface_loads: Tuple[FreeSurfaceLoad, ...]
- generate_xml_input(as_file=False)
Returns the input file XML representation of the SCIA model and corresponding .def file.
Note
This method needs to be mocked in (automated) unit and integration tests.
- property hinges_on_beam: Tuple[HingeOnBeam, ...]
- property hinges_on_plane: Tuple[HingeOnPlane, ...]
- property integration_strips: Tuple[IntegrationStrip, ...]
- property internal_edges: Tuple[InternalEdge, ...]
- property line_force_surface_list: Tuple[LineForceSurface, ...]
- property line_moments_on_beam: Tuple[LineMomentOnBeam, ...]
- property line_moments_on_plane: Tuple[LineMomentOnPlane, ...]
- property line_supports_line: Tuple[LineSupportLine, ...]
- property line_supports_surface: Tuple[LineSupportSurface, ...]
- property load_combinations: Tuple[LoadCombination, ...]
- property nonlinear_functions: Tuple[NonLinearFunction, ...]
- property nonlinear_load_combinations: Tuple[NonLinearLoadCombination, ...]
- property orthotropy_objects: Tuple[Orthotropy, ...]
- property point_loads_node: Tuple[PointLoadNode, ...]
- property point_moments_node: Tuple[PointMomentNode, ...]
- property point_supports: Tuple[PointSupport, ...]
- property point_supports_line: Tuple[PointSupportLine, ...]
- property project_data: ProjectData
- New in v13.1.0
- property result_classes: Tuple[ResultClass, ...]
- property sections_on_beam: Tuple[SectionOnBeam, ...]
- property sections_on_plane: Tuple[SectionOnPlane, ...]
- property solver_setup: SolverSetup
- New in v13.1.0
- property surface_loads: Tuple[SurfaceLoad, ...]
- property surface_supports: Tuple[SurfaceSupportSurface, ...]
- property thermal_loads: Tuple[ThermalLoad, ...]
- property thermal_surface_loads: Tuple[ThermalSurfaceLoad, ...]
- update_concrete_material(object_id, name, part, thermal_expansion=None, unit_mass=None, wet_density=None, e_modulus=None, poisson=None, g_modulus=None, log_decrement=None, specific_heat=None, thermal_conductivity=None, *, fck=None)
This method can update specific properties of an already existing concrete material in the *.esa model.
- Parameters:
object_id (
int
) – id of the material in SCIAname (
str
) – name which will be shown in SCIApart (
ECPart
) – enumeration of concrete typesthermal_expansion (
float
) – thermal expansion in [m/mK]unit_mass (
float
) – density in [kg/m3]wet_density (
float
) – wet density in [kg/m3]e_modulus (
float
) – Young’s modulus in [Pa]poisson (
float
) – Poisson ratiog_modulus (
float
) – shear modulus in [Pa]log_decrement (
float
) – log. decrementspecific_heat (
float
) – specific heat in [J/kgK]thermal_conductivity (
float
) – thermal conductivity in [W/mK]fck (
float
) – characteristic compressive cylinder strength [Pa]
- Return type:
OutputFileParser
- class viktor.external.scia.scia.OutputFileParser
-
Helper class to extract results from a SCIA output file (.xml).
Example using BytesIO:
xml_output_file = scia_analysis.get_xml_output_file() result_table = OutputFileParser.get_result(xml_output_file, 'Reactions') another_result_table = OutputFileParser.get_result(xml_output_file, '2D internal forces')
Example using
File
:xml_output_file = scia_analysis.get_xml_output_file(as_file=True) with xml_output_file.open_binary() as f: result_table = OutputFileParser.get_result(f, 'Reactions') another_result_table = OutputFileParser.get_result(f, '2D internal forces')
- classmethod get_result(file, table_name, *, parent=None)
Retrieve the results of an output XML by ‘table_name’. This corresponds to the ‘name’ attribute that is found in the XML table, e.g. “Result classes - UGT” in the example below:
<container id="..." t="..."> <table id="..." t="..." name="Result classes - UGT">
In case indenting has been used in the SCIA I/O doc, multiple tables with the name ‘table_name’ will be found. A parent name can be specified as input to account for this indenting (up to 1 indent level). If indenting is used but no parent name is specified, this method will return the first ‘table_name’ table it can find.
- Parameters:
file (
BinaryIO
) – SCIA output file (.xml).table_name (
str
) – Name of the result table to be extracted from the output XML.parent (
str
) – Name of the parent, e.g. a result class.
- Return type:
Dict
[str
,dict
]
- :raises
viktor.errors.SciaParsingError
: if table ‘table_name’ could not be found in the provided output file
if no results were found in the XML table ‘table_name’
ResultType
- class viktor.external.scia.scia.ResultType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
Enumeration of result types:
- ENGINEERING_REPORT:
ResultType
= 'ENGINEERING_REPORT'
- MODEL:
ResultType
= 'MODEL'
- NONE:
ResultType
= 'XML'
- ENGINEERING_REPORT:
SciaAnalysis
- class viktor.external.scia.scia.SciaAnalysis(input_file, xml_def_file, scia_model, calculation_setting=CalcSetting.LIN, xml_doc_name='output', *, result_type=ResultType.MODEL, output_document='')
Bases:
ExternalProgram
SciaAnalysis can be used to perform an analysis using SCIA on a third-party worker. To start an analysis call the method
execute()
, with an appropriate timeout (in seconds). To retrieve the output file call the methodget_xml_output_file()
afterexecute()
.Usage:
input_file = BytesIO("scia input file content".encode()) xml_def_file = BytesIO("scia xml def file content".encode()) scia_model = BytesIO("scia model content".encode()) scia_analysis = SciaAnalysis(input_file=input_file, xml_def_file=xml_def_file, scia_model=scia_model) scia_analysis.execute(timeout=600) xml_output_file = scia_analysis.get_xml_output_file()
Besides the output XML file, you can also retrieve the updated SCIA model. This is achieved using the result_type:
scia_analysis = SciaAnalysis(input_file=input_file, xml_def_file=xml_def_file, scia_model=scia_model, result_type=ResultType.MODEL) scia_analysis.execute(timeout=600) updated_esa_file = scia_analysis.get_updated_esa_model()
or the Engineering Report:
scia_analysis = SciaAnalysis(input_file=input_file, xml_def_file=xml_def_file, scia_model=scia_model, result_type=ResultType.ENGINEERING_REPORT, output_document='report1') scia_analysis.execute(timeout=600) engineering_report = scia_analysis.get_engineering_report()
Exceptions which can be raised during calculation:
viktor.errors.LicenseError
: no license availableviktor.errors.ExecutionError
: generic error. Error message provides more information
- Parameters:
input_file (
Union
[BytesIO
,File
]) – SCIA input .xml file.xml_def_file (
Union
[BytesIO
,File
]) – SCIA input .def file.scia_model (
Union
[BytesIO
,File
]) – SCIA .esa model.calculation_setting (
CalcSetting
) –Available calculation settings according to the documentation of ESA_XML.exe:
NONE = without any recalculations
NOC = No calculation
LIN = Linear calculation (Delete all calculated results when exists)
NEL = Nonlinear calculation
CON = Nonlinear concrete calculation
EIG = Eigen frequencies calculation
STB = Stability calculation
INF = Influence lines calculation
MOB = Mobile loads calculation
TDA = TDA calculation
SLN = Soilin calculation
PHA = Phases calculation
NPH = Nonlinear phases
CSS = Recalculation of cross sections
NST = Nonlinear stability
TID = Test of input data - solver link only
xml_doc_name (
str
) – Name of XML IO document for export.result_type (
ResultType
) –Type of output which should be returned besides the output.xml:
ResultType.NONE returns nothing
ResultType.MODEL returns the updated SCIA model (.esa) after calculation
ResultType.ENGINEERING_REPORT returns the specified engineering report
output_document (
str
) – Document name of the report which should be returned. This name should match the exact name of the report as defined in the .esa model.
- Raises:
ValueError – if Engineering Report is selected as result_type, but no output_document is specified.
- get_engineering_report(as_file=False)
Method can be used to retrieve the Engineering Report (.pdf). Make sure to call method
execute()
first andget_engineering_report()
afterwards.- Return type:
Union
[BytesIO
,File
,None
]- Returns:
File, if as_file = True
BytesIO, if as_file = False (default)
- get_updated_esa_model(as_file=False)
Method can be used to retrieve the updated SCIA model file (.esa), which contains the data that is read into the model while calling ESA_XML.exe. Make sure to call method
execute()
first andget_updated_esa_model()
afterwards.- Return type:
Union
[BytesIO
,File
,None
]- Returns:
File, if as_file = True
BytesIO, if as_file = False (default)
- static get_xml_def_name(input_file)
- Return type:
str
- get_xml_output_file(as_file=False)
Method can be used to retrieve the results generated by running an external analysis. This method returns the output XML file that is generated by SCIA. Make sure to call method
execute()
first andget_xml_output_file()
afterwards.- Return type:
Union
[BytesIO
,File
,None
]- Returns:
File, if as_file = True
BytesIO, if as_file = False (default)
ArbitraryProfile
- class viktor.external.scia.object.ArbitraryProfile(object_id, name, beam, c_def, cross_section, spans)
Bases:
SciaObject
Do not use this __init__ directly, but create the object by
create_arbitrary_profile()
- class CDef(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
ABSOLUTE - absolute
RELATIVE - relative
- property cross_section: CrossSection
- property spans: List[ArbitraryProfileSpan]
ArbitraryProfileSpan
- class viktor.external.scia.object.ArbitraryProfileSpan(length, type_of_css, cross_section_start, cross_section_end, alignment)
-
Do not use this __init__ directly, but create the object by
create_arbitrary_profile_span()
- class Alignment(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
DEFAULT - see “Default” at https://help.scia.net/18.1/en/rb/modelling/haunch_beam.htm#Haunch_Alignment
CENTER_LINE - see “Centre line” at https://help.scia.net/18.1/en/rb/modelling/haunch_beam.htm#Haunch_Alignment
TOP_SURFACE - see “Top surface” at https://help.scia.net/18.1/en/rb/modelling/haunch_beam.htm#Haunch_Alignment
BOTTOM_SURFACE - see “Bottom surface” at https://help.scia.net/18.1/en/rb/modelling/haunch_beam.htm#Haunch_Alignment
LEFT_SURFACE - see “Left surface” at https://help.scia.net/18.1/en/rb/modelling/haunch_beam.htm#Haunch_Alignment
RIGHT_SURFACE - see “Right surface” at https://help.scia.net/18.1/en/rb/modelling/haunch_beam.htm#Haunch_Alignment
TOP_LEFT -
TOP_RIGHT -
BOTTOM_LEFT -
BOTTOM_RIGHT -
- class TypeOfCss(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
PRISMATIC - The cross-section of the span is constant.
PARAM_HAUNCH - A standard haunch is inserted into the span.
TWO_CSS - Two cross-sections corresponding to the two end-points of the span are defined. The cross-section varies over the span from one section to the other.
- property cross_section_end: CrossSection
- property cross_section_start: CrossSection
AveragingStrip
- class viktor.external.scia.object.AveragingStrip(object_id, name, plane, strip_type, point_1, width, length, angle, direction)
Bases:
SciaObject
Do not use this __init__ directly, but create the object by
create_averaging_strip()
- class Direction(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
Beam
- class viktor.external.scia.object.Beam(object_id, name, begin_node, end_node, cross_section, ez=None, lcs_rotation=None, layer=None)
Bases:
SciaObject
Do not use this __init__ directly, but create the object by
create_beam()
- property cross_section: CrossSection
- property ez: float
CircularComposedCrossSection
- class viktor.external.scia.object.CircularComposedCrossSection(object_id, name, material, material_2, diameter, thickness)
Bases:
ComposedCrossSection
Do not use this __init__ directly, but create the object by
create_circular_composed_cross_section()
CircularCrossSection
- class viktor.external.scia.object.CircularCrossSection(object_id, name, material, diameter)
Bases:
CrossSection
Do not use this __init__ directly, but create the object by
create_circular_cross_section()
CircularHollowCrossSection
- class viktor.external.scia.object.CircularHollowCrossSection(object_id, name, material, diameter, thickness)
Bases:
CrossSection
Do not use this __init__ directly, but create the object by
create_circular_hollow_cross_section()
ComposedCrossSection
- class viktor.external.scia.object.ComposedCrossSection(object_id, name, material, material_2)
Bases:
CrossSection
Abstract base class of all cross sections, composed of two materials.
Concrete
- class viktor.external.scia.object.Concrete(object_id, name, part, thermal_expansion=None, unit_mass=None, wet_density=None, e_modulus=None, poisson=None, g_modulus=None, log_decrement=None, specific_heat=None, thermal_conductivity=None, *, fck=None)
Bases:
SciaObject
Do not use this __init__ directly, but create the object by
update_concrete_material()
- class ECPart(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
GENERAL - concrete EN 1992-1-1
BRIDGES - concrete EN 1992-2
CrossLink
- class viktor.external.scia.object.CrossLink(object_id, name, beam_1, beam_2)
Bases:
SciaObject
Do not use this __init__ directly, but create the object by
create_cross_link()
CrossSection
- class viktor.external.scia.object.CrossSection(object_id, name, material)
Bases:
SciaObject
Abstract base class of all cross sections.
FreeLineLoad
- class viktor.external.scia.object.FreeLineLoad(object_id, name, load_case, point_1, point_2, direction, magnitude_1, magnitude_2, distribution=Distribution.TRAPEZOIDAL, validity=Validity.ALL, load_type=Type.FORCE, select=Select.AUTO, system=CSys.GLOBAL, location=Location.LENGTH)
Bases:
FreeLoad
Do not use this __init__ directly, but create the object by
create_free_line_load()
- class Distribution(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- TRAPEZOIDAL:
Distribution
= 1
- UNIFORM:
Distribution
= 0
- TRAPEZOIDAL:
FreeLoad
- class viktor.external.scia.object.FreeLoad(object_id, name, load_case, direction, select, validity=None, load_type=None, c_sys=None)
Bases:
SciaObject
Abstract base class of all free loads.
- Do not use this __init__ directly, but create the object by
create_free_point_load()
,
- class CSys(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- class Direction(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- class Location(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- class Select(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- class Type(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- class Validity(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- Do not use this __init__ directly, but create the object by
FreePointLoad
- class viktor.external.scia.object.FreePointLoad(object_id, name, load_case, direction, magnitude, position, load_type=Type.FORCE, validity=Validity.ALL, select=Select.AUTO, system=CSys.GLOBAL)
Bases:
FreeLoad
Do not use this __init__ directly, but create the object by
create_free_point_load()
FreeSurfaceLoad
- class viktor.external.scia.object.FreeSurfaceLoad(object_id, name, load_case, direction, q1, q2=None, q3=None, points=None, distribution=None, load_type=None, validity=None, system=None, location=None, selection=None)
Bases:
FreeLoad
Do not use this __init__ directly, but create the object by
create_free_surface_load()
- class Distribution(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- DIR_X:
Distribution
= 1
- DIR_Y:
Distribution
= 2
- POINTS:
Distribution
= 3
- UNIFORM:
Distribution
= 0
- DIR_X:
- property distribution: Distribution
- property points: List[Tuple[float, float]] | None
- property q2: float | None
- property q3: float | None
GeneralCrossSection
- class viktor.external.scia.object.GeneralCrossSection(object_id, name, material, elements)
Bases:
CrossSection
Do not use this __init__ directly, but create the object by
create_general_cross_section()
GeneralCrossSectionElement
- class viktor.external.scia.object.GeneralCrossSectionElement(name, element_type, points, *, material=None)
-
Do not use this __init__ directly, but create the object by
create_general_cross_section_element()
HingeOnBeam
- class viktor.external.scia.object.HingeOnBeam(object_id, name, beam, position, freedom_ux=Freedom.FREE, freedom_uy=Freedom.FREE, freedom_uz=Freedom.FREE, freedom_fix=Freedom.FREE, freedom_fiy=Freedom.FREE, freedom_fiz=Freedom.FREE, stiffness_ux=0, stiffness_uy=0, stiffness_uz=0, stiffness_fix=0, stiffness_fiy=0, stiffness_fiz=0)
Bases:
SciaObject
Do not use this __init__ directly, but create the object by
create_hinge_on_beam()
.- class Freedom(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
FREE - The support is free in the specified direction. That is it imposes no constraint in the direction.
RIGID - The support in fully rigid in the specified direction.
FLEXIBLE - The support is flexible (elastic) in the specified direction. The user has to define the required stiffness of the support.
- class Position(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- property freedom: Tuple[Freedom, Freedom, Freedom, Freedom, Freedom, Freedom]
ux, uy, uz, fix, fiy, fiz
- property stiffness: Tuple[float, float, float, float, float, float]
ux, uy, uz, fix, fiy, fiz
HingeOnPlane
- class viktor.external.scia.object.HingeOnPlane(object_id, name, edge, ux=None, stiffness_ux=None, uy=None, stiffness_uy=None, uz=None, stiffness_uz=None, fix=None, stiffness_fix=None, c_def=None, position_x1=None, position_x2=None, origin=None)
Bases:
SciaObject
Do not use this __init__ directly, but create the object by
create_hinge_on_plane()
.- class CDef(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
ABSOLUTE - absolute, where the coordinate must lie between 0 and the length of the plane edge
RELATIVE - relative, where the coordinate must lie between 0 and 1
- class Freedom(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
FREE - The support is free in the specified direction. That is it imposes no constraint in the direction.
RIGID - The support in fully rigid in the specified direction.
FLEXIBLE - The support is flexible (elastic) in the specified direction. The user has to define the required stiffness of the support.
- class Origin(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
FROM_START - position is measured from the beginning of the plane edge
FROM_END - position is measured from the end of the plane edge
IntegrationStrip
- class viktor.external.scia.object.IntegrationStrip(object_id, name, plane, point_1, point_2, width, effective_width_geometry=_EffectiveWidthGeometry.CONSTANT_SYMMETRIC, effective_width_definition=_EffectiveWidthDefinition.WIDTH)
Bases:
SciaObject
Do not use this __init__ directly, but create the object by
create_integration_strip()
InternalEdge
- class viktor.external.scia.object.InternalEdge(object_id, name, plane, node_1, node_2)
Bases:
SciaObject
Do not use this __init__ directly, but create the object by
create_internal_edge()
Layer
- class viktor.external.scia.object.Layer(object_id, name, comment=None, structural_model_only=None, current_used_activity=None)
Bases:
SciaObject
Do not use this __init__ directly, but create the object by
create_layer()
LibraryCrossSection
- class viktor.external.scia.object.LibraryCrossSection(object_id, name, material, section, profile)
Bases:
CrossSection
Do not use this __init__ directly, but create the object by
create_library_cross_section()
- class Section(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
LineForceSurface
- class viktor.external.scia.object.LineForceSurface(object_id, name, edge, load_case, p1, p2=None, direction=None, location=None, c_sys=None, c_def=None, position_x1=None, position_x2=None, origin=None)
Bases:
SciaObject
Do not use this __init__ directly, but create the object by
create_line_load_on_plane()
- class CDef(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
ABSOLUTE - absolute, where the coordinate must lie between 0 and the length of the plane edge
RELATIVE - relative, where the coordinate must lie between 0 and 1
- class CSys(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- class Direction(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- class Distribution(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- TRAPEZOIDAL:
Distribution
= 1
- UNIFORM:
Distribution
= 0
- TRAPEZOIDAL:
- class Location(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- class Origin(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
FROM_START - position is measured from the beginning of the plane edge
FROM_END - position is measured from the end of the plane edge
- property distribution: Distribution
- property position_x1: float | None
- property position_x2: float | None
LineLoad
- class viktor.external.scia.object.LineLoad(object_id, name, load_case, beam, load_type, distribution, load_start, load_end, direction, c_sys, position_start, position_end, c_def, origin, ey, ez)
Bases:
SciaObject
Do not use this __init__ directly, but create the object by
create_line_load()
- class CDef(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
ABSOLUTE - absolute, where the coordinate must lie between 0 and the length of the beam
RELATIVE - relative, where the coordinate must lie between 0 and 1
- class CSys(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- class Direction(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- class Distribution(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- TRAPEZOIDAL:
Distribution
= 1
- UNIFORM:
Distribution
= 0
- TRAPEZOIDAL:
- class Origin(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
FROM_START - position is measured from the beginning of the beam
FROM_END - position is measured from the end of the beam
- class Type(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- property beam: Beam