The FEM computation depends on (the now legacy) FEniCS. The files generated can be visualized in ParaView.
Consider the system of equations modelling a medical torus containing two hormones
The objective is to obtain the weak form to find
such that
by integrating the SE and multiplying with
such that
The non-linear terms
which can be prepared for the Galerkin FEM
and inserted along with the linear terms consisting of
Identify the matrices
and see that one of the source terms consists of a load vector
In order to discretize the system, it is convenient to change into matrix ODE notation
The Crank-Nicolson formulation
is solved for the next timestep and ready to be implemented as