0

Mass balance assessment with TOUGH3

I am looking to validate the observed mass balance agains the theoretical (initial + source/sink - migration form domain into boundary cells) in a TOUGH3 with Neumann boundary conditions. It appears, however, that the flux term into the boundary cells is out by a factor of two. Does this scale factor drop out from the boundary cell formulation (in the limits of small nodal distance and large element volume)?

6 replies

null
    • TOUGHREACT Developer
    • Eric_Sonnenthal
    • 3 mths ago
    • Reported - view

    Hi - How are you calculating the fluxes? The fluxes in the output file per connection should be correct. You probably know this, but the output fluxes are total in kg/s and are not normalized to the area. If another program is calculating the fluxes (like "ext") and the nodal distance is zero, yes maybe the flux was cut in half. It should be correct in the original TOUGH output. I have the issue calculating the fluxes at the grid centers on the injection flux because there is no connection from GENER to the grid block, so the flux is half (embedded flux calculator in TOUGHREACT). The COFT file will also give the correct total fluxes at connections (list them in the input file).

    • Mathematical Modelling Consultant
    • Joseph_Elmes.1
    • 3 mths ago
    • Reported - view

    Thank you Eric! You are not the first one to suggest this today. I will take a closer look at the flux calculations and report back.

    • Mathematical Modelling Consultant
    • Joseph_Elmes.1
    • 2 mths ago
    • Reported - view

    Having taken a deeper dive, it turned out that duplicate connection data was being printed out. I will need to look at this, and see how/where our source code deviates from the latest clean build.

    • kenny
    • 2 mths ago
    • Reported - view

    If you are using MPI for the simulation, the flux for a connection crossing two subdomains (model subdomains handled in different CPUs) may be printed twice.  You need to exclude the repeat connections for the total flux calculation.   

      • Mathematical Modelling Consultant
      • Joseph_Elmes.1
      • 13 days ago
      • Reported - view

       

      Is the duplication of connections across partitioned domain interfaces necessary to correctly resolve fluxes between subdomains? Specifically, does TOUGH3 require two sets of connection entries at the domain interface to ensure that their computed fluxes match, thereby maintaining mass conservation?

      (I already understand the answer, but I think this discussion could be valuable for others encountering the same issue—it offers a deeper appreciation of how TOUGH3 and TOUGH2-MP handles parallelisation.)

      • kenny
      • 12 days ago
      • Reported - view

       Yes, it is necessary to have the duplication of connections  across partitioned domain interfaces. During a MPI parallel simulation, these connections are required for both subdomains in order to get the correct flux through these connections. 

Content aside

  • 12 days agoLast active
  • 6Replies
  • 48Views
  • 3 Following