Skip to content

Commit 09d8436

Browse files
PipKatdependabot[bot]kmkoshy
authored
Quick edit of Krylov topic (#1593)
* Quick edit of Krylov topic * Fix typo * Fix three formatting errors * Indenture fixes * Bump plotly from 5.10.0 to 5.11.0 in /requirements (#1594) Bumps [plotly](https://github.com/plotly/plotly.py) from 5.10.0 to 5.11.0. - [Release notes](https://github.com/plotly/plotly.py/releases) - [Changelog](https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md) - [Commits](plotly/plotly.py@v5.10.0...v5.11.0) --- updated-dependencies: - dependency-name: plotly dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump ansys-sphinx-theme from 0.6.1 to 0.7.0 in /requirements (#1588) Bumps [ansys-sphinx-theme](https://github.com/ansys/ansys-sphinx-theme) from 0.6.1 to 0.7.0. - [Release notes](https://github.com/ansys/ansys-sphinx-theme/releases) - [Commits](ansys/ansys-sphinx-theme@v0.6.1...v0.7.0) --- updated-dependencies: - dependency-name: ansys-sphinx-theme dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump ansys-dpf-core from 0.6.1 to 0.6.2 in /requirements (#1586) Bumps [ansys-dpf-core](https://github.com/pyansys/pydpf-core) from 0.6.1 to 0.6.2. - [Release notes](https://github.com/pyansys/pydpf-core/releases) - [Commits](ansys/pydpf-core@v0.6.1...v0.6.2) --- updated-dependencies: - dependency-name: ansys-dpf-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump pytest from 7.1.3 to 7.2.0 in /requirements (#1587) Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.1.3 to 7.2.0. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](pytest-dev/pytest@7.1.3...7.2.0) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update doc/source/user_guide/krylov.rst Co-authored-by: Kathy Pippert <[email protected]> * minor changes Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kevin Mathew <[email protected]> Co-authored-by: Kevin_Ansys <[email protected]>
1 parent fef12ab commit 09d8436

File tree

1 file changed

+47
-37
lines changed

1 file changed

+47
-37
lines changed

doc/source/user_guide/krylov.rst

Lines changed: 47 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,21 @@ the response across the frequency range:
2020
* Solves the reduced system
2121
* Expands the results back to compute the harmonic response
2222

23-
MAPDL provides the following ways to implement a harmonic analysis using
24-
the Krylov method:
23+
Mechanical APDL provides the following ways to implement a harmonic analysis
24+
using the Krylov method:
2525

26-
#. Mechanical APDL commands.
27-
#. APDL macros as described in "Frequency-Sweep Harmonic Analysis via the
28-
Krylov Method" in the *Structural Analysis Guide*.
29-
#. PyMAPDL. You can use the Python programming language to expose the Krylov
30-
features as described in this section.
26+
#. Mechanical APDL commands
27+
#. APDL macros as described in
28+
`Frequency-Sweep Harmonic Analysis via the Krylov Method
29+
<https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v222/en/ans_str/str_Krysweep.html>`_
30+
in the **Structural Analysis** guide for Mechanical APDL
3131

32-
Assumptions
33-
-----------
32+
PyMAPDL also provides a way to implement a harmonic analysis using the Kylov method.
33+
Subsequent sections describe how to use the Krylov method in PyMAPDL.
34+
35+
36+
**Assumptions**
37+
---------------
3438
The following assumptions are made when using the Kylov PyMAPDL method
3539
to obtain the solution:
3640

@@ -45,23 +49,23 @@ to obtain the solution:
4549
method.
4650

4751

48-
Krylov method implementation in PyMADL
49-
======================================
50-
The PyMAPDL implementation of the Kylov method gives you customization
52+
Krylov method implementation in PyMAPDL
53+
=======================================
54+
The PyMAPDL implementation of the Krylov method gives you customization
5155
and flexibility because you can access subspace vectors and reduced
5256
solutions using the Python programming language for user-defined routines.
5357

54-
If you do not require customization, you can use the APDL commands to
55-
solve a harmonic analysis with the Krylov method.
58+
If you do not require customization, you can use the Mechanical APDL
59+
commands to solve a harmonic analysis with the Krylov method. For more
60+
information, including the theory behind this method, see
61+
`Frequency-Sweep Harmonic Analysis via the Krylov Method
62+
<https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v222/en/ans_str/str_Krysweep.html>`_
63+
in the **Structural Analysis** guide for Mechanical APDL.
5664

57-
More information on the theory of Krylov method can be found in the
58-
`Structural Analysis Guide
59-
<https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v222/en/ans_str/Hlp_G_STR4_4.html>`_.
60-
The procedure described here implements an analysis identical to that
61-
defined by the macros. Details on the theory and equations describing
62-
the Krylov method can be found in the works of Puri [1]_ and Eser [2]_.
65+
For additional theory information and equations for
66+
the Krylov method, see the works of Puri [1]_ and Eser [2]_.
6367

64-
The exposure in PyMAPDL follows the same theory as the APDL macro and
68+
The exposure in PyMAPDL follows the same theory as the Mechanical APDL macros and
6569
has the following methods:
6670

6771
* :func:`KrylovSolver.gensubspace() <ansys.mapdl.core.krylov.KrylovSolver.gensubspace>`:
@@ -75,8 +79,13 @@ has the following methods:
7579

7680
Usage
7781
=====
82+
This section shows how to implement an analysis identical to that
83+
defined by the Mechanical APDL macros.
7884

79-
Generate the full file (``.full``) for the Krylov method using Mechanical APDL:
85+
Generate the FULL file and FEA model
86+
------------------------------------
87+
Generate the FULL file for the Krylov method and the FEA model
88+
using Mechanical APDL:
8089

8190
.. code:: py
8291
@@ -107,8 +116,8 @@ Create an instance of the Krylov class
107116
108117
Call the
109118
:func:`gensubspace <ansys.mapdl.core.krylov.KrylovSolver.gensubspace>`
110-
method, to create the Krylov subspace:
111-
Build a subspace of size / dimension 10 and at a frequency of 500 Hz.
119+
method to create the Krylov subspace and build a subspace of
120+
size/dimension 10 at a frequency of 500 Hz:
112121

113122
.. code:: py
114123
@@ -118,9 +127,8 @@ Return the Krylov subspace
118127
--------------------------
119128

120129
Call the :func:`solve <ansys.mapdl.core.krylov.KrylovSolver.solve>` method to
121-
reduce the system of equations, and then solve at each frequency.
122-
The following code solves from 0 Hz
123-
to 1000 Hz with 100 intervals in between, with stepped loading.
130+
reduce the system of equations and solve at each frequency. This code
131+
solves from 0 Hz to 1000 Hz with 100 intervals in between, with stepped loading:
124132

125133
.. code:: py
126134
@@ -131,23 +139,24 @@ Return the reduced solution over the frequency range
131139
----------------------------------------------------
132140

133141
Call the :func:`expand <ansys.mapdl.core.krylov.KrylovSolver.expand>` method
134-
to expand the reduced solution back to FE space. Output the expanded
135-
solution and calculate the residual.
142+
to expand the reduced solution back to the FE space, output the expanded
143+
solution, and calculate the residual:
136144

137145
.. code:: py
138146
139147
>>> result = mk.expand(residual_computation= True, "L-inf", compute_solution_vectors= True, True)
140148
141-
It returns a :class:`numpy array<numpy.ndarray>` (if the kwarg ``out_key``
142-
is set to ``True``) solution vectors mapped to user order.
149+
The preceding code returns a :class:`numpy array<numpy.ndarray>` if the kwarg ``out_key``
150+
is set to ``True``. Solution vectors are mapped to user order.
143151

144-
.. note:: The ``ndarray`` returned by the method ``expand`` contains
152+
.. note:: The :class:`numpy array<numpy.ndarray>` returned by the
153+
`:func:`expand <ansys.mapdl.core.krylov.KrylovSolver.expand>` method contains
145154
the node number along with the dof solution for each of the calculated
146155
frequencies.
147156

148157
Get the dof solution at a specific frequency
149158
--------------------------------------------
150-
This code shows how you can get the nodal solution at a specific frequency
159+
This code shows how to get the nodal solution at a specific frequency
151160
or step:
152161

153162
.. code:: py
@@ -164,17 +173,18 @@ Examples of using the Krylov method in PyMAPDL are available in :ref:`krylov_exa
164173
Requirements
165174
============
166175

167-
To use the Krylov method in PyMAPDL, Ansys MAPDL version 2022 R2 or later must be used.
176+
To use the Krylov method in PyMAPDL, Mechanical APDL version 2022 R2 or later
177+
must be used.
168178

169179
.. warning:: This feature does not support Distributed Ansys.
170-
However, you can still run MAPDL Math commands without specifying the ``-smp``
171-
flag when launching MAPDL.
180+
However, you can still run Mechanical APDL Math commands without
181+
specifying the ``-smp`` flag when launching Mechanical APDL.
172182

173183
Reference
174184
=========
175185
For more information on the Krylov method, see `Frequency-Sweep Harmonic Analysis via the Krylov Method
176186
<https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v222/en/ans_str/str_Krysweep.html>`_
177-
in the **Structural Analysis** guide for Mechanical APDL.
187+
in the **Structural Analysis** guide for Mechanical APDL and these resources:
178188

179189
.. [1] Puri, S. R. (2009). Krylov Subspace Based Direct Projection Techniques for Low Frequency,
180190
Fully Coupled, Structural Acoustic Analysis and Optimization. PhD Thesis. Oxford Brookes University,

0 commit comments

Comments
 (0)