API reference#
The reference guide contains a detailed description of the functions, modules, and objects included in the library. The reference describes how the methods work and which parameters can be used. It assumes that you have an understanding of the key concepts.
Models#
Base class for Navier problems. The sole reason of this class is to avoid circular referencing.
Returns the loads.
alias of
LoadCaseResultLinStat
A class designed to handle simply-supported plates bent in the X-Y plane and solve them using Navier’s method. The beam model can be either Euler-Bernoulli or Timoshenko, depending on whether shear stiffness is provided at instantiation.
- Parameters:
length (float) – The length of the beam.
N (int, Optional) – The number of harmonic terms involved in the approximation. Default is 100.
EI (float) – Bending stiffness.
GA (float, Optional) – Shear stiffness. Only for Timoshenko beams. Default is None.
loads (LoadGroup, Optional) – The loads. Default is None.
Examples
To define an Euler-Bernoulli beam of length 10.0 and bending stiffness 2000.0 with 100 harmonic terms involved:
>>> from sigmaepsilon.solid.fourier import NavierBeam >>> beam = NavierBeam(10.0, 100, EI=2000.0)
To define a Timoshenko beam of length 10.0, bending stiffness 2000.0 and shear stiffness 1500.0 with 100 harmonic terms involved:
>>> from sigmaepsilon.solid.fourier import NavierBeam >>> beam = NavierBeam(10.0, 100, EI=2000.0, GA=1500.0)
The length of the beam.
Performs a linear static analysis and calculates all postprocessing quantities at one ore more points.
- Parameters:
*args (LoadGroup, float or Iterable) – The loads and the points, in any order.
loads (
LoadGroup, Optional) – The loads.points (float or Iterable, Optional) – A float or an 1d iterable of coordinates, where the results are to be evaluated. If it is a scalar, the resulting dictionary contains 1d arrays for every quantity, for every load case. If there are multiple points, the result attached to a load case is a 2d array, where the first axis goes along the points.
- Returns:
A dictionary with the same layout as the loads.
- Return type:
The mechanical model type of the beam.
alias of
BeamLoadCaseResultLinStat
The number of harmonic terms involved in the approximation.
The length of the beam.
A class to handle semi-analytic solutions of rectangular plates with specific boudary conditions.
- Parameters:
Performs a linear static analysis and calculates all postprocessing quantities at one ore more points.
- Parameters:
- Returns:
A dictionary with the same layout as the loads.
- Return type:
alias of
PlateLoadCaseResultLinStat
Loads#
- class sigmaepsilon.solid.fourier.loads.LoadGroup(*args, cooperative: bool = False, **kwargs)[source]#
A class to handle load groups for Navier’s semi-analytic solution of rectangular plates and beams with specific boundary conditions.
This class is also the base class of all other load types.
See also
Examples
>>> from sigmaepsilon.solid.fourier import LoadGroup, PointLoad >>> >>> loads = LoadGroup( >>> group1 = LoadGroup( >>> case1 = PointLoad(x=L/3, v=[1.0, 0.0]), >>> case2 = PointLoad(x=L/3, v=[0.0, 1.0]), >>> ), >>> group2 = LoadGroup( >>> case1 = PointLoad(x=2*L/3, v=[1.0, 0.0]), >>> case2 = PointLoad(x=2*L/3, v=[0.0, 1.0]), >>> ), >>> )
Since the LoadGroup class is a subclass of
DeepDict, a case is accessible as>>> loads['group1', 'case1']
If you want to protect the object from the accidental creation of nested subdirectories, you can lock the layout by typing
>>> loads.lock()
- cases(case_type: Any = None) Iterable[LoadCaseProtocol][source]#
Returns a generator that yields the load cases in the group.
- Parameters:
case_type (Any, Optional) – The type of the load cases to return. Default is None, that returns all types.
- Yields:
- class sigmaepsilon.solid.fourier.loads.LoadCase(domain: LoadDomainType, value: LoadValueType, num_mc: int | None = None)[source]#
Generic base class for all load cases.
- Parameters:
domain (LoadDomainType) – The domain of the load.
value (LoadValueType) – The value of the load.
num_mc (int, Optional) – The number of sampling points for Monte Carlo integration. If no value is provided, the global config value is used.
- property domain: LoadDomainType#
Returns the domain of the load.
- eval_approx(problem: NavierProblemProtocol, points: Iterable) ndarray[source]#
Evaluates the Fourier series approximation of the load at the given points.
The returned array is an 1d array with the same length as the number of points.
- property value: LoadValueType#
Returns the value of the load.
- class sigmaepsilon.solid.fourier.loads.PointLoad(domain: LoadDomainType, value: LoadValueType, num_mc: int | None = None)[source]#
A class to handle concentrated loads.
- Parameters:
domain (float or
Float1d) – The point of application. A scalar for a beam, an iterable of length 2 for a plate.value (
Float1d) – Load values for each dof. The order of the dofs for a beam is [F, M], for a plate it is [F, Mx, My].hint:: (..) – For a detailed explanation of the sign conventions, refer to this section of the theory guide.
- rhs(problem: NavierProblemProtocol) ndarray[source]#
Returns the coefficients as a NumPy array.
- Parameters:
problem (
NavierProblem) – A problem the coefficients are generated for. If not specified, the attached problem of the object is used. Default isNone.- Returns:
2d float array of shape (H, 3), where H is the total number of harmonic terms involved (defined for the problem).
- Return type:
- class sigmaepsilon.solid.fourier.loads.LineLoad(domain: LoadDomainType, value: LoadValueType, num_mc: int | None = None)[source]#
A class to handle loads over lines for both beam and plate problems.
- Parameters:
domain (
Float1d|Float2d) – The point of application as an 1d iterable for a beam, a 2d iterable for a plate. In the latter case, the first row is the first point, the second row is the second point.value (
Float1d) – Load intensities for each dof. The order of the dofs for a beam is \([F, M]\), for a plate it is \([F, M_x, M_y]\).num_mc (int, Optional) – The number of sampling points for Monte Carlo integration. If no value is provided, the global config value is used.
hint:: (..) – For a detailed explanation of the sign conventions, refer to this section of the theory guide.
- rhs(problem: NavierProblemProtocol) ndarray[source]#
Returns the coefficients as a NumPy array.
- Parameters:
problem (
NavierProblem) – A problem the coefficients are generated for. If not specified, the attached problem of the object is used. Default is None.- Returns:
2d float array of shape (H, 3), where H is the total number of harmonic terms involved (defined for the problem).
- Return type:
- class sigmaepsilon.solid.fourier.loads.RectangleLoad(domain: LoadDomainType, value: LoadValueType, num_mc: int | None = None)[source]#
A class to handle loads defined over a single rectangle.
- Parameters:
domain (
Float2d) – The coordinates of the lower-left and upper-right points of the region where the load is applied. Default isNone.value (
Float1d) – Load intensities for each dof in the order \(f_z, m_x, m_y\).num_mc (int, Optional) – The number of sampling points for Monte Carlo integration. If no value is provided, the global config value is used.
hint:: (..) – For a detailed explanation of the sign conventions, refer to this section of the theory guide.
- property region: Iterable#
Returns the region as a list of 4 values x0, y0, w, and h, where x0 and y0 are the coordinates of the bottom-left corner, w and h are the width and height of the region.
- rhs(problem: NavierProblemProtocol) ndarray[source]#
Returns the coefficients as a NumPy array.
- Parameters:
problem (
NavierProblem) – A problem the coefficients are generated for. If not specified, the attached problem of the object is used. Default is None.- Returns:
2d float array of shape (H, 3), where H is the total number of harmonic terms involved (defined for the problem).
- Return type:
Results#
- class sigmaepsilon.solid.fourier.result.LoadCaseResultLinStat(data, *, name: str | None = None)[source]#
A class to store results of linear static analysis for a single load case.
- to_pandas() pd.DataFrame[source]#
Returns the results as an instance of
pandas.DataFrame.
- to_xarray() xr.DataArray[source]#
Returns the results as an instance of
xarray.DataArray.
- class sigmaepsilon.solid.fourier.result.BeamLoadCaseResultLinStat(data, *, name: str | None = None)[source]#
A class to store results of linear static analysis for beams and a single load case.
The class is a subclass of the base class
LoadCaseResultLinStat, refer to its documentation for available methods and properties.The underlying data structure is a 2d NumPy array, where the first axis goes along the points of evaluation and the second axis goes along the following components:
Name
Description
UY
Displacement in local Y direction
ROTZ
Rotation around local Z axis
CZ
Curvature related to bending around local Z axis
EXY
Shear strain in local Y direction
MZ
Bending moment around local Z axis
SY
Shear force in local Y direction
Hint
For a detailed explanation of the sign conventions, refer to this section of the theory guide.
See also
- class sigmaepsilon.solid.fourier.result.PlateLoadCaseResultLinStat(data, *, name: str | None = None)[source]#
A class to store results of linear static analysis for plates and a single load case.
The class is a subclass of the base class
LoadCaseResultLinStat, refer to its documentation for available methods and properties.The underlying data structure is a 2d NumPy array, where the first axis goes along the points of evaluation and the second axis goes along the following components:
Name
Description
UZ
Displacement in local Z direction
ROTX
Rotation around local X axis (CW)
ROTY
Rotation around local Y axis (CW)
CX
Curvature related to bending around local X axis
CY
Curvature related to bending around local Y axis
CXY
Twisting curvature
EXZ
Shear strain in local Y-Z plane
EYZ
Shear strain in local X-Z plane
MX
Bending moment around local Y axis (CCW)
MY
Bending moment around local X axis (CW)
MXY
Twisting moment around local Z axis (CW)
QX
Shear force on the local Y-Z plane (+Z)
QY
Shear force on the local X-Z plane (+Z)
Hint
For a detailed explanation of the sign conventions, refer to this section of the theory guide.
See also