|
[Sponsors] |
November 1, 2014, 04:26 |
problem in eigenValues
|
#1 |
Senior Member
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 14 |
Hi,
I checked the way calculating eigenValues in OF 2.1.1and found a problem. In OF, Code:
scalar a = -t.xx() - t.yy() - t.zz(); 00106 00107 scalar b = t.xx()*t.yy() + t.xx()*t.zz() + t.yy()*t.zz() 00108 - t.xy()*t.yx() - t.xz()*t.zx() - t.yz()*t.zy(); 00109 00110 scalar c = - t.xx()*t.yy()*t.zz() - t.xy()*t.yz()*t.zx() 00111 - t.xz()*t.yx()*t.zy() + t.xz()*t.yy()*t.zx() 00112 + t.xy()*t.yx()*t.zz() + t.xx()*t.yz()*t.zy(); The eigenValues can be calculated as following: Last edited by wyldckat; January 31, 2015 at 10:19. Reason: repaired code that was incorrectly copy-pasted into the [CODE] markers |
|
November 1, 2014, 04:33 |
|
#2 |
Senior Member
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 14 |
let check it:
scalar Q = (a*a - 3*b)/9; 00137 scalar R = (2*a*a*a - 9*a*b + 27*c)/54; scalar sqrtQ = sqrt(Q); 00146 scalar theta = acos(R/(Q*sqrtQ)); 00147 00148 scalar m2SqrtQ = -2*sqrtQ; 00149 scalar aBy3 = a/3; So R=q/2;Q=-p/3;sqrtQ=sqrt(-p/3);theta=acos(R/(Q*sqrtQ))=acos(-3q*sqrt(-3/p)/(2p)) Then, the problem comes that theta is not equal to acos(3q*sqrt(-3/p)/2p) as in the above formulations in the picture Is it a bug? PS: why in OF, -lambda is returned instead of lambda? Xianbei |
|
November 1, 2014, 07:00 |
|
#3 |
Senior Member
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 14 |
after a further calculation, I found that it's right in OF if we list all the eigenValues.
for simplification, take 3q*sqrt(-3/p)/2p =x, in OF, theta = -x, so according to OF, lambda (only the cosin term)should be: 1\ cos(1/3*arccos(theta)+2*pi/3) 2\ cos(1/3*arccos(theta)) 3\ cos(1/3*arccos(theta)-2*pi/3) if we use x instead 1\ cos(1/3*arccos(x)+2*pi/3) 2\ cos(1/3*arccos(x)-2*pi/3) 3\ cos(1/3*arccos(theta)) which is the same as in the original form. So it's not a bug , but a misunderstanding of mine. But I still want to ask: why is -lambda returned instead of lambda? Xianbei |
|
January 31, 2015, 10:26 |
|
#4 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 |
Hi Xianbei,
Quote:
I say this because of this bug report and subsequent fixes: http://www.openfoam.org/mantisbt/view.php?id=1373 Best regards, Bruno
__________________
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF compiling problem | Wouter | Fluent UDF and Scheme Programming | 6 | June 6, 2012 04:43 |
Gambit - meshing over airfoil wrapping (?) problem | JFDC | FLUENT | 1 | July 11, 2011 05:59 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 06:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 19:13 |
Is this problem well posed? | Thomas P. Abraham | Main CFD Forum | 5 | September 8, 1999 14:52 |