|
[Sponsors] |
Compute eigenspectrum of linearized Navier-Stokes |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 4, 2020, 06:40 |
Compute eigenspectrum of linearized Navier-Stokes
|
#1 |
New Member
Join Date: Sep 2020
Posts: 9
Rep Power: 6 |
Dear group members,
I would like to retrieve the matrix of coefficients of the linearized Navier-Stokes equations and possibly compute its eigenvectors and eigenvalues directly in OpenFOAM-v1912. Is it possible? Which are the input files/commands? My application is a 2D-flow past a circular cylinder @ Re=100. Thanks in advance. AndreaCFD |
|
September 5, 2020, 13:15 |
|
#2 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 |
If I unterstand your question correctly you want to do DMD.
You might want to take a look at the dynamic mode decomposition function object in OF-v2006: https://www.openfoam.com/releases/op...processing.php |
|
September 5, 2020, 13:58 |
|
#3 |
New Member
Join Date: Sep 2020
Posts: 9
Rep Power: 6 |
Thanks for answering Bloerb,
Actually I only want to calculate the eigenvalues/eigenvectors of the matrix of coefficients of the discretized Navier-Stokes. So I need a function that gets the matrix UEqn and computes the eigendecomposition. I will use them to reduce the dimensionality of the system similarly to DMD but with a different technique. Best, Andrea |
|
September 5, 2020, 14:00 |
|
#4 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
there is also a new dense-matrix eigen decomposition solver in v2006: EigenMatrix.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
September 9, 2020, 12:30 |
|
#5 |
New Member
Join Date: Sep 2020
Posts: 9
Rep Power: 6 |
Thanks for answering HPE,
Could you give me some further info on how to use it? Do I have to download the .C and .H files and recompile my OpenFoam? Which is the right folder to save them? In case I have a matrix A, its eigenvecors are computed with the commands: eigenvectors(A.EVecs()) and complexEigenvectors(A.complexEVecs()) Sorry for the stupid questions but I am a bit lost. Best, Andrea |
|
September 9, 2020, 16:50 |
|
#6 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
No question is stupid!
Please search Test-EigenMatrix.C or EigenMatrix.H files for usage examples. They are extensive. You dont need to download anything unless you compile/install OFv2006. Im writing on my phone, if you cant find those files, let us know.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
September 10, 2020, 11:57 |
|
#7 | |
New Member
Join Date: Sep 2020
Posts: 9
Rep Power: 6 |
Quote:
I installed the new version of OFv2006 and checked the references. What I have understood is that EigenMatrix.C performs the eigendecomposition of a matrix of type SquareMatrix. The matrix of coefficients UEqn (the one I need to decompose) is of type fvmVectorMatrix, hence the compiler produces an error. Is there a way to convert one type to the other? Namely reconstruct the sparse matrix from the dense one? Are there functions that directly perform the eigendecomposition on the dense matrix? Thanks for answering, Andrea |
||
September 10, 2020, 18:11 |
|
#8 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
Hi,
The type of UEqn is not any sort of matrix, but a system of algebraic system. Therefore, there is no eigen decomposition for it. EigenMatrix works on only SquareMatrix type, which can be sparse or dense.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror Last edited by HPE; September 11, 2020 at 04:52. |
|
September 11, 2020, 03:53 |
|
#9 |
Senior Member
|
Possibly this helps:
1/ Use ofgdb to print matrix to file. See https://openfoamwiki.net/images/1/18/GdbOF-Manual.pdf 2/ Read file into Matlab, Python, Julia, Octave, Scilab or what have you; 3/ Convert matrix from sparse to dense and use eigenvalue computations provided for dense matrices; Above might work small meshes. For large meshes instead, you might want to revert to the interface to PETSc and use the SLEPc components of PETSc to compute eigenvalues. OpenFoam-PETSc interface: https://develop.openfoam.com/modules/external-solver |
|
March 18, 2022, 09:04 |
|
#10 | |
New Member
SUN
Join Date: Feb 2022
Posts: 4
Rep Power: 4 |
Quote:
Would you like to share some experience on this issue? |
||
Tags |
eigenvalue solver, linearized cfd, navier stokes equations, openfoamv1912, vortex shedding openfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convection Term in Linearized Navier Stokes Equations | And901 | OpenFOAM Running, Solving & CFD | 1 | October 23, 2014 03:33 |
Convective term in Linearized Navier Stokes Equations | And901 | OpenFOAM Programming & Development | 0 | October 22, 2014 12:00 |
how to compute the stokes number in Fluent | Messi | FLUENT | 0 | May 6, 2014 12:44 |
How to compute values of Navier Stokes terms | mixer | CFX | 4 | August 5, 2009 02:41 |
Newbie:Viscoelasticity and Navier stokes equation | Rajil Saraswat | Main CFD Forum | 2 | June 9, 2003 08:21 |