# Problem with complex eigenvalues detected for symmTensor

 Register Blogs Members List Search Today's Posts Mark Forums Read

 October 12, 2016, 12:42 Problem with complex eigenvalues detected for symmTensor #1 New Member   Ting Join Date: Apr 2015 Location: Michigan Posts: 8 Rep Power: 3 Dear all, I am using soildDisplacementFoam to implement ModifiledCamClay model. For this purpose, I need to calculate eigenvalues and eigenvectors using the utility preimplemented in OF, i.e., eigenValues(sigma[celli]) and eigenVectors(sigma[celli]). However, I will always have problems like this for some cells: complex eigenvalues detected for symmTensor. Due to this problem, calculated eigenvalues are set up to zero. Here is the log file with this problem: part 1: sigma_previous= (-150000 0 0 -150000 0 -150000) end sigmaD= (-22.715 0.268961 -0.0164544 -17.9137 0.0715722 -18.7927) end sigma[celli]= (-150023 0.268961 -0.0164544 -150018 0.0715722 -150019) end eigenValues== (-150023 -150019 -150018) end eigenVectors[]s= (0.998372 -0.0567947 0.00531486 -0.00883938 -0.0566245 0.998356 0.0526201 0.996743 0.0611068) end yield[celli]= 2.97148e+06 end pc_stress[celli]= -150000 end p_stress[celli]= -150020 end q_stress[celli]= 4.454 end part 2: sigma_previous= (-150000 0 0 -150000 0 -150000) end sigmaD= (-22.7003 0.268504 -0.00720373 -17.8241 0.0178865 -18.8122) end sigma[celli]= (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) end --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) eigenValues== (0 0 0) end --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) eigenVectors[]s= (0 0 0 0 0 0 0 0 0) end --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) As you can see, for part 1, it is correct, however, for part 2, I have the issue. I calculate eigenvalues for this matrix using matlab, it will not give any errors. Instead, Matlab gives me real eigenvalues. I have searched forum to find out answers for this issue. It seems that nobody has solved this problem. Therefore, I started this thread. I simulated a cylindrical soil, which has three patches, top, surrounding, and bottom. If I use fixedvalue for D (displacement) at the top and bottom, tractiondisplacement for the surrounding, it will not give that error. However, if I use tractiondisplacement for top or bottom, I will have this error. I appreciate if anybody can help me figure it out. Is this one related to boundary conditions or anything else? Thanks in advance.

October 19, 2016, 14:31
#2
New Member

Ting
Join Date: Apr 2015
Location: Michigan
Posts: 8
Rep Power: 3
Quote:
 Originally Posted by tbao Dear all, I am using soildDisplacementFoam to implement ModifiledCamClay model. For this purpose, I need to calculate eigenvalues and eigenvectors using the utility preimplemented in OF, i.e., eigenValues(sigma[celli]) and eigenVectors(sigma[celli]). However, I will always have problems like this for some cells: complex eigenvalues detected for symmTensor. Due to this problem, calculated eigenvalues are set up to zero. Here is the log file with this problem: part 1: sigma_previous= (-150000 0 0 -150000 0 -150000) end sigmaD= (-22.715 0.268961 -0.0164544 -17.9137 0.0715722 -18.7927) end sigma[celli]= (-150023 0.268961 -0.0164544 -150018 0.0715722 -150019) end eigenValues== (-150023 -150019 -150018) end eigenVectors[]s= (0.998372 -0.0567947 0.00531486 -0.00883938 -0.0566245 0.998356 0.0526201 0.996743 0.0611068) end yield[celli]= 2.97148e+06 end pc_stress[celli]= -150000 end p_stress[celli]= -150020 end q_stress[celli]= 4.454 end part 2: sigma_previous= (-150000 0 0 -150000 0 -150000) end sigmaD= (-22.7003 0.268504 -0.00720373 -17.8241 0.0178865 -18.8122) end sigma[celli]= (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) end --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) eigenValues== (0 0 0) end --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) eigenVectors[]s= (0 0 0 0 0 0 0 0 0) end --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) --> FOAM Warning : From function eigenValues(const symmTensor&) in file primitives/Tensor/tensor/tensor.C at line 370 complex eigenvalues detected for symmTensor: (-150023 0.268504 -0.00720373 -150018 0.0178865 -150019) As you can see, for part 1, it is correct, however, for part 2, I have the issue. I calculate eigenvalues for this matrix using matlab, it will not give any errors. Instead, Matlab gives me real eigenvalues. I have searched forum to find out answers for this issue. It seems that nobody has solved this problem. Therefore, I started this thread. I simulated a cylindrical soil, which has three patches, top, surrounding, and bottom. If I use fixedvalue for D (displacement) at the top and bottom, tractiondisplacement for the surrounding, it will not give that error. However, if I use tractiondisplacement for top or bottom, I will have this error. I appreciate if anybody can help me figure it out. Is this one related to boundary conditions or anything else? Thanks in advance.
Hi all,

Here are some updates on the above question.

I double checked tensor.C in my OF version (2.3.0), which is the same as 2.2.x, and tested it using a simple case. The results showed an error when using the eigenvalue function in OF. It gave me a zero eigenvector when calculating eigenvalues of a diagonal matrix that has real values in the diagonal only. I highly doubt that the eigen function in OF may not be correct completely. So, if you need eigenvalues and eigenvectors, please rewrite codes or implement other codes to your solver. Good luck.

Please let me know if you have another insight.

November 2, 2016, 23:25
similar error
#3
Senior Member

Vaze
Join Date: Jun 2009
Posts: 153
Rep Power: 9
Hi

I also received similar kind of error as attached.
Can you focus on how to solve it?

Thank you
mvee
Attached Files
 error.txt (15.3 KB, 2 views)

November 3, 2016, 10:24
#4
New Member

Ting
Join Date: Apr 2015
Location: Michigan
Posts: 8
Rep Power: 3
Quote:
 Originally Posted by mvee Hi I also received similar kind of error as attached. Can you focus on how to solve it? Thank you mvee
Hi Mvee,

As I said in the last thread: I highly doubt that the eigen function in OF may not be correct completely. So, if you need eigenvalues and eigenvectors, please rewrite codes or implement other codes to your solver. Good luck.

I added a new eigen function in openfoam, you can do it yourself.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post bigphil OpenFOAM 351 March 7, 2017 08:45 thegauravonline OpenFOAM Pre-Processing 3 January 14, 2017 06:18 brahimchoice FLUENT 13 January 8, 2017 07:03 aannjj FLUENT 0 July 2, 2013 03:44 cfduser CFX 0 April 29, 2006 10:58

All times are GMT -4. The time now is 21:34.