KrylovSolver#
- class ansys.mapdl.core.krylov.KrylovSolver(mapdl)#
Abstract mapdl krylov class. Created from a
Mapdl
instance.Notes
The procedure to use the Krylov solver is composed of three steps:
Generate Krylov subspace using
KrylovSolver.gensubspace
.Use
KrylovSolver.solve
to solve the generated Krylovsub space using a reduced harmonic analysis over a specified frequency rangeExpand the reduced solution back to the original space using
KrylovSolver.solve
Examples
Create an instance.
>>> from ansys.mapdl.core import launch_mapdl >>> mapdl = launch_mapdl() >>> .... >>> .... >>> Generate the FEA model (mesh, constraints, loads) >>> Generate the .full file
>>> mk = mapdl.krylov >>> # Generate the Krylov subspace >>> Qz = mk.gensubspace(10, 100, check_orthogonality=True) >>> # Reduce the system of equations and solve at each frequency. >>> Yz = mk.solve(10, 100, freq_steps=1, ramped_load=True) >>> # Expand the reduced solution back to the FE space. >>> res = mk.expand(residual_computation=True, residual_algorithm="l2")
Methods
KrylovSolver.compute_residuals
(iFreq, RzV, ...)Compute residuals of the matrices
KrylovSolver.expand
([residual_computation, ...])Expand the reduced solution back to FE space.
KrylovSolver.gensubspace
(max_dim_q, frequency)Generate a Krylov subspace for model reduction in a harmonic analysis.
KrylovSolver.solve
(freq_start, freq_end, ...)Reduce the system of equations and solve at each frequency.
Attributes
Check whether the solution is orthogonal.