# Convection diffusion equation solve in a rectangular domain

**URL:** <https://community.wolfram.com/t/convection-diffusion-equation-solve-in-a-rectangular-domain/24804>\
**Category:** Questions\
**Tags:** engineering, algebra, equation-solving, graphics-and-visualization, numerical-computation\
**Created:** [November 21, 2024, 3:21am UTC](https://community.wolfram.com/t/convection-diffusion-equation-solve-in-a-rectangular-domain/24804 "2024-11-21T03:21:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohammadyeasin](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@mohammadyeasin](https://community.wolfram.com/u/mohammadyeasin)\
**Post date:** [November 21, 2024, 3:21am UTC](https://community.wolfram.com/t/convection-diffusion-equation-solve-in-a-rectangular-domain/24804/1 "2024-11-21T03:21:47Z")

</div>

I am trying to solve convection diffusion equation in a rectangular domain with some hole inside. The periphery of these hole are applied to no slip boundary condition.  
The flow has been initiated as a constant flow from a narrow inlet. Due to concentration gradient this could provide a flow pattern. **But I am getting same contour plot for every time step.** What is wrong about my code here? It would be very helpful for me if I can get any guidance from you.

[Open in Wolfram Cloud ↗](https://www.wolframcloud.com/obj/4162317e-168d-491a-a2ac-f11b73f82137)

---

<div class="post-metadata">

**Author:** ![henrikschachner](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/henrikschachner/32/32119_2.png) [@henrikschachner](https://community.wolfram.com/u/henrikschachner)\
**Post date:** [November 21, 2024, 9:20am UTC](https://community.wolfram.com/t/convection-diffusion-equation-solve-in-a-rectangular-domain/24804/2 "2024-11-21T09:20:45Z")

</div>

> … But I am getting same contour plot for every time step.

Not quite the same, but similar. If a logarithmic scaling is used, the differences become more visible:

```
prnt = ContourPlot[cfun[#, x, y], {x, -1, 1}, {y, -1, 1}, 
     ColorFunction -> "Rainbow", Contours -> 10, 
     RegionFunction -> (RegionMember[\[CapitalOmega], {#1, #2}] &), 
     PlotRange -> Automatic, 
     ScalingFunctions -> "Log"] & /@ {.1, .2, .3};
GraphicsRow[prnt, Spacings -> -15, ImageSize -> 800]

```

 ![diffusion.png](https://global.discourse-cdn.com/wolfram/original/2X/8/8f838d29b565628e174dc3690c17d16e01602887.png)
