pyHarm.Systems.ABCSystem ======================== .. py:module:: pyHarm.Systems.ABCSystem Classes ------- .. autoapisummary:: pyHarm.Systems.ABCSystem.ABCSystem Module Contents --------------- .. py:class:: ABCSystem(idata: dict, logger: Optional[logging.Logger] = None) Bases: :py:obj:`abc.ABC` This is the abstract class ruling the system class. The system is responsible for assembling the Residual and Jacobian of a list of elements. :param idata: A dictionary containing the system parameters, the local coordinate systems, the substructures the kinematic conditions and the connectors. :type idata: dict .. attribute:: system_options dictionary containing other options for creation of the system class. :type: dict .. attribute:: nh number of harmonics. :type: int .. attribute:: nti number of time steps. :type: int .. attribute:: adim adimension the equations using the characteristic length and angular frequency. :type: bool .. attribute:: adim_options contains the characteristic length and angular frequency. :type: dict .. attribute:: lc characteristic length. :type: float .. attribute:: wc characteristic angular frequency. :type: float .. attribute:: ndofs total number of degrees of freedom. :type: int .. attribute:: LE list of elements. :type: list[ABCElement] .. attribute:: LC list of kinematic conditions. :type: lit[ABCKinematic] .. attribute:: LE_extforcing list of elements of type external forcing. :type: list[ABCElement] .. attribute:: LE_linear list of elements that are linear towards the displacement. :type: list[ABCElement] .. attribute:: LE_nonlinear_dlft list of elements that are nonlinear while using DLFT formulation. :type: list[ABCElement] .. attribute:: LE_nonlinear_nodlft list of elements that are nonlinear while not using DLFT formulation. :type: list[ABCElement] .. attribute:: expl_dofs Dataframe that explicit the nature of the degrees of freedom vector. :type: pd.DataFrame .. attribute:: ndofs_solve number of degree of freedom that are to be solved. :type: int .. py:attribute:: default set of default parameters for the system class if not given in the input argument. :type: dict .. py:property:: factory_keyword :abstractmethod: .. py:property:: edf .. py:attribute:: ndofs .. py:attribute:: logger :type: logging.Logger .. py:attribute:: LE_extforcing .. py:attribute:: LE_linear .. py:attribute:: LE_nonlinear_dlft .. py:attribute:: LE_nonlinear_nodlft .. py:method:: _maincarateristics(idata: dict) -> None Set attributes of the system class based on the input dictionary. :param idata: A dictionary containing the system parameters. :type idata: dict .. attribute:: system_options dictionary containing other options for creation of the system class. :type: dict .. attribute:: nh number of harmonics. :type: int .. attribute:: nti number of time steps. :type: int .. attribute:: adim adimension the equations using the characteristic length and angular frequency. :type: bool .. attribute:: adim_options contains the characteristic length and angular frequency. :type: dict .. attribute:: lc characteristic length. :type: float .. attribute:: wc characteristic angular frequency. :type: float .. py:method:: _complete_expl_dofs() -> None Modify the explicit dof vector according to the presence of kinematic conditions or non-linear connexions on certain dofs. .. attribute:: expl_dofs Dataframe that explicit the nature of the degrees of freedom vector. :type: pd.DataFrame .. attribute:: ndofs_solve number of degree of freedom that are to be solved. :type: int .. py:method:: _buildElements(idata: dict) -> None Build the elements of the system and the kinematic conditions using the factory functions. :param idata: A dictionary containing the system parameters, the local coordinate systems, the substructures the kinematic conditions and the connectors. :type idata: dict .. attribute:: LE list of elements. :type: list[ABCElement] .. attribute:: LC list of kinematic conditions. :type: lit[ABCKinematic] .. py:method:: _generate_system_dof_DataFrame() .. py:method:: _get_expl_dofs_into_solver() -> pandas.DataFrame Returns the explicit dof DataFrame that has to be solved after applying the kinematic condtions. :returns: Cut explicit dof DataFrame to be solved. :rtype: pd.DataFrame .. py:method:: _expand_q(q: numpy.ndarray) -> numpy.ndarray From the reduced size displacement vector, extend it to its full size. :param q: Reduced size displacement vector (without the kinematic conditions). :type q: np.ndarray :returns: full size displacement vector without kinematic conditions applied. :rtype: np.ndarray .. py:method:: _complete_x(list_of_kine: list[pyHarm.KinematicConditions.ABCKinematic.ABCKinematic], x: numpy.ndarray, **kwargs) -> numpy.ndarray Apply the list of kinematic conditions and returns a vector of displacement to add to the full size displacement vector. :param list_of_kine: List of kinematic conditions to be applied. :type list_of_kine: list[ABCKinematic] :param x: Full size displacement vector without kinematic conditions applied. :type x: np.ndarray :returns: vector of displacement to add in order to obtain the full size displacement vector with kinematic conditions. :rtype: np.ndarray .. py:method:: get_full_disp(q: numpy.ndarray) -> numpy.ndarray Apply the full list of kinematic conditions and returns the displacement vector. :param q: Reduced size displacement vector without kinematic conditions applied. :type q: list[ABCKinematic] :returns: Full size displacement vector with kinematic conditions applied. :rtype: np.ndarray .. py:method:: _complete_R(list_of_kine: list[pyHarm.KinematicConditions.ABCKinematic.ABCKinematic], R, x, **kwargs) -> numpy.ndarray Apply the list of kinematic conditions and returns a vector of residual to add to the full size residual vector. :param list_of_kine: List of kinematic conditions to be applied. :type list_of_kine: list[ABCKinematic] :param R: Full size residual vector without kinematic conditions applied. :type R: np.ndarray :param x: Full size displacement vector without kinematic conditions applied. :type x: np.ndarray :returns: vector of residuals to add in order to obtain the full size residual vector with kinematic conditions. :rtype: np.ndarray .. py:method:: _complete_J(list_of_kine: list[pyHarm.KinematicConditions.ABCKinematic.ABCKinematic], Jx, Jom, x, **kwargs) -> tuple[numpy.ndarray] Apply the list of kinematic conditions and returns a jacobian matrices to add to the full size jacobian matrices. :param list_of_kine: List of kinematic conditions to be applied. :type list_of_kine: list[ABCKinematic] :param Jx: Full size jacobian matrix with respect to displacement without kinematic conditions applied. :type Jx: np.ndarray :param Jom: Full size jacobian matrix with respect to angular frequency without kinematic conditions applied. :type Jom: np.ndarray :param x: Full size displacement vector without kinematic conditions applied. :type x: np.ndarray :returns: jacobian matrices to add in order to obtain the full size jacobian matrix with kinematic condtions. :rtype: tuple(np.ndarray) .. py:method:: __post_init__() -> None Method that can be complete in subclasses in order to facilitate a add during the instanciation of a class. .. py:method:: _residual(list_of_elems: list[pyHarm.Elements.ABCElement.ABCElement], x, **kwargs) -> numpy.ndarray Compute the residual of a list of elements and add them in a full size residual vector. :param list_of_elems: List of elements with a residual contribution. :type list_of_elems: list[ABCElement] :param x: Full size displacement vector. :type x: np.ndarray :returns: residual vector computed at point x for the list of elements. :rtype: np.ndarray .. py:method:: _jacobian(list_of_elems: list[pyHarm.Elements.ABCElement.ABCElement], x, **kwargs) -> tuple[numpy.ndarray] Compute the jacobian matrices of a list of elements and add them in a full size residual vector. :param list_of_elems: List of elements with a residual contribution. :type list_of_elems: list[ABCElement] :param x: Full size displacement vector. :type x: np.ndarray :returns: jacobian matrices computed at point x for the list of elements. :rtype: tuple(np.ndarray) .. py:method:: _get_assembled_mass_matrix(x, **kwargs) Compute the mass matrix of the assembled system :param x: Full size displacement vector. :type x: np.ndarray :returns: full mass matrix of the system :rtype: M_assembled (np.ndarray) .. py:method:: _get_assembled_stiffness_matrix(x, **kwargs) Compute the stiffness matrix of the assembled system :param x: Full size displacement vector. :type x: np.ndarray :returns: full stiffness matrix of the system :rtype: K_assembled (np.ndarray) .. py:method:: Residual() -> numpy.ndarray :abstractmethod: Abstract method that is completed in each subclass and responsible to compute the residual vector of the whole system. .. py:method:: Jacobian() -> tuple[numpy.ndarray] :abstractmethod: Abstract method that is completed in each subclass and responsible to compute the jacobian matrices of the whole system. .. py:method:: export(export_path: str, prefix: str, **kwargs) -> None