baloonworld: (Default)
[personal profile] baloonworld
Investigations
With the addition of a new subroutine to the code, it is possible to make reliable measurements of the dimentionality of the aggregate. This subroutine is outline below.

Declares that this is a routine to be called by the void command, taking no argmeunts
void dimension()
{
Declares that this routine will contain the variables I,x,y which are integers and Rn,particals_less_than_R, which are doubles ( a type of floating point decimal)
int i,x,y;
double Rn,particals_less_than_R;

counts Rn 10/50ths of the finished aggregates rmax to 40/50ths, in 50ths. This means that the outermost fringes of the aggregate, which are yet to become fully developed are not considered, and the innermost area of the aggregate where there is only a small number of particles to average over is not considered.
for(i=10;i<40;i++)
{Rn=i*rmax/50;
sets the number of particals so far counted to 0
particals_less_than_R=0;
scans through all the squares on the grid
for(x=0;x<N;x++) {for(y=0;y<N;y++) checks if the currently considered square contains a particle {if (grid[x][y] != 0) checks if the currently considered square is within radius Rn {if ((x-N/2)*(x-N/2) + (y-N/2)*(y-N/2) < Rn*Rn) if both these checks are true, increments the value of particals_less_than_R particals_less_than_R++; } } } prints the number of particles within Rn and Rn to the output file fprintf(fp, "%f, %f \n", log(Rn),log(particals_less_than_R*1.0)); } }

Profile

baloonworld: (Default)
baloonworld

December 2017

S M T W T F S
     12
3456789
10111213141516
1718 1920212223
24252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 7th, 2026 11:30 am
Powered by Dreamwidth Studios