CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   EigenValues-EigenVector for a SquareMatrix (https://www.cfd-online.com/Forums/openfoam-programming-development/238777-eigenvalues-eigenvector-squarematrix.html)

Ste07 October 2, 2021 12:30

EigenValues-EigenVector for a SquareMatrix
 
Good morning everyone,
I'm pretty new to OpenFOAM and I am writing some code lines in an application.
At some point a matrix is generated as a scalarSquareMatrix and I have the necessity to find its eigenvalues and eigenvectors.
Is there a way to do this?
(I am using the OpenFOAM6 version).

Thanks in advance

dlahaye October 5, 2021 13:29

This is not trivial as OpenFoam does not implement eigenvalues / eigenvector decompositions for its sparse matrices.

In a first approach it might be (?) easier to dump OpenFoam matrices to file, read them into Matlab, Python, Julia or whatever you prefer, and use tools that these packages provide.

Some background info is here https://www.linkedin.com/pulse/openf...omenico-lahaye and the references cited.

Good luck, Domenico.

mAlletto October 6, 2021 08:28

In the com version there are classes to compute eigenvalues and vectors https://www.openfoam.com/documentati...x.html#details

Maybe it is of help


All times are GMT -4. The time now is 02:22.