Catalyst.jl icon indicating copy to clipboard operation
Catalyst.jl copied to clipboard

Diffusion equation modelling

Open jtravs opened this issue 5 months ago • 3 comments

Question❓

Can Catalyst.jl solve reaction diffusion systems, where the diffusion coefficients are density (pressure) dependent? For example when solving a spatially 1D gas-phase reaction network where the gas diffusion rates depend on the local concentration/density. My initial attempts to test this, along with the documentation, seem to suggest not. But I am curious I am mistaken, or if support for this is planned or in the works?

jtravs avatar Sep 16 '25 09:09 jtravs

I think you are probably right that this is currently not supported. Right now we have some support for spatial models (https://docs.sciml.ai/Catalyst/stable/spatial_modelling/lattice_reaction_systems/), however, the transportation rates (which could be diffusion) can currently only be constant (which I think is in contradiction to what you need).

Better spatial support is something that has been on our list for a long time, however, other things have had to take precedence. I have to admit your specific example is not one I have specifically thought about, however, it seems like it could make a good example when/if we actually get to the point it is possible. Unfortunately, I am not sure when that would b,e though.

TorkelE avatar Sep 16 '25 09:09 TorkelE

Thanks for your fast response. I have been looking at the spatial modelling that is currently supported, which could still be useful in the case of a constant diffusion coefficient. It is not 100% clear to me what the units of the @transport_reaction rate are. For example, if I am solving the concentrations of my reaction system in units of cm^-3, (e.g. a species number density per unit volume), then should the units of D be cm^2 s^-1, i.e. a constant diffusion coefficient?

jtravs avatar Sep 16 '25 09:09 jtravs

So, we haven't really implemented units in the spatial workflows (to some extent it is a proof of concept and a way for people to start doing spatial models, then at some point if it seems popular we know to put more effort into it). However, the corresponding unit should just be what a standard diffusion coefficient would have.

TorkelE avatar Sep 16 '25 09:09 TorkelE