Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perturbation step for a frequency analysis after a static step #29

Open
imirzov opened this issue Jun 7, 2023 · 0 comments
Open

Perturbation step for a frequency analysis after a static step #29

imirzov opened this issue Jun 7, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@imirzov
Copy link
Collaborator

imirzov commented Jun 7, 2023

https://calculix.discourse.group/t/converter-ccx2paraview-for-large-frd-files/1259/15

Hello,

Just to report a bug on the ccx2paraview converter. Not sure if is the right place. But anyway here it is.
I think the author keeps an eye into the forum, so first of all thanks for coding this very useful tool (at least for the workflow i use).

The bug occurs when placing a perturbation step for a frequency analysis after a static step.

Example:

** == ANALYSIS SECTION ==
**
*TIME POINTS, NAME=T0
0.200,0.400,0.600,0.800,1.000
*STEP
*STATIC
*BOUNDARY
RefNode,6,6,0.03
*EL FILE, TIMEPOINTS=T0
S,E
*NODE FILE, TIMEPOINTS=T0
U,RF
*END STEP
*STEP,PERTURBATION
*FREQUENCY
10
*EL FILE
S,E
*NODE FILE
U,RF
*END STEP

Error:

[...]
INFO: Writing n-twist_model.05.vtu
Traceback (most recent call last):
File "/home2/jl/workspace/software_devel/ccx2paraview/ccx2paraview.py", line 992, in
main()
File "/home2/jl/workspace/software_devel/ccx2paraview/ccx2paraview.py", line 987, in main
ccx2paraview.run()
File "/home2/jl/workspace/software_devel/ccx2paraview/ccx2paraview.py", line 904, in run
result_blocks = self.frd.parse_results(step, inc) # NOTE Could be empty list []
File "/home2/jl/workspace/software_devel/ccx2paraview/ccx2paraview.py", line 696, in parse_results
result_blocks.append(self.calculate_principal(b))
File "/home2/jl/workspace/software_devel/ccx2paraview/ccx2paraview.py", line 780, in calculate_principal
eigenvalues = np.linalg.eigvals(tensor).tolist()
File "<array_function internals>", line 5, in eigvals
File "/usr/lib/python3/dist-packages/numpy/linalg/linalg.py", line 1063, in eigvals
_assert_finite(a)
File "/usr/lib/python3/dist-packages/numpy/linalg/linalg.py", line 209, in _assert_finite
raise LinAlgError("Array must not contain infs or NaNs")
numpy.linalg.LinAlgError: Array must not contain infs or NaNs

So the error occurs when trying to convert the frequency steps.

The procedure finishes without error if we comment the code between lines 694 to 700.

               if b.name == 'S':
                    result_blocks.append(self.calculate_mises_stress(b))
                    result_blocks.append(self.calculate_principal(b))
                if b.name == 'E':
                    result_blocks.append(self.calculate_mises_strain(b))
                    result_blocks.append(self.calculate_principal(b))

but there is still a warning:

[...]
INFO: Writing n-twist_model.05.vtu
INFO: Step 6, time 2750.3, U, 3 components, 34432 values
INFO: Step 6, time 2750.3, S, 6 components, 34432 values
WARNING: 69264 NaN values are converted to 0.0
INFO: Step 6, time 2750.3, E, 6 components, 34432 values
INFO: Step 6, time 2750.3, RF, 3 components, 34432 values
WARNING: 48780 NaN values are converted to 0.0
INFO: Step 6, time 2750.3, ERROR, 1 components, 34432 values
[...]

to be honest to my workflow it would be usefull if there was a way to select if to compute these additional quantities or not (misses and principal values). This is because I use the vtk api to further compute additional quantities (including the principal vectors, which make the initial computation of principal values redundant).

Hope this info is useful,
thanks again,
regards,
Jorge

@imirzov imirzov added the bug Something isn't working label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant