Semi-Analytic Solutions using Harmonic Analysis¶
JIT compiled function, that returns coefficient matrices for a Navier solution for multiple left-hand sides.
- Parameters
L (float) – The length of the beam.
N (int) – The number of harmonic terms.
EI (numpy.ndarray) – 1d float array of bending stiffnesses.
- Returns
2d float array of coefficients.
- Return type
JIT compiled function, that returns coefficient matrices for a Navier solution for multiple left-hand sides.
- Parameters
size (tuple) – Tuple of floats, containing the sizes of the rectagle.
shape (tuple) – Tuple of integers, containing the number of harmonic terms included in both directions.
D (numpy.ndarray) – 3d float array of bending stiffnesses.
- Returns
2d float array of coefficients.
- Return type
JIT compiled function, that returns coefficient matrices for a Navier solution for multiple left-hand sides.
- Parameters
size (tuple) – Tuple of floats, containing the sizes of the rectagle.
shape (tuple) – Tuple of integers, containing the number of harmonic terms included in both directions.
D (numpy.ndarray) – 3d float array of bending stiffnesses.
S (numpy.ndarray) – 3d float array of shear stiffnesses.
Note
The shear stiffness values must include the shear correction factor.
- Returns
4d float array of coefficients.
- Return type
JIT compiled function, that returns coefficient matrices for a Navier solution for multiple left-hand sides.
- Parameters
L (float) – The length of the beam.
N (int) – The number of harmonic terms.
EI (numpy.ndarray) – 1d float array of bending stiffnesses.
GA (numpy.ndarray) – 1d float array of shear stiffnesses.
Note
The shear stiffness values must include the shear correction factor.
- Returns
4d float array of coefficients.
- Return type
- sigmaepsilon.solid.fourier.preproc.rhs_Bernoulli(coeffs: ndarray, L: float)[source]¶
Calculates unknowns for Bernoulli Beams.
- sigmaepsilon.solid.fourier.proc.linsolve_Bernoulli(A: ndarray, B: ndarray)[source]¶
Calculates unknowns for Bernoulli Beams.
- sigmaepsilon.solid.fourier.proc.linsolve_Timoshenko(A: ndarray, B: ndarray)[source]¶
Calculates unknowns for Bernoulli Beams.
- sigmaepsilon.solid.fourier.postproc.postproc(size: Union[float, Iterable[float]], shape: Union[int, Iterable[int]], points: ndarray, solution: ndarray, loads: ndarray, D: Union[float, ndarray], S: Optional[Union[float, ndarray]] = None, *, squeeze: bool = True)[source]¶
Calculates postprocessing items.
- sigmaepsilon.solid.fourier.postproc.postproc_Kirchhoff(size, shape: ndarray, points: ndarray, solution: ndarray, D: ndarray, loads: ndarray)[source]¶
JIT-compiled function that calculates post-processing quantities at selected ponts for multiple left- and right-hand sides.
- Parameters
size (numpy.ndarray) – Sizes in both directions as an 1d float array of length 2.
shape (numpy.ndarray) – Number of harmonic terms involved in both directions as an 1d integer array of length 2.
points (numpy.ndarray) – 2d array of point coordinates of shape (nP, 2).
solution (numpy.ndarray) – results of a Navier solution as a 3d array of shape (nRHS, nLHS, M * N).
D (numpy.ndarray) – 3d array of bending stiffness terms (nLHS, 3, 3).
- Returns
numpy array of post-processing items. The indices along the last axpis denote the following quantities:
0 : displacement z
1 : rotation x
2 : rotation y
3 : curvature x
4 : curvature y
5 : curvature xy
6 : shear strain xz
7 : shear strain yz
8 : moment y
9 : moment y
10 : moment xy
11 : shear force x
12 : shear force y
- Return type
numpy.ndarray[M * N, nRHS, nLHS, nP, …]
- sigmaepsilon.solid.fourier.postproc.postproc_Mindlin(size, shape: ndarray, points: ndarray, solution: ndarray, D: ndarray, S: ndarray)[source]¶
JIT-compiled function that calculates post-processing quantities at selected ponts for multiple left- and right-hand sides.
- Parameters
size (numpy.ndarray) – Sizes in both directions as an 1d float array of length 2.
shape (numpy.ndarray) – Number of harmonic terms involved in both directions as an 1d integer array of length 2.
points (numpy.ndarray) – 2d array of shape (nP, 2) of coordinates.
solution (numpy.ndarray) – Results of a Navier solution as a 4d array of shape (nRHS, nLHS, M * N, 3).
D (numpy.ndarray) – Bending stiffnesses as a 3d float array of shape (nLHS, 3, 3).
S (numpy.ndarray) – Corrected shear stiffness as a 3d float array of shape (nLHS, 2, 2).
- Returns
5d array of shape (M * N, nRHS, nLHS, nP, …) of post-processing items. The indices along the last axis denote the following quantities:
0 : displacement z
1 : rotation x
2 : rotation y
3 : curvature x
4 : curvature y
5 : curvature xy
6 : shear strain xz
7 : shear strain yz
8 : moment y
9 : moment y
10 : moment xy
11 : shear force x
12 : shear force y
- Return type
- class sigmaepsilon.solid.fourier.loads.LineLoad(*args, x: Optional[Iterable] = None, v: Optional[Iterable] = None, **kwargs)[source]¶
A class to handle loads over lines.
- Parameters
x (Iterable) – 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.
v (Iterable) – Load intensities for each dof. The order of the dofs for a beam is [F, M], for a plate it is [F, Mx, My].
- rhs(*, problem: Optional[NavierProblem] = None) ndarray[source]¶
Returns the coefficients as a NumPy array.
- Parameters
problem (NavierProblem, Optional) – 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.LoadGroup(*args, **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
LinkedDeepDictExamples
>>> 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 is a subclass of LinkedDeepDict, 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()
- blocks(*args, inclusive: bool = False, blocktype: Optional[Any] = None, deep: bool = True, **kwargs) Iterable[LoadGroup][source]¶
Returns a generator object that yields all the subgroups.
- Parameters
- Yields
LoadGroup
- cases(*args, inclusive: bool = True, **kwargs) Iterable[LoadGroup][source]¶
Returns a generator that yields the load cases in the group.
- Parameters
- Yields
LoadGroup
- dump(path: str, *, mode: str = 'w', indent: int = 4)[source]¶
Dumps the content of the object to a file.
- Parameters
path (str) – The path of the file on your filesystem.
mode (str, Optional) – https://www.programiz.com/python-programming/file-operation
indent (int, Optional) – Governs the level to which members will be pretty-printed. Default is 4.
- static from_dict(d: Optional[dict] = None, **kwargs) LoadGroup[source]¶
Reads a LoadGroup from a dictionary. The keys in the dictionaries must match the parameters of the corresponding load types and a type indicator.
- classmethod from_json(path: Optional[str] = None) LoadGroup[source]¶
Loads a loadgroup from a JSON file.
- property problem: NavierProblem¶
Returns the attached problem.
Exception raised for invalid load inputs.
- class sigmaepsilon.solid.fourier.loads.PointLoad(*args, x: Optional[Union[float, Iterable]] = None, v: Optional[Iterable] = None, **kwargs)[source]¶
A class to handle concentrated loads.
- Parameters
x (Union[float, Iterable]) – The point of application. A scalar for a beam, an iterable of length 2 for a plate.
v (Iterable) – Load values for each dof. The order of the dofs for a beam is [F, M], for a plate it is [F, Mx, My].
- rhs(*, problem: Optional[NavierProblem] = None) ndarray[source]¶
Returns the coefficients as a NumPy array.
- Parameters
problem (NavierProblem, Optional) – 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(*args, value: Iterable, points: Optional[Iterable] = None, **kwargs)[source]¶
A class to handle rectangular loads.
- Parameters
value (Iterable) – 1d or 2d iterable of scalars for all 3 degrees of freedom in the order \(mx, my, fz\).
points (Iterable, Optional) – The coordinates of the lower-left and upper-right points of the region where the load is applied. Default is None.
**kwargs (dict, Optional) – If the region of application is not specified by the argument ‘points’, extra keyword arguments are forwarded to
get_coords(). Default is None.
- static get_coords(d: Optional[dict] = None, *args, **kwargs)[source]¶
Returns the bottom-left and upper-right coordinates of the region of the load from several inputs.
- Parameters
d (dict, Optional) – A dictionary, which is equivalrent to a parameter set from the other parameters listed here. Default is None.
region (Iterable, Optional) – An iterable of length 4 with values x0, y0, w, and h. Here x0 and y0 are the coordinates of the bottom-left corner, w and h are the width and height of the region.
xy (Iterable, Optional) – The position of the bottom-left corner as an iterable of length 2.
w (float, Optional) – The width of the region.
h (float, Optional) – The height of the region.
center (Iterable, Optional) – The coordinates of the center of the region.
- Returns
A 2d float array of coordinates, where the entries of the first and second rows are the coordinates of the lower-left and upper-right points of the region.
- Return type
Examples
The following definitions return the same output:
>>> from sigmaepsilon.solid.fourier import RectLoad >>> RectLoad.get_coords(region=[2, 3, 0.5, 0.7]) >>> RectLoad.get_coords(xy=[2, 3], w=0.5, h=0.7) >>> RectLoad.get_coords(center=[2.25, 3.35], w=0.5, h=0.7) >>> RectLoad.get_coords(dict(center=[2.25, 3.35], w=0.5, h=0.7))
- region() Iterable[source]¶
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: Optional[NavierProblem] = None) ndarray[source]¶
Returns the coefficients as a NumPy array.
- Parameters
problem (NavierProblem, Optional) – 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.plate.RectangularPlate(size: Tuple[float], shape: Tuple[int], *, D11: Optional[float] = None, D12: Optional[float] = None, D22: Optional[float] = None, D66: Optional[float] = None, S44: Optional[float] = None, S55: Optional[float] = None)[source]¶
A class to handle semi-analytic solutions of rectangular plates with specific boudary conditions.
- Parameters