next up previous contents
Next: Specifying heat flux Up: Specifying boundary conditions Previous: Open or stage-specified boundary   Contents

No-slip boundary conditions

No-slip boundary conditions in the plane XZ are specified via type 4 boundary conditions in edges.dat. Setting CdT=-1 and CdB=-1 within suntans.dat specifies no-slip boundary conditions for the top and bottom of the domain within the plane XY. As an example, consider the testXZ case in suntans/main/examples/cavity. The parameter file suntans/main/examples/cavity/rundata/suntansXZ.dat has

CdT                -1   # Drag coefficient at surface
CdB                -1   # Drag coefficient at bottom
and the function BoundaryVelocities() in suntans/main/examples/cavity/boundariesXZ.c has
  for(jptr=grid->edgedist[4];jptr<grid->edgedist[5];jptr++) {
    
    j = grid->edgep[jptr];
    ib=grid->grad[2*j];
    boundary_index = jptr-grid->edgedist[2];
    
    for(k=grid->ctop[ib];k<grid->Nk[ib];k++) {
      if(grid->xe[j]<0.5) 
        phys->boundary_w[boundary_index][k]= -1.0;
      else
        phys->boundary_w[boundary_index][k]=0.0;
      phys->boundary_v[boundary_index][k] = 0.0;
      phys->boundary_u[boundary_index][k] = 0;
    }
  }
where the no-slip boundary condition is applied on the west side of the boundary directed downward via phys->boundary_w[boundary_index]= -1.0 for edges with markers jptr in [grid->edgedist[4]grid->edgedist[5]).



2014-08-06