Compute discharge through an internal zone

Hi,

I want to compute the fluid flow through an internal limit in the model.
For example the flow that pass a certain given depth. Therefore the computation can be on zones or gridpoint depending of what is the simplest.

Because it isn’t a boundary with a fixed pore pressure I cannot use the fish function gp.flow.

My guess is that I could use the zone.flow function but I would need to compute the area of the zone section normal to the discharge vector to get a volume per time.

Will that give me an accurate estimation of a different approach computing all the source and sink terms is needed?

Thank you in advance!

Yes - this is correct. You could take the zone.flow vector and multiply this by the cross-sectional area of some plane intersecting the zone. I did a simple test on this example assuming a vertical plane and it worked fine. The tricky part would be calculating the cross-sectional area for an arbitrary plane …

fish def test_discharge
  total_flow_z = 0
  xarea = 0.15*0.3  ; y * z
  loop foreach zp zone.list
    if zone.pos(zp)->x < 0.3
      total_flow_z += zone.flow(zp)->x * xarea
    endif
  end_loop

  total_flow_gp = 0
  loop foreach gp gp.list
    if gp.pos(gp)->x < 0.01
      total_flow_gp += gp.flow(gp)
    endif
  end_loop
end
[test_discharge]