Page 445 - Applied Numerical Methods Using MATLAB
P. 445

434    PARTIAL DIFFERENTIAL EQUATIONS
                by double-clicking the object and even rotated (numerically) through the
                box opened by clicking ‘Rotate’ in the Draw pull-down menu. After cre-
                ating and positioning the objects, you can make a CSG model by editing
                the set formula appropriately in the set formula field of the second line
                below the top menu-bar to take the union (by default), the intersection,
                and the set difference of the objects to form the shape of the domain
                (Fig. 9.11). If you want to see the overall shape of the domain you created,
                click ‘Boundary mode’ in the Boundary pull-down menu.
              2. In Boundary mode, you can remove the subdomain borders that are
                induced by the intersections of the solid objects, but are not between
                different materials and also specify the boundary condition for each
                boundary segment. First, click the ∂  button in the tool-bar (Fig. 9.11)
                or ‘Boundary mode( B)’ in the Boundary pull-down menu (Fig. 9.12c),
                                  ∧
                which will make the boundary segments appear with red/blue/green colors
                (indicating Dirichlet(default)/Neumann/mixed type of boundary condition)
                and arrows toward its end (for the case where the boundary condition
                is parameterized along the boundary). When you want to remove all
                the subdomain borders, click ‘Remove All Subdomain Borders’ in the
                Boundary pull-down menu. You can set the parameters h, r or g, q
                in Eq. (9.5.2) to a constant or a function of x and y specifying the
                boundary condition, through the box window opened by double-clicking
                each boundary segment. In case you want to specify/change the boundary
                condition for multiple segments at a time, you had better use shift-click
                the segments to select all of them (which will be colored black) and click
                again on one of them to get the boundary condition dialog box.
              3. In PDE mode, you can specify the type of PDE (Elliptic/Parabolic/Hyper-
                bolic/Eigenmode) and its parameters. In order to do so, open the PDE
                specification dialog box by clicking the PDE button in the tool-bar or
                ‘PDE Specification’ in the PDE pull-down menu (Fig. 9.12d), check the
                type of PDE, and set its parameters in Eq. (9.5.1)/(9.5.5)/(9.5.6)/(9.5.7).
              4. In Mesh mode, you can create the triangular mesh for the domain
                drawn in Draw mode by just clicking the   button in the tool-bar or
                               ∧
                ‘Initialize Mesh( I)’ in the Mesh pull-down menu (Fig. 9.12e). To improve
                the accuracy of the solution, you can refine successively the mesh by
                                                               ∧
                clicking the  button in the tool-bar or ‘Refine Mesh( M)’ in the Mesh
                pull-down menu. You can jiggle the mesh by clicking ‘Jiggle Mesh’ in
                expectation of better accuracy. You can also undo any refinement by
                clicking ‘Undo Mesh Change’ in the Mesh pull-down menu.
              5. In Solve mode, you can solve the PDE and plot the result by just clicking
                the = button in the tool-bar or ‘Solve PDE( E)’ in the Solve pull-down
                                                      ∧
                (Fig. 9.12f). But, in the case of parabolic or hyperbolic PDE, you must
                click ‘Parameters’ in the Solve pull-down menu (Fig. 9.12f) to set up the
                initial conditions and the time range before solving the PDE.
   440   441   442   443   444   445   446   447   448   449   450