f

#### Convective diffusion equation in 2D

```Hello all,

I'm trying to find a nice and neat way to numerically solve the
convective diffusion equation

da/dt = D (d^2/dx^2 + d^2/dy^2) a - v da/dx

where a is the concentration of my solute, D is the diffusion
constant, and v is the surrounding fluid velocity in the x direction.
I thought that there was a small chance that maybe someone else here
has attempted something similar.
Is it even possible to solve this equation? As always, any suggestions
would be much appreciated.

Cheers,
Dan

``` 0 8/3/2007 2:57:53 PM comp.soft-sys.matlab  211265 articles. 25 followers. 7 Replies 2238 Views Similar Articles

[PageSpeed] 22

``` dantimatter <dantimatter@gmail.com> wrote in message
>
> Hello all,
>
> I'm trying to find a nice and neat way to numerically
solve the
> convective diffusion equation
>
> da/dt = D (d^2/dx^2 + d^2/dy^2) a - v da/dx
>
> where a is the concentration of my solute, D is the
diffusion
> constant, and v is the surrounding fluid velocity in the
x direction.
> I thought that there was a small chance that maybe
someone else here
> has attempted something similar.
> Is it even possible to solve this equation? As always,
any suggestions
> would be much appreciated.
>
> Cheers,
> Dan
>

hi Dan,
yaa U can solve
actually I am also working on the same equations..
initially I solve the 1D by matlab, now engaged to solve
2D ... if u want to share some thing more plz feel free...
coz u engaged since long time
``` 0 12/14/2007 4:52:00 PM
```I just want to share few knowledge on solving this type of
equation:

- It's preferable to discretize time by implicite scheme for
stability, at least for the laplacian (diffusion) term.

- The convection term needs to be discretized by "up-wind"
scheme, that warrants also the stability and ensures the
solution to satisfy entropy condition. The up-wind is more
tricky to implement in 2D than in 1D.

Good luck,

Bruno
``` 0 12/14/2007 5:47:35 PM
``` dantimatter <dantimatter@gmail.com> wrote in message
>
> Hello all,
>
> I'm trying to find a nice and neat way to numerically
solve the
> convective diffusion equation
>
> da/dt = D (d^2/dx^2 + d^2/dy^2) a - v da/dx
>
> where a is the concentration of my solute, D is the diffusion
> constant, and v is the surrounding fluid velocity in the x
direction.
> I thought that there was a small chance that maybe someone
else here
> has attempted something similar.
> Is it even possible to solve this equation? As always, any
suggestions
> would be much appreciated.
>
> Cheers,
> Dan
>

My friend, you have just opened the third biggest can of
worms in classical physics (IMHO!).

Check the following link out. It's not matlab per-se, but
there are matlab import-export routines for the files. If
you know C++ (or are relatively fearless / have a bit of
time on your hands), it's a very efficient solver for pretty
much any PD Equation... I think one of the examples might
include a convection-diffusion setup. To give you an idea, I
didn't know C++, and it took me about a week to get up to
speed with this solver, using a C++ textbook as a guide.

Please note that it's a pretty specialised solver (spectral
domain, for efficiency) and there are a lot of similar
things out there on the web. Many of them will be simpler to
implement, although beware there is a minefield of badly
written code, too!

http://wissrech.ins.uni-bonn.de/research/projects/AWFD/

If you need some help setting it up, I may be able to offer
advice (or at least some really heavily commented code that
I've developed). Fire off an email to the address shown
(removing spam labels, of course)

Good luck!

Tom Clark

``` 0 12/17/2007 11:50:34 PM
``` dantimatter <dantimatter@gmail.com> wrote in message
>
> Hello all,
>
> I'm trying to find a nice and neat way to numerically
solve the
> convective diffusion equation
>
> da/dt = D (d^2/dx^2 + d^2/dy^2) a - v da/dx
>
> where a is the concentration of my solute, D is the diffusion
> constant, and v is the surrounding fluid velocity in the x
direction.
> I thought that there was a small chance that maybe someone
else here
> has attempted something similar.
> Is it even possible to solve this equation? As always, any
suggestions
> would be much appreciated.
>
> Cheers,
> Dan
>

My friend, you have just opened the third biggest can of
worms in classical physics (IMHO!).

Check the following link out. It's not matlab per-se, but
there are matlab import-export routines for the files. If
you know C++ (or are relatively fearless / have a bit of
time on your hands), it's a very efficient solver for pretty
much any PD Equation... I think one of the examples might
include a convection-diffusion setup. To give you an idea, I
didn't know C++, and it took me about a week to get up to
speed with this solver, using a C++ textbook as a guide.

Please note that it's a pretty specialised solver (spectral
domain, for efficiency) and there are a lot of similar
things out there on the web. Many of them will be simpler to
implement, although beware there is a minefield of badly
written code, too!

http://wissrech.ins.uni-bonn.de/research/projects/AWFD/

If you need some help setting it up, I may be able to offer
advice (or at least some really heavily commented code that
I've developed). Fire off an email to the address shown
(removing spam labels, of course)

Good luck!

Tom Clark

``` 0 12/17/2007 11:50:40 PM
``` dantimatter <dantimatter@gmail.com> wrote in message
>
> Hello all,
>
> I'm trying to find a nice and neat way to numerically
solve the
> convective diffusion equation
>
> da/dt = D (d^2/dx^2 + d^2/dy^2) a - v da/dx
>
> where a is the concentration of my solute, D is the diffusion
> constant, and v is the surrounding fluid velocity in the x
direction.
> I thought that there was a small chance that maybe someone
else here
> has attempted something similar.
> Is it even possible to solve this equation? As always, any
suggestions
> would be much appreciated.
>
> Cheers,
> Dan
>

My friend, you have just opened the fourth biggest can of
worms in classical physics (IMHO!).

Check the following link out. It's not matlab per-se, but
there are matlab import-export routines for the files. If
you know C++ (or are relatively fearless / have a bit of
time on your hands), it's a very efficient solver for pretty
much any PD Equation... I think one of the examples might
include a convection-diffusion setup. To give you an idea, I
didn't know C++, and it took me about a week to get up to
speed with this solver, using a C++ textbook as a guide.

Please note that it's a pretty specialised solver (spectral
domain, for efficiency) and there are a lot of similar
things out there on the web. Many of them will be simpler to
implement, although beware there is a minefield of badly
written code, too!

http://wissrech.ins.uni-bonn.de/research/projects/AWFD/

If you need some help setting it up, I may be able to offer
advice (or at least some really heavily commented code that
I've developed). Fire off an email to the address shown
(removing spam labels, of course)

Good luck!

Tom Clark

``` 0 12/17/2007 11:55:16 PM
``` Hi dan

im just see this forum.
im also will use this equation. Someone advice me to use
Fortran to run this kind of equation. Now im still trying
to solve this equation.
have u solve this equation? now, im still use 1D equation,
after this i will use 2D. may i share experience with u?

thank you
Regards

``` 0 12/18/2007 1:34:25 AM
```Hi

I am solving a 2D convection diffusion equation using Finite Volume method by writing my own codes. Further may I know whether there are any source codes available to solve these equations. I saw this link

http://wissrech.ins.uni-bonn.de/research/projects/AWFD/UsersGuide/AWFD/index.html

and found that its only for finite difference schemes. May I know where we can get source codes for these equations using Finite volume methods. (Either C, C++ or Matlab language codes(Matlab will have memory problem though)).

Kindly do the needful help.

With Regards

Vishal
``` 0 9/28/2008 10:36:02 PM