The class pp.ad.DifferentiableFVAd provides a discretization of Darcy's law that may account for state-dependent permeability in multiphysics simulations. This approach has been shown to be superior in terms of Newton performance, but the class is not yet compatible with the models.
Goal
To integrate pp.ad.DifferentiableFVAd seamlessly in the model framework, it must be possible to override the method darcy_flux_discretization to return a pp.ad.DifferentiableFVAd object instead of pp.ad.MpfaAd. This raises two immediate questions:
The signature of pp.ad.DifferentiableFVAd.__init__() requires quite a few arguments. Some of these will be superfluous in the setting of model mixins, but others willl have to be specified (e.g., the permeability function and argument, which represent the constitutive law of the state-dependent permeability). How to make the bridge from a model setting to the existing implementation of pp.ad.DifferentiableFVAd, and to which degree it is possible and desirable to make a generic bridge, independent of the constitutive law, is not clear at the moment.
The implementation in pp.ad.DifferentiableFVAd is (as EK understands it), aimed at having the same constitutive law in a set of subdomains. In general, we will have different constitutive laws, e.g., cubic law in fractures, Kozeny-Carman with some functional dependency in the matrix. An overridden darcy_flux_discretization() will receive an arbitrary list of subdomains and should return an operator covering all subdomains; that is, gluing together subdomains should happen inside the overridden method. How to realize such a coupling is not clear to EK at the moment.
Other updates needed
Expand the list as needs become clear:
pp.ad.DifferentiableFVAd should inherit from pp.ad.Discretization. Hopefully this is straightforward.
There is some treatment of vector_source_terms, but what happens there is unclear. This should be investigated further.
Methods bound_pressure_cell and bound_flux are missing. It is not clear what implementing them will entail.
Background
The class
pp.ad.DifferentiableFVAd
provides a discretization of Darcy's law that may account for state-dependent permeability in multiphysics simulations. This approach has been shown to be superior in terms of Newton performance, but the class is not yet compatible with the models.Goal
To integrate
pp.ad.DifferentiableFVAd
seamlessly in the model framework, it must be possible to override the methoddarcy_flux_discretization
to return app.ad.DifferentiableFVAd
object instead ofpp.ad.MpfaAd
. This raises two immediate questions:pp.ad.DifferentiableFVAd.__init__()
requires quite a few arguments. Some of these will be superfluous in the setting of model mixins, but others willl have to be specified (e.g., the permeability function and argument, which represent the constitutive law of the state-dependent permeability). How to make the bridge from a model setting to the existing implementation ofpp.ad.DifferentiableFVAd
, and to which degree it is possible and desirable to make a generic bridge, independent of the constitutive law, is not clear at the moment.pp.ad.DifferentiableFVAd
is (as EK understands it), aimed at having the same constitutive law in a set of subdomains. In general, we will have different constitutive laws, e.g., cubic law in fractures, Kozeny-Carman with some functional dependency in the matrix. An overriddendarcy_flux_discretization()
will receive an arbitrary list of subdomains and should return an operator covering all subdomains; that is, gluing together subdomains should happen inside the overridden method. How to realize such a coupling is not clear to EK at the moment.Other updates needed
Expand the list as needs become clear:
pp.ad.DifferentiableFVAd
should inherit from pp.ad.Discretization. Hopefully this is straightforward.vector_source_terms
, but what happens there is unclear. This should be investigated further.bound_pressure_cell
andbound_flux
are missing. It is not clear what implementing them will entail.