m_n_kappa.MKappaByConstantCurvature#

class m_n_kappa.MKappaByConstantCurvature(cross_section, applied_curvature, applied_axial_force, maximum_neutral_axis=None, minimum_neutral_axis=None, maximum_iterations=20, axial_force_tolerance=5, solver=<class 'm_n_kappa.solver.Newton'>, is_called_by_user=True)#

Bases: MKappa

computation of one Moment-Curvature-Point by fixed curvature and varying the neutral axis

New in version 0.1.0.

Parameters:
  • cross_section (Crosssection) – cross-section to compute

  • applied_axial_force (float) – applied axial force (Default: 0.0)

  • maximum_neutral_axis (float) – maximum possible vertical position of the neutral-axis (Default: None)

  • minimum_neutral_axis (float) – minimum possible vertical position of the neutral-axis (Default: None)

  • maximum_iterations (int) – maximum allowed iterations (Default: 10) In case the given number of iterations before axial force within desired tolerance, the computation is classified as not successful and will be stopped

  • axial_force_tolerance (float) – if axial force within this tolerance the computation is terminated and classified as successful (Default: 5.0)

  • solver (Solver) – used solver (Default: Newton)

  • applied_curvature (float) –

  • is_called_by_user (bool) –

See also

MKappaByStrainPosition

compute curvature and neutral axis by a given StrainPosition

Examples

The cross_section of type Crosssection that is defined in the following will be used to demonstrate the functionality of MKappaByConstantCurvature. For reproducibility cross_section consist of one rectangular steel section.

>>> from m_n_kappa import Rectangle, Steel, Crosssection
>>> geometry = Rectangle(top_edge=0.0, bottom_edge=10.0, width=10.0)
>>> steel = Steel(f_y=355, failure_strain=0.15)
>>> section = geometry + steel
>>> cross_section = Crosssection(sections=[section])

MKappaByConstantCurvature only by passing cross_section an applied_curvature and an applied_axial_force. Initializing MKappaByConstantCurvature starts an iterative process to compute equilibrium of applied_axial_force and the axial_force.

axial_force results from the strain-distribution applied by applied_curvature and a neutral-axis value.

>>> from m_n_kappa import MKappaByConstantCurvature
>>> computation = MKappaByConstantCurvature(
...     cross_section=cross_section,
...     applied_curvature=0.001,
...     applied_axial_force=100.)

In case the computation was successful the attribute successful will return True.

>>> computation.successful
True

neutral_axis is the computed neutral-axis.

>>> computation.neutral_axis
4.985348948605643

In case the applied_axial_force is higher than maximum positive or negative axial force of the cross_section the computation will be marked by successful = False.

>>> computation = MKappaByConstantCurvature(
...     cross_section=cross_section,
...     applied_curvature=0.001,
...     applied_axial_force=36000.)
>>> computation.successful
False

The not_successful_reason will give you then a reason why it was not working.

>>> computation.not_successful_reason.reason
difference of axial forces at minimum and maximum neutral-axis have same sign

In this case you should choose a smaller value for the applied_axial_force.

Methods

axial_force_equilibrium()

latest computed axial-force-value

compute()

compute the cross-section with given initial values (curvature and neutral axis) and save it

initialize_boundary_curvatures()

initialize iteration process by computing the cross-section with boundary values of the neutral-axis (see attributes 'minimum_neutral_axis' and 'maximum_neutral_axis')

Attributes

applied_axial_force

axial-force the strain is to be computed

applied_curvature

applied curvature (no variation)

axial_force

latest computed axial-force-value

axial_force_tolerance

tolerance the axial_force_equilibrium() must be within for a successful computation

computations

conducted computations

computed_cross_section

computed cross_section of the current iteration

cross_section

cross-section to be computed

curvature

iteration

number of iteration

maximum_iterations

maximum iterations

maximum_neutral_axis

boundary condition of the neutral axis

minimum_neutral_axis

boundary_condition of the neutral axis

moment

computed moment of the cross_section

neutral_axis

point where strain_value is zero

not_successful_reason

In case computation was not successful gives a reason

solver

used solver to computed equilibrium

successful

indicates if strain has been computed successfully

variable

name variable that is changed to reach equilibrium of axial force

axial_force_equilibrium()#

latest computed axial-force-value

Return type:

float

compute()#

compute the cross-section with given initial values (curvature and neutral axis) and save it

Return type:

None

initialize_boundary_curvatures()#

initialize iteration process by computing the cross-section with boundary values of the neutral-axis (see attributes ‘minimum_neutral_axis’ and ‘maximum_neutral_axis’)

Return type:

None

property applied_axial_force: float#

axial-force the strain is to be computed

property applied_curvature: float#

applied curvature (no variation)

property axial_force: float#

latest computed axial-force-value

property axial_force_tolerance: float#

tolerance the axial_force_equilibrium() must be within for a successful computation

property computations: list[m_n_kappa.points.Computation]#

conducted computations

property computed_cross_section: m_n_kappa.crosssection.ComputationCrosssectionStrain | m_n_kappa.crosssection.ComputationCrosssectionCurvature#

computed cross_section of the current iteration

property cross_section: Crosssection#

cross-section to be computed

property curvature: float#
property iteration: int#

number of iteration

property maximum_iterations: int#

maximum iterations

property maximum_neutral_axis: float#

boundary condition of the neutral axis

property minimum_neutral_axis: float#

boundary_condition of the neutral axis

property moment: float#

computed moment of the cross_section

property neutral_axis: float#

point where strain_value is zero

property not_successful_reason: NotSuccessfulReason#

In case computation was not successful gives a reason

property solver: Solver#

used solver to computed equilibrium

property successful: bool#

indicates if strain has been computed successfully

property variable#

name variable that is changed to reach equilibrium of axial force

New in version 0.2.0.