LBIBCell
|
For a general introduction to the reaction-advection-diffusion solvers, please refer to The Reaction-Diffusion Solver, here only the implementation of the initial conditions and reaction terms are shown.
In an anonymous namespace, a few constants are defined. These are standard parameters for the Schnakenberg Turing system (Please see here). The time step depends on your discretization which you have to do by hand prior to setting up the simulation.
For Turing patterns, it is beneficial to start with slightly random initial conditions. Thereforce, we define a random_device. For all lattice sites which belong to a cell (so surrounding and interstitial fluid is excluded), we set a random number with mean 1 and a small perturbation. You'll notice that we divide by 5.0: again, this is Lattice-Boltzmann intrinsics (this depends on the stencil which is used). If you are not familiar with the LB method, we suggest that you get an introduction elsewhere (but note that you don't have understand this at this point).
Now let's implement the reaction term for the receptor (Please see here): First, we need to get the local concentrations of the receptor and the ligand. The receptor is easy, because we're already inside that class. The ligand concentration we'll have to get through the tutorial_02_CDESolverD2Q5_L
solver:
If we have a cell lattice site, we'll return the reaction term, otherwise zero:
For a general introduction to the reaction-advection-diffusion solvers, please refer to The Reaction-Diffusion Solver, here only the implementation of the initial conditions and reaction terms are shown.
In an anonymous namespace, a few constants are defined. These are standard parameters for the Schnakenberg Turing system (Please see here). The time step depends on your discretization which you have to do by hand prior to setting up the simulation.
For Turing patterns, it is beneficial to start with slightly random initial conditions. Thereforce, we define a random_device. For all lattice sites which belong to a cell (so surrounding and interstitial fluid is excluded), we set a random number with mean 1 and a small perturbation. You'll notice that we divide by 5.0: again, this is Lattice-Boltzmann intrinsics (this depends on the stencil which is used). If you are not familiar with the LB method, we suggest that you get an introduction elsewhere (but note that you don't have understand this at this point).
Now let's implement the reaction term for the ligand (Please see here): First, we need to get the local concentrations of the receptor and the ligand. The ligand is easy, because we're already inside that class. The receptor concentration we'll have to get through the tutorial_02_CDESolverD2Q5_R
solver:
If we are on a cell lattice site, we'll return the reaction term, otherwise zero. Note that if you wish to have ligand degradation in the surrounding fluid, you could implement it easily.