db.diffusion {RGeostats} | R Documentation |
Calculate the diffusion coefficient over coarse cells
db.diffusion(dbgin, dbgout, radix = "Diffusion", modify.target = db.locmod())
dbgin |
The |
dbgout |
The |
radix |
Radix of the name given to the upscaled variable. |
modify.target |
Decides whether or not the newly created variables will have their
locator defined or not. For more information, see |
The principle is to calculate the average diffusion coefficient over a set of coarse cells (of the output Db Grid) starting from the information provided on small cells (of the input Db Grid). Each fine cell contains a real value which could be:
either 1 for porous medium or 0
or a positive value such that the largest value corresponds to the most porous medium.
Each coarse cell is treated separately. The idea is to perform a Monte-Carlo simulation in order to derive the upscaled diffusion coefficient. The principle is to launch a series of independent particles which follow a Brownian motion within the coarse cell. At each time iteration, we simply calculate the euclidean distance between the initial and the final locations for each particle. We finally establish the regression of the average of these square distances as a function of the iteration rank. When this regression becomes linear, the slope of this linear regression (up to a scaling coefficient) provides the upscaled diffusion coefficient.