fracture.p10

Syntax

fp10 = fracture.p10(vstart,vend<,dfn>)

Get the P10 along a transect. The P10 is the number of fracture intersections with a transect per unit length. If dfn is not given then the P10 is calculated over all fractures of all DFNs.

Returns:

fp10 - the P10 value

Arguments:

vstart - vector starting position of the transect

vend - vector ending position of the transect

dfn - optional DFN pointer

Usage Example

The following example illustrates how fracture.p10 can be used to get the P10 for various DFNs, or of all fractures (3D).

model new
model random 10000
model domain extent -5 5

;Generate fractures using the default template
fracture generate dfn 'p1' p10 0.1 begin -5 5 0 end 0 0 0
fracture generate dfn 'p2' p10 0.2 begin -5 5 0 end 0 0 0
fracture generate dfn 'p3' p10 0.3 begin -5 5 0 end 0 0 0
fracture generate dfn 'p4' p10 0.4 begin -5 5 0 end 0 0 0 

; fish access to densities
fish define access_p10
	local pt1 = vector(-5,0,0)
	local pt2 = vector(5,0,0)
    local dfn1 = dfn.find('p1')    
    local dfn2 = dfn.find('p2')    
    local dfn3 = dfn.find('p3')    
    local dfn4 = dfn.find('p4')    
    io.out('P10 of dfn p1 = '+string(fracture.p10(pt1,pt2,dfn1)))    
    io.out('P10 of dfn p2 = '+string(fracture.p10(pt1,pt2,dfn2)))    
    io.out('P10 of dfn p3 = '+string(fracture.p10(pt1,pt2,dfn3)))    
    io.out('P10 of dfn p4 = '+string(fracture.p10(pt1,pt2,dfn4)))    
    io.out('P10 of all dfns = '+string(fracture.p10(pt1,pt2)))
end
[access_p10]

program return

The same example in 2D:

model new
model random 10000
model domain extent -5 5

;Generate fractures using the default template
fracture generate dfn 'p1' p10 0.1 begin -5 5 0 end 0 0 0
fracture generate dfn 'p2' p10 0.2 begin -5 5 0 end 0 0 0
fracture generate dfn 'p3' p10 0.3 begin -5 5 0 end 0 0 0
fracture generate dfn 'p4' p10 0.4 begin -5 5 0 end 0 0 0 

; fish access to densities
fish define access_p10
	local pt1 = vector(-5,0,0)
	local pt2 = vector(5,0,0)
    local dfn1 = dfn.find('p1')    
    local dfn2 = dfn.find('p2')    
    local dfn3 = dfn.find('p3')    
    local dfn4 = dfn.find('p4')    
    io.out('P10 of dfn p1 = '+string(fracture.p10(pt1,pt2,dfn1)))    
    io.out('P10 of dfn p2 = '+string(fracture.p10(pt1,pt2,dfn2)))    
    io.out('P10 of dfn p3 = '+string(fracture.p10(pt1,pt2,dfn3)))    
    io.out('P10 of dfn p4 = '+string(fracture.p10(pt1,pt2,dfn4)))    
    io.out('P10 of all dfns = '+string(fracture.p10(pt1,pt2)))
end
[access_p10]

program return