DFN Domain

Defining arbitrary domain limits for DFN model

The DFN function in ADFNE1.5 can easily be modified to accommodate any desired domain size. The following shows how it is done properly.

First, update the opt structure (line 42) as follows.

opt = Option(varargin,'n',100,'minl',0.05,'mu',0.3,'maxl',0.6,... % default arguments
'shape','c','q',24,'dip',45,'ddip',-1e-7,'dir',0,'ddir',-1e-7,'pos',[]); % domain added

You notice that we simply added a new argument pos. Now we modify the location generator (line 85) as follows.

if isempty(opt.pos)
pts = [Scale(rand(n,1),opt.bbx(1),opt.bbx(3)),Scale(rand(n,1),... % location U(0,1)
pts = opt.pos;

The above solution provides two interesting capabilities.

  • if no pos is provided the generator limits the locations to be inside the provided bounding box (bbx, or default)
  • if pos is provided it is directly used as the center of fractures. This means that the user can externally generate locations based on any desired distribution and feed them to the DFN function.

Similar modification can be made for 3D part (line 167).

n = opt.n;
if isempty(opt.pos) % (!) added box limits
pts = [Scale(rand(n,1),opt.bbx(1),opt.bbx(4)),... % bounded U for each axis
pts = opt.pos; % any other desired points