4

I have three partial differential equations (PDEs) and an analytical solution for a variable as shown. Using these equations I want to solve for \phi(x,y,t), p(x,y,t), C_{a}(x,y,t) and C_{b}(x,y,t) i.e. in terms of space and time.

I know there is a function pdepe( ) in Matlab to solve initial-boundary value problems for parabolic-elliptic PDEs in 1-D. I would like to know how this function or some other in Matlab can be used to solve the problem described below which is 2-D and coupled.

PROBLEM:

Following two equations represent PDEs for two species a and b, respectively: enter image description here

Where D_{h} and q are given as:

enter image description here

enter image description here

Here, R_{a}=R_{b}=R, where R is given as:

enter image description here

Finally, the last equation is given as:

enter image description here

INITIAL AND BOUNDARY CONDITIONS:

enter image description here

Total domain size is 10 cm x 5 cm and the width of the y-shaped subdomain is 0.5 cm. This subdomain has an initial \phi of 0.50 while in the surrounding matrix \phi= 0.26. Constant p of 1 Pa and 0 Pa are maintained at boundaries (1) and (2) respectively, corresponding to a gradient of approximately 10^-3 m m^-1. The p on boundaries (3) and (4) are determined by linear gradients between boundaries (1) and (2). Constant C of C_{a} = 2 mol m^-3 and C_{b} = 0.2302 mol m^-3 are maintained at boundary (3), while the concentrations at boundary (4) are set at C_{a} = 1 mol m^-3 and C_{b} = 0.4603 mol m^-3. The concentrations at boundary (1) are determined by constant gradients between boundaries (3) and (4), while an advective flux boundary condition $$(\frac{\partial C}{\partial x} = 0)$$ is set at the outlet at (2).

  • Leaving a comment on my answer would have been nice... – Rody Oldenhuis Oct 25 '12 at 06:10
  • Hi Rody: I voted down your answer because I think (and I hope you too) that it was a comment and not an answer. I will keep in mind from next time to let you know by leaving a comment. Sorry about that for this time. –  Oct 26 '12 at 00:20
  • I don't not know what you know. Suggesting `pdepe` could have been the solution to your problem, hence it's an answer. That you then later re-formulate the question to include the fact that you know it exists but just don't know how to use it, well...that's quite essential information. So: what have you tried with this function? – Rody Oldenhuis Oct 26 '12 at 08:24
  • My equation has 2D space dimensions in addition to temporal dimension. Function `pdepe` allows to solve for PDE which is 1D in space and with temporal dimension. Hope that helps you in knowing why I could not use `pdepe`. –  Oct 26 '12 at 16:06

2 Answers2

2

This should be possible to implement in the FEATool Matlab FEM Toolbox. As 2D (as well as 1D and 3D) convection-diffusion-reaction PDE equations are already pre-defined and easy to couple, you would only need to input your diffusion, convection, and source terms. Although your exact problem isn't available as a tutorial, some of the other convection-diffusion example models might be a good starting point. (Also sorry for not being able to comment.)

1

Do you have the PDE toolbox?

If yes: pdetool appears to be the way to go (I don't have it, so I can't verify or experiment with any of it -- you'll have to do some experimenting there yourself).

If no: you might find this or this worth investigating. These are basically implementations of FDM for the 2D wave equations. You can take their kernels and transform them into a means to solve for coupled equations.

Perhaps easier: take a look here; it's a pretty decent FEM toolkit which can be used with Matlab.

Community
  • 1
  • 1
Rody Oldenhuis
  • 37,726
  • 7
  • 50
  • 96
  • Thanks Rody. I haven't checked yet, but will do once I get time. Links seem useful for my problem! –  Oct 29 '12 at 15:33