Training set generation
amfe.hyper_red.training_set_generation.
compute_nskts
(mechanical_system, F_ext_max=None, no_of_moments=4, no_of_static_cases=8, load_factor=2, no_of_force_increments=20, no_of_procs=None, norm='impedance', verbose=True, force_basis='krylov')[source]¶Compute the Nonlinear Stochastic Krylov Training Sets (NSKTS).
NSKTS can be used as training sets for Hyper Reduction of nonlinear systems.
Parameters: |
|
---|---|
Returns: |
|
amfe.hyper_red.training_set_generation.
krylov_force_subspace
(M, K, b, omega=0, no_of_moments=3, orth='euclidean')[source]¶Compute a krylov force subspace for the computation of snapshots needed in hyper reduction.
The Krylov force basis is given as
..code:
[b, M @ inv(K - omega**2) @ b, ...,
(M @ inv(K - omega**2))**(no_of_moments-1) @ b]
Parameters: |
|
---|---|
Returns: | V – Krylov force basis where vectors V[:,i] give the basis vectors. |
Return type: | ndarray |
Discrete Empirical Interpolation Method (DEIM) hyper-reduction
amfe.hyper_red.deim.
DEIMSystem
(*args, **kwargs)[source]¶Bases: amfe.mechanical_system.ReducedSystem
Hyper-reduction technique inherited from ReducedSystem class. Currently only DEIM based on POD is implemented.
This class can handle UDEIM, SUDEIM and their symmetric variants and also the other variants of the above based on choosing one dof or nodal dofs or the entire elements dofs (refered to as collocaiton variants).
DEIM_type
¶str, – String indicating the DEIM type.
E_tilde
¶ndarray, ndim (no_of_active_elements) – Indices of all active elements
oblique_proj
¶ndarray, ndim (no_of_dofs, no_of_force_modes) – oblique projection matrix formed by V.T @ U @ inv(P.T @ U) This matrix is compact and carries the oblique projection of the nonlinear force after the collocation.
K0_deim
¶ndarray, ndim (nred, nred) – Reduced linear stiffness matrix which corrects the DEIM nonlinear force and tangential stiffness matrix. It is computed as the difference of the linear stiffness matrix minus the linear effects coming from the DEIM procedure. Hence, this matrix has to be added to the nakedly assembled DEIM tangential stiffness matrix to obtain the tangential stiffness matrix of DEIM sytem.
proj_list
¶ndarray, ndim (no_of_active_elements, no_of_dofs, – no_of_dofs_per_element) This tensor is used as a list. It contains all oblique projectors of the active elements onto the kinematic subspace. The i-th element has the projector proj_list[i] as oblique projector to give the contribution of the nonlinear force.
Note
The key approximation in DEIM is the approximation of the full nonlinear force vector f_int through the unassembled force vector f_u:
It is important to note, that the nonlinear force given here is a split-off part of the nonlinear restoring force. Here the nolinear force is the force without the linear part.
K_and_f
(u=None, t=0)[source]¶Compute tangential stiffness matrix and nonlinear force vector with the help of the computed interpolation and selective evaluation based on the selected DEIM elements
Parameters: |
|
---|---|
Returns: |
|
export_paraview
(filename, field_list=None)[source]¶Export the produced results to ParaView via XDMF format.
force_basis
(U_snapshots_unconstr, no_of_force_modes, unassembled=True)[source]¶Compute the unassembled or assembled force modes based on an SVD of the force snapshots generated by the displacement vectors.
Parameters: |
|
---|---|
Returns: | U_f – Force mode either unassembled or assembled depending on the option |
Return type: | ndarray |
preprocess_DEIM
(DEIM_type='unassem-deim-dof')[source]¶Setting the flags necessary for the force basis and collocation procedure.
Parameters: | DEIM_type (str, optional) – string indicating the technique used for DEIM reduction |
---|
reduce_mesh
(U_snapshots, no_of_force_modes=10, DEIM_type='unassem-deim-dof')[source]¶Reduce the mesh using an interpolation gathered from the snapshots.
Parameters: |
|
---|---|
Returns: | |
Return type: | None |
References
DEIM: Chaturantabut, S. and Sorensen, D.C., 2010. Nonlinear model reduction via discrete empirical interpolation. SIAM Journal on Scientific Computing, 32(5), pp.2737-2764.
UDEIM, SUDEIM: Tiso, P. and Rixen, D.J., 2013. Discrete empirical interpolation method for finite element structural dynamics. In Topics in Nonlinear Dynamics, Volume 1 (pp. 203-212). Springer New York.
symmetric DEIM: Chaturantabut, S., Beattie, C. and Gugercin, S., 2016. Structure-Preserving Model Reduction for Nonlinear Port-Hamiltonian Systems. arXiv preprint arXiv:1601.00527.
symmetric UDEIM: Ravichandran, T.K., Investigation of accuracy, speed and stability of hyper-reduction techniques for nonlinear FE. Masters Thesis. TU Delft, Delft University of Technology, 2016.
amfe.hyper_red.deim.
reduce_mechanical_system_deim
(mechanical_system, V, overwrite=False, assembly='indirect')[source]¶Reduce the given mechanical system with the linear basis V and the given weights.
Parameters: |
|
---|---|
Returns: | reduced_system – Reduced system with same properties of the mechanical system and reduction basis V |
Return type: | instance of ReducedSystem |
Example
TODO: Write introduction to ECSW
amfe.hyper_red.ecsw.
ECSWSystem
(**kwargs)[source]¶Bases: amfe.mechanical_system.ReducedSystem
Hyper Reduced system using ECSW for the redcution.
reduce_mesh
(W_red, tau=0.001, verbose=True)[source]¶Compute a reduced mesh using a sparse NNLS solver for gaining the weights.
Parameters: |
|
---|---|
Returns: |
|
Note
The indices and weights of the reduced mesh are also internally saved.
amfe.hyper_red.ecsw.
reduce_mechanical_system_ecsw
(mechanical_system, V, overwrite=False, assembly='indirect')[source]¶Reduce the given mechanical system with the linear basis V and the given weights.
Parameters: |
|
---|---|
Returns: | reduced_system – Reduced system with same properties of the mechanical system and reduction basis V |
Return type: | instance of ReducedSystem |
Example
amfe.hyper_red.ecsw.
sparse_nnls
(G, b, tau, conv_stats=False, verbose=True)[source]¶Run the sparse NNLS-solver in order to find a sparse vector xi satisfying
Parameters: |
|
---|---|
Returns: |
|
References
[R1] | C. L. Lawson and R. J. Hanson. Solving least squares problems, volume 15. SIAM, 1995. |
[R2] | T. Chapman, P. Avery, P. Collins, and C. Farhat. Accelerated mesh sampling for the hyper reduction of nonlinear computational models. International Journal for Numerical Methods in Engineering, 2016. |