- Boundary fluxes
Because the velocity components at the southern boundary are specified, the incoming boundary
flux is computed in
OpenBoundaryFluxes using the velocity components specified in the BoundaryVelocities function,
but only within the extent of the 300 m wide river, which is defined for
m (4 cell faces), as in:
if(grid->xv[ib]>900&&grid->xv[ib]<1200)
for(k=grid->etop[j];k<grid->Nke[j];k++)
ub[j][k]=
phys->boundary_u[jptr-grid->edgedist[2]][k]*grid->n1[j]+
phys->boundary_v[jptr-grid->edgedist[2]][k]*grid->n2[j];
Since boundary_u and boundary_v store the inflow velocity components, then this
is setting the flux at the inflow to the normal component of the velocity at the inflow, i.e.
where
is, by convention, the inward pointing normal at the boundary face.
- Boundary velocities
The north-south velocity is specified at the inflow for
over a specified depth,
which represents the river inflow, such that
where amp is specified in suntans.dat as
m s
, and
m is the inflow depth. In boundaries.c, this inflow is implemented with
if(grid->xv[ib]>900 && grid->xv[ib]<1200) {
z=0;
for(k=grid->etop[j];k<grid->Nke[j];k++) {
z-=0.5*grid->dzz[ib][k];
if(z>-3.0)
phys->boundary_v[jptr-grid->edgedist[2]][k]=prop->amp;
z-=0.5*grid->dzz[ib][k];
}
}
All other components are set to zero at the beginning of the main loop in the function BoundaryVelocities
with
for(k=grid->etop[j];k<grid->Nke[j];k++) {
phys->boundary_u[jptr-grid->edgedist[2]][k]=0;
phys->boundary_v[jptr-grid->edgedist[2]][k]=0;
phys->boundary_w[jptr-grid->edgedist[2]][k]=0;
}
- Boundary scalars
The inflow boundary condition for the salinity (or density, when
) field
represents an inflow of fresh water with a density anomaly of
, with a surface depth of
m,
such that
The inflow boundary condition for temperature is a no-gradient condition, and as a result the temperature
just outside the boundary is equal to that just inside the boundary. These boundary conditions for salinity (density)
and temperature are given in boundaries.c as
if(grid->yv[ib]<50)
if(grid->xv[ib]>1000 && grid->xv[ib]<1200)
for(k=grid->ctop[ib];k<grid->Nk[ib];k++) {
z-=0.5*grid->dzz[ib][k];
if(z>-3.0) {
phys->boundary_T[jptr-grid->edgedist[2]][k]=phys->T[ib][k];
phys->boundary_s[jptr-grid->edgedist[2]][k]=-0.0001;
} else {
phys->boundary_T[jptr-grid->edgedist[2]][k]=phys->T[ib][k];
phys->boundary_s[jptr-grid->edgedist[2]][k]=0;
}
z-=0.5*grid->dzz[ib][k];
}