Simulation of coupled partial differential equation using MATLAB.

I am trying to simulate a model for cake baking using a coupled mass and heat transfer system. The equations are as given in the attachment.
I need to find out profile for Temperature and moisture content(X). Please suggest a method which I can use. If you have any code which can be used, it would be of great help if you can give me that too.

 Akzeptierte Antwort

Bill Greene
Bill Greene am 16 Jun. 2014

0 Stimmen

I took a look at your attachment and think I understand most, but not all, of the problem you are trying to solve (I don't understand the convection term in the PDE, for example).
My first thought was that you could use the pdepe function because it appears you have only one spatial variable, x. However, you have a non-diagonal "mass" matrix which pdepe can not handle.
I think that PDE Toolbox,
can probably solve this. You might want to start with this example:
Bill

11 Kommentare

Thank you for looking into my problem.
The convective term you have mentioned is due to heat input from the sides of the cylinder.
As for your suggestion to use the PDE toolbox, I haven't used it yet, but for the simulation using toolbox can I define the coefficients such as density, thermal conductivity etc in terms of the variables I am calculating and wrt time?
I think I was a bit too hasty in dismissing the pdepe function. If you substitute equation 2 into 1 you can get two equations with a diagonal mass matrix. So I would first take a look at pdepe.
With both pdepe and PDE Toolbox, the coefficients can be functions of the independent variables, the dependent variables, and time.
As far as your convection term that appears in the pde, that term will apply to every point in the volume, not just sides. Perhaps your problem is actually 2D and you need to apply this convection as a BC? (If so, you should look at PDE Toolbox.)
Bill
The problem which I am facing while using pdepe function is that when I substitute we 2 into 1, I get D/Dx{kDt/dx+D*dX/dx}, thus my function 'f' gets changed, which I cannot accommodate for in the boundary condition.
BC is only givenby dT/dx which cannot be expressed in the above form as f=kDt/dx+D*dX/dx. That is why I rejected pdepe although I had coded initially using that only.
My problem is a 1D problem wrt space, I am assuming variation only along the z direction, assuming no variation along r. That is why during energy balance using a disc of thickness dx at a height x above the bottom, the heat coming in from the sides is represented by the convective term.
Aditya Banerji
Aditya Banerji am 17 Jun. 2014
Bearbeitet: Aditya Banerji am 17 Jun. 2014
Currently I have been working using the implicit method for solving my system. Do you have any suggestions/comments regarding that?
Also it would be of great help if you can forward me an example of solving PDE with coefficients function of dependent variables using the toolbox. An example I believe make the problem clear for me.
I would encourage you take another look at pdepe. Yes, you are correct that the first component of the flux vector is more complicated (essentially what you show above). And yes, you have to take this into account when writing your boundary conditions. The first component of the p vector becomes a linear combination of the BCs you show in your attachment. By taking this linear combination of the BC terms, you can arrange the terms into the form pdepe expects. The second component of p is just the X-variable BC you show.
Bill
I am not able to understand what you are suggesting. Could you elaborate please?
OK, here are the steps:
  1. Rewrite your two pde as we have discussed so they match the pdepe format.
  2. Find f(i) (as defined by pdepe) for each pde.
  3. Substitute your BC eqns into each f(i) at x=0 and x=H so that you have 4 equations of the form "something" + f(i) = 0.
  4. The "something" is the required p(i) with q(i) = one.
Got it. Thank you a lot..
I implemented the code as you had suggested and it is working. I had a further question which I posted here, http://www.mathworks.com/matlabcentral/answers/136368-modification-in-the-terms-of-pdepe-function. Can you kindly look into this question too.
Bosnian Kingdom
Bosnian Kingdom am 2 Jun. 2019
Bearbeitet: Bosnian Kingdom am 2 Jun. 2019
Hello, can you post your code here, or can you send me on private massage or e-mail. I really need example of solution two or more partial differential equation? I am working on phd thesis and I stucked witl solving partial differential equations.
Thanks in advance.
Hello @Bosnian Kingdom, were you able to solve what you were doing? I am working on a problem that requires solving two partial differential equations, can you help me understand how should I do that?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by