|
[Sponsors] |
February 27, 2021, 18:38 |
symmetryPlane and Eigenvectors
|
#1 |
Senior Member
Join Date: Jun 2016
Posts: 102
Rep Power: 10 |
Dear FOAMers,
I have a very frustrating bug in my code. I need to calculate 3 eigenvalues (saved as volVectorField) and 3 eigenvectors (saved as volTensorField) in my code. Obviously there's no direction in an eigenvalue vector. It's just 3 numbers. But OpenFOAM automatically cuts my eigenvalues and eigenvectors along the normal direction of the symmetryPlane. This is really really stupid. All I need is zeroGradient (OpenFOAM doesn't allow me to use zeroGradient on symmetryPlane boundaries). One of the possible solution is to store 3+9=12 scalarFields, and convert it back to a vector/tensor while running. But before doing that, is there any elegant way to resolve this? Thanks. |
|
March 6, 2021, 15:02 |
|
#2 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
have you solved your problem? out of curiosity, how do you use eigenvalues and eigenvectors within a simulation - as a part of the flow field (or I misunderstood)?
maybe keeping them as vectorField/tensorField instead of vol*Fields could solve the issue?
__________________
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 |
|
March 6, 2021, 17:14 |
|
#3 | |
Senior Member
Join Date: Jun 2016
Posts: 102
Rep Power: 10 |
Quote:
Yes I solved this problem by not reading/saving these two fields. The eigenvalue/vector is used in the diagonalization of the stress tensor, so the tensor can be positive-definite and more stable. Best |
||
March 7, 2021, 09:06 |
|
#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 |
just curiosity: would be using ::Internal help for the object to be read/written? e.g. volVectorField::Internal eigenvalues?
__________________
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 |
|
|
|