@@ -20,17 +20,21 @@ the response across the frequency range:
20
20
* Solves the reduced system
21
21
* Expands the results back to compute the harmonic response
22
22
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:
25
25
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
31
31
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
+ ---------------
34
38
The following assumptions are made when using the Kylov PyMAPDL method
35
39
to obtain the solution:
36
40
@@ -45,23 +49,23 @@ to obtain the solution:
45
49
method.
46
50
47
51
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
51
55
and flexibility because you can access subspace vectors and reduced
52
56
solutions using the Python programming language for user-defined routines.
53
57
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.
56
64
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 ]_.
63
67
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
65
69
has the following methods:
66
70
67
71
* :func: `KrylovSolver.gensubspace() <ansys.mapdl.core.krylov.KrylovSolver.gensubspace> `:
@@ -75,8 +79,13 @@ has the following methods:
75
79
76
80
Usage
77
81
=====
82
+ This section shows how to implement an analysis identical to that
83
+ defined by the Mechanical APDL macros.
78
84
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:
80
89
81
90
.. code :: py
82
91
@@ -107,8 +116,8 @@ Create an instance of the Krylov class
107
116
108
117
Call the
109
118
: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:
112
121
113
122
.. code :: py
114
123
@@ -118,9 +127,8 @@ Return the Krylov subspace
118
127
--------------------------
119
128
120
129
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:
124
132
125
133
.. code :: py
126
134
@@ -131,23 +139,24 @@ Return the reduced solution over the frequency range
131
139
----------------------------------------------------
132
140
133
141
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:
136
144
137
145
.. code :: py
138
146
139
147
>> > result = mk.expand(residual_computation = True , " L-inf" , compute_solution_vectors = True , True )
140
148
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.
143
151
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
145
154
the node number along with the dof solution for each of the calculated
146
155
frequencies.
147
156
148
157
Get the dof solution at a specific frequency
149
158
--------------------------------------------
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
151
160
or step:
152
161
153
162
.. code :: py
@@ -164,17 +173,18 @@ Examples of using the Krylov method in PyMAPDL are available in :ref:`krylov_exa
164
173
Requirements
165
174
============
166
175
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.
168
178
169
179
.. 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 .
172
182
173
183
Reference
174
184
=========
175
185
For more information on the Krylov method, see `Frequency-Sweep Harmonic Analysis via the Krylov Method
176
186
<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:
178
188
179
189
.. [1 ] Puri, S. R. (2009). Krylov Subspace Based Direct Projection Techniques for Low Frequency,
180
190
Fully Coupled, Structural Acoustic Analysis and Optimization. PhD Thesis. Oxford Brookes University,
0 commit comments