sajou.solvers module¶
-
class
sajou.solvers.
Result
(model)¶ Bases:
object
An object to store the data obtained from the solving process
-
add_metadata
(name, results)¶ Add results to the results dictionary
Name: TODO Results: TODO Returns: TODO
-
add_result
(name, results)¶ Add results to the results dictionary
Name: TODO Results: TODO Returns: TODO
-
-
class
sajou.solvers.
Solver
(model, **kwargs)¶ Bases:
object
Parent class for the solvers used
Parameters: - model (TODO) –
- **kwargs (Additional options:) –
- output: list of keywords specifying the different results that need to be
- computed after the solution is found. Accepted values are: - ‘reactions’ - ‘internal forces’ - ‘stresses’ - ‘strains’ - ‘energy’
-
nfat
¶ dict – Node Freedom Allocation Table
-
n_dof_per_node
¶ int – number of degrees of freedom per node spacial dimensions used in the model
-
_K
¶ numpy ndarray – global stiffness matrix
-
_P
¶ numpy ndarray – global load vector
-
_V
¶ numpy ndarray – global displacement vector
-
_dof_dirichlet
¶ list – number of degrees of freedom with Dirichlet border conditions
-
_nfmt
¶ dict – Node Freedom Map Table
-
get_node_and_dof
(dof)¶ Return the node and element dof (number of the dof in a specific element) corresponding to the global dof given.
Parameters: dof (int) – global dof Returns: - sajou.Node – Node correpsonding to the dof specified
- int – number of the dof of the element corresponding to the global dof supplied
-
class
sajou.solvers.
StaticSolver
(model, **kwargs)¶ Bases:
sajou.solvers.Solver
Linear Static solver used to solve the most typical problems
-
calc_end_forces
(result, nodal_displ)¶ Calculate the internal forces of elements.
Parameters: - result (Result object) – used to store the results to
- nodal_displ (ndarray) – nodal displacements obtained from the solver
Returns: dict
Return type: End forces
-
calc_nodal_displ
(result, nodal_displ, K, elem_load)¶ Calculate the nodal displacements
Parameters: - result (Results object) – result obtained from the Solver
- nodal_displ (ndarray) – displacements array calculated after the solve process
- K (ndarray) – Stiffness matrix
- elem_load (ndarray) – Elemetn load
-
calc_nodal_forces
(result, nodal_displ, K, elem_load)¶ Compute the nodal forces
Parameters: - result (Result object) – result obtained from the solver
- nodal_displ (ndarray) – nodal displacements calculated with the stiffness matrix
- K (ndarray) – Stiffness matrix
- elem_load (TODO) –
Returns: dict
Return type: dictionary with the nodal forces
-
calc_nodal_reactions
(result, nodal_displ, K, elem_load)¶ Calculate the nodal reactions of the model.
Parameters: - result (Result object) – result obtained with Solver
- nodal_displ (ndarray) – nodal displacements
- K (ndarray) – stiffness matrix
- elem_forces (ndarray) – element forces vector
Returns: ndarray
Return type: nodal reactions
-
postprocess
(result)¶ Postprocess the specified results given in the ‘output’ variable
Result: TODO Returns: TODO
-
solve
()¶ Solves the problem :returns: numpy array
-