<< NARVAL_G_Coreness NARVAL NARVAL_G_DeleteEdges >>

NARVAL >> NARVAL > NARVAL_G_CoulombForce

NARVAL_G_CoulombForce

Perform the force generated by the Coulomb's repulsion.

Calling Sequence

[Cx,Cy]=NARVAL_G_CoulombForce(kh,qi,qj,i,j,nx,ny)

Parameters

kh :

Coulomb coefficient.

qi :

charge of node i.

qj :

charge of node j.

i :

starting node.

j :

ending node.

nx :

current x-coordinates vector of nodes.

ny :

current y-coordinates vector of nodes.

Cx :

x-coordinate of the Coulomb's repulsion.

Cy :

y-coordinate of the Coulomb's repulsion.

Description

NARVAL_G_CoulombForce performs the Coulomb's repulsion [Cx,Cy] between two nodes [i,j] of a graph. The position of all nodes is assumed to be stored in [nx,ny]. In respect with the Wikipedia definition, the Coulomb's law describes the electrostatic interaction between electrically charged particles.

Examples

n=3;//network size
l0=5;//a maximum of 5 links are created for any created node
L=1000;//network square area side 
kh=L*L;//Coulomb's coefficient
[g,d]=NARVAL_T_BarabasiAlbert(n,l0,L);//generation of the topology
nx=g.node_x;//original position
ny=g.node_y;
n=g.node_number;
l=length(g.head);
li=NARVAL_F_AleaNombre(l);//selection of a link
[nd,nf]=NARVAL_G_Edge2Nodes(g,li);
qd=1;//charge of node Nd
qf=1;//charge of node Nf
[Cx,Cy]=NARVAL_G_CoulombForce(kh,qd,qf,nd,nf,nx,ny);//application of NARVAL_G_CoulombForce
Cx
Cy

Dependency

NARVAL_F_Distance

Author

http://wwwen.uni.lu/interdisciplinary_centre_for_security_reliability_and_trust

Contact

<< NARVAL_G_Coreness NARVAL NARVAL_G_DeleteEdges >>