# Output Flux through Boundary Surface

**URL:** <https://discourse.opengeosys.org/t/output-flux-through-boundary-surface/271>\
**Category:** ogs-devs\
**Tags:** mailing-list\
**Created:** [April 8, 2016, 1:30am UTC](https://discourse.opengeosys.org/t/output-flux-through-boundary-surface/271 "2016-04-08T01:30:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wenjie\_Xu](https://discourse.opengeosys.org/letter_avatar_proxy/v4/letter/w/46a35a/32.png) [@Wenjie\_Xu](https://discourse.opengeosys.org/u/Wenjie_Xu)\
**Post date:** [April 8, 2016, 1:30am UTC](https://discourse.opengeosys.org/t/output-flux-through-boundary-surface/271/1 "2016-04-08T01:30:05Z")

</div>

Dear All,

does anybody know how to output the mass flux through a boundary surface in OGS5?

Cheers

Wenjie

---

<div class="post-metadata">

**Author:** ![Norihiro\_Watanabe2](https://discourse.opengeosys.org/letter_avatar_proxy/v4/letter/n/e36b37/32.png) [@Norihiro\_Watanabe2](https://discourse.opengeosys.org/u/Norihiro_Watanabe2)\
**Post date:** [April 8, 2016, 4:34am UTC](https://discourse.opengeosys.org/t/output-flux-through-boundary-surface/271/2 "2016-04-08T04:34:49Z")

</div>

Setting $DAT\_TYPE TOTAL\_FLUX in OUT file might work, but I'm not sure. maybe someone from Kiel can help you.

best,  
nori

> **···**
>
> On 04/08/2016 03:30 AM, Wenjie Xu wrote:
> 
> > Dear All,
> > 
> > does anybody know how to output the mass flux through a boundary surface  
> > in OGS5?
> > 
> > Cheers
> > 
> > Wenjie
> > 
> > --  
> > You received this message because you are subscribed to the Google  
> > Groups "ogs-devs" group.  
> > To unsubscribe from this group and stop receiving emails from it, send  
> > an email to ogs-devs+unsubscribe@googlegroups.com  
> > \<mailto:ogs-devs+unsubscribe@googlegroups.com\>.  
> > For more options, visit [https://groups.google.com/d/optout\](https://groups.google.com/d/optout%5C).
> 
> --  
> Norihiro Watanabe, Dr.-Ing.  
> Department of Environmental Informatics (ENVINF)  
> Wissenschaftler
> 
> Helmholtz-Zentrum für Umweltforschung GmbH - UFZ  
> Helmholtz Centre for Environmental Research GmbH - UFZ  
> Permoserstraße 15 / 04318 Leipzig / Germany
> 
> norihiro.watanabe@ufz.de / [http://www.ufz.de](http://www.ufz.de)  
> Telefon +49 341 235 1806
> 
> Sitz der Gesellschaft: Leipzig  
> Registergericht: Amtsgericht Leipzig, Handelsregister Nr. B 4703  
> Vorsitzender des Aufsichtsrats: MinDirig Wilfried Kraus  
> Wissenschaftlicher Geschäftsführer: Prof. Dr. Georg Teutsch  
> Administrativer Geschäftsführer: Dr. Heike Graßmann

---

<div class="post-metadata">

**Author:** ![marc.walther](https://discourse.opengeosys.org/user_avatar/discourse.opengeosys.org/marc.walther/32/566_2.png) [@marc.walther](https://discourse.opengeosys.org/u/marc.walther)\
**Post date:** [April 8, 2016, 6:07am UTC](https://discourse.opengeosys.org/t/output-flux-through-boundary-surface/271/3 "2016-04-08T06:07:44Z")

</div>

You can also use Paraview to slice a plane of your domain and then use a filter called “Surface Flow” (or similar, I don’t remember exactly).

Best,

Marc

* * *

Marc Walther

Hydrologist

JProf Dr. rer. nat.

Helmholtz Centre for Environmental Research - UFZ

Department of Environmental Informatics

Permoserstraße 15, 04318 Leipzig, Germany

Technische Universität Dresden

Faculty of Environmental Sciences

Department of Hydrosciences

Institute for Groundwater Management

01062 Dresden

Visiting Address UFZ

Permoserstraße 15, 04318 Leipzig

Building 7.2, Room E110

Visiting Address TUD

Bergstr. 66, 01069 Dresden

Neubau Chemie 2. Bauabschnitt, CHE-BA2, Room E60

Phone +49 341 235 10 54

Fax +49 341 235 19 39

Mobile +49 178 334 18 19

Email [marc.walther@ufz.de](mailto:marc.walther@ufz.de)

Web http:/​/​www​.​ufz​.​de

Personal http:/​/​www​.​ufz​.​de/​index​.​php​?​en=​32239

ResGate http:/​/​www​.​researchgate​.​net/​profile/​Marc\_Walther

Helmholtz-Zentrum für Umweltforschung GmbH - UFZ

Registered Office: Leipzig

Registration Office: Amtsgericht Leipzig

Trade Register Nr. B 4703

Chairman of the Supervisory Board: MinR Wilfried Kraus

Scientific Director: Prof. Dr. Georg Teutsch

Administrative Director: Dr. Heike Graßmann

* * *

> **···**
>
> Sent from my mobile device, please excuse spelling mistakes.
> 
> On 8 April 2016 3:30:14 am Wenjie Xu [wenjiexu84@gmail.com](mailto:wenjiexu84@gmail.com) wrote:
> 
> > Dear All,
> 
> > does anybody know how to output the mass flux through a boundary surface in OGS5?
> 
> > Cheers
> 
> > Wenjie
> 
> > –
> > 
> > You received this message because you are subscribed to the Google Groups “ogs-devs” group.
> > 
> > To unsubscribe from this group and stop receiving emails from it, send an email to [ogs-devs+unsubscribe@googlegroups.com](mailto:ogs-devs+unsubscribe@googlegroups.com).
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Christof\_Beyer](https://discourse.opengeosys.org/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@Christof\_Beyer](https://discourse.opengeosys.org/u/Christof_Beyer)\
**Post date:** [April 8, 2016, 6:19am UTC](https://discourse.opengeosys.org/t/output-flux-through-boundary-surface/271/4 "2016-04-08T06:19:41Z")

</div>

Hi Wenjie,

as Nori said, you can use the TOTAL\_FLUX output for fluxes across surfaces (or polylines in 2D):

#OUTPUT  
$PCS\_TYPE  
&nbsp;&nbsp;&nbsp;HEAT\_TRANSPORT  
&nbsp;&nbsp;$GEO\_TYPE  
&nbsp;&nbsp;&nbsp;SURFACE SURF1  
&nbsp;&nbsp;$DAT\_TYPE  
&nbsp;&nbsp;&nbsp;TOTAL\_FLUX  
&nbsp;&nbsp;$TIM\_TYPE  
&nbsp;&nbsp;&nbsp;STEPS 1

This works for heat & mass transport, liquid & groundwater flow.  
Just set the correct $PCS\_TYPE. For some boundary element types (tri, tet), however, accuracy may not be perfect.

You can also print total heat, or mass stored in your model, e.g. for a particular material group (MatGroup 0 in this case):

#OUTPUT  
$PCS\_TYPE  
&nbsp;&nbsp;&nbsp;HEAT\_TRANSPORT  
&nbsp;&nbsp;$DAT\_TYPE  
&nbsp;&nbsp;&nbsp;CONTENT 0  
&nbsp;&nbsp;$TIM\_TYPE  
&nbsp;&nbsp;&nbsp;STEPS 1

These functions are implemented in the KielTesting branch:  
[https://svn.ufz.de/svn/ogs/branches/kiel\_testing](https://svn.ufz.de/svn/ogs/branches/kiel_testing)

Jens Olaf Delfs can give you more information, as he implemented these routines.

Schönen Tag noch, Christof

> **···**
>
> Am 08.04.2016 um 03:30 schrieb Wenjie Xu:
> 
> > Dear All,
> > 
> > does anybody know how to output the mass flux through a boundary surface  
> > in OGS5?
> > 
> > Cheers
> > 
> > Wenjie
> 
> --  
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Dr. Christof Beyer  
> Institute of Geosciences  
> Geohydromodelling  
> Christian-Albrechts-University Kiel  
> Ludewig-Meyn-Str. 10  
> 24118 Kiel  
> Germany
> 
> phone: +49(0)431-8803172  
> fax: +49(0)431-8807606  
> mobile: +49(0)176-24297908  
> email: christof.beyer@gpi.uni-kiel.de  
> home: [http://www.ifg.uni-kiel.de/](http://www.ifg.uni-kiel.de/)  
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

---

<div class="post-metadata">

**Author:** ![jens-olaf\_Delfs](https://discourse.opengeosys.org/letter_avatar_proxy/v4/letter/j/ce73a5/32.png) [@jens-olaf\_Delfs](https://discourse.opengeosys.org/u/jens-olaf_Delfs)\
**Post date:** [April 8, 2016, 9:05am UTC](https://discourse.opengeosys.org/t/output-flux-through-boundary-surface/271/5 "2016-04-08T09:05:04Z")

</div>

A desciption is available here: [https://github.com/drjod/ogs\_kb1/wiki/Balancing-toolkit](https://github.com/drjod/ogs_kb1/wiki/Balancing-toolkit)

> **···**
>
> 2016-04-08 3:30 GMT+02:00 Wenjie Xu [wenjiexu84@gmail.com](mailto:wenjiexu84@gmail.com):
> 
> > Dear All,
> 
> > 
> 
> > does anybody know how to output the mass flux through a boundary surface in OGS5?
> 
> > 
> 
> > Cheers
> 
> > 
> 
> > Wenjie
> 
> > –
> > 
> > You received this message because you are subscribed to the Google Groups “ogs-devs” group.
> > 
> > To unsubscribe from this group and stop receiving emails from it, send an email to [ogs-devs+unsubscribe@googlegroups.com](mailto:ogs-devs+unsubscribe@googlegroups.com).
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Xuan\_Yu](https://discourse.opengeosys.org/letter_avatar_proxy/v4/letter/x/b782af/32.png) [@Xuan\_Yu](https://discourse.opengeosys.org/u/Xuan_Yu)\
**Post date:** [January 25, 2018, 9:09pm UTC](https://discourse.opengeosys.org/t/output-flux-through-boundary-surface/271/6 "2018-01-25T21:09:00Z")

</div>

I just tried today with triangle mesh, it did not work. And I found a webpage here [http://tk-opengeosys.blogspot.com/2016/04/](http://tk-opengeosys.blogspot.com/2016/04/) says that “there seems to be a bug for trinagles and tetrahedra”

> **···**
>
> On Friday, April 8, 2016 at 5:05:05 AM UTC-4, jens wrote:
> 
> > A desciption is available here: [https://github.com/drjod/ogs\_kb1/wiki/Balancing-toolkit](https://github.com/drjod/ogs_kb1/wiki/Balancing-toolkit)
> 
> > 2016-04-08 3:30 GMT+02:00 Wenjie Xu [wenji...@gmail.com](mailto:wenji...@gmail.com):
> > 
> > > Dear All,
> 
> > >
> 
> > > does anybody know how to output the mass flux through a boundary surface in OGS5?
> 
> > >
> 
> > > Cheers
> 
> > >
> 
> > > Wenjie
> 
> > > –
> > > 
> > > You received this message because you are subscribed to the Google Groups “ogs-devs” group.
> > > 
> > > To unsubscribe from this group and stop receiving emails from it, send an email to [ogs-devs+u...@googlegroups.com](mailto:ogs-devs+u...@googlegroups.com).
> > > 
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> >

---

<div class="post-metadata">

**Author:** ![marc.walther](https://discourse.opengeosys.org/user_avatar/discourse.opengeosys.org/marc.walther/32/566_2.png) [@marc.walther](https://discourse.opengeosys.org/u/marc.walther)\
**Post date:** [January 25, 2018, 11:01pm UTC](https://discourse.opengeosys.org/t/output-flux-through-boundary-surface/271/7 "2018-01-25T23:01:14Z")

</div>

Dear Xuan,

I suggest to use Paraview for getting a budget through any arbitrary planar surface. You can use the filters like this:

1. ‘slice’ (define your area where you want to know the flux),

2. if you have a 2d setup add ‘linear extrusion’ with length of unit 1 into the missing dimension here,

3. ‘generate normals’ on the new surface,

4. use a ‘calculator’ filter to compute the flux per node (type ‘velocity.normals’ to computer a scalar product, both variables should be vectors),

5. and finally ‘integrate variables’ to get the total flux through the area

Best,

Marc

* * *

Marc Walther

Hydrologist

JProf. Dr. rer. nat.

Helmholtz Centre for Environmental Research - UFZ

Department of Environmental Informatics

Permoserstraße 15, 04318 Leipzig, Germany

Technische Universität Dresden

Faculty of Environmental Sciences

Department of Hydrosciences

Institute for Groundwater Management

01062 Dresden

Visiting Address UFZ

Permoserstraße 15, 04318 Leipzig

Building 7.2, Room E110

Visiting Address TUD

Bergstr. 66, 01069 Dresden

Neubau Chemie 2. Bauabschnitt, CHE-BA2, Room P204

Phone +49 341 235 10 54

Fax +49 341 235 19 39

Email [marc.walther@ufz.de](mailto:marc.walther@ufz.de)

Web http:/​/​www​.​ufz​.​de

Personal http:/​/​www​.​ufz​.​de/​index​.​php​?​en=​32239

ResGate http:/​/​www​.​researchgate​.​net/​profile/​Marc\_Walther

Helmholtz-Zentrum für Umweltforschung GmbH - UFZ

Registered Office: Leipzig

Registration Office: Amtsgericht Leipzig

Trade Register Nr. B 4703

Chairman of the Supervisory Board: MinDirig Wilfried Kraus

Scientific Director: Prof. Dr. Dr. hc. Georg Teutsch

Administrative Director: Prof. Dr. Heike Graßmann

* * *

> **···**
>
> Sent from my mobile device, please excuse spelling mistakes.
> 
> On 25 January 2018 22:09:09 Xuan Yu [xuanyupsu@gmail.com](mailto:xuanyupsu@gmail.com) wrote:
> 
> > I just tried today with triangle mesh, it did not work. And I found a webpage here [http://tk-opengeosys.blogspot.com/2016/04/](http://tk-opengeosys.blogspot.com/2016/04/) says that “there seems to be a bug for trinagles and tetrahedra”
> > 
> > On Friday, April 8, 2016 at 5:05:05 AM UTC-4, jens wrote:
> > 
> > > A desciption is available here: [https://github.com/drjod/ogs\_kb1/wiki/Balancing-toolkit](https://github.com/drjod/ogs_kb1/wiki/Balancing-toolkit)
> 
> > > 2016-04-08 3:30 GMT+02:00 Wenjie Xu [wenji...@gmail.com](mailto:wenji...@gmail.com):
> > > 
> > > > Dear All,
> 
> > > >
> 
> > > > does anybody know how to output the mass flux through a boundary surface in OGS5?
> 
> > > >
> 
> > > > Cheers
> 
> > > >
> 
> > > > Wenjie
> 
> > > > –
> > > > 
> > > > You received this message because you are subscribed to the Google Groups “ogs-devs” group.
> > > > 
> > > > To unsubscribe from this group and stop receiving emails from it, send an email to [ogs-devs+u...@googlegroups.com](mailto:ogs-devs+u...@googlegroups.com).
> > > > 
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> > >
> 
> > –
> > 
> > You received this message because you are subscribed to the Google Groups “ogs-devs” group.
> > 
> > To unsubscribe from this group and stop receiving emails from it, send an email to [ogs-devs+unsubscribe@googlegroups.com](mailto:ogs-devs+unsubscribe@googlegroups.com).
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
