This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Implement 4 unknown field variables

+2 votes

Hello,

I am working on a mechanical model of an effusion-cooled rocket thrust chamber.
I have four unknown variables(the solid displacement, the gas pressure and the temperature fields) and thus I have to solve a system with four equations (with their weak formulations).
However I am new in FENICS, by reading the FENICS book and completing the tutorial, I have by now succeed in creating my mesh, define all my boundary conditions and define the numerous constants and parameters used in the weak formulations.
But now I jam to create my solver algorithm.
The weak forms are completely non-linear, and they also contain terms with the time derivatives of the primary variables.

I have tried to use the Newton solver, but all the examples available only consider one trial function, so I don't know how to apply it with four trial functions!
For the time derivatives, I have used the "backward_euler" definition for the pressure and the temperatures, but I can't use it for the displacement so I get another problem with that.

By the way, is it possible to solve a problem with four variables and four weak forms? (four trial functions)
And if it is, what would be the best tool to deal with?

Thank you in advance for any time and effort you will take in looking at my question.

Remi

asked Jul 5, 2013 by Kheldarion FEniCS Novice (230 points)

1 Answer

+1 vote
 
Best answer

You have two principal options:

  • solve fully coupled problem. There are examples of using Newton solver for mixed problems see cahn-hilliard and adaptive-navier-stokes demos.

  • solve equations separately and optionally enforce coupling by involving some iterative procedure. Generally this approach may involve some special steps like projection step for Navier-Stokes problem (see navier-stokes demo).

For parabolic problems using the first approach with backward-Euler time discretization and LU solver may be quite robust way to start off.

answered Jul 5, 2013 by Jan Blechta FEniCS Expert (51,420 points)
selected Jul 9, 2013 by johanhake

Thank you very much for your answer, I think that solve the fully coupled problem will be the best option. The cahn-hilliard demo is indeed a good basis, I will try to apply the solver to my problem and see if it works.
Thank you for your help.

...