Next: Data structures Up: Navcalc and Navcalcmpi Previous: Parallelization issues   Contents

# Implementational details

In this section a quick overview of the general structure and the most important aspects of the implementation are given. For a detailed documentation of the code please refer to the reference manual.

The main loop of the program reads:
 1    SetObstacleCond(0,0);
2    Par->CommMatrix(U, 1, 0, 0, UCOMM);
3    Par->CommMatrix(V, 0, 1, 0, VCOMM);
4    Par->CommMatrix(W, 0, 0, 1, WCOMM);
5    S.delt=TimeStep();
6    do {
7        CompFGH();
8        CompRHS();
9        res=Poisson();
11        SetObstacleCond(0,0);
12        Par->CommMatrix(U, 1, 0, 0, UCOMM);
13        Par->CommMatrix(V, 0, 1, 0, VCOMM);
14        Par->CommMatrix(W, 0, 0, 1, WCOMM);
15        S.delt=TimeStep();
16        if (S.CompTemp==TRUE) {
17            CompTG(T,S.alphatg,S.nu/S.prandtl);
18            Par->CommMatrix(T, 0, 0, 0, TCOMM);
19        }
20        if (S.CompChem==TRUE) {
21            int n;
22            for (n=0; n<S.nchem; n++) {
23                CompTG(CH[n],S.alphatg,S.chemc[n]);
24                Par->CommMatrix(CH[n], 0, 0, 0, CHCOMM+n);
25            }
26        }
27        S.t+=S.delt;
28        n++;
29    } while (S.Tfin < 0);

In lines 1 to 5, a first initialization of boundary values is set and the initial size of the time steps is computed. In line 7, is computed, in the next line , see (). In line 9, equation () is solved and the new velocity values are computed in line 10 according to (). In lines 11 to 14, boundary conditions are set and velocities are exchanged. From the new velocities, the size of the next time step is calculated in line 15 and in line 16 to 26 optional transport equations are solved. The following list shows where the most important classes can be found.

 class file Scene typen.hpp ParParams parallel.hpp Navier navier.hpp NavierCalc navier.hpp Matrix matrix.hpp List list.hpp list objects typen.hpp

Subsections

Next: Data structures Up: Navcalc and Navcalcmpi Previous: Parallelization issues   Contents
Martin Engel 2004-03-15