how i can program the following function of (convection-convection) in matlab??

hello friends,
i would like to program the following equation of adviction_ convection in Matlab, could anyone help me and give me some advices about how i can do that.
Thank you for your help

6 Comments

Please show the original equation (before discretization).
Or tell us what the indices i, k, L_i, t_i mean.
Best wishes
Torsten.
hello dear friend Torsten,
thank you for your answer,
this is a simplified mass balance equation (attached a picture of the original equation). The letter “i” is used to denote position, and the letter “k” is used for the time variable. DL:longitudinal dispersion coefficient, W: sources of pollution or sinks,C: concentration of a variable; At: area of the flow section.
thank you for your help
And you are not allowed to use MATLAB's "pdepe" function to solve this partial differential equation ?
Best wishes
Torsten.
Hello Torsten,
i dont know how to use "pdepe" fuction.
could you please give me some ideas about how to use this function.
Best wishes
Here is the documentation:
https://de.mathworks.com/help/matlab/ref/pdepe.html
Your problem is a standard problem for pdepe. You should be able to manage the setup following the examples given in the link.
Best wishes
Torsten.
Dear friend Torsten,
i used the Function of pdepe to solve my equation but it does not work,
could you please take a look to the code that i write.(attached matlab file).
Best regards
Karaoui

Sign in to comment.

 Accepted Answer

With the FEATool Multiphysics Matlab FEM Toolbox you can enter your own custom equations and PDE with an easy syntax (similar to how PDEs are written on paper).
It is not quote clear exactly how your equation looks like, but you could start with a convection and diffusion equation in the GUI and the press the Edit Eqn button to modify the PDE to what you really want. Afterwards you can also save the model as a m-file script and see how the fea model is defined.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!