peb11k.oudf 752 Bytes
Newer Older
ylan's avatar
ylan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
// Boundary conditions
/* wall 1, inflow 2, outflow 3, x-slip 4, y-slip 5, z-slip 6 */
void insVelocityDirichletConditions3D(bcData *bc)
{                                                                        
  bc->uP = 0.0;
  bc->vP = 0.0;
  bc->wP = 1.0;
}

void insVelocityNeumannConditions3D(bcData *bc)
{
}

void cdsDirichletConditions3D(bcData *bc)
{
  bc->sP = 0.0;
}
void cdsNeumannConditions3D(bcData *bc)
{
  bc->sF = 1.0;
}

// Stabilized outflow (Dong et al)
void insPressureDirichletConditions3D(bcData *bc)
{
  const dfloat iU0delta = 10.0;
  const dfloat un = bc->uM*bc->nx + bc->vM*bc->ny + bc->wM*bc->nz;
  const dfloat s0 = 0.5 * (1.0 - tanh(un*iU0delta)); 
  bc->pP = -0.5 * (bc->uM*bc->uM + bc->vM*bc->vM + bc->wM*bc->wM) * s0;
}