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

Help : A system of advection–diffusion–reaction equations thas is possibile to introduce Runge khuta discretization ?

0 votes

i read the fenics tutorial but i dont want to do discretization in time not with he back-
ward Euler method but with runge khuta 4th, but i don't know how to introduise it in variationnel form

thanks for help

forgive me for mystake i'am a french speaker but i try to write in english

asked Apr 4, 2017 by Salomon FEniCS Novice (240 points)

2 Answers

+1 vote
 
Best answer

There is a library you can use with fenics called Gryphon:
https://bitbucket.org/knutesk/gryphonproject

That can do this for you, as well as other examples programmed by hand:
https://fenicsproject.org/qa/2788/options-available-fenics-solving-dependent-problems-method

Based on my understanding of variational forms (which isn't much at the moment), one can discretize the time dependent terms first, with variables at different time steps and then use the same variational form for the space dependent terms.

You just need to use more variables (ex. u_1, u_2, u_3, etc) and the right Runge-Kutta coefficients:
https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods

And the right number and ordering of assign() calls:

u_n.assign(u)

Like they use for the backward Euler method here:
https://fenicsproject.org/pub/tutorial/html/._ftut1010.html#ftut1:reactionsystem

answered Apr 24, 2017 by alexmm FEniCS User (4,240 points)
selected Apr 26, 2017 by Salomon

thanks for answers but Gryphon code don't work on my dolfin 2016.2 and your second idea don't work

0 votes

need help please

answered Apr 24, 2017 by Salomon FEniCS Novice (240 points)
...