1 ******************************************************* 1 **** Welcome to the PDE2D 9.3 Interactive Driver **** 1 ******************************************************* 1 1 PDE2D can solve systems of (linear or nonlinear) steady-state, 1 time-dependent and eigenvalue partial differential equations 1 in 1D intervals, general 2D regions, and in a wide range of simple 1 3D regions. Ordinary differential equation systems can also be 1 solved. 1 1 You will now be asked a series of interactive questions about your 1 problem. The answers you give will be used to construct a PDE2D 1 FORTRAN program, which can then be compiled and linked with the PDE2D 1 runtime routines to produce an executable program. The FORTRAN 1 driver program created will be well-documented and highly readable 1 (most of the interactive messages are repeated in the comments), 1 so that minor modifications or corrections can be made directly to 1 the FORTRAN program, without the need to work through a new 1 interactive session. 1 1 You can alternatively create your PDE2D FORTRAN program using the 1 PDE2D graphical user interface (GUI) ("pde2d_gui [progname]"). It 1 is extraordinarily easy to set up problems using the PDE2D GUI, 1 which handles 0D and 1D problems, and 2D and 3D problems in "a wide 1 range of simple regions". However, the PDE2D GUI cannot handle 1 complex regions, so if you have a complex 2D region you must use 1 this Interactive Driver. 1 1 If this is your first time to use PDE2D, you may want to work 1 through an example problem before trying one of your own. Do you 1 want to work through a prepared example? 2 Several prepared examples are available. Enter: 2 2 1 - to see a simple problem: a simply-supported elastic plate 2 equation, with a unit load concentrated at the midpoint of 2 a square. 2 2 - to see a more complex problem: a non-linear, steady-state 2 PDE, solved in an annulus. Dirichlet (U = ...) boundary 2 conditions are imposed on part of the boundary, and Neumann 2 (dU/dn = ...) conditions are imposed on the other part, in 2 this example. The initial triangulation is generated 2 automatically, and adaptive grid refinement is illustrated. 2 3 - to see an eigenvalue problem. The region has a curved 2 interface across which material properties vary abruptly, in 2 this example. 2 4 - to see the first part of a thermal stress problem. In this 2 part, the temperature distribution in a V-notched block is 2 calculated by solving the time-dependent heat conduction 2 equation, using adaptive time step control. 2 5 - to see the second part of a thermal stress problem. In 2 this part, the stresses induced in the V-notched block by 2 thermal expansion are calculated, using the temperature 2 distribution output by example 4. You must run example 4 2 and save the tabular output before you can run example 5. 2 Examples 4 and 5 illustrate communication between problems. 2 6 - to see an eigenvalue problem which has complex eigenvalues. 2 7 - to see a waveguide problem (an eigenvalue problem in which 2 the eigenvalue appears nonlinearly). This example shows how 2 to handle boundary conditions of different types on the same 2 arc, and how to produce a plot of a computed integral vs time. 2 8 - to see the Navier-Stokes equations (penalty formulation) 2 solved for a fluid flowing around a bend in a pipe. 2 9 - to see a 3D elasticity problem, solved in a torus. This 2 example illustrates the use of user-defined coordinate 2 transformations to handle more general 3D regions. 2 10 - to see a time-dependent wave equation (reduced to a system 2 of two PDEs), solved in a 3D box. 2 11 - to see a 3D eigenvalue problem (the Schrodinger equation 2 in a hydrogen atom). This example illustrates the use of 2 spherical coordinates and periodic boundary conditions. 2 12 - to see a 3D eigenvalue problem, solved in a composite region 2 consisting of two cylinders of different material properties. 2 13 - to see the axisymmetric Navier-Stokes equations solved in a 2 non-rectangular channel, using the collocation FEM. 2 14 - to see a 1D saturated/unsaturated water flow problem. 2 15 - to see a 1D version of the Schrodinger eigenvalue equation 2 of example 11. 2 0 - (no example) 2 2 If you select one of the examples, the correct answer for each 2 interactive question will be supplied after the question. 3 In what follows, when you are told to enter a 'FORTRAN expression', 3 this means any valid FORTRAN expression of 65 characters or less. 3 In this expression, you may include references to FORTRAN function 3 subprograms. You may define these functions line by line at the end 3 of the interactive session, when prompted, or add them later using an 3 editor. 3 3 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 3 + If you enter a "#" in the first column of any input line, this + 3 + instructs the interactive driver to read this and subsequent input + 3 + lines from the file "pde2d.in". A "#" in the first column of an + 3 + input line in the file "pde2d.in" (or an end-of-file) instructs the + 3 + driver to switch back to interactive input. + 3 + + 3 + All lines input during an interactive session are echo printed to + 3 + a file "echo.out". You may want to modify this file and rename it + 3 + "pde2d.in", and read some or all of your input from this file during + 3 + your next interactive session. + 3 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 3 3 PDE2D can solve problems with 0,1,2 or 3 space variables. Enter the 3 dimension of your problem: 3 3 0 - to solve a time-dependent ordinary differential equation system, 3 or an algebraic or algebraic eigenvalue system 3 1 - to solve problems in 1D intervals 3 2 - to solve problems in general 2D regions 3 3 - to solve problems in a wide range of simple 3D regions 3 3A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3A$ enter: 2 $ 3A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3B$ enter: 2 $ 3B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3C$ enter: 2 $ 3C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3D$ enter: 2 $ 3D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3E$ enter: 2 $ 3E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$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$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3M$ enter: 2 $ 3M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3N$ enter: 1 $ 3N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3O$ enter: 1 $ 3O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4 Is double precision mode to be used? Double precision is recommended 4 on 32-bit computers. 4 4 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 4 + If double precision mode is used, variables and functions assigned + 4 + names beginning with a letter in the range A-H or O-Z will be DOUBLE + 4 + PRECISION, and you should use double precision constants and FORTRAN + 4 + expressions throughout; otherwise such variables and functions will + 4 + be of type REAL. In either case, variables and functions assigned + 4 + names beginning with I,J,K,L,M or N will be of INTEGER type. + 4 + + 4 + It is possible to convert a single precision PDE2D program to double + 4 + precision after it has been created, using an editor. Just change + 4 + all occurrences of "real" to "double precision" + 4 + " tdp" to "dtdp" (note leading blank) + 4 + Any user-written code or routines must be converted "by hand", of + 4 + course. To convert from double to single, reverse the changes. + 4 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 4A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$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 EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4N$ enter: yes $ 4N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4O$ enter: yes $ 4O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5 If you don't want to read the FINE PRINT, default NPROB. 5 5 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 5 + If you want to solve several similar problems in the same run, set + 5 + NPROB equal to the number of problems you want to solve. Then NPROB + 5 + loops through the main program will be done, with IPROB=1,...,NPROB, + 5 + and you can make the problem parameters vary with IPROB. NPROB + 5 + defaults to 1. + 5 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 5A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5A$ press [RETURN] to default NPROB $ 5A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5B$ We want to run the problem twice, to do adaptive triangulation $ 5B$ refinement, so $ 5B$ enter: NPROB = 2 $ 5B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXA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$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5I$ press [RETURN] to default NPROB $ 5I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5J$ press [RETURN] to default NPROB $ 5J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5K$ press [RETURN] to default NPROB $ 5K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5L$ press [RETURN] to default NPROB $ 5L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5M$ press [RETURN] to default NPROB $ 5M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5N$ press [RETURN] to default NPROB $ 5N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5O$ press [RETURN] to default NPROB $ 5O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 6 PDE2D solves the time-dependent system (note: U,A,B,F,FB,GB,U0 may be 6 vectors, C,RHO may be matrices): 6 6 C(X,Y,T,U,Ux,Uy)*d(U)/dT = d/dX* A(X,Y,T,U,Ux,Uy) 6 + d/dY* B(X,Y,T,U,Ux,Uy) 6 - F(X,Y,T,U,Ux,Uy) 6 6 or the steady-state system: 6 6 d/dX* A(X,Y,U,Ux,Uy) 6 + d/dY* B(X,Y,U,Ux,Uy) 6 = F(X,Y,U,Ux,Uy) 6 6 or the linear and homogeneous eigenvalue system: 6 6 d/dX* A(X,Y,U,Ux,Uy) 6 + d/dY* B(X,Y,U,Ux,Uy) 6 = F(X,Y,U,Ux,Uy) + lambda*RHO(X,Y)*U 6 6 in an arbitrary two-dimensional region, R, with 'fixed' boundary 6 conditions on part of the boundary: 6 6 U = FB(X,Y,[T]) 6 6 and 'free' boundary conditions on the other part: 6 6 A*nx + B*ny = GB(X,Y,[T],U,Ux,Uy) 6 6 For time-dependent problems there are also initial conditions: 6 6 U = U0(X,Y) at T=T0 6 6 Here Ux,Uy represent the (vector) functions dU/dX,dU/dY, and (nx,ny) 6 represents the unit outward normal to the boundary. 6 6 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 6 + A system of NEQN complex partial differential equations must be + 6 + written as a system of 2*NEQN real equations, by separating the + 6 + equations into their real and imaginary parts. However, note that + 6 + the complex arithmetic abilities of FORTRAN can be used to simplify + 6 + this separation. For example, the complex PDE: + 6 + I*(Uxx+Uyy) = 1/(1+U**10), where U = UR + UI*I + 6 + would be difficult to split up analytically, but using FORTRAN + 6 + expressions it is easy: + 6 + A1 = -UIx, B1 = -UIy, F1 = REAL(1.0/(1.0+CMPLX(UR,UI)**10)) + 6 + A2 = URx, B2 = URy, F2 = AIMAG(1.0/(1.0+CMPLX(UR,UI)**10)) + 6 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 7 You may now define global parameters, which may be referenced in any 7 of the "FORTRAN expressions" you input throughout the rest of this 7 interactive session. You will be prompted alternately for parameter 7 names and their values; enter a blank name when you are finished. 7 7 Parameter names are valid FORTRAN variable names, starting in 7 column 1. Thus each name consists of 1 to 6 alphanumeric characters, 7 the first of which must be a letter. If the first letter is in the 7 range I-N, the parameter must be an integer. 7 7 Parameter values are either FORTRAN constants or FORTRAN expressions 7 involving only constants and global parameters defined on earlier 7 lines. They may also be functions of the problem number IPROB, if 7 you are solving several similar problems in one run (NPROB > 1). Note 7 that you are defining global CONSTANTS, not functions; e.g., parameter 7 values may not reference any of the independent or dependent variables 7 of your problem. 7 7 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 7 + If you define other parameters here later, using an editor, you must + 7 + add them to COMMON block /PARM8Z/ everywhere this block appears, if + 7 + they are to be "global" parameters. + 7 + + 7 + The variable PI is already included as a global parameter, with an + 7 + accurate value 3.14159... + 7 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 7A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7A$ press [RETURN] to skip global parameter definitions $ 7A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7B$ enter: R0 $ 7B$ 0.05 $ 7B$ R1 $ 7B$ 1 $ 7B$ [blank line] $ 7B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$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$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7L$ enter: EPS $ 7L$ 0.001 $ 7L$ [blank line] $ 7L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7M$ enter: VISC $ 7M$ 0.02 $ 7M$ RHO $ 7M$ 1.0 $ 7M$ [blank line] $ 7M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7N$ press [RETURN] to skip global parameter definitions $ 7N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7O$ enter: C1 $ 7O$ 3.7796 $ 7O$ C2 $ 7O$ -0.26248 $ 7O$ [blank line] $ 7O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8 If you don't want to read the FINE PRINT, enter 'no'. 8 8 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 8 + Do you want to be given a chance to write a FORTRAN block before the + 8 + definitions of many functions? If you answer 'no', you will still + 8 + be given a chance to write code before the definition of the PDE + 8 + coefficients, but not other functions. Of course, you can always + 8 + add code later directly to the resulting program, using an editor. + 8 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 8A$$$$$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$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8N$ enter: no $ 8N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8O$ enter: no $ 8O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 9 Now, the first step in creating a 2D PDE2D program is to construct 9 an initial triangulation of the region R over which the partial 9 differential equations are to be solved. This initial triangulation 9 can later be refined and graded to your specifications. 9 9 The boundary of the region R should be divided into distinct 9 (curved or straight) arcs, each of which is smooth with smooth 9 boundary conditions. Thus at every corner or point where the boundary 9 conditions have a discontinuity or change type, a new boundary arc 9 should begin. Each arc is assigned a unique integer arc number, which 9 is arbitrary except that it must be negative if 'fixed' boundary 9 conditions are specified on that arc, and positive (but < 1000) if 9 'free' boundary conditions are specified. 9 9 'Fixed' means that all unknowns are specified on that boundary 9 (Dirichlet type conditions) and 'free' refers to more general boundary 9 conditions, as defined earlier. These more general conditions include 9 specification of the boundary flux (or normal derivative in the case 9 of a Laplacian operator). 9 9 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 9 + If some, but not all, of the unknowns are specified on a boundary + 9 + arc, that arc should be considered 'free', since even 'fixed' + 9 + type conditions of the form: + 9 + Ui = FBi(X,Y,[T]) + 9 + can be expressed as 'free' boundary conditions in the form: + 9 + Ai*nx + Bi*ny = zero(Ui-FBi(X,Y,[T])) + 9 + where zero(f) = Big_Number*f is a PDE2D-supplied function. + 9 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 9 + If Ai=Bi=0 (eg, if the PDE is first order), then setting GBi=0 is + 9 + equivalent to setting "no" boundary condition (which is sometimes + 9 + appropriate for first order PDEs), because the boundary condition + 9 + Ai*nx + Bi*ny = GBi reduces to 0=0. + 9 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 9 + Note: while 'fixed' boundary conditions are enforced exactly (at the + 9 + nodes), 'free' boundary conditions are not; the greater the overall + 9 + solution accuracy, the more closely they are satisfied. + 9 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 9 9 There are 3 options for generating the initial triangulation: 9 9 1. If the region R is a rectangle with sides parallel to the X and Y 9 axes, then the initial triangulation can be generated automatically. 9 2. If the region R can be conveniently described by parametric 9 equations in the form: 9 X = X(P,Q) 9 Y = Y(P,Q) 9 where P and Q have constant limits (for example, if X=P*COS(Q), 9 Y=P*SIN(Q), P and Q will represent polar coordinates), then the 9 initial triangulation can also be generated automatically. 9 3. For more general regions, you will need to create an initial 9 triangulation by hand. 9 9 Enter INTRI = 1,2 or 3 to choose an initial triangulation option. 9A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 9A$ Since U=V=0 on the boundary, we must assign negative arc numbers $ 9A$ to the four sides--let us number them -1,-2,-3,-4 (in any order). $ 9A$ Then since the region is a square, $ 9A$ enter: INTRI = 1 $ 9A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 9B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 9B$ We can parameterize using polar coordinates, with an arc number of $ 9B$ -1 assigned to the inner boundary, +1 to the outer boundary. $ 9B$ $ 9B$ enter: INTRI = 2 $ 9B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 9C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 9C$ To the three sides where QQ=0, we assign a negative arc number (-1), $ 9C$ and to the left side, where the normal derivative is zero, we assign $ 9C$ positive arc number 1. $ 9C$ $ 9C$ enter: INTRI = 3 $ 9C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 9D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 9D$ There are five arcs: $ 9D$ $ 9D$ arc 2 $ 9D$ ++++++++++++++++++++++++++- $ 9D$ + - $ 9D$ arc 2 + - $ 9D$ + - $ 9D$ + - $ 9D$ + - $ 9D$ arc 3 + - arc -1 $ 9D$ + - $ 9D$ + - $ 9D$ + - $ 9D$ + - $ 9D$ ++++++++++++++++++++++++++++++- $ 9D$ arc 2 $ 9D$ $ 9D$ enter: INTRI = 3 $ 9D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 9E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 9E$ There are five arcs. On the line of symmetry, the boundary $ 9E$ conditions are mixed, so a positive arc number (3) is used. $ 9E$ $ 9E$ arc 2 $ 9E$ ++++++++++++++++++++++++++- $ 9E$ + - $ 9E$ arc 2 + - $ 9E$ + - $ 9E$ + - $ 9E$ + - $ 9E$ arc 3 + - arc -1 $ 9E$ + - $ 9E$ + - $ 9E$ + - $ 9E$ + - $ 9E$ ++++++++++++++++++++++++++++++- $ 9E$ arc 2 $ 9E$ $ 9E$ enter: INTRI = 3 $ 9E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 9F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 9F$ Since U=V=0 on the boundary, we must assign a negative arc number $ 9F$ to the boundary arc, say -1. Then $ 9F$ enter: INTRI = 3 $ 9F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 9G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 9G$ Since the boundary conditions are mixed, and the same on all arcs, $ 9G$ we assign a positive number (1) to each arc, and since the region $ 9G$ is a square, $ 9G$ enter: INTRI = 1 $ 9G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 9H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 9H$ The inlet and outlet boundary arcs can be assigned arc numbers -1 $ 9H$ and 1, respectively, while the remaining arcs can all take number -2.$ 9H$ arc -1 $ 9H$ ------------- $ 9H$ - - $ 9H$ - - $ 9H$ - - $ 9H$ - - $ 9H$ - - $ 9H$ - - arc -2 $ 9H$ - - $ 9H$ - - $ 9H$ - - $ 9H$ - - $ 9H$ - - $ 9H$ - --------------------- $ 9H$ - + $ 9H$ - + $ 9H$ - + arc 1 $ 9H$ - + $ 9H$ - + $ 9H$ --------------------------------- $ 9H$ $ 9H$ enter: INTRI = 3 $ 9H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10 For a rectangular region, the initial triangulation is defined by a 10 set of grid lines corresponding to 10 X = XGRID(1),XGRID(2),...,XGRID(NXGRID) 10 Y = YGRID(1),YGRID(2),...,YGRID(NYGRID) 10 Each grid rectangle is divided into four equal area triangles. 10 10 You will first be prompted for NXGRID, the number of X-grid points, 10 then for XGRID(1),...,XGRID(NXGRID). Any points defaulted will be 10 uniformly spaced between the points you define; the first and last 10 points represent the values of X on the left and right sides of the 10 rectangle R, and cannot be defaulted. Then you will be prompted 10 similarly for the number and values of the Y-grid points. 10A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10A$ enter: NXGRID = 10 $ 10A$ XGRID(1) = -1.0 $ 10A$ XGRID(NXGRID) = 1.0 $ 10A$ and default XGRID(2),...,XGRID(9) $ 10A$ NYGRID = 10 $ 10A$ YGRID(1) = -1.0 $ 10A$ YGRID(NYGRID) = 1.0 $ 10A$ and default YGRID(2),...,YGRID(9) $ 10A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10G$ enter: NXGRID = 4 $ 10G$ It is important for accuracy considerations that no triangles in $ 10G$ the initial triangulation (hence none in the final triangulation) $ 10G$ straddle the interface between the glass and silica, so enter: $ 10G$ XGRID(1) = -4.E-6 $ 10G$ XGRID(2) = -1.E-6 $ 10G$ XGRID(3) = 1.E-6 $ 10G$ XGRID(NXGRID) = 4.E-6 $ 10G$ similarly, $ 10G$ enter: NYGRID = 4 $ 10G$ YGRID(1) = -4.E-6 $ 10G$ YGRID(2) = -1.E-6 $ 10G$ YGRID(3) = 1.E-6 $ 10G$ YGRID(NYGRID) = 4.E-6 $ 10G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11 Enter the arc numbers IXARC(1),IXARC(2) of the left and right sides, 11 respectively, and the arc numbers IYARC(1),IYARC(2) of the bottom and 11 top sides of the rectangle R. Recall that negative arc numbers 11 correspond to 'fixed' boundary conditions, and positive arc numbers 11 ( < 1000) correspond to 'free' boundary conditions. 11A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11A$ enter: IXARC(1) = -1 IXARC(2) = -2 $ 11A$ IYARC(1) = -3 IYARC(2) = -4 $ 11A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11G$ enter: IXARC(1) = 1 IXARC(2) = 1 $ 11G$ IYARC(1) = 1 IYARC(2) = 1 $ 11G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 12 Define the Cartesian coordinates X,Y as functions of the parameters 12 P and Q, so that your region is generated as P and Q vary between 12 constant limits PGRID(1) < P < PGRID(NPGRID) 12 QGRID(1) < Q < QGRID(NQGRID) 12 where PGRID and QGRID will be defined later. X=P, Y=Q by default. 12 12 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 12 + X and Y must be continuous functions of P and Q, but their + 12 + derivatives need not be continuous. + 12 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 12B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 12B$ The region can be described using polar coordinates, with radius P $ 12B$ and angle Q, with R0 < P < R1 and 0 < Q < 2*PI. $ 12B$ enter: X = P*COS(Q) $ 12B$ Y = P*SIN(Q) $ 12B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 13 For a parameterized region, the initial triangulation is defined by a 13 set of curved grid lines corresponding to 13 P = PGRID(1),PGRID(2),...,PGRID(NPGRID) 13 Q = QGRID(1),QGRID(2),...,QGRID(NQGRID) 13 Each grid quadrilateral is divided into three or four triangles. 13 13 You will first be prompted for NPGRID, the number of P-grid points, 13 then for PGRID(1),...,PGRID(NPGRID). Any points defaulted will be 13 uniformly spaced between the points you define; the first and last 13 represent the lower and upper limits of P, and cannot be defaulted. 13 Then you will be prompted similarly for the number and values of 13 the Q-grid points. 13B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 13B$ enter: NPGRID = 4 $ 13B$ PGRID(1) = R0 $ 13B$ PGRID(NPGRID) = R1 $ 13B$ and default PGRID(2),PGRID(3) $ 13B$ NQGRID = 9 $ 13B$ QGRID(1) = 0.0 $ 13B$ QGRID(NQGRID) = 2*PI $ 13B$ and default QGRID(2),...,QGRID(8) $ 13B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 14 Enter the arc numbers IPARC(1),IPARC(2) corresponding to the arcs 14 P = PGRID(1) and P = PGRID(NPGRID), respectively, and the arc numbers 14 IQARC(1),IQARC(2) corresponding to the arcs Q = QGRID(1) and 14 Q = QGRID(NQGRID). Recall that negative arc numbers correspond to 14 'fixed' boundary conditions, and positive arc numbers ( < 1000) 14 correspond to 'free' boundary conditions. 14 14 For a parameterized region, an "arc" may be a single point (for 14 example, R=0 if polar coordinates are used), in which case the arc 14 number must be set to 0, or it may be interior to the region (for 14 example, Theta=0 and Theta=2*pi if polar coordinates are used), in 14 which case the arc number must be > 999. 14B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 14B$ enter: IPARC(1) = -1 IPARC(2) = 1 $ 14B$ IQARC(1) = 1001 IQARC(2) = 1001 $ 14B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 15 For a general region, an initial triangulation is constructed 15 which generally consists of only as many triangles as needed to define 15 the region and to satisfy the following rules (triangles adjacent 15 to a curved boundary may be considered to have one curved edge): 15 15 1. The end points of each arc are included as vertices in the 15 triangulation. 15 15 2. No vertex of any triangle may touch another in a point which is 15 not a vertex of the other triangle. 15 15 3. No triangle may have all three vertices on the boundary. 15 15 Now enter the number of vertices in the initial triangulation (NV0) 15 and the vertices (VXY(1,i),VXY(2,i)), i=1,...,NV0, when prompted. 15 15 The vertices may be numbered in any order, but that order will define 15 the vertex numbers referred to in the next list. 15 15 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 15 + If the elements of VXY, IABC and IARC are defaulted, these initial + 15 + triangulation arrays will be read from the file 'pde2d.tri'; in this + 15 + case the values of NV0 and NT0 entered below must be the same as + 15 + those in the file. + 15 + + 15 + A file 'pde2d.tri' is normally created when the final triangulation + 15 + from another program (cases INTRI=1,2 or 3) is dumped. Reset IOTRI + 15 + to 1 in the other program, to cause the final triangulation to be + 15 + dumped into pde2d.tri. + 15 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 15C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 15C$ We do not want any initial triangles to straddle the interface, so $ 15C$ we construct an initial triangulation of 8 triangles $ 15C$ $ 15C$ (1,2) 4--------------------------------------3 (3,2) $ 15C$ /*+ * * / $ 15C$ / + * * / $ 15C$ / * + (2.2,1.4) 7 / $ 15C$ / + * / $ 15C$ / * + * * / $ 15C$ / 6 (1.5,1) / $ 15C$ / * * + * / $ 15C$ / * + / $ 15C$ / 5 (0.8,0.6) + * / $ 15C$ / * * + / $ 15C$ / * * + */ $ 15C$ (0,0) 1--------------------------------------2 (2,0) $ 15C$ $ 15C$ where the seven vertices are numbered as indicated. $ 15C$ enter: NV0 = 7 $ 15C$ $ 15C$ VXY(1,1) = 0 VXY(2,1) = 0 $ 15C$ VXY(1,2) = 2 VXY(2,2) = 0 $ 15C$ VXY(1,3) = 3 VXY(2,3) = 2 $ 15C$ VXY(1,4) = 1 VXY(2,4) = 2 $ 15C$ VXY(1,5) = 0.8 VXY(2,5) = 0.6 $ 15C$ VXY(1,6) = 1.5 VXY(2,6) = 1 $ 15C$ VXY(1,7) = 2.2 VXY(2,7) = 1.4 $ 15C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 15D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 15D$ For this example, we can construct an initial triangulation $ 15D$ of five triangles $ 15D$ $ 15D$ (1,5) 4+++++++++++++++++++++++++3 (5,5) $ 15D$ + * *- $ 15D$ + * * - $ 15D$ + * * - $ 15D$ (0,4) 5* * * - $ 15D$ + * * * - $ 15D$ + * 6 (2,3) - $ 15D$ + * * - $ 15D$ + * * - $ 15D$ + * * - $ 15D$ + * * - $ 15D$ (0,0) 1+++++++++++++++++++++++++++++2 (5,0) $ 15D$ $ 15D$ where the six vertices are numbered as indicated. $ 15D$ enter: NV0 = 6 $ 15D$ $ 15D$ VXY(1,1) = 0 VXY(2,1) = 0 $ 15D$ VXY(1,2) = 5 VXY(2,2) = 0 $ 15D$ VXY(1,3) = 5 VXY(2,3) = 5 $ 15D$ VXY(1,4) = 1 VXY(2,4) = 5 $ 15D$ VXY(1,5) = 0 VXY(2,5) = 4 $ 15D$ VXY(1,6) = 2 VXY(2,6) = 3 $ 15D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 15E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 15E$ For this example, we can construct an initial triangulation $ 15E$ of five triangles $ 15E$ $ 15E$ (1,5) 4+++++++++++++++++++++++++3 (5,5) $ 15E$ + * *- $ 15E$ + * * - $ 15E$ + * * - $ 15E$ (0,4) 5* * * - $ 15E$ + * * * - $ 15E$ + * 6 (2,3) - $ 15E$ + * * - $ 15E$ + * * - $ 15E$ + * * - $ 15E$ + * * - $ 15E$ (0,0) 1+++++++++++++++++++++++++++++2 (5,0) $ 15E$ $ 15E$ where the six vertices are numbered as indicated. $ 15E$ enter: NV0 = 6 $ 15E$ $ 15E$ VXY(1,1) = 0 VXY(2,1) = 0 $ 15E$ VXY(1,2) = 5 VXY(2,2) = 0 $ 15E$ VXY(1,3) = 5 VXY(2,3) = 5 $ 15E$ VXY(1,4) = 1 VXY(2,4) = 5 $ 15E$ VXY(1,5) = 0 VXY(2,5) = 4 $ 15E$ VXY(1,6) = 2 VXY(2,6) = 3 $ 15E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 15F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 15F$ For this example, we can construct an initial triangulation $ 15F$ of four triangles (0,1) $ 15F$ ----2---- $ 15F$ -- * -- $ 15F$ - * - $ 15F$ - * - $ 15F$ - * - arc -1 $ 15F$ - * - $ 15F$ - * - $ 15F$ - * - $ 15F$ - * - $ 15F$ - *(0,0) - $ 15F$ (-1,0) 3*******************5********************1 (1,0) $ 15F$ - * - $ 15F$ - * - $ 15F$ - * - $ 15F$ - * - $ 15F$ - * - $ 15F$ - * - $ 15F$ - * - $ 15F$ - * - $ 15F$ -- * -- $ 15F$ ----4---- $ 15F$ (0,-1) $ 15F$ $ 15F$ where the five vertices are numbered as indicated. $ 15F$ enter: NV0 = 5 $ 15F$ $ 15F$ VXY(1,1) = 1 VXY(2,1) = 0 $ 15F$ VXY(1,2) = 0 VXY(2,2) = 1 $ 15F$ VXY(1,3) = -1 VXY(2,3) = 0 $ 15F$ VXY(1,4) = 0 VXY(2,4) = -1 $ 15F$ VXY(1,5) = 0 VXY(2,5) = 0 $ 15F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 15H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 15H$ For this example, we can construct an initial triangulation $ 15H$ of eight triangles $ 15H$ $ 15H$ (0,4) 6-----------5 (1,4) $ 15H$ -* *- $ 15H$ - * * - $ 15H$ - * * - $ 15H$ - * * - $ 15H$ - * * - $ 15H$ - 7 (0.5,2) $ 15H$ - * - $ 15H$ - * * - $ 15H$ - * - $ 15H$ - * * - $ 15H$ - *- (1,1) $ 15H$ - * 4-------------------3 (4,1) $ 15H$ - * * * + $ 15H$ - * * * * + $ 15H$ - * 8 (2,0.5) + $ 15H$ -* * * * + $ 15H$ - * * * + $ 15H$ (0,0) 1-------------------------------2 (4,0) $ 15H$ $ 15H$ where the eight vertices are numbered as indicated. $ 15H$ enter: NV0 = 8 $ 15H$ $ 15H$ VXY(1,1) = 0 VXY(2,1) = 0 $ 15H$ VXY(1,2) = 4 VXY(2,2) = 0 $ 15H$ VXY(1,3) = 4 VXY(2,3) = 1 $ 15H$ VXY(1,4) = 1 VXY(2,4) = 1 $ 15H$ VXY(1,5) = 1 VXY(2,5) = 4 $ 15H$ VXY(1,6) = 0 VXY(2,6) = 4 $ 15H$ VXY(1,7) = 0.5 VXY(2,7) = 2 $ 15H$ VYX(1,8) = 2 VXY(2,8) = 0.5 $ 15H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 16 Now enter the number of triangles in the initial triangulation (NT0), 16 and for each triangle k, give the vertex numbers of vertices a,b,c: 16 IABC(1,k) , IABC(2,k) , IABC(3,k) 16 where the third vertex (c) is not on the boundary of R (or on a curved 16 interface arc), and the number, 16 IARC(k) 16 of the arc cut off by the base, ab, of the triangle. Put IARC(k)=0 16 if the base of triangle k does not intersect any boundary (or curved 16 interface) arc. Recall that negative arc numbers correspond to 16 'fixed' boundary conditions, and positive arc numbers ( < 1000) 16 correspond to 'free' boundary conditions. 16 16 The order of this list defines the initial triangle numbers. 16 16 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 16 + Any of the partial differential equation coefficients or other + 16 + functions of X and Y which you are asked to supply later may be + 16 + defined as functions of a variable 'KTRI', which holds the number + 16 + of the INITIAL triangle in which (X,Y) lies. This is useful when + 16 + the region is a composite of different materials, so that some + 16 + material parameters have different values in different subregions. + 16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 16 + If any interfaces between subregions are curved, the interface arcs + 16 + may be assigned unique arc numbers of 1000 and above, and treated + 16 + like boundary arcs in the initial triangulation definition. (You + 16 + will not be allowed to specify boundary conditions on them, however.)+ 16 + The triangulation refinement will follow the interface arcs, so that + 16 + no final triangles will straddle an interface. + 16 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 16C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 16C$ Recall that the initial triangulation is: $ 16C$ arc -1 $ 16C$ 4--------------------------------------3 $ 16C$ /*+ * VI * / $ 16C$ / + * * / $ 16C$ / * + VII 7 / $ 16C$ / + * V / $ 16C$ / * III + * * / $ 16C$ arc 1 / 6 / arc -1 $ 16C$ / * * + VIII * / $ 16C$ / IV * + / $ 16C$ / 5 II + * / $ 16C$ / * I * + / $ 16C$ / * * + */ $ 16C$ 1--------------------------------------2 $ 16C$ arc -1 $ 16C$ $ 16C$ where I,II,...,VIII are the initial triangle numbers. $ 16C$ $ 16C$ The curved interior interface is assigned arc number 1001, while $ 16C$ the boundary arcs are assigned numbers as shown. $ 16C$ Note that D(X,Y)=5 in triangles number 1-4, $ 16C$ D(X,Y)=1 in triangles number 5-8 $ 16C$ enter: NT0 = 8 $ 16C$ $ 16C$ IABC(1,1) = 1 IABC(2,1) = 2 IABC(3,1) = 5 IARC(1) = -1 $ 16C$ IABC(1,2) = 2 IABC(2,2) = 6 IABC(3,2) = 5 IARC(2) = 1001 $ 16C$ IABC(1,3) = 6 IABC(2,3) = 4 IABC(3,3) = 5 IARC(3) = 1001 $ 16C$ IABC(1,4) = 4 IABC(2,4) = 1 IABC(3,4) = 5 IARC(4) = 1 $ 16C$ IABC(1,5) = 2 IABC(2,5) = 3 IABC(3,5) = 7 IARC(5) = -1 $ 16C$ IABC(1,6) = 3 IABC(2,6) = 4 IABC(3,6) = 7 IARC(6) = -1 $ 16C$ IABC(1,7) = 4 IABC(2,7) = 6 IABC(3,7) = 7 IARC(7) = 1001 $ 16C$ IABC(1,8) = 6 IABC(2,8) = 2 IABC(3,8) = 7 IARC(8) = 1001 $ 16C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 16D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 16D$ Recall that the initial triangulation is: $ 16D$ $ 16D$ arc 2 $ 16D$ 4+++++++++++++++++++++++++3 $ 16D$ + * *- $ 16D$ arc 2 + * III * - $ 16D$ + IV * * - $ 16D$ 5* * * - $ 16D$ + * * * - $ 16D$ arc 3 + * 6 II - arc -1 $ 16D$ + V * * - $ 16D$ + * * - $ 16D$ + * I * - $ 16D$ + * * - $ 16D$ 1+++++++++++++++++++++++++++++2 $ 16D$ arc 2 $ 16D$ $ 16D$ where I,II,III,IV,V are the initial triangle numbers. $ 16D$ enter: NT0 = 5 $ 16D$ $ 16D$ IABC(1,1) = 1 IABC(2,1) = 2 IABC(3,1) = 6 IARC(1) = 2 $ 16D$ IABC(1,2) = 2 IABC(2,2) = 3 IABC(3,2) = 6 IARC(2) = -1 $ 16D$ IABC(1,3) = 3 IABC(2,3) = 4 IABC(3,3) = 6 IARC(3) = 2 $ 16D$ IABC(1,4) = 4 IABC(2,4) = 5 IABC(3,4) = 6 IARC(4) = 2 $ 16D$ IABC(1,5) = 5 IABC(2,5) = 1 IABC(3,5) = 6 IARC(5) = 3 $ 16D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 16E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 16E$ Recall that the initial triangulation is: $ 16E$ $ 16E$ arc 2 $ 16E$ 4+++++++++++++++++++++++++3 $ 16E$ + * *- $ 16E$ arc 2 + * III * - $ 16E$ + IV * * - $ 16E$ 5* * * - $ 16E$ + * * * - $ 16E$ arc 3 + * 6 II - arc -1 $ 16E$ + V * * - $ 16E$ + * * - $ 16E$ + * I * - $ 16E$ + * * - $ 16E$ 1+++++++++++++++++++++++++++++2 $ 16E$ arc 2 $ 16E$ $ 16E$ where I,II,III,IV,V are the initial triangle numbers. $ 16E$ enter: NT0 = 5 $ 16E$ $ 16E$ IABC(1,1) = 1 IABC(2,1) = 2 IABC(3,1) = 6 IARC(1) = 2 $ 16E$ IABC(1,2) = 2 IABC(2,2) = 3 IABC(3,2) = 6 IARC(2) = -1 $ 16E$ IABC(1,3) = 3 IABC(2,3) = 4 IABC(3,3) = 6 IARC(3) = 2 $ 16E$ IABC(1,4) = 4 IABC(2,4) = 5 IABC(3,4) = 6 IARC(4) = 2 $ 16E$ IABC(1,5) = 5 IABC(2,5) = 1 IABC(3,5) = 6 IARC(5) = 3 $ 16E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 16F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 16F$ Recall that the initial triangulation is: $ 16F$ $ 16F$ ----2---- $ 16F$ -- * -- $ 16F$ - * - $ 16F$ - * - $ 16F$ - * - arc -1 $ 16F$ - * - $ 16F$ - * - $ 16F$ - II * I - $ 16F$ - * - $ 16F$ - * - $ 16F$ 3*******************5********************1 $ 16F$ - * - $ 16F$ - * - $ 16F$ - III * IV - $ 16F$ - * - $ 16F$ - * - $ 16F$ - * - $ 16F$ - * - $ 16F$ - * - $ 16F$ -- * -- $ 16F$ ----4---- $ 16F$ $ 16F$ where I,II,III,IV are the initial triangle numbers. $ 16F$ enter: NT0 = 4 $ 16F$ IABC(1,1) = 1 IABC(2,1) = 2 IABC(3,1) = 5 IARC(1) = -1 $ 16F$ IABC(1,2) = 2 IABC(2,2) = 3 IABC(3,2) = 5 IARC(2) = -1 $ 16F$ IABC(1,3) = 3 IABC(2,3) = 4 IABC(3,3) = 5 IARC(3) = -1 $ 16F$ IABC(1,4) = 4 IABC(2,4) = 1 IABC(3,4) = 5 IARC(4) = -1 $ 16F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 16H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 16H$ Recall that the initial triangulation is: $ 16H$ arc -1 $ 16H$ 6-----------5 $ 16H$ -* *- $ 16H$ - * VII * - $ 16H$ - * * - $ 16H$ - * * - $ 16H$ - * * - $ 16H$ -VIII 7 VI - $ 16H$ - * - arc -2 $ 16H$ arc - * * - $ 16H$ -2 - * - $ 16H$ - * * - $ 16H$ - *- arc -2 $ 16H$ - * V 4-------------------3 $ 16H$ - * * III * + $ 16H$ - * * * * + $ 16H$ - * IV 8 II + arc 1 $ 16H$ -* * * * + $ 16H$ - * * I * + $ 16H$ 1--------------------------------2 $ 16H$ arc -2 $ 16H$ $ 16H$ where I,II,III,IV,V,VI,VII,VIII are the initial triangle numbers $ 16H$ enter: NT0 = 8 $ 16H$ $ 16H$ IABC(1,1) = 1 IABC(2,1) = 2 IABC(3,1) = 8 IARC(1) = -2 $ 16H$ IABC(1,2) = 2 IABC(2,2) = 3 IABC(3,2) = 8 IARC(2) = 1 $ 16H$ IABC(1,3) = 3 IABC(2,3) = 4 IABC(3,3) = 8 IARC(3) = -2 $ 16H$ IABC(1,4) = 4 IABC(2,4) = 1 IABC(3,4) = 8 IARC(4) = 0 $ 16H$ IABC(1,5) = 1 IABC(2,5) = 4 IABC(3,5) = 7 IARC(5) = 0 $ 16H$ IABC(1,6) = 4 IABC(2,6) = 5 IABC(3,6) = 7 IARC(6) = -2 $ 16H$ IABC(1,7) = 5 IABC(2,7) = 6 IABC(3,7) = 7 IARC(7) = -1 $ 16H$ IABC(1,8) = 6 IABC(2,8) = 1 IABC(3,8) = 7 IARC(8) = -2 $ 16H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17 Are there any curved boundary (or curved interface) arcs? 17C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17C$ enter: yes $ 17C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17D$ enter: no $ 17D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17E$ enter: no $ 17E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17F$ enter: yes $ 17F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17H$ enter: no $ 17H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18 Enter the arc number (IARC) of a curved arc. 18C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18C$ enter: IARC = 1001 $ 18C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18F$ enter: IARC = -1 $ 18F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 19 You must either supply the parametric equations (X(S),Y(S)) of this arc 19 or else provide the coordinates (PXY(1,i),PXY(2,i)), i=1,...,NPTS, 19 of several points on the arc through which a smooth curve will be 19 drawn. Do you want to supply the parametric equations? 19C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 19C$ enter: no $ 19C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 19F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 19F$ enter: yes $ 19F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 20 The arc is parameterized as X=X(S),Y=Y(S) where S varies from S0 to SF 20 as it traces out the arc, in either direction. 20 20 Enter FORTRAN expressions for S0, SF, X(S) and Y(S). S0 and SF default 20 to 0 and 1. 20F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 20F$ enter: S0 = 0 $ 20F$ SF = 2*PI $ 20F$ X = COS(S) $ 20F$ Y = SIN(S) $ 20F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 21 Enter the number of points on the arc (NPTS) to be input, and the 21 coordinates (PXY(1,i),PXY(2,i)),i=1,...,NPTS, of these points, when 21 prompted. The points can be ordered in either direction along the 21 arc, but the first and last points must be the endpoints of the arc. 21 A smooth curve will be drawn through these points. 21 21 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 21 + To guarantee that the arc drawn through these user-supplied points + 21 + does not miss any vertices in the initial triangulation which are + 21 + supposed to lie on this arc, any such vertices should be included in + 21 + the user-supplied points. + 21 + + 21 + If the arc makes a sharp turn at one of the input points, so that + 21 + drawing a smooth curve through that point is not appropriate, you + 21 + can include this point twice (consecutively) in the input list, and + 21 + continuity of the derivatives will not be imposed there. + 21 + + 21 + The parametric equations (X(S),Y(S)) of the arc drawn are computed + 21 + so that S ranges from 0 to 1 and is approximately, but not exactly, + 21 + proportional to distance along the arc, and X(S) and Y(S) are + 21 + cubic spline interpolants to the X and Y coordinates of the points. + 21 + + 21 + If a boundary curve is very wiggly, you may need to increase the + 21 + value of NBPT8Z in the PARAMETER statement in the main program, so + 21 + that this curve will be accurately drawn in the graphical output. + 21 + (Note: NBPT8Z does not affect the internal representation of a + 21 + curve, only its graphical representation.) + 21 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 21C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 21C$ We will supply 5 points to approximately define the interface, so $ 21C$ enter: NPTS = 5 $ 21C$ $ 21C$ PXY(1,1) = 2 PXY(2,1) = 0 $ 21C$ PXY(1,2) = 1.6 PXY(2,2) = 0.5 $ 21C$ PXY(1,3) = 1.5 PXY(2,3) = 1 $ 21C$ PXY(1,4) = 1.4 PXY(2,4) = 1.5 $ 21C$ PXY(1,5) = 1 PXY(2,5) = 2 $ 21C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 22 Are there any more curved arcs? 22C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 22C$ enter: no $ 22C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 22F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 22F$ enter: no $ 22F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 23 How many triangles (NTF) are desired for the final triangulation? 23A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$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$ enter: NTF = 100 $ 23G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 23H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 23H$ enter: NTF = 200 $ 23H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 24 Now enter a FORTRAN expression for TRIDEN(X,Y), which controls the 24 grading of the triangulation. TRIDEN should be largest where the 24 triangulation is to be most dense. The default is TRIDEN(X,Y)=1.0 24 (a uniform triangulation). 24 24 If you want the triangulation to be graded "adaptively", set 24 TRIDEN = ADAPT and and make sure there is no "pde2d.adp" file in the 24 working directory the first time you run the program, then run the 24 program 2 or more times, possibly increasing NTF each time. On the 24 first run, a uniform triangulation will be generated, but on each 24 subsequent run, information output by the previous run to "pde2d.adp" 24 will be used to guide the grading of the new triangulation. 24 24 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 24 + If TRIDEN = ADAPT, after each run a file "pde2d.adp" is written + 24 + which tabulates the values of the magnitude of the gradient of the + 24 + solution (at the last time step or iteration) at an output NXP8Z by + 24 + NYP8Z grid of points (NXP8Z and NYP8Z are set to 101 in a PARAMETER + 24 + statement in the main program, so they can be changed if desired). + 24 + If NEQN > 1, a normalized average of the gradients of the NEQN + 24 + solution components is used. + 24 + + 24 + You can do all the "runs" in one program, by setting NPROB > 1. + 24 + Each pass through the DO loop, PDE2D will read the gradient values + 24 + output the previous pass. + 24 + + 24 + TRIDEN may also be a function of the initial triangle number KTRI. + 24 + + 24 + Increase the variable EXAG from its default value of 1.5 if you want + 24 + to exaggerate the grading of an adaptive triangulation (make it less + 24 + uniform). EXAG should normally not be larger than about 2.0. + 24 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 24A$$$$$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$$$$$$$$$$$ 24G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 24G$ enter: TRIDEN = EXP(-(X/1.E-6)**2-(Y/1.E-6)**2) $ 24G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 24H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 24H$ enter: TRIDEN = 1.0/(1.0+X**2+Y**2) $ 24H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25 If you don't want to read the FINE PRINT, default SHAPE. 25 25 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 25 + Enter a FORTRAN expression for SHAPE(X,Y), which controls the + 25 + approximate shape of the triangles. The triangulation refinement + 25 + will proceed with the goal of generating triangles with an average + 25 + height to width ratio of approximately SHAPE(X,Y) near the point + 25 + (X,Y). SHAPE must be positive. The default is SHAPE(X,Y)=1.0. + 25 + + 25 + SHAPE may also be a function of the initial triangle number KTRI. + 25 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 25A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25A$ press [RETURN] to default SHAPE $ 25A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25B$ press [RETURN] to default SHAPE $ 25B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25C$ press [RETURN] to default SHAPE $ 25C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25D$ press [RETURN] to default SHAPE $ 25D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25E$ press [RETURN] to default SHAPE $ 25E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25F$ press [RETURN] to default SHAPE $ 25F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25G$ press [RETURN] to default SHAPE $ 25G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25H$ press [RETURN] to default SHAPE $ 25H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 26 If you don't want to read the FINE PRINT, enter ISOLVE = 4. 26 26 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 26 + The following linear system solvers are available: + 26 + + 26 + 1. Band method + 26 + The band solver uses a reverse Cuthill-McKee ordering. + 26 + 2. Frontal method + 26 + This is an out-of-core version of the band solver. + 26 + 3. Jacobi bi-conjugate gradient method + 26 + This is a preconditioned bi-conjugate gradient, or + 26 + Lanczos, iterative method. (This solver is MPI- + 26 + enhanced, if MPI is available.) If you want to + 26 + override the default convergence tolerance, set a + 26 + new relative tolerance CGTL8Z in the main program. + 26 + 4. Sparse direct method + 26 + This is based on Harwell Library routines MA27/MA37, + 26 + developed by AEA Industrial Technology at Harwell + 26 + Laboratory, Oxfordshire, OX11 0RA, United Kingdom + 26 + (used by permission). + 26 + 5. Local solver + 26 + Choose this option ONLY if alternative linear system + 26 + solvers have been installed locally. See subroutines + 26 + (D)TD3M, (D)TD3N in file (d)subs.f for instructions + 26 + on how to add local solvers. + 26 + 6. MPI-based parallel band solver + 26 + This is a parallel solver which runs efficiently on + 26 + multiple processor machines, under MPI. It is a + 26 + band solver, with the matrix distributed over the + 26 + available processors. Choose this option ONLY if the + 26 + solver has been activated locally. See subroutine + 26 + (D)TD3O in file (d)subs.f for instructions on how to + 26 + activate this solver and the MPI-enhancements to the + 26 + conjugate gradient solver. + 26 + + 26 + Enter ISOLVE = 1,2,3,4,5 or 6 to select a linear system solver. + 26 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 26A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 26A$ enter: ISOLVE = 1 $ 26A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 26B$$$$$$$$$$$$$$$$$$$$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$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 26H$ enter: ISOLVE = 4 $ 26H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27 Enter the element degree (1,2,3 or 4) desired. A suggested value is 27 IDEG = 3. 27 27 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 27 + A negative value for IDEG can be entered, and elements of degree + 27 + ABS(IDEG) will be used, with a lower order numerical integration + 27 + scheme. This results in a slight increase in speed, but negative + 27 + values of IDEG are normally not recommended. + 27 + + 27 + The spatial discretization error is O(h**2), O(h**3), O(h**4) or + 27 + O(h**5) when IDEG = 1,2,3 or 4, respectively, is used, where h is + 27 + the maximum triangle diameter, even if the region is curved. + 27 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 27A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27A$ enter: IDEG = 3 $ 27A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27B$ enter: IDEG = 3 $ 27B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27C$ If we want to later change ITYPE to 4 and compute all eigenvalues, $ 27C$ IDEG=-1 or -3 are the best choices, for a symmetric 2D problem. $ 27C$ enter: IDEG = -3 $ 27C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27D$ enter: IDEG = -1 $ 27D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27E$ enter: IDEG = 4 $ 27E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27F$ enter: IDEG = 2 $ 27F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27G$ enter: IDEG = 3 $ 27G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27H$ IDEG = -1 or 1 should NOT be used with the penalty method, so $ 27H$ enter: IDEG = 4 $ 27H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28 What type of PDE problem do you want to solve? 28 28 1. a steady-state (time-independent) problem 28 2. a time-dependent problem 28 3. a linear, homogeneous eigenvalue problem 28 28 Enter 1,2 or 3 to select a problem type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EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28G$ Although we want to solve a series of steady-state problems, it is $ 28G$ more convenient to consider this as a time-dependent problem, with $ 28G$ C11=C12=C21=C22=0 and with the time variable T used to represent the $ 28G$ parameter beta. Thus $ 28G$ enter: 2 $ 28G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28H$ enter: 1 $ 28H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28I$ enter: 1 $ 28I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28J$ enter: 2 $ 28J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28K$ enter: 3 $ 28K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28L$ enter: 3 $ 28L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28M$ enter: 1 $ 28M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28N$ enter: 2 $ 28N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28O$ enter: 3 $ 28O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 29 If you don't want to read the FINE PRINT, enter 'no'. 29 29 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 29 + Are your eigenvalue PDEs complex? If 'yes', you must write each of + 29 + the unknown eigenfunctions, but NOT the eigenvalue (i.e., pretend + 29 + the eigenvalue is real even though it may not be), in terms of its + 29 + real and imaginary parts, and separate the equations into real and + 29 + imaginary parts. Then it is assumed that your unknowns represent + 29 + alternately the real and imaginary parts of the eigenfunctions, and + 29 + that your equations represent alternately the real and imaginary + 29 + parts of the eigenvalue differential equations. Note that your + 29 + first equation must represent exactly the real part of the first + 29 + complex PDE, your second equation must represent exactly the + 29 + imaginary part, etc. You must not reorder the equations, nor + 29 + multiply any equation through by a constant. + 29 + + 29 + Even if your eigenvalue PDEs are real, if a desired eigenvalue/ + 29 + eigenfunction is complex, you should answer 'yes' and treat the + 29 + PDEs as if they were complex, as outlined above. If you are going + 29 + to set ITYPE=4 to find all eigenvalues without eigenfunctions, + 29 + however, you should answer 'no' even if some eigenvalues are complex.+ 29 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 29 29 If you don't want to read the FINE PRINT above, enter 'no'. 29 29C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 29C$ enter: no $ 29C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 29F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 29F$ Although the PDEs are real, the eigenvalue/eigenfunction we want to $ 29F$ find is complex, so: $ 29F$ enter: yes $ 29F$ Then the eigenfunctions U and V will be replaced by U = UR+i*UI and $ 29F$ V = VR+i*VI, and the two complex equations $ 29F$ URxx+i*UIxx + URyy+i*UIyy + VRxx+i*VIxx + VRyy+i*VIyy = $ 29F$ lambda*(UR+i*UI) $ 29F$ -URxx-i*UIxx - URyy-i*UIyy + VRxx+i*VIxx + VRyy+i*VIyy = $ 29F$ lambda*(VR+i*VI) $ 29F$ must be broken into the four real equations $ 29F$ URxx + URyy + VRxx + VRyy = lambda*UR $ 29F$ UIxx + UIyy + VIxx + VIyy = lambda*UI $ 29F$ -URxx - URyy + VRxx + VRyy = lambda*VR $ 29F$ -UIxx - UIyy + VIxx + VIyy = lambda*VI $ 29F$ with boundary conditions UR=UI=VR=VI=0. $ 29F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 29K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 29K$ enter: no $ 29K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 29L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 29L$ enter: no $ 29L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 29O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 29O$ enter: no $ 29O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 30 The (shifted) inverse power method will be used to find the eigenvalue 30 closest to EV0R; enter a value for EV0R. The closer you choose EV0R 30 to the desired eigenvalue, the faster the convergence will be. The 30 default is EV0R = 0.0, that is, the smallest eigenvalue (in absolute 30 value) is found. 30C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 30C$ press [RETURN] to default EV0R $ 30C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 30K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 30K$ To find the eigenvalue near -3.4, $ 30K$ enter: EV0R = -3.0 $ 30K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 30L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 30L$ To find the eigenvalue nearest -20, $ 30L$ enter: EV0R = -20.0 $ 30L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 30O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 30O$ To find the eigenvalue near -13.6, $ 30O$ enter: EV0R = -15.0 $ 30O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 31 The (shifted) inverse power method will be used to find the eigenvalue 31 closest to EV0R+EV0I*I; enter values for EV0R and EV0I. The closer 31 you choose EV0R+EV0I*I to the desired eigenvalue, the faster the 31 convergence will be. The default is EV0R = EV0I = 0.0, that is, the 31 smallest eigenvalue (in absolute value) is found. 31F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 31F$ There is a complex eigenvalue at (1-i)*(-5.783186), to find this one $ 31F$ enter: EV0R = -6 $ 31F$ EV0I = 6 $ 31F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 32 How many iterations (NSTEPS) of the inverse power method do you want 32 to do? NSTEPS defaults to 25. 32 32 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 32 + After convergence of the inverse power method, the solution each + 32 + iteration will be a normalized eigenfunction corresponding to the + 32 + eigenvalue closest to EV0R (or EV0R+EV0I*I) and this eigenvalue will + 32 + be printed. In the FORTRAN program created by the preprocessor, + 32 + the last computed estimate of this eigenvalue will be returned as + 32 + EVLR8Z (or EVLR8Z+EVLI8Z*I), and ECON8Z will be .TRUE. if the + 32 + inverse power method has converged. + 32 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 32C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 32C$ press [RETURN] to default NSTEPS $ 32C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 32F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 32F$ press [RETURN] to default NSTEPS $ 32F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 32K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 32K$ enter: NSTEPS = 10 $ 32K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 32L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 32L$ press [RETURN] to default NSTEPS $ 32L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 32O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 32O$ press [RETURN] to default NSTEPS $ 32O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 33 Enter the initial time value (T0) and the final time value (TF), for 33 this time-dependent problem. T0 defaults to 0. 33 33 TF is not required to be greater than T0. 33D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 33D$ enter: T0 = 0.0 $ 33D$ TF = 10.0 $ 33D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 33G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 33G$ We want to search the interval 1.13 E7 < beta (=T) < 1.14 E7 for $ 33G$ eigenvalues, so $ 33G$ enter: T0 = 1.13E7 $ 33G$ TF = 1.14E7 $ 33G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 33J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 33J$ enter: T0 = 0 $ 33J$ TF = 0.6 $ 33J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 33N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 33N$ enter: T0 = 0 $ 33N$ TF = 10 $ 33N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 34 Is this a linear problem? ("linear" means all differential equations 34 and all boundary conditions are linear). If you aren't sure, it is 34 safer to answer "no". 34A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 34A$ enter: yes $ 34A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 34B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 34B$ enter: no $ 34B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 34D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 34D$ enter: no $ 34D$$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$$$$$$$$$$$$$$$$$$$$$$$$ 34N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 34N$ enter: no $ 34N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 35 Do you want the time step to be chosen adaptively? If you answer 35 'yes', you will then be prompted to enter a value for TOLER(1), the 35 local relative time discretization error tolerance. The default is 35 TOLER(1)=0.01. If you answer 'no', a user-specified constant time step 35 will be used. We suggest that you answer 'yes' and default TOLER(1) 35 (although for certain linear problems, a constant time step may be much 35 more efficient). 35 35 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 35 + If a negative value is specified for TOLER(1), then ABS(TOLER(1)) is + 35 + taken to be the "absolute" error tolerance. If a system of PDEs is + 35 + solved, by default the error tolerance specified in TOLER(1) applies + 35 + to all variables, but the error tolerance for the J-th variable can + 35 + be set individually by specifying a value for TOLER(J) using an + 35 + editor, after the end of the interactive session. + 35 + + 35 + Each time step, two steps of size dt/2 are taken, and that solution + 35 + is compared with the result when one step of size dt is taken. If + 35 + the maximum difference between the two answers is less than the + 35 + tolerance (for each variable), the time step dt is accepted (and the + 35 + next step dt is doubled, if the agreement is "too" good); otherwise + 35 + dt is halved and the process is repeated. Note that forcing the + 35 + local (one-step) error to be less than the tolerance does not + 35 + guarantee that the global (cumulative) error is less than that value.+ 35 + However, as the tolerance is decreased, the global error should + 35 + decrease correspondingly. + 35 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 35D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 35D$ enter: yes $ 35D$ TOLER(1) = 0.001 $ 35D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 35G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 35G$ enter: no $ 35G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 35J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 35J$ enter: no $ 35J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 35N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 35N$ enter: yes $ 35N$ then press [RETURN] to default TOLER(1) $ 35N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 36 The time stepsize will be chosen adaptively, between an upper limit 36 of DTMAX = (TF-T0)/NSTEPS and a lower limit of 0.0001*DTMAX. Enter 36 a value for NSTEPS (the minimum number of steps). 36 36 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 36 + If you later turn off adaptive time step control, the time stepsize + 36 + will be constant, DT = (TF-T0)/NSTEPS. + 36 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 36D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 36D$ So that the maximum time step will be (10.0-0.0)/10 = 1.0, $ 36D$ enter: NSTEPS = 10 $ 36D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 36N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 36N$ So that the maximum time step will be (10.0-0.0)/20 = 0.5, $ 36N$ enter: NSTEPS = 20 $ 36N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 37 If you don't want to read the FINE PRINT, it is safe (though possibly 37 very inefficient) to enter 'no'. 37 37 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 37 + If your time-dependent problem is linear with all PDE and boundary + 37 + condition coefficients independent of time except inhomogeneous + 37 + terms, then a large savings in execution time may be possible if + 37 + this is recognized (the LU decomposition computed on the first step + 37 + can be used on subsequent steps). Is this the case for your + 37 + problem? (Caution: if you answer 'yes' when you should not, you + 37 + will get incorrect results with no warning.) + 37 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 37G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 37G$ enter: no $ 37G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 37J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 37J$ enter: yes $ 37J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 38 The time stepsize will be constant, DT = (TF-T0)/NSTEPS. Enter a 38 value for NSTEPS, the number of time steps. 38 38 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 38 + If you later turn on adaptive step control, the time stepsize will be+ 38 + chosen adaptively, between an upper limit of DTMAX = (TF-T0)/NSTEPS + 38 + and a lower limit of 0.0001*DTMAX. + 38 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 38G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 38G$ We will try 100 values of beta (=T) in the interval (T0,TF), so $ 38G$ enter: NSTEPS = 100 $ 38G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 38J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 38J$ So that DT = (0.6-0.0)/30 = 0.02, $ 38J$ enter: NSTEPS = 30 $ 38J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 39 If you don't want to read the FINE PRINT, enter 'no'. 39 39 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 39 + Is the Crank-Nicolson scheme to be used to discretize time? If you + 39 + answer 'no', a backward Euler scheme will be used. + 39 + + 39 + If a user-specified constant time step is chosen, the second order + 39 + Crank Nicolson method is recommended only for problems with very + 39 + well-behaved solutions, and the first order backward Euler scheme + 39 + should be used for more difficult problems. In particular, do not + 39 + use the Crank Nicolson method if the left hand side of any PDE is + 39 + zero, for example, if a mixed elliptic/parabolic problem is solved. + 39 + + 39 + If adaptive time step control is chosen, however, an extrapolation + 39 + is done between the 1-step and 2-step answers which makes the Euler + 39 + method second order, and the Crank-Nicolson method strongly stable. + 39 + Thus in this case, both methods have second order accuracy, and both + 39 + are strongly stable. + 39 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 39D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 39D$ enter: no $ 39D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 39G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 39G$ Since C11=C12=C21=C22=0, it is essential that the backward Euler $ 39G$ method be used, so $ 39G$ enter: no $ 39G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 39J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 39J$ enter: yes $ 39J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 39N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 39N$ enter: yes $ 39N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 40 Give an upper limit on the number of Newton's method iterations 40 (NSTEPS) to be allowed for this nonlinear problem. NSTEPS defaults 40 to 15. 40 40 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 40 + The iteration will stop if convergence occurs before the upper + 40 + limit has been reached. In the FORTRAN program created by the + 40 + preprocessor, NCON8Z will be .TRUE. if Newton's method has converged.+ 40 + + 40 + For highly non-linear problems you may want to construct a one- + 40 + parameter family of problems using the variable T, such that for + 40 + T=1 the problems is easy (e.g. linear) and for T > N (N is less + 40 + NSTEPS), the problem reduces to the original highly nonlinear + 40 + problem. For example, the nonlinear term(s) may be multiplied by + 40 + MIN(1.0,(T-1.0)/N). + 40 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 40B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 40B$ press [RETURN] to default NSTEPS $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 41J$ enter: NEQN = 2 $ 41J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 41K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 41K$ enter: NEQN = 1 $ 41K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 41L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 41L$ enter: NEQN = 1 $ 41L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 41M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 41M$ enter: NEQN = 3 $ 41M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 41N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 41N$ enter: NEQN = 1 $ 41N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 41O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 41O$ enter: NEQN = 1 $ 41O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 42 You may now choose names for the component(s) of the (possibly vector) 42 solution U. Each must be an alphanumeric string of one to three 42 characters, beginning with a letter in the range A-H or O-Z. The 42 variable names X,Y,T,S,A and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$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 42G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 42G$ enter: U1 = H $ 42G$ U2 = E $ 42G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 42H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 42H$ enter: U1 = U $ 42H$ U2 = V $ 42H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 43 PDE2D finds an eigenvalue, lambda, of the (linear and homogeneous) 43 equation: 43 43 d/dX* A(X,Y,$$1,$$1x,$$1y) 43 + d/dY* B(X,Y,$$1,$$1x,$$1y) 43 = F(X,Y,$$1,$$1x,$$1y) 43 + lambda*RHO(X,Y)*$$1 43 43 with 'fixed' boundary condition: 43 43 $$1 = 0 43 43 or 'free' boundary condition: 43 43 A*nx + B*ny = GB(X,Y,$$1,$$1x,$$1y) 43 43 where $$1(X,Y) is the unknown and F,A,B,RHO,GB are user-supplied 43 functions. 43 43 note: 43 (nx,ny) = unit outward normal to the boundary 43 $$1x = d($$1)/dX 43 $$1y = d($$1)/dY 43 43 Is this problem symmetric? If you don't want to read the FINE PRINT, 43 it is safe to enter 'no'. 43 43 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 43 + This problem is called symmetric if the matrix + 43 + + 43 + F.$$1 F.$$1x F.$$1y + 43 + A.$$1 A.$$1x A.$$1y + 43 + B.$$1 B.$$1x B.$$1y + 43 + + 43 + is always symmetric, where F.$$1 means d(F)/d($$1), and similarly + 43 + for the other terms. In addition, GB must not depend on $$1x,$$1y. + 43 + + 43 + The memory and execution time are halved if the problem is known to + 43 + be symmetric. + 43 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 43C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 43C$ enter: yes $ 43C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 44 PDE2D finds an eigenvalue, lambda, of the (linear and homogeneous) 44 system: 44 44 d/dX* A1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 44 + d/dY* B1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 44 = F1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 44 + lambda*(RHO11(X,Y)*$$1 + RHO12(X,Y)*$$2) 44 44 d/dX* A2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 44 + d/dY* B2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 44 = F2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 44 + lambda*(RHO21(X,Y)*$$1 + RHO22(X,Y)*$$2) 44 44 with 'fixed' boundary conditions: 44 44 $$1 = 0 44 $$2 = 0 44 44 or 'free' boundary conditions: 44 44 A1*nx + B1*ny = GB1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 44 A2*nx + B2*ny = GB2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 44 44 where $$1(X,Y) and $$2(X,Y) are the unknowns and F1,A1,B1,RHO11,RHO12, 44 F2,A2,B2,RHO21,RHO22,GB1,GB2 are user-supplied functions. 44 44 note: 44 (nx,ny) = unit outward normal to the boundary 44 $$1x = d($$1)/dX $$2x = d($$2)/dX 44 $$1y = d($$1)/dY $$2y = d($$2)/dY 44 44 Is this problem symmetric? If you don't want to read the FINE PRINT, 44 it is safe to enter 'no'. 44 44 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 44 + This problem is called symmetric if each of the matrices + 44 + + 44 + F1.$$1 F1.$$1x F1.$$1y F1.$$2 F1.$$2x F1.$$2y + 44 + A1.$$1 A1.$$1x A1.$$1y A1.$$2 A1.$$2x A1.$$2y + 44 + B1.$$1 B1.$$1x B1.$$1y B1.$$2 B1.$$2x B1.$$2y + 44 + F2.$$1 F2.$$1x F2.$$1y F2.$$2 F2.$$2x F2.$$2y + 44 + A2.$$1 A2.$$1x A2.$$1y A2.$$2 A2.$$2x A2.$$2y + 44 + B2.$$1 B2.$$1x B2.$$1y B2.$$2 B2.$$2x B2.$$2y + 44 + + 44 + RHO11 RHO12 + 44 + RHO21 RHO22 + 44 + and + 44 + GB1.$$1 GB1.$$2 + 44 + GB2.$$1 GB2.$$2 + 44 + + 44 + is always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 44 + for the other terms. In addition, EV0I must be 0, and GB1,GB2 must + 44 + not depend on $$1x,$$1y,$$2x,$$2y. + 44 + + 44 + The memory and execution time are halved if the problem is known to + 44 + be symmetric. + 44 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 45 PDE2D finds an eigenvalue, lambda, of the (linear and homogeneous) 45 system: 45 45 d/dX* A1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 45 + d/dY* B1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 45 = F1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 45 + lambda*(RHO11(X,Y)*$$1 + RHO12(X,Y)*$$2 + RHO13(X,Y)*$$3) 45 45 d/dX* A2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 45 + d/dY* B2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 45 = F2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 45 + lambda*(RHO21(X,Y)*$$1 + RHO22(X,Y)*$$2 + RHO23(X,Y)*$$3) 45 45 d/dX* A3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 45 + d/dY* B3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 45 = F3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 45 + lambda*(RHO31(X,Y)*$$1 + RHO32(X,Y)*$$2 + RHO33(X,Y)*$$3) 45 45 with 'fixed' boundary conditions: 45 45 $$1 = 0 45 $$2 = 0 45 $$3 = 0 45 45 or 'free' boundary conditions: 45 45 A1*nx + B1*ny = GB1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 45 A2*nx + B2*ny = GB2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 45 A3*nx + B3*ny = GB3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 45 45 where $$1(X,Y),$$2(X,Y),$$3(X,Y) are the unknowns and F1,A1,B1,RHO11, 45 RHO12,RHO13,F2,A2,B2,RHO21,RHO22,RHO23,F3,A3,B3,RHO31,RHO32,RHO33, 45 GB1,GB2,GB3 are user-supplied functions. 45 45 note: 45 (nx,ny) = unit outward normal to the boundary 45 $$1x = d($$1)/dX $$2x = d($$2)/dX $$3x = d($$3)/dX 45 $$1y = d($$1)/dY $$2y = d($$2)/dY $$3y = d($$3)/dY 45 45 Is this problem symmetric? If you don't want to read the FINE PRINT, 45 it is safe to enter 'no'. 45 45 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 45 + This problem is called symmetric if each of the matrices + 45 + + 45 + F1.$$1 F1.$$1x F1.$$1y F1.$$2 F1.$$2x F1.$$2y .. + 45 + A1.$$1 A1.$$1x A1.$$1y A1.$$2 A1.$$2x A1.$$2y .. + 45 + B1.$$1 B1.$$1x B1.$$1y B1.$$2 B1.$$2x B1.$$2y .. + 45 + F2.$$1 F2.$$1x F2.$$1y F2.$$2 F2.$$2x F2.$$2y .. + 45 + A2.$$1 A2.$$1x A2.$$1y A2.$$2 A2.$$2x A2.$$2y .. + 45 + B2.$$1 B2.$$1x B2.$$1y B2.$$2 B2.$$2x B2.$$2y .. + 45 + . . . . . . + 45 + . . . . . . + 45 + + 45 + RHO11 RHO12 RHO13 + 45 + RHO21 RHO22 RHO23 + 45 + RHO31 RHO32 RHO33 + 45 + and + 45 + GB1.$$1 GB1.$$2 GB1.$$3 + 45 + GB2.$$1 GB2.$$2 GB2.$$3 + 45 + GB3.$$1 GB3.$$2 GB3.$$3 + 45 + + 45 + is always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 45 + for the other terms. In addition GB1,GB2,GB3 must not depend on + 45 + $$1x,$$1y,$$2x,$$2y,$$3x,$$3y. + 45 + + 45 + The memory and execution time are halved if the problem is known to + 45 + be symmetric. + 45 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 46 PDE2D finds an eigenvalue, lambda, of the (linear and homogeneous) 46 system: 46 46 d/dX*A1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 46 +d/dY*B1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 46 = F1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 46 +lambda*(RHO11(X,Y)*$$1+RHO12(X,Y)*$$2+RHO13(X,Y)*$$3+RHO14(X,Y)*$$4..) 46 46 d/dX*A2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 46 +d/dY*B2(X,Y,$$1,$$1x,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$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 46 A4*nx + B4*ny = GB4(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 46 . . . 46 . . . 46 where $$1(X,Y),$$2(X,Y),$$3(X,Y),$$4(X,Y)... are the unknowns and 46 FI,AI,BI,RHOIJ,GBI are user-supplied functions. 46 46 note: 46 (nx,ny) = unit outward normal to the boundary 46 $$1x=d($$1)/dX $$2x=d($$2)/dX $$3x=d($$3)/dX $$4x=d($$4)/dX ... 46 $$1y=d($$1)/dY $$2y=d($$2)/dY $$3y=d($$3)/dY $$4y=d($$4)/dY ... 46 46 Is this problem symmetric? If you don't want to read the FINE PRINT, 46 it is safe to enter 'no'. 46 46 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 46 + This problem is called symmetric if each of the matrices + 46 + + 46 + F1.$$1 F1.$$1x F1.$$1y F1.$$2 F1.$$2x F1.$$2y .. + 46 + A1.$$1 A1.$$1x A1.$$1y A1.$$2 A1.$$2x A1.$$2y .. + 46 + B1.$$1 B1.$$1x B1.$$1y B1.$$2 B1.$$2x B1.$$2y .. + 46 + F2.$$1 F2.$$1x F2.$$1y F2.$$2 F2.$$2x F2.$$2y .. + 46 + A2.$$1 A2.$$1x A2.$$1y A2.$$2 A2.$$2x A2.$$2y .. + 46 + B2.$$1 B2.$$1x B2.$$1y B2.$$2 B2.$$2x B2.$$2y .. + 46 + . . . . . . + 46 + . . . . . . + 46 + + 46 + RHO11 RHO12 RHO13 RHO14 .... + 46 + RHO21 RHO22 RHO23 RHO24 .... + 46 + RHO31 RHO32 RHO33 RHO34 .... + 46 + RHO41 RHO42 RHO43 RHO44 .... + 46 + . . . . + 46 + . . . . + 46 + and + 46 + GB1.$$1 GB1.$$2 GB1.$$3 GB1.$$4 .... + 46 + GB2.$$1 GB2.$$2 GB2.$$3 GB2.$$4 .... + 46 + GB3.$$1 GB3.$$2 GB3.$$3 GB3.$$4 .... + 46 + GB4.$$1 GB4.$$2 GB4.$$3 GB4.$$4 .... + 46 + . . . . + 46 + . . . . + 46 + is always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 46 + for the other terms. In addition, EV0I must be 0, and GB1,GB2,GB3, + 46 + GB4... must not depend on $$1x,$$1y,$$2x,$$2y,$$3x,$$3y,$$4x,$$4y... + 46 + + 46 + The memory and execution time are halved if the problem is known to + 46 + be symmetric. + 46 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 46F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 46F$ enter: no $ 46F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 47 PDE2D solves the equation: 47 47 d/dX* A(X,Y,$$1,$$1x,$$1y) 47 + d/dY* B(X,Y,$$1,$$1x,$$1y) 47 = F(X,Y,$$1,$$1x,$$1y) 47 47 with 'fixed' boundary condition: 47 47 $$1 = FB(X,Y) 47 47 or 'free' boundary condition: 47 47 A*nx + B*ny = GB(X,Y,$$1,$$1x,$$1y) 47 47 where $$1(X,Y) is the unknown and F,A,B,FB,GB are user-supplied 47 functions. 47 47 note: 47 (nx,ny) = unit outward normal to the boundary 47 $$1x = d($$1)/dX 47 $$1y = d($$1)/dY 47 47 Is this problem symmetric? If you don't want to read the FINE PRINT, 47 it is safe to enter 'no'. 47 47 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 47 + This problem is called symmetric if the matrix + 47 + + 47 + F.$$1 F.$$1x F.$$1y + 47 + A.$$1 A.$$1x A.$$1y + 47 + B.$$1 B.$$1x B.$$1y + 47 + + 47 + is always symmetric, where F.$$1 means d(F)/d($$1), and similarly + 47 + for the other terms. In addition, GB must not depend on $$1x,$$1y. + 47 + + 47 + The memory and execution time are halved if the problem is known to + 47 + be symmetric. + 47 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 47B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 47B$ The Jacobian matrix is diagonal so, $ 47B$ enter: yes $ 47B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48 PDE2D solves the system of equations: 48 48 d/dX* A1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 48 + d/dY* B1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 48 = F1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 48 48 d/dX* A2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 48 + d/dY* B2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 48 = F2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 48 48 with 'fixed' boundary conditions: 48 48 $$1 = FB1(X,Y) 48 $$2 = FB2(X,Y) 48 48 or 'free' boundary conditions: 48 48 A1*nx + B1*ny = GB1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 48 A2*nx + B2*ny = GB2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 48 48 where $$1(X,Y) and $$2(X,Y) are the unknowns and F1,A1,B1,F2,A2,B2, 48 FB1,FB2,GB1,GB2 are user-supplied functions. 48 48 note: 48 (nx,ny) = unit outward normal to the boundary 48 $$1x = d($$1)/dX $$2x = d($$2)/dX 48 $$1y = d($$1)/dY $$2y = d($$2)/dY 48 48 Is this problem symmetric? If you don't want to read the FINE PRINT, 48 it is safe to enter 'no'. 48 48 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 48 + This problem is called symmetric if each of the matrices + 48 + + 48 + F1.$$1 F1.$$1x F1.$$1y F1.$$2 F1.$$2x F1.$$2y + 48 + A1.$$1 A1.$$1x A1.$$1y A1.$$2 A1.$$2x A1.$$2y + 48 + B1.$$1 B1.$$1x B1.$$1y B1.$$2 B1.$$2x B1.$$2y + 48 + F2.$$1 F2.$$1x F2.$$1y F2.$$2 F2.$$2x F2.$$2y + 48 + A2.$$1 A2.$$1x A2.$$1y A2.$$2 A2.$$2x A2.$$2y + 48 + B2.$$1 B2.$$1x B2.$$1y B2.$$2 B2.$$2x B2.$$2y + 48 + + 48 + and + 48 + GB1.$$1 GB1.$$2 + 48 + GB2.$$1 GB2.$$2 + 48 + + 48 + is always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 48 + for the other terms. In addition, GB1,GB2 must not depend on + 48 + $$1x,$$1y,$$2x,$$2y. + 48 + + 48 + The memory and execution time are halved if the problem is known to + 48 + be symmetric. + 48 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 48A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48A$ enter: no $ 48A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48E$ enter: yes $ 48E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48H$ enter: no $ 48H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 49 PDE2D solves the system of equations: 49 49 d/dX* A1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 49 + d/dY* B1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 49 = F1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 49 49 d/dX* A2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 49 + d/dY* B2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 49 = F2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 49 49 d/dX* A3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 49 + d/dY* B3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 49 = F3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 49 49 with 'fixed' boundary conditions: 49 49 $$1 = FB1(X,Y) 49 $$2 = FB2(X,Y) 49 $$3 = FB3(X,Y) 49 49 or 'free' boundary conditions: 49 49 A1*nx + B1*ny = GB1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 49 A2*nx + B2*ny = GB2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 49 A3*nx + B3*ny = GB3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 49 49 where $$1(X,Y),$$2(X,Y),$$3(X,Y) are the unknowns and F1,A1,B1,F2, 49 A2,B2,F3,A3,B3,FB1,FB2,FB3,GB1,GB2,GB3 are user-supplied functions. 49 49 note: 49 (nx,ny) = unit outward normal to the boundary 49 $$1x = d($$1)/dX $$2x = d($$2)/dX $$3x = d($$3)/dX 49 $$1y = d($$1)/dY $$2y = d($$2)/dY $$3y = d($$3)/dY 49 49 Is this problem symmetric? If you don't want to read the FINE PRINT, 49 it is safe to enter 'no'. 49 49 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 49 + This problem is called symmetric if each of the matrices + 49 + + 49 + F1.$$1 F1.$$1x F1.$$1y F1.$$2 F1.$$2x F1.$$2y .. + 49 + A1.$$1 A1.$$1x A1.$$1y A1.$$2 A1.$$2x A1.$$2y .. + 49 + B1.$$1 B1.$$1x B1.$$1y B1.$$2 B1.$$2x B1.$$2y .. + 49 + F2.$$1 F2.$$1x F2.$$1y F2.$$2 F2.$$2x F2.$$2y .. + 49 + A2.$$1 A2.$$1x A2.$$1y A2.$$2 A2.$$2x A2.$$2y .. + 49 + B2.$$1 B2.$$1x B2.$$1y B2.$$2 B2.$$2x B2.$$2y .. + 49 + . . . . . . + 49 + . . . . . . + 49 + + 49 + and + 49 + GB1.$$1 GB1.$$2 GB1.$$3 + 49 + GB2.$$1 GB2.$$2 GB2.$$3 + 49 + GB3.$$1 GB3.$$2 GB3.$$3 + 49 + + 49 + is always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 49 + for the other terms. In addition, GB1,GB2,GB3 must not depend on + 49 + $$1x,$$1y,$$2x,$$2y,$$3x,$$3y. + 49 + + 49 + The memory and execution time are halved if the problem is known to + 49 + be symmetric. + 49 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 50 PDE2D solves the system of equations: 50 50 d/dX*A1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 50 +d/dY*B1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 50 = F1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 50 50 d/dX*A2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 50 +d/dY*B2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 50 = F2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 50 50 d/dX*A3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 50 +d/dY*B3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 50 = F3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 50 50 d/dX*A4(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 50 +d/dY*B4(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 50 = F4(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 50 . 50 . 50 with 'fixed' boundary conditions: 50 50 $$1 = FB1(X,Y) 50 $$2 = FB2(X,Y) 50 $$3 = FB3(X,Y) 50 $$4 = FB4(X,Y) 50 . . 50 . . 50 or 'free' boundary conditions: 50 50 A1*nx + B1*ny = GB1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 50 A2*nx + B2*ny = GB2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 50 A3*nx + B3*ny = GB3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 50 A4*nx + B4*ny = GB4(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 50 . . . 50 . . . 50 where $$1(X,Y),$$2(X,Y),$$3(X,Y),$$4(X,Y)... are the unknowns and 50 FI,AI,BI,FBI,GBI are user-supplied functions. 50 50 note: 50 (nx,ny) = unit outward normal to the boundary 50 $$1x=d($$1)/dX $$2x=d($$2)/dX $$3x=d($$3)/dX $$4x=d($$4)/dX ... 50 $$1y=d($$1)/dY $$2y=d($$2)/dY $$3y=d($$3)/dY $$4y=d($$4)/dY ... 50 50 Is this problem symmetric? If you don't want to read the FINE PRINT, 50 it is safe to enter 'no'. 50 50 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 50 + This problem is called symmetric if each of the matrices + 50 + + 50 + F1.$$1 F1.$$1x F1.$$1y F1.$$2 F1.$$2x F1.$$2y .. + 50 + A1.$$1 A1.$$1x A1.$$1y A1.$$2 A1.$$2x A1.$$2y .. + 50 + B1.$$1 B1.$$1x B1.$$1y B1.$$2 B1.$$2x B1.$$2y .. + 50 + F2.$$1 F2.$$1x F2.$$1y F2.$$2 F2.$$2x F2.$$2y .. + 50 + A2.$$1 A2.$$1x A2.$$1y A2.$$2 A2.$$2x A2.$$2y .. + 50 + B2.$$1 B2.$$1x B2.$$1y B2.$$2 B2.$$2x B2.$$2y .. + 50 + . . . . . . + 50 + . . . . . . + 50 + and + 50 + GB1.$$1 GB1.$$2 GB1.$$3 GB1.$$4 .... + 50 + GB2.$$1 GB2.$$2 GB2.$$3 GB2.$$4 .... + 50 + GB3.$$1 GB3.$$2 GB3.$$3 GB3.$$4 .... + 50 + GB4.$$1 GB4.$$2 GB4.$$3 GB4.$$4 .... + 50 + . . . . + 50 + . . . . + 50 + is always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 50 + for the other terms. In addition, GB1,GB2,GB3,GB4... must not + 50 + depend on $$1x,$$1y,$$2x,$$2y,$$3x,$$3y,$$4x,$$4y... + 50 + + 50 + The memory and execution time are halved if the problem is known to + 50 + be symmetric. + 50 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 51 PDE2D solves the equation: 51 51 C(X,Y,T,$$1,$$1x,$$1y)*d($$1)/dT = 51 d/dX* A(X,Y,T,$$1,$$1x,$$1y) 51 + d/dY* B(X,Y,T,$$1,$$1x,$$1y) 51 - F(X,Y,T,$$1,$$1x,$$1y) 51 51 with 'fixed' boundary condition: 51 51 $$1 = FB(X,Y,T) 51 51 or 'free' boundary condition: 51 51 A*nx + B*ny = GB(X,Y,T,$$1,$$1x,$$1y) 51 51 and initial condition: 51 51 $$1 = $$10(X,Y) at T=T0 51 51 where $$1(X,Y,T) is the unknown and C,F,A,B,FB,GB,$$10 are 51 user-supplied functions. 51 51 note: 51 (nx,ny) = unit outward normal to the boundary 51 $$1x = d($$1)/dX 51 $$1y = d($$1)/dY 51 51 Is this problem symmetric? If you don't want to read the FINE PRINT, 51 it is safe to enter 'no'. 51 51 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 51 + This problem is called symmetric if the matrix + 51 + + 51 + F.$$1 F.$$1x F.$$1y + 51 + A.$$1 A.$$1x A.$$1y + 51 + B.$$1 B.$$1x B.$$1y + 51 + + 51 + is always symmetric, where F.$$1 means d(F)/d($$1), and similarly + 51 + for the other terms. In addition, GB must not depend on $$1x,$$1y. + 51 + + 51 + The memory and execution time are halved if the problem is known to + 51 + be symmetric. + 51 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 51D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 51D$ The Jacobian matrix is diagonal so, $ 51D$ enter: yes $ 51D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 52 PDE2D solves the system of equations: 52 52 C11(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y)*d($$1)/dT 52 + C12(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y)*d($$2)/dT = 52 d/dX* A1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 52 + d/dY* B1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 52 - F1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 52 C21(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y)*d($$1)/dT 52 + C22(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y)*d($$2)/dT = 52 d/dX* A2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 52 + d/dY* B2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 52 - F2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 52 52 with 'fixed' boundary conditions: 52 52 $$1 = FB1(X,Y,T) 52 $$2 = FB2(X,Y,T) 52 52 or 'free' boundary conditions: 52 52 A1*nx + B1*ny = GB1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 52 A2*nx + B2*ny = GB2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 52 52 and initial conditions: 52 52 $$1 = $$10(X,Y) at T=T0 52 $$2 = $$20(X,Y) 52 52 where $$1(X,Y,T) and $$2(X,Y,T) are the unknowns and C11,C12,F1,A1,B1, 52 C21,C22,F2,A2,B2,FB1,FB2,GB1,GB2,$$10,$$20 are user-supplied functions. 52 52 note: 52 (nx,ny) = unit outward normal to the boundary 52 $$1x = d($$1)/dX $$2x = d($$2)/dX 52 $$1y = d($$1)/dY $$2y = d($$2)/dY 52 52 Is this problem symmetric? If you don't want to read the FINE PRINT, 52 it is safe to enter 'no'. 52 52 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 52 + This problem is called symmetric if each of the matrices + 52 + + 52 + F1.$$1 F1.$$1x F1.$$1y F1.$$2 F1.$$2x F1.$$2y + 52 + A1.$$1 A1.$$1x A1.$$1y A1.$$2 A1.$$2x A1.$$2y + 52 + B1.$$1 B1.$$1x B1.$$1y B1.$$2 B1.$$2x B1.$$2y + 52 + F2.$$1 F2.$$1x F2.$$1y F2.$$2 F2.$$2x F2.$$2y + 52 + A2.$$1 A2.$$1x A2.$$1y A2.$$2 A2.$$2x A2.$$2y + 52 + B2.$$1 B2.$$1x B2.$$1y B2.$$2 B2.$$2x B2.$$2y + 52 + + 52 + C11 C12 + 52 + C21 C22 + 52 + and + 52 + GB1.$$1 GB1.$$2 + 52 + GB2.$$1 GB2.$$2 + 52 + + 52 + is always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 52 + for the other terms. In addition, GB1,GB2 must not depend on + 52 + $$1x,$$1y,$$2x,$$2y. + 52 + + 52 + The memory and execution time are halved if the problem is known to + 52 + be symmetric. + 52 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 52G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 52G$ It can be verified with some effort that the PDE system is symmetric,$ 52G$ and it will be seen later that GB1.E=GB2.H=0, so $ 52G$ enter: yes $ 52G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 53 PDE2D solves the system of equations: 53 53 C11(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y)*d($$1)/dT 53 + C12(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y)*d($$2)/dT 53 + C13(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y)*d($$3)/dT = 53 d/dX* A1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 53 + d/dY* B1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 53 - F1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 53 C21(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y)*d($$1)/dT 53 + C22(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y)*d($$2)/dT 53 + C23(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y)*d($$3)/dT = 53 d/dX* A2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 53 + d/dY* B2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 53 - F2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 53 C31(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y)*d($$1)/dT 53 + C32(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y)*d($$2)/dT 53 + C33(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y)*d($$3)/dT = 53 d/dX* A3(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 53 + d/dY* B3(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 53 - F3(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 53 53 with 'fixed' boundary conditions: 53 53 $$1 = FB1(X,Y,T) 53 $$2 = FB2(X,Y,T) 53 $$3 = FB3(X,Y,T) 53 53 or 'free' boundary conditions: 53 53 A1*nx + B1*ny = GB1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 53 A2*nx + B2*ny = GB2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 53 A3*nx + B3*ny = GB3(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 53 53 and initial conditions: 53 53 $$1 = $$10(X,Y) at T=T0 53 $$2 = $$20(X,Y) 53 $$3 = $$30(X,Y) 53 53 where $$1(X,Y,T),$$2(X,Y,T),$$3(X,Y,T) are the unknowns and C11,C12, 53 C13,F1,A1,B1,C21,C22,C23,F2,A2,B2,C31,C32,C33,F3,A3,B3,FB1,FB2,FB3, 53 GB1,GB2,GB3,$$10,$$20,$$30 are user-supplied functions. 53 53 note: 53 (nx,ny) = unit outward normal to the boundary 53 $$1x = d($$1)/dX $$2x = d($$2)/dX $$3x = d($$3)/dX 53 $$1y = d($$1)/dY $$2y = d($$2)/dY $$3y = d($$3)/dY 53 53 Is this problem symmetric? If you don't want to read the FINE PRINT, 53 it is safe to enter 'no'. 53 53 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 53 + This problem is called symmetric if each of the matrices + 53 + + 53 + F1.$$1 F1.$$1x F1.$$1y F1.$$2 F1.$$2x F1.$$2y .. + 53 + A1.$$1 A1.$$1x A1.$$1y A1.$$2 A1.$$2x A1.$$2y .. + 53 + B1.$$1 B1.$$1x B1.$$1y B1.$$2 B1.$$2x B1.$$2y .. + 53 + F2.$$1 F2.$$1x F2.$$1y F2.$$2 F2.$$2x F2.$$2y .. + 53 + A2.$$1 A2.$$1x A2.$$1y A2.$$2 A2.$$2x A2.$$2y .. + 53 + B2.$$1 B2.$$1x B2.$$1y B2.$$2 B2.$$2x B2.$$2y .. + 53 + . . . . . . + 53 + . . . . . . + 53 + + 53 + C11 C12 C13 + 53 + C21 C22 C23 + 53 + C31 C32 C33 + 53 + and + 53 + GB1.$$1 GB1.$$2 GB1.$$3 + 53 + GB2.$$1 GB2.$$2 GB2.$$3 + 53 + GB3.$$1 GB3.$$2 GB3.$$3 + 53 + + 53 + is always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 53 + for the other terms. In addition, GB1,GB2,GB3 must not depend on + 53 + $$1x,$$1y,$$2x,$$2y,$$3x,$$3y. + 53 + + 53 + The memory and execution time are halved if the problem is known to + 53 + be symmetric. + 53 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 54 PDE2D solves the system of equations: 54 54 C11(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$1)/dT 54 + C12(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$2)/dT 54 + C13(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$3)/dT 54 + C14(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$4)/dT...= 54 d/dX* A1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 54 + d/dY* B1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 54 - F1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 54 C21(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$1)/dT 54 + C22(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$2)/dT 54 + C23(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$3)/dT 54 + C24(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$4)/dT...= 54 d/dX* A2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 54 + d/dY* B2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 54 - F2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 54 C31(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$1)/dT 54 + C32(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$2)/dT 54 + C33(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$3)/dT 54 + C34(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$4)/dT...= 54 d/dX* A3(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 54 + d/dY* B3(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 54 - F3(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 54 C41(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$1)/dT 54 + C42(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$2)/dT 54 + C43(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$3)/dT 54 + C44(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$4)/dT...= 54 d/dX* A4(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 54 + d/dY* B4(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 54 - F4(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 54 . 54 . 54 with 'fixed' boundary conditions: 54 54 $$1 = FB1(X,Y,T) 54 $$2 = FB2(X,Y,T) 54 $$3 = FB3(X,Y,T) 54 $$4 = FB4(X,Y,T) 54 . . 54 . . 54 or 'free' boundary conditions: 54 54 A1*nx + B1*ny = GB1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y..) 54 A2*nx + B2*ny = GB2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y..) 54 A3*nx + B3*ny = GB3(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y..) 54 A4*nx + B4*ny = GB4(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y..) 54 . . . 54 . . . 54 and initial conditions: 54 54 $$1 = $$10(X,Y) at T=T0 54 $$2 = $$20(X,Y) 54 $$3 = $$30(X,Y) 54 $$4 = $$40(X,Y) 54 . . 54 . . 54 where $$1(X,Y,T),$$2(X,Y,T),$$3(X,Y,T),$$4(X,Y,T)... are the unknowns 54 and CIJ,FI,AI,BI,FBI,GBI,$$10,$$20,$$30,$$40...are user-supplied 54 functions. 54 54 note: 54 (nx,ny) = unit outward normal to the boundary 54 $$1x=d($$1)/dX $$2x=d($$2)/dX $$3x=d($$3)/dX $$4x=d($$4)/dX ... 54 $$1y=d($$1)/dY $$2y=d($$2)/dY $$3y=d($$3)/dY $$4y=d($$4)/dY ... 54 54 Is this problem symmetric? If you don't want to read the FINE PRINT, 54 it is safe to enter 'no'. 54 54 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 54 + This problem is called symmetric if each of the matrices + 54 + + 54 + F1.$$1 F1.$$1x F1.$$1y F1.$$2 F1.$$2x F1.$$2y .. + 54 + A1.$$1 A1.$$1x A1.$$1y A1.$$2 A1.$$2x A1.$$2y .. + 54 + B1.$$1 B1.$$1x B1.$$1y B1.$$2 B1.$$2x B1.$$2y .. + 54 + F2.$$1 F2.$$1x F2.$$1y F2.$$2 F2.$$2x F2.$$2y .. + 54 + A2.$$1 A2.$$1x A2.$$1y A2.$$2 A2.$$2x A2.$$2y .. + 54 + B2.$$1 B2.$$1x B2.$$1y B2.$$2 B2.$$2x B2.$$2y .. + 54 + . . . . . . + 54 + . . . . . . + 54 + C11 C12 C13 C14 ... + 54 + C21 C22 C23 C24 ... + 54 + C31 C32 C33 C34 ... + 54 + C41 C42 C43 C44 ... + 54 + . . . . + 54 + . . . . + 54 + and + 54 + GB1.$$1 GB1.$$2 GB1.$$3 GB1.$$4 .... + 54 + GB2.$$1 GB2.$$2 GB2.$$3 GB2.$$4 .... + 54 + GB3.$$1 GB3.$$2 GB3.$$3 GB3.$$4 .... + 54 + GB4.$$1 GB4.$$2 GB4.$$3 GB4.$$4 .... + 54 + . . . . + 54 + . . . . + 54 + is always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 54 + for the other terms. In addition, GB1,GB2,GB3,GB4... must not + 54 + depend on $$1x,$$1y,$$2x,$$2y,$$3x,$$3y,$$4x,$$4y... + 54 + + 54 + The memory and execution time are halved if the problem is known to + 54 + be symmetric. + 54 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 55 If you don't want to read the FINE PRINT, enter 'yes' (strongly 55 recommended). 55 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 55 + The partial derivatives of some of the PDE and boundary condition + 55 + coefficients are required by PDE2D. These may be calculated + 55 + automatically using a finite difference approximation, or supplied + 55 + by the user. Do you want them to be calculated automatically? + 55 + + 55 + If you answer 'yes', you will not be asked to supply the derivatives,+ 55 + but there is a small risk that the inaccuracies introduced by the + 55 + finite difference approximation may cause the Newton iteration + 55 + to converge more slowly or to diverge, especially if low precision + 55 + is used. This risk is very low, however, and since answering 'no' + 55 + means you may have to compute many partial derivatives, it is + 55 + recommended you answer 'yes' unless you have some reason to believe + 55 + there is a problem with the finite difference approximations. + 55 + + 55 + If you supply analytic partial derivatives, PDE2D will do some spot + 55 + checking and can usually issue a warning if any are supplied + 55 + incorrectly. + 55 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 55B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 55B$ enter: yes $ 55B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 55D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 55D$ enter: yes $ 55D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 55H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 55H$ enter: yes $ 55H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 55N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 55N$ enter: yes $ 55N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 56 You may calculate one or more integrals (over the entire region) of 56 some functions of the solution and its derivatives. How many integrals 56 (NINT), if any, do you want to calculate? 56 56 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 56 + In the FORTRAN program created by the preprocessor, the computed + 56 + values of the integrals will be returned in the vector SINT8Z. If + 56 + several iterations or time steps are done, only the last computed + 56 + values are saved in SINT8Z (all values are printed). + 56 + + 56 + A limiting value, SLIM8Z(I), for the I-th integral can be set + 56 + below in the main program. The computations will then stop + 56 + gracefully whenever SINT8Z(I) > SLIM8Z(I), for any I=1...NINT. + 56 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 56A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 56A$ enter: NINT = 1 $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$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 56N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 56N$ enter: NINT = 1 $ 56N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 56O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 56O$ enter: NINT = 1 $ 56O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 57 Enter FORTRAN expressions for the functions whose integrals are to be 57 calculated and printed. They may be functions of 57 57 X,Y,$$1,$$1x,$$1y and (if applicable) T 57 57 The integrals may also contain references to the initial triangle 57 number KTRI. 57 57 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 57 + If you only want to integrate a function over part of the region, + 57 + define that function to be zero in the rest of the region. + 57 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 57B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 57B$ We want to calculate the L1 norm of the error, so $ 57B$ enter: INTEGRAL = ABS(U-TRUE(X,Y)) $ 57B$ where TRUE(X,Y) is the true solution, to be defined later. $ 57B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 58 Enter FORTRAN expressions for the functions whose integrals are to be 58 calculated and printed. They may be functions of 58 58 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y and (if applicable) T 58 58 The integrals may also contain references to the initial triangle 58 number KTRI. 58 58 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 58 + If you only want to integrate a function over part of the region, + 58 + define that function to be zero in the rest of the region. + 58 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 58A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 58A$ It can be shown that for this problem, the integral of (Uxx+Uyy)^2 $ 58A$ is equal to -U(0,0) = 0.0464. As a check on the solution, $ 58A$ enter: INTEGRAL = V**2 $ 58A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 58E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 58E$ We will calculate the total volume change by integrating 2*(Ux+Vy) $ 58E$ over the half-block. (Correct value is about 0.00333.) $ 58E$ enter: INTEGRAL = 2*(Ux+Vy) $ 58E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 58G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 58G$ We will integrate abs(H)+abs(E), and identify eigenvalues as those $ 58G$ values of beta (=T) which make this solution norm large. $ 58G$ enter: INTEGRAL = ABS(H)+ABS(E) $ 58G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59 Enter FORTRAN expressions for the functions whose integrals are to be 59 calculated and printed. They may be functions of 59 59 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y and (if applicable) T 59 59 The integrals may also contain references to the initial triangle 59 number KTRI. 59 59 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 59 + If you only want to integrate a function over part of the region, + 59 + define that function to be zero in the rest of the region. + 59 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 60 Enter FORTRAN expressions for the functions whose integrals are to be 60 calculated and printed. They may be functions of 60 60 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y... 60 and (if applicable) T 60 60 The integrals may also contain references to the initial triangle 60 number KTRI. 60 60 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 60 + If you only want to integrate a function over part of the region, + 60 + define that function to be zero in the rest of the region. + 60 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 61 You may calculate one or more boundary integrals (over the entire 61 boundary) of some functions of the solution and its derivatives. How 61 many boundary integrals (NBINT), if any, do you want to calculate? 61 61 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 61 + In the FORTRAN program created by the preprocessor, the computed + 61 + values of the integrals will be returned in the vector BINT8Z. If + 61 + several iterations or time steps are done, only the last computed + 61 + values are saved in BINT8Z (all values are printed). + 61 + + 61 + A limiting value, BLIM8Z(I), for the I-th boundary integral can be + 61 + set below in the main program. The computations will then stop + 61 + gracefully whenever BINT8Z(I) > BLIM8Z(I), for any I=1...NBINT. + 61 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 61A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61A$ enter: NBINT = 1 $ 61A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61B$ enter: NBINT = 0 $ 61B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$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$$$$$$$$$$$ 61O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61O$ enter: NBINT = 0 $ 61O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 62 Enter FORTRAN expressions for the functions whose integrals are to be 62 calculated and printed. They may be functions of 62 62 X,Y,$$1,$$1x,$$1y and (if applicable) T 62 62 The components (NORMx,NORMy) of the unit outward normal vector, and the 62 initial triangle number KTRI, and the boundary arc number IARC may also 62 be referenced. You can also reference the normal derivative $$1norm. 62 62 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 62 + CURVED interior interface arcs are considered part of the boundary, + 62 + for the boundary integral computations, ONLY IF they have arc numbers+ 62 + in the range 8000-8999. In this case, since an interface arc is + 62 + considered to be a boundary for both of the subregions it separates, + 62 + the boundary integral will be computed twice on each curved + 62 + interface arc, once with (NORMx,NORMy) defined in each direction. + 62 + + 62 + If you only want to integrate a function over part of the boundary, + 62 + define that function to be zero on the rest of the boundary. You + 62 + can examine the point (X,Y) to determine if it is on the desired + 62 + boundary segment, or the boundary arc number IARC, or the initial + 62 + triangle number KTRI (if INTRI=3), + 62 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 62D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 62D$ We want to calculate the total boundary flux, which is the integral $ 62D$ of dZ/dn = Znorm = Zx*NORMx + Zy*NORMy, so $ 62D$ enter: BND. INTEGRAL = Znorm $ 62D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 63 Enter FORTRAN expressions for the functions whose integrals are to be 63 calculated and printed. They may be functions of 63 63 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y and (if applicable) T 63 63 The components (NORMx,NORMy) of the unit outward normal vector, and the 63 initial triangle number KTRI, and the boundary arc number IARC may also 63 be referenced. You can also reference the normal derivatives $$1norm, 63 $$2norm. 63 63 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 63 + CURVED interior interface arcs are considered part of the boundary, + 63 + for the boundary integral computations, ONLY IF they have arc numbers+ 63 + in the range 8000-8999. In this case, since an interface arc is + 63 + considered to be a boundary for both of the subregions it separates, + 63 + the boundary integral will be computed twice on each curved + 63 + interface arc, once with (NORMx,NORMy) defined in each direction. + 63 + + 63 + If you only want to integrate a function over part of the boundary, + 63 + define that function to be zero on the rest of the boundary. You + 63 + can examine the point (X,Y) to determine if it is on the desired + 63 + boundary segment, or the boundary arc number IARC, or the initial + 63 + triangle number KTRI (if INTRI=3), + 63 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 63A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 63A$ Since Vxx+Vyy=-DEL(x,y), by the divergence theorem the integral of $ 63A$ Vnorm = Vx*NORMx + Vy*NORMy should be -1.0, so as an accuracy check $ 63A$ enter: BND. INTEGRAL = Vnorm $ 63A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 64 Enter FORTRAN expressions for the functions whose integrals are to be 64 calculated and printed. They may be functions of 64 64 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y and (if applicable) T 64 64 The components (NORMx,NORMy) of the unit outward normal vector, and the 64 initial triangle number KTRI, and the boundary arc number IARC may also 64 be referenced. You can also reference the normal derivatives $$1norm, 64 $$2norm,$$3norm. 64 64 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 64 + CURVED interior interface arcs are considered part of the boundary, + 64 + for the boundary integral computations, ONLY IF they have arc numbers+ 64 + in the range 8000-8999. In this case, since an interface arc is + 64 + considered to be a boundary for both of the subregions it separates, + 64 + the boundary integral will be computed twice on each curved + 64 + interface arc, once with (NORMx,NORMy) defined in each direction. + 64 + + 64 + If you only want to integrate a function over part of the boundary, + 64 + define that function to be zero on the rest of the boundary. You + 64 + can examine the point (X,Y) to determine if it is on the desired + 64 + boundary segment, or the boundary arc number IARC, or the initial + 64 + triangle number KTRI (if INTRI=3), + 64 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 65 Enter FORTRAN expressions for the functions whose integrals are to be 65 calculated and printed. They may be functions of 65 65 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y... 65 and (if applicable) T 65 65 The components (NORMx,NORMy) of the unit outward normal vector, and the 65 initial triangle number KTRI, and the boundary arc number IARC may also 65 be referenced. You can also reference the normal derivatives $$1norm, 65 $$2norm,$$3norm,$$4norm... 65 65 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 65 + CURVED interior interface arcs are considered part of the boundary, + 65 + for the boundary integral computations, ONLY IF they have arc numbers+ 65 + in the range 8000-8999. In this case, since an interface arc is + 65 + considered to be a boundary for both of the subregions it separates, + 65 + the boundary integral will be computed twice on each curved + 65 + interface arc, once with (NORMx,NORMy) defined in each direction. + 65 + + 65 + If you only want to integrate a function over part of the boundary, + 65 + define that function to be zero on the rest of the boundary. You + 65 + can examine the point (X,Y) to determine if it is on the desired + 65 + boundary segment, or the boundary arc number IARC, or the initial + 65 + triangle number KTRI (if INTRI=3), + 65 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 66 If you don't want to read the FINE PRINT, enter 'no'. 66 66 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 66 + Do you have point source terms in your PDEs, involving "Dirac Delta" + 66 + functions? A Dirac Delta function DEL(x-xd0,y-yd0) is a function + 66 + whose integral is 1, but which is zero everywhere except at a + 66 + singular point (xd0,yd0). + 66 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 66A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 66A$ enter: yes $ 66A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 66B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 66B$ enter: no $ 66B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 66D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 66D$ enter: no $ 66D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 66E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 66E$ enter: no $ 66E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 66G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 66G$ enter: no $ 66G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 66H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 66H$ enter: no $ 66H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 67 Enter the number of points (NDEL) at which Dirac Delta functions are 67 to be defined, then the coordinates (XD0(L),YD0(L)), L=1,...,NDEL 67 of these points. 67A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 67A$ enter: NDEL = 1 $ 67A$ XD0(1) = 0.0 $ 67A$ YD0(1) = 0.0 $ 67A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 68 The PDE coefficient Fi (i=1,...,NEQN) may include point source terms 68 of the form 68 DELAMP(1,i)*DEL(X-XD0(1),Y-YD0(1)) + ... 68 + DELAMP(NDEL,i)*DEL(X-XD0(NDEL),Y-YD0(NDEL)) 68 Enter the Delta function amplitudes (DELAMP), which may be constants 68 or (if applicable) functions of T. When you are later prompted for the 68 coefficients Fi, do NOT include these point source terms then. 68A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 68A$ enter: DELAMP(1,1) = 0 $ 68A$ DELAMP(1,2) = -1 $ 68A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 69 Now enter FORTRAN expressions to define the PDE coefficients. 69 RHO may be a function of X,Y. The other coefficients may be functions 69 of 69 69 X,Y,$$1,$$1x,$$1y 69 69 All coefficients may also reference the initial triangle number KTRI. 69 69 Recall that the PDE has the form 69 69 d/dX*A + d/dY*B = F + lambda*RHO*$$1 69 69C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 69C$ The partial differential equation may be written $ 69C$ $ 69C$ d/dX*(-D(X,Y)*QQx) + d/dY*(-D(X,Y)*QQy) = lambda*1.0*QQ $ 69C$ $ 69C$ When asked if you want to write a FORTRAN block, $ 69C$ enter: yes $ 69C$ then, when prompted, define D as a function of the initial $ 69C$ triangle number, KTRI: $ 69C$ IF (KTRI.LE.4) D = D1 $ 69C$ IF (KTRI.GE.5) D = D2 $ 69C$ [blank line] $ 69C$ then enter the following, when prompted: $ 69C$ F = 0.0 A = -D*QQx B = -D*QQy RHO = 1.0 $ 69C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 70 Now enter FORTRAN expressions to define the PDE coefficients. 70 RHO11,RHO12,RHO21,RHO22 may be functions of X,Y. The other 70 coefficients may be functions of 70 70 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y 70 70 All coefficients may also reference the initial triangle number KTRI. 70 70 Recall that the PDEs have the form 70 70 d/dX*A1 + d/dY*B1 = F1 + lambda*(RHO11*$$1 + RHO12*$$2) 70 d/dX*A2 + d/dY*B2 = F2 + lambda*(RHO21*$$1 + RHO22*$$2) 70 71 Now enter FORTRAN expressions to define the PDE coefficients. 71 RHO11,RHO12,RHO13,RHO21,RHO22,RHO23,RHO31,RHO32,RHO33 may be 71 functions of X,Y. The other coefficients may be functions of 71 71 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y 71 71 All coefficients may also reference the initial triangle number KTRI. 71 71 Recall that the PDEs have the form 71 71 d/dX*A1 + d/dY*B1 = F1 + lambda*(RHO11*$$1 + RHO12*$$2 + RHO13*$$3) 71 d/dX*A2 + d/dY*B2 = F2 + lambda*(RHO21*$$1 + RHO22*$$2 + RHO23*$$3) 71 d/dX*A3 + d/dY*B3 = F3 + lambda*(RHO31*$$1 + RHO32*$$2 + RHO33*$$3) 71 72 Now enter FORTRAN expressions to define the PDE coefficients. The 72 RHOIJ may be functions of X,Y. The other coefficients may be functions 72 of 72 72 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y... 72 72 All coefficients may also reference the initial triangle number KTRI. 72 72 Recall that the PDEs have the form 72 72 d/dX*A1+d/dY*B1 = F1+lambda*(RHO11*$$1+RHO12*$$2+RHO13*$$3+RHO14*$$4..) 72 d/dX*A2+d/dY*B2 = F2+lambda*(RHO21*$$1+RHO22*$$2+RHO23*$$3+RHO24*$$4..) 72 d/dX*A3+d/dY*B3 = F3+lambda*(RHO31*$$1+RHO32*$$2+RHO33*$$3+RHO34*$$4..) 72 d/dX*A4+d/dY*B4 = F4+lambda*(RHO41*$$1+RHO42*$$2+RHO43*$$3+RHO44*$$4..) 72 . . 72 . . 72 72F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 72F$ The four real eigenvalue equations may be written $ 72F$ d/dX*(URx + VRx) + d/dY*(URy + VRy) = lambda*UR $ 72F$ d/dX*(UIx + VIx) + d/dY*(UIy + VIy) = lambda*UI $ 72F$ d/dX*(-URx + VRx) + d/dY*(-URy + VRy) = lambda*VR $ 72F$ d/dX*(-UIx + VIx) + d/dY*(-UIy + VIy) = lambda*VI $ 72F$ $ 72F$ When asked if you want to write a FORTRAN block, $ 72F$ enter: no $ 72F$ then enter the following, when prompted: $ 72F$ F1 = 0 A1 = URx+VRx B1 = URy+VRy $ 72F$ RHO11 = 1 RHO12 = 0 RHO13 = 0 RHO14 = 0 $ 72F$ F2 = 0 A2 = UIx+VIx B2 = UIy+VIy $ 72F$ RHO21 = 0 RHO22 = 1 RHO23 = 0 RHO24 = 0 $ 72F$ F3 = 0 A3 = -URx+VRx B3 = -URy+VRy $ 72F$ RHO31 = 0 RHO32 = 0 RHO33 = 1 RHO34 = 0 $ 72F$ F4 = 0 A4 = -UIx+VIx B4 = -UIy+VIy $ 72F$ RHO41 = 0 RHO42 = 0 RHO43 = 0 RHO44 = 1 $ 72F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 73 Now enter FORTRAN expressions to define the PDE coefficients, which 73 may be functions of 73 73 X,Y,$$1,$$1x,$$1y 73 73 They may also be functions of the initial triangle number KTRI 73 and, in some cases, of the parameter T. 73 73 Recall that the PDE has the form 73 73 d/dX*A + d/dY*B = F 73 73B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 73B$ The partial differential equation may be written $ 73B$ $ 73B$ d/dX*(Ux) + d/dY*(Uy) = U**3 $ 73B$ $ 73B$ When asked if you want to write a FORTRAN block, $ 73B$ enter: no $ 73B$ then enter the following, when prompted: $ 73B$ F = U**3 A = Ux B = Uy $ 73B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74 Now enter FORTRAN expressions to define the PDE coefficients, which 74 may be functions of 74 74 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y 74 74 They may also be functions of the initial triangle number KTRI 74 and, in some cases, of the parameter T. 74 74 Recall that the PDEs have the form 74 74 d/dX*A1 + d/dY*B1 = F1 74 d/dX*A2 + d/dY*B2 = F2 74 74A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74A$ The partial differential equations may be written $ 74A$ $ 74A$ d/dX*(Ux) + d/dY*(Uy) = V $ 74A$ d/dX*(Vx) + d/dY*(Vy) = -DEL(x,y) $ 74A$ $ 74A$ When asked if you want to write a FORTRAN block, $ 74A$ enter: no $ 74A$ then enter the following, when prompted (recall that the delta $ 74A$ function is already included in F2): $ 74A$ F1 = V A1 = Ux B1 = Uy $ 74A$ F2 = 0 A2 = Vx B2 = Vy $ 74A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74E$ The partial differential equations may be written $ 74E$ $ 74E$ d/dX*(s11) + d/dY*(s12) = 0 $ 74E$ d/dX*(s12) + d/dY*(s22) = 0 $ 74E$ where $ 74E$ s11 = E*(e11 + vnu*e22)/(1-vnu**2) $ 74E$ s22 = E*(vnu*e11 + e22)/(1-vnu**2) $ 74E$ s12 = 0.5*E*e12/(1+vnu) $ 74E$ and $ 74E$ e11 = Ux - al*(Z(x,y) - ZINIT) $ 74E$ e22 = Vy - al*(Z(x,y) - ZINIT) $ 74E$ e12 = Uy + Vx $ 74E$ $ 74E$ When asked if you want to write a FORTRAN block, $ 74E$ enter: yes $ 74E$ then, when prompted, define: $ 74E$ E11 = Ux - AL*(Z(X,Y) - ZINIT) $ 74E$ E22 = Vy - AL*(Z(X,Y) - ZINIT) $ 74E$ E12 = Uy + Vx $ 74E$ S11 = E*(E11 + VNU*E22)/(1-VNU**2) $ 74E$ S22 = E*(VNU*E11 + E22)/(1-VNU**2) $ 74E$ S12 = 0.5*E*E12/(1+VNU) $ 74E$ [blank line] $ 74E$ (The function Z(X,Y) will be defined later by interpolating the $ 74E$ tabular output created by example 4.) $ 74E$ then enter the following, when prompted: $ 74E$ F1 = 0 A1 = S11 B1 = S12 $ 74E$ F2 = 0 A2 = S12 B2 = S22 $ 74E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74H$ The partial differential equations may be written $ 74H$ $ 74H$ (-P + 2*Visc*Ux)x + (Visc*(Uy+Vx))y = Rho*(U*Ux+V*Uy) $ 74H$ (Visc*(Uy+Vx))x + (-P + 2*Visc*Vy)y = Rho*(U*Vx+V*Vy) $ 74H$ $ 74H$ where Visc = 0.002 $ 74H$ Rho = 1 $ 74H$ P = -alpha*Visc*(Ux+Vy) $ 74H$ We parameterize this nonlinear problem by increasing the density $ 74H$ gradually from Rho=0 at T=1 to Rho=1.0 for T>5. Thus on the first $ 74H$ Newton iteration the problem is linear and initial values U0=V0=0 $ 74H$ can be used, and on the final iterations the original nonlinear $ 74H$ problem is solved. $ 74H$ $ 74H$ When asked if you want to write a FORTRAN block, $ 74H$ enter: yes $ 74H$ then, when prompted, define: $ 74H$ Visc = 0.002 $ 74H$ Rho = 1.0*MIN(1.D0,(T-1.0)/5.D0) $ 74H$ P = -alpha*Visc*(Ux+Vy) $ 74H$ [blank line] $ 74H$ then enter the following, when prompted: $ 74H$ F1 = Rho*(U*Ux+V*Uy) A1 = -P+2*Visc*Ux B1 = Visc*(Uy+Vx) $ 74H$ F2 = Rho*(U*Vx+V*Vy) A2 = Visc*(Uy+Vx) B2 = -P+2*Visc*Vy $ 74H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 75 Now enter FORTRAN expressions to define the PDE coefficients, which 75 may be functions of 75 75 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y 75 75 They may also be functions of the initial triangle number KTRI 75 and, in some cases, of the parameter T. 75 75 Recall that the PDEs have the form 75 75 d/dX*A1 + d/dY*B1 = F1 75 d/dX*A2 + d/dY*B2 = F2 75 d/dX*A3 + d/dY*B3 = F3 75 76 Now enter FORTRAN expressions to define the PDE coefficients, which 76 may be functions of 76 76 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y... 76 76 They may also be functions of the initial triangle number KTRI 76 and, in some cases, of the parameter T. 76 76 Recall that the PDEs have the form 76 76 d/dX*A1 + d/dY*B1 = F1 76 d/dX*A2 + d/dY*B2 = F2 76 d/dX*A3 + d/dY*B3 = F3 76 d/dX*A4 + d/dY*B4 = F4 76 . . 76 . . 77 Now enter FORTRAN expressions to define the PDE coefficients, which 77 may be functions of 77 77 X,Y,T,$$1,$$1x,$$1y 77 77 They may also be functions of the initial triangle number KTRI. 77 77 Recall that the PDE has the form 77 77 C*d($$1)/dT = d/dX*A + d/dY*B - F 77 77D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 77D$ The partial differential equation may be written $ 77D$ $ 77D$ 1.0*Zt = d/dX*(Zx) + d/dY*(Zy) $ 77D$ $ 77D$ When asked if you want to write a FORTRAN block, $ 77D$ enter: no $ 77D$ then enter the following, when prompted: $ 77D$ C = 1 F = 0 A = Zx B = Zy $ 77D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 78 Now enter FORTRAN expressions to define the PDE coefficients, which 78 may be functions of 78 78 X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y 78 78 They may also be functions of the initial triangle number KTRI. 78 78 Recall that the PDEs have the form 78 78 C11*d($$1)/dT + C12*d($$2)/dT = d/dX*A1 + d/dY*B1 - F1 78 C21*d($$1)/dT + C22*d($$2)/dT = d/dX*A2 + d/dY*B2 - F2 78 78G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 78G$ The partial differential equations may be written $ 78G$ $ 78G$ 0 = (E2)x + (-E1)y + w*amu*H + G1(X,Y) $ 78G$ 0 = (-H2)x + (H1)y + w*eps*E + G2(X,Y) $ 78G$ where $ 78G$ E1 = (-w*amu*Hy - beta*Ex)/(w**2*amu*eps - beta**2) $ 78G$ E2 = (w*amu*Hx - beta*Ey)/(w**2*amu*eps - beta**2) $ 78G$ H1 = (w*eps*Ey - beta*Hx)/(w**2*amu*eps - beta**2) $ 78G$ H2 = (-w*eps*Ex - beta*Hy)/(w**2*amu*eps - beta**2) $ 78G$ G1,G2 = "random" nonhomogeneous terms $ 78G$ $ 78G$ When asked if you want to write a FORTRAN block, $ 78G$ enter: yes $ 78G$ then, when prompted, define: $ 78G$ IF (ABS(X).LE.1.E-6 .AND. ABS(Y).LE.1.E-6) THEN $ 78G$ C GLASS REGION $ 78G$ EPS = 8.854 E-12*1.55**2 $ 78G$ ELSE $ 78G$ C SILICA REGION $ 78G$ EPS = 8.854 E-12*1.50**2 $ 78G$ ENDIF $ 78G$ BETA = T $ 78G$ DENOM = W**2*AMU*EPS - BETA**2 $ 78G$ E1 = (-W*AMU*Hy - BETA*Ex)/DENOM $ 78G$ E2 = ( W*AMU*Hx - BETA*Ey)/DENOM $ 78G$ H1 = ( W*EPS*Ey - BETA*Hx)/DENOM $ 78G$ H2 = (-W*EPS*Ex - BETA*Hy)/DENOM $ 78G$ G1 = SIN(X/0.1E-6 + Y/0.2E-6) $ 78G$ G2 = SIN(X/0.2E-6 + Y/0.1E-6) $ 78G$ [blank line] $ 78G$ then enter the following, when prompted: $ 78G$ C11 = C12 = 0 F1 = -W*AMU*H - G1 A1 = E2 B1 = -E1 $ 78G$ C21 = C22 = 0 F2 = -W*EPS*E - G2 A2 = -H2 B2 = H1 $ 78G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 79 Now enter FORTRAN expressions to define the PDE coefficients, which 79 may be functions of 79 79 X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y 79 79 They may also be functions of the initial triangle number KTRI. 79 79 Recall that the PDEs have the form 79 79 C11*d($$1)/dT + C12*d($$2)/dT + C13*d($$3)/dT = d/dX*A1 + d/dY*B1 - F1 79 C21*d($$1)/dT + C22*d($$2)/dT + C23*d($$3)/dT = d/dX*A2 + d/dY*B2 - F2 79 C31*d($$1)/dT + C32*d($$2)/dT + C33*d($$3)/dT = d/dX*A3 + d/dY*B3 - F3 79 80 Now enter FORTRAN expressions to define the PDE coefficients, which 80 may be functions of 80 80 X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y... 80 80 They may also be functions of the initial triangle number KTRI. 80 80 Recall that the PDEs have the form 80 80 C11*d($$1)/dT + C12*d($$2)/dT + C13*d($$3)/dT + C14*d($$4)/dT +... 80 = d/dX*A1 + d/dY*B1 - F1 80 C21*d($$1)/dT + C22*d($$2)/dT + C23*d($$3)/dT + C24*d($$4)/dT +... 80 = d/dX*A2 + d/dY*B2 - F2 80 C31*d($$1)/dT + C32*d($$2)/dT + C33*d($$3)/dT + C34*d($$4)/dT +... 80 = d/dX*A3 + d/dY*B3 - F3 80 C41*d($$1)/dT + C42*d($$2)/dT + C43*d($$3)/dT + C44*d($$4)/dT +... 80 = d/dX*A4 + d/dY*B4 - F4 80 . . 80 . . 81 If you don't want to read the FINE PRINT, default the initial values. 81 81 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 81 + Now the initial values for the inverse power method may be defined + 81 + using FORTRAN expressions. They may be functions of X and Y, and + 81 + also of the initial triangle number KTRI. + 81 + + 81 + By default, the initial values are generated by a random number + 81 + generator. This virtually eliminates any possibility of convergence + 81 + to the wrong eigenvalue, due to an unlucky choice of initial values. + 81 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 81C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 81C$ Press [RETURN] to default QQ0 $ 81C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 81F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 81F$ Press [RETURN] to default UR0,UI0,VR0,VI0 $ 81F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 82 Now the initial values for Newton's method must be defined using 82 FORTRAN expressions. They may be functions of X and Y, and of the 82 initial triangle number KTRI. 82 82 It is important to provide initial values which are at least of the 82 correct order of magnitude. 82B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 82B$ enter: U0 = 1.0 $ 82B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 82H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 82H$ press [RETURN] to default U0 and V0 $ 82H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 83 Now the initial values must be defined using FORTRAN expressions. 83 They may be functions of X and Y, and of the initial triangle number 83 KTRI. They may also reference the initial time T0. 83D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 83D$ enter: Z0 = ZINIT $ 83D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 83G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 83G$ press [RETURN] to default H0 and E0 $ 83G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 84 If you don't want to read the FINE PRINT, enter 'no'. 84 84 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 84 + Do you want to read the initial conditions from the restart file, + 84 + if it exists (and use the conditions supplied above if it does not + 84 + exist)? + 84 + + 84 + If so, PDE2D will dump the final solution at the end of each run + 84 + into a restart file "pde2d.res". Thus the usual procedure for + 84 + using this dump/restart option is to make sure there is no restart + 84 + file in your directory left over from a previous job, then the + 84 + first time you run this job, the initial conditions supplied above + 84 + will be used, but on the second and subsequent runs the restart file + 84 + from the previous run will be used to define the initial conditions. + 84 + + 84 + You can do all the "runs" in one program, by setting NPROB > 1. + 84 + Each pass through the DO loop, T0,TF,NSTEPS and possibly other + 84 + parameters may be varied, by making them functions of IPROB. + 84 + + 84 + If the 2D or 3D collocation method is used, the coordinate + 84 + transformation should not change between dump and restart. + 84 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 84B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 84B$ We want to restart the second solution (IPROB=2) from the first $ 84B$ solution, so $ 84B$ enter: yes $ 84B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 84C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 84C$ enter: no $ 84C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 84D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 84D$ enter: no $ 84D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 84F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 84F$ enter: no $ 84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$$$$$$$$$$$$$$$$$$$ 84N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 84N$ enter: no $ 84N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 84O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 84O$ enter: no $ 84O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 85 If the program dumping the solution and the program restarting from 85 the dump have identical finite element grids, the solution at the 85 nodes can be dumped to the restart file "pde2d.res", and there will 85 be no loss of accuracy due to interpolation when this solution is read 85 back. Will the dumping and restarting programs have identical grids? 85 85 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 85 + If you answer 'no', then you can change the grid between runs, but + 85 + the solution on the new grid will be interpolated from the dumped + 85 + solution, so there may be some loss of accuracy due to interpolation.+ 85 + The solution will be dumped to the restart file on a uniform grid + 85 + of size + 85 + for 1D problems: NXP8Z=1001 + 85 + 2D problems: NXP8Z=101 by NYP8Z=101 + 85 + 3D problems: NXP8Z=41 by NYP8Z=41 by NZP8Z=41 + 85 + The values of NXP8Z,NYP8Z,NZP8Z are set in a PARAMETER statement in + 85 + the main program, so they can be changed, if desired. The + 85 + interpolation degree (KDEG8Z) is also set in this PARAMETER + 85 + statement, to 1 (linear interpolation), but KDEG8Z can be reset to + 85 + 2 or 3 if desired. + 85 + + 85 + If you want to modify the data in the restart file after it has + 85 + been dumped (each trip through the loop IPROB=1,NPROB in the main + 85 + program), answer 'no' even if your grid does not change, then + 85 + uncomment the two calls to (D)TDPR(1,2,3) in the main program. You + 85 + can modify the restart file by modifying the solution as stored in + 85 + the array URES8Z, after it is read from 'pde2d.res' by the first + 85 + call, and before it is written back by the second call. The + 85 + solution is stored as follows: + 85 + (D)TDPR1: URES8Z(IEQN,I) = unknown #IEQN at + 85 + XRES8Z(I) + 85 + (D)TDPR2: URES8Z(IEQN,I,J) = unknown #IEQN at + 85 + (XRES8Z(I),YRES8Z(J)) + 85 + (D)TDPR3: URES8Z(IEQN,I,J,K) = unknown #IEQN at + 85 + (XRES8Z(I),YRES8Z(J),ZRES8Z(K)) + 85 + where I=1,...,NXP8Z, J=1,...,NYP8Z, K=1,...,NZP8Z. You may NOT + 85 + modify the arrays XRES8Z,YRES8Z,ZRES8Z. (Note: for the 2D and 3D + 85 + collocation algorithms, XRES8Z(I),YRES8Z(J),... are values of + 85 + P1,P2,..., not X,Y,...) + 85 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 85B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 85B$ Since adaptive triangulation is requested, the triangulation may $ 85B$ change between IPROB=1 and IPROB=2, so $ 85B$ enter: no $ 85B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 86 Since this is a homogeneous eigenvalue problem, FB is assumed to be 0 86 on all boundaries where 'fixed' boundary conditions are specified. 87 Now the 'fixed' boundary conditions are described. 87 87 Are there any boundary arcs with negative arc numbers, where nonzero 87 'fixed' boundary conditions must be specified? (The boundary 87 conditions on arcs with negative numbers default to FB=0.) 87A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 87A$ All boundary conditions may be defaulted to U=V=0, so $ 87A$ enter: no $ 87A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 87B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 87B$ enter: yes $ 87B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 87D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 87D$ enter: yes $ 87D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 87E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 87E$ On the only arc with negative arc number (-1), U and V may be $ 87E$ defaulted to 0, so $ 87E$ enter: no $ 87E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 87G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 87G$ enter: no $ 87G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 87H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 87H$ enter: yes $ 87H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 88 Enter the arc number (IARC) of a boundary arc with negative arc number. 88B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 88B$ enter: IARC = -1 $ 88B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 88D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 88D$ enter: IARC = -1 $ 88D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 88H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 88H$ enter: IARC = -1 $ 88H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 89 Enter a FORTRAN expression to define FB on this arc. It may be a 89 function of X,Y and (if applicable) T. 89 89 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 89 + This function may also reference the initial triangle number KTRI, + 89 + and the arc parameter S (S = P or Q when INTRI=2). + 89 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 89 89 Recall that fixed boundary conditions have the form 89 89 $$1 = FB 89 89B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 89B$ enter: FB = 1.0/R0 $ 89B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 89D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 89D$ enter: FB = ZWALL $ 89D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 90 Enter FORTRAN expressions to define FB1,FB2 on this arc. They may 90 be functions of X,Y and (if applicable) T. 90 90 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 90 + These functions may also reference the initial triangle number KTRI, + 90 + and the arc parameter S (S = P or Q when INTRI=2). + 90 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 90 90 Recall that fixed boundary conditions have the form 90 90 $$1 = FB1 90 $$2 = FB2 90 90H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 90H$ enter: FB1 = 0.0 $ 90H$ FB2 = -X*(1-X) $ 90H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 91 Enter FORTRAN expressions to define FB1,FB2,FB3 on this arc. They may 91 be functions of X,Y and (if applicable) T. 91 91 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 91 + These functions may also reference the initial triangle number KTRI, + 91 + and the arc parameter S (S = P or Q when INTRI=2). + 91 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 91 91 Recall that fixed boundary conditions have the form 91 91 $$1 = FB1 91 $$2 = FB2 91 $$3 = FB3 91 92 Enter FORTRAN expressions to define FB1,FB2,FB3,FB4... on this arc. 92 They may be functions of X,Y and (if applicable) T. 92 92 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 92 + These functions may also reference the initial triangle number KTRI, + 92 + and the arc parameter S (S = P or Q when INTRI=2). + 92 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 92 92 Recall that fixed boundary conditions have the form 92 92 $$1 = FB1 92 $$2 = FB2 92 $$3 = FB3 92 $$4 = FB4 92 . 92 . 93 Are there any more negative arcs, with nonzero boundary conditions? 93B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 93B$ enter: no $ 93B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 93D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 93D$ enter: no $ 93D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 93H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 93H$ On the only other arc with negative arc number (-2), the boundary $ 93H$ conditions may be defaulted to FB1=FB2=0, so $ 93H$ enter: no $ 93H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 94 Now the 'free' boundary conditions are described. 94 94 Are there any boundary arcs with positive (but < 1000) arc numbers, 94 where nonzero 'free' boundary conditions must be specified? (The 94 boundary conditions on arcs with positive numbers default to GB=0.) 94A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 94A$ enter: no $ 94A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 94B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 94B$ enter: yes $ 94B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 94C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 94C$ On the only arc with positive arc number (1), the boundary condition $ 94C$ is GB = A*nx+B*ny = -D*QQx*nx - D*QQy*ny = -D*dQQ/dn = 0 $ 94C$ and GB can be defaulted to 0, so $ 94C$ enter: no $ 94C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 94D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 94D$ enter: yes $ 94D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 94E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 94E$ enter: yes $ 94E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 94F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 94F$ enter: no $ 94F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 94G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 94G$ enter: yes $ 94G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 94H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 94H$ On the only arc with positive arc number (1), the normal vector is $ 94H$ (nx,ny) = (1,0), so the boundary conditions are $ 94H$ GB1 = A1*nx+B1*ny = A1 = -P+2*Visc*Ux = 0 $ 94H$ GB2 = A2*nx+B2*ny = A2 = Visc*(Uy+Vx) = 0 $ 94H$ and GB1,GB2 can be defaulted to zero, so $ 94H$ enter: no $ 94H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 95 Enter the arc number (IARC) of a boundary arc with positive arc number. 95B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 95B$ enter: IARC = 1 $ 95B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 95D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 95D$ enter: IARC = 2 $ 95D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 95E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 95E$ enter: IARC = 3 $ 95E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 95G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 95G$ enter: IARC = 1 $ 95G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 96 Enter FORTRAN expressions to define the following free boundary 96 condition functions on this arc. They may be functions of 96 96 X,Y,$$1,$$1x,$$1y and (if applicable) T 96 96 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 96 + These functions may also reference the components (NORMx,NORMy) of + 96 + the unit outward normal vector, the initial triangle number KTRI, + 96 + and the arc parameter S (S = P or Q when INTRI=2). + 96 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 96 96 Recall that free boundary conditions have the form 96 96 A*nx+B*ny = GB 96 96B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 96B$ Recall that GB = A*nx+B*ny = Ux*nx+Uy*ny = dU/dn = -1/R1**2 $ 96B$ Thus enter, when prompted: $ 96B$ GB = -1.0/R1**2 $ 96B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 96D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 96D$ Recall that at the metal-air boundary (arcs number 2) $ 96D$ GB = A*nx+B*ny = Zx*nx+Zy*ny = dZ/dn = -1.E-9*(Z**4 - ZINIT**4) $ 96D$ Thus enter, when prompted: $ 96D$ GB = -1.E-9*(Z**4 - ZINIT**4) $ 96D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 97 Enter FORTRAN expressions to define the following free boundary 97 condition functions on this arc. They may be functions of 97 97 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y and (if applicable) T 97 97 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 97 + These functions may also reference the components (NORMx,NORMy) of + 97 + the unit outward normal vector, the initial triangle number KTRI, + 97 + and the arc parameter S (S = P or Q when INTRI=2). + 97 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 97 97 Recall that free boundary conditions have the form 97 97 A1*nx+B1*ny = GB1 97 A2*nx+B2*ny = GB2 97 97 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 97 + Note that 'fixed' boundary conditions: + 97 + Ui = FBi(X,Y,[T]) + 97 + can be expressed as 'free' boundary conditions in the form: + 97 + GBi = zero(Ui-FBi(X,Y,[T])) + 97 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 97E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 97E$ Recall that along the line of symmetry (arc number 3, X=0) we have $ 97E$ (nx,ny) = (-1,0) and U=s12=0, so we can set $ 97E$ GB1 = A1*nx + B1*ny = -A1 = -s11 = zero(U) $ 97E$ GB2 = A2*nx + B2*ny = -A2 = -s12 = 0 $ 97E$ The first boundary condition is (almost) equivalent to U=0. $ 97E$ Thus enter, when prompted: $ 97E$ GB1 = zero(U) $ 97E$ GB2 = 0.0 $ 97E$++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 97E$ Note: this "symmetry" boundary condition is the same as the "free- + 97E$ slip" boundary condition, which requires that the normal velocity + 97E$ and tangential force both be 0. This can be imposed by setting: + 97E$ GB1 = Big_number*NORMx*(U*NORMx+V*NORMy) + 97E$ GB2 = Big_number*NORMy*(U*NORMx+V*NORMy) + 97E$ so that U*NORMx+V*NORMy, the normal velocity, is 0; the tangential + 97E$ force, NORMy*GB1-NORMx*GB2=0 also. On vertical or horizontal + 97E$ boundaries such as the above (NORMx=0 or NORMy=0), Big_number can be + 97E$ arbitrarily large; in the general case, however, choosing Big_number + 97E$ too large may result in an ill-conditioned matrix. + 97E$+++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 97E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 97G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 97G$ Recall that on the entire boundary we have dH/dn=E=0, and thus $ 97G$ dE/ds=tangential derivative=0 also, so $ 97G$ GB1 = A1*nx + B1*ny = E2*nx - E1*ny $ 97G$ = (w*amu*dH/dn - beta*dE/ds)/(w**2*amu*eps-beta**2) = 0 $ 97G$ GB2 = A2*nx + B2*ny = -H2*nx + H1*ny $ 97G$ = (w*eps*dE/dn + beta*dH/ds)/(w**2*amu*eps-beta**2) = zero(E) $ 97G$ The second boundary condition is (almost) equivalent to E=0. $ 97G$ Thus enter, when prompted: $ 97G$ GB1 = 0.0 $ 97G$ GB2 = zero(E) $ 97G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 98 Enter FORTRAN expressions to define the following free boundary 98 condition functions on this arc. They may be functions of 98 98 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y and (if applicable) T 98 98 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 98 + These functions may also reference the components (NORMx,NORMy) of + 98 + the unit outward normal vector, the initial triangle number KTRI, + 98 + and the arc parameter S (S = P or Q when INTRI=2). + 98 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 98 98 Recall that free boundary conditions have the form 98 98 A1*nx+B1*ny = GB1 98 A2*nx+B2*ny = GB2 98 A3*nx+B3*ny = GB3 98 98 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 98 + Note that 'fixed' boundary conditions: + 98 + Ui = FBi(X,Y,[T]) + 98 + can be expressed as 'free' boundary conditions in the form: + 98 + GBi = zero(Ui-FBi(X,Y,[T])) + 98 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 99 Enter FORTRAN expressions to define the following free boundary 99 condition functions on this arc. They may be functions of 99 99 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y... 99 and (if applicable) T 99 99 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 99 + These functions may also reference the components (NORMx,NORMy) of + 99 + the unit outward normal vector, the initial triangle number KTRI, + 99 + and the arc parameter S (S = P or Q when INTRI=2). + 99 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 99 99 Recall that free boundary conditions have the form 99 99 A1*nx+B1*ny = GB1 99 A2*nx+B2*ny = GB2 99 A3*nx+B3*ny = GB3 99 A4*nx+B4*ny = GB4 99 . . . 99 . . . 99 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 99 + Note that 'fixed' boundary conditions: + 99 + Ui = FBi(X,Y,[T]) + 99 + can be expressed as 'free' boundary conditions in the form: + 99 + GBi = zero(Ui-FBi(X,Y,[T])) + 99 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 100 Are there any more positive arcs, with nonzero boundary conditions? 100B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 100B$ enter: no $ 100B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 100D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 100D$ On the only other arc with positive arc number (3), GB may be $ 100D$ defaulted, since GB = dZ/dn = 0 there, so $ 100D$ enter: no $ 100D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 100E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 100E$ On the only other arc with positive arc number (2), GB1 and GB2 may $ 100E$ be defaulted, since GB1 = A1*nx + B1*ny = s11*nx + s12*ny = 0 $ 100E$ and GB2 = A2*nx + B2*ny = s12*nx + s22*ny = 0, so $ 100E$ enter: no $ 100E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 100G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 100G$ enter: no $ 100G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 101 If you don't want to read the FINE PRINT, default all of the following 101 variables. 101 101 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 101 + Normally, PDE2D saves the values of $$1,A,B at the output points. + 101 + If different variables are to be saved (for later printing or + 101 + plotting) the following functions can be used to re-define the + 101 + output variables: + 101 + define UPRINT(1) to replace $$1 + 101 + APRINT(1) A + 101 + BPRINT(1) B + 101 + Each function may be a function of + 101 + + 101 + X,Y,$$1,$$1x,$$1y,A,B and (if applicable) T + 101 + + 101 + Each may also be a function of the initial triangle number KTRI and + 101 + the integral estimates SINT(1),...,BINT(1),... + 101 + + 101 + The default for each variable is no change, for example, UPRINT(1) + 101 + defaults to $$1. Enter FORTRAN expressions for each of the + 101 + following functions (or default). + 101 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 101B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 101B$ press [RETURN] to default all output modification variables $ 101B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 101C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 101C$ press [RETURN] to default all output modification variables $ 101C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 101D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 101D$ press [RETURN] to default all output modification variables $ 101D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 102 If you don't want to read the FINE PRINT, default all of the following 102 variables. 102 102 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 102 + Normally, PDE2D saves the values of $$1,A1,B1,$$2,A2,B2 at the + 102 + output points. If different variables are to be saved (for later + 102 + printing or plotting) the following functions can be used to + 102 + re-define the output variables: + 102 + define UPRINT(1) to replace $$1 + 102 + APRINT(1) A1 + 102 + BPRINT(1) B1 + 102 + UPRINT(2) $$2 + 102 + APRINT(2) A2 + 102 + BPRINT(2) B2 + 102 + Each function may be a function of + 102 + + 102 + X,Y,$$1,$$1x,$$1y,A1,B1,$$2,$$2x,$$2y,A2,B2 and (if applicable) T + 102 + + 102 + Each may also be a function of the initial triangle number KTRI and + 102 + the integral estimates SINT(1),...,BINT(1),... + 102 + + 102 + The default for each variable is no change, for example, UPRINT(1) + 102 + defaults to $$1. Enter FORTRAN expressions for each of the + 102 + following functions (or default). + 102 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 102A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 102A$ press [RETURN] to default all output modification variables $ 102A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 102E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 102E$ We will want to plot the temperature distribution Z(X,Y) (which will $ 102E$ be defined later by interpolating the output from example 4), so to $ 102E$ save Z in B1 $ 102E$ enter: BPRINT(1) = Z(X,Y) $ 102E$ and default the other output modification variables $ 102E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 102G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 102G$ We want to save a norm of the solution in A1, and later plot this $ 102G$ norm as a function of time, so $ 102G$ enter: APRINT(1) = SINT(1) $ 102G$ and default the other output modification variables $ 102G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 102H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 102H$ press [RETURN] to default all output modification variables $ 102H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 103 If you don't want to read the FINE PRINT, default all of the following 103 variables. 103 103 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 103 + Normally, PDE2D saves the values of $$1,A1,B1,$$2,A2,B2,$$3,A3,B3 at + 103 + the output points. If different variables are to be saved (for + 103 + later printing or plotting) the following functions can be used to + 103 + re-define the output variables: + 103 + define UPRINT(1) to replace $$1 + 103 + APRINT(1) A1 + 103 + BPRINT(1) B1 + 103 + UPRINT(2) $$2 + 103 + APRINT(2) A2 + 103 + BPRINT(2) B2 + 103 + UPRINT(3) $$3 + 103 + APRINT(3) A3 + 103 + BPRINT(3) B3 + 103 + Each function may be a function of + 103 + + 103 + X,Y,$$1,$$1x,$$1y,A1,B1,$$2,$$2x,$$2y,A2,B2, + 103 + $$3,$$3x,$$3y,A3,B3 and (if applicable) T + 103 + + 103 + Each may also be a function of the initial triangle number KTRI and + 103 + the integral estimates SINT(1),...,BINT(1),... + 103 + + 103 + The default for each variable is no change, for example, UPRINT(1) + 103 + defaults to $$1. Enter FORTRAN expressions for each of the + 103 + following functions (or default). + 103 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 104 If you don't want to read the FINE PRINT, default all of the following 104 variables. 104 104 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 104 + Normally, PDE2D saves the values of $$1,A1,B1,$$2,A2,B2,$$3,A3,B3, + 104 + $$4,A4,B4...at the output points. If different variables are to be + 104 + saved (for later printing or plotting) the following functions can + 104 + be used to re-define the output variables: + 104 + define UPRINT(1) to replace $$1 + 104 + APRINT(1) A1 + 104 + BPRINT(1) B1 + 104 + UPRINT(2) $$2 + 104 + APRINT(2) A2 + 104 + BPRINT(2) B2 + 104 + UPRINT(3) $$3 + 104 + APRINT(3) A3 + 104 + BPRINT(3) B3 + 104 + UPRINT(4) $$4 + 104 + APRINT(4) A4 + 104 + BPRINT(4) B4 + 104 + . . + 104 + . . + 104 + Each function may be a function of + 104 + + 104 + X,Y,$$1,$$1x,$$1y,A1,B1,$$2,$$2x,$$2y,A2,B2, + 104 + $$3,$$3x,$$3y,A3,B3,$$4,$$4x,$$4y,A4,B4... and (if applicable) T + 104 + + 104 + Each may also be a function of the initial triangle number KTRI and + 104 + the integral estimates SINT(1),...,BINT(1),... + 104 + + 104 + The default for each variable is no change, for example, UPRINT(1) + 104 + defaults to $$1. Enter FORTRAN expressions for each of the + 104 + following functions (or default). + 104 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 104F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 104F$ press [RETURN] to default all output modification variables $ 104F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 105 The solution is normally saved on a NX+1 by NY+1 rectangular grid of 105 points 105 (XA + I*(XB-XA)/NX , YA + J*(YB-YA)/NY) 105 I=0,...,NX, J=0,...,NY. Enter values for NX and NY. Suggested values 105 are NX=NY=25. 105 105 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 105 + If you want to save the solution at an arbitrary user-specified + 105 + set of points, set NY=0 and NX+1=number of points. In this case you + 105 + can request tabular output of the solution, but you cannot make any + 105 + solution plots. + 105 + + 105 + If you set NEAR8Z=1 in the main program, the values saved at each + 105 + output point will actually be the solution as evaluated at a nearby + 105 + integration point. For most problems this obviously will produce + 105 + less accurate output or plots, but for certain (rare) problems, a + 105 + solution component may be much less noisy when plotted only at + 105 + integration points. + 105 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 105A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 105A$ enter: NX = 30 $ 105A$ NY = 30 $ 105A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 105B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 105B$ enter: NX = 40 $ 105B$ NY = 40 $ 105B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 105C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 105C$ enter: NX = 40 $ 105C$ NY = 40 $ 105C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 105D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 105D$ enter: NX = 40 $ 105D$ NY = 40 $ 105D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 105E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 105E$ enter: NX = 9 $ 105E$ NY = 9 $ 105E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 105F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 105F$ enter: NX = 10 $ 105F$ NY = 10 $ 105F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 105G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 105G$ enter: NX = 10 $ 105G$ NY = 10 $ 105G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 105H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 105H$ enter: NX = 12 $ 105H$ NY = 12 $ 105H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 106 Enter a block of FORTRAN statements to define the output points: 106 (XOUT8Z(I,0) , YOUT8Z(I,0)), I=0,...,NX 107 The solution is saved on an NX+1 by NY+1 rectangular grid covering the 107 rectangle (XA,XB) x (YA,YB). Enter values for XA,XB,YA,YB. These 107 variables are usually defaulted. 107 107 The default is a rectangle which just covers the entire region. 107A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 107A$ press [RETURN] to default XA,XB,YA,YB $ 107A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 107B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 107B$ press [RETURN] to default XA,XB,YA,YB $ 107B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 107C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 107C$ press [RETURN] to default XA,XB,YA,YB $ 107C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 107D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 107D$ press [RETURN] to default XA,XB,YA,YB $ 107D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 107E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 107E$ press [RETURN] to default XA,XB,YA,YB $ 107E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 107F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 107F$ press [RETURN] to default XA,XB,YA,YB $ 107F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 107G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 107G$ press [RETURN] to default XA,XB,YA,YB $ 107G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 107H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 107H$ We want a close-up of the corner area, so $ 107H$ enter: XA = 0 XB = 2 $ 107H$ YA = 0 YB = 2 $ 107H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 108 The solution will be saved (for possible postprocessing) at the NSAVE+1 108 time points 108 T0 + K*(TF-T0)/NSAVE 108 K=0,...,NSAVE. Enter a value for NSAVE. 108 108 If a user-specified constant time step is used, NSTEPS must be an 108 integer multiple of NSAVE. 108D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 108D$ To save the solution at the 6 points T = 0.0, 2.0, ..., 10.0, $ 108D$ enter: NSAVE = 5 $ 108D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 108G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 108G$ We want to save the solution at all 101 values of T (=beta), so $ 108G$ enter: NSAVE = 100 $ 108G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 108J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 108J$ To save the solution at the 31 points T = 0.00, 0.02, ..., 0.60, $ 108J$ enter: NSAVE = 30 $ 108J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 108N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 108N$ enter: NSAVE = 20 $ 108N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 109 To generate tabular or graphical output, choose an output option from 109 the list below. 109 109 0. No further output is desired 109 1. Table of values at output points 109 The tabulated output is saved in a file. 109 2. Surface plot of a scalar variable 109 3. Contour plot of a scalar variable 109 4. Vector field plot, with arrows indicating magnitude and direction 109 5. One-dimensional cross-sectional plots (versus X, Y or T) 109 or, if applicable: 109 6. Stress field plot (requires 2 or more PDES) 109 A plot of the principal stresses. Compression is indicated 109 by arrows pointing toward each other, and tension by 109 arrows pointing away from each other. 109 109 Enter 0,1,2,3,4,5 or 6 to select an output option. 109 109 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 109 + If you set NY=0 and saved the solution at an arbitrary set of + 109 + user-specified output points, you can only request tabular output. + 109 + + 109 + If you decide later that you want additional types of plots not + 109 + requested during this interactive session, you will have to work + 109 + through a new interactive session, so it is recommended that you + 109 + request all output or plots you think you MIGHT eventually want now, + 109 + during this session. + 109 + + 109 + Regardless of the options you select, a dummy subroutine POSTPR + 109 + will be included in the program created by the interactive driver; + 109 + you can add your own postprocessing code to this subroutine. + 109 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 109A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 109A$ enter: 2, the first time you see this message and $ 109A$ 0, the second time $ 109A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 109B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 109B$ enter: 3, the first time you see this message and $ 109B$ 0, the second time $ 109B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 109C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 109C$ enter: 2, the first time you see this message and $ 109C$ 0, the second time $ 109C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 109D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 109D$ enter: 1, the first time you see this message and $ 109D$ 0, the second time $ 109D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 109E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 109E$ We want three plots: a vector field plot of the displacements, a $ 109E$ stress field plot, and a contour plot of the temperature. Thus $ 109E$ enter: 4, the first time you see this message and $ 109E$ 6, the second time $ 109E$ 3, the third time $ 109E$ 0, the fourth time $ 109E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 109F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 109F$ We want a plot of the complex eigenfunction U, so we make a vector $ 109F$ plot of (UR,UI). Thus $ 109F$ enter: 4, the first time you see this message and $ 109F$ 0, the second time $ 109F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 109G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 109G$ enter: 5, the first time you see this message and $ 109G$ 0, the second time $ 109G$ We could also (but won't) plot H and E for each value of beta (=T). $ 109G$ Those corresponding to values of beta near eigenvalues will $ 109G$ approximate the corresponding eigenfunctions; the others are not of $ 109G$ interest. In addition, once the eigenvalues in the current range $ 109G$ have been approximately located (by the peaks in the norm vs beta $ 109G$ plot), other runs should probably be made with the eigenvalues $ 109G$ bracketed more tightly, to yield more accurate estimates for the $ 109G$ eigenvalues and eigenfunctions. $ 109G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 109H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 109H$ We want a vector plot of the fluid velocity, so $ 109H$ enter: 4, the first time you see this message and $ 109H$ 0, the second time $ 109H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 110 Enter a value for IVAR, to select the variable to be plotted or 110 printed: 110 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 110 2 A 110 3 B 110B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 110B$ We want a contour plot of U, so $ 110B$ enter: IVAR = 1 $ 110B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 110C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 110C$ We want a surface plot of QQ, so $ 110C$ enter: IVAR = 1 $ 110C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 110D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 110D$ We want to write Z to a tabular output file, so $ 110D$ enter: IVAR = 1 $ 110D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 111 Enter a value for IVAR, to select the variable to be plotted or 111 printed: 111 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 111 2 A1 111 3 B1 111 4 $$2 111 5 A2 111 6 B2 111A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 111A$ We want a surface plot of the displacement U(x,y), so $ 111A$ enter: IVAR = 1 $ 111A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 111E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 111E$ We want a contour plot of Z(X,Y), which has been saved in B1, so $ 111E$ enter: IVAR = 3 $ 111E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 111G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 111G$ We want to plot the integral (solution norm), which has been saved $ 111G$ in A1, as a function of beta (=T), so $ 111G$ enter: IVAR = 2 $ 111G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 112 Enter a value for IVAR, to select the variable to be plotted or 112 printed: 112 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 112 2 A1 112 3 B1 112 4 $$2 112 5 A2 112 6 B2 112 7 $$3 112 8 A3 112 9 B3 113 Enter a value for IVAR, to select the variable to be plotted or 113 printed: 113 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 113 2 A1 113 3 B1 113 4 $$2 113 5 A2 113 6 B2 113 7 $$3 113 8 A3 113 9 B3 113 10 $$4 113 11 A4 113 12 B4 113 . . 113 . . 114 If you don't want to read the FINE PRINT, default ISET1,ISET2,ISINC. 114 114 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 114 + The tabular output or plots will be made at times: + 114 + T(K) = T0 + K*(TF-T0)/NSAVE + 114 + for K = ISET1, ISET1+ISINC, ISET1+2*ISINC,..., ISET2 + 114 + Enter values for ISET1, ISET2 and ISINC. + 114 + + 114 + The default is ISET1=0, ISET2=NSAVE, ISINC=1, that is, the tabular + 114 + output or plots will be made at all time values for which the + 114 + solution has been saved. + 114 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 114D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 114D$ Press [RETURN] to default ISET1,ISET2,ISINC. $ 114D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 114J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 114J$ To get plots at T=0, 0.2, 0.4 and 0.6, $ 114J$ Enter: ISET1=0, ISET2=NSAVE, ISINC=10 $ 114J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115 Enter a title, WITHOUT quotation marks. A maximum of 40 characters 115 are allowed. The default is no title. 115A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115A$ enter: Elastic plate problem $ 115A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115B$ enter: Solution of second example $ 115B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115C$ enter: First eigenfunction for third example $ 115C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115D$ enter: Temperature $ 115D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115E$ enter: Thermal stress problem $ 115E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115F$ enter: Eigenfunction (UR,UI) $ 115F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115G$ enter: Solution norm vs. beta $ 115G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115H$ enter: Fluid velocity $ 115H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115I$ enter: Displacements at torus cross-section $ 115I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115J$ enter: 3D wave problem $ 115J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115K$ enter: Probability density $ 115K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115L$ enter: Composite of two cylinders $ 115L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115M$ enter: Axisymmetric fluid flow problem $ 115M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115N$ enter: Water pressure head, H $ 115N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115O$ enter: Probability density $ 115O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 116 Enter the view latitude, VLAT, and the view longitude, VLON, desired 116 for this plot, in degrees. VLAT and VLON must be between 10 and 80 116 degrees; each defaults to 45 degrees. VLAT and VLON are usually 116 defaulted. 116A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 116A$ press [RETURN] to default VLAT and VLON $ 116A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 116C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 116C$ press [RETURN] to default VLAT and VLON $ 116C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 116J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 116J$ press [RETURN] to default VLAT and VLON $ 116J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 116L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 116L$ press [RETURN] to default VLAT and VLON $ 116L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 116N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 116N$ press [RETURN] to default VLAT and VLON $ 116N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 117 Specify the range (UMIN,UMAX) for the dependent variable axis. UMIN 117 and UMAX are often defaulted. 117 117 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 117 + By default, each plot will be scaled to just fit in the plot area. + 117 + For a common scaling, you may want to set UMIN=ALOW, UMAX=AHIGH. + 117 + ALOW and AHIGH are the minimum and maximum values over all output + 117 + points and over all saved time steps or iterations. + 117 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 117A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 117A$ press [RETURN] to default UMIN and UMAX $ 117A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 117C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 117C$ press [RETURN] to default UMIN and UMAX $ 117C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 117G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 117G$ press [RETURN] to default UMIN and UMAX $ 117G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 117J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 117J$ enter: UMIN = ALOW $ 117J$ UMAX = AHIGH $ 117J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 117L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 117L$ enter: UMIN = ALOW $ 117L$ UMAX = AHIGH $ 117L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 117O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 117O$ press [RETURN] to default UMIN and UMAX $ 117O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 118 If you don't want to read the FINE PRINT, enter 'no'. 118 118 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 118 + Do you want to scale the axes on the plot so that the region is + 118 + undistorted? Otherwise the axes will be scaled so that the figure + 118 + approximately fills the plot space. + 118 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 118B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 118B$ enter: yes $ 118B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$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upper (UMAX) bounds for the contour values. UMIN 119 and UMAX are often defaulted. 119 119 Labeled contours will be drawn corresponding to the values 119 119 UMIN + S*(UMAX-UMIN), for S=0.05,0.15,...0.95. 119 119 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 119 + By default, UMIN and UMAX are set to the minimum and maximum values + 119 + of the variable to be plotted. For a common scaling, you may want + 119 + to set UMIN=ALOW, UMAX=AHIGH. ALOW and AHIGH are the minimum and + 119 + maximum values over all output points and over all saved time steps + 119 + or iterations. + 119 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 119B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 119B$ press [RETURN] to default UMIN and UMAX $ 119B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 119E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 119E$ press [RETURN] to default UMIN and UMAX $ 119E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 119K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 119K$ press [RETURN] to default UMIN and UMAX $ 119K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 119M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 119M$ press [RETURN] to default UMIN and UMAX $ 119M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 120 Do you want two additional unlabeled contours to be drawn between each 120 pair of labeled contours? 120B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 120B$ enter: no $ 120B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 120E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 120E$ enter: yes $ 120E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 120K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 120K$ enter: no $ 120K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 120M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 120M$ enter: no $ 120M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 121 Enter values for IVARX, IVARY to select the X and Y components of 121 the vector to be plotted. 121 IVARX or IVARY = 1 means $$1 (possibly as modified by UPRINT,..) 121 2 A 121 3 B 122 Enter values for IVARX, IVARY to select the X and Y components of 122 the vector to be plotted. 122 IVARX or IVARY = 1 means $$1 (possibly as modified by UPRINT,..) 122 2 A1 122 3 B1 122 4 $$2 122 5 A2 122 6 B2 122E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 122E$ We want a vector field plot of (U,V), so $ 122E$ enter: IVARX = 1 $ 122E$ IVARY = 4 $ 122E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 122H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 122H$ We want a vector field plot of (U,V), so $ 122H$ enter: IVARX = 1 $ 122H$ IVARY = 4 $ 122H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 123 Enter values for IVARX, IVARY to select the X and Y components of 123 the vector to be plotted. 123 IVARX or IVARY = 1 means $$1 (possibly as modified by UPRINT,..) 123 2 A1 123 3 B1 123 4 $$2 123 5 A2 123 6 B2 123 7 $$3 123 8 A3 123 9 B3 124 Enter values for IVARX, IVARY to select the X and Y components of 124 the vector to be plotted. 124 IVARX or IVARY = 1 means $$1 (possibly as modified by UPRINT,..) 124 2 A1 124 3 B1 124 4 $$2 124 5 A2 124 6 B2 124 7 $$3 124 8 A3 124 9 B3 124 10 $$4 124 11 A4 124 12 B4 124 . . 124 . . 124F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 124F$ enter: IVARX = 1 $ 124F$ IVARY = 4 $ 124F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 125 For the purpose of scaling the arrows, the ranges of the two components 125 of the vector are assumed to be (-VR1MAG,VR1MAG) and (-VR2MAG,VR2MAG). 125 Enter values for VR1MAG and VR2MAG. VR1MAG and VR2MAG are often 125 defaulted. 125 125 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 125 + By default, VR1MAG and VR2MAG are the maxima of the absolute values + 125 + of the first and second components. For a common scaling, you may + 125 + want to set VR1MAG=A1MAG, VR2MAG=A2MAG. A1MAG, A2MAG are the + 125 + maxima of the absolute values over all output points and over all + 125 + saved time steps or iterations. + 125 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 125E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 125E$ press [RETURN] to default VR1MAG and VR2MAG $ 125E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 125F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 125F$ press [RETURN] to default VR1MAG and VR2MAG $ 125F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 125H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 125H$ press [RETURN] to default VR1MAG and VR2MAG $ 125H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 125I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 125I$ press [RETURN] to default VR1MAG and VR2MAG $ 125I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 125M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 125M$ press [RETURN] to default VR1MAG and VR2MAG $ 125M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 126 Which type of cross-sectional plots do you want? 126 126 1. Plots of output variable as function of X (constant Y [and T]) 126 2. Plots of output variable as function of Y (constant X [and T]) 126 or, if applicable: 126 3. Plots of output variable as function of T (constant X and Y) 126 126 Enter 1,2 or 3 to select a plot type. 126G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 126G$ enter: 3 $ 126G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 127 One-dimensional plots of the output variable as a function of X will 127 be made, at the output grid Y-points closest to 127 Y = YCROSS(1),...,YCROSS(NYVALS) 127 127 Enter values for NYVALS and YCROSS(1),...,YCROSS(NYVALS). 128 One-dimensional plots of the output variable as a function of Y will 128 be made, at the output grid X-points closest to 128 X = XCROSS(1),...,XCROSS(NXVALS) 128 128 Enter values for NXVALS and XCROSS(1),...,XCROSS(NXVALS). 129 One-dimensional plots of the output variable as a function of T will 129 be made, at the output grid points (X,Y) closest to 129 (XCROSS(I),YCROSS(J)), I=1,...,NXVALS, J=1,...,NYVALS 129 129 Enter values for NXVALS, XCROSS(1),...,XCROSS(NXVALS), 129 and NYVALS, YCROSS(1),...,YCROSS(NYVALS) 129G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 129G$ Since A1 = SINT(1) is independent of X and Y, all cross-sections $ 129G$ will look the same, so $ 129G$ enter: NXVALS = 1 $ 129G$ XCROSS(1) = 0 $ 129G$ NYVALS = 1 $ 129G$ YCROSS(1) = 0 $ 129G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 130 Enter values for IVAR11, IVAR22, IVAR12 to select the components which 130 represent tensile stress in the X-direction, tensile stress in the 130 Y-direction, and shear stress, respectively. 130 IVAR11,IVAR22,IVAR12 = 1 means $$1 (possibly as modified by UPRINT,..) 130 2 A1 130 3 B1 130 4 $$2 130 5 A2 130 6 B2 130E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 130E$ Since A1=S11, B2=S22 and A2=S12 (since BPRINT(1)=Z(X,Y), do not set $ 130E$ IVAR12 = 3): $ 130E$ enter: IVAR11 = 2 $ 130E$ IVAR22 = 6 $ 130E$ IVAR12 = 5 $ 130E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 131 Enter values for IVAR11, IVAR22, IVAR12 to select the components which 131 represent tensile stress in the X-direction, tensile stress in the 131 Y-direction, and shear stress, respectively. 131 IVAR11,IVAR22,IVAR12 = 1 means $$1 (possibly as modified by UPRINT,..) 131 2 A1 131 3 B1 131 4 $$2 131 5 A2 131 6 B2 131 7 $$3 131 8 A3 131 9 B3 132 Enter values for IVAR11, IVAR22, IVAR12 to select the components which 132 represent tensile stress in the X-direction, tensile stress in the 132 Y-direction, and shear stress, respectively. 132 IVAR11,IVAR22,IVAR12 = 1 means $$1 (possibly as modified by UPRINT,..) 132 2 A1 132 3 B1 132 4 $$2 132 5 A2 132 6 B2 132 7 $$3 132 8 A3 132 9 B3 132 10 $$4 132 11 A4 132 12 B4 132 . . 132 . . 133 If you don't want to read the FINE PRINT, default STRMAX. 133 133 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 133 + For the purpose of scaling the stresses, the maximum magnitude of + 133 + the principle stresses is assumed to be STRMAX. If the default is + 133 + used, the stress tensors drawn will be as large as possible without + 133 + tensors running together. If stress plots at several time steps or + 133 + iterations are made and a common scale is desired, STRMAX = ASTRMX + 133 + is suggested. + 133 + + 133 + Enter a value for STRMAX, or default it. + 133 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 133E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 133E$ press [RETURN] to default STRMAX $ 133E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 134 Do you want to define any FORTRAN function subprograms used in any of 134 the FORTRAN 'expressions' entered earlier, entering them line by line? 134 134 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 134 + If you selected double precision accuracy earlier, be sure to + 134 + declare these functions and their arguments DOUBLE PRECISION. + 134 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 134A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 134A$ enter: no $ 134A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 134B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 134B$ enter: yes $ 134B$ Then enter one line at a time of the FORTRAN function TRUE: $ 134B$ FUNCTION TRUE(X,Y) $ 134B$ IMPLICIT DOUBLE PRECISION (A-H,O-Z) $ 134B$ TRUE = 1.0/SQRT(X*X+Y*Y) $ 134B$ RETURN $ 134B$ END $ 134B$ [blank line] $ 134B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 134C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 134C$ enter: no $ 134C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 134D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$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$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 134K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 134K$ enter: no $ 134K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 134L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 134L$ enter: no $ 134L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 134M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 134M$ enter: no $ 134M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 134N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 134N$ enter: yes $ 134N$ Then define the functions THETA and RK, one line at a time: $ 134N$ FUNCTION THETA(H,IDER) $ 134N$ IMPLICIT DOUBLE PRECISION (A-H,O-Z) $ 134N$ B = 1.611 E6 $ 134N$ TS = 0.287 $ 134N$ TR = 0.075 $ 134N$ BETA = 3.96 $ 134N$ IF (H.LT.0.0) THEN $ 134N$ TH0 = TR + B*(TS-TR)/(B + ABS(H)**BETA) $ 134N$ TH1 = B*(TS-TR)*BETA*ABS(H)**(BETA-1.)/(B+ABS(H)**BETA)**2 $ 134N$ ELSE $ 134N$ TH0 = TS $ 134N$ TH1 = 0.0 $ 134N$ ENDIF $ 134N$ IF (IDER.EQ.0) THETA = TH0 $ 134N$ IF (IDER.EQ.1) THETA = TH1 $ 134N$ RETURN $ 134N$ END $ 134N$ FUNCTION RK(H) $ 134N$ IMPLICIT DOUBLE PRECISION (A-H,O-Z) $ 134N$ RKS = 0.00944 $ 134N$ A = 1.175 E6 $ 134N$ GAMMA = 4.74 $ 134N$ IF (H.LT.0.0) THEN $ 134N$ RK = RKS*A/(A+ABS(H)**GAMMA) $ 134N$ ELSE $ 134N$ RK = RKS $ 134N$ ENDIF $ 134N$ RETURN $ 134N$ END $ 134N$ [blank line] $ 134N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 134O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 134O$ enter: no $ 134O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 135 If you don't want to read the FINE PRINT, enter 'no'. 135 135 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 135 + Do you want to define any FORTRAN function subprograms used in any + 135 + of the FORTRAN 'expressions' entered earlier, by interpolating the + 135 + tabular output saved in a file (or array) created on an earlier + 135 + PDE2D run? + 135 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 135A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 135A$ enter: no $ 135A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 135B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 135B$ enter: no $ 135B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 135C$$$$$$$$$$$$$$$$$$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MPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 136 Enter the name of the FORTRAN function subprogram, in columns 1-6. 136 It must be a function of X and Y only, but do not enter the '(X,Y)'. 136E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 136E$ enter: Z $ 136E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 137 If you don't want to read the FINE PRINT, enter NWORK = 20000. 137 137 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 137 + Enter a dimension, NWORK, for the workarray, WORK, which is used to + 137 + store the tabulated values, for interpolation on later calls. NWORK + 137 + must be at least (NX+1)*(NY+1)+6, where NX,NY are the output grid + 137 + parameters used by the program which generated the tabulated values. + 137 + + 137 + If the old solution you want to interpolate is saved in the output + 137 + array UOUT(I,J,ider,ieq,is), I=0,NX, J=0,NY, rather than in a file, + 137 + you can pass the old solution through the WORK array as follows: + 137 + WORK(1) = NX+1 + 137 + WORK(2) = NY+1 + 137 + WORK(3) = XA ! (limits on X,Y for uniform grid) + 137 + WORK(4) = YA + 137 + WORK(5) = XB + 137 + WORK(6) = YB + 137 + L = 6 + 137 + DO J=0,NY + 137 + DO I=0,NX + 137 + L = L+1 + 137 + WORK(L) = UOUT(I,J,ider,ieq,is) + 137 + END DO + 137 + END DO + 137 + If WORK is defined as shown above in the main program, and passed + 137 + through COMMON to the FORTRAN function, you can use this option to + 137 + communicate between loops through the main program in a single run. + 137 + Now FNAME and ISET will not be used and should be defaulted. + 137 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 137E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 137E$ enter: NWORK = 2000 $ 137E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 138 Enter, WITHOUT quotation marks, the name (FNAME) of the file which 138 contains the tabulated values to be read and interpolated. The 138 tabulated values must have been generated by PDE2D using the 138 rectangular output grid option. 138 138 If FNAME is defaulted, it is assumed the tabulated values will be 138 passed through the workarray, WORK. 138E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 138E$ Enter the name of the example 4 tabular output file, e.g: $ 138E$ enter: FNAME = dex4.out $ 138E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 139 Enter the number, ISET, of the set in this file which contains the 139 tabulated values to be read and interpolated. A 'set' is a block of 139 output following a line containing 'T = ...'. The default is ISET=1. 139 139 ISET is not used and may be defaulted, if FNAME is defaulted. 139E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 139E$ The tabular output file contains the temperature profile at six $ 139E$ time points, T=0,2,4,6,8,10; we want to read the profile at T=10, so $ 139E$ enter: ISET = 6 $ 139E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 140 Enter the desired degree, KDEG=1,2 or 3, of the interpolation between 140 gridpoints. Set KDEG=2 or 3 only if the tabulated function is smooth. 140 140 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 140 + The tabulated values are read from file FNAME (if nonblank) into the + 140 + workarray the first time the function is called, and on this and + 140 + subsequent calls, interpolation is done to compute the function + 140 + value. + 140 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 140E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 140E$ enter: KDEG = 3 $ 140E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 141 PDE2D solves the time-dependent system (note: U,F,U0 may be vectors, 141 C,RHO may be matrices): 141 141 C(T,U)*d(U)/dT = F(T,U) 141 141 or the algebraic system: 141 141 F(U) = 0 141 141 or the linear and homogeneous eigenvalue system: 141 141 F(U) = lambda*RHO*U 141 141 For time-dependent problems there are also initial conditions: 141 141 U = U0 at T=T0 141 141 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 141 + A system of NEQN complex equations must be written as a system + 141 + 2*NEQN real equations, by separating the equations into their real + 141 + and imaginary parts. However, note that the complex arithmetic + 141 + abilities of FORTRAN can be used to simplify this separation. For + 141 + example, the complex nonlinear algebraic equation: + 141 + U**10 - 1.0 = 0, where U = UR + UI*I + 141 + would be difficult to split up analytically, but using FORTRAN + 141 + expressions it is easy: + 141 + F1 = REAL(CMPLX(UR,UI)**10-1.0) + 141 + F2 = AIMAG(CMPLX(UR,UI)**10-1.0) + 141 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 142 If you don't want to read the FINE PRINT, enter 'yes'. 142 142 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 142 + Is the Crank-Nicolson scheme to be used to discretize time? If you + 142 + answer 'no', a backward Euler scheme will be used. Do not use the + 142 + Crank Nicolson method if the left hand side of any ODE is zero, for + 142 + example, if a differential/algebraic system is solved. + 142 + + 142 + The Crank-Nicolson scheme is second order, and the backward Euler + 142 + method is first order. However, if adaptive time step control is + 142 + chosen, an extrapolation is done between the 1-step and 2-step + 142 + answers which makes the Euler method second order, and the Crank- + 142 + Nicolson method third order (fourth order for linear problems). + 142 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 143 You may now choose names for the component(s) of the (possibly vector) 143 solution U. Each must be an alphanumeric string of one to three 143 characters, beginning with a letter in the range A-H or O-Z. The 143 variable name T must not be used. The name should start in column 1. 144 Enter FORTRAN expressions for the functions whose "integrals" are to 144 be calculated and printed. They may be functions of $$1 and (if 144 applicable) T. For 0D problems, the "integral" is just the value 144 of the integrand. 144 145 Enter FORTRAN expressions for the functions whose "integrals" are to 145 be calculated and printed. They may be functions of $$1,$$2 and (if 145 applicable) T. For 0D problems, the "integral" is just the value 145 of the integrand. 145 146 Enter FORTRAN expressions for the functions whose "integrals" are to 146 be calculated and printed. They may be functions of $$1,$$2,$$3 and 146 (if applicable) T. For 0D problems, the "integral" is just the value 146 of the integrand. 146 147 Enter FORTRAN expressions for the functions whose "integrals" are to 147 be calculated and printed. They may be functions of $$1,$$2,$$3,$$4 147 ... and (if applicable) T. For 0D problems, the "integral" is just 147 the value of the integrand. 147 148 Now enter FORTRAN expressions to define the PDE coefficients. 148 RHO is a constant, while F may be a function of $$1. 148 148 Recall that the PDE has the form 148 148 F = lambda*RHO*$$1 148 149 Now enter FORTRAN expressions to define the PDE coefficients. 149 RHO11,RHO12,RHO21,RHO22 are constants, while F1,F2 may be functions 149 $$1,$$2. 149 149 Recall that the PDEs have the form 149 149 F1 = lambda*(RHO11*$$1 + RHO12*$$2) 149 F2 = lambda*(RHO21*$$1 + RHO22*$$2) 149 150 Now enter FORTRAN expressions to define the PDE coefficients. 150 RHO11,RHO12,RHO13,RHO21,RHO22,RHO23,RHO31,RHO32,RHO33 are constants, 150 while F1,F2,F3 may be functions of $$1,$$2,$$3. 150 150 Recall that the PDEs have the form 150 150 F1 = lambda*(RHO11*$$1 + RHO12*$$2 + RHO13*$$3) 150 F2 = lambda*(RHO21*$$1 + RHO22*$$2 + RHO23*$$3) 150 F3 = lambda*(RHO31*$$1 + RHO32*$$2 + RHO33*$$3) 150 151 Now enter FORTRAN expressions to define the PDE coefficients. The 151 RHOIJ are constants, while F1,F2,F3,F4,... may be functions of 151 $$1,$$2,$$3,$$4,... 151 151 Recall that the PDEs have the form 151 151 F1 = lambda*(RHO11*$$1 + RHO12*$$2 + RHO13*$$3 + RHO14*$$4...) 151 F2 = lambda*(RHO21*$$1 + RHO22*$$2 + RHO23*$$3 + RHO24*$$4...) 151 F3 = lambda*(RHO31*$$1 + RHO32*$$2 + RHO33*$$3 + RHO34*$$4...) 151 F4 = lambda*(RHO41*$$1 + RHO42*$$2 + RHO43*$$3 + RHO44*$$4...) 151 . . 151 152 Now enter FORTRAN expressions to define the PDE coefficients, which 152 may be functions of $$1 and, in some cases, of the parameter T. 152 152 Recall that the PDE has the form 152 152 F = 0 152 153 Now enter FORTRAN expressions to define the PDE coefficients, which 153 may be functions of $$1,$$2 and, in some cases, of the parameter T. 153 153 Recall that the PDEs have the form 153 153 F1 = 0 153 F2 = 0 153 154 Now enter FORTRAN expressions to define the PDE coefficients, which 154 may be functions of $$1,$$2,$$3, in some cases, of the parameter T. 154 154 Recall that the PDEs have the form 154 154 F1 = 0 154 F2 = 0 154 F3 = 0 154 155 Now enter FORTRAN expressions to define the PDE coefficients, which 155 may be functions of $$1,$$2,$$3,$$4,... and, in some cases, of the 155 parameter T. 155 155 Recall that the PDEs have the form 155 155 F1 = 0 155 F2 = 0 155 F3 = 0 155 F4 = 0 155 . . 155 156 Now enter FORTRAN expressions to define the PDE coefficients, which 156 may be functions of T,$$1. 156 156 Recall that the PDE has the form 156 156 C*d($$1)/dT = F 156 157 Now enter FORTRAN expressions to define the PDE coefficients, which 157 may be functions of T,$$1,$$2. 157 157 Recall that the PDEs have the form 157 157 C11*d($$1)/dT + C12*d($$2)/dT = F1 157 C21*d($$1)/dT + C22*d($$2)/dT = F2 157 158 Now enter FORTRAN expressions to define the PDE coefficients, which 158 may be functions of T,$$1,$$2,$$3. 158 158 Recall that the PDEs have the form 158 158 C11*d($$1)/dT + C12*d($$2)/dT + C13*d($$3)/dT = F1 158 C21*d($$1)/dT + C22*d($$2)/dT + C23*d($$3)/dT = F2 158 C31*d($$1)/dT + C32*d($$2)/dT + C33*d($$3)/dT = F3 158 159 Now enter FORTRAN expressions to define the PDE coefficients, which 159 may be functions of T,$$1,$$2,$$3,$$4,... 159 159 Recall that the PDEs have the form 159 159 C11*d($$1)/dT + C12*d($$2)/dT + C13*d($$3)/dT + C14*d($$4)/dT +...= F1 159 C21*d($$1)/dT + C22*d($$2)/dT + C23*d($$3)/dT + C24*d($$4)/dT +...= F2 159 C31*d($$1)/dT + C32*d($$2)/dT + C33*d($$3)/dT + C34*d($$4)/dT +...= F3 159 C41*d($$1)/dT + C42*d($$2)/dT + C43*d($$3)/dT + C44*d($$4)/dT +...= F4 159 . . . . 159 160 If you don't want to read the FINE PRINT, default the initial values. 160 160 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 160 + Now the initial values for the inverse power method may be defined + 160 + using FORTRAN expressions. + 160 + + 160 + By default, the initial values are generated by a random number + 160 + generator. This virtually eliminates any possibility of convergence + 160 + to the wrong eigenvalue, due to an unlucky choice of initial values. + 160 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 161 Now the initial values for Newton's method must be defined using 161 FORTRAN expressions. 161 161 It is important to provide initial values which are at least of the 161 correct order of magnitude. 162 Now the initial values must be defined using FORTRAN expressions. 162 They may reference the initial time T0. 163 If you don't want to read the FINE PRINT, default the following 163 variable. 163 163 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 163 + Normally, PDE2D saves the values of $$1 at the output points. + 163 + If different variables are to be saved (for later printing or + 163 + plotting) the following function can be used to re-define the + 163 + output variable: + 163 + define UPRINT(1) to replace $$1 + 163 + UPRINT may be a function of $$1 and (if applicable) T, and of the + 163 + "integral" estimates SINT(1),... + 163 + + 163 + UPRINT(1) defaults to $$1. Enter a FORTRAN expression for UPRINT(1) + 163 + (or default). + 163 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 164 If you don't want to read the FINE PRINT, default all of the following 164 variables. 164 164 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 164 + Normally, PDE2D saves the values of $$1,$$2 at the output points. + 164 + If different variables are to be saved (for later printing or + 164 + plotting) the following functions can be used to re-define the + 164 + output variables: + 164 + define UPRINT(1) to replace $$1 + 164 + UPRINT(2) $$2 + 164 + Each function may be a function of $$1,$$2 and (if applicable) T, + 164 + and of the "integral" estimates SINT(1),... + 164 + + 164 + The default for each variable is no change, for example, UPRINT(1) + 164 + defaults to $$1. Enter FORTRAN expressions for each of the + 164 + following functions (or default). + 164 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 165 If you don't want to read the FINE PRINT, default all of the following 165 variables. 165 165 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 165 + Normally, PDE2D saves the values of $$1,$$2,$$3 at the output points.+ 165 + If different variables are to be saved (for later printing or + 165 + plotting) the following functions can be used to re-define the + 165 + the output variables: + 165 + define UPRINT(1) to replace $$1 + 165 + UPRINT(2) $$2 + 165 + UPRINT(3) $$3 + 165 + Each function may be a function of $$1,$$2,$$3 and (if applicable) T,+ 165 + and of the "integral" estimates SINT(1),... + 165 + + 165 + The default for each variable is no change, for example, UPRINT(1) + 165 + defaults to $$1. Enter FORTRAN expressions for each of the + 165 + following functions (or default). + 165 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 166 If you don't want to read the FINE PRINT, default all of the following 166 variables. 166 166 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 166 + Normally, PDE2D saves the values of $$1,$$2,$$3,$$4,... at the output+ 166 + points. If different variables are to be saved (for later printing + 166 + or plotting) the following functions can be used to re-define the + 166 + output variables: + 166 + define UPRINT(1) to replace $$1 + 166 + UPRINT(2) $$2 + 166 + UPRINT(3) $$3 + 166 + UPRINT(4) $$4 + 166 + . . + 166 + . . + 166 + Each function may be a function of $$1,$$2,$$3,$$4,... and (if + 166 + applicable) T, and of the "integral" estimates SINT(1),... + 166 + + 166 + The default for each variable is no change, for example, UPRINT(1) + 166 + defaults to $$1. Enter FORTRAN expressions for each of the + 166 + following functions (or default). + 166 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 167 To generate tabular or graphical output, choose an output option from 167 the list below. 167 167 0. No further output is desired 167 1. Table of values at output points 167 The tabulated output is saved in a file. 167 2. Plot of variable versus time 167 167 Enter 0,1 or 2 to select an output option. 167 167 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 167 + If you decide later that you want additional types of plots not + 167 + requested during this interactive session, you will have to work + 167 + through a new interactive session, so it is recommended that you + 167 + request all output or plots you think you MIGHT eventually want now, + 167 + during this session. + 167 + + 167 + Regardless of the options you select, a dummy subroutine POSTPR + 167 + will be included in the program created by the interactive driver; + 167 + you can add your own postprocessing code to this subroutine. + 167 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 168 Enter a value for IVAR, to select the variable to be plotted or 168 printed: 168 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 169 Enter a value for IVAR, to select the variable to be plotted or 169 printed: 169 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 169 2 $$2 170 Enter a value for IVAR, to select the variable to be plotted or 170 printed: 170 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 170 2 $$2 170 3 $$3 171 Enter a value for IVAR, to select the variable to be plotted or 171 printed: 171 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 171 2 $$2 171 3 $$3 171 4 $$4 171 . . 171 . . 171 172 PDE2D solves the time-dependent system (note: U,F,G,U0 may be vectors, 172 C,RHO may be matrices): 172 172 C(X,T,U,Ux)*d(U)/dT = F(X,T,U,Ux,Uxx) 172 172 or the steady-state system: 172 172 F(X,U,Ux,Uxx) = 0 172 172 or the linear and homogeneous eigenvalue system: 172 172 F(X,U,Ux,Uxx) = lambda*RHO(X)*U 172 172 with boundary conditions: 172 172 G(X,[T],U,Ux) = 0 172 (periodic boundary conditions are also permitted) 172 172 at two X values. 172 172 For time-dependent problems there are also initial conditions: 172 172 U = U0(X) at T=T0 172 172 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 172 + A system of NEQN complex partial differential equations must be + 172 + written as a system of 2*NEQN real equations, by separating the + 172 + equations into their real and imaginary parts. However, note that + 172 + the complex arithmetic abilities of FORTRAN can be used to simplify + 172 + this separation. For example, the complex PDE: + 172 + I*Uxx - 1/(1+U**10) = 0, where U = UR + UI*I + 172 + would be difficult to split up analytically, but using FORTRAN + 172 + expressions it is easy: + 172 + F1 = -UIxx - REAL(1.0/(1.0+CMPLX(UR,UI)**10)) + 172 + F2 = URxx - AIMAG(1.0/(1.0+CMPLX(UR,UI)**10)) + 172 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 173 A collocation finite element method is used, with cubic Hermite 173 basis functions on the subintervals defined by the grid points: 173 XGRID(1),XGRID(2),...,XGRID(NXGRID) 173 You will first be prompted for NXGRID, the number of X-grid points, 173 then for XGRID(1),...,XGRID(NXGRID). Any points defaulted will be 173 uniformly spaced between the points you define; the first and last 173 points cannot be defaulted. The interval over which the PDE system 173 is to be solved is then: 173 XGRID(1) < X < XGRID(NXGRID) 173 173O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 173O$ enter: NXGRID = 21 $ 173O$ XGRID(1) = 0 $ 173O$ XGRID(6) = 0.5 $ 173O$ XGRID(11) = 1.0 $ 173O$ XGRID(16) = 3.0 $ 173O$ XGRID(NXGRID) = 10.0 $ 173O$ and default the other XGRID points. $ 173O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 174 Enter FORTRAN expressions for the functions whose integrals are to be 174 calculated and printed. They may be functions of 174 174 X,$$1,$$1x,$$1xx and (if applicable) T 174 174 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 174 + If you only want to integrate a function over part of the interval, + 174 + define that function to be zero on the rest of the interval. + 174 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 174O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 174O$ We want to compute the integral of U**2 over the entire 3D space, $ 174O$ which will be used later in normalizing the probability density for $ 174O$ plotting. The integral over the entire 3D space can be calculated $ 174O$ as the integral from X=0 to X=infinity of 4*PI*X**2*U**2, where X is $ 174O$ the spherical coordinate Rho. Thus, $ 174O$ enter: INTEGRAL = 4*PI*X**2*U**2 $ 174O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 175 Enter FORTRAN expressions for the functions whose integrals are to be 175 calculated and printed. They may be functions of 175 175 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx and (if applicable) T 175 175 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 175 + If you only want to integrate a function over part of the interval, + 175 + define that function to be zero on the rest of the interval. + 175 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 176 Enter FORTRAN expressions for the functions whose integrals are to be 176 calculated and printed. They may be functions of 176 176 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx and (if applicable) T 176 176 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 176 + If you only want to integrate a function over part of the interval, + 176 + define that function to be zero on the rest of the interval. + 176 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 177 Enter FORTRAN expressions for the functions whose integrals are to be 177 calculated and printed. They may be functions of 177 177 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx,$$4,$$4x,$$4xx ... 177 and (if applicable) T 177 177 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 177 + If you only want to integrate a function over part of the interval, + 177 + define that function to be zero on the rest of the interval. + 177 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 178 Enter FORTRAN expressions for the functions whose "integrals" (sum 178 over two boundary points) are to be calculated and printed. They may 178 be functions of 178 178 X,$$1,$$1x,$$1xx and (if applicable) T 178 178 The unit outward normal, NORMx (=1 at right endpoint, -1 at left), 178 may also be referenced. 178 178 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 178 + If you only want to "integrate" a function over one boundary point, + 178 + define that function to be zero at the other point. + 178 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 179 Enter FORTRAN expressions for the functions whose "integrals" (sum 179 over two boundary points) are to be calculated and printed. They may 179 be functions of 179 179 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx and (if applicable) T 179 179 The unit outward normal, NORMx (=1 at right endpoint, -1 at left), 179 may also be referenced. 179 179 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 179 + If you only want to "integrate" a function over one boundary point, + 179 + define that function to be zero at the other point. + 179 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 180 Enter FORTRAN expressions for the functions whose "integrals" (sum 180 over two boundary points) are to be calculated and printed. They may 180 be functions of 180 180 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx and (if applicable) T 180 180 The unit outward normal, NORMx (=1 at right endpoint, -1 at left), 180 may also be referenced. 180 180 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 180 + If you only want to "integrate" a function over one boundary point, + 180 + define that function to be zero at the other point. + 180 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 181 Enter FORTRAN expressions for the functions whose "integrals" (sum 181 over two boundary points) are to be calculated and printed. They may 181 be functions of 181 181 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx,$$4,$$4x,$$4xx ... 181 and (if applicable) T 181 181 The unit outward normal, NORMx (=1 at right endpoint, -1 at left), 181 may also be referenced. 181 181 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 181 + If you only want to "integrate" a function over one boundary point, + 181 + define that function to be zero at the other point. + 181 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 182 Now enter FORTRAN expressions to define the PDE coefficients. 182 RHO may be a function of X, while F may be a function of 182 182 X,$$1,$$1x,$$1xx 182 182 Recall that the PDE has the form 182 182 F = lambda*RHO*$$1 182 182O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 182O$ The differential equation is $ 182O$ $ 182O$ Uxx + 2/x*Ux + C1/x*U = lambda*C2*U $ 182O$ $ 182O$ When asked if you want to write a FORTRAN block, $ 182O$ enter: no $ 182O$ then enter the following, when prompted: $ 182O$ F = Uxx + 2/x*Ux + C1/x*U RHO = C2 $ 182O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 183 Now enter FORTRAN expressions to define the PDE coefficients. 183 RHO11,RHO12,RHO21,RHO22 may be functions of X, while F1,F2 183 may be functions of 183 183 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx 183 183 Recall that the PDEs have the form 183 183 F1 = lambda*(RHO11*$$1 + RHO12*$$2) 183 F2 = lambda*(RHO21*$$1 + RHO22*$$2) 183 184 Now enter FORTRAN expressions to define the PDE coefficients. 184 RHO11,RHO12,RHO13,RHO21,RHO22,RHO23,RHO31,RHO32,RHO33 may be 184 functions of X, while F1,F2,F3 may be functions of 184 184 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx 184 184 Recall that the PDEs have the form 184 184 F1 = lambda*(RHO11*$$1 + RHO12*$$2 + RHO13*$$3) 184 F2 = lambda*(RHO21*$$1 + RHO22*$$2 + RHO23*$$3) 184 F3 = lambda*(RHO31*$$1 + RHO32*$$2 + RHO33*$$3) 184 185 Now enter FORTRAN expressions to define the PDE coefficients. The 185 RHOIJ may be functions of X, while F1,F2,F3,F4,... may be 185 functions of 185 185 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx,$$4,$$4x,$$4xx,... 185 185 Recall that the PDEs have the form 185 185 F1 = lambda*(RHO11*$$1 + RHO12*$$2 + RHO13*$$3 + RHO14*$$4...) 185 F2 = lambda*(RHO21*$$1 + RHO22*$$2 + RHO23*$$3 + RHO24*$$4...) 185 F3 = lambda*(RHO31*$$1 + RHO32*$$2 + RHO33*$$3 + RHO34*$$4...) 185 F4 = lambda*(RHO41*$$1 + RHO42*$$2 + RHO43*$$3 + RHO44*$$4...) 185 . . 185 186 Now enter FORTRAN expressions to define the PDE coefficients, which 186 may be functions of 186 186 X,$$1,$$1x,$$1xx 186 186 and, in some cases, of the parameter T. 186 186 Recall that the PDE has the form 186 186 F = 0 186 187 Now enter FORTRAN expressions to define the PDE coefficients, which 187 may be functions of 187 187 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx 187 187 and, in some cases, of the parameter T. 187 187 Recall that the PDEs have the form 187 187 F1 = 0 187 F2 = 0 187 188 Now enter FORTRAN expressions to define the PDE coefficients, which 188 may be functions of 188 188 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx 188 188 and, in some cases, of the parameter T. 188 188 Recall that the PDEs have the form 188 188 F1 = 0 188 F2 = 0 188 F3 = 0 188 189 Now enter FORTRAN expressions to define the PDE coefficients, which 189 may be functions of 189 189 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx,$$4,$$4x,$$4xx,... 189 189 and, in some cases, of the parameter T. 189 189 Recall that the PDEs have the form 189 189 F1 = 0 189 F2 = 0 189 F3 = 0 189 F4 = 0 189 . . 189 190 Now enter FORTRAN expressions to define the PDE coefficients, which 190 may be functions of 190 190 X,T,$$1,$$1x,$$1xx 190 190 Recall that the PDE has the form 190 190 C*d($$1)/dT = F 190 191 Now enter FORTRAN expressions to define the PDE coefficients, which 191 may be functions of 191 191 X,T,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx 191 191 Recall that the PDEs have the form 191 191 C11*d($$1)/dT + C12*d($$2)/dT = F1 191 C21*d($$1)/dT + C22*d($$2)/dT = F2 191 192 Now enter FORTRAN expressions to define the PDE coefficients, which 192 may be functions of 192 192 X,T,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx 192 192 Recall that the PDEs have the form 192 192 C11*d($$1)/dT + C12*d($$2)/dT + C13*d($$3)/dT = F1 192 C21*d($$1)/dT + C22*d($$2)/dT + C23*d($$3)/dT = F2 192 C31*d($$1)/dT + C32*d($$2)/dT + C33*d($$3)/dT = F3 192 193 Now enter FORTRAN expressions to define the PDE coefficients, which 193 may be functions of 193 193 X,T,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx,$$4,$$4x,$$4xx,... 193 193 Recall that the PDEs have the form 193 193 C11*d($$1)/dT + C12*d($$2)/dT + C13*d($$3)/dT + C14*d($$4)/dT +...= F1 193 C21*d($$1)/dT + C22*d($$2)/dT + C23*d($$3)/dT + C24*d($$4)/dT +...= F2 193 C31*d($$1)/dT + C32*d($$2)/dT + C33*d($$3)/dT + C34*d($$4)/dT +...= F3 193 C41*d($$1)/dT + C42*d($$2)/dT + C43*d($$3)/dT + C44*d($$4)/dT +...= F4 193 . . . . 193 194 If you don't want to read the FINE PRINT, default the initial values. 194 194 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 194 + Now the initial values for the inverse power method may be defined + 194 + using FORTRAN expressions. They may be functions of X. + 194 + + 194 + By default, the initial values are generated by a random number + 194 + generator. This virtually eliminates any possibility of convergence + 194 + to the wrong eigenvalue, due to an unlucky choice of initial values. + 194 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 194O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 194O$ press [RETURN] to default U0 $ 194O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 195 Now the initial values for Newton's method must be defined using 195 FORTRAN expressions. They may be functions of X. 195 195 It is important to provide initial values which are at least of the 195 correct order of magnitude. 196 Now the initial values must be defined using FORTRAN expressions. 196 They may be functions of X, and may also reference the initial time T0. 196N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 196N$ enter: H0 = -20 - X $ 196N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 197 If you don't want to read the FINE PRINT, enter 'no'. 197 197 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 197 + Normally, interpolation is done to approximate the initial values + 197 + using cubic Hermites. Since some derivatives must be interpolated, + 197 + if the initial values are not smooth (ie, have large or infinite + 197 + derivatives), the resulting cubic interpolants may have undesired + 197 + noise or large spikes. Do you want to compute a least squares + 197 + approximation to the initial values, rather than an interpolant? + 197 + The least squares fit is generally much smoother, but requires one + 197 + extra linear system solution. + 197 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 197J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 197J$ enter: yes $ 197J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 198 If you do not have periodic boundary conditions, enter IPERDC=0. 198 198 Enter IPERDC=1 for periodic conditions at X = XGRID(1),XGRID(NXGRID) 198 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 198 + When periodic boundary conditions are selected, they apply to all + 198 + variables by default. To turn off periodic boundary conditions on + 198 + the I-th variable, set PERDC(I) to 0 below in the main program and + 198 + set the desired boundary conditions in subroutine GB8Z, "by hand". + 198 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 198O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 198O$ enter: IPERDC = 0 $ 198O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 199 Enter FORTRAN expressions to define the boundary condition functions, 199 which may be functions of 199 199 X,$$1,$$1x and (if applicable) T 199 199 Recall that the boundary conditions have the form 199 199 G = 0 199 199 Enter NONE to indicate "no" boundary condition. 199 199 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 199 + If "no" boundary condition is specified, the PDE is enforced at a + 199 + point just inside the boundary (exactly on the boundary, if EPS8Z + 199 + is set to 0 in the main program). + 199 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 200 Enter FORTRAN expressions to define the boundary condition functions, 200 which may be functions of 200 200 X,$$1,$$1x,$$2,$$2x and (if applicable) T 200 200 Recall that the boundary conditions have the form 200 200 G1 = 0 200 G2 = 0 200 200 Enter NONE to indicate "no" boundary condition. 200 200 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 200 + If "no" boundary condition is specified, the corresponding PDE is + 200 + enforced at a point just inside the boundary (exactly on the + 200 + boundary, if EPS8Z is set to 0 in the main program). + 200 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 201 Enter FORTRAN expressions to define the boundary condition functions, 201 which may be functions of 201 201 X,$$1,$$1x,$$2,$$2x,$$3,$$3x and (if applicable) T 201 201 Recall that the boundary conditions have the form 201 201 G1 = 0 201 G2 = 0 201 G3 = 0 201 201 Enter NONE to indicate "no" boundary condition. 201 201 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 201 + If "no" boundary condition is specified, the corresponding PDE is + 201 + enforced at a point just inside the boundary (exactly on the + 201 + boundary, if EPS8Z is set to 0 in the main program). + 201 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 202 Enter FORTRAN expressions to define the boundary condition functions, 202 which may be functions of 202 202 X,$$1,$$1x,$$2,$$2x,$$3,$$3x,$$4,$$4x,... and (if applicable) T 202 202 Recall that the boundary conditions have the form 202 202 G1 = 0 202 G2 = 0 202 G3 = 0 202 G4 = 0 202 . . 202 Enter NONE to indicate "no" boundary condition. 202 202 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 202 + If "no" boundary condition is specified, the corresponding PDE is + 202 + enforced at a point just inside the boundary (exactly on the + 202 + boundary, if EPS8Z is set to 0 in the main program). + 202 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 203 203 First define the boundary conditions at the point X = XGRID(1). 203O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 203O$ enter: G = NONE $ 203O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 204 204 Now define the boundary conditions at the point X = XGRID(NXGRID). 204O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 204O$ enter: G = U $ 204O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 205 If you don't want to read the FINE PRINT, default all of the following 205 variables. 205 205 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 205 + Normally, PDE2D saves the values of $$1,$$1x at the output points. + 205 + If different variables are to be saved (for later printing or + 205 + plotting) the following functions can be used to re-define the + 205 + output variables: + 205 + define UPRINT(1) to replace $$1 + 205 + UXPRNT(1) $$1x + 205 + Each function may be a function of + 205 + + 205 + X,$$1,$$1x,$$1xx and (if applicable) T + 205 + + 205 + Each may also be a function of the integral estimates SINT(1),..., + 205 + BINT(1),... + 205 + + 205 + The default for each variable is no change, for example, UPRINT(1) + 205 + defaults to $$1. Enter FORTRAN expressions for each of the + 205 + following functions (or default). + 205 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 205O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 205O$ We want to plot the probability density, which is proportional to $ 205O$ U**2, but normalized so that the integral of the probability density $ 205O$ is equal to 1. Since SINT(1) will contain the integral of U**2, $ 205O$ to get plots of the probability density, $ 205O$ enter: UPRINT(1) = U**2/SINT(1) $ 205O$ and default the other output modification variable $ 205O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 206 If you don't want to read the FINE PRINT, default all of the following 206 variables. 206 206 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 206 + Normally, PDE2D saves the values of $$1,$$1x,$$2,$$2x at the output + 206 + points. If different variables are to be saved (for later printing + 206 + or plotting) the following functions can be used to re-define the + 206 + output variables: + 206 + define UPRINT(1) to replace $$1 + 206 + UXPRNT(1) $$1x + 206 + UPRINT(2) $$2 + 206 + UXPRNT(2) $$2x + 206 + Each function may be a function of + 206 + + 206 + X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx and (if applicable) T + 206 + + 206 + Each may also be a function of the integral estimates SINT(1),..., + 206 + BINT(1),... + 206 + + 206 + The default for each variable is no change, for example, UPRINT(1) + 206 + defaults to $$1. Enter FORTRAN expressions for each of the + 206 + following functions (or default). + 206 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 207 If you don't want to read the FINE PRINT, default all of the following 207 variables. 207 207 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 207 + Normally, PDE2D saves the values of $$1,$$1x,$$2,$$2x,$$3,$$3x at + 207 + the output points. If different variables are to be saved (for + 207 + later printing or plotting) the following functions can be used to + 207 + re-define the output variables: + 207 + define UPRINT(1) to replace $$1 + 207 + UXPRNT(1) $$1x + 207 + UPRINT(2) $$2 + 207 + UXPRNT(2) $$2x + 207 + UPRINT(3) $$3 + 207 + UXPRNT(3) $$3x + 207 + Each function may be a function of + 207 + + 207 + X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx and (if applicable) T + 207 + + 207 + Each may also be a function of the integral estimates SINT(1),..., + 207 + BINT(1),... + 207 + + 207 + The default for each variable is no change, for example, UPRINT(1) + 207 + defaults to $$1. Enter FORTRAN expressions for each of the + 207 + following functions (or default). + 207 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 208 If you don't want to read the FINE PRINT, default all of the following 208 variables. 208 208 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 208 + Normally, PDE2D saves the values of $$1,$$1x,$$2,$$2x,$$3,$$3x,$$4, + 208 + $$4x...at the output points. If different variables are to be saved + 208 + (for later printing or plotting) the following functions can be used + 208 + to re-define the output variables: + 208 + define UPRINT(1) to replace $$1 + 208 + UXPRNT(1) $$1x + 208 + UPRINT(2) $$2 + 208 + UXPRNT(2) $$2x + 208 + UPRINT(3) $$3 + 208 + UXPRNT(3) $$3x + 208 + UPRINT(4) $$4 + 208 + UXPRNT(4) $$4x + 208 + . . + 208 + . . + 208 + Each function may be a function of + 208 + + 208 + X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx,$$4,$$4x,$$4xx,... + 208 + and (if applicable) T + 208 + + 208 + Each may also be a function of the integral estimates SINT(1),..., + 208 + BINT(1),... + 208 + + 208 + The default for each variable is no change, for example, UPRINT(1) + 208 + defaults to $$1. Enter FORTRAN expressions for each of the + 208 + following functions (or default). + 208 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 209 The solution is saved on a uniform grid of NX+1 points 209 XA + I*(XB-XA)/NX 209 I=0,...,NX. Enter a value for NX (suggested value = 50). 209 209 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 209 + If you want to save the solution at an arbitrary user-specified set + 209 + of NX+1 points, enter -NX. + 209 + + 209 + If you set NEAR8Z=1 in the main program, the values saved at each + 209 + output point will actually be the solution as evaluated at a nearby + 209 + collocation or integration point. For most problems this obviously + 209 + will produce less accurate output or plots, but for certain (rare) + 209 + problems, a solution component may be much less noisy when plotted + 209 + only at collocation or integration points. + 209 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 209N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 209N$ enter: 50 $ 209N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 209O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 209O$ enter: 50 $ 209O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 210 The solution is saved on a uniform grid of NX+1 points, covering the 210 interval (XA,XB). Enter values for XA,XB. These variables are usually 210 defaulted. 210 210 The defaults are XA = XGRID(1), XB = XGRID(NXGRID) 210 210N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 210N$ press [RETURN] to default XA,XB $ 210N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 210O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 210O$ enter: XA = 0 $ 210O$ XB = 2 $ 210O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 211 To generate tabular or graphical output, choose an output option from 211 the list below. 211 211 0. No further output is desired 211 1. Table of values at output points 211 The tabulated output is saved in a file. 211 2. One dimensional cross-sectional plots (versus X or T) 211 or, if applicable: 211 3. Surface plot of variable as function of X and T 211 211 Enter 0,1,2 or 3 to select an output option. 211 211 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 211 + If you decide later that you want additional types of plots not + 211 + requested during this interactive session, you will have to work + 211 + through a new interactive session, so it is recommended that you + 211 + request all output or plots you think you MIGHT eventually want now, + 211 + during this session. + 211 + + 211 + Regardless of the options you select, a dummy subroutine POSTPR + 211 + will be included in the program created by the interactive driver; + 211 + you can add your own postprocessing code to this subroutine. + 211 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 211N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 211N$ enter: 3, the first time you see this message and $ 211N$ 0, the second time $ 211N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 211O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 211O$ enter: 2, the first time you see this message and $ 211O$ 0, the second time $ 211O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 212 Enter a value for IVAR, to select the variable to be plotted or 212 printed: 212 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 212 2 $$1x 212O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 212O$ enter: 1 $ 212O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 213 Enter a value for IVAR, to select the variable to be plotted or 213 printed: 213 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 213 2 $$1x 213 3 $$2 213 4 $$2x 214 Enter a value for IVAR, to select the variable to be plotted or 214 printed: 214 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 214 2 $$1x 214 3 $$2 214 4 $$2x 214 5 $$3 214 6 $$3x 215 Enter a value for IVAR, to select the variable to be plotted or 215 printed: 215 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 215 2 $$1x 215 3 $$2 215 4 $$2x 215 5 $$3 215 6 $$3x 215 7 $$4 215 8 $$4x 215 . . 215 . . 216 Which type of cross-sectional plots do you want? 216 216 1. Plots of output variable as function of X (constant [T]) 216 or, if applicable: 216 2. Plots of output variable as function of T (constant X) 216 216 Enter 1 or 2 to select a plot type. 216O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 216O$ enter: 1 $ 216O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 217 One-dimensional plots of the output variable as a function of T 217 will be made, at the output grid points X closest to 217 XCROSS(I), I=1,...,NXVALS 217 217 Enter values for NXVALS, XCROSS(1),...,XCROSS(NXVALS), 218 Enter the name of the FORTRAN function subprogram, in columns 1-6. It 218 must be a function of X only, but do not enter the '(X)'. 219 If you don't want to read the FINE PRINT, enter NWORK = 2000. 219 219 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 219 + Enter a dimension, NWORK, for the workarray, WORK, which is used to + 219 + store the tabulated values, for interpolation on later calls. NWORK + 219 + must be at least NX+4, where NX is the output grid parameter used by + 219 + the program which generated the tabulated values. + 219 + + 219 + If the old solution you want to interpolate is saved in the output + 219 + array UOUT(I,ider,ieq,is), I=0,NX, rather than in a file, you can + 219 + pass the old solution through the WORK array as follows: + 219 + WORK(1) = NX+1 + 219 + WORK(2) = XA ! (limits on X for uniform grid) + 219 + WORK(3) = XB + 219 + L = 3 + 219 + DO I=0,NX + 219 + L = L+1 + 219 + WORK(L) = UOUT(I,ider,ieq,is) + 219 + END DO + 219 + If WORK is defined as shown above in the main program, and passed + 219 + through COMMON to the FORTRAN function, you can use this option to + 219 + communicate between loops through the main program in a single run. + 219 + Now FNAME and ISET will not be used and should be defaulted. + 219 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 220 Enter, WITHOUT quotation marks, the name (FNAME) of the file which 220 contains the tabulated values to be read and interpolated. 220 220 If FNAME is defaulted, it is assumed the tabulated values will be 220 passed through the workarray, WORK. 221 Enter the name of the FORTRAN function subprogram, in columns 1-6. It 221 must be a function of P1 and P2 only, but do not enter the '(P1,P2)'. 222 PDE2D solves the time-dependent system (note: U,F,G,U0 may be vectors, 222 C,RHO may be matrices): 222 222 C(X,Y,Z,T,U,Ux,Uy,Uz)*d(U)/dT = 222 F(X,Y,Z,T,U,Ux,Uy,Uz,Uxx,Uyy,Uzz,Uxy,Uxz,Uyz) 222 222 or the steady-state system: 222 222 F(X,Y,Z,U,Ux,Uy,Uz,Uxx,Uyy,Uzz,Uxy,Uxz,Uyz) = 0 222 222 or the linear and homogeneous eigenvalue system: 222 222 F(X,Y,Z,U,Ux,Uy,Uz,Uxx,Uyy,Uzz,Uxy,Uxz,Uyz) = lambda*RHO(X,Y,Z)*U 222 222 with boundary conditions: 222 222 G(X,Y,Z,[T],U,Ux,Uy,Uz) = 0 222 (periodic boundary conditions are also permitted) 222 222 For time-dependent problems there are also initial conditions: 222 222 U = U0(X,Y,Z) at T=T0 222 222 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 222 + A system of NEQN complex partial differential equations must be + 222 + written as a system of 2*NEQN real equations, by separating the + 222 + equations into their real and imaginary parts. However, note that + 222 + the complex arithmetic abilities of FORTRAN can be used to simplify + 222 + this separation. For example, the complex PDE: + 222 + I*(Uxx+Uyy+Uzz) - 1/(1+U**10) = 0, where U = UR + UI*I + 222 + would be difficult to split up analytically, but using FORTRAN + 222 + expressions it is easy: + 222 + F1 = -(UIxx+UIyy+UIzz) - REAL(1.0/(1.0+CMPLX(UR,UI)**10)) + 222 + F2 = (URxx+URyy+URzz) - AIMAG(1.0/(1.0+CMPLX(UR,UI)**10)) + 222 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 223 You can solve problems in your region only if you can describe it by 223 X = X(P1,P2,P3) 223 Y = Y(P1,P2,P3) 223 Z = Z(P1,P2,P3) 223 with constant limits on the parameters P1,P2,P3. If your region is 223 rectangular, enter ITRANS=0 and the trivial parameterization 223 X = P1 223 Y = P2 223 Z = P3 223 will be used. Otherwise, you need to read the FINE PRINT below. 223 223 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 223 + If P1,P2,P3 represent cylindrical, spherical or other non-Cartesian + 223 + coordinates, you can reference the Cartesian coordinates X,Y,Z + 223 + and derivatives of your unknowns with respect to these coordinates, + 223 + when you define your PDE coefficients, boundary conditions, and + 223 + volume and boundary integrals, if you enter ITRANS .NE. 0. Enter: + 223 + ITRANS = 1, if P1,P2,P3 are cylindrical coordinates, that is, if + 223 + P1=R, P2=Theta, P3=Z, where X = R*cos(Theta) + 223 + Y = R*sin(Theta) + 223 + Z = Z + 223 + ITRANS = -1, same as ITRANS=1, but P1=Theta, P2=R, P3=Z + 223 + ITRANS = 2, if P1,P2,P3 are spherical coordinates, that is, if + 223 + P1=Rho, P2=Phi, P3=Theta, where + 223 + X = Rho*sin(Phi)*cos(Theta) + 223 + Y = Rho*sin(Phi)*sin(Theta) + 223 + Z = Rho*cos(Phi) + 223 + (Theta is longitude, Phi is measured from north pole) + 223 + ITRANS = -2, same as ITRANS=2, but P1=Rho, P2=Theta, P3=Phi + 223 + ITRANS = 3, to define your own coordinate transformation. In this + 223 + case, you will be prompted to define X,Y,Z and their + 223 + first and second derivatives in terms of P1,P2,P3. + 223 + Because of symmetry, you will not be prompted for all + 223 + of the second derivatives. If you make a mistake in + 223 + computing any of these derivatives, PDE2D will usually + 223 + be able to issue a warning message. (X1 = dX/dP1, etc) + 223 + ITRANS = -3, same as ITRANS=3, but you will only be prompted to + 223 + define X,Y,Z; their first and second derivatives will + 223 + be approximated using finite differences. + 223 + When ITRANS = -3 or 3, the first derivatives of X,Y,Z must all be + 223 + continuous. + 223 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 223I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 223I$ enter: ITRANS = -3 $ 223I$ $ 223I$ Then enter the following, when prompted: $ 223I$ X = (R0 + P3*COS(P2))*COS(P1) $ 223I$ Y = (R0 + P3*COS(P2))*SIN(P1) $ 223I$ Z = P3*SIN(P2) $ 223I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 223J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 223J$ enter: ITRANS = 0 $ 223J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 223K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 223K$ enter: ITRANS = 2 $ 223K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 223L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 223L$ enter: ITRANS = 1 $ 223L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 224 A collocation finite element method is used, with tri-cubic Hermite 224 basis functions on the elements (small boxes) defined by the grid 224 points: 224 P1GRID(1),...,P1GRID(NP1GRID) 224 P2GRID(1),...,P2GRID(NP2GRID) 224 P3GRID(1),...,P3GRID(NP3GRID) 224 You will first be prompted for NP1GRID, the number of P1-grid points, 224 then for P1GRID(1),...,P1GRID(NP1GRID). Any points defaulted will be 224 uniformly spaced between the points you define; the first and last 224 points cannot be defaulted. Then you will be prompted similarly 224 for the number and values of the P2 and P3-grid points. The limits 224 on the parameters are then: 224 P1GRID(1) < P1 < P1GRID(NP1GRID) 224 P2GRID(1) < P2 < P2GRID(NP2GRID) 224 P3GRID(1) < P3 < P3GRID(NP3GRID) 224 224I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 224I$ enter: NP1GRID = 4 $ 224I$ P1GRID(1) = 0 $ 224I$ P1GRID(NP1GRID) = 2*PI $ 224I$ and default the other P1GRID points $ 224I$ NP2GRID = 8 $ 224I$ P2GRID(1) = 0 $ 224I$ P2GRID(NP2GRID) = 2*PI $ 224I$ and default the other P2GRID points $ 224I$ NP3GRID = 8 $ 224I$ P3GRID(1) = 0.2*R1 $ 224I$ P3GRID(NP3GRID) = R1 $ 224I$ and default the other P3GRID points $ 224I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 224J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 224J$ enter: NP1GRID = 7 $ 224J$ P1GRID(1) = -1 $ 224J$ P1GRID(NP1GRID) = 1 $ 224J$ and default P1GRID(2),P1GRID(3),P1GRID(4),P1GRID(5),P1GRID(6) $ 224J$ NP2GRID = 7 $ 224J$ P2GRID(1) = -1 $ 224J$ P2GRID(NP2GRID) = 1 $ 224J$ and default P2GRID(2),P2GRID(3),P2GRID(4),P2GRID(5),P2GRID(6) $ 224J$ NP3GRID = 7 $ 224J$ P3GRID(1) = -1 $ 224J$ P3GRID(NP3GRID) = 1 $ 224J$ and default P3GRID(2),P3GRID(3),P3GRID(4),P3GRID(5),P3GRID(6) $ 224J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 224K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 224K$ enter: NP1GRID = 8 $ 224K$ P1GRID(1) = 0 $ 224K$ P1GRID(2) = 0.3 $ 224K$ P1GRID(3) = 0.6 $ 224K$ P1GRID(4) = 1.0 $ 224K$ P1GRID(5) = 1.5 $ 224K$ P1GRID(6) = 2.5 $ 224K$ P1GRID(7) = 4.0 $ 224K$ P1GRID(NP1GRID) = 10 $ 224K$ NP2GRID = 5 $ 224K$ P2GRID(1) = 0 $ 224K$ P2GRID(NP2GRID) = PI $ 224K$ and default P2GRID(2),P2GRID(3),P2GRID(4) $ 224K$ NP3GRID = 5 $ 224K$ P3GRID(1) = 0 $ 224K$ P3GRID(NP3GRID) = 2*PI $ 224K$ and default P3GRID(2),P3GRID(3),P3GRID(4) $ 224K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 224L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 224L$ It is essential to put gridlines at Z=1 and Z=1+EPS, because there $ 224L$ are sudden changes in Dz there. $ 224L$ $ 224L$ enter: NP1GRID = 8 $ 224L$ P1GRID(1) = 0 $ 224L$ P1GRID(NP1GRID) = 1 $ 224L$ and default the other P1GRID values $ 224L$ NP2GRID = 6 $ 224L$ P2GRID(1) = 0 $ 224L$ P2GRID(NP2GRID) = 2*PI $ 224L$ and default the other P2GRID values $ 224L$ NP3GRID = 8 $ 224L$ P3GRID(1) = 0 $ 224L$ P3GRID(4) = 1 $ 224L$ P3GRID(5) = 1+EPS $ 224L$ P3GRID(NP3GRID) = 2 $ 224L$ and default the other P3GRID values $ 224L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 225 If you don't want to read the FINE PRINT, enter ISOLVE = 1. 225 225 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 225 + The following linear system solvers are available: + 225 + + 225 + 1. Sparse direct method + 225 + Harwell Library routine MA27 (used by permission) is + 225 + used to solve the (positive definite) "normal" + 225 + equations A**T*A*x = A**T*b. The normal equations, + 225 + which are essentially the equations which would result + 225 + if a least squares finite element method were used + 225 + instead of a collocation method, are substantially + 225 + more ill-conditioned than the original system Ax = b, + 225 + so it may be important to use high precision if this + 225 + option is chosen. + 225 + 2. Frontal method + 225 + This is an out-of-core band solver. If you want to + 225 + override the default number of rows in the buffer (11),+ 225 + set a new value for NPMX8Z in the main program. + 225 + 3. Jacobi conjugate gradient iterative method + 225 + A preconditioned conjugate gradient iterative method + 225 + is used to solve the (positive definite) normal + 225 + equations. High precision is also important if this + 225 + option is chosen. (This solver is MPI-enhanced, if + 225 + MPI is available.) If you want to override the + 225 + default convergence tolerance, set a new relative + 225 + tolerance CGTL8Z in the main program. + 225 + 4. Local solver (normal equations) + 225 + 5. Local solver (original equations) + 225 + Choose these options ONLY if alterative linear system + 225 + solvers have been installed locally. See subroutines + 225 + (D)TD3M, (D)TD3N in file (d)subs.f for instructions + 225 + on how to add local solvers. + 225 + 6. MPI-based parallel band solver + 225 + This is a parallel solver which runs efficiently on + 225 + multiple processor machines, under MPI. It is a + 225 + band solver, with the matrix distributed over the + 225 + available processors. Choose this option ONLY if the + 225 + solver has been activated locally. See subroutine + 225 + (D)TD3O in file (d)subs.f for instructions on how to + 225 + activate this solver and the MPI-enhancements to the + 225 + conjugate gradient solver. + 225 + + 225 + Enter ISOLVE = 1,2,3,4,5 or 6 to select a linear system solver. + 225 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 225I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 225I$ enter: ISOLVE = 3 $ 225I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 225J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 225J$ enter: ISOLVE = 1 $ 225J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 225K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 225K$ enter: ISOLVE = 2 $ 225K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 225L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 225L$ enter: ISOLVE = 2 $ 225L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 225M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 225M$ enter: ISOLVE = 2 $ 225M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 226 You may now choose names for the component(s) of the (possibly vector) 226 solution U. Each must be an alphanumeric string of one to three 226 characters, beginning with a letter in the range A-H or O-Z. The 226 variable names X,Y,Z,P and T must not be used. The name should 226 start in column 1. 226I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 226I$ enter: U1 = U $ 226I$ U2 = V $ 226I$ U3 = W $ 226I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 226J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 226J$ enter: U1 = U $ 226J$ U2 = V $ 226J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 226K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 226K$ enter: U1 = U $ 226K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 226L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 226L$ enter: U1 = U $ 226L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 227 Enter FORTRAN expressions for the functions whose integrals are to be 227 calculated and printed. They may be functions of 227 227 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 227 and (if applicable) T 227 227 The parameters P1,P2,P3 and derivatives with respect to these may also 227 be referenced ($$11 = d$$1/dP1, etc): 227 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 227 227 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 227 + If you only want to integrate a function over part of the region, + 227 + define that function to be zero in the rest of the region. + 227 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 227K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 227K$ We want to compute the integral of U**2, which will be used later in $ 227K$ normalizing the probability density for plotting. $ 227K$ enter: INTEGRAL = U**2 $ 227K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 228 Enter FORTRAN expressions for the functions whose integrals are to be 228 calculated and printed. They may be functions of 228 228 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 228 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 228 and (if applicable) T 228 228 The parameters P1,P2,P3 and derivatives with respect to these may also 228 be referenced ($$11 = d$$1/dP1, etc): 228 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 228 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 228 228 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 228 + If you only want to integrate a function over part of the region, + 228 + define that function to be zero in the rest of the region. + 228 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 228J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 228J$ We want to compute the total energy in the box, the integral of $ 228J$ Ut**2 + Ux**2 + Uy**2 + Uz**2 (which should be constant), so $ 228J$ enter: INTEGRAL = V**2+Ux**2+Uy**2+Uz**2 $ 228J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 229 Enter FORTRAN expressions for the functions whose integrals are to be 229 calculated and printed. They may be functions of 229 229 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 229 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 229 $$3,$$3x,$$3y,$$3z,$$3xx,$$3yy,$$3zz,$$3xy,$$3xz,$$3yz 229 and (if applicable) T 229 229 The parameters P1,P2,P3 and derivatives with respect to these may also 229 be referenced ($$11 = d$$1/dP1, etc): 229 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 229 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 229 $$31,$$32,$$33,$$311,$$322,$$333,$$312,$$313,$$323 229 229 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 229 + If you only want to integrate a function over part of the region, + 229 + define that function to be zero in the rest of the region. + 229 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 229I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 229I$ We want to compute the total volume change, which is the integral $ 229I$ over our region of Ux+Vy+Wz ("true" value = -697.200). Thus, $ 229I$ enter: INTEGRAL = Ux+Vy+Wz $ 229I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 230 Enter FORTRAN expressions for the functions whose integrals are to be 230 calculated and printed. They may be functions of 230 230 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 230 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 230 $$3,$$3x,$$3y,$$3z,$$3xx,$$3yy,$$3zz,$$3xy,$$3xz,$$3yz 230 $$4,$$4x,$$4y,$$4z,$$4xx,$$4yy,$$4zz,$$4xy,$$4xz,$$4yz 230 . . . . . . . . and (if applicable) T 230 230 The parameters P1,P2,P3 and derivatives with respect to these may also 230 be referenced ($$11 = d$$1/dP1, etc): 230 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 230 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 230 $$31,$$32,$$33,$$311,$$322,$$333,$$312,$$313,$$323 230 $$41,$$42,$$43,$$411,$$422,$$433,$$412,$$413,$$423 230 . . . . . . . . . 230 230 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 230 + If you only want to integrate a function over part of the region, + 230 + define that function to be zero in the rest of the region. + 230 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 231 Enter FORTRAN expressions for the functions whose integrals are to be 231 calculated and printed. They may be functions of 231 231 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 231 and (if applicable) T 231 231 The components (NORMx,NORMy,NORMz) of the unit outward normal vector 231 may also be referenced. 231 231 The parameters P1,P2,P3 and derivatives with respect to these may 231 also be referenced: 231 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 231 You can also reference the normal derivative $$1norm. 231 231 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 231 + If you only want to integrate a function over part of the boundary, + 231 + define that function to be zero on the rest of the boundary. + 231 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 232 Enter FORTRAN expressions for the functions whose integrals are to be 232 calculated and printed. They may be functions of 232 232 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 232 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 232 and (if applicable) T 232 232 The components (NORMx,NORMy,NORMz) of the unit outward normal vector 232 may also be referenced. 232 232 The parameters P1,P2,P3 and derivatives with respect to these may 232 also be referenced: 232 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 232 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 232 You can also reference the normal derivatives $$1norm,$$2norm. 232 232 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 232 + If you only want to integrate a function over part of the boundary, + 232 + define that function to be zero on the rest of the boundary. + 232 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 233 Enter FORTRAN expressions for the functions whose integrals are to be 233 calculated and printed. They may be functions of 233 233 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 233 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 233 $$3,$$3x,$$3y,$$3z,$$3xx,$$3yy,$$3zz,$$3xy,$$3xz,$$3yz 233 and (if applicable) T 233 233 The components (NORMx,NORMy,NORMz) of the unit outward normal vector 233 may also be referenced. 233 233 The parameters P1,P2,P3 and derivatives with respect to these may 233 also be referenced: 233 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 233 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 233 $$31,$$32,$$33,$$311,$$322,$$333,$$312,$$313,$$323 233 You can also reference the normal derivatives $$1norm,$$2norm,$$3norm. 233 233 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 233 + If you only want to integrate a function over part of the boundary, + 233 + define that function to be zero on the rest of the boundary. + 233 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 233I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 233I$ By the divergence theorem, the volume integral of Ux+Vy+Wz should $ 233I$ equal the boundary integral of U*NORMx+V*NORMy+W*NORMz, so we want $ 233I$ to compute this boundary integral to verify the equality. Note that $ 233I$ boundary integrals are computed over all 6 boundary pieces, but in $ 233I$ this case the integrals at p1=0 and p1=2*pi will cancel, and $ 233I$ similarly at p2=0 and p2=2*pi. Thus enter: $ 233I$ BND. INTEGRAL = U*NORMx+V*NORMy+W*NORMz $ 233I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 234 Enter FORTRAN expressions for the functions whose integrals are to be 234 calculated and printed. They may be functions of 234 234 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 234 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 234 $$3,$$3x,$$3y,$$3z,$$3xx,$$3yy,$$3zz,$$3xy,$$3xz,$$3yz 234 $$4,$$4x,$$4y,$$4z,$$4xx,$$4yy,$$4zz,$$4xy,$$4xz,$$4yz 234 . . . . . . . and (if applicable) T 234 234 The components (NORMx,NORMy,NORMz) of the unit outward normal vector 234 may also be referenced. 234 234 The parameters P1,P2,P3 and derivatives with respect to these may 234 also be referenced: 234 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 234 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 234 $$31,$$32,$$33,$$311,$$322,$$333,$$312,$$313,$$323 234 $$41,$$42,$$43,$$411,$$422,$$433,$$412,$$413,$$423 234 . . . . . . . . . 234 You can also reference the normal derivatives $$1norm,$$2norm,$$3norm, 234 $$4norm... 234 234 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 234 + If you only want to integrate a function over part of the boundary, + 234 + define that function to be zero on the rest of the boundary. + 234 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 235 Now enter FORTRAN expressions to define the PDE coefficients. 235 RHO may be a function of X,Y,Z, while F may be a function of 235 235 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 235 235 Recall that the PDE has the form 235 235 F = lambda*RHO*$$1 235 235 The parameters P1,P2,P3 and derivatives with respect to these may also 235 be referenced ($$11 = d$$1/dP1, etc): 235 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 235K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 235K$ The partial differential equation may be written $ 235K$ $ 235K$ Uxx + Uyy + Uzz + C1/P1*U = lambda*C2*U $ 235K$ $ 235K$ where P1 is the spherical coordinate Rho. $ 235K$ $ 235K$ When asked if you want to write a FORTRAN block, $ 235K$ enter: no $ 235K$ then enter the following, when prompted: $ 235K$ F = Uxx + Uyy + Uzz + C1/P1*U $ 235K$ RHO = C2 $ 235K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 235L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 235L$ The partial differential equation may be written: $ 235L$ $ 235L$ D*(Uxx + Uyy + Uzz) + Dz*Uz = lambda*1.0*U $ 235L$ $ 235L$ where D(Z) is defined to vary rapidly, but continuously, from D=1 in $ 235L$ the bottom cylinder to D=5 in the top. Now, when asked if you want $ 235L$ to write a FORTRAN block, $ 235L$ enter: yes $ 235L$ then, when prompted, enter: $ 235L$ IF (Z.LE.1) THEN $ 235L$ D = 1 $ 235L$ Dz = 0 $ 235L$ ELSE IF (Z.GE.1+EPS) THEN $ 235L$ D = 5 $ 235L$ Dz = 0 $ 235L$ ELSE $ 235L$ D = 1 + 4.0*(Z-1)/EPS $ 235L$ Dz = 4.0/EPS $ 235L$ ENDIF $ 235L$ [blank line] $ 235L$ then, when prompted, enter: $ 235L$ F = D*(Uxx+Uyy+Uzz) + Dz*Uz $ 235L$ RHO = 1 $ 235L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 236 Now enter FORTRAN expressions to define the PDE coefficients. 236 RHO11,RHO12,RHO21,RHO22 may be functions of X,Y,Z, while F1,F2 236 may be functions of 236 236 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 236 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 236 236 Recall that the PDEs have the form 236 236 F1 = lambda*(RHO11*$$1 + RHO12*$$2) 236 F2 = lambda*(RHO21*$$1 + RHO22*$$2) 236 236 The parameters P1,P2,P3 and derivatives with respect to these may also 236 be referenced ($$11 = d$$1/dP1, etc): 236 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 236 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 237 Now enter FORTRAN expressions to define the PDE coefficients. 237 RHO11,RHO12,RHO13,RHO21,RHO22,RHO23,RHO31,RHO32,RHO33 may be 237 functions of X,Y,Z, while F1,F2,F3 may be functions of 237 237 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 237 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 237 $$3,$$3x,$$3y,$$3z,$$3xx,$$3yy,$$3zz,$$3xy,$$3xz,$$3yz 237 237 Recall that the PDEs have the form 237 237 F1 = lambda*(RHO11*$$1 + RHO12*$$2 + RHO13*$$3) 237 F2 = lambda*(RHO21*$$1 + RHO22*$$2 + RHO23*$$3) 237 F3 = lambda*(RHO31*$$1 + RHO32*$$2 + RHO33*$$3) 237 237 The parameters P1,P2,P3 and derivatives with respect to these may also 237 be referenced ($$11 = d$$1/dP1, etc): 237 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 237 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 237 $$31,$$32,$$33,$$311,$$322,$$333,$$312,$$313,$$323 238 Now enter FORTRAN expressions to define the PDE coefficients. The 238 RHOIJ may be functions of X,Y,Z, while F1,F2,F3,F4,... may be 238 functions of 238 238 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 238 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 238 $$3,$$3x,$$3y,$$3z,$$3xx,$$3yy,$$3zz,$$3xy,$$3xz,$$3yz 238 $$4,$$4x,$$4y,$$4z,$$4xx,$$4yy,$$4zz,$$4xy,$$4xz,$$4yz 238 . . . . . . . . . . 238 238 Recall that the PDEs have the form 238 238 F1 = lambda*(RHO11*$$1 + RHO12*$$2 + RHO13*$$3 + RHO14*$$4...) 238 F2 = lambda*(RHO21*$$1 + RHO22*$$2 + RHO23*$$3 + RHO24*$$4...) 238 F3 = lambda*(RHO31*$$1 + RHO32*$$2 + RHO33*$$3 + RHO34*$$4...) 238 F4 = lambda*(RHO41*$$1 + RHO42*$$2 + RHO43*$$3 + RHO44*$$4...) 238 . . 238 238 The parameters P1,P2,P3 and derivatives with respect to these may also 238 be referenced ($$11 = d$$1/dP1, etc): 238 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 238 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 238 $$31,$$32,$$33,$$311,$$322,$$333,$$312,$$313,$$323 238 $$41,$$42,$$43,$$411,$$422,$$433,$$412,$$413,$$423 238 . . . . . . . . . 239 Now enter FORTRAN expressions to define the PDE coefficients, which 239 may be functions of 239 239 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 239 239 and, in some cases, of the parameter T. 239 239 Recall that the PDE has the form 239 239 F = 0 239 239 The parameters P1,P2,P3 and derivatives with respect to these may also 239 be referenced ($$11 = d$$1/dP1, etc): 239 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 240 Now enter FORTRAN expressions to define the PDE coefficients, which 240 may be functions of 240 240 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 240 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 240 240 and, in some cases, of the parameter T. 240 240 Recall that the PDEs have the form 240 240 F1 = 0 240 F2 = 0 240 240 The parameters P1,P2,P3 and derivatives with respect to these may also 240 be referenced ($$11 = d$$1/dP1, etc): 240 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 240 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 241 Now enter FORTRAN expressions to define the PDE coefficients, which 241 may be functions of 241 241 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 241 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 241 $$3,$$3x,$$3y,$$3z,$$3xx,$$3yy,$$3zz,$$3xy,$$3xz,$$3yz 241 241 and, in some cases, of the parameter T. 241 241 Recall that the PDEs have the form 241 241 F1 = 0 241 F2 = 0 241 F3 = 0 241 241 The parameters P1,P2,P3 and derivatives with respect to these may also 241 be referenced ($$11 = d$$1/dP1, etc): 241 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 241 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 241 $$31,$$32,$$33,$$311,$$322,$$333,$$312,$$313,$$323 241I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 241I$ When asked if you want to write a FORTRAN block, $ 241I$ enter: no $ 241I$ then enter the following, when prompted: $ 241I$ F1 = A*Uxx+B*Vyx+B*Wzx + C*(Uyy+Vxy) + C*(Uzz+Wxz) $ 241I$ F2 = C*(Uyx+Vxx) + A*Vyy+B*Uxy+B*Wzy + C*(Vzz+Wyz) $ 241I$ F3 = C*(Uzx+Wxx) + C*(Vzy+Wyy) + A*Wzz+B*Uxz+B*Vyz $ 241I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 242 Now enter FORTRAN expressions to define the PDE coefficients, which 242 may be functions of 242 242 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 242 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 242 $$3,$$3x,$$3y,$$3z,$$3xx,$$3yy,$$3zz,$$3xy,$$3xz,$$3yz 242 $$4,$$4x,$$4y,$$4z,$$4xx,$$4yy,$$4zz,$$4xy,$$4xz,$$4yz 242 . . . . . . . . . . 242 242 and, in some cases, of the parameter T. 242 242 Recall that the PDEs have the form