Is there a firedrake example for nonlinear multi-physics (multiple,
two or more, coupled PDEs), which are solved with Newton's method in a
fully-coupled way?
I don't think we have an example of this per se. Which aspects are you
interested in following: how to formulate the problem in Firedrake, or
how to driver the solvers?
Cheers,
Lawrence
Dear Lawrence, I guess, the answer is both. I tried to setup an example for two-phase flow in porous media (see twophase.py). I have attached the system I want to setup (see System.pdf). The primary variables are pw and Sn. pw ... water pressure Sn ... gas saturation phi ... porosity rho_\alpha ... density of phase alpha kr\alpha ... relative mobility of phase alpha, e.g. Brooks-Corey or just linear as in twophase.py mu\alpha ... viscosity of phase alpha pc = 0 ... no capillary pressure \vec{g}=(0,0,-g)=(0,0,0) ... no gravity K ... permeability My boundary conditions are Dirichlet for the right boundary and gas inflow at the bottom middle. 1) Regarding formulation of the problem: a) I would like to upwind krw, and krn, i.e. always take the upstream value. In the case of no capillarity and no gravity, I only look at pressure gradients, e.g. take krw_ij = krw_j if pw_j -pw_i >=0 = krw_i if pw_j -pw_i < 0 I had a look at the steady-state advection example, but I didn't manage to transfer it to my problem. b) I would like to include gravity. I tried g = interpolate(Expression("(0.0,0.0,-grav)"),DG2), but got a "Can't add expressions with different shapes, when doing dot(grad(pw)-rhow*g,grad(v)). 2) Regarding solvers: a) The linear solver always converges within 1 iteration to a residual of 0.0 (bcgs+hypre/boomeramg). That's quite weird. If I use a direct method (preonly+lu) I get NaNs. So, I guess, there is still something wrong. b) When the linear solver takes no step, than the nonlinear solver is happy with that and just converges. This leads to the point, where nothing happens at all. 3) Regarding output a) Can I deactivate the pyop2 INFO output? Thank you for your help! Henrik