# Coupled reaction diffusion equations

**URL:** <https://community.freefem.org/t/coupled-reaction-diffusion-equations/1626>\
**Category:** General Discussion\
**Created:** [March 25, 2022, 11:40am UTC](https://community.freefem.org/t/coupled-reaction-diffusion-equations/1626 "2022-03-25T11:40:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbletry](https://avatars.discourse-cdn.com/v4/letter/m/3be4f8/32.png) [@mbletry](https://community.freefem.org/u/mbletry)\
**Post date:** [March 25, 2022, 11:40am UTC](https://community.freefem.org/t/coupled-reaction-diffusion-equations/1626/1 "2022-03-25T11:40:29Z")

</div>

Hello,  
I am still quite newbie and I am trying to implement a reaction diffusion model which writes:

\partial\_t u=D\_u\nabla^2 u +u-u^3-v+k

\tau\partial\_t v=D\_v\nabla^2 v +u-v

where I have to unknowns : u and v. I roughly know how to write a weak formulation for the diffusion of a single species, but I am quite lost on how to proceed for two species, with coupled PDE and how to implement that in freefem. Would anyone have recommendations on that topic ?

Have a great day,

Marc

---

<div class="post-metadata">

**Author:** ![cmd](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/cmd/32/67_2.png) [@cmd](https://community.freefem.org/u/cmd)\
**Post date:** [March 25, 2022, 1:13pm UTC](https://community.freefem.org/t/coupled-reaction-diffusion-equations/1626/2 "2022-03-25T13:13:13Z")

</div>

Hi,

See one of the examples for Navier-Stokes. Remove continuity/pressure and change the terms to match what is shown in your equations.

---

<div class="post-metadata">

**Author:** ![mbletry](https://avatars.discourse-cdn.com/v4/letter/m/3be4f8/32.png) [@mbletry](https://community.freefem.org/u/mbletry)\
**Post date:** [March 25, 2022, 1:20pm UTC](https://community.freefem.org/t/coupled-reaction-diffusion-equations/1626/3 "2022-03-25T13:20:18Z")

</div>

Hi Chris,

Thanks a lot for your indication - I am going to see what I can make out of it, based on my rather low level in math and freefem 😉 - don’t ask me why I have to teach something I don’t understand well myself…

---

<div class="post-metadata">

**Author:** ![okra](https://avatars.discourse-cdn.com/v4/letter/o/96bed5/32.png) [@okra](https://community.freefem.org/u/okra)\
**Post date:** [December 26, 2023, 8:11am UTC](https://community.freefem.org/t/coupled-reaction-diffusion-equations/1626/4 "2023-12-26T08:11:18Z")

</div>

Hi! I’m also trying to solve these kind equations, have you solved your problem now? 😜

---

<div class="post-metadata">

**Author:** ![marchywka](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@marchywka](https://community.freefem.org/u/marchywka)\
**Post date:** [January 1, 2024, 8:26pm UTC](https://community.freefem.org/t/coupled-reaction-diffusion-equations/1626/5 "2024-01-01T20:26:46Z")

</div>

If you want to learn in 1D, I have examples in FF and c++ that are rather simplistic  
and just meant to test mjmdatascope but for the right parameters you should be  
able to run these indepedent codes and get similar plots. I don’t remember  
but IIRC its backward Euler in c++ and maybe forward in FF fwiw.

[mjmdatascope](https://github.com/mmarchywka/mjmdatascope/tree/main/interfaces)
