Environmental Engineering Reference
In-Depth Information
-help. With the pdepe com-
mand the m-file 'pdepe.m' is called. The user finds the location of that file by using
A complete description can be found in MATLAB
®
The user may open the file to see that the implemented solution algorithm is also
written in m-language. The inexperienced user is not recommended to alter that file,
but it is worth to know that alterations of the algorithm are possible in MATLAB ® .
The syntax of the pdepe command is presented in Sidebar 4.3 in brief form.
4.5 Example: 1D Inflow Front
The first test case for the pdepe method is the simulation of a situation for which the
Ogata-Banks solution holds. At first the functions have to be specified. Because the
transport equation is concerned, the names transfun , ictransfun and bctransfun
are chosen, for the equation specification, the initial conditions and the boundary
conditions, respectively. The entire specification is given by:
The functions f and s are specified in accordance with formulation ( 4.13 ), as the
flux term includes diffusion only. Parameters in this example are diffusivity D ,
velocity v , initial concentration c0 and inflow concentration cin . These parameters
have to be included in the formal parameter list appearing in the header of each
function module. Number and order of these parameters need to be the same.
Note that in the boundary module p and q have to be specified for both boundaries.
The subscripts l (left) and r (right) indicate the boundary. The specifications for the
left boundary coincide with the settings in line 1 of Table 4.1 ; i.e. the Dirichlet
boundary condition is specified, while the specifications for the right boundary
coincide with line 2, the Neumann condition.
Search WWH ::




Custom Search