problem with the frequency of ansys calculated and scipy calculated are different
See original GitHub issueHello, everyone,
I have a problem with the frequency calculated.
when I use ansys calculated I can get [2871,6168,8689,11468]
When I try to get the mass and stiffness matrix from a .full file with the scipy.sparse.linalg.eigsh
module to calculate, Python give me
[15.811 15.812 15.813 15.814]
.
I think they should be the same.
Here is the code I use for testing:
import pyansys
import os
import scipy
from scipy.sparse import linalg
import numpy as np
fullfile = os.path.join('G:\STIFF', 'CURVE.full')
full = pyansys.read_binary(fullfile)
dof_ref, k, m = full.load_km() # returns upper triangle only
k += scipy.sparse.triu(k, 1).T
m += scipy.sparse.triu(m, 1).T
k += scipy.sparse.diags(np.random.random(k.shape[0])/1E20, shape=k.shape)
w, v = linalg.eigsh(k, k=20, M=m, sigma=10000)
f = np.real(w)**0.5/(2*np.pi)
print('First four natural frequencies')
for i in range(4):
print('{:.3f} Hz'.format(f[i]))
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Modal analysis natural frequency results percentage ...
i am doing my project using a multi leaf spring. I have done modal analysis to obtain the natural frequency, and i also...
Read more >Ansys modal analysis soultion not matching test results
I have modelled conveyor drives and connecting pulley & structure in ANSYS and used modal analysis to identify natural frequencies in the model....
Read more >Frequency Domain - Ansys Learning Forum
Now I want to convert it to the frequency domain. ... Running that calculation in the other direction, the highest frequency you can...
Read more >Inconsistent loss calculations with HFSS field calculator
My problem happens when I try to calculate the quality factor using the HFSS field calculator (it is useless in this simplified case,...
Read more >How to know the natural frequency of a structure such as a ...
The natural frequency of the cantilever is a calculation based on its mass and stiffness so air or water are irrelevant. If you...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, For what I see, this mathematical problem seems to be a bit hard to solve, and I see the Mapdl Lanczos algorithm making a lot of iterations to converge. My feeling is that scipy func gives wrong results, because of the numerical difficulties.
I’ve checked using an alternative Modal Algorithm for Symmetric Matrices (
MODOPT,SUBSPACE,4,1
), an I get very close solutions to Lanczos, but SUBSPACE converge faster because it’s more robust in this numerical situation :FREQUENCY RANGE REQUESTED= 4 MODES ABOVE 1.00000 HERTZ
I’m running into the same issue as you in regards to the python solve. However, when solving this within MAPDL using MAPDL Math, I’m ending up with a different set of eigenvalues than you:
Which returns:
Please note that I’m running this on ANSYS v18.2, and there might be a fundamental difference in full files between v17 and v18.2. Can you try running the above on v17?
Pinging @FredAns. Is there something we’re potentially missing here?