What does the list returned by getConstrictionsFull() stands for in FlowEngine() ?

Asked by Antoine Wautier

Hi,

I am using the method getConstrictionsFull() in FlowEngine(). I though I understood the format {{cell1,cell2}{rad,nx,ny,nz}} returned by this method, but apparently not ...

I though that {cell1,cell2} were the two ids of adjacent tetrahedra of the triangulation and rad the radius of the constriction defined as the maximum inscribed circle on the common face of the two adjacent tetrahedra, and nx,ny,nz the three components of the unit vector normal to the adjacent facet.

However I figured out that cell1 and cell2 were hardly ever adjacent if you considered the vertices returned by getVertices method. I also noticed that these ids are numbered from 1 to nCells() and not form 0 to nCells()-1 as I would have expected in python ... Moreover (nx,ny,nz) is not a unit vector ...

Is there any documentation about this method more detailed than the one given in YADE documentation?

Thank you very much in advance for your help

Antoine

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Bruno Chareyre
Solved:
Last query:
Last reply:
Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#1

You guessed correctly.
The normal, it is not a unit vector because it is proportional to the fluid cross section.

Not sure how you found that they were not adjacent. Maybe something misleading in the cell numbering. Let me know.

Bruno

Revision history for this message
Antoine Wautier (antoine-wautier) said :
#2

Thanks for your quick answer.

Ok for the normal, your explanation makes it clearer to me!

Concerning the fact that the cells are not adjacent, I figured this out by comparing the body ids returned by getVertices(Cell1) and getVertices(Cell2). I should have found 3 out of 4 identical ids but surprisingly this is not the case (even on a simple assembly of 9 spheres: 8 on the vertices of a cube and one in the center).

Anyway in getVertices methods, the ids range from 0 to nCells()-1 and Cell1 and Cell2 range from 1 to nCells() which results in an error 'out of range' from time to time... Thus I tried getVertices(Cell1-1) and getVertices(Cell2-1) without improvement...

Antoine

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#3

What youfind is that the cell's id does not match the cell's index, indeed.
There are good reasons for that, yet your questions reveals that it would be more useful to have ids in the constriction list instead of index's. I may change this.

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#4

It is fixed here, please update your code and let me know if it makes more sense:
https://github.com/yade/trunk/commit/12f9bf90e84da4d79ec1443bc1e24f4e77e55b01

Revision history for this message
Antoine Wautier (antoine-wautier) said :
#5

Thanks for your explanation! I guess it should be ok now. Is it fixed in yadedaily or should I recompile the code?

I tried to reexecute the installation lines given in the documentation:
sudo bash -c 'echo "deb http://www.yade-dem.org/packages/ trusty/" >> /etc/apt/sources.list'
wget -O - http://www.yade-dem.org/packages/yadedev_pub.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install yadedaily

This didn't seem that your modification was taken into account...

Could you tell me how I should update my code (I feel sorry for asking this basic question)?

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#6

The change is not yet reflected in the binary package "yadedaily", the fast solution is to compile from sources.
See the "compilation" section of the installation page.
B

Revision history for this message
Antoine Wautier (antoine-wautier) said :
#7

I downloaded the source code, but its compilation raises the following error :

/trunk/lib/triangulation/FlowBoundingSphere.ipp:693:113: error: expression cannot be used as a function
   Constriction cons (pair<int,int>(f_it->first->info().id(),f_it->first->neighbor(f_it->second)->info().id()),rn);

Revision history for this message
Best Bruno Chareyre (bruno-chareyre) said :
#8

My mistake, sorry.
You can now update:
cd trunk
git pull
cd [buildDir]
make install

Revision history for this message
Antoine Wautier (antoine-wautier) said :
#9

Thanks Bruno Chareyre, that solved my question.