-
Notifications
You must be signed in to change notification settings - Fork 37
Defining the Simulation
The simulator mark-up defines the parameters controlling the overall simulation.
The quietMode parameter allows the user to suppress output to the log file in order to save storage space and make simulations run a little faster. We recommend that this be used only once preliminary tests have been performed and the user is confident that their protocol is correct.
The restartPreviousRun parameter allows one to restart a previously-completed run, for instance to extend the time of simulation. Restarting in this manner will preserve the numbering of output files. To restart a previous run, merely edit the protocol file contained in the relevant results directory: change this parameter from false to true, change any other relevant parameters (such as ending time), and when running RunSimulation.bat choose the newly modified protocol file from the output directory.
The randomSeed parameter allows you to specify a value for the seed of the random number generator. To assess the effect of stochasticity on your model, you should run several simulations with different seeds and look at how the simulation results differ for each case. Note that if a random.state file is present in the same directory as the protocol file then this will override the randomSeed (see Section III).
The outputPeriod parameter gives the simulation time-interval between the generation of output files (state, summary and povray files). Low values (more frequent outputs) will lead to more files and higher use of disk space, while high values (fewer outputs) may not have sufficient time resolution to visualize transient behaviour. Therefore this parameter should be set based on the expected dynamics of your system.
The timeStep mark-up specifies all parameters for the time stepping of the simulation. This mark-up is analysed by the idyno.SimTimer constructor. If you want to use an adaptive timestep, set the parameter adaptive to true and assign values for timeStepMin and timeStepMax (minimum and maximum timestep value, respectively). Otherwise, set the parameter adaptive to false, then the timeStep will always be equal to value of timeStepIni. The parameter endOfSimulation defines the overall length of the simulation.
It is possible to specify a smaller timestep for agent dynamics using the agentTimeStep parameter, which means that the agents will be stepped several times between relaxations of the Diffusion-Reaction problem. If this mark-up is not present, agentTimeStep is equal to the overall simulation timestep.
The chemostat parameter must be set to true when simulating a chemostat scenario. In such simulations, the agents’ positions are ignored and are not changed and all agents have the same growth conditions in order to simulate a well-mixed chemostat.
The attachment parameter (NEW to Version 1.2) determines the method of agent attachment used in the simulation. In previous versions of iDynoMiCS, a specific number of species are created in a specified birth area (all controlled by parameters in the protocol file). From 1.2 onwards, iDynoMiCS can model the injection of species in an additional manner, thus this parameter has been introduced. Now a number of agents (per hour) of the specified species can be introduced on the top of the boundary layer. These agents then perform a 'run and tumble' motion until they (a) attach to the solid surface, (b) attach to forming biofilm, or (c) return to the bulk. This run and tumble motion works by choosing a random angle. The agent moves through the domain in that direction for a certain amount of time until it 'tumbles', or changes direction. This continues until one of the three conditions are met. To specify that this new version of agent attachment is used, the attachment parameter should be set to "selfattach" (without the double quotes). To use the traditional method of attachment that has been used in previous versions of iDynoMiCS, this parameter should be set to "onetime", to simulate onetime attachment. Note that if this parameter is not set, the traditional version of attachment is used by default.
It may be convenient for the simulation to stop automatically once there is only one microbial species remaining in the system. This is often the case in invasion or competition contests, and so by setting the invComp flag to true the user can save time.