Next: Restarting Runs
Up: Specifying initial and boundary
Previous: Noslip boundary conditions
Contents
Specifying heat flux
To specify source terms in the temperature equation, you will need to edit the
HeatSource() function in suntans/main/sources.c. The implementation assumes
adiabatic surface and bottom boundary conditions, and so all heat fluxes are implemented
as source terms in the temperature equation of the form
where is the molecular diffusivity (defined in suntans.dat) and is the
vertical turbulent eddydiffusivity, computed in turbulence.c.
terms to simplify the discussion, the temperature equation is given by

(1) 
The source term can be linearized about some temperature so that, defining
,
we have
where
The heat equation is discretized with the theta method so that equation (1) becomes
where is specified by the value of theta
in suntans.dat.
After rearranging, the temperature at the new time step is obtained with
Typically the best linearization is to linearize about the temperature at time step so
that . A simple implementation of heat flux is provided in the windstress example
in suntans/main/examples/windstress
and the code is in the HeatSource() function in
suntans/main/examples/windstress/sources.c
.
Next: Restarting Runs
Up: Specifying initial and boundary
Previous: Noslip boundary conditions
Contents
20140806