Hi all, I’m trying to solve a problem and I am considering if Fenics is a good platform for my needs.
I asked a question on StackExchange (finite element - Solving coupled PDEs with self-consistency condition - Computational Science Stack Exchange) and I’ve been suggested to ask directly in this forum.
I need to code a 2D solver of the Usadel equations of superconductivity. This problem is written for a series of fields f^{s}_n(r) and \vec{f}^{t}_n(r) (which is a set of a finite number, let’s say N, of fields indexed by n) together with a “self-consistent field” \Delta(r). For each n there is a set of coupled PDEs for the f fields
This 2N set of PDEs needs to be solved together with an algebraic non-linear self-consistency equation which looks like
where \vec{h} and \tau are the external parameters.
The usual way to solve the problem is with by finite differences and using a segregated approach: you solve the 2N equations for a given \Delta(r), then you solve the self-consistency equation (e.g. with Newton-Rapson) for \Delta(r) and then you use the result for a new iteration, until convergence.
I would like to solve this problem using finite elements keeping the segregated approach or even as a fully coupled problem. Is it possible or is there some major problem? I get that coding the solver for the PDEs would be fairly easy (they are just PDEs in the end). But is it possible to write easily a solver of the self-consistency equation in Fenics?
Do you know a somewhat similar problem solved in a publicly available code I can look at?