CALCULATION METHODS

Contents

CALCULATION METHODS#

class sstatics.core.calc_methods.first_order.FirstOrder(*a, **k)#

Bases: Solver

First-order static solver derived from Solver.

Inherits all functionality from Solver. Additionally, it validates that all bars in the system are instances of the base Bar class. If any BarSecond instances are found, a ValueError is raised.

property bar_deform#

Computes the deformation vectors for each bar in the local bar coordinate system.

For each bar in the system, this function extracts the nodal deformations of its two connected nodes (each with 3 DOFs), stacks them into a (6, 1) array, and transforms them from the node coordinate system into the local bar coordinate system using the bar’s transformation matrix.

The result is a list of deformation vectors that describe how each bar deforms within its own local coordinate system.

Returns:
list of numpy.ndarray

A list of (6, 1) arrays, each representing the bar deformation in the local bar coordinate system.

property bar_deform_displacements#

Transforms the support-induced nodal displacements into local bar-end displacements.

Using the transformation matrix of each bar, the nodal displacements caused by support stresses are rotated from the nodal coordinate system into the local bar coordinate system.

Returns:
list of numpy.ndarray

A list of (6×1) vectors representing the local end displacements of each bar in the system resulting from nodal displacement inputs.

See also

NodeDisplacement

For nodal displacement values in the global coordinate system.

property bar_deform_hinge#

Computes the relative deformations caused by hinges.

Since various types of hinges can be placed at the ends of a bar, it is essential to consider their influence in the deformation analysis. The presence of a hinge leads to a discontinuous deformation at the corresponding node.

Returns:
list of numpy.ndarray

A list of (6×1) vectors representing the relative displacements of the nodes for each bar in the system.

Notes

The algorithm iterates through all bars in the system and checks for the presence of hinges. If a hinge is found, the corresponding modified stiffness matrix \(k^{'}\) and modified initial force vector \(f^{(0)'}\) are used to calculate the bar’s deformation \(\delta^{'}\). This step is essential for determining the relative deformations introduced by the hinges.

The internal bar forces are given by:

\[f^{'} = k^{'} \cdot \delta^{'} + f^{(0)'}\]

When a hinge is present, the deformation at the node is no longer equal to the bar deformation. For instance, in the case of a rotational hinge at the end of a bar, the total rotation is the sum of the known nodal rotation :math:varphi_{j}^{n} and the relative rotation \(\Delta \varphi_{j}\):

\[\varphi_{j} = \varphi_{j}^{n} + \Delta \varphi_{j}\]

The nodal deformation \(\delta^{(n)'}\) is already known via the attribute bar_deform. The algorithm then calculates the relative deformation introduced by the hinge. To achieve this, the stiffness matrix and force vector are reduced to retain only the degrees of freedom associated with the hinge. This reduction allows the computation of the relative displacement at each hinge location.

The calculation of internal forces is then extended to incorporate both known nodal and relative deformations:

\[f^{'} = k^{'} \cdot (\delta^{(n)'} + \Delta \delta^{'}) \ + f^{(0)'}\]

From this relationship, a linear system of equations is derived:

\[A \cdot x = b\]

where:

\[A = k'{red_n} b = -k'{red} \cdot \delta^{(n)'} - f^{(0)'}\]

The solution vector \(x\) represents the total relative deformations caused by the hinges.

property bar_deform_total#

Combines all deformation contributions for each bar, resulting in the total deformation at the bar ends in the local coordinate system.

This method adds the deformations from three different sources:
Returns:
list of numpy.ndarray

A list of (6×1) vectors representing the total end deformations of each bar in the system, expressed in the local bar coordinate system.

property boundary_conditions#

Applies boundary conditions to the global system.

This function modifies the system_matrix and the total load vector p to account for the boundary conditions (supports) of each node in the structure. It ensures that the resulting system of equations is solvable by eliminating degrees of freedom that are fixed.

Returns:
tuple of numpy.array

A tuple (k, p) where k is the modified global stiffness matrix, and p is the modified global load vector after applying boundary conditions.

Notes

The initially assembled system_matrix is singular, as it does not yet include support conditions. Its determinant is zero, which makes the equation system unsolvable.

To make the system solvable, it is essential to incorporate support conditions. When a deformation is restricted (i.e., if the attributes u, w, or phi are set to ‘fixed’), the corresponding entry in the nodal displacement vector \(\Delta\) is set to zero.

Instead of removing rows and columns, which would require restructuring the system, this algorithm zeroes out the corresponding rows and columns in the stiffness matrix k and sets the diagonal entry to one. This maintains the shape of the result vector \(\Delta\) . The same positions in the load vector p are set to zero.

Examples

>>> from sstatics.core.preprocessing.bar import Bar
>>> from sstatics.core.preprocessing.cross_section import CrossSection
>>> from sstatics.core.preprocessing.material import Material
>>> from sstatics.core.preprocessing.node import Node
>>> from sstatics.core.preprocessing.loads import BarLineLoad
>>> cross_section = CrossSection(1940e-8, 28.5e-4, 0.2, 0.1, 0.1)
>>> material = Material(2.1e8, 0.1, 0.1, 0.1)
>>> node1 = Node(0, 0, u='fixed', w='fixed')
>>> node2 = Node(3, 0, w='fixed')
>>> load = BarLineLoad(1, 1, 'z', 'bar', 'exact')
>>> bar1 = Bar(node1, node2, cross_section, material, line_loads=load)
>>> system = System([bar1])
>>> Solver(system).system_matrix
array([
[199500, 0, 0, -199500, 0, 0],
[0, 1810.67, -2716, 0, -1810.67, -2716],
[0, -2716, 5432, 0, 2716, 2716],
[-199500, 0, 0, 199500, 0, 0],
[0, -1810.67, 2716, 0, 1810.67, 2716],
[0, -2716, 2716, 0, 2716, 5432]])
>>> Solver(system).p
array([[0], [1.5], [-0.75], [0], [1.5], [0.75]])
>>> Solver(system).boundary_conditions
(array([
[1, 0, 0, 0, 0, 0],
[0, 1, 0, 0, 0, 0],
[0, 0, 5432, 0, 0, 2716],
[0, 0, 0, 199500, 0, 0],
[0, 0, 0, 0, 1, 0],
[0, 0, 2716, 0, 0, 5432]]),
array([[0], [0], [-0.75], [0], [0], [0.75]]))
property elastic_matrix#

Generates a matrix that accounts for the elastic support at the nodes.

The elastic matrix represents the stiffness of the elastic supports at each node, which are placed along the diagonal. If the node is elastically supported, the matrix will contain the corresponding spring or rotational spring stiffness values.

Returns:
numpy.array

A matrix whose dimensions are determined by the number of nodes and the degrees of freedom. For a system with 3 nodes and 3 degrees of freedom, the resulting matrix will be 9x9. The diagonal of the matrix contains the spring and rotational spring stiffness values for the supports at each node, if the node is elastically supported.

Notes

The elastic matrix has the same dimensions as the stiffness_matrix. The diagonal elements of the matrix contain the stiffness values of the support components for each node.

property f0#

Calculates the total force vector of the bar internal forces from the applied loads.

Returns:
numpy.array

A vector with dimensions (number of nodes * dof (=3) x 1), which contains the internal forces of the bars resulting from the applied loads.

Notes

The vector is constructed by adding the force vectors of the individual bars in the system. These vectors are placed in the correct rows based on the node indices. The function iterates over all the bars in the system to assemble the total force vector.

property internal_forces#

Calculates the internal forces of the statical system.

To compute the internal forces at the ends of each bar element in the local coordinate system, the bar-end deformations bar_deform must be applied to the element stiffness relations.

Returns:
list of numpy.ndarray

A list of (6, 1) arrays, each representing the internal forces in the local bar coordinate system.

Notes

The result of this equation yields the internal forces at the bar ends in the local coordinate system:

\[f^{'} = k^{'} \cdot \delta^{'} + f^{(0)'}\]
property logger#

Returns the logger instance associated with this object.

Returns:
logging.Logger

The configured logger.

property node_deform#

Solves the linear system for the nodal deformations.

This function computes the nodal displacement vector \(\Delta\) by solving the linear system composed of the modified global stiffness matrix \(K_{mod}\) and the modified global load vector \(P\), which are the result of applying the boundary_conditions.

The resulting displacement vector contains the deformations of each node in its local coordinate system.

Returns:
numpy.array

The displacement vector \(\Delta\) containing the nodal deformations.

property node_support_forces#

Calculation of the support reaction of the node element \(P^{supp}\).

To calculate the support reactions, the computed node displacements for all nodes \(\Delta\) from the attribute node_deform, the bar end forces due to the load f0, and the nodal loads p0 are used.

Returns:
numpy.array

A vector with dimensions (dof * number of nodes, 1) containing the support reactions in the nodal coordinate system.

Notes

The formula for calculating the support reactions is as follows:

\[P^{supp} = K \cdot \Delta + F^{(0)} - P^{(0)}\]

In the calculation algorithm, the deformations from the elastic supports are also taken into account.

property p#

Computes the global load vector of the system.

The global load vector is obtained by subtracting the internal nodal force vector from the external load vector.

Returns:
numpy.array

The global load vector of the system.

Notes

The global load vector P can be expressed as the product of the global stiffness matrix k and the nodal displacement vector \(\Delta\):

\[P = k \cdot \Delta\]

In displacement-based methods, the nodal displacements \(\Delta\) are the unknowns to be solved for. The global load vector is computed from known loads, while the stiffness matrix k is also a known quantity.

property p0#

Calculates the total vector of external node loads.

The external node loads are considered by collecting them in a total load vector during the calculation.

Returns:
numpy.array

A vector with dimensions (number of nodes * dof (=3) x 1), which contains the external node loads.

Notes

Similar to the vector f0, the external node loads are assembled in the vector based on the node indices.

plot(kind='normal', bar_mesh_type='bars', decimals=2, sig_digits=None, n_disc=10, mode='mpl', color='red', show_load=False, scale=1)#

Plot internal forces or deformation results.

Parameters:
kind{‘normal’, ‘shear’, ‘moment’, ‘u’, ‘w’, ‘phi’,

‘bending_line’}, default=’normal’

Selects the result quantity to display.

bar_mesh_type{‘bars’, ‘user_mesh’, ‘mesh’}, default=’bars’

Mesh used for the graphic bar geometry.

decimalsint, optional

Number of decimals for label annotation.

sig_digits: int | None, default=None

Number of significant digits for label annotation.

n_discint, default=10

Number of subdivisions for result interpolation.

mode{‘mpl’, ‘plotly’}, default=’mpl’

Specifies which renderer is chosen

colorstr, default=’red’

Color of the plot

show_loadbool, default=False

Specifies whether the load is plotted.

scaleint, default=1

Scale factor for plot

Raises:
ValueError

If the mode is invalid.

property solvable#

Checks whether the stiffness matrix is regular, i.e., whether the system of equations is solvable.

Returns:
bool

False if the stiffness matrix is singular (unsolvable), True otherwise.

Notes

This method checks whether the system is kinematically movable by examining the rank of the stiffness matrix (computed using numpy.linalg.matrix_rank(), which internally uses singular value decomposition for numerical stability) instead of computing its determinant, which is computationally expensive and potentially unstable for large systems. If the rank of the stiffness matrix is smaller than its dimension, the matrix is singular, indicating a kinematic system or an incorrect system description [1]. Using the rank in this way provides a robust and numerically stable check [2].

References

[1]

D. Dinkler. “Grundlagen der Baustatik: Modelle und Berechnungsmethoden für ebene Stabtragwerke”. Band 1, 2011.

[2]

J. Dankert, H. Dankert (Hrsg.). “Mathematik für die Technische Mechanik”. Online: http://www.tm-mathe.de/, abgerufen am 22.03.2025.

property stiffness_matrix#

Generates the global stiffness matrix of the system, which is formed from the element stiffness matrices of the individual basic elements.

To represent the stiffness relationships of the entire system, the global stiffness matrix is assembled by considering how the bars are connected at the nodes. This is needed to fulfill the equilibrium conditions on each node.

Returns:
numpy.array

A matrix whose dimensions are determined by the number of nodes. For a system with 3 nodes, due to the degrees of freedom (3), the resulting matrix will be a 9x9 matrix.

Notes

The global stiffness matrix is constructed by assembling the element stiffness matrices of the individual bars. Initially, the matrix is filled with zeros, and then the element stiffness matrices are placed in the corresponding locations. If multiple bars intersect at a node, the element stiffness matrices are superimposed at that node.

property system_deform#

Transforms the bar deformations for each bar into the system deformations.

Returns:
list of numpy.ndarray

A list of (6, 1) arrays, each representing the deformation in the system coordinate system.

property system_matrix#

Adds the global stiffness matrix and the elastic matrix to form the system stiffness matrix.

Returns:
numpy.array

Sum of stiffness_matrix and elastic_matrix, resulting in the system stiffness matrix.

property system_node_deform#

Calculation of the node deformation of the node element in the global coordinate system \(\tilde{P}^{supp}_{n}\).

The node deformation node_deform are initially given in the respective nodal coordinate system. For the presentation of the results, it may be useful to transform the computed node deformation of node n into the global coordinate system using the transformation matrix \(T_{node}\).

Returns:
numpy.array

A vector with dimensions (dof * number of nodes, 1) that contains the node deformation referenced to the global coordinate system.

Notes

The transformation of the node deformations into the global coordinate system is performed as follows:

\[\tilde{\Delta}_{n} = T_{node} \cdot \Delta_{n}\]

The transformation is only necessary if the node is rotated.

property system_support_forces#

Calculation of the support reaction of the node element in the global coordinate system \(\tilde{P}^{supp}_{n}\).

The support reactions node_support_forces are initially given in the respective nodal coordinate system. For the presentation of the results, it may be useful to transform the computed support reaction of node n into the global coordinate system using the transformation matrix \(T_{node}\).

Returns:
numpy.array

A vector with dimensions (dof * number of nodes, 1) that contains the support reactions referenced to the global coordinate system.

Notes

The transformation of the support reactions into the global coordinate system is performed as follows:

\[\tilde{P}^{supp}_{n} = T_{node} \cdot P^{supp}_{n}\]

The transformation is only necessary if the node is rotated.

class sstatics.core.calc_methods.influence_line.InfluenceLine(system, debug=False)#

Bases: LoggerMixin

Computes influence lines of internal forces and displacements using the kinematic method.

The class provides two main analysis modes: force() for internal forces and deform() for displacements. Both methods determine the influence line of a specified quantity at a given location within the structure.

See also

SystemModifier

Class for modifying systems to compute influence lines.

FirstOrder

Class for solving first-order systems.

DifferentialEquation

Class for storing bar results.

Notes

An influence line is a function that describes how a moving unit load affects a force or displacement quantity at a fixed location within the structure [1].

References

[1]

D. Dinkler. “Grundlagen der Baustatik: Modelle und Berechnungsmethoden für ebene Stabtragwerke”. Band 1, Seite 128, 2011.

deform(kind, obj, position=0, n_disc=10)#

Computes the influence line for the specified displacement quantity at the given location and then calls ‘plot()’ to display the graphical result.

Parameters:
kindLiteral[‘u’, ‘w’, ‘phi’]

Type of the target displacement quantity.

objBar | Node

Location — Node or Bar.

positionfloat, default=0

If obj is a Bar, the position along the member.

n_discint, default=10

Number of discretization points for plotting.

Returns:
None

Plots the influence line.

See also

_create_deflection_objects()

Method to create deflection objects.

DifferentialEquation

Class for bar results.

Notes

The theory underlying this algorithm can be found in [1].

  1. Apply unit load conjugate to desired displacement quantity.

  2. Split loaded bar into two sub-bars and assign load to new node.

  3. Solve for unknown nodal displacements, derive deformations and end forces.

  4. Determine deflection curve using beam differential equation.

References

[1]

D. Dinkler. “Grundlagen der Baustatik: Modelle und Berechnungsmethoden für ebene Stabtragwerke”. Band 1, 2011.

property differential_equation#

The deflection curves of the members in the analysis mesh.

Returns:
List[DifferentialEquation]
force(kind, obj, position=0.0, n_disc=10)#

Computes the influence line for the specified force quantity at the given location and then calls ‘plot()’ to display the graphical result.

Parameters:
kindLiteral[‘fx’, ‘fz’, ‘fm’]

Type of the target force quantity.

objBar | Node

Location — Node or Bar.

positionfloat, default=0.0

If obj is a Bar, the position along the member.

n_discint, default=10

Number of discretization points for plotting.

Returns:
None

Plots the influence line.

See also

_compute_norm_force()

Method to compute the normalization force.

_modify_system()

Method to modify the system for influence calculation.

SystemModifier

Class for system modifications.

DifferentialEquation

Class for bar results.

Notes

The influence line is determined using the kinematic method.

  1. Lagrange’s release - Release the constraint conjugate to the desired force quantity at location k (position) and apply a unit load to account for the imposed negative displacement [1].

  2. Element stiffness matrix - Formulate stiffness relations of individual elements considering hinges [2].

  3. Global system assembly - Establish equation system for entire structure including support conditions [2].

  4. Mobility check - Use singular value decomposition to check for mobility [1].

  5. Solve equation system - Determine unknown nodal displacements, then compute total deformation at bar ends.

  6. Scale results - Multiply member deformations and end forces by \(f = -1 / \delta_{k,act}\) [3].

  7. Deflection curve - Determine deflection curve using beam differential equation.

References

[1] (1,2)

D. Dinkler. “Grundlagen der Baustatik: Modelle und Berechnungsmethoden für ebene Stabtragwerke”. Band 1, Seite 105 ff., 2011.

[2] (1,2)

R. Dallmann. “Baustatik 3: Theorie II. Ordnung und computerorientierte Methoden der Stabtragwerke”. Band 2, Seite 65 ff., 2015.

[3]
  1. Franke, T. Kunow. “Kleines Einmaleins der Baustatik”, 2007.

property logger#

Returns the logger instance associated with this object.

Returns:
logging.Logger

The configured logger.

property modified_system#

The modified system used for the influence line computation.

Returns:
System
property norm_force#

The normalizing virtual force used for the influence line computation.

Returns:
float
plot(scale=1, mode='MPL')#

Plot the influence line, either based on deformation results or rigid-body motion results.

Parameters:
scaleint

Scale factor for scaling the results.

modestr, default=’MPL’

Rendering mode for graphical output.

Returns:
None
Raises:
AttributeError

If no influence line data is available.

property poleplan#

The pole plan used for the influence line computation.

Returns:
Poleplan
property rigid_motions#

The rigid-body motions of the members when the system becomes a mechanism.

Returns:
List[RigidBodyDisplacement]
property solution#

The solution of the system used for the influence line computation.

Returns:
Solver
class sstatics.core.calc_methods.second_order.SecondOrder(system, debug=False)#

Bases: LoggerMixin

Executes second-order structural analysis for the given system.

This class performs analysis according to second-order theory, considering geometric nonlinearities that arise from large displacements or axial forces. Two solution strategies are available: a matrix-based approach and an iterative approach.

The implementation of this class is based on the literature [1], [2], [3], [4] and [5]

Parameters:
systemSystem

The structural system to be analyzed according to second-order theory.

debugbool, default=False

Enable debug logging for intermediate steps.

Notes

1. Matrix-based approach

This formulation replaces each first-order bar element by a modified second-order bar element (BarSecond). Depending on the selected approach, the geometric stiffness contributions are incorporated via:

  • "analytic": analytical second-order stiffness matrix

  • "taylor": Taylor series expansion

  • "p_delta": P–Δ geometric stiffness formulation

After selecting the formulation through matrix_approach(), an internally modified System instance is created. This modified system is then passed into a standard Solver, which performs load–displacement computation under linear assumptions but with modified stiffness.

2. Iterative approach

The iterative method computes geometric nonlinearity by repeatedly:

  1. Solving the current system for nodal displacements

  2. Updating the geometry

  3. Recalculating the updated system

  4. Checking convergence via displacement change (tolerance)

Depending on result_type:

  • "cumulative" — results represent total deformation/state at iteration

    i

  • "incremental" — results store the difference between iteration i and iteration i − 1

All iteration steps, including geometric updates are stored in _iteration_results.

References

[1]

R. Dallmann. “Baustatik 3: Theorie II. Ordnung und computerorientierte Methoden der Stabtragwerke”. 2. Auflage, 2015.

[2]

H. Werkle. “Finite Elemente in der Baustatik: Statik und Dynamik der Stab- und Flächentragwerke”. 3. Auflage, 2008.

[3]

W.B. Krätzig, R. Harte, C. Könke, Y.S. Petryna. “Tragwerke 2: Theorie und Berechnungsmethoden statisch unbestimmter Stabtragwerke”. 5. Auflage, 2019.

[4]

C. Spura. “Einführung in die Balkentheorie nach Timoshenko und Euler- Bernoulli”. 2019.

[5]

H. Rothert, V. Gensichen. “Nichtlineare Stabstatik: Baustatische Grundlagen und Anwendungen”. 1. Auflage, 1987.

property averaged_longitudinal_force#

Transformation of normal and shear forces to longitudinal force.

The calculation of the longitudinal force is necessary to calculate systems according to the matrix approach for second-order theory.

Since equilibrium according to second-order theory is determined on the deformed system, it is common practice to replace the normal and shear forces with their statically equivalent transverse force \(T\) and longitudinal force \(L\). The average longitudinal force is required in second-order theory to adjust the element stiffness matrix and the load vectors.

Notes

The transformation is performed using the following equations:

At the start of the bar:

\[L_{i} = N_{i} \cdot \cos(\varphi_{i}) + V_{i} \cdot \ \sin(\varphi_{i})\]

At the end of the bar:

\[L_{j} = N_{j} \cdot \cos(\varphi_{j}) + V_{j} \cdot \ \sin(\varphi_{j})\]

Subsequently, the average longitudinal force over the entire bar is calculated as:

\[L_{avg} = \dfrac{L_{i} + L_{j}}{2}\]

This simplifies the assumption that the longitudinal force is constant throughout the length of the bar.

If the longitudinal force is not constant, discretization errors may occur. In such cases, it is recommended to divide the bar into multiple segments, which improves the accuracy of the calculation.

differential_equation(approach, iteration_index=None, bar_index=None, n_disc=10)#

Construct differential equation objects for bar deformation analysis.

Depending on the chosen approach, this method generates instances of DifferentialEquationSecond (matrix-based approach) or generic DifferentialEquation instantiated through get_differential_equation() (iterative approach).

Parameters:
approach{‘matrix’, ‘iterative’}

Defines which second-order analysis results are used.

iteration_indexint, optional

Required for the iterative approach. Determines which iteration step is used. Negative indexing is supported.

bar_indexint, optional

If provided, only the specified bar is processed. Negative indices are allowed. If omitted, all bars are processed.

n_discint, default=10

Number of subdivisions used when constructing differential equation functions.

Returns:
DifferentialEquation or list of DifferentialEquation

One object per bar or a list for all bars.

Raises:
ValueError

If the approach or iteration index is invalid.

AttributeError

If the matrix approach was requested before running matrix_approach().

RuntimeError

If the iterative approach was requested but no iterations exist.

Notes

  • In cumulative mode, deformation and forces are taken directly from

    the solver of the chosen iteration.

  • In incremental mode, differential quantities from the stored iteration history are used.

property iteration_count#

Return the total number of performed iteration steps.

Returns:
int

Number of computed iterations.

Raises:
RuntimeError

If no iterative analysis has been performed yet.

iterative_approach(iterations=10, tolerance=0.001, result_type='cumulative')#

Execute an iterative geometric–nonlinear second-order analysis.

This method performs repeated updates of the system geometry based on newly computed nodal displacements. The process continues until convergence is reached or the maximum number of iterations is exhausted.

Parameters:
iterationsint, default=10

Maximum number of allowed iteration steps.

tolerancefloat, default=1e-3

Convergence threshold based on displacement changes between successive iterations.

result_type{‘cumulative’, ‘incremental’}, default=’cumulative’

Determines the stored format of iteration results:

  • 'cumulative': total values at each iteration

  • 'incremental': differences between iteration i and i–1

Raises:
ValueError

If iterations is not a positive integer.

ValueError

If result_type is invalid.

Notes

The results of each iteration are stored in _iteration_results and can be accessed via solver_iteration_cumulative() for the ‘cumulative’ result type or via results_iterative_growth() for the ‘incremental’ result type.

property logger#

Returns the logger instance associated with this object.

Returns:
logging.Logger

The configured logger.

matrix_approach(approach)#

Configure and initialize the matrix-based second-order analysis.

This method selects the second-order formulation to be applied to each structural element. A modified System instance is constructed internally in which each bar is replaced by a BarSecond element using the chosen theory.

Parameters:
approach{‘analytic’, ‘p_delta’, ‘taylor’}

Selects the second-order formulation for the modified stiffness:

  • 'analytic' Closed-form exact geometric stiffness effects.

  • 'p_delta' P–Δ geometric stiffness formulation.

  • 'taylor' Taylor-series expansion

Raises:
ValueError

If approach is not one of the supported options.

Notes

After calling this method, the modified system can be accessed via system_matrix_approach and the corresponding solver via solver_matrix_approach.

property max_shift#

Return the maximum nodal shift magnitude for each iteration.

Retrieves the maximum nodal shift values computed during each step of the iterative procedure. These values indicate how much the nodal geometry changed from one iteration to the next and are typically used to assess convergence behavior.

Returns:
list of float

List containing the maximum nodal shift magnitude for each iteration. The index of each entry corresponds to the respective iteration step.

Raises:
AttributeError

If no iteration results are available. This occurs when the iterative procedure has not been executed yet.

plot(approach, iteration_index=None, kind='normal', bar_mesh_type='bars', decimals=2, sig_digits=None, n_disc=10, mode='mpl', color='red', show_load=False, scale=1)#

Plot second-order internal forces or deformation results.

This method constructs a SystemResult object based on either:

  • matrix-based second-order theory, or

  • (cumulative; incremental) iterative results,

and visualizes the selected quantity using ResultGraphic.

Parameters:
approach{‘matrix’, ‘iterative’}

Defines whether the matrix-based or iterative results should be plotted.

iteration_indexint, optional

Required for the iterative approach. Specifies the iteration step. Supports negative indices.

kind{‘normal’, ‘shear’, ‘moment’, ‘u’, ‘w’, ‘phi’,

‘bending_line’}, default=’normal’

Selects the result quantity to display.

bar_mesh_type{‘bars’, ‘user_mesh’, ‘mesh’}, default=’bars’

Mesh used for the graphic bar geometry.

decimalsint, optional

Number of decimals for label annotation.

sig_digits: int | None, default=None

Number of significant digits for label annotation.

n_discint, default=10

Number of subdivisions for result interpolation.

mode{‘mpl’, ‘plotly’}, default=’mpl’

Chosen renderer

colorstr, default=’red’

Color of the plot

show_loadbool, default=False

Specifies whether the load is plotted.

scaleint, default=1

Scale factor for plot

Raises:
ValueError

If the approach or iteration index is invalid.

AttributeError

If the matrix-based approach was not initialized.

RuntimeError

If iterative results were requested but none exist.

Notes

Incremental mode plots incremental quantities (differences between consecutive iterations), whereas cumulative mode displays the absolute state of the structure at that iteration.

results_iterative_growth(iteration=-1, difference='internal_forces')#

Retrieve the incremental growth result for a specific iteration step.

This method returns a specific difference field for the given iteration, if the chosen iteration mode is incremental.

The function reconstructs the incremental data from the stored iteration results. Negative indices are supported (e.g., -1 refers to the last iteration).

Parameters:
iterationint, default=-1

The iteration index to extract. Supports negative indexing to count from the end of the iteration history.

difference{‘internal_forces’, ‘bar_deform_total’, ‘node_deform’,

‘node_support_forces’, ‘system_support_forces’}, default=’internal_forces’

Specifies which incremental data field to return when using the incremental iteration mode.

Returns:
Any

The incremental difference dataset associated with the chosen difference type.

Raises:
AttributeError

If no iterations have been performed yet.

ValueError

If the function is called while the iteration mode is cumulative. If the requested difference type is invalid.

IndexError

If the requested iteration index does not exist.

solver_iteration_cumulative(iteration=-1)#

Return a solver corresponding to a specific iteration step for the iteration mode ‘cumulative’.

The solver is reconstructed by using the system state stored in the iteration results. Negative indices may be used to access iterations from the end (-1 = last iteration).

Parameters:
iterationint, default=-1

Index of the iteration to extract. Supports negative indexing.

Returns:
Solver

Solver configured for the geometry and internal forces at the selected iteration.

Raises:
AttributeError

If no iteration has been performed yet.

ValueError

If the requested iteration index does not exist.

property solver_matrix_approach#

Return the solver associated with the chosen matrix-based second-order formulation.

A new Solver instance is created on first access, using the internally stored modified second-order system generated via matrix_approach(). Internal bar forces of the solver are replaced by second-order transformed forces.

Returns:
Solver

Solver instance operating on the modified second-order system.

Raises:
AttributeError

If no matrix-based system is available. Users must call matrix_approach() before accessing this property.

system_iterative(iteration=-1)#

Return the structural system for a specific iteration step.

Negative indices follow Python semantics (-1 returns the last iteration). The returned System reflects updated bar lengths, orientations and nodal positions at that iteration.

Parameters:
iterationint, default=-1

Iteration index. Negative values count from the end.

Returns:
System

The system geometry of the selected iteration step.

Raises:
RuntimeError

If no iterations have been carried out.

ValueError

If the index is out of range.

property system_matrix_approach#

Return the constructed second-order system.

This system represents the structure where each bar element is replaced by its second-order equivalent using the formulation selected via matrix_approach().

Returns:
System

The modified second-order system.

Raises:
AttributeError

If no matrix-based system has been computed yet.

class sstatics.core.calc_methods.principle_of_virtual_force.PVF(system, debug=False)#

Bases: LoggerMixin

Executes the Principle of Virtual Forces (PvF).

The Principle of Virtual Forces (german: Prinzip der virtuellen Kräfte) is used to compute displacements by applying a virtual load at the location and in the direction of the desired deformation. Exactly one virtual load must be applied per deformation calculation.

This class provides tools to generate such a virtual system by:
  • applying a virtual load at a node,

  • applying a virtual load along a bar,

  • applying a virtual moment couple at a connecting node.

After applying the virtual load, the class constructs:
  • the virtual system (with only the virtual load),

  • the real system (with the physical loads),

ensures both systems have consistent meshing, and computes the displacement using the internal work equation (see EquationOfWork).

Parameters:
systemSystem

The structural system to be analyzed using the principle of virtual forces.

debugbool, default=False

Enable debug logging for intermediate steps.

add_virtual_bar_load(obj, force, position=0, virt_force=1)#

Adds a virtual load to a bar.

Applies a virtual load at a specific location along a bar. To maintain the validity of the method, only one virtual load should be applied at a time.All existing loads in the system are first removed. If the position is between 0 and 1, the bar is internally subdivided.

Parameters:
objBar

The bar to which the virtual load is applied.

force{‘fx’, ‘fz’, ‘fm’}
Direction of the applied virtual load:
  • fx: system x-direction

  • fz: system z-direction

  • fm: Moment at the bar

positionfloat, default=0

Relative position along the bar (from 0 to 1) where the virtual load is applied.

virt_forcefloat, default=1

Magnitude of the virtual force, default is 1.

add_virtual_moment_couple(bar_positive_m, bar_negative_m, connecting_node, virt_force=1.0)#

Adds a virtual moment couple to two bars.

A moment couple consists of equal and opposite virtual moments applied to two bars connected at the same node. All existing loads are removed beforehand.

Parameters:
bar_positive_mBar

Bar receiving the positive moment component.

bar_negative_mBar

Bar receiving the negative moment component.

connecting_nodeNode

Node where the moment couple acts and to which both bars must be connected.

virt_forcefloat, default=1

Magnitude of the moment, default is 1. The negative moment is applied as -virt_force.

add_virtual_node_load(obj, force, virt_force=1)#

Adds a virtual load to a node.

Applies a virtual load to a given node. To maintain the validity of the method, only one virtual load should be applied at a time. All previous loads are cleared before the new load is applied.

Parameters:
objNode

The node at which the virtual load is applied.

force{‘fx’, ‘fz’, ‘fm’}
Direction of the applied virtual load:
  • fx: system x-direction

  • fz: system z-direction

  • fm: Moment at the node

virt_forcefloat, default=1

Magnitude of the virtual force, default is 1.

deformation()#

Performs the calculation using the Principle of Virtual Forces.

The deformation is evaluated exactly at the location and in the direction of the virtual load using the internal virtual work.

Returns:
numpy.ndarray

The internal virtual work due to the applied virtual and real systems.

property equation_of_work#

EquationOfWork

Returns the cached EquationOfWork instance. If it has not been created yet, it is instantiated on first access.

Returns:
EquationOfWork

The lazily created and cached EquationOfWork instance.

property logger#

Returns the logger instance associated with this object.

Returns:
logging.Logger

The configured logger.

plot(system_mode='real', kind='normal', bar_mesh_type='bars', decimals=2, sig_digits=None, n_disc=10, mode='mpl', color='red', show_load=False, scale=1)#

Plot internal forces or deformation results of either the system with real or virtual loads.

Parameters:
system_mode{‘real’, ‘virt’}

Defines whether the results of the system with real loads or the system with virtual loads should be plotted.

kind{‘normal’, ‘shear’, ‘moment’, ‘u’, ‘w’, ‘phi’,

‘bending_line’}, default=’normal’

Selects the result quantity to display.

bar_mesh_type{‘bars’, ‘user_mesh’, ‘mesh’}, default=’bars’

Mesh used for the graphic bar geometry.

decimalsint, optional

Number of decimals for label annotation.

sig_digits: int | None, default=None

Number of significant digits for label annotation.

n_discint, default=10

Number of subdivisions for result interpolation.

mode{‘mpl’, ‘plotly’}, default=’mpl’

Chosen renderer

colorstr, default=’red’

Color of the plot

show_loadbool, default=False

Specifies whether the load is plotted.

scaleint, default=1

Scale factor for plot

Raises:
ValueError

If the system mode is invalid.

property solution_real_system#

Returns the first order analysis of the system with real loads.

A new FirstOrder instance is created on first access, using the system with real loads. Before solving, the system is meshed consistently with the real system, ensuring matching integration lengths for the internal work calculation.

Returns:
FirstOrder

FirstOrder instance operating on the system with real loads.

Raises:
RuntimeError

If no virtual load has been applied (mesh needs virtual division points).

property solution_virtual_system#

Returns the first order analysis of the virtual system.

A new FirstOrder instance is created on first access, using the internally stored virtual system generated via add_virtual_bar_load() or add_virtual_node_load(). Before solving, the system is meshed consistently with the real system, ensuring matching integration lengths for the internal work calculation.

Returns:
FirstOrder

FirstOrder instance operating on the virtual system.

Raises:
RuntimeError

If no virtual system exists.

property virtual_system#

Returns the structural system containing the applied virtual load.

Returns:
System

The system with the virtual load

Raises:
RuntimeError

If no virtual load has been applied.

work_matrix(kind)#

Return the work matrix for nodes or bars.

Selects the internal work matrix corresponding to either Nodes or Bars. Rows correspond to the degrees of freedom for nodes or mesh segments for bars.

Parameters:
kind{‘nodes’, ‘bars’}

Specify whether to return the nodal work matrix or the bar work matrix.

Returns:
ndarray

The requested work matrix.

Raises:
ValueError

If kind is not ‘nodes’ or ‘bars’.

work_of(obj, sum=True)#

Return the work contribution for a Node or a Bar.

For a Bar:

Returns one or multiple work rows depending on the number of mesh segments belonging to the Bar. If sum is True, the rows are summed into a single vector.

For a Node:

Returns the single work row associated with that Node.

Parameters:
objNode | Bar

The structural object whose work contribution is requested.

sumbool, optional

Summation flag for Bars with multiple mesh segments. Ignored for Nodes. Default is True.

Returns:
ndarray

A 1D array representing the work row (Node) or summed row(s) (Bar), or a 2D array of rows if sum is False for a Bar.

Raises:
TypeError

If obj is neither a Node nor a Bar.

class sstatics.core.calc_methods.reduction_theorem.ReductionTheorem(*a, **k)#

Bases: PVF

Executes the Reduction Theorem.

This class applies the Reduction Theorem (german: Reduktionssatz) to simplify statically indeterminate systems by removing constraints to achieve a statically determinate system, then applying virtual loads for analysis.

Parameters:
systemSystem

The structural system to be analyzed using the Reduction Theorem.

add_virtual_bar_load(obj, force, position=0, virt_force=1)#

Adds a virtual load to a bar.

Applies a virtual load at a specific location along a bar. To maintain the validity of the method, only one virtual load should be applied at a time.All existing loads in the system are first removed. If the position is between 0 and 1, the bar is internally subdivided.

Parameters:
objBar

The bar to which the virtual load is applied.

force{‘fx’, ‘fz’, ‘fm’}
Direction of the applied virtual load:
  • fx: system x-direction

  • fz: system z-direction

  • fm: Moment at the bar

positionfloat, default=0

Relative position along the bar (from 0 to 1) where the virtual load is applied.

virt_forcefloat, default=1

Magnitude of the virtual force, default is 1.

add_virtual_moment_couple(bar_positive_m, bar_negative_m, connecting_node, virt_force=1.0)#

Adds a virtual moment couple to two bars.

A moment couple consists of equal and opposite virtual moments applied to two bars connected at the same node. All existing loads are removed beforehand.

Parameters:
bar_positive_mBar

Bar receiving the positive moment component.

bar_negative_mBar

Bar receiving the negative moment component.

connecting_nodeNode

Node where the moment couple acts and to which both bars must be connected.

virt_forcefloat, default=1

Magnitude of the moment, default is 1. The negative moment is applied as -virt_force.

add_virtual_node_load(obj, force, virt_force=1)#

Adds a virtual load to a node.

Applies a virtual load to a given node. To maintain the validity of the method, only one virtual load should be applied at a time. All previous loads are cleared before the new load is applied.

Parameters:
objNode

The node at which the virtual load is applied.

force{‘fx’, ‘fz’, ‘fm’}
Direction of the applied virtual load:
  • fx: system x-direction

  • fz: system z-direction

  • fm: Moment at the node

virt_forcefloat, default=1

Magnitude of the virtual force, default is 1.

deformation()#

Performs the calculation using the Principle of Virtual Forces.

The deformation is evaluated exactly at the location and in the direction of the virtual load using the internal virtual work.

Returns:
numpy.ndarray

The internal virtual work due to the applied virtual and real systems.

property degree_of_static_indeterminacy#

Calculates the degree of static indeterminacy of the system.

This function checks the static determinacy of the currently modified system. A system is statically determinate if n = 0. It is statically indeterminate if n > 0 and statically unstable if n < 0.

Returns:
int

The number of redundant constraints in the system.

delete_bar(obj)#

Deletes a bar from the structural system.

To obtain a statically determinate system, it is also possible to remove bars from the modeled structure. However, the software does not perform an internal check of deformation contributions to determine whether a bar can be removed safely.

Parameters:
objBar

The bar to be removed from the system.

property equation_of_work#

EquationOfWork

Returns the cached EquationOfWork instance. If it has not been created yet, it is instantiated on first access.

Returns:
EquationOfWork

The lazily created and cached EquationOfWork instance.

property logger#

Returns the logger instance associated with this object.

Returns:
logging.Logger

The configured logger.

modify_bar(obj, hinge)#

Inserts a hinge at a specified location in a bar.

Inserts a specified hinge at a bar. Multiple calls can be made to insert additional hinges until the system becomes statically determinate. Hierbei ist es wichtig, dass das System nicht verschieblich wird

Parameters:
objBar

The bar where the hinge will be inserted.

hinge{‘hinge_u_i’, ‘hinge_w_i’, ‘hinge_phi_i’,’hinge_u_j’, ‘hinge_w_j’, ‘hinge_phi_j’}

The hinge to be applied and its location: Anfangsknoten (node_i ) oder Endknoten (node_j).

Raises:
ValueError

If hinge type is invalid.

modify_node(obj, support)#

Modifies the support conditions of a node.

Releases a specified degree of freedom (DOF) at a node. Multiple calls can be made to release additional DOFs until the system becomes statically determinate.

Parameters:
objNode

Node whose support condition will be modified.

support{‘u’, ‘w’, ‘phi’}
Degree of freedom to release:
  • u: Horizontal (x-direction)

  • w: Vertical (z-direction)

  • phi: Rotation

Raises:
ValueError

If support type is invalid.

plot(system_mode='real', kind='normal', bar_mesh_type='bars', decimals=2, sig_digits=None, n_disc=10, mode='mpl', color='red', show_load=False, scale=1)#

Plot internal forces or deformation results of either the system with real or virtual loads.

Parameters:
system_mode{‘real’, ‘virt’}

Defines whether the results of the system with real loads or the system with virtual loads should be plotted.

kind{‘normal’, ‘shear’, ‘moment’, ‘u’, ‘w’, ‘phi’,

‘bending_line’}, default=’normal’

Selects the result quantity to display.

bar_mesh_type{‘bars’, ‘user_mesh’, ‘mesh’}, default=’bars’

Mesh used for the graphic bar geometry.

decimalsint, optional

Number of decimals for label annotation.

sig_digits: int | None, default=None

Number of significant digits for label annotation.

n_discint, default=10

Number of subdivisions for result interpolation.

mode{‘mpl’, ‘plotly’}, default=’mpl’

Chosen renderer

colorstr, default=’red’

Color of the plot

show_loadbool, default=False

Specifies whether the load is plotted.

scaleint, default=1

Scale factor for plot

Raises:
ValueError

If the system mode is invalid.

plot_released_system(mode='mpl')#

Plot of the released system.

Parameters:
mode{‘mpl’, ‘plotly’}, default=’mpl’

Specifies which renderer is chosen

Raises:
ValueError

If the released system is not defined.

property released_system#

Returns the current released system.

Returns:
System

The reduced (statically determinate) system.

property solution_real_system#

Returns the first order analysis of the system with real loads.

A new FirstOrder instance is created on first access, using the system with real loads. Before solving, the system is meshed consistently with the real system, ensuring matching integration lengths for the internal work calculation.

Returns:
FirstOrder

FirstOrder instance operating on the system with real loads.

Raises:
RuntimeError

If no virtual load has been applied (mesh needs virtual division points).

property solution_virtual_system#

Returns the first order analysis of the virtual system.

A new FirstOrder instance is created on first access, using the internally stored virtual system generated via add_virtual_bar_load() or add_virtual_node_load(). Before solving, the system is meshed consistently with the real system, ensuring matching integration lengths for the internal work calculation.

Returns:
FirstOrder

FirstOrder instance operating on the virtual system.

Raises:
RuntimeError

If no virtual system exists.

property virtual_system#

Returns the structural system containing the applied virtual load.

Returns:
System

The system with the virtual load

Raises:
RuntimeError

If no virtual load has been applied.

work_matrix(kind)#

Return the work matrix for nodes or bars.

Selects the internal work matrix corresponding to either Nodes or Bars. Rows correspond to the degrees of freedom for nodes or mesh segments for bars.

Parameters:
kind{‘nodes’, ‘bars’}

Specify whether to return the nodal work matrix or the bar work matrix.

Returns:
ndarray

The requested work matrix.

Raises:
ValueError

If kind is not ‘nodes’ or ‘bars’.

work_of(obj, sum=True)#

Return the work contribution for a Node or a Bar.

For a Bar:

Returns one or multiple work rows depending on the number of mesh segments belonging to the Bar. If sum is True, the rows are summed into a single vector.

For a Node:

Returns the single work row associated with that Node.

Parameters:
objNode | Bar

The structural object whose work contribution is requested.

sumbool, optional

Summation flag for Bars with multiple mesh segments. Ignored for Nodes. Default is True.

Returns:
ndarray

A 1D array representing the work row (Node) or summed row(s) (Bar), or a 2D array of rows if sum is False for a Bar.

Raises:
TypeError

If obj is neither a Node nor a Bar.

class sstatics.core.calc_methods.force_method.ForceMethod(*a, **k)#

Bases: ReductionTheorem

Executes the Force Method

Method to calculate internal forces, support forces and deformations of statically undetermined systems (n > 0). This method is based on the principle of virtual forces (PvF).

Parameters:
systemSystem

The structural system to be analyzed using the Force Method.

add_virtual_bar_load(*args, **kwargs)#

Disallows adding virtual bar loads in the force method.

Since the force method does not employ virtual systems or virtual loads, defining bar loads in a virtual context is not permitted.

Raises:
ValueError

Always raised for this method.

add_virtual_moment_couple(*args, **kwargs)#

Disallows adding virtual moment couples in the force method.

Virtual moment couples are incompatible with the solution strategy of the force method and are therefore rejected.

Raises:
ValueError

Always raised for this method.

add_virtual_node_load(*args, **kwargs)#

Disallows adding virtual node loads in the force method.

Virtual node loads are a concept of the displacement method and are not used in the force method (KGV). Any attempt to add such loads is rejected.

Raises:
ValueError

Always raised for this method.

deformation()#

Disallows computation of single deformations.

In the force method (KGV), deformations are not computed directly by querying individual values. Deformations are only implicitly evaluated through the Equation of Work. Accessing single deformations is therefore not supported.

Raises:
ValueError

Always raised for this method.

property degree_of_static_indeterminacy#

Calculates the degree of static indeterminacy of the system.

This function checks the static determinacy of the currently modified system. A system is statically determinate if n = 0. It is statically indeterminate if n > 0 and statically unstable if n < 0.

Returns:
int

The number of redundant constraints in the system.

delete_bar(obj)#

Deletes a bar from the structural system.

To obtain a statically determinate system, it is also possible to remove bars from the modeled structure. However, the software does not perform an internal check of deformation contributions to determine whether a bar can be removed safely.

Parameters:
objBar

The bar to be removed from the system.

property eow_matrix#

Returns the matrix of Equation of Work objects for all ULS combinations.

Creates a square matrix where each entry represents the internal work between a pair of unit load systems (ULS). This matrix forms the basis for evaluating the influence coefficients used in the force method.

Returns:
numpy.array

Two-dimensional object array containing EquationOfWork instances, with one row and one column per redundant.

property eow_vector#

Returns the vector of Equation of Work objects for the real load state.

For each unit load system (ULS), an EquationOfWork instance is created, representing the internal work between the released real load system (RLS) and the respective ULS. This vector forms the basis for computing the load coefficients used in the force method.

Returns:
numpy.array

nx1 vector containing one EquationOfWork instance per unit load system. n = number of unit load states

property equation_of_work#

EquationOfWork

Returns the cached EquationOfWork instance. If it has not been created yet, it is instantiated on first access.

Returns:
EquationOfWork

The lazily created and cached EquationOfWork instance.

property influence_coef#

Calculate the influence number matrix for the force method.

Converts the EquationOfWork matrix into its numerical form by evaluating \(\delta_{ij}\) for each entry. The resulting square matrix represents the coupling between redundants and forms the stiffness-like system matrix of the force method.

Returns:
numpy.array

Two-dimensional square matrix of floating-point influence numbers.

property load_coef#

Calculate the load coefficients for the force method.

Evaluates the value \(\delta_{i}\) from each EquationOfWork object of the real load state with a unit load state. The resulting vector forms the right-hand side of the linear system in the force method.

Returns:
numpy.array

Column vector (n×1) of floating-point load coefficients.

property logger#

Returns the logger instance associated with this object.

Returns:
logging.Logger

The configured logger.

modify_bar(obj, hinge)#

Inserts a hinge at a specified location in a bar.

Inserts a specified hinge at a bar. Multiple calls can be made to insert additional hinges until the system becomes statically determinate. Hierbei ist es wichtig, dass das System nicht verschieblich wird

Parameters:
objBar

The bar where the hinge will be inserted.

hinge{‘hinge_u_i’, ‘hinge_w_i’, ‘hinge_phi_i’,’hinge_u_j’, ‘hinge_w_j’, ‘hinge_phi_j’}

The hinge to be applied and its location: Anfangsknoten (node_i ) oder Endknoten (node_j).

Raises:
ValueError

If hinge type is invalid.

modify_node(obj, support)#

Modifies the support conditions of a node.

Releases a specified degree of freedom (DOF) at a node. Multiple calls can be made to release additional DOFs until the system becomes statically determinate.

Parameters:
objNode

Node whose support condition will be modified.

support{‘u’, ‘w’, ‘phi’}
Degree of freedom to release:
  • u: Horizontal (x-direction)

  • w: Vertical (z-direction)

  • phi: Rotation

Raises:
ValueError

If support type is invalid.

plot(system_mode='rls', uls_index=None, kind='normal', bar_mesh_type='bars', decimals=2, sig_digits=None, n_disc=10, mode='mpl', color='red', show_load=False, scale=1)#

Plot internal forces or deformation results of either the system with real loads, the unit load states or the real load state.

Parameters:
systen_mode{‘uls’, ‘rls’}, default=’rls’

Defines whether the results of a unit load state or the real load state.

uls_indexint or None

If the chosen mode is uls, then an index of the unit loads system is needed to plot the chosen system.

decimalsint, optional

Number of decimals for label annotation.

sig_digits: int | None, default=None

Number of significant digits for label annotation.

n_discint, default=10

Number of subdivisions for result interpolation.

mode{‘mpl’, ‘plotly’}, default=’mpl’

Chosen renderer

colorstr, default=’red’

Color of the plot

show_loadbool, default=False

Specifies whether the load is plotted.

scaleint, default=1

Scale factor for plot

Raises:
ValueError

If the system mode is invalid.

plot_released_system(mode='mpl')#

Plot of the released system.

Parameters:
mode{‘mpl’, ‘plotly’}, default=’mpl’

Specifies which renderer is chosen

Raises:
ValueError

If the released system is not defined.

property redundants#

Solve the system of equations for the redundant forces.

Solves the linear system

\[A \, x = -b\]

where

The resulting vector \(x\) contains the magnitudes of all redundant forces.

Returns:
numpy.array

One-dimensional array containing the solved redundant forces.

property released_system#

Returns the current released system.

Returns:
System

The reduced (statically determinate) system.

property solution_real_system#

Returns the first order analysis of the system with real loads.

A new FirstOrder instance is created on first access, using the system with real loads. Before solving, the system is meshed consistently with the real system, ensuring matching integration lengths for the internal work calculation.

Returns:
FirstOrder

FirstOrder instance operating on the system with real loads.

Raises:
RuntimeError

If no virtual load has been applied (mesh needs virtual division points).

property solution_rls_system#

Returns the first order analysis of the released system in the real load state.

A new FirstOrder instance is created using the released system with real loads.

Returns:
FirstOrder

FirstOrder instance operating on the released system with real loads.

property solution_uls_systems#

Returns the first order analysis of the unit load states.

A new FirstOrder instance is created for each unit load system. Before solving, the system is meshed consistently with the real load state system, ensuring matching integration lengths for the internal work calculation.

Returns:
list[FirstOrder]

List of generated FirstOrder instances, one per unit load case.

solution_virtual_system()#

Disallows access to a virtual solution.

Virtual solutions are not generated in the force method. Any attempt to retrieve such a solution is rejected.

Raises:
ValueError

Always raised for this method.

property uls_systems#

Return virtual systems for the unit load states (ULS).

First validates that the system is released and statically determinate (_validate_system_ready()). All external loads are then cleared before generating the unit load systems, one for each redundant.

Returns:
list[System]

List of generated systems, one per unit load case.

virtual_system()#

Disallows access to a virtual system.

The force method does not define or use a virtual system. Accessing one is not permitted.

Raises:
ValueError

Always raised for this method.

work_matrix(kind, uls_index_i=0, uls_index_j=None)#

Public API to access the work matrix for nodes or bars.

Validates indices and returns the corresponding work matrix.

Parameters:
kind{‘nodes’, ‘bars’}

Type of work matrix to return.

uls_index_iint, optional

Row index in EOW vector or matrix. Default is 0.

uls_index_jint or None, optional

Column index for matrix case. Default is None.

Returns:
ndarray

Work matrix for nodes or bars at the specified indices.

work_of(obj, uls_index_i=0, uls_index_j=None, sum=True)#

Public API to access the work of a Node or Bar.

Validates indices and returns the work contribution of the specified object.

Parameters:
objNode or Bar

Structural object whose work contribution is requested.

uls_index_iint, optional

Row index in EOW vector or matrix. Default is 0.

uls_index_jint or None, optional

Column index for matrix case. Default is None.

sumbool, optional

If True (default), sum contributions for Bars with multiple mesh segments. Ignored for Nodes.

Returns:
ndarray

Work row (Node) or summed/staked rows (Bar).

Raises:
TypeError

If obj is neither a Node nor a Bar.

class sstatics.core.calc_methods.dmg.DMG(*a, **k)#

Bases: ForceMethod

add_virtual_bar_load(*args, **kwargs)#

Disallows adding virtual bar loads in the force method.

Since the force method does not employ virtual systems or virtual loads, defining bar loads in a virtual context is not permitted.

Raises:
ValueError

Always raised for this method.

add_virtual_moment_couple(*args, **kwargs)#

Disallows adding virtual moment couples in the force method.

Virtual moment couples are incompatible with the solution strategy of the force method and are therefore rejected.

Raises:
ValueError

Always raised for this method.

add_virtual_node_load(*args, **kwargs)#

Disallows adding virtual node loads in the force method.

Virtual node loads are a concept of the displacement method and are not used in the force method (KGV). Any attempt to add such loads is rejected.

Raises:
ValueError

Always raised for this method.

deformation()#

Disallows computation of single deformations.

In the force method (KGV), deformations are not computed directly by querying individual values. Deformations are only implicitly evaluated through the Equation of Work. Accessing single deformations is therefore not supported.

Raises:
ValueError

Always raised for this method.

property degree_of_static_indeterminacy#

Calculates the degree of static indeterminacy of the system.

This function checks the static determinacy of the currently modified system. A system is statically determinate if n = 0. It is statically indeterminate if n > 0 and statically unstable if n < 0.

Returns:
int

The number of redundant constraints in the system.

delete_bar(obj)#

Deletes a bar from the structural system.

To obtain a statically determinate system, it is also possible to remove bars from the modeled structure. However, the software does not perform an internal check of deformation contributions to determine whether a bar can be removed safely.

Parameters:
objBar

The bar to be removed from the system.

property eow_matrix#

Returns the matrix of Equation of Work objects for all ULS combinations.

Creates a square matrix where each entry represents the internal work between a pair of unit load systems (ULS). This matrix forms the basis for evaluating the influence coefficients used in the force method.

Returns:
numpy.array

Two-dimensional object array containing EquationOfWork instances, with one row and one column per redundant.

property eow_vector#

Returns the vector of Equation of Work objects for the real load state.

For each unit load system (ULS), an EquationOfWork instance is created, representing the internal work between the released real load system (RLS) and the respective ULS. This vector forms the basis for computing the load coefficients used in the force method.

Returns:
numpy.array

nx1 vector containing one EquationOfWork instance per unit load system. n = number of unit load states

property equation_of_work#

EquationOfWork

Returns the cached EquationOfWork instance. If it has not been created yet, it is instantiated on first access.

Returns:
EquationOfWork

The lazily created and cached EquationOfWork instance.

property influence_coef#

Calculate the influence number matrix for the force method.

Converts the EquationOfWork matrix into its numerical form by evaluating \(\delta_{ij}\) for each entry. The resulting square matrix represents the coupling between redundants and forms the stiffness-like system matrix of the force method.

Returns:
numpy.array

Two-dimensional square matrix of floating-point influence numbers.

property load_coef#

Calculate the load coefficients for the force method.

Evaluates the value \(\delta_{i}\) from each EquationOfWork object of the real load state with a unit load state. The resulting vector forms the right-hand side of the linear system in the force method.

Returns:
numpy.array

Column vector (n×1) of floating-point load coefficients.

log_linear_system(decimals=6)#

Log the linear system of equations (A x = b) for the force method.

Builds the system matrix from the influence numbers (A, obtained via influence_coef()) and the preliminary coefficients (b, obtained via load_coef()). The system matrix with the right-hand side is tabulated with labeled columns and logged.

Parameters:
decimalsint, optional

Number of decimal places used for floating point formatting in the tabulated output. Default is 6.

Returns:
None

The method logs the linear system but does not return data.

property logger#

Returns the logger instance associated with this object.

Returns:
logging.Logger

The configured logger.

modify_bar(obj, hinge)#

Inserts a hinge at a specified location in a bar.

Inserts a specified hinge at a bar. Multiple calls can be made to insert additional hinges until the system becomes statically determinate. Hierbei ist es wichtig, dass das System nicht verschieblich wird

Parameters:
objBar

The bar where the hinge will be inserted.

hinge{‘hinge_u_i’, ‘hinge_w_i’, ‘hinge_phi_i’,’hinge_u_j’, ‘hinge_w_j’, ‘hinge_phi_j’}

The hinge to be applied and its location: Anfangsknoten (node_i ) oder Endknoten (node_j).

Raises:
ValueError

If hinge type is invalid.

modify_node(obj, support)#

Modifies the support conditions of a node.

Releases a specified degree of freedom (DOF) at a node. Multiple calls can be made to release additional DOFs until the system becomes statically determinate.

Parameters:
objNode

Node whose support condition will be modified.

support{‘u’, ‘w’, ‘phi’}
Degree of freedom to release:
  • u: Horizontal (x-direction)

  • w: Vertical (z-direction)

  • phi: Rotation

Raises:
ValueError

If support type is invalid.

plot(system_mode='rls', uls_index=None, kind='normal', bar_mesh_type='bars', decimals=2, sig_digits=None, n_disc=10, mode='mpl', color='red', show_load=False, scale=1)#

Plot internal forces or deformation results of either the system with real loads, the unit load states or the real load state.

Parameters:
systen_mode{‘uls’, ‘rls’}, default=’rls’

Defines whether the results of a unit load state or the real load state.

uls_indexint or None

If the chosen mode is uls, then an index of the unit loads system is needed to plot the chosen system.

decimalsint, optional

Number of decimals for label annotation.

sig_digits: int | None, default=None

Number of significant digits for label annotation.

n_discint, default=10

Number of subdivisions for result interpolation.

mode{‘mpl’, ‘plotly’}, default=’mpl’

Chosen renderer

colorstr, default=’red’

Color of the plot

show_loadbool, default=False

Specifies whether the load is plotted.

scaleint, default=1

Scale factor for plot

Raises:
ValueError

If the system mode is invalid.

plot_released_system(mode='mpl')#

Plot of the released system.

Parameters:
mode{‘mpl’, ‘plotly’}, default=’mpl’

Specifies which renderer is chosen

Raises:
ValueError

If the released system is not defined.

property redundants#

Solve the system of equations for the redundant forces.

Solves the linear system

\[A \, x = -b\]

where

The resulting vector \(x\) contains the magnitudes of all redundant forces.

Returns:
numpy.array

One-dimensional array containing the solved redundant forces.

property released_system#

Returns the current released system.

Returns:
System

The reduced (statically determinate) system.

property solution_real_system#

Returns the first order analysis of the system with real loads.

A new FirstOrder instance is created on first access, using the system with real loads. Before solving, the system is meshed consistently with the real system, ensuring matching integration lengths for the internal work calculation.

Returns:
FirstOrder

FirstOrder instance operating on the system with real loads.

Raises:
RuntimeError

If no virtual load has been applied (mesh needs virtual division points).

property solution_rls_system#

Returns the first order analysis of the released system in the real load state.

A new FirstOrder instance is created using the released system with real loads.

Returns:
FirstOrder

FirstOrder instance operating on the released system with real loads.

property solution_uls_systems#

Returns the first order analysis of the unit load states.

A new FirstOrder instance is created for each unit load system. Before solving, the system is meshed consistently with the real load state system, ensuring matching integration lengths for the internal work calculation.

Returns:
list[FirstOrder]

List of generated FirstOrder instances, one per unit load case.

solution_virtual_system()#

Disallows access to a virtual solution.

Virtual solutions are not generated in the force method. Any attempt to retrieve such a solution is rejected.

Raises:
ValueError

Always raised for this method.

property support_moment#

Solve the system of equations for the redundant forces.

Solves the linear system

\[A \, x = -b\]

where

The resulting vector \(x\) contains the magnitudes of all redundant forces.

Returns:
numpy.array

One-dimensional array containing the solved redundant forces.

property uls_systems#

Return virtual systems for the unit load states (ULS).

First validates that the system is released and statically determinate (_validate_system_ready()). All external loads are then cleared before generating the unit load systems, one for each redundant.

Returns:
list[System]

List of generated systems, one per unit load case.

virtual_system()#

Disallows access to a virtual system.

The force method does not define or use a virtual system. Accessing one is not permitted.

Raises:
ValueError

Always raised for this method.

work_matrix(kind, uls_index_i=0, uls_index_j=None)#

Public API to access the work matrix for nodes or bars.

Validates indices and returns the corresponding work matrix.

Parameters:
kind{‘nodes’, ‘bars’}

Type of work matrix to return.

uls_index_iint, optional

Row index in EOW vector or matrix. Default is 0.

uls_index_jint or None, optional

Column index for matrix case. Default is None.

Returns:
ndarray

Work matrix for nodes or bars at the specified indices.

work_of(obj, uls_index_i=0, uls_index_j=None, sum=True)#

Public API to access the work of a Node or Bar.

Validates indices and returns the work contribution of the specified object.

Parameters:
objNode or Bar

Structural object whose work contribution is requested.

uls_index_iint, optional

Row index in EOW vector or matrix. Default is 0.

uls_index_jint or None, optional

Column index for matrix case. Default is None.

sumbool, optional

If True (default), sum contributions for Bars with multiple mesh segments. Ignored for Nodes.

Returns:
ndarray

Work row (Node) or summed/staked rows (Bar).

Raises:
TypeError

If obj is neither a Node nor a Bar.