#include "utilf.h"#include "stypes.h"#include "markers.h"#include "extra.h"#include "extra1.h"#include "make_bc.h"#include "make_bc_periodic.h"#include "inout.h"Include dependency graph for make_bc.c:

Go to the source code of this file.
Functions | |
| void | bc_vector_bound (real2D u, real2D v, int nx, int ny) |
| void | bc_vector_div (real2D u, real2D v, real2D ap, interface in, int nx, int ny) |
| void | bc_pressure_inside (real2D p, real2D ap, int nx, int ny) |
| void | bc_pressure (real2D p, real2D ap, real pe, real R, int nx, int ny) |
| void | bc_scalar (real2D scal, int nx, int ny, char sw) |
| int | bc_xcoord (int i, int nx) |
| int | bc_ycoord (int j, int ny) |
|
||||||||||||||||||||||||||||
|
Definition at line 97 of file make_bc.c. References bc_pressure_inside(), bc_scalar(), NULGRAD, real, and real2D.
00100 {
00101 bc_pressure_inside(p, ap, nx, ny);
00102 bc_scalar(p, nx, ny, NULGRAD);
00103 }
|
|
||||||||||||||||||||
|
Definition at line 86 of file make_bc.c.
00087 {
00088 int i, j;
00089
00090 for (i = 2; i < nx; i++)
00091 for (j = 2; j < ny; j++)
00092 if (!INP(i,j))
00093 p[i][j] = 0.0;
00094 }
|
|
||||||||||||||||||||
|
Definition at line 106 of file make_bc.c. References NUL, NULGRAD, NULGRAD2, and real2D.
00107 {
00108 int i, j;
00109
00110 /* div: gradient equal to zero on y=0,1 planes */
00111 switch(sw) {
00112 case NULGRAD: case NULGRAD2:
00113 for (i = 1; i <= nx; i++) {
00114 scal[i][1] = scal[i][2]; /* axisymmetric */
00115 scal[i][ny] = scal[i][ny - 1];
00116 }
00117 for (j = 1; j <= ny; j++) {
00118 scal[1][j] = scal[2][j];
00119 scal[nx][j] = scal[nx-1][j];
00120 }
00121 break;
00122 case NUL:
00123 /* residue equal to zero on the walls */
00124 for (i = 1; i <= nx; i++) {
00125 scal[i][1] = 0.0; /* axisymmetric */
00126 scal[i][ny] = 0.0;
00127 }
00128 for (j = 1; j <= ny; j++)
00129 scal[1][j] = scal[nx][j] = 0.0;
00130 break;
00131 default:
00132 printf("illegal switch value for a scalar field\n");
00133 exit(1);
00134 }
00135 }
|
|
||||||||||||||||||||
|
Definition at line 21 of file make_bc.c. References real2D.
00022 {
00023 int i, j;
00024 /* top and bottom walls */
00025 for (i = 1; i <= nx; i++) {
00026 u[i][1] = u[i][2]; /* axisymmetric */
00027 v[i][2] = 0.0; /* axisymmetric */
00028 u[i][ny] = u[i][ny-1];
00029 v[i][ny] = 0.0;
00030 }
00031 /* left and right walls */
00032 for (j = 1; j <= ny; j++) {
00033 u[2][j] = 0.0;
00034 v[1][j] = v[2][j];
00035 u[nx][j] = 0.0;
00036 v[nx][j] = v[nx-1][j];
00037 }
00038 #ifdef CENTRAL_SYMMETRY
00039 i = nx/2 + 1;
00040 for (j = 1; j <= ny; j++)
00041 u[i][j] = 0.0;
00042 #endif
00043 }
|
|
||||||||||||||||||||||||||||
|
Definition at line 46 of file make_bc.c. References bc_vector_bound(), BU, BV, extra_velocity(), INU, INV, real, real2D, and UNDEFINED.
00049 {
00050 int i, j;
00051 real eu, ev;
00052
00053 /* extrapolate the interfacial cells */
00054 for (i = 3; i < nx - 1; i++) { /* don't solve the first and last columns */
00055 for (j = 2; j < ny; j++)
00056 if (!INU(i,j) && BU(i,j)) {
00057 #ifdef EXTRA_LINEAR
00058 extra_velocity((real)i, (real)j + 0.5, u, v, ap, in,
00059 &eu, &ev, nx, ny);
00060 #else
00061 extra_velocity2((real)i, (real)j + 0.5, u, v, ap, in,
00062 &eu, &ev, nx, ny);
00063 #endif
00064 u[i][j] = eu;
00065 }
00066 else if (!INU(i,j))
00067 u[i][j] = UNDEFINED;
00068 for (j = 3; j < ny; j++)
00069 if (!INV(i,j) && BV(i,j)) {
00070 #ifdef EXTRA_LINEAR
00071 extra_velocity((real)i + 0.5, (real)j, u, v, ap, in,
00072 &eu, &ev, nx, ny);
00073 #else
00074 extra_velocity2((real)i + 0.5, (real)j, u, v, ap, in,
00075 &eu, &ev, nx, ny);
00076 #endif
00077 v[i][j] = ev;
00078 }
00079 else if (!INV(i,j))
00080 v[i][j] = UNDEFINED;
00081 }
00082 bc_vector_bound(u, v, nx, ny);
00083 }
|
|
||||||||||||
|
Definition at line 138 of file make_bc.c.
00139 {
00140 /* mirror symmetric boundary conditions */
00141 if (i <= 1)
00142 return 3 - i;
00143 if (i >= nx)
00144 return 2*nx - i - 1;
00145 return i;
00146 }
|
|
||||||||||||
|
Definition at line 149 of file make_bc.c.
00150 {
00151 /* mirror symmetric boundary conditions */
00152 if (j <= 1)
00153 return 3 - j;
00154 if (j >= ny)
00155 return 2*ny - j - 1;
00156 return j;
00157 }
|
1.2.18