Hi David,
Typically when equilibration is (near) instantaneous, I would try to represent the individual members of the underlying reaction equation with diagnostics, not with state variables. For instance, for chemical compounds that have a dissolved and an adsorbed phase, I’d model the total of that compound as a state variable. At each time step you can then compute the concentration of the dissolved and adsorbed fractions as diagnostics, using the total and the partition coefficient. In that case, some properties of the total (e.g. sinking rate) are weighted means of the behaviour of the different phases, but that can be accommodated. For instance,
https://github.com/fabm-model/fabm/blob/master/src/models/akvaplan/antiparasitic.F90
Still this won’t fit all needs. If you are dealing with complicated reactions with many participants, it can be very difficult to identify a subset of variables to describe the state. If really needed, overwriting the value of state variables can be done in FABM with the check_state family of routines, as used here
https://github.com/fabm-model/fabm/blob/master/src/models/iow/age/iow_age.F90
Not all hosts [hydrodynamic models] supports this though – some only allow state updates through “normal” time integration of source and transport terms.
Cheers,
Jorn
--
You received this message because you are subscribed to the Google Groups "FABM-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabm-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fabm-users/620025db-06a0-4f83-a8dc-b8806b8dd0cen%40googlegroups.com.