#include "utilf.h"
#include "stypes.h"
#include "stresses.h"
Include dependency graph for stresses.c:
Go to the source code of this file.
Functions | |
void | viscous_tensor (real2D u, real2D v, real2D S11, real2D S22, real2D S12, real visliq, real tau, int nx, int ny) |
|
Definition at line 6 of file stresses.c. Referenced by timestep().
00010 { 00011 int i, j; 00012 real h = 1.0 / (nx - 2); 00013 00014 visliq *= tau / (h * h); 00015 for (i = 1; i <= nx; i++) 00016 for (j = 2; j < ny; j++) 00017 S11[i][j] = 2.*visliq*(u[i+1][j] - u[i][j]); 00018 for (i = 2; i < nx; i++) 00019 for (j = 2; j <= ny; j++) 00020 S22[i][j] = 2.*visliq*(v[i][j+1] - v[i][j]); 00021 for (i = 2; i <= nx; i++) 00022 for (j = 2; j <= ny; j++) 00023 S12[i][j] = visliq*(u[i][j] - u[i][j-1] + v[i][j] - v[i-1][j]); 00024 } |