Coupling of several regular DuMux problems.
More...
Description
Multidomain Framework
Coupled models realized with the DuMux multidomain framework
DuMuX can couple problems posed on different domains. The domains can touch or overlap, model different physics, have different dimensions, different grids, or different discretization methods. The full system Jacobian is approximated by numeric differentiation (avoids hand-coding the Jacobian) which allows building monolithic solvers for complex nonlinear coupled problems. The framework enabling all these coupled simulations is called the MultiDomain framework.
Design Goals
Reuse existing DuMux models in the coupled setting
Extensible to more than two subdomains
Common structure for different coupling modes
Monolithic assembly and solvers
Structure of monolithic Jacobian matrix
The multidomain framework uses block-structured matrices to assemble a single system matrix for the linear system arising from the coupled problem (for example, in each Newton iteration of a nonlinear solver).
The matrix is structured such that each of the diagonal blocks correspond to one of the subproblems. The off-diagonal blocks correspond to the coupling derivatives that represent interactions between the subproblems. The block-structured matrix can directly be used with compatible linear solvers. The block structure is also useful to construct partitioned solvers.
The Subproblems
Any regular ("single domain") DuMux problem can be turned into a subproblem of a coupled simulation. The subproblems can model arbitrary physics, can have different dimensions, or be discretized with different methods. The only requirement is that the subproblems are compatible with the coupling manager.
In addition to a regular DuMux problem, the subproblems gets a pointer to the coupling manager which is used to transfer data between the subproblems and obtain data from other subproblems.
The Coupling Manager
The coupling manager is the central object in the multidomain framework, which is responsible for the coupling of the subproblems. Coupling managers implement the interface of the Dumux::CouplingManager class.
The coupling manager is responsible for the following tasks:
Transfer data from one subproblem to another
e.g. give me the soil pressure (from the well domain)
e.g. give me the radius of the embedded well (from the soil domain)
Compute the coupling stencil
Compute the coupling residual (numerical differentiation)
Couples problems of different or equal dimension that touch at the domain boundary. Examples are equal-dimension multi-physics problems like Darcy-Stokes coupling or PNM (pore network model)-Darcy coupling.
Couples problems of different dimensions where one or more lower-dimensional problems (lowdim) are embedded in a higher-dimensional domain (bulk). Examples are embedded one-dimensional networks for the simulation of blood tissue perfusion, or root-soil interaction, and embedded fracture models.
Couples problems of different dimensions where one or more lower-dimensional problems (lowdim) live on the facets of the higher-dimensional domain (bulk). Examples are discrete facet conforming fracture models and problems with physics on a domain surface.
updates all data and variables that are necessary to evaluate the residual of the element of domain i this is called whenever one of the primary variables that the element residual depends on changes in domain j
template<std::size_t i, std::size_t j, class LocalAssemblerI>
evaluates the element residual of a coupled element of domain i which depends on the variables at the degree of freedom with index dofIdxGlobalJ of domain j
member functions concerning variable caching for element residual evaluations
template<std::size_t i, std::size_t j, class LocalAssemblerI>
updates all data and variables that are necessary to evaluate the residual of the element of domain i this is called whenever one of the primary variables that the element residual depends on changes in domain j
the local assembler assembling the element residual of an element of domain i
domainJ
the domain index of domain j
dofIdxGlobalJ
the index of the degree of freedom of domain j which has an influence on the element residual of domain i
Note
the element whose residual is to be evaluated can be retrieved from the local assembler as localAssemblerI.element() as well as all up-to-date variables and caches.
the default implementation evaluates the complete element residual if only parts (i.e. only certain scvs, or only certain terms of the residual) of the residual are coupled to dof with index dofIdxGlobalJ the function can be overloaded in the coupling manager
the local assembler assembling the element residual of an element of domain i
domainJ
the domain index of domain j
dofIdxGlobalJ
the index of the degree of freedom of domain j whose solution changed
priVarsJ
the new solution at the degree of freedom of domain j with index dofIdxGlobalJ
pvIdxJ
the index of the primary variable of domain j which has been updated
Note
this concerns all data that is used in the evaluation of the element residual and depends on the primary variables at the degree of freedom location with index dofIdxGlobalJ
the element whose residual is to be evaluated can be retrieved from the local assembler as localAssemblerI.element()
per default, we update the solution vector, if the element residual of domain i depends on more than the primary variables of domain j update the other dependent data here by overloading this function
the local assembler assembling the element residual of an element of domain i
domainJ
the domain index of domain j
dofIdxGlobalJ
the index of the degree of freedom of domain j whose solution changed
priVarsJ
the new solution at the degree of freedom of domain j with index dofIdxGlobalJ
pvIdxJ
the index of the primary variable of domain j which has been updated
Note
this concerns all data that is used in the evaluation of the element residual and depends on the primary variables at the degree of freedom location with index dofIdxGlobalJ
the element whose residual is to be evaluated can be retrieved from the local assembler as localAssemblerI.element()
per default, we update the solution vector, if the element residual of domain i depends on more than the primary variables of domain j update the other dependent data here by overloading this function