Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • dumux dumux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 89
    • Issues 89
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 81
    • Merge requests 81
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • dumux-repositories
  • dumuxdumux
  • Issues
  • #826

Closed
Open
Created Mar 17, 2020 by Timo Koch@timokOwner

Diffusion confusion (implementation)

We decided at some point that diffusion laws, e.g. FicksLaw, should compute all component fluxes in one go. This means two things

  • we can now more efficiently compute the diffusive fluxes depending on the law (Fick / Maxwell-Stefan)
  • FicksLaw now depends on the equation system

Example:

  1. If I want to neglect diffusion in one phase, i can set the diffusion coefficient to zero. However, then the diffusive fluxes are still computed and I can throw them away in the custom local residual.
  2. The Richards model is an immiscible two-phase two-component model but the air phase is never balanced. To integrate this in the current framework, we introduced BalanceEqOpts::mainComponentIsBalanced(phaseIdx) which is overloaded for the Richards model and used in Fick's law. In this case the dependency is actually there in the code in form of the additional dependency on BalanceEqOpts.

One thought for a possible solution:

If we would have a class DiffusionFlux replacing the current FicksLaw, then we could have a custom implementation RichardsDiffusionFlux which takes care of special requirements. DiffusionFlux would be a class on the level of LocalResidual only containing physics/equations. Internally it could use something like FicksLaw (new implementation that only contains the transmissibility part and discretization specifics) to compute the actual individual fluxes. DiffusionFlux may need to be specialized on the Law type (Fick / Maxwell-Stefan) but not the discretization.

Maybe, this would essentially be a code renaming / reordering. But that needs to be further investigated.

Edited Mar 17, 2020 by Timo Koch
Assignee
Assign to
Time tracking