Module for solving static and dynamic problems.
amfe.solver.
integrate_nonlinear_gen_alpha
(mechanical_system, q0, dq0, time_range, dt, rho_inf=0.9, rtol=1e-09, atol=1e-06, verbose=False, n_iter_max=30, conv_abort=True, write_iter=False, track_niter=True, matrix_type='symm')[source]¶Time integration of the non-linear second-order system using the gerneralized-alpha scheme.
Parameters: |
|
---|
References
[R2] | J. Chung and G. Hulbert. A time integration algorithm for structural dynamics with improved numerical dissipation: the generalized-α method. Journal of applied mechanics, 60(2):371–375, 1993. |
[R3] | O. A. Bauchau: Flexible Multibody Dynamics. Springer, 2011. pp. 664. |
amfe.solver.
integrate_linear_gen_alpha
(mechanical_system, q0, dq0, time_range, dt, rho_inf=0.9)[source]¶Time integration of the linearized second-order system using the gerneralized-alpha scheme.
Parameters: |
|
---|---|
Returns: | |
Return type: | None |
amfe.solver.
solve_linear_displacement
(mechanical_system, t=1, verbose=True)[source]¶Solve the linear static problem of the mechanical system and print the results directly to the mechanical system.
Parameters: |
|
---|---|
Returns: | u – Static solution displacement field |
Return type: | ndaray |
amfe.solver.
solve_nonlinear_displacement
(mechanical_system, no_of_load_steps=10, t=0, rtol=1e-08, atol=1e-14, newton_damping=1, n_max_iter=1000, smplfd_nwtn_itr=1, verbose=True, track_niter=False, write_iter=False, conv_abort=True, save=True)[source]¶Solver for the nonlinear system applied directly on the mechanical system.
Prints the results directly to the mechanical system
Parameters: |
|
---|---|
Returns: | u – Solution displacements; u[:,-1] is the last displacement |
Return type: | ndarray, shape(ndim, no_of_load_steps) |
Examples
TODO
amfe.solver.
give_mass_and_stiffness
(mechanical_system)[source]¶Determine mass and stiffness matrix of a mechanical system.
Parameters: | mechanical_system (MechanicalSystem) – Instance of the class MechanicalSystem |
---|---|
Returns: |
|
amfe.solver.
integrate_linear_system
(mechanical_system, q0, dq0, time_range, dt, alpha=0)[source]¶Perform an implicit time integration of the linearized system given with the linear system.
Parameters: |
|
---|---|
Returns: | |
Return type: | None |
Notes
Due to round-off-errors, the internal time step width is h and is very close to dt, but adjusted to fit the steps exactly.
amfe.solver.
integrate_nonlinear_system
(mechanical_system, q0, dq0, time_range, dt, alpha=0.01, rtol=1e-08, atol=1e-06, verbose=False, n_iter_max=30, conv_abort=True, write_iter=False, track_niter=False)[source]¶Time integrate the nonlinear system using a Newmark-scheme.
Parameters: |
|
---|---|
Returns: | |
Return type: | None |
References
[R4] | M. Géradin and D. J. Rixen. Mechanical vibrations: theory and application to structural dynamics. John Wiley & Sons, 2014. pp. 564. |
[R5] | O. A. Bauchau: Flexible Multibody Dynamics. Springer, 2011. pp. 664. |
amfe.solver.
solve_sparse
(A, b, matrix_type='symm', verbose=False)[source]¶Abstractoin of the solution of the sparse system Ax=b using the fastest solver available for sparse and non-sparse matrices.
Parameters: |
|
---|---|
Returns: | x – solution of system Ax=b |
Return type: | ndarray |
Notes
This tool uses the Intel MKL library provided by Anaconda. If the Intel MKL is not installed, especially for large systems the computation time can go crazy. To adjust the number of threads used for the computation, it is recommended to use the mkl-service module provided by Anaconda:
>>> import mkl
>>> mkl.get_max_threads()
2
>>> mkl.set_num_threads(1)
>>> mkl.get_max_threads()
1