Solving system of two equations, couple or not to couple

24 days ago by

The first equation is the conservation of the vapor due to diffusion within a packed adsorbent.
The second equation is energy conservation within a packed adsorbent. (neglecting contributions from advection)

I purchased "Solving PDEs in Python: The FEniCS Tutorial I" and have worked through the examples. I am looking for guidance from 20,000 feet. My big question is which published examples should I rework for my equations. I can make things work in small chunks but I am struggle to know which big direction to take. For examples should I be coupling these equations or solving them separately? Can I rework the example of "A system of advection-diffusion-reaction equations" on page 73 of the tutorial? Or should I be manipulating the Navier Stokes equations on page 56. I know I have to make significant changes but which direction should I go?

I am an undergraduate chemical engineering student who has completed coursework in Fluid Mechanics, Mass and Heat Transfer, Thermodynamics, the required calculus, etc.

I am sorry for the basic nature of this question. I have been stuck for a long time now and don't know where I can get help on this. In the very least can someone point me to a forum or a group of individuals who would be willing to assist? I am simply looking for direction, I don't want anyone to do this for me.


Community: FEniCS Project

1 Answer

24 days ago by
Hey Evan,

Your question is a good one.  It shouldn't matter which of the equations you decide to rework.  What is important is setting up the weak form and the time integration scheme correctly.

To do this, I would rewrite your equations as semidiscrete equations e.g.
$\rho c_p\frac{\partial T}{\partial t}-\nabla\cdot k\nabla T\approx\rho c_p\frac{T^{i+1}-T^i}{\Delta t}-\nabla\cdot k\nabla\left(\alpha T^{i+1}+\left(1-\alpha\right)T^i\right)$ρcpTt ·kTρcpTi+1TiΔt ·k(αTi+1+(1α)Ti)

The weak form is then given by
  $\int\rho c_p\frac{T^{i+1}-T^i}{\Delta T}R+k\nabla\left(\alpha T^{i+1}+\left(1-\alpha\right)T^i\right)\cdot\nabla R\mathrm{d}V-\int kR\nabla\left(\alpha T^{i+1}+\left(1-\alpha\right)T^i\right)\mathrm{d}S=0$ρcpTi+1TiΔT R+k(αTi+1+(1α)Ti)·RdVkR(αTi+1+(1α)Ti)dS=0  

Since these are both parabolic equations, I would suggest using a Crank-Nicolson which chooses alpha = 1/2.

In general, strong coupling (solving both sets of the equations) is preferable to weak coupling (solving one then the other) although there are always exceptions.

You should start by solving just one of the equations and making sure it is working properly before adding in the second equation.
Hey Peter,

I have been reading "The Finite Element Method" by Hughes, in addition I also purchased "Automated Solution of Differential Equations by the Finite Element Method." I also have continued to read online and I am really struggling with the weak form conversion. If it is not too much trouble could you complete the weak form for both equations not neglecting advection?
written 15 days ago by Evan Gildernew  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »