← Back to team overview

yade-users team mailing list archive

Re: Contact forces

 

2010/2/11 Luc Sibille <luc.sibille@xxxxxxxxxxxxxx>

>  Hi all,
>>
>> A remark since I tried to compute the coordination number for a given
>> simulation.
>>
>> When I use those c++ lines:
>>
>> Real inter=0;
>>   FOREACH(const shared_ptr<Interaction>& I, *ncb->interactions){
>>                if( !I->isReal() ) continue;
>>      inter += 1; }
>>   Real coordN = 0;
>> coordN = 2* ( inter/nbElt );
>>
>
> How do you compute "nbElt", do you take into account the elements not
> involved in the contact force network (i.e. elements involved in less than 2
> contacts)? Maybe element not involved in the contact force network are not
> taken into account in the python script.
>

In my case (C++ code), nbElt is the total number of elements (spheres only)
contained in the simulation. I did not make anything to distinguish spheres
with less than 2 contacts...

I checked the python script in _utils.cpp:147 and I cannot see why there is
a difference (I didn't see anything to avoid spheres with less than 2
contacts in the script), but, I must confess that the code in there is not
very meaningful to me... I have to add that when I look into the xml file,
my C++ code tends to be accurate (just divide the total number of
interactions by the number of particles and multiply by 2).

I have to work on the understanding of the python script, but if you have
any comments, do not hesitate.

  Luc

Follow ups

References