-
Notifications
You must be signed in to change notification settings - Fork 5
Solute Fields and Pressure Solvers
In iDynoMiCS simulations, it is assumed that the solute fields are always in steady-state with respect to biomass growth because solute consumption/production and diffusion occur very fast (on the order of seconds) compared to growth of biomass (which occurs on the order of hours to days). Therefore, at each time step it is possible to compute the steady-state solute profile within the computation domain. iDynoMiCS allows one to use different solvers to compute these fields, but by default uses an iterative multi-grid method. In the protocol file, a solver mark-up defines parameters for the solver.
In this mark-up, you must specify the type of solver to use (via the class attribute), a name for the solver (the name attribute) and the computation domain in which the solver is being used (the domain attribute). Other parameters are particular to the solver being used.
The example above shows the implementation for the multi-grid solver. It is usually not necessary to change the particular controlling parameters, but we describe them here for completeness. The active parameter defines whether the solver will actually be used; the preStep and postStep parameters define the number of iterations made before and after a resolution change; the coarseStep parameter defines the number of iterations done at the coarsest resolution; and nCycles defines the maximal number of cycles to be carried out by the solver.
After defining solver parameters, you must also specify the reactions that will be used in computing the solute fields; this is done using the reaction mark-up. In general, all reactions that involve a solute (both production and consumption) will appear here, while reactions that involve only biomass (e.g. conversion of active to inert biomass) will not be included. Be sure that the names entered here match those entered in the reaction mark-ups above, for otherwise a syntax error will result and the simulation will fail.
In addition to using a solver for computing the solute fields, iDynoMiCS uses a similar method to compute the pressure field that was defined similar to the solutes; this is done using the following mark-up:
Note that there is only one parameter (active), as the pressure solver includes by design all reactions affecting biomass components. If you do not include the pressure field, this section may be removed.
To simulate bacteria growth in a chemostat we use the solver class Solver_chemostat, for which two parameters can be set in the protocol file: rtol stands for the relative tolerance of the calculated error and hmax is maximum internal step of the solver. Further details can be found in the class documentation, but in general it is not necessary to change the default values.