Hi everyone,
I’m using FEniCS 2019.1.0 to solve a nonlinear reaction-diffusion system in of the form
\frac{\partial u_1}{\partial t} = D_1 \nabla^2 u_1 - K u_1 u_2 + \sum_{i = 1}^{N_A}\delta(\mathbf{x} - \mathbf{x}_A(t) )
\\
\frac{\partial u_2}{\partial t} = D_2 \nabla^2 u_2 - K u_1 u_2 + \sum_{i = 1}^{N_B}\delta(\mathbf{x} - \mathbf{x}_B(t) )
\\
\frac{\partial u_3}{\partial t} = Ku_1u_2 -Ku_3,
similar to that considered in the 2017 text, “Solving PDEs in Python - the FEniCS Tutorial I”. The difference being that here, the source functions are Dirac deltas. In the text, the authors define a single expression ‘F’ for the variational problem and solve the resulting system at each time-step by
for n in range(num_steps):
t += dt
solve(F == 0, u)
u_n.assign(u)
This is great for the problem presented in the text - however, my problem has delta sources and the only way I know of to add delta sources in FEniCS requires the explicit creation of a linear form object ‘L’ and the accompanying right-hand side vector, ‘b’.
Any advice on how to proceed?