GithubHelp home page GithubHelp logo

plosan / convection-diffusion-equations Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 62.28 MB

Numerical solution to the Convection-Diffusion Equations in Fluid Mechanics. Application to solve a diagonal flow and to solve the Smith-Hutton problem.

TeX 3.93% C++ 88.45% C 1.31% Gnuplot 4.40% MATLAB 1.73% Makefile 0.19%
cfd computational-fluid-dynamics fluid-mechanics gauss-seidel-method navier-stokes-equations partial-differential-equations transport-equation diagonal-flow smith-hutton-problem

convection-diffusion-equations's Introduction

Convection-Diffusion Equations (CDEs)

The equations

The convection--diffusion equations (CDEs) is a set of conservation laws, constituted by the continuity equation

and the general convection-diffusion equation (GCDE)

Here, is the density of the fluid, is the velocity field, is a scalar magnitude of the fluid (such as the temperature or the concentration of a pollutant), is the diffusion coefficient and is the source term. When is a vector magnitude (for instance the velocity field ), the equation is

where denotes the exterior product of two vectors.

Notice that the GCDE for a scalar magnitude is ''combination'' of the linear transport equation

and the diffusion/heat equation

Therefore it is expected that the solution to a boundary-value problem involving the GCDE, when it exists, shares properties with the solution to a linear transport problem and a diffusion problem.

Project outline

The project focuses on solving the CDEs numerically following a finite volume approach. The problems considered always take place in rectangular domains, hence a cartesian mesh is suitable in order to solve them. The report is structured in the following way:

  1. Introduction: brief summary of the project.
  2. Convection-diffusion equations: rigorous derivation of the CDEs.
  3. Numerical study of the convection-diffusion equations: discretization of the CDEs in a rectangular domain discretized by means of a cartesian mesh. The algorithm to solve a general transient problem is also given.
  4. Diagonal flow case: numerical solution to a CDEs steady state problem, taking place in a square domain with a flow in the diagonal diretion.
  5. Smith-Hutton case: numerical solution to a CDEs steady state problem, taking place in a rectangular domain with a ''circular'' flow.
  6. Appendices: quick reference for some facts in Measure Theory, Ordinary Differential Equations and Numerical resolution of linear systems.

A C++ code was developed in order to solve these problems numerically.

Hereinafter, , are known constants, and does not depend upon time. Under these hypothesis, the CDEs are

Diagonal flow case

Let be two given constants, and let be a fixed length giving the square domain . The velocity field is given by , with a known constant. The the CDE is

where is Péclet's number. Let and be two curves in and consider the function

The diagonal flow case problem is the following boundary-value problem:

Analytical study

The boundary-value problem is studied for two values of :

  • For , the previous boundary-value problem becomes a transport problem. The analytical solution is found via the method of characteristics. However, it is not a solution in the classical sense. The weak solution is not studied.
  • For , a second-order elliptic PDE is obtained. By means of energy methods in Sobolev spaces (explained in Chapter 6 of Lawrence C. Evan's excellent book ''Partial Differential Equations''), the existence of weak solution is proved, although it cannot be said whether it is unique or not. This solution turns out to be a function in .

Numerical study

For several values of Péclet's number in the range , the numerical solution is computed using the aforementioned C++ code.

Alt text

Alt text

Smith-Hutton case

Let be a fixed length and the domain . Take the velocity field given by

defined in . Consider the curves , and , which give a partition of . Now let be the function given by

The boundary-value problem for the steady state Smith-Hutton problem is

Hereinafter, we shall assume .

Velocity field

Smith-Hutton's problem velocity field studied, in particular, the existence and uniqueness of streamlines is proved. In addition, these lines are computed numerically for some initial conditions, yielding the following plot:

Alt text

Analytical solution

Since the value appears in the PDE, it seems reasonable to assume that the solution will depend on this constant:

  • For , the boundary-value problem turns into a transport-like problem. The characteristics of this problem are the streamlines found in the previous section. Due to the nature of these curves, the analytical solution is harder to find. The expression for this solution is given in terms of another function, although it is not proved whether it is unique. Nonetheless, it is demonstrated that if two classical solutions to the transport-like problem exist, then they must be equal.
  • For , a second-order elliptic PDE is obtained. The theory studied for the diagonal-flow case cannot be applied here (at least in a straightforward fashion), since on a Neumann boundary condition is prescribed (instead of a Dirichlet boundary condition).

Numerical solution

For several values in in the range , the numerical solution to the Smith-Hutton case is computed using the C++ code developed. Below some examples are shown:

Alt text

Alt text

Alt text

convection-diffusion-equations's People

Contributors

plosan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.