PMEAL / OpenPNM

A Python package for performing pore network modeling of porous media
http://openpnm.org
MIT License
456 stars 174 forks source link

Add variable_props mechanism #2076

Closed jgostick closed 3 years ago

jgostick commented 3 years ago

We need to have something like a set_variable_props method on GenericTransport that allows users to specify is something should be updated. For instance, 'pore.diameter' may change due to dissolution, so a FickianDiffusion algorithm needs to know to regenerate the geometry models. This can be accomplished if we have alg.settings['variable_props'] = [ ], which is then included in the dependency graph search.

For instance, line 369 in ReactiveTransport is:

base_props = [self.settings["quantity"]]

but should be:

base_props = [self.settings["quantity"], self.settings['variable_props']]

Also note that this method should probably be moved to GenericTransport, or put into its own mixin since its actually more general than for just reactions. See #1829.

mkaguer commented 3 years ago

Need this for multiphysics solver. Specifically, when dealing with multiphysics simulation, _get_iterative_props needs to be overloaded to account for all algorithms. An example is:

Temperature-dependent diffusion coefficient --> diffusive conductance needs to be treated as iterative, but this doesn't happen using the machinery currently in place since pore.temperature is not included in the iterative_props.