# How can I measure a flux?

Hello fellows;

I'm trying to calculate the permeability through a fracture inside a cubic rock sample and, for that, I need to relate the flux inside the fracture to the pressure difference along its extension.

I do the following steps along my code as provided in [1]

1 - Set up a cubic rock matrix

2 - Position a fracture plane along the Y direction

3 - I assume the flow only to occurs only in the fracture cells (other cells are assumed impermeable)

4 - Apply a pressure difference at the bottom of the sample (on the ymin boundary) to generate flow along the fracture

5 - Measure the flux at ymin and ymax, Qin and Qout respectively, with the getBoundaryFlux() function.

I also followed (almost all) tips provided there.

The problem with getBoundaryFlux() function is that it will calculate the flow along the facet and I need it only in the fracture cells. So I got some questions:

1. How can I measure the flux through a fracture? Is there a more suitable function or any restriction to be applied than the getBoundaryFlux() function?

2. How can I measure the velocity of the flow in a particular point of this fracture? Maybe if I can do that at the beggining of the fracture or at the end I would not need the first question answered.

3. Is there any relation between flow velocity and the flux through the fracture? Physical equation or so...?!

Thanks in advance!

[1] https:/

## Question information

- Language:
- English Edit question

- Status:
- Answered

- For:
- Yade Edit question

- Assignee:
- No assignee Edit question

- Last query:
- 2020-09-15

- Last reply:
- 2020-09-25

Robert Caulk (rcaulk) said : | #1 |

> How can I measure the velocity of the flow in a particular point of this fracture?

You can extract the velocity of an individual cell using getCellVelocity [1].

>Is there any relation between flow velocity and the flux through the fracture? Physical equation or so...?!

You can integrate the velocity within a region of interest to get the flux passing the boundary of that particular region. If you know which cells comprise your region, you use [1] to get the velocity magnitude and [2] to get the cell volume. Here is a loop on all cells in the triangulation. You would need to add some logic to decide which cells you want to use in your particular fracture region.

for i in range(0,

coords = flow.getCellCen

velocityVector = np.array(

velMag = np.linalg.

cellVol = flow.getCellVol

v = v + cellVol*

totalVolume += cellVol

q = np.linalg.

kv = q*flow.

[1]https:/

[2]https:/

## Can you help with this problem?

Provide an answer of your own, or ask Guilherme das Neves Seguro for more information if necessary.