Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MetaMod driver to deal with convertible MF6 cells in combination with Newton formulation #234

Open
HendrikKok opened this issue Jan 24, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@HendrikKok
Copy link
Contributor

HendrikKok commented Jan 24, 2024

When using the Newton Formulation, convertible nodes can become ‘dry’ when the head falls below the node bottom. In the Newton formulation the dry cells are still active and part of the solve, however:

  • The computed head is not representative for the phreatic head anymore.

  • There is not storage volume computed.

This poses problems for the current MetaMod driver since both the head and storage coefficient is statically exchanged. To properly deal with this, a dynamic exchange is needed in a MetaModNewton driver. This holds the following tasks:

  1. Create new driver

  2. Compute top active node per outer iteration of MODFLOW6. In the mapping, the SVAT will still be coupled to the first model layer. The newton-driver should compute per outer iteration the top active layer for the exchange of head + storage coefficient. This should be done after the linear solve and once after initialization (for the first head exchange). The top active layer is defined as the top cell with a saturation > 0. This array is translated to a 3d array using a masked array to deal with inactive cells (idomain = 0). Dimensions ncol, nrow and nlay can be retrieved from MODFLOW 6’s memory.

  3. Update exchanges for head and storage coefficient using the active top layer subset. Since per iteration the storage coefficient can be updated in another layer, the pointer should be reset after the linear solve. The original SS-pointer will be saved after initialization of MODFLOW6.

  4. Raise exception in case SY is used (iconvert > 1).

  5. Add tests. At least one test should compare the results between MetaMod and MetaModNewton.

The exchange of the rechange flux does not need to be changes, since MODFLOW takes care that the recharge in layer 1 will reach the first phreatic layer.

Current MetaMod coupling schema:

sequenceDiagram
    autonumber
    MODFLOW6 ->> MetaSWAP: head
    loop MODFLOW6-MetaSWAP timestep t
        Note over MetaSWAP: solve t
        MetaSWAP->>MODFLOW6:  storage 
        MetaSWAP->>MODFLOW6:  uz-flux
        Note over MODFLOW6: solve t
        MODFLOW6 ->> MetaSWAP: head
    end
Loading

Proposed MetaModNewton coupling schema:

sequenceDiagram
    autonumber
    MODFLOW6 ->> MetaSWAP: head[top active nodes]
    loop MODFLOW6-MetaSWAP timestep t
        Note over MetaSWAP: solve t
        MetaSWAP ->> MODFLOW6: storage[top active nodes]
        MetaSWAP ->> MODFLOW6: uz-flux[top nodes]
        Note over MODFLOW6: solve t
        Note over MODFLOW6: reset storage array
        Note over MODFLOW6: get top active nodes
        MODFLOW6 ->> MetaSWAP: head[top active nodes]
    end
Loading
@HendrikKok HendrikKok added the enhancement New feature or request label Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant