/celldiff

cellular-automata diffusion model

Primary LanguageC++

celldiff arguments

-n, --diameter          : (0.016) diameter of the computation domain (in meters)
-c, --maxtime           : (100)  maximum time (in seconds) to simulate before halting
-p, --polymer           : (0.3)  polymer concentration in [0, 1]
-g, --drug              : (0.1)  drug concentration in [0, 1]
-h, --tabletheight      : (0.23) height of tablet as a ratio of diameter
-r, --releasedfile      :        filname for exporting release curve. defaults to a timestamped name
-s, --statefile         :        filename for exporting full state data. defaults to a timestamped name
-t, --stateperiod       : (0)    how often to export full state data; 0 == never 
-d, --compress          : (1)    perform compression step
-e, --seed              : (47)   random number seed (unsigned integer)
-a, --asciiperiod       : (1)    frame period in iterations for drawing ascii animation
-o, --drugdissprob      : (1.0)  dissolution probability scale for drug
-l, --exdissprob        : (1.0)  dissolution probability scale for excipient
-w, --polyshellwidth    : (1)    width of the polymer shell (calculated in 8-cell, 2x2x2 blocks)
-b, --polyshellbalance  : (1.0)  distribution of polymer in the shell, as an "imbalance factor"
-f, --boundarydiffusion : (0.9)  exponential decay factor for concentrations in boundary cells
-x, --nographics        : (1)    set >0 to run in non-interactive, text-only mode (suitable for scripting)
-u, --drugdiffrate      : (0.000001) physical rate of drug diffusion (in m/s2)
-k, --exdiffrate        : (0.000001) physical rate of excipient diffusion (in m/s2)
-y, --cellsize          : (0.001) physical size of a cell (in meters)

-d, --compress          : (1) compression flag 

the ratio of released drug mass is printed as newline-separated values to the specified file path.

the model's state is printed in a multi-column format. rows are separated by newlines, columns by tabs. layout is as follows:

first column : cell state as follows:
      	       	    0 = drug,
		    1 = excipient, 
		    2 = drug dissolving,
		    3 = excipient dissolving
		    4 = fully wetted
		    5 = polymer
		    6 = void
		    7 = boundary (zero concentration)

second column : drug concentration

third column : excipient concentration

example: 64 steps on a side, 1000 iterations, output state every 100 iterations:
./celldiff -n64 -c1000 -t100