March 15, 2015

2D Transport of a Passive Scalar with OpenFOAM

15.3.15 Posted by Florin 1 comment
All the posts that have been written until now tackled the shockTube problem and the 1D transport problem; we've seen the convection and diffusion at work and we saw that there are a lot different schemes for divergences modelling.
In the following I will show the setup and results for 2D scalar transport problem. This was actually the first problem that I setup and solved from scratch on my own in OpenFOAM.
This may not be a physical problem but it has all the components of an actual CFD problem solved in OpenFOAM.
Problem statement:
- a 2D domain in a shape of a square with the side of 10 m;
- in the middle of the square we have a circle of radius 1 m;


- the square has an initial scalar set to zero and the circle has the scalar set to 1;
- the circle is moving in the domain in the manner shown below:
- each move will take 4 seconds and the velocity for each move is 1 m/s;
- during this transport convection and diffusion terms are active;

Solving in OpenFOAM is really straight and I will point out only the things that worth mention:
- the mesh dictionary is much like the one from cavity tutorial but needs some changes at the boundary definition:
- secondly, the setFields dictionary must be changed in order to set the scalar to be 1 in a circular area:
- the analysis is run for 4 seconds with a velocity (1 0 0); afterwards, the velocity is changed to (0 1 0) and the analysis is started from second 4 for another 4 seconds; in the last section the velocity will be (-1 -1 0).

The initial step is given in the following:
All results can be seen in the following tables:
The evolution of the solution can be seen in the following video:

This is it, if you have any questions please leave a comment below.





1 comment:

  1. Hi Gheorghe,
    I would like to ask you a question about the solver sTF.
    If I insert a point source use fvOptions. what is the unit of measure with which to read the concentration of the tracer in the computational domain in paraview (kgT/kg_air, mg/m3, ppm)?
    In fvOptions the flow rate is expressed in kg/s.
    Hello, I would like to ask you a question about the solver
    if I insert a point source emitting with fvOptions. what is the unit of measure with which to read the concentration of the tracer in the computational domain.
    In fvOptions the flow rate is expressed in kg/s.
    Thank you very much.
    Marc

    ReplyDelete