1 ******************************************************* 1 **** Welcome to the PDE2D 9.6 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 a 1D time-dependent integro-differential equation for 2 a financial math application. In this problem there is a 2 term involving an integral of the solution, which requires 2 that we use PDE2D's feature for interpolating the solution 2 at the last saved time step, for use in the integral term. 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. 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. 3A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3A$ The example problem is $ 3A$ $ 3A$ Uxx + Uyy = V in the square (-1,1) X (-1,1) $ 3A$ Vxx + Vyy = -DEL(x,y) $ 3A$ $ 3A$ with U = 0 on the boundary $ 3A$ V = 0 $ 3A$ $ 3A$ where Uxx = second derivative of U with respect to X, etc, and $ 3A$ DEL(x,y) is a Dirac delta function, which has an integral of 1, $ 3A$ but is 0 everywhere except at a singularity (0,0). $ 3A$ $ 3A$ (Note: this models the deformation of an elastic plate subject to $ 3A$ a unit load concentrated at the point (0,0): $ 3A$ Uxxxx + 2*Uxxyy + Uyyyy = -DEL(x,y) $ 3A$ with "simply supported" boundary conditions, U = Uxx+Uyy = 0, $ 3A$ after reduction to a system of two second order PDEs using the $ 3A$ variable V = Uxx+Uyy.) U(x,y) represents the height of the plate $ 3A$ at (x,y). $ 3A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3B$ The example problem is $ 3B$ $ 3B$ Uxx + Uyy = U**3 $ 3B$ $ 3B$ in an annulus with inner radius R0=0.05, outer radius R1=1, with $ 3B$ dU/dn = -1/R1**2 on the outer boundary, U=1/R0 on the inner $ 3B$ boundary. $ 3B$ $ 3B$ where Uxx=second derivative of U with respect to X, etc. $ 3B$ dU/dn=normal derivative of U. $ 3B$ The exact solution is U = 1/sqrt(X**2+Y**2). $ 3B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3C$ The example problem is $ 3C$ $ 3C$ - (D(x,y)QQx)x - (D(x,y)QQy)y = lambda*QQ $ 3C$ $ 3C$ in a parallelogram, with dQQ/dn=0 on the left side, and QQ=0 on $ 3C$ the other three sides, and D(x,y) defined discontinuously across $ 3C$ a curved interface, as shown below: $ 3C$ QQ=0 $ 3C$ (1,2) ---------------------------------------- (3,2) $ 3C$ / + / $ 3C$ / + / $ 3C$ / + / $ 3C$ / + D=1 / $ 3C$ / + / $ 3C$ dQQ/dn=0 / + / QQ=0 $ 3C$ / D=5 + / $ 3C$ / + / $ 3C$ / + / $ 3C$ / + / $ 3C$ / + / $ 3C$ (0,0) ---------------------------------------- (2,0) $ 3C$ QQ=0 $ 3C$ $ 3C$ Here dQQ/dn = normal derivative of QQ $ 3C$ lambda = eigenvalue to be determined $ 3C$ We will find the smallest eigenvalue, about lambda = 7.61, but you $ 3C$ can find all eigenvalues if desired, by making a small change to the $ 3C$ program later (see description of ITYPE parameter). $ 3C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3D$ In this example, a V-notched metal block connects two walls. $ 3D$ Initially, the block, walls and surrounding atmosphere are all in $ 3D$ equilibrium at 300 degrees Kelvin, and the block is stress-free. $ 3D$ $ 3D$ | air | $ 3D$ Y=5 |-------------------------\ /-------------------------| $ 3D$ | \ / | $ 3D$ | \/ | $ 3D$ | | $ 3D$ wall | metal | wall $ 3D$ | | $ 3D$ | | $ 3D$ | | $ 3D$ Y=0 |--------------------------------------------------------| $ 3D$ | air | $ 3D$ X=-5 X=0 X=5 $ 3D$ $ 3D$ At time T=0, the temperature at the walls is suddenly raised to $ 3D$ 400 degrees. The block radiates heat to the surrounding air, $ 3D$ which remains at 300 degrees. We want to compute the temperature $ 3D$ distribution in the block at time T=10, using the time-dependent $ 3D$ heat conduction equation: $ 3D$ Zt = Zxx + Zyy $ 3D$ with initial condition: $ 3D$ Z = 300 $ 3D$ where Z(x,y,t) is the temperature, Zt = derivative of Z with respect $ 3D$ to t, etc. $ 3D$ $ 3D$ Because of symmetry, we may restrict the computations to the right $ 3D$ half of the block and set dZ/dn=0 along the line of symmetry: $ 3D$ $ 3D$ Y=5 --------------------------- $ 3D$ / | $ 3D$ / | $ 3D$ / | $ 3D$ | | $ 3D$ | | $ 3D$ dZ/dn=0 | | Z = 400 $ 3D$ | | $ 3D$ | | $ 3D$ | | $ 3D$ | | $ 3D$ Y=0 ------------------------------- $ 3D$ X=0 X=5 $ 3D$ $ 3D$ At the wall, we have the boundary condition Z = 400, and at the $ 3D$ metal-air boundary, a nonlinear radiative heat transfer boundary $ 3D$ condition is assumed (dZ/dn = normal derivative of Z): $ 3D$ dZ/dn = -1.E-9*(Z**4 - 300**4) $ 3D$ $ 3D$ We will save the temperature distribution at time T=10 in a tabular $ 3D$ output file, and in example 5, the stresses in the block induced by $ 3D$ thermal expansion will be computed, using the temperature $ 3D$ distribution saved in this file. $ 3D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3E$ This is a continuation of example 4, so you must run example 4 and $ 3E$ save the tabular output (in a file named "dex4.out") before running $ 3E$ this example. $ 3E$ $ 3E$ Recall that in example 4 we computed the temperature distribution $ 3E$ in a V-notched block, at a time T=10. Now we want to compute the $ 3E$ stresses in the block induced by thermal expansion, using the $ 3E$ temperature profile at T=10. $ 3E$ $ 3E$ The relevant equations are the two coupled linear steady state PDES: $ 3E$ $ 3E$ (s11)x + (s12)y = 0 $ 3E$ (s12)x + (s22)y = 0 $ 3E$ where $ 3E$ s11 = E*(e11 + vnu*e22)/(1-vnu**2) $ 3E$ s22 = E*(vnu*e11 + e22)/(1-vnu**2) $ 3E$ s12 = 0.5*E*e12/(1+vnu) $ 3E$ and $ 3E$ e11 = Ux - al*(Z(x,y) - ZINIT) $ 3E$ e22 = Vy - al*(Z(x,y) - ZINIT) $ 3E$ e12 = Uy + Vx $ 3E$ and $ 3E$ (U,V) = displacement vector $ 3E$ Z(x,y) = temperature distribution at T=10 (from example 4) $ 3E$ ZINIT = 300 (equilibrium temperature) $ 3E$ E = 10**7 (elastic modulus) $ 3E$ vnu = 0.3 (Poisson ratio) $ 3E$ al = 10**(-6) (coefficient of thermal expansion) $ 3E$ $ 3E$ The block is assumed to be fastened to the wall so that the $ 3E$ displacements are zero there. Along the line of symmetry (X=0), $ 3E$ U, Uy and Vx are zero, hence e12 and s12 are also zero. $ 3E$ $ 3E$ Y=5 --------------------------- $ 3E$ / | $ 3E$ / | $ 3E$ / | $ 3E$ | | $ 3E$ | | $ 3E$ U = 0 | | U = 0 $ 3E$ s12 = 0 | | V = 0 $ 3E$ | | $ 3E$ | | $ 3E$ | | $ 3E$ Y=0 ------------------------------- $ 3E$ X=0 X=5 $ 3E$ $ 3E$ On the rest of the boundary there are no boundary forces, and the $ 3E$ boundary conditions there are ((nx,ny) = unit normal): $ 3E$ s11*nx + s12*ny = 0 $ 3E$ s12*nx + s22*ny = 0 $ 3E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3F$ The example problem is a 1D time-dependent integro-differential $ 3F$ equation from a financial mathematics application: $ 3F$ $ 3F$ -Vt = 0.5*Sigma**2*x**2*Vxx + (R-Rlam*Rk)*x*Vx - (Rlam+R)*V $ 3F$ + Rlam*Integral(V(x*y,t)g(y)dy) $ 3F$ $ 3F$ where g(y) = exp(-(y-1)**2/(2*var))/sqrt(2*pi*var) $ 3F$ with initial conditions: $ 3F$ V(x,Tfinal) = max(x-E,0) $ 3F$ and boundary conditions: $ 3F$ V(0,t) = 0 $ 3F$ Vx(Smax,t) = 1 $ 3F$ We will solve this problem backward in time, to t=0. $ 3F$ $ 3F$ Parameter values used will be Sigma=0.15, R=0.05, Rlam=5, Smax=200, $ 3F$ Tfinal=1.0, Rk=0, E=100 and var=0.09. $ 3F$ $ 3F$ The solution V(x,t) represents the value of a European call option $ 3F$ at time t, if the current price of an asset is x. The option holder $ 3F$ has the right to buy, if desired, the asset at price E, at time $ 3F$ Tfinal. $ 3F$ $ 3F$ To handle the integral term, we use the PDE2D function DOLDSOL1 to $ 3F$ interpolate the solution at the last saved time value, and a $ 3F$ midpoint rule to integrate this function. $ 3F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3G$ In this example, the propagating modes (eigenvalues) of a glass $ 3G$ waveguide embedded in a silica substrate are to be calculated. $ 3G$ The equations are $ 3G$ $ 3G$ (E2)x + (-E1)y + w*amu*H = 0 $ 3G$ (-H2)x + (H1)y + w*eps*E = 0 $ 3G$ where $ 3G$ E1 = (-w*amu*Hy - beta*Ex)/(w**2*amu*eps - beta**2) $ 3G$ E2 = (w*amu*Hx - beta*Ey)/(w**2*amu*eps - beta**2) $ 3G$ H1 = (w*eps*Ey - beta*Hx)/(w**2*amu*eps - beta**2) $ 3G$ H2 = (-w*eps*Ex - beta*Hy)/(w**2*amu*eps - beta**2) $ 3G$ and $ 3G$ H,E = z-components of magnetic and electric fields $ 3G$ w = 2*pi*c/lambda (pi=3.14159; c=2.9979 E8) $ 3G$ lambda = 0.85 E-6 (wavelength) $ 3G$ amu = 12.566 E-7 (permeability) $ 3G$ eps = 8.854 E-12*n(x,y)**2 (permittivity) $ 3G$ n(x,y) = 1.55 in glass (see figure below) $ 3G$ = 1.50 in silica (see figure below) $ 3G$ beta = eigenvalue (propagating mode) $ 3G$ $ 3G$ 4 -------------------------------- $ 3G$ | | $ 3G$ | | $ 3G$ 1 | -------- | $ 3G$ | | | | $ 3G$ | | glass| silica | $ 3G$ | | | | $ 3G$ -1 | -------- | $ 3G$ | | $ 3G$ | | $ 3G$ -4 -------------------------------- $ 3G$ -4 -1 1 4 (micrometers) $ 3G$ $ 3G$ The boundary conditions are dH/dn=0, E=0 on the entire boundary. $ 3G$ $ 3G$ This is a linear PDE, but since the eigenvalue beta appears in a $ 3G$ nonlinear form, it does not fit into the standard PDE2D eigenvalue $ 3G$ problem format, so a different approach will be taken. Some $ 3G$ "random" nonhomogeneous terms will be added to each partial $ 3G$ differential equation, and the problem will be solved for various $ 3G$ values of beta in a range (beta0,beta1), that is, with beta = $ 3G$ beta0 + i/NSTEPS*(beta1-beta0), i=1,...,NSTEPS. When beta is close $ 3G$ to an eigenvalue, the corresponding solution will be very large. $ 3G$ It is known that there is an eigenvalue at beta = 1.134 E7. $ 3G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3H$ In this example, the Navier-Stokes equations $ 3H$ $ 3H$ (-P + 2*Visc*Ux)x + (Visc*(Uy+Vx))y = Rho*(U*Ux+V*Uy) $ 3H$ (Visc*(Uy+Vx))x + (-P + 2*Visc*Vy)y = Rho*(U*Vx+V*Vy) $ 3H$ Ux + Vy = 0 $ 3H$ $ 3H$ are solved for an incompressible fluid flowing through the region $ 3H$ with corner shown below. Here (U,V) is the fluid velocity, P is $ 3H$ the pressure and Visc=0.002 is the viscosity and Rho=1 is the fluid $ 3H$ density. In the penalty method formulation, P is replaced by $ 3H$ P = -alpha*Visc*(Ux+Vy) $ 3H$ where alpha is large, on the order of 1/sqrt(eps), where eps $ 3H$ is the machine relative precision (a much larger value will make $ 3H$ the linear system ill-conditioned). In other words, the fluid is $ 3H$ taken to be "almost" incompressible, so that a large pressure $ 3H$ results in a small decrease in volume, and the continuity equation $ 3H$ Ux+Vy=0 is almost satisfied. $ 3H$ $ 3H$ The curved boundary is a semicircle of radius sqrt(8), with center $ 3H$ at (2,2). $ 3H$ $ 3H$ Inlet $ 3H$ (0,4)*-----------*(1,4) $ 3H$ - - $ 3H$ - - $ 3H$ - - $ 3H$ - - $ 3H$ - - $ 3H$ - - $ 3H$ - - $ 3H$ - - $ 3H$ - - $ 3H$ - - $ 3H$ - -(1,1) $ 3H$ - *-------------------*(4,1) $ 3H$ - + $ 3H$ - + $ 3H$ - + Outlet $ 3H$ - + $ 3H$ - + $ 3H$ *(0,0) *(4,0) $ 3H$ - - $ 3H$ - - $ 3H$ - - $ 3H$ - - $ 3H$ -- -- $ 3H$ --- $ 3H$ $ 3H$ At the inlet boundary, there is a parabolic velocity profile, $ 3H$ (U,V) = (0,-X*(1-X)). At the outlet boundary, zero tractions are $ 3H$ specified: -P+2*Visc*Ux = Visc*(Uy+Vx) = 0, and on the rest of the $ 3H$ boundary the fluid velocity is zero, (U,V) = (0,0). $ 3H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3I$ This is a steady-state elasticity problem: $ 3I$ $ 3I$ dS11/dX + dS12/dY + dS13/dZ = 0 $ 3I$ dS12/dX + dS22/dY + dS23/dZ = 0 $ 3I$ dS13/dX + dS23/dY + dS33/dZ = 0 $ 3I$ where $ 3I$ S11 = A*Ux + B*Vy + B*Wz S12 = C*(Uy+Vx) $ 3I$ S22 = A*Vy + B*Ux + B*Wz S13 = C*(Uz+Wx) $ 3I$ S33 = A*Wz + B*Ux + B*Vy S23 = C*(Vz+Wy) $ 3I$ $ 3I$ where (U,V,W) is the displacement vector and $ 3I$ A = E*(1-Vnu)/(1+Vnu)/(1-2*Vnu) $ 3I$ B = E*Vnu/(1+Vnu)/(1-2*Vnu) $ 3I$ C = E/2.0/(1+Vnu) $ 3I$ and E = 2, Vnu=0.33 are the elastic modulus and Poisson ratio, and $ 3I$ Ux means derivative with respect to X. $ 3I$ $ 3I$ The object modeled is a torus, of major radius R0=5 and minor radius $ 3I$ R1=4, with a smaller torus, of minor radius 0.2*R1, removed; ie, $ 3I$ a cross-section of the torus is an annulus. $ 3I$ $ 3I$ Toroidal coordinates will be used: $ 3I$ X = (R0 + P3*COS(P2))*COS(P1) $ 3I$ Y = (R0 + P3*COS(P2))*SIN(P1) $ 3I$ Z = P3*SIN(P2) $ 3I$ where P1 is the (toroidal) angle measured within the major circle, $ 3I$ P2 is the (poloidal) angle measured in the minor circle, and P3 is $ 3I$ radial distance from the center of the minor circle. 0 < P1 < 2*PI, $ 3I$ 0 < P2 < 2*PI, 0.2*R1 < P3 < R1. $ 3I$ $ 3I$ There are periodic boundary conditions on P1 and on P2, and at the $ 3I$ inner surface (P3=0.2*R1), the displacements U,V and W are 0. On $ 3I$ the outer surface (P3=R1), there is a unit inward boundary force, $ 3I$ ie, the boundary force vector is -(NORMx,NORMy,NORMz), where $ 3I$ (NORMx,NORMy,NORMz) is the unit outward normal to the boundary, in $ 3I$ Cartesian coordinates. This means the boundary condition is: $ 3I$ S11*NORMx + S12*NORMy + S13*NORMz = -NORMx $ 3I$ S12*NORMx + S22*NORMy + S23*NORMz = -NORMy $ 3I$ S13*NORMx + S23*NORMy + S33*NORMz = -NORMz $ 3I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3J$ The example problem is $ 3J$ $ 3J$ Ut = V in (-1,1) X (-1,1) X (-1,1) $ 3J$ Vt = Uxx + Uyy + Uzz for 0 < T < 0.6 $ 3J$ with boundary conditions $ 3J$ Ux = 0 Vx = 0 on the faces X=-1 and X=1 $ 3J$ Uy = 0 Vy = 0 on the faces Y=-1 and Y=1 $ 3J$ Uz = 0 Vz = 0 on the faces Z=-1 and Z=1 $ 3J$ and initial conditions $ 3J$ U = exp(-10*(X**2+Y**2+Z**2)) at T = 0 $ 3J$ V = 0 $ 3J$ $ 3J$ (Note: this models the wave equation Utt = Uxx + Uyy + Uzz, reduced $ 3J$ to a system of two equations by the introduction of the velocity $ 3J$ variable V=Ut.) $ 3J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3K$ The Schrodinger equation in a hydrogen atom is $ 3K$ $ 3K$ Laplacian(U) + C1/Rho*U = lambda*C2*U $ 3K$ where $ 3K$ C1 = 3.7796 $ 3K$ C2 = -0.26248 $ 3K$ U**2 = probability density function for the electron $ 3K$ Rho = distance from origin (nucleus), in Angstroms $ 3K$ lambda = energy level (in ev) of electron (the eigenvalue) $ 3K$ $ 3K$ The boundary condition is U=0 at infinity (we will apply this $ 3K$ boundary condition at Rho=10). We will use spherical coordinates, $ 3K$ with P1 = distance from origin (Rho) $ 3K$ P2 = co-latitude (angle from north pole, Phi) $ 3K$ P3 = longitude (Theta) $ 3K$ The limits on the variables are 0 1+EPS $ 3L$ Dz = 0 $ 3L$ D = 1 + 4*(Z-1)/EPS 1 < Z < 1+EPS $ 3L$ Dz = 4/EPS $ 3L$ where EPS is a small number. This approach works surprising well, $ 3L$ provided there are gridlines at Z=1 and Z=1+EPS. $ 3L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3M$ In this example, the 2D axi-symmetric Navier-Stokes equations $ 3M$ $ 3M$ Visc*(Urr+Ur/r-U/r**2+Uzz) = Hr + Rho*(U*Ur+W*Uz) $ 3M$ Visc*(Wrr+Wr/r +Wzz) = Hz + Rho*(U*Wr+W*Wz) $ 3M$ Ur+Wz+U/r = 0 $ 3M$ $ 3M$ are solved in the channel -1 < z < 1, 0 < r < 1+z**2, where (U,W) $ 3M$ are the radial and axial components of the fluid velocity, H is the $ 3M$ pressure, and Visc=0.02 is the viscosity and Rho=1 is the density. $ 3M$ $ 3M$ We need to rename the variables r and z to X and Y, respectively. $ 3M$ In this notation, the three equations can now be written: $ 3M$ $ 3M$ Visc*(Uxx+Ux/X-U/X**2+Uyy) - Hx - Rho*(U*Ux+W*Uy) = 0 $ 3M$ Visc*(Wxx+Wx/X +Wyy) - Hy - Rho*(U*Wx+W*Wy) = 0 $ 3M$ Ux+Wy+U/X = 0 $ 3M$ $ 3M$ Boundary conditions are $ 3M$ $ 3M$ 2*Visc*Wy-H=0, Uy+Wx=0 $ 3M$ Y=1 ------------------------+ $ 3M$ | + $ 3M$ | + $ 3M$ | + $ 3M$ | + $ 3M$ | + $ 3M$ | + $ 3M$ | + U=0 $ 3M$ none | + W=0 $ 3M$ | + $ 3M$ | + $ 3M$ | + $ 3M$ | + $ 3M$ | + $ 3M$ | + $ 3M$ | + $ 3M$ Y=-1 ------------------------+ $ 3M$ X=0 X=2 $ 3M$ W = 1-(X/2)**2 $ 3M$ Uy+Wx=0 $ 3M$ H2=0 $ 3M$ $ 3M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3N$ The example problem is $ 3N$ $ 3N$ d/dt{Theta(H)} = d/dx{K(H)*(Hx+1)} 0 < X < 20 $ 3N$ 0 < T < 10 $ 3N$ with Hx+1 = 0 at X=0 (no flow) $ 3N$ H = 20 at X=20 $ 3N$ $ 3N$ and initial condition $ 3N$ $ 3N$ H(X,0) = -20-X $ 3N$ $ 3N$ Here Theta(H) represents the moisture content, given by: $ 3N$ Theta(H) = Tr + B*(Ts-Tr)/(B+|H|**beta) for H < 0 $ 3N$ = Ts for H > 0 $ 3N$ where Tr = 0.075, Ts = 0.287, B = 1,611,000, beta = 3.96 $ 3N$ K(H) represents the hydraulic conductivity, given by: $ 3N$ K(H) = Ks*A/(A+|H|**gamma) for H < 0 $ 3N$ = Ks for H > 0 $ 3N$ where Ks = 0.00944, A = 1,175,000, gamma = 4.74 $ 3N$ and H is the water pressure head. $ 3N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 3O$ The Schrodinger equation in a hydrogen atom is $ 3O$ $ 3O$ Laplacian(U) + C1/Rho*U = lambda*C2*U $ 3O$ where $ 3O$ C1 = 3.7796 $ 3O$ C2 = -0.26248 $ 3O$ U**2 = probability density function for the electron $ 3O$ Rho = distance from origin (nucleus), in Angstroms $ 3O$ lambda = energy level (in ev) of electron (the eigenvalue) $ 3O$ $ 3O$ The boundary condition is U=0 at infinity (we will apply this $ 3O$ boundary condition at Rho=10). $ 3O$ $ 3O$ This problem was solved as a 3D problem in example 11, but some of $ 3O$ the eigenfunctions are functions of Rho only, such as the one $ 3O$ corresponding to the lowest energy level. These we can find by $ 3O$ solving as a 1D problem: $ 3O$ $ 3O$ Uxx + 2/x*Ux + C1/x*U = lambda*C2*U $ 3O$ $ 3O$ where X represents the spherical coordinate Rho. We will find this $ 3O$ lowest eigenvalue, about -13.6 ev. $ 3O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4 In what follows, when you are told to enter a 'FORTRAN expression', 4 this means any valid FORTRAN expression of 65 characters or less. 4 In this expression, you may include references to FORTRAN function 4 subprograms. You may define these functions line by line at the end 4 of the interactive session, when prompted, or add them later using an 4 editor. 4 4 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 4 + If you enter a "#" in the first column of any input line, this + 4 + instructs the interactive driver to read this and subsequent input + 4 + lines from the file "pde2d.in". A "#" in the first column of an + 4 + input line in the file "pde2d.in" (or an end-of-file) instructs the + 4 + driver to switch back to interactive input. + 4 + + 4 + All lines input during an interactive session are echo printed to + 4 + a file "echo.out". You may want to modify this file and rename it + 4 + "pde2d.in", and read some or all of your input from this file during + 4 + your next interactive session. + 4 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 4 4 PDE2D can solve problems with 0,1,2 or 3 space variables. Enter the 4 dimension of your problem: 4 4 0 - to solve a time-dependent ordinary differential equation system, 4 or an algebraic or algebraic eigenvalue system 4 1 - to solve problems in 1D intervals 4 2 - to solve problems in general 2D regions 4 3 - to solve problems in a wide range of simple 3D regions 4 4A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4A$ enter: 2 $ 4A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4B$ enter: 2 $ 4B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4C$ enter: 2 $ 4C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4D$ enter: 2 $ 4D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4E$ enter: 2 $ 4E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4F$ enter: 1 $ 4F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4G$ enter: 2 $ 4G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4H$ enter: 2 $ 4H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4I$ enter: 3 $ 4I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4J$ enter: 3 $ 4J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4K$ enter: 3 $ 4K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4L$ enter: 3 $ 4L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4M$ enter: 2 $ 4M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4N$ enter: 1 $ 4N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 4O$ enter: 1 $ 4O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5 Which finite element method do you want to use: 5 5 1. Galerkin method 5 2. Collocation method 5 5 Enter 1 or 2 to select a finite element method. 5 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 5 + If you have a problem with discontinuous material parameters, you + 5 + should use the Galerkin method. If your partial differential + 5 + equations and boundary conditions are difficult to put into the + 5 + "divergence" form required by the Galerkin method, or if you have + 5 + periodic boundary conditions, use the collocation method. The + 5 + collocation method produces approximate solutions with continuous + 5 + first derivatives; the Galerkin solutions are continuous but their + 5 + first derivatives are not. + 5 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 5F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5F$ enter: 2 $ 5F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5N$ enter: 1 $ 5N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 5O$ enter: 2 $ 5O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 6 Which finite element method do you want to use: 6 6 1. Galerkin method 6 2. Collocation method 6 6 The collocation method can handle a wide range of simple 2D regions; 6 the Galerkin method can handle completely general 2D regions. 6 6 Enter 1 or 2 to select a finite element method. 6 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 6 + If you have a composite region, with discontinuous material + 6 + parameters, you should use the Galerkin method. If your partial + 6 + differential equations and boundary conditions are difficult to put + 6 + into the "divergence" form required by the Galerkin method, or if + 6 + you have periodic boundary conditions, use the collocation method. + 6 + The collocation method produces an approximate solution with + 6 + continuous first derivatives; the Galerkin solution is continuous + 6 + but its first derivatives are not. + 6 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 6A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 6A$ enter: 1 $ 6A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 6B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 6B$ enter: 1 $ 6B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 6C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 6C$ enter: 1 $ 6C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 6D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 6D$ enter: 1 $ 6D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 6E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 6E$ enter: 1 $ 6E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 6G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 6G$ enter: 1 $ 6G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 6H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 6H$ enter: 1 $ 6H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 6M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 6M$ enter: 2 $ 6M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7 Is double precision mode to be used? Double precision is recommended. 7 7 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 7 + If double precision mode is used, variables and functions assigned + 7 + names beginning with a letter in the range A-H or O-Z will be DOUBLE + 7 + PRECISION, and you should use double precision constants and FORTRAN + 7 + expressions throughout; otherwise such variables and functions will + 7 + be of type REAL. In either case, variables and functions assigned + 7 + names beginning with I,J,K,L,M or N will be of INTEGER type. + 7 + + 7 + It is possible to convert a single precision PDE2D program to double + 7 + precision after it has been created, using an editor. Just change + 7 + all occurrences of "real" to "double precision" + 7 + " tdp" to "dtdp" (note leading blank) + 7 + Any user-written code or routines must be converted "by hand", of + 7 + course. To convert from double to single, reverse the changes. + 7 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 7A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7A$ enter: yes $ 7A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7B$ enter: yes $ 7B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7C$ enter: yes $ 7C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7D$ enter: yes $ 7D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7E$ enter: yes $ 7E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7F$ enter: yes $ 7F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7G$ enter: yes $ 7G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7H$ High precision is important when the penalty method is used, so $ 7H$ enter: yes $ 7H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7I$ enter: yes $ 7I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7J$ enter: yes $ 7J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7K$ enter: yes $ 7K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7L$ enter: yes $ 7L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7M$ enter: yes $ 7M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7N$ enter: yes $ 7N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 7O$ enter: yes $ 7O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8 If you don't want to read the FINE PRINT, default NPROB. 8 8 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 8 + If you want to solve several similar problems in the same run, set + 8 + NPROB equal to the number of problems you want to solve. Then NPROB + 8 + loops through the main program will be done, with IPROB=1,...,NPROB, + 8 + and you can make the problem parameters vary with IPROB. NPROB + 8 + defaults to 1. + 8 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 8A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8A$ press [RETURN] to default NPROB $ 8A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8B$ We want to run the problem twice, to do adaptive triangulation $ 8B$ refinement, so $ 8B$ enter: NPROB = 2 $ 8B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8C$ press [RETURN] to default NPROB $ 8C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8D$ press [RETURN] to default NPROB $ 8D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8E$ press [RETURN] to default NPROB $ 8E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8F$ press [RETURN] to default NPROB $ 8F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8G$ press [RETURN] to default NPROB $ 8G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8H$ press [RETURN] to default NPROB $ 8H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8I$ press [RETURN] to default NPROB $ 8I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8J$ press [RETURN] to default NPROB $ 8J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8K$ press [RETURN] to default NPROB $ 8K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8L$ press [RETURN] to default NPROB $ 8L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8M$ press [RETURN] to default NPROB $ 8M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8N$ press [RETURN] to default NPROB $ 8N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 8O$ press [RETURN] to default NPROB $ 8O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 9 PDE2D solves the time-dependent system (note: U,F,U0 may be vectors, 9 C,RHO may be matrices): 9 9 C(T,U)*d(U)/dT = F(T,U) 9 9 or the algebraic system: 9 9 F(U) = 0 9 9 or the linear and homogeneous eigenvalue system: 9 9 F(U) = lambda*RHO*U 9 9 For time-dependent problems there are also initial conditions: 9 9 U = U0 at T=T0 9 9 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 9 + A system of NEQN complex equations must be written as a system + 9 + 2*NEQN real equations, by separating the equations into their real + 9 + and imaginary parts. However, note that the complex arithmetic + 9 + abilities of FORTRAN can be used to simplify this separation. For + 9 + example, the complex nonlinear algebraic equation: + 9 + U**10 - 1.0 = 0, where U = UR + UI*I + 9 + would be difficult to split up analytically, but using FORTRAN + 9 + expressions it is easy: + 9 + F1 = REAL(CMPLX(UR,UI)**10-1.0) + 9 + F2 = AIMAG(CMPLX(UR,UI)**10-1.0) + 9 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 9 You may now define global parameters, which may be referenced in any 9 of the "FORTRAN expressions" you input throughout the rest of this 9 interactive session. You will be prompted alternately for parameter 9 names and their values; enter a blank name when you are finished. 9 9 Parameter names are valid FORTRAN variable names, starting in 9 column 1. Thus each name consists of 1 to 6 alphanumeric characters, 9 the first of which must be a letter. If the first letter is in the 9 range I-N, the parameter must be an integer. 9 9 Parameter values are either FORTRAN constants or FORTRAN expressions 9 involving only constants and global parameters defined on earlier 9 lines. They may also be functions of the problem number IPROB, if 9 you are solving several similar problems in one run (NPROB > 1). Note 9 that you are defining global CONSTANTS, not functions; e.g., parameter 9 values may not reference any of the independent or dependent variables 9 of your problem. 9 9 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 9 + If you define other parameters here later, using an editor, you must + 9 + add them to COMMON block /PARM8Z/ everywhere this block appears, if + 9 + they are to be "global" parameters. Global parameters are of course + 9 + also only available in user-supplied subprograms if passed through + 9 + this COMMON block. + 9 + + 9 + The variable PI is already included as a global parameter, with an + 9 + accurate value 3.14159... + 9 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 10 If you don't want to read the FINE PRINT, enter 'no'. 10 10 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 10 + Do you want to be given a chance to write a FORTRAN block before the + 10 + definitions of many functions? If you answer 'no', you will still + 10 + be given a chance to write code before the definition of the PDE + 10 + coefficients, but not other functions. Of course, you can always + 10 + add code later directly to the resulting program, using an editor. + 10 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 10A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10A$ enter: no $ 10A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10B$ enter: no $ 10B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10C$ enter: no $ 10C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10D$ enter: no $ 10D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10E$ enter: no $ 10E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10F$ enter: no $ 10F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10G$ enter: no $ 10G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10H$ enter: no $ 10H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10I$ enter: no $ 10I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10J$ enter: no $ 10J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10K$ enter: no $ 10K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10L$ enter: no $ 10L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10M$ enter: no $ 10M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10N$ enter: no $ 10N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 10O$ enter: no $ 10O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11 What type of PDE problem do you want to solve? 11 11 1. a steady-state (time-independent) problem 11 2. a time-dependent problem 11 3. a linear, homogeneous eigenvalue problem 11 11 Enter 1,2 or 3 to select a problem type. 11A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11A$ enter: 1 $ 11A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11B$ enter: 1 $ 11B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11C$ enter: 3 $ 11C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11D$ enter: 2 $ 11D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11E$ enter: 1 $ 11E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11F$ enter: 2 $ 11F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11G$ Although we want to solve a series of steady-state problems, it is $ 11G$ more convenient to consider this as a time-dependent problem, with $ 11G$ C11=C12=C21=C22=0 and with the time variable T used to represent the $ 11G$ parameter beta. Thus $ 11G$ enter: 2 $ 11G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11H$ enter: 1 $ 11H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11I$ enter: 1 $ 11I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11J$ enter: 2 $ 11J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11K$ enter: 3 $ 11K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11L$ enter: 3 $ 11L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11M$ enter: 1 $ 11M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11N$ enter: 2 $ 11N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 11O$ enter: 3 $ 11O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 12 The shifted inverse power method will be used to find one eigenvalue 12 and the corresponding eigenfunction. 12 12 You can later find ALL eigenvalues (without eigenfunctions), including 12 complex eigenvalues, by changing ITYPE from 3 to 4 below in the FORTRAN 12 program. All eigenvalues will be written to a file 'pde2d.eig'; the 50 12 eigenvalues closest to P8Z (P8Z is 0 by default but can be set by the 12 user below) will be printed and also available in the main program as 12 EVR8Z(k) + i*EVI8Z(k), for k=1,...,min(50,N). 12 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 12 + Caution: for ITYPE=4, the memory and computer time requirements are + 12 + much greater than for ITYPE=3, for a given grid. However, this + 12 + calculation runs efficiently on multi-processor machines, under MPI. + 12 + + 12 + The calculation is also dramatically faster for symmetric 1D + 12 + Galerkin problems, and symmetric 2D Galerkin problems (IDEG=-1,-3) + 12 + because the algorithm can take advantage of the band structure of A + 12 + in finding all eigenvalues of the generalized eigenvalue problem + 12 + Az=lambda*Bz, but only when A is symmetric and B is diagonal (hence + 12 + the requirement that IDEG=-1 or -3 for 2D Galerkin problems; the RHO + 12 + matrix must also be diagonal (if NEQN > 1) and of constant sign). + 12 + High precision is STRONGLY recommended in these cases. + 12 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 13 If you don't want to read the FINE PRINT below, enter 'no'. 13 13 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 13 + Are your eigenvalue PDEs complex? If 'yes', you must write each of + 13 + the unknown eigenfunctions, but NOT the eigenvalue (i.e., pretend + 13 + the eigenvalue is real even though it may not be), in terms of its + 13 + real and imaginary parts, and separate the equations into real and + 13 + imaginary parts. Then it is assumed that your unknowns represent + 13 + alternately the real and imaginary parts of the eigenfunctions, and + 13 + that your equations represent alternately the real and imaginary + 13 + parts of the eigenvalue differential equations. Note that your + 13 + first equation must represent exactly the real part of the first + 13 + complex PDE, your second equation must represent exactly the + 13 + imaginary part, etc. You must not reorder the equations, nor + 13 + multiply any equation through by a constant. + 13 + + 13 + Even if your eigenvalue PDEs are real, if a desired eigenvalue/ + 13 + eigenfunction is complex, you should answer 'yes' and treat the + 13 + PDEs as if they were complex, as outlined above. If you are going + 13 + to set ITYPE=4 to find all eigenvalues without eigenfunctions, + 13 + however, you should answer 'no' even if some eigenvalues are complex.+ 13 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 13 13 If you don't want to read the FINE PRINT above, enter 'no'. 13 13C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 13C$ enter: no $ 13C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 13K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 13K$ enter: no $ 13K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 13L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 13L$ enter: no $ 13L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 13O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 13O$ enter: no $ 13O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 14 The (shifted) inverse power method will be used to find the eigenvalue 14 closest to EV0R; enter a value for EV0R. The closer you choose EV0R 14 to the desired eigenvalue, the faster the convergence will be. The 14 default is EV0R = 0.0, that is, the smallest eigenvalue (in absolute 14 value) is found. 14C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 14C$ press [RETURN] to default EV0R $ 14C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 14K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 14K$ To find the eigenvalue near -3.4, $ 14K$ enter: EV0R = -3.0 $ 14K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 14L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 14L$ To find the eigenvalue nearest -20, $ 14L$ enter: EV0R = -20.0 $ 14L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 14O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 14O$ To find the eigenvalue near -13.6, $ 14O$ enter: EV0R = -15.0 $ 14O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 15 The (shifted) inverse power method will be used to find the eigenvalue 15 closest to EV0R+EV0I*I; enter values for EV0R and EV0I. The closer 15 you choose EV0R+EV0I*I to the desired eigenvalue, the faster the 15 convergence will be. The default is EV0R = EV0I = 0.0, that is, the 15 smallest eigenvalue (in absolute value) is found. 16 How many iterations (NSTEPS) of the inverse power method do you want 16 to do? NSTEPS defaults to 25. 16 16 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 16 + After convergence of the inverse power method, the solution each + 16 + iteration will be a normalized eigenfunction corresponding to the + 16 + eigenvalue closest to EV0R (or EV0R+EV0I*I) and this eigenvalue will + 16 + be printed. In the FORTRAN program created by the preprocessor, + 16 + the last computed estimate of this eigenvalue will be returned as + 16 + EVLR8Z (or EVLR8Z+EVLI8Z*I), and ECON8Z will be .TRUE. if the + 16 + inverse power method has converged. + 16 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 16C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 16C$ press [RETURN] to default NSTEPS $ 16C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 16K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 16K$ enter: NSTEPS = 10 $ 16K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 16L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 16L$ press [RETURN] to default NSTEPS $ 16L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 16O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 16O$ press [RETURN] to default NSTEPS $ 16O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17 Enter the initial time value (T0) and the final time value (TF), for 17 this time-dependent problem. T0 defaults to 0. 17 17 TF is not required to be greater than T0. 17D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17D$ enter: T0 = 0.0 $ 17D$ TF = 10.0 $ 17D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17F$ enter: T0 = Tfinal $ 17F$ TF = 0.0 $ 17F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17G$ We want to search the interval 1.13 E7 < beta (=T) < 1.14 E7 for $ 17G$ eigenvalues, so $ 17G$ enter: T0 = 1.13E7 $ 17G$ TF = 1.14E7 $ 17G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17J$ enter: T0 = 0 $ 17J$ TF = 0.6 $ 17J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 17N$ enter: T0 = 0 $ 17N$ TF = 10 $ 17N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18 Is this a linear problem? ("linear" means all differential equations 18 and all boundary conditions are linear). If you aren't sure, it is 18 safer to answer "no". 18A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18A$ enter: yes $ 18A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18B$ enter: no $ 18B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18D$ enter: no $ 18D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18E$ enter: yes $ 18E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18F$ enter: yes $ 18F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18G$ enter: yes $ 18G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18H$ enter: no $ 18H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18I$ enter: yes $ 18I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18J$ enter: yes $ 18J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18M$ enter: no $ 18M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 18N$ enter: no $ 18N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 19 Do you want the time step to be chosen adaptively? If you answer 19 'yes', you will then be prompted to enter a value for TOLER(1), the 19 local relative time discretization error tolerance. The default is 19 TOLER(1)=0.01. If you answer 'no', a user-specified constant time step 19 will be used. We suggest that you answer 'yes' and default TOLER(1) 19 (although for certain linear problems, a constant time step may be much 19 more efficient). 19 19 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 19 + If a negative value is specified for TOLER(1), then ABS(TOLER(1)) is + 19 + taken to be the "absolute" error tolerance. If a system of PDEs is + 19 + solved, by default the error tolerance specified in TOLER(1) applies + 19 + to all variables, but the error tolerance for the J-th variable can + 19 + be set individually by specifying a value for TOLER(J) using an + 19 + editor, after the end of the interactive session. + 19 + + 19 + Each time step, two steps of size dt/2 are taken, and that solution + 19 + is compared with the result when one step of size dt is taken. If + 19 + the maximum difference between the two answers is less than the + 19 + tolerance (for each variable), the time step dt is accepted (and the + 19 + next step dt is doubled, if the agreement is "too" good); otherwise + 19 + dt is halved and the process is repeated. Note that forcing the + 19 + local (one-step) error to be less than the tolerance does not + 19 + guarantee that the global (cumulative) error is less than that value.+ 19 + However, as the tolerance is decreased, the global error should + 19 + decrease correspondingly. + 19 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 19D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 19D$ enter: yes $ 19D$ TOLER(1) = 0.001 $ 19D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 19F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 19F$ enter: no $ 19F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 19G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 19G$ enter: no $ 19G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 19J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 19J$ enter: no $ 19J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 19N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 19N$ enter: yes $ 19N$ then press [RETURN] to default TOLER(1) $ 19N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 20 If you don't want to read the FINE PRINT, it is safe (though possibly 20 very inefficient) to enter 'no'. 20 20 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 20 + If your time-dependent problem is linear with all PDE and boundary + 20 + condition coefficients independent of time except inhomogeneous + 20 + terms, then a large savings in execution time may be possible if + 20 + this is recognized (the LU decomposition computed on the first step + 20 + can be used on subsequent steps). Is this the case for your + 20 + problem? (Caution: if you answer 'yes' when you should not, you + 20 + will get incorrect results with no warning.) + 20 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 20F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 20F$ enter: yes $ 20F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 20G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 20G$ enter: no $ 20G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 20J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 20J$ enter: yes $ 20J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 21 The time stepsize will be chosen adaptively, between an upper limit 21 of DTMAX = (TF-T0)/NSTEPS and a lower limit of 0.0001*DTMAX. Enter 21 a value for NSTEPS (the minimum number of steps). 21 21 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 21 + If you later turn off adaptive time step control, the time stepsize + 21 + will be constant, DT = (TF-T0)/NSTEPS. + 21 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 21D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 21D$ So that the maximum time step will be (10.0-0.0)/10 = 1.0, $ 21D$ enter: NSTEPS = 10 $ 21D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 21N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 21N$ So that the maximum time step will be (10.0-0.0)/20 = 0.5, $ 21N$ enter: NSTEPS = 20 $ 21N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 22 The time stepsize will be constant, DT = (TF-T0)/NSTEPS. Enter a 22 value for NSTEPS, the number of time steps. 22 22 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 22 + If you later turn on adaptive step control, the time stepsize will be+ 22 + chosen adaptively, between an upper limit of DTMAX = (TF-T0)/NSTEPS + 22 + and a lower limit of 0.0001*DTMAX. + 22 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 22F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 22F$ enter: NSTEPS = 1000 $ 22F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 22G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 22G$ We will try 100 values of beta (=T) in the interval (T0,TF), so $ 22G$ enter: NSTEPS = 100 $ 22G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 22J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 22J$ So that DT = (0.6-0.0)/30 = 0.02, $ 22J$ enter: NSTEPS = 30 $ 22J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 23 If you don't want to read the FINE PRINT, enter 'yes'. 23 23 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 23 + Is the Crank-Nicolson scheme to be used to discretize time? If you + 23 + answer 'no', a backward Euler scheme will be used. Do not use the + 23 + Crank Nicolson method if the left hand side of any ODE is zero, for + 23 + example, if a differential/algebraic system is solved. + 23 + + 23 + The Crank-Nicolson scheme is second order, and the backward Euler + 23 + method is first order. However, if adaptive time step control is + 23 + chosen, an extrapolation is done between the 1-step and 2-step + 23 + answers which makes the Euler method second order, and the Crank- + 23 + Nicolson method third order (fourth order for linear problems). + 23 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 24 Give an upper limit on the number of Newton's method iterations 24 (NSTEPS) to be allowed for this nonlinear problem. NSTEPS defaults 24 to 15. 24 24 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 24 + The iteration will stop if convergence occurs before the upper + 24 + limit has been reached. In the FORTRAN program created by the + 24 + preprocessor, NCON8Z will be .TRUE. if Newton's method has converged.+ 24 + + 24 + For highly non-linear problems you may want to construct a one- + 24 + parameter family of problems using the variable T, such that for + 24 + T=1 the problems is easy (e.g. linear) and for T > N (N is less + 24 + NSTEPS), the problem reduces to the original highly nonlinear + 24 + problem. For example, the nonlinear term(s) may be multiplied by + 24 + MIN(1.0,(T-1.0)/N). + 24 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 24B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 24B$ press [RETURN] to default NSTEPS $ 24B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 24H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 24H$ press [RETURN] to default NSTEPS $ 24H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 24M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 24M$ press [RETURN] to default NSTEPS $ 24M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25 How many differential equations (NEQN) are there in your problem? 25A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25A$ enter: NEQN = 2 $ 25A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25B$ enter: NEQN = 1 $ 25B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25C$ enter: NEQN = 1 $ 25C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25D$ enter: NEQN = 1 $ 25D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25E$ enter: NEQN = 2 $ 25E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25F$ enter: NEQN = 1 $ 25F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25G$ enter: NEQN = 2 $ 25G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25H$ enter: NEQN = 2 $ 25H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25I$ enter: NEQN = 3 $ 25I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25J$ enter: NEQN = 2 $ 25J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25K$ enter: NEQN = 1 $ 25K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25L$ enter: NEQN = 1 $ 25L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25M$ enter: NEQN = 3 $ 25M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25N$ enter: NEQN = 1 $ 25N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 25O$ enter: NEQN = 1 $ 25O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 26 You may now choose names for the component(s) of the (possibly vector) 26 solution U. Each must be an alphanumeric string of one to three 26 characters, beginning with a letter in the range A-H or O-Z. The 26 variable name T must not be used. The name should start in column 1. 27 If you don't want to read the FINE PRINT, enter 'yes' (strongly 27 recommended). 27 27 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 27 + The partial derivatives of some of the PDE and boundary condition + 27 + coefficients are required by PDE2D. These may be calculated + 27 + automatically using a finite difference approximation, or supplied + 27 + by the user. Do you want them to be calculated automatically? + 27 + + 27 + If you answer 'yes', you will not be asked to supply the derivatives,+ 27 + but there is a small risk that the inaccuracies introduced by the + 27 + finite difference approximation may cause the Newton iteration + 27 + to converge more slowly or to diverge, especially if low precision + 27 + is used. This risk is very low, however, and since answering 'no' + 27 + means you may have to compute many partial derivatives, it is + 27 + recommended you answer 'yes' unless you have some reason to believe + 27 + there is a problem with the finite difference approximations. + 27 + + 27 + If you supply analytic partial derivatives, PDE2D will do some spot + 27 + checking and can usually issue a warning if any are supplied + 27 + incorrectly. + 27 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 27B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27B$ enter: yes $ 27B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27D$ enter: yes $ 27D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27H$ enter: yes $ 27H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 27N$ enter: yes $ 27N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28 You may calculate one or more integrals (over the entire region) of 28 some functions of the solution and its derivatives. How many integrals 28 (NINT), if any, do you want to calculate? 28 28 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 28 + In the FORTRAN program created by the preprocessor, the computed + 28 + values of the integrals will be returned in the vector SINT8Z. If + 28 + several iterations or time steps are done, only the last computed + 28 + values are saved in SINT8Z (all values are printed). + 28 + + 28 + A limiting value, SLIM8Z(I), for the I-th integral can be set + 28 + below in the main program. The computations will then stop + 28 + gracefully whenever SINT8Z(I) > SLIM8Z(I), for any I=1...NINT. + 28 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 28A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28A$ enter: NINT = 1 $ 28A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28B$ enter: NINT = 1 $ 28B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28C$ enter: NINT = 0 $ 28C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28D$ enter: NINT = 0 $ 28D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28E$ enter: NINT = 1 $ 28E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28F$ enter: NINT = 0 $ 28F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28G$ enter: NINT = 1 $ 28G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28H$ enter: NINT = 0 $ 28H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28I$ enter: NINT = 1 $ 28I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28J$ enter: NINT = 1 $ 28J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28K$ enter: NINT = 1 $ 28K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28L$ enter: NINT = 0 $ 28L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28M$ enter: NINT = 1 $ 28M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28N$ enter: NINT = 1 $ 28N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 28O$ enter: NINT = 1 $ 28O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 29 Enter FORTRAN expressions for the functions whose "integrals" are to 29 be calculated and printed. They may be functions of $$1 and (if 29 applicable) T. For 0D problems, the "integral" is just the value 29 of the integrand. 29 30 Enter FORTRAN expressions for the functions whose "integrals" are to 30 be calculated and printed. They may be functions of $$1,$$2 and (if 30 applicable) T. For 0D problems, the "integral" is just the value 30 of the integrand. 30 31 Enter FORTRAN expressions for the functions whose "integrals" are to 31 be calculated and printed. They may be functions of $$1,$$2,$$3 and 31 (if applicable) T. For 0D problems, the "integral" is just the value 31 of the integrand. 31 32 Enter FORTRAN expressions for the functions whose "integrals" are to 32 be calculated and printed. They may be functions of $$1,$$2,$$3,$$4 32 ... and (if applicable) T. For 0D problems, the "integral" is just 32 the value of the integrand. 32 33 Now enter FORTRAN expressions to define the PDE coefficients. 33 RHO is a constant, while F may be a function of $$1. 33 33 Recall that the PDE has the form 33 33 F = lambda*RHO*$$1 33 34 Now enter FORTRAN expressions to define the PDE coefficients. 34 RHO11,RHO12,RHO21,RHO22 are constants, while F1,F2 may be functions 34 $$1,$$2. 34 34 Recall that the PDEs have the form 34 34 F1 = lambda*(RHO11*$$1 + RHO12*$$2) 34 F2 = lambda*(RHO21*$$1 + RHO22*$$2) 34 35 Now enter FORTRAN expressions to define the PDE coefficients. 35 RHO11,RHO12,RHO13,RHO21,RHO22,RHO23,RHO31,RHO32,RHO33 are constants, 35 while F1,F2,F3 may be functions of $$1,$$2,$$3. 35 35 Recall that the PDEs have the form 35 35 F1 = lambda*(RHO11*$$1 + RHO12*$$2 + RHO13*$$3) 35 F2 = lambda*(RHO21*$$1 + RHO22*$$2 + RHO23*$$3) 35 F3 = lambda*(RHO31*$$1 + RHO32*$$2 + RHO33*$$3) 35 36 Now enter FORTRAN expressions to define the PDE coefficients. The 36 RHOIJ are constants, while F1,F2,F3,F4,... may be functions of 36 $$1,$$2,$$3,$$4,... 36 36 Recall that the PDEs have the form 36 36 F1 = lambda*(RHO11*$$1 + RHO12*$$2 + RHO13*$$3 + RHO14*$$4...) 36 F2 = lambda*(RHO21*$$1 + RHO22*$$2 + RHO23*$$3 + RHO24*$$4...) 36 F3 = lambda*(RHO31*$$1 + RHO32*$$2 + RHO33*$$3 + RHO34*$$4...) 36 F4 = lambda*(RHO41*$$1 + RHO42*$$2 + RHO43*$$3 + RHO44*$$4...) 36 . . 36 37 Now enter FORTRAN expressions to define the PDE coefficients, which 37 may be functions of $$1 and, in some cases, of the parameter T. 37 37 Recall that the PDE has the form 37 37 F = 0 37 38 Now enter FORTRAN expressions to define the PDE coefficients, which 38 may be functions of $$1,$$2 and, in some cases, of the parameter T. 38 38 Recall that the PDEs have the form 38 38 F1 = 0 38 F2 = 0 38 39 Now enter FORTRAN expressions to define the PDE coefficients, which 39 may be functions of $$1,$$2,$$3, in some cases, of the parameter T. 39 39 Recall that the PDEs have the form 39 39 F1 = 0 39 F2 = 0 39 F3 = 0 39 40 Now enter FORTRAN expressions to define the PDE coefficients, which 40 may be functions of $$1,$$2,$$3,$$4,... and, in some cases, of the 40 parameter T. 40 40 Recall that the PDEs have the form 40 40 F1 = 0 40 F2 = 0 40 F3 = 0 40 F4 = 0 40 . . 40 41 Now enter FORTRAN expressions to define the PDE coefficients, which 41 may be functions of T,$$1. 41 41 Recall that the PDE has the form 41 41 C*d($$1)/dT = F 41 42 Now enter FORTRAN expressions to define the PDE coefficients, which 42 may be functions of T,$$1,$$2. 42 42 Recall that the PDEs have the form 42 42 C11*d($$1)/dT + C12*d($$2)/dT = F1 42 C21*d($$1)/dT + C22*d($$2)/dT = F2 42 43 Now enter FORTRAN expressions to define the PDE coefficients, which 43 may be functions of T,$$1,$$2,$$3. 43 43 Recall that the PDEs have the form 43 43 C11*d($$1)/dT + C12*d($$2)/dT + C13*d($$3)/dT = F1 43 C21*d($$1)/dT + C22*d($$2)/dT + C23*d($$3)/dT = F2 43 C31*d($$1)/dT + C32*d($$2)/dT + C33*d($$3)/dT = F3 43 44 Now enter FORTRAN expressions to define the PDE coefficients, which 44 may be functions of T,$$1,$$2,$$3,$$4,... 44 44 Recall that the PDEs have the form 44 44 C11*d($$1)/dT + C12*d($$2)/dT + C13*d($$3)/dT + C14*d($$4)/dT +...= F1 44 C21*d($$1)/dT + C22*d($$2)/dT + C23*d($$3)/dT + C24*d($$4)/dT +...= F2 44 C31*d($$1)/dT + C32*d($$2)/dT + C33*d($$3)/dT + C34*d($$4)/dT +...= F3 44 C41*d($$1)/dT + C42*d($$2)/dT + C43*d($$3)/dT + C44*d($$4)/dT +...= F4 44 . . . . 44 45 If you don't want to read the FINE PRINT, default the initial values. 45 45 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 45 + Now the initial values for the inverse power method may be defined + 45 + using FORTRAN expressions. + 45 + + 45 + By default, the initial values are generated by a random number + 45 + generator. This virtually eliminates any possibility of convergence + 45 + to the wrong eigenvalue, due to an unlucky choice of initial values. + 45 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 46 Now the initial values for Newton's method must be defined using 46 FORTRAN expressions. 46 46 It is important to provide initial values which are at least of the 46 correct order of magnitude. 47 Now the initial values must be defined using FORTRAN expressions. 47 They may reference the initial time T0. 48 If you don't want to read the FINE PRINT, enter 'no'. 48 48 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 48 + Do you want to read the initial conditions from the restart file, + 48 + if it exists (and use the conditions supplied above if it does not + 48 + exist)? + 48 + + 48 + If so, PDE2D will dump the final solution at the end of each run + 48 + into a restart file "pde2d.res". Thus the usual procedure for + 48 + using this dump/restart option is to make sure there is no restart + 48 + file in your directory left over from a previous job, then the + 48 + first time you run this job, the initial conditions supplied above + 48 + will be used, but on the second and subsequent runs the restart file + 48 + from the previous run will be used to define the initial conditions. + 48 + + 48 + You can do all the "runs" in one program, by setting NPROB > 1. + 48 + Each pass through the DO loop, T0,TF,NSTEPS and possibly other + 48 + parameters may be varied, by making them functions of IPROB. + 48 + + 48 + If the 2D or 3D collocation method is used, the coordinate + 48 + transformation should not change between dump and restart. + 48 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 48B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48B$ We want to restart the second solution (IPROB=2) from the first $ 48B$ solution, so $ 48B$ enter: yes $ 48B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48C$ enter: no $ 48C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48D$ enter: no $ 48D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48F$ enter: no $ 48F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48G$ enter: no $ 48G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48H$ enter: no $ 48H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48J$ enter: no $ 48J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48K$ enter: no $ 48K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48L$ enter: no $ 48L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48M$ enter: no $ 48M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48N$ enter: no $ 48N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 48O$ enter: no $ 48O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 49 If you don't want to read the FINE PRINT, default the following 49 variable. 49 49 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 49 + Normally, PDE2D saves the values of $$1 at the output points. + 49 + If different variables are to be saved (for later printing or + 49 + plotting) the following function can be used to re-define the + 49 + output variable: + 49 + define UPRINT(1) to replace $$1 + 49 + UPRINT may be a function of $$1 and (if applicable) T, and of the + 49 + "integral" estimates SINT(1),... + 49 + + 49 + UPRINT(1) defaults to $$1. Enter a FORTRAN expression for UPRINT(1) + 49 + (or default). + 49 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 50 If you don't want to read the FINE PRINT, default all of the following 50 variables. 50 50 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 50 + Normally, PDE2D saves the values of $$1,$$2 at the output points. + 50 + If different variables are to be saved (for later printing or + 50 + plotting) the following functions can be used to re-define the + 50 + output variables: + 50 + define UPRINT(1) to replace $$1 + 50 + UPRINT(2) $$2 + 50 + Each function may be a function of $$1,$$2 and (if applicable) T, + 50 + and of the "integral" estimates SINT(1),... + 50 + + 50 + The default for each variable is no change, for example, UPRINT(1) + 50 + defaults to $$1. Enter FORTRAN expressions for each of the + 50 + following functions (or default). + 50 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 51 If you don't want to read the FINE PRINT, default all of the following 51 variables. 51 51 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 51 + Normally, PDE2D saves the values of $$1,$$2,$$3 at the output points.+ 51 + If different variables are to be saved (for later printing or + 51 + plotting) the following functions can be used to re-define the + 51 + the output variables: + 51 + define UPRINT(1) to replace $$1 + 51 + UPRINT(2) $$2 + 51 + UPRINT(3) $$3 + 51 + Each function may be a function of $$1,$$2,$$3 and (if applicable) T,+ 51 + and of the "integral" estimates SINT(1),... + 51 + + 51 + The default for each variable is no change, for example, UPRINT(1) + 51 + defaults to $$1. Enter FORTRAN expressions for each of the + 51 + following functions (or default). + 51 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 52 If you don't want to read the FINE PRINT, default all of the following 52 variables. 52 52 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 52 + Normally, PDE2D saves the values of $$1,$$2,$$3,$$4,... at the output+ 52 + points. If different variables are to be saved (for later printing + 52 + or plotting) the following functions can be used to re-define the + 52 + output variables: + 52 + define UPRINT(1) to replace $$1 + 52 + UPRINT(2) $$2 + 52 + UPRINT(3) $$3 + 52 + UPRINT(4) $$4 + 52 + . . + 52 + . . + 52 + Each function may be a function of $$1,$$2,$$3,$$4,... and (if + 52 + applicable) T, and of the "integral" estimates SINT(1),... + 52 + + 52 + The default for each variable is no change, for example, UPRINT(1) + 52 + defaults to $$1. Enter FORTRAN expressions for each of the + 52 + following functions (or default). + 52 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 53 The solution will be saved (for possible postprocessing) at the NSAVE+1 53 time points 53 T0 + K*(TF-T0)/NSAVE 53 K=0,...,NSAVE. Enter a value for NSAVE. 53 53 If a user-specified constant time step is used, NSTEPS must be an 53 integer multiple of NSAVE. 53D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 53D$ To save the solution at the 6 points T = 0.0, 2.0, ..., 10.0, $ 53D$ enter: NSAVE = 5 $ 53D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 53F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 53F$ NSAVE should be fairly large, so UOUT is updated frequently, and $ 53F$ the old solution accessed by DOLDSOL1 will not be too out-of-date. $ 53F$ enter: NSAVE = 100 $ 53F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 53G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 53G$ We want to save the solution at all 101 values of T (=beta), so $ 53G$ enter: NSAVE = 100 $ 53G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 53J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 53J$ To save the solution at the 31 points T = 0.00, 0.02, ..., 0.60, $ 53J$ enter: NSAVE = 30 $ 53J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 53N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 53N$ enter: NSAVE = 20 $ 53N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 54 To generate tabular or graphical output, choose an output option from 54 the list below. 54 54 0. No further output is desired 54 1. Table of values at output points 54 The tabulated output is saved in a file. 54 2. Plot of variable versus time 54 54 Enter 0,1 or 2 to select an output option. 54 54 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 54 + If you decide later that you want additional types of plots not + 54 + requested during this interactive session, you will have to work + 54 + through a new interactive session, so it is recommended that you + 54 + request all output or plots you think you MIGHT eventually want now, + 54 + during this session. + 54 + + 54 + Regardless of the options you select, a dummy subroutine POSTPR + 54 + will be included in the program created by the interactive driver; + 54 + you can add your own postprocessing code to this subroutine. + 54 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 55 Enter a value for IVAR, to select the variable to be plotted or 55 printed: 55 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 56 Enter a value for IVAR, to select the variable to be plotted or 56 printed: 56 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 56 2 $$2 57 Enter a value for IVAR, to select the variable to be plotted or 57 printed: 57 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 57 2 $$2 57 3 $$3 58 Enter a value for IVAR, to select the variable to be plotted or 58 printed: 58 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 58 2 $$2 58 3 $$3 58 4 $$4 58 . . 58 . . 58 59 Enter a title, WITHOUT quotation marks. A maximum of 40 characters 59 are allowed. The default is no title. 59A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59A$ enter: Elastic plate problem $ 59A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59B$ enter: Solution of second example $ 59B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59C$ enter: First eigenfunction for third example $ 59C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59D$ enter: Temperature $ 59D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59E$ enter: Thermal stress problem $ 59E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59F$ enter: V $ 59F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59G$ enter: Solution norm vs. beta $ 59G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59H$ enter: Fluid velocity $ 59H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59I$ enter: Displacements at torus cross-sections $ 59I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59J$ enter: 3D wave problem $ 59J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59K$ enter: Probability density $ 59K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59L$ enter: Composite of two cylinders $ 59L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59M$ enter: Axisymmetric fluid flow problem $ 59M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59N$ enter: Water pressure head, H $ 59N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 59O$ enter: Probability density $ 59O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 60 Specify the range (UMIN,UMAX) for the dependent variable axis. UMIN 60 and UMAX are often defaulted. 60 60 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 60 + By default, the plot will be scaled to just fit in the plot area. + 60 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 60N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 60N$ press [RETURN] to default UMIN and UMAX $ 60N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61 Do you want to define any FORTRAN function subprograms used in any of 61 the FORTRAN 'expressions' entered earlier, entering them line by line? 61 61 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 61 + If you selected double precision accuracy earlier, be sure to + 61 + declare these functions and their arguments DOUBLE PRECISION. + 61 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 61A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61A$ enter: no $ 61A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61B$ enter: yes $ 61B$ Then enter one line at a time of the FORTRAN function TRUE: $ 61B$ FUNCTION TRUE(X,Y) $ 61B$ IMPLICIT DOUBLE PRECISION (A-H,O-Z) $ 61B$ TRUE = 1.0/SQRT(X*X+Y*Y) $ 61B$ RETURN $ 61B$ END $ 61B$ [blank line] $ 61B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61C$ enter: no $ 61C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61D$ enter: no $ 61D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61E$ enter: no $ 61E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61F$ enter: no $ 61F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61G$ enter: no $ 61G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61H$ enter: no $ 61H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61I$ enter: no $ 61I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61J$ enter: no $ 61J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61K$ enter: no $ 61K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61L$ enter: no $ 61L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61M$ enter: no $ 61M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61N$ enter: yes $ 61N$ Then define the functions THETA and RK, one line at a time: $ 61N$ FUNCTION THETA(H,IDER) $ 61N$ IMPLICIT DOUBLE PRECISION (A-H,O-Z) $ 61N$ B = 1.611 E6 $ 61N$ TS = 0.287 $ 61N$ TR = 0.075 $ 61N$ BETA = 3.96 $ 61N$ IF (H.LT.0.0) THEN $ 61N$ TH0 = TR + B*(TS-TR)/(B + ABS(H)**BETA) $ 61N$ TH1 = B*(TS-TR)*BETA*ABS(H)**(BETA-1.)/(B+ABS(H)**BETA)**2 $ 61N$ ELSE $ 61N$ TH0 = TS $ 61N$ TH1 = 0.0 $ 61N$ ENDIF $ 61N$ IF (IDER.EQ.0) THETA = TH0 $ 61N$ IF (IDER.EQ.1) THETA = TH1 $ 61N$ RETURN $ 61N$ END $ 61N$ FUNCTION RK(H) $ 61N$ IMPLICIT DOUBLE PRECISION (A-H,O-Z) $ 61N$ RKS = 0.00944 $ 61N$ A = 1.175 E6 $ 61N$ GAMMA = 4.74 $ 61N$ IF (H.LT.0.0) THEN $ 61N$ RK = RKS*A/(A+ABS(H)**GAMMA) $ 61N$ ELSE $ 61N$ RK = RKS $ 61N$ ENDIF $ 61N$ RETURN $ 61N$ END $ 61N$ [blank line] $ 61N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 61O$ enter: no $ 61O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 62 PDE2D solves the time-dependent system (note: U,A,F,FB,GB,U0 may be 62 vectors, C,RHO may be matrices): 62 62 C(X,T,U,Ux)*d(U)/dT = d/dX* A(X,T,U,Ux) - F(X,T,U,Ux) 62 62 or the steady-state system: 62 62 d/dX* A(X,U,Ux) = F(X,U,Ux) 62 62 or the linear and homogeneous eigenvalue system: 62 62 d/dX* A(X,U,Ux) = F(X,U,Ux) + lambda*RHO(X)*U 62 62 with 'fixed' boundary conditions: 62 62 U = FB(X,[T]) 62 62 or 'free' boundary conditions: 62 62 A*nx = GB(X,[T],U,Ux) (nx=-1 at left endpoint, nx=+1 at right) 62 62 at two X values. 62 62 For time-dependent problems there are also initial conditions: 62 62 U = U0(X) at T=T0 62 62 Here Ux represents the (vector) function dU/dX. 62 62 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 62 + If your PDEs involve the solution at points other than X, the + 62 + function + 62 + (D)OLDSOL1(IDER,IEQ,XX,KDEG) + 62 + will interpolate (using interpolation of degree KDEG=1,2 or 3) to XX + 62 + the function saved in UOUT(*,IDER,IEQ,ISET) on the last time step or + 62 + iteration (ISET) for which it has been saved. Thus, for example, if + 62 + IDER=1, this will return the latest value of component IEQ of the + 62 + solution at XX, assuming this has not been modified using UPRINT... + 62 + If your equations involve integrals of the solution, for example, + 62 + you can use (D)OLDSOL1 to approximate these using the solution from + 62 + the last time step or iteration. + 62 + + 62 + CAUTION: For a steady-state or eigenvalue problem, you must reset + 62 + NOUT=1 if you want to save the solution each iteration. + 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 62 + A system of NEQN complex partial differential equations must be + 62 + written as a system of 2*NEQN real equations, by separating the + 62 + equations into their real and imaginary parts. However, note that + 62 + the complex arithmetic abilities of FORTRAN can be used to simplify + 62 + this separation. For example, the complex PDE: + 62 + I*Uxx = 1/(1+U**10), where U = UR + UI*I + 62 + would be difficult to split up analytically, but using FORTRAN + 62 + expressions it is easy: + 62 + A1 = -UIx, F1 = REAL(1.0/(1.0+CMPLX(UR,UI)**10)) + 62 + A2 = URx, F2 = AIMAG(1.0/(1.0+CMPLX(UR,UI)**10)) + 62 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 62 You may now define global parameters, which may be referenced in any 62 of the "FORTRAN expressions" you input throughout the rest of this 62 interactive session. You will be prompted alternately for parameter 62 names and their values; enter a blank name when you are finished. 62 62 Parameter names are valid FORTRAN variable names, starting in 62 column 1. Thus each name consists of 1 to 6 alphanumeric characters, 62 the first of which must be a letter. If the first letter is in the 62 range I-N, the parameter must be an integer. 62 62 Parameter values are either FORTRAN constants or FORTRAN expressions 62 involving only constants and global parameters defined on earlier 62 lines. They may also be functions of the problem number IPROB, if 62 you are solving several similar problems in one run (NPROB > 1). Note 62 that you are defining global CONSTANTS, not functions; e.g., parameter 62 values may not reference any of the independent or dependent variables 62 of your problem. 62 62 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 62 + If you define other parameters here later, using an editor, you must + 62 + add them to COMMON block /PARM8Z/ everywhere this block appears, if + 62 + they are to be "global" parameters. + 62 + + 62 + The variable PI is already included as a global parameter, with an + 62 + accurate value 3.14159... + 62 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 62N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 62N$ press [RETURN] to skip global parameter definitions $ 62N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 63 A Galerkin finite element method is used, with piecewise polynomial 63 basis functions on the subintervals defined by the grid points: 63 XGRID(1),XGRID(2),...,XGRID(NXGRID) 63 You will first be prompted for NXGRID, the number of X-grid points, 63 then for XGRID(1),...,XGRID(NXGRID). Any points defaulted will be 63 uniformly spaced between the points you define; the first and last 63 points cannot be defaulted. The interval over which the PDE system 63 is to be solved is then: 63 XGRID(1) < X < XGRID(NXGRID) 63 63N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 63N$ enter: NXGRID = 51 $ 63N$ XGRID(1) = 0.0 $ 63N$ XGRID(NXGRID) = 20.0 $ 63N$ and default XGRID(2),...,XGRID(NXGRID-1). $ 63N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 64 Enter the polynomial degree (1,2,3 or 4) desired. A suggested value is 64 IDEG = 3. 64 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 64 + The spatial discretization error is O(h**2), O(h**3), O(h**4) or + 64 + O(h**5) when polynomials of degree 1,2,3 or 4, respectively, are + 64 + used. + 64 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 64N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 64N$ enter: IDEG = 3 $ 64N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 65 If you don't want to read the FINE PRINT, enter 'no'. 65 65 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 65 + Is the Crank-Nicolson scheme to be used to discretize time? If you + 65 + answer 'no', a backward Euler scheme will be used. + 65 + + 65 + If a user-specified constant time step is chosen, the second order + 65 + Crank Nicolson method is recommended only for problems with very + 65 + well-behaved solutions, and the first order backward Euler scheme + 65 + should be used for more difficult problems. In particular, do not + 65 + use the Crank Nicolson method if the left hand side of any PDE is + 65 + zero, for example, if a mixed elliptic/parabolic problem is solved. + 65 + + 65 + If adaptive time step control is chosen, however, an extrapolation + 65 + is done between the 1-step and 2-step answers which makes the Euler + 65 + method second order, and the Crank-Nicolson method strongly stable. + 65 + Thus in this case, both methods have second order accuracy, and both + 65 + are strongly stable. + 65 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 65D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 65D$ enter: no $ 65D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 65F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 65F$ enter: no $ 65F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 65G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 65G$ Since C11=C12=C21=C22=0, it is essential that the backward Euler $ 65G$ method be used, so $ 65G$ enter: no $ 65G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 65J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 65J$ enter: yes $ 65J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 65N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 65N$ enter: yes $ 65N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 66 You may now choose names for the component(s) of the (possibly vector) 66 solution U. Each must be an alphanumeric string of one to three 66 characters, beginning with a letter in the range A-H or O-Z. The 66 variable names X,T and A must not be used. The name should start 66 in column 1. 66N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 66N$ enter: U1 = H $ 66N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 67 If you don't want to read the FINE PRINT, enter 'no'. 67 67 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 67 + Is this problem symmetric? The problem is called symmetric if the + 67 + Jacobian matrices + 67 + + 67 + F1.$$1 F1.$$1x ... + 67 + A1.$$1 A1.$$1x ... + 67 + . . + 67 + . . + 67 + and (if NEQN > 1) + 67 + RHO11 RHO12 ... + 67 + RHO21 RHO22 ... + 67 + . . + 67 + . . + 67 + are always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 67 + for the other terms. The Jacobian of GB must also be symmetric, + 67 + that is, d(GB_i)/d(U_j) = d(GB_j)/d(U_i), GB_i must not depend on + 67 + $$1x,..., and EV0I must be 0. + 67 + + 67 + The memory and execution time are decreased if the problem is known + 67 + to be symmetric. If you answer 'yes' and your problem is not + 67 + symmetric, you will usually get a warning message, but you may get + 67 + incorrect answers with no warning, so only answer 'yes' if you are + 67 + sure. + 67 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 67 67 If you don't want to read the FINE PRINT, enter 'no'. 68 If you don't want to read the FINE PRINT, enter 'no'. 68 68 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 68 + Is this problem symmetric? The problem is called symmetric if the + 68 + Jacobian matrix + 68 + + 68 + F1.$$1 F1.$$1x ... + 68 + A1.$$1 A1.$$1x ... + 68 + . . + 68 + . . + 68 + is always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 68 + for the other terms. The Jacobian of GB must also be symmetric, + 68 + that is, d(GB_i)/d(U_j) = d(GB_j)/d(U_i), and GB_i must not depend + 68 + on $$1x,... + 68 + + 68 + The memory and execution time are decreased if the problem is known + 68 + to be symmetric. If you answer 'yes' and your problem is not + 68 + symmetric, you will usually get a warning message, but you may get + 68 + incorrect answers with no warning, so only answer 'yes' if you are + 68 + sure. + 68 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 68 68 If you don't want to read the FINE PRINT, enter 'no'. 69 If you don't want to read the FINE PRINT, enter 'no'. 69 69 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 69 + Is this problem symmetric? The problem is called symmetric if the + 69 + Jacobian matrices + 69 + + 69 + F1.$$1 F1.$$1x ... + 69 + A1.$$1 A1.$$1x ... + 69 + . . + 69 + . . + 69 + and (if NEQN > 1) + 69 + C11 C12 ... + 69 + C21 C22 ... + 69 + . . + 69 + . . + 69 + are always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 69 + for the other terms. The Jacobian of GB must also be symmetric, + 69 + that is, d(GB_i)/d(U_j) = d(GB_j)/d(U_i), and GB_i must not depend + 69 + on $$1x,... + 69 + + 69 + The memory and execution time are decreased if the problem is known + 69 + to be symmetric. If you answer 'yes' and your problem is not + 69 + symmetric, you will usually get a warning message, but you may get + 69 + incorrect answers with no warning, so only answer 'yes' if you are + 69 + sure. + 69 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 69 69 If you don't want to read the FINE PRINT, enter 'no'. 69N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 69N$ enter: no $ 69N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 70 Enter FORTRAN expressions for the functions whose integrals are to be 70 calculated and printed. They may be functions of 70 70 X,$$1,$$1x and (if applicable) T 70 70 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 70 + If you only want to integrate a function over part of the interval, + 70 + define that function to be zero on the rest of the interval. + 70 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 70N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 70N$ We want to calculate the total moisture content, so $ 70N$ enter: INTEGRAL = THETA(H,0) $ 70N$ The FORTRAN function THETA(H,0) (=Theta(H)) will be defined later. $ 70N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 71 Enter FORTRAN expressions for the functions whose integrals are to be 71 calculated and printed. They may be functions of 71 71 X,$$1,$$1x,$$2,$$2x and (if applicable) T 71 71 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 71 + If you only want to integrate a function over part of the interval, + 71 + define that function to be zero on the rest of the interval. + 71 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 72 Enter FORTRAN expressions for the functions whose integrals are to be 72 calculated and printed. They may be functions of 72 72 X,$$1,$$1x,$$2,$$2x,$$3,$$3x and (if applicable) T 72 72 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 72 + If you only want to integrate a function over part of the interval, + 72 + define that function to be zero on the rest of the interval. + 72 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 73 Enter FORTRAN expressions for the functions whose integrals are to be 73 calculated and printed. They may be functions of 73 73 X,$$1,$$1x,$$2,$$2x,$$3,$$3x,$$4,$$4x... and (if applicable) T 73 73 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 73 + If you only want to integrate a function over part of the interval, + 73 + define that function to be zero on the rest of the interval. + 73 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 74 You may calculate one or more boundary integrals (over the entire 74 boundary) of some functions of the solution and its derivatives. How 74 many boundary integrals (NBINT), if any, do you want to calculate? 74 74 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 74 + In the FORTRAN program created by the preprocessor, the computed + 74 + values of the integrals will be returned in the vector BINT8Z. If + 74 + several iterations or time steps are done, only the last computed + 74 + values are saved in BINT8Z (all values are printed). + 74 + + 74 + A limiting value, BLIM8Z(I), for the I-th boundary integral can be + 74 + set below in the main program. The computations will then stop + 74 + gracefully whenever BINT8Z(I) > BLIM8Z(I), for any I=1...NBINT. + 74 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 74A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74A$ enter: NBINT = 1 $ 74A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74B$ enter: NBINT = 0 $ 74B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74C$ enter: NBINT = 0 $ 74C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74D$ enter: NBINT = 1 $ 74D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74E$ enter: NBINT = 0 $ 74E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74F$ enter: NBINT = 0 $ 74F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74G$ enter: NBINT = 0 $ 74G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74H$ enter: NBINT = 0 $ 74H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74I$ enter: NBINT = 1 $ 74I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74J$ enter: NBINT = 0 $ 74J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74K$ enter: NBINT = 0 $ 74K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74L$ enter: NBINT = 0 $ 74L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74M$ enter: NBINT = 0 $ 74M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74N$ enter: NBINT = 1 $ 74N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 74O$ enter: NBINT = 0 $ 74O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 75 Enter FORTRAN expressions for the functions whose "integrals" (sum 75 over two boundary points) are to be calculated and printed. They may 75 be functions of 75 75 X,$$1,$$1x and (if applicable) T 75 75 The unit outward normal, NORMx (=1 at right end point, -1 at left), 75 may also be referenced. 75 75 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 75 + If you only want to "integrate" a function over one boundary point, + 75 + define that function to be zero at the other point. + 75 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 75N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 75N$ We want to calculate the flux, K(H)*(Hx+1), across the boundary, so $ 75N$ enter: BND. INTEGRAL = RK(H)*(Hx+1)*NORMx $ 75N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 76 Enter FORTRAN expressions for the functions whose "integrals" (sum 76 over two boundary points) are to be calculated and printed. They may 76 be functions of 76 76 X,$$1,$$1x,$$2,$$2x and (if applicable) T 76 76 The unit outward normal, NORMx (=1 at right end point, -1 at left), 76 may also be referenced. 76 76 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 76 + If you only want to "integrate" a function over one boundary point, + 76 + define that function to be zero at the other point. + 76 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 77 Enter FORTRAN expressions for the functions whose "integrals" (sum 77 over two boundary points) are to be calculated and printed. They may 77 be functions of 77 77 X,$$1,$$1x,$$2,$$2x,$$3,$$3x and (if applicable) T 77 77 The unit outward normal, NORMx (=1 at right end point, -1 at left), 77 may also be referenced. 77 77 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 77 + If you only want to "integrate" a function over one boundary point, + 77 + define that function to be zero at the other point. + 77 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 78 Enter FORTRAN expressions for the functions whose "integrals" (sum 78 over two boundary points) are to be calculated and printed. They may 78 be functions of 78 78 X,$$1,$$1x,$$2,$$2x,$$3,$$3x,$$4,$$4x ... and (if applicable) T 78 78 The unit outward normal, NORMx (=1 at right end point, -1 at left), 78 may also be referenced. 78 78 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 78 + If you only want to "integrate" a function over one boundary point, + 78 + define that function to be zero at the other point. + 78 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 79 If you don't want to read the FINE PRINT, enter 'no'. 79 79 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 79 + Do you have point source terms in your PDEs, involving "Dirac Delta" + 79 + functions? A Dirac Delta function DEL(x-xd0) is a function whose + 79 + integral is 1, but which is zero everywhere except at a singular + 79 + point xd0. + 79 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 79N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 79N$ enter: no $ 79N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 80 Enter the number of points (NDEL) at which Dirac Delta functions are to 80 be defined, then the coordinates XD0(L), L=1,...,NDEL of these points. 81 The PDE coefficient Fi (i=1,...,NEQN) may include point source terms 81 of the form 81 DELAMP(1,i)*DEL(X-XD0(1)) + ... + DELAMP(NDEL,i)*DEL(X-XD0(NDEL)) 81 Enter the Delta function amplitudes (DELAMP), which may be constants 81 or (if applicable) functions of T. When you are later prompted for the 81 coefficients Fi, do NOT include these point source terms then. 82 Now enter FORTRAN expressions to define the PDE coefficients. RHO may 82 be a function of X. The other coefficients may be functions of 82 82 X,$$1,$$1x 82 82 Recall that the PDE has the form 82 82 d/dX*A = F + lambda*RHO*$$1 82 83 Now enter FORTRAN expressions to define the PDE coefficients. 83 RHO11,RHO12,RHO21,RHO22 may be functions of X. The other 83 coefficients may be functions of 83 83 X,$$1,$$1x,$$2,$$2x 83 83 Recall that the PDEs have the form 83 83 d/dX*A1 = F1 + lambda*(RHO11*$$1 + RHO12*$$2) 83 d/dX*A2 = F2 + lambda*(RHO21*$$1 + RHO22*$$2) 83 84 Now enter FORTRAN expressions to define the PDE coefficients. 84 RHO11,RHO12,RHO13,RHO21,RHO22,RHO23,RHO31,RHO32,RHO33 may be 84 functions of X. The other coefficients may be functions of 84 84 X,$$1,$$1y,$$2,$$2x,$$3,$$3x 84 84 Recall that the PDEs have the form 84 84 d/dX*A1 = F1 + lambda*(RHO11*$$1 + RHO12*$$2 + RHO13*$$3) 84 d/dX*A2 = F2 + lambda*(RHO21*$$1 + RHO22*$$2 + RHO23*$$3) 84 d/dX*A3 = F3 + lambda*(RHO31*$$1 + RHO32*$$2 + RHO33*$$3) 84 85 Now enter FORTRAN expressions to define the PDE coefficients. The 85 RHOIJ may be functions of X. The other coefficients may be functions 85 of 85 85 X,$$1,$$1x,$$2,$$2x,$$3,$$3x,$$4,$$4x... 85 85 Recall that the PDEs have the form 85 85 d/dX*A1 = F1+lambda*(RHO11*$$1+RHO12*$$2+RHO13*$$3+RHO14*$$4..) 85 d/dX*A2 = F2+lambda*(RHO21*$$1+RHO22*$$2+RHO23*$$3+RHO24*$$4..) 85 d/dX*A3 = F3+lambda*(RHO31*$$1+RHO32*$$2+RHO33*$$3+RHO34*$$4..) 85 d/dX*A4 = F4+lambda*(RHO41*$$1+RHO42*$$2+RHO43*$$3+RHO44*$$4..) 85 . . 85 . . 85 86 Now enter FORTRAN expressions to define the PDE coefficients, which 86 may be functions of 86 86 X,$$1,$$1x 86 86 and, in some cases, of the parameter T. 86 86 Recall that the PDE has the form 86 86 d/dX*A = F 86 87 Now enter FORTRAN expressions to define the PDE coefficients, which 87 may be functions of 87 87 X,$$1,$$1x,$$2,$$2x 87 87 and, in some cases, of the parameter T. 87 87 Recall that the PDEs have the form 87 87 d/dX*A1 = F1 87 d/dX*A2 = F2 87 88 Now enter FORTRAN expressions to define the PDE coefficients, which 88 may be functions of 88 88 X,$$1,$$1x,$$2,$$2x,$$3,$$3x 88 88 and, in some cases, of the parameter T. 88 88 Recall that the PDEs have the form 88 88 d/dX*A1 = F1 88 d/dX*A2 = F2 88 d/dX*A3 = F3 88 89 Now enter FORTRAN expressions to define the PDE coefficients, which 89 may be functions of 89 89 X,$$1,$$1x,$$2,$$2x,$$3,$$3x,$$4,$$4x... 89 89 and, in some cases, of the parameter T. 89 89 Recall that the PDEs have the form 89 89 d/dX*A1 = F1 89 d/dX*A2 = F2 89 d/dX*A3 = F3 89 d/dX*A4 = F4 89 . . 89 . . 90 Now enter FORTRAN expressions to define the PDE coefficients, which 90 may be functions of 90 90 X,T,$$1,$$1x 90 90 Recall that the PDE has the form 90 90 C*d($$1)/dT = d/dX*A - F 90 90N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 90N$ The partial differential equation may be written $ 90N$ $ 90N$ d(Theta)/dH*Ht = d/dx{K(H)*(Hx+1)} $ 90N$ $ 90N$ When asked if you want to write a FORTRAN block, $ 90N$ enter: no $ 90N$ then enter the following, when prompted: $ 90N$ C = THETA(H,1) F = 0 A = RK(H)*(Hx+1) $ 90N$ The FORTRAN functions THETA(H,1) (=d(Theta)/dH) and RK(H) (=K(H)) $ 90N$ will be defined later. $ 90N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 91 Now enter FORTRAN expressions to define the PDE coefficients, which 91 may be functions of 91 91 X,T,$$1,$$1x,$$2,$$2x 91 91 Recall that the PDEs have the form 91 91 C11*d($$1)/dT + C12*d($$2)/dT = d/dX*A1 - F1 91 C21*d($$1)/dT + C22*d($$2)/dT = d/dX*A2 - F2 91 92 Now enter FORTRAN expressions to define the PDE coefficients, which 92 may be functions of 92 92 X,T,$$1,$$1x,$$2,$$2x,$$3,$$3x 92 92 Recall that the PDEs have the form 92 92 C11*d($$1)/dT + C12*d($$2)/dT + C13*d($$3)/dT = d/dX*A1 - F1 92 C21*d($$1)/dT + C22*d($$2)/dT + C23*d($$3)/dT = d/dX*A2 - F2 92 C31*d($$1)/dT + C32*d($$2)/dT + C33*d($$3)/dT = d/dX*A3 - F3 92 93 Now enter FORTRAN expressions to define the PDE coefficients, which 93 may be functions of 93 93 X,T,$$1,$$1x,$$2,$$2x,$$3,$$3x,$$4,$$4x... 93 93 Recall that the PDEs have the form 93 93 C11*d($$1)/dT + C12*d($$2)/dT + C13*d($$3)/dT + C14*d($$4)/dT +... 93 = d/dX*A1 - F1 93 C21*d($$1)/dT + C22*d($$2)/dT + C23*d($$3)/dT + C24*d($$4)/dT +... 93 = d/dX*A2 - F2 93 C31*d($$1)/dT + C32*d($$2)/dT + C33*d($$3)/dT + C34*d($$4)/dT +... 93 = d/dX*A3 - F3 93 C41*d($$1)/dT + C42*d($$2)/dT + C43*d($$3)/dT + C44*d($$4)/dT +... 93 = d/dX*A4 - F4 93 . . 93 . . 94 If you don't want to read the FINE PRINT, default the initial values. 94 94 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 94 + Now the initial values for the inverse power method may be defined + 94 + using FORTRAN expressions. They may be functions of X. + 94 + + 94 + By default, the initial values are generated by a random number + 94 + generator. This virtually eliminates any possibility of convergence + 94 + to the wrong eigenvalue, due to an unlucky choice of initial values. + 94 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 94O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 94O$ press [RETURN] to default U0 $ 94O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 95 Now the initial values for Newton's method must be defined using 95 FORTRAN expressions. They may be functions of X. 95 95 It is important to provide initial values which are at least of the 95 correct order of magnitude. 96 Now the initial values must be defined using FORTRAN expressions. 96 They may be functions of X, and may also reference the initial time T0. 96F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 96F$ enter: V0 = max(X-E,0.D0) $ 96F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 96N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 96N$ enter: H0 = -20 - X $ 96N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 97 If the program dumping the solution and the program restarting from 97 the dump have identical finite element grids, the solution at the 97 nodes can be dumped to the restart file "pde2d.res", and there will 97 be no loss of accuracy due to interpolation when this solution is read 97 back. Will the dumping and restarting programs have identical grids? 97 97 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 97 + If you answer 'no', then you can change the grid between runs, but + 97 + the solution on the new grid will be interpolated from the dumped + 97 + solution, so there may be some loss of accuracy due to interpolation.+ 97 + The solution will be dumped to the restart file on a uniform grid + 97 + of size + 97 + for 1D problems: NXP8Z=1001 + 97 + 2D problems: NXP8Z=101 by NYP8Z=101 + 97 + The values of NXP8Z,NYP8Z are set in a PARAMETER statement in the + 97 + main program, so they can be changed, if desired. The interpolation + 97 + degree (KDEG8Z) is also set in this PARAMETER statement, to 1 + 97 + (linear interpolation), but KDEG8Z can be reset to 2 or 3 if desired.+ 97 + + 97 + If you want to modify the data in the restart file after it has + 97 + been dumped (each trip through the loop IPROB=1,NPROB in the main + 97 + program), answer 'no' even if your grid does not change, then + 97 + uncomment the two calls to (D)TDPR(1,2) in the main program (and + 97 + also the dimension statement for xres8z,...,ures8z). You can modify + 97 + the restart file by modifying the solution as stored in the array + 97 + URES8Z, after it is read from 'pde2d.res' by the first call, and + 97 + before it is written back by the second call. The solution is + 97 + stored as follows: + 97 + (D)TDPR1: URES8Z(IEQN,I) = unknown #IEQN at + 97 + X = XRES8Z(I) + 97 + (D)TDPR2: URES8Z(IEQN,I,J) = unknown #IEQN at + 97 + X = XRES8Z(I), Y = YRES8Z(J)) + 97 + where I=1,...,NXP8Z, J=1,...,NYP8Z. You may NOT modify the arrays + 97 + XRES8Z,YRES8Z. + 97 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 97 97 Will the dumping and restarting programs have identical grids? 97B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 97B$ Since adaptive triangulation is requested, the triangulation may $ 97B$ change between IPROB=1 and IPROB=2, so $ 97B$ enter: no $ 97B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 98 Do you have 'fixed' boundary conditions at the LEFT endpoint, that 98 is, are you going to specify values for all unknowns there? 98 If you answer 'no', you can specify boundary conditions of the 98 more general 'free' type. 98 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 98 + If some, but not all, of the unknowns are to be specified, you + 98 + should specify 'free' boundary conditions, since even 'fixed' + 98 + type conditions of the form: + 98 + Ui = FBi(X,[T]) + 98 + can be expressed as 'free' boundary conditions in the form: + 98 + Ai*nx = zero(Ui-FBi(X,[T])) + 98 + where zero(f) = Big_Number*f is a PDE2D-supplied function. + 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 98 + Note: while 'fixed' boundary conditions are enforced exactly, 'free' + 98 + boundary conditions are not; the greater the overall solution + 98 + accuracy, the more closely they are satisfied. + 98 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 98N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 98N$ enter: no $ 98N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 99 Do you have 'fixed' boundary conditions at the RIGHT endpoint, that 99 is, are you going to specify values for all unknowns there? 99 If you answer 'no', you can specify boundary conditions of the 99 more general 'free' type. 99N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 99N$ enter: yes $ 99N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 100 Since this is a homogeneous eigenvalue problem, FB is assumed to be 0 100 on all boundaries where 'fixed' boundary conditions are specified. 101 101 Define boundary conditions at the LEFT endpoint X = XGRID(1). 102 Enter a FORTRAN expression to define FB at this endpoint. It may 102 be a function of X and (if applicable) T. 102 102 Recall that fixed boundary conditions have the form 102 102 $$1 = FB 102 102N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 102N$ The right endpoint boundary condition is H = 20, so $ 102N$ enter: FB = 20 $ 102N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 103 Enter FORTRAN expressions to define FB1,FB2 at this endpoint. 103 They may be functions of X and (if applicable) T. 103 103 Recall that fixed boundary conditions have the form 103 103 $$1 = FB1 103 $$2 = FB2 103 104 Enter FORTRAN expressions to define FB1,FB2,FB3 at this endpoint. 104 They may be functions of X and (if applicable) T. 104 104 Recall that fixed boundary conditions have the form 104 104 $$1 = FB1 104 $$2 = FB2 104 $$3 = FB3 104 105 Enter FORTRAN expressions to define FB1,FB2,FB3,FB4,... at this 105 endpoint. They may be functions of X and (if applicable) T. 105 105 Recall that fixed boundary conditions have the form 105 105 $$1 = FB1 105 $$2 = FB2 105 $$3 = FB3 105 $$4 = FB4 105 . 105 . 106 106 Define boundary conditions at the RIGHT endpoint X = XGRID(NXGRID). 107 Enter a FORTRAN expression to define GB at this endpoint. It may be 107 a function of 107 107 X,$$1,$$1x and (if applicable) T 107 107 Recall that free boundary conditions have the form 107 107 A*nx = GB (nx=-1 at left endpoint, nx=+1 at right) 107 107 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 107 + If A=0 (eg, if the PDE is first order), then setting GB=0 is + 107 + equivalent to setting "no" boundary condition (which is sometimes + 107 + appropriate for first order PDEs), because the boundary condition + 107 + A*nx = GB reduces to 0=0. + 107 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 107 107N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 107N$ The left endpoint boundary condition is Hx+1 = 0, or A = 0, so $ 107N$ enter: GB = 0 $ 107N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 108 Enter FORTRAN expressions to define GB1,GB2 at this endpoint. They 108 may be functions of 108 108 X,$$1,$$1x,$$2,$$2x and (if applicable) T 108 108 Recall that free boundary conditions have the form 108 108 A1*nx = GB1 (nx=-1 at left endpoint, nx=+1 at right) 108 A2*nx = GB2 108 108 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 108 + Note that 'fixed' boundary conditions: + 108 + Ui = FBi(X,[T]) + 108 + can be expressed as 'free' boundary conditions in the form: + 108 + GBi = zero(Ui-FBi(X,[T])) + 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 108 + If Ai=0 (eg, if a PDE is first order), then setting GBi=0 is + 108 + equivalent to setting "no" boundary condition (which is sometimes + 108 + appropriate for first order PDEs), because the boundary condition + 108 + Ai*nx = GBi reduces to 0=0. + 108 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 108 109 Enter FORTRAN expressions to define GB1,GB2,GB3 at this endpoint. 109 They may be functions of 109 109 X,$$1,$$1x,$$2,$$2x,$$3,$$3x and (if applicable) T 109 109 Recall that free boundary conditions have the form 109 109 A1*nx = GB1 (nx=-1 at left endpoint, nx=+1 at right) 109 A2*nx = GB2 109 A3*nx = GB3 109 109 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 109 + Note that 'fixed' boundary conditions: + 109 + Ui = FBi(X,[T]) + 109 + can be expressed as 'free' boundary conditions in the form: + 109 + GBi = zero(Ui-FBi(X,[T])) + 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 109 + If Ai=0 (eg, if a PDE is first order), then setting GBi=0 is + 109 + equivalent to setting "no" boundary condition (which is sometimes + 109 + appropriate for first order PDEs), because the boundary condition + 109 + Ai*nx = GBi reduces to 0=0. + 109 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 109 110 Enter FORTRAN expressions to define GB1,GB2,GB3,GB4... at this 110 endpoint. They may be functions of 110 110 X,$$1,$$1x,$$2,$$2x,$$3,$$3x,$$4,$$4x... and (if applicable) T 110 110 Recall that free boundary conditions have the form 110 110 A1*nx = GB1 (nx=-1 at left endpoint, nx=+1 at right) 110 A2*nx = GB2 110 A3*nx = GB3 110 A4*nx = GB4 110 . . 110 . . 110 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 110 + Note that 'fixed' boundary conditions: + 110 + Ui = FBi(X,[T]) + 110 + can be expressed as 'free' boundary conditions in the form: + 110 + GBi = zero(Ui-FBi(X,[T])) + 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 110 + If Ai=0 (eg, if a PDE is first order), then setting GBi=0 is + 110 + equivalent to setting "no" boundary condition (which is sometimes + 110 + appropriate for first order PDEs), because the boundary condition + 110 + Ai*nx = GBi reduces to 0=0. + 110 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 110 111 If you don't want to read the FINE PRINT, default all of the following 111 variables. 111 111 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 111 + Normally, PDE2D saves the values of $$1,A at the output points. + 111 + If different variables are to be saved (for later printing or + 111 + plotting) the following functions can be used to re-define the + 111 + output variables: + 111 + define UPRINT(1) to replace $$1 + 111 + APRINT(1) A + 111 + Each function may be a function of + 111 + + 111 + X,$$1,$$1x,A and (if applicable) T + 111 + + 111 + Each may also be a function of the initial triangle number KTRI and + 111 + the integral estimates SINT(1),...,BINT(1),... + 111 + + 111 + The default for each variable is no change, for example, UPRINT(1) + 111 + defaults to $$1. Enter FORTRAN expressions for each of the + 111 + following functions (or default). + 111 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 111N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 111N$ press [RETURN] to default all output modification variables $ 111N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 112 If you don't want to read the FINE PRINT, default all of the following 112 variables. 112 112 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 112 + Normally, PDE2D saves the values of $$1,A1,$$2,A2 at the output + 112 + points. If different variables are to be saved (for later printing + 112 + or plotting) the following functions can be used to re-define the + 112 + output variables: + 112 + define UPRINT(1) to replace $$1 + 112 + APRINT(1) A1 + 112 + UPRINT(2) $$2 + 112 + APRINT(2) A2 + 112 + Each function may be a function of + 112 + + 112 + X,$$1,$$1x,A1,$$2,$$2x,A2 and (if applicable) T + 112 + + 112 + Each may also be a function of the initial triangle number KTRI and + 112 + the integral estimates SINT(1),...,BINT(1),... + 112 + + 112 + The default for each variable is no change, for example, UPRINT(1) + 112 + defaults to $$1. Enter FORTRAN expressions for each of the + 112 + following functions (or default). + 112 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 113 If you don't want to read the FINE PRINT, default all of the following 113 variables. 113 113 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 113 + Normally, PDE2D saves the values of $$1,A1,$$2,A2,$$3,A3 at the + 113 + output points. If different variables are to be saved (for later + 113 + printing or plotting) the following functions can be used to + 113 + re-define the output variables: + 113 + define UPRINT(1) to replace $$1 + 113 + APRINT(1) A1 + 113 + UPRINT(2) $$2 + 113 + APRINT(2) A2 + 113 + UPRINT(3) $$3 + 113 + APRINT(3) A3 + 113 + Each function may be a function of + 113 + + 113 + X,$$1,$$1x,A1,$$2,$$2x,A2,$$3,$$3x,A3 and (if applicable) T + 113 + + 113 + Each may also be a function of the initial triangle number KTRI and + 113 + the integral estimates SINT(1),...,BINT(1),... + 113 + + 113 + The default for each variable is no change, for example, UPRINT(1) + 113 + defaults to $$1. Enter FORTRAN expressions for each of the + 113 + following functions (or default). + 113 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 114 If you don't want to read the FINE PRINT, default all of the following 114 variables. 114 114 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 114 + Normally, PDE2D saves the values of $$1,A1,$$2,A2,$$3,A3,$$4,A4... + 114 + at the output points. If different variables are to be saved (for + 114 + later printing or plotting) the following functions can be used to + 114 + re-define the output variables: + 114 + define UPRINT(1) to replace $$1 + 114 + APRINT(1) A1 + 114 + UPRINT(2) $$2 + 114 + APRINT(2) A2 + 114 + UPRINT(3) $$3 + 114 + APRINT(3) A3 + 114 + UPRINT(4) $$4 + 114 + APRINT(4) A4 + 114 + . . + 114 + . . + 114 + Each function may be a function of + 114 + + 114 + X,$$1,$$1x,A1,$$2,$$2x,A2, + 114 + $$3,$$3x,A3,$$4,$$4x,A4... and (if applicable) T + 114 + + 114 + Each may also be a function of the initial triangle number KTRI and + 114 + the integral estimates SINT(1),...,BINT(1),... + 114 + + 114 + The default for each variable is no change, for example, UPRINT(1) + 114 + defaults to $$1. Enter FORTRAN expressions for each of the + 114 + following functions (or default). + 114 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 115 The solution is saved on a uniform grid of NX+1 points 115 XA + I*(XB-XA)/NX 115 I=0,...,NX. Enter a value for NX (suggested value = 50). 115 115 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 115 + If you want to save the solution at an arbitrary user-specified set + 115 + of NX+1 points, enter -NX. + 115 + + 115 + If you set NEAR8Z=1 in the main program, the values saved at each + 115 + output point will actually be the solution as evaluated at a nearby + 115 + collocation or integration point. For most problems this obviously + 115 + will produce less accurate output or plots, but for certain (rare) + 115 + problems, a solution component may be much less noisy when plotted + 115 + only at collocation or integration points. + 115 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 115F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115F$ NX needs to be fairly large, since the function DOLDSOL1 interpolates$ 115F$ between points on the output grid. $ 115F$ enter: 200 $ 115F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115N$ enter: 50 $ 115N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 115O$ enter: 50 $ 115O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 116 Enter a block of FORTRAN statements to define the NX+1 output points: 116 XOUT8Z(I), I=0,...,NX 116 If these points are not monotone increasing, your output plots may not 116 work correctly, but tabular output will still work. 117 The solution is saved on a uniform grid of NX+1 points, covering the 117 interval (XA,XB). Enter values for XA,XB. These variables are usually 117 defaulted. 117 117 The defaults are XA = XGRID(1), XB = XGRID(NXGRID) 117 117F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 117F$ press [RETURN] to default XA,XB $ 117F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 117N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 117N$ press [RETURN] to default XA,XB $ 117N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 117O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 117O$ enter: XA = 0 $ 117O$ XB = 2 $ 117O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 118 To generate tabular or graphical output, choose an output option from 118 the list below. 118 118 0. No further output is desired 118 1. Table of values at output points 118 The tabulated output is saved in a file. 118 2. One dimensional cross-sectional plots (versus X or T) 118 or, if applicable: 118 3. Surface plot of variable as function of X and T 118 118 Enter 0,1,2 or 3 to select an output option. 118 118 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 118 + If you decide later that you want additional types of plots not + 118 + requested during this interactive session, you will have to work + 118 + through a new interactive session, so it is recommended that you + 118 + request all output or plots you think you MIGHT eventually want now, + 118 + during this session. + 118 + + 118 + Regardless of the options you select, a dummy subroutine POSTPR + 118 + will be included in the program created by the interactive driver; + 118 + you can add your own postprocessing code to this subroutine. + 118 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 118F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 118F$ enter: 2, the first time you see this message and $ 118F$ 0, the second time $ 118F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 118N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 118N$ enter: 3, the first time you see this message and $ 118N$ 0, the second time $ 118N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 118O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 118O$ enter: 2, the first time you see this message and $ 118O$ 0, the second time $ 118O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 119 Enter a value for IVAR, to select the variable to be plotted or 119 printed: 119 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 119 2 A 119N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 119N$ We want to plot H, so $ 119N$ enter: IVAR = 1 $ 119N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 120 Enter a value for IVAR, to select the variable to be plotted or 120 printed: 120 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 120 2 A1 120 3 $$2 120 4 A2 121 Enter a value for IVAR, to select the variable to be plotted or 121 printed: 121 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 121 2 A1 121 3 $$2 121 4 A2 121 5 $$3 121 6 A3 122 Enter a value for IVAR, to select the variable to be plotted or 122 printed: 122 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 122 2 A1 122 3 $$2 122 4 A2 122 5 $$3 122 6 A3 122 7 $$4 122 8 A4 122 . . 122 . . 123 If you don't want to read the FINE PRINT, default ISET1,ISET2,ISINC. 123 123 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 123 + The tabular output or plots will be made at times: + 123 + T(K) = T0 + K*(TF-T0)/NSAVE + 123 + for K = ISET1, ISET1+ISINC, ISET1+2*ISINC,..., ISET2 + 123 + Enter values for ISET1, ISET2 and ISINC. + 123 + + 123 + The default is ISET1=0, ISET2=NSAVE, ISINC=1, that is, the tabular + 123 + output or plots will be made at all time values for which the + 123 + solution has been saved. + 123 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 123F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 123F$ enter: ISINC=10 and default ISET1,ISET2 $ 123F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 123D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 123D$ Press [RETURN] to default ISET1,ISET2,ISINC. $ 123D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 123J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 123J$ To get plots at T=0, 0.2, 0.4 and 0.6, $ 123J$ Enter: ISET1=0, ISET2=NSAVE, ISINC=10 $ 123J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 124 Which type of cross-sectional plots do you want? 124 124 1. Plots of output variable as function of X (constant [T]) 124 or, if applicable: 124 2. Plots of output variable as function of T (constant X) 124 124 Enter 1 or 2 to select a plot type. 124F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 124F$ enter: 1 $ 124F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 124O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 124O$ enter: 1 $ 124O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 125 One-dimensional plots of the output variable as a function of T 125 will be made, at the output grid points X closest to 125 XCROSS(I), I=1,...,NXVALS 125 125 Enter values for NXVALS, XCROSS(1),...,XCROSS(NXVALS), 126 Specify the range (UMIN,UMAX) for the dependent variable axis. UMIN 126 and UMAX are often defaulted. 126 126 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 126 + By default, each plot will be scaled to just fit in the plot area. + 126 + For a common scaling, you may want to set UMIN=ALOW, UMAX=AHIGH. + 126 + ALOW and AHIGH are the minimum and maximum values over all output + 126 + points and over all saved time steps or iterations. + 126 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 126A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 126A$ press [RETURN] to default UMIN and UMAX $ 126A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 126C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 126C$ press [RETURN] to default UMIN and UMAX $ 126C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 126F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 126F$ enter: UMIN = 0.0 $ 126F$ UMAX = 120.0 $ 126F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 126G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 126G$ press [RETURN] to default UMIN and UMAX $ 126G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 126J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 126J$ enter: UMIN = ALOW $ 126J$ UMAX = AHIGH $ 126J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 126L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 126L$ enter: UMIN = ALOW $ 126L$ UMAX = AHIGH $ 126L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 126O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 126O$ press [RETURN] to default UMIN and UMAX $ 126O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 127 Enter the view latitude, VLAT, and the view longitude, VLON, desired 127 for this plot, in degrees. VLAT and VLON must be between 10 and 80 127 degrees; each defaults to 45 degrees. VLAT and VLON are usually 127 defaulted. 127A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 127A$ press [RETURN] to default VLAT and VLON $ 127A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 127C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 127C$ press [RETURN] to default VLAT and VLON $ 127C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 127J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 127J$ press [RETURN] to default VLAT and VLON $ 127J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 127L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 127L$ press [RETURN] to default VLAT and VLON $ 127L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 127N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 127N$ press [RETURN] to default VLAT and VLON $ 127N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128 If you don't want to read the FINE PRINT, enter 'no'. 128 128 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 128 + Do you want to define any FORTRAN function subprograms used in any + 128 + of the FORTRAN 'expressions' entered earlier, by interpolating the + 128 + tabular output saved in a file created on an earlier PDE2D run? + 128 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 128A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128A$ enter: no $ 128A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128B$ enter: no $ 128B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128C$ enter: no $ 128C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128D$ enter: no $ 128D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128E$ enter: yes $ 128E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128F$ enter: no $ 128F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128G$ enter: no $ 128G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128H$ enter: no $ 128H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128I$ enter: no $ 128I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128J$ enter: no $ 128J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128K$ enter: no $ 128K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128L$ enter: no $ 128L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128M$ enter: no $ 128M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128N$ enter: no $ 128N$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 14 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 128O$ enter: no $ 128O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 129 Enter the name of the FORTRAN function subprogram, in columns 1-6. It 129 must be a function of X only, but do not enter the '(X)'. 130 If you don't want to read the FINE PRINT, enter NWORK = 2000. 130 130 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 130 + Enter a dimension, NWORK, for the workarray, WORK, which is used to + 130 + store the tabulated values, for interpolation on later calls. NWORK + 130 + must be at least NX+4, where NX is the output grid parameter used by + 130 + the program which generated the tabulated values. + 130 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 131 Enter, WITHOUT quotation marks, the name (FNAME) of the file which 131 contains the tabulated values to be read and interpolated. 132 Enter the number, ISET, of the set in this file which contains the 132 tabulated values to be read and interpolated. A 'set' is a block of 132 output following a line containing 'T = ...'. The default is ISET=1. 132E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 132E$ The tabular output file contains the temperature profile at six $ 132E$ time points, T=0,2,4,6,8,10; we want to read the profile at T=10, so $ 132E$ enter: ISET = 6 $ 132E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 133 Enter the desired degree, KDEG=1,2 or 3, of the interpolation between 133 gridpoints. Set KDEG=2 or 3 only if the tabulated function is smooth. 133 133 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 133 + The tabulated values are read from file FNAME into the workarray the + 133 + first time the function is called, and on this and subsequent calls, + 133 + interpolation is done to compute the function value. + 133 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 133E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 133E$ enter: KDEG = 3 $ 133E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 134 Do you want to define any more functions, by interpolating tabular 134 output created by a previous PDE2D run? 134E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 134E$ enter: no $ 134E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 135 PDE2D solves the time-dependent system (note: U,F,G,U0 may be vectors, 135 C,RHO may be matrices): 135 135 C(X,T,U,Ux)*d(U)/dT = F(X,T,U,Ux,Uxx) 135 135 or the steady-state system: 135 135 F(X,U,Ux,Uxx) = 0 135 135 or the linear and homogeneous eigenvalue system: 135 135 F(X,U,Ux,Uxx) = lambda*RHO(X)*U 135 135 with boundary conditions: 135 135 G(X,[T],U,Ux) = 0 135 (periodic boundary conditions are also permitted) 135 135 at two X values. 135 135 For time-dependent problems there are also initial conditions: 135 135 U = U0(X) at T=T0 135 135 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 135 + If your PDEs involve the solution at points other than X, the + 135 + function + 135 + (D)OLDSOL1(IDER,IEQ,XX,KDEG) + 135 + will interpolate (using interpolation of degree KDEG=1,2 or 3) to XX + 135 + the function saved in UOUT(*,IDER,IEQ,ISET) on the last time step or + 135 + iteration (ISET) for which it has been saved. Thus, for example, if + 135 + IDER=1, this will return the latest value of component IEQ of the + 135 + solution at XX, assuming this has not been modified using UPRINT... + 135 + If your equations involve integrals of the solution, for example, + 135 + you can use (D)OLDSOL1 to approximate these using the solution from + 135 + the last time step or iteration. + 135 + + 135 + CAUTION: For a steady-state or eigenvalue problem, you must reset + 135 + NOUT=1 if you want to save the solution each iteration. + 135 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 135 + A system of NEQN complex partial differential equations must be + 135 + written as a system of 2*NEQN real equations, by separating the + 135 + equations into their real and imaginary parts. However, note that + 135 + the complex arithmetic abilities of FORTRAN can be used to simplify + 135 + this separation. For example, the complex PDE: + 135 + I*Uxx - 1/(1+U**10) = 0, where U = UR + UI*I + 135 + would be difficult to split up analytically, but using FORTRAN + 135 + expressions it is easy: + 135 + F1 = -UIxx - REAL(1.0/(1.0+CMPLX(UR,UI)**10)) + 135 + F2 = URxx - AIMAG(1.0/(1.0+CMPLX(UR,UI)**10)) + 135 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 135 You may now define global parameters, which may be referenced in any 135 of the "FORTRAN expressions" you input throughout the rest of this 135 interactive session. You will be prompted alternately for parameter 135 names and their values; enter a blank name when you are finished. 135 135 Parameter names are valid FORTRAN variable names, starting in 135 column 1. Thus each name consists of 1 to 6 alphanumeric characters, 135 the first of which must be a letter. If the first letter is in the 135 range I-N, the parameter must be an integer. 135 135 Parameter values are either FORTRAN constants or FORTRAN expressions 135 involving only constants and global parameters defined on earlier 135 lines. They may also be functions of the problem number IPROB, if 135 you are solving several similar problems in one run (NPROB > 1). Note 135 that you are defining global CONSTANTS, not functions; e.g., parameter 135 values may not reference any of the independent or dependent variables 135 of your problem. 135 135 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 135 + If you define other parameters here later, using an editor, you must + 135 + add them to COMMON block /PARM8Z/ everywhere this block appears, if + 135 + they are to be "global" parameters. + 135 + + 135 + The variable PI is already included as a global parameter, with an + 135 + accurate value 3.14159... + 135 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 135F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 135F$ enter: Sigma $ 135F$ 0.15 $ 135F$ R $ 135F$ 0.05 $ 135F$ Rlam $ 135F$ 5 $ 135F$ Smax $ 135F$ 200 $ 135F$ Tfinal $ 135F$ 1.0 $ 135F$ Rk $ 135F$ 0 $ 135F$ E $ 135F$ 100 $ 135F$ [blank line] $ 135F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 135O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 135O$ enter: C1 $ 135O$ 3.7796 $ 135O$ C2 $ 135O$ -0.26248 $ 135O$ [blank line] $ 135O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 136 A collocation finite element method is used, with cubic Hermite 136 basis functions on the subintervals defined by the grid points: 136 XGRID(1),XGRID(2),...,XGRID(NXGRID) 136 You will first be prompted for NXGRID, the number of X-grid points, 136 then for XGRID(1),...,XGRID(NXGRID). Any points defaulted will be 136 uniformly spaced between the points you define; the first and last 136 points cannot be defaulted. The interval over which the PDE system 136 is to be solved is then: 136 XGRID(1) < X < XGRID(NXGRID) 136 136F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 136F$ enter: NXGRID = 51 $ 136F$ XGRID(1) = 0 $ 136F$ XGRID(26) = E $ 136F$ XGRID(NXGRID) = Smax $ 136F$ and default the other XGRID points. $ 136F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 136O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 136O$ enter: NXGRID = 21 $ 136O$ XGRID(1) = 0 $ 136O$ XGRID(6) = 0.5 $ 136O$ XGRID(11) = 1.0 $ 136O$ XGRID(16) = 3.0 $ 136O$ XGRID(NXGRID) = 10.0 $ 136O$ and default the other XGRID points. $ 136O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 137 You may now choose names for the component(s) of the (possibly vector) 137 solution U. Each must be an alphanumeric string of one to three 137 characters, beginning with a letter in the range A-H or O-Z. The 137 variable names X and T must not be used. The name should start in 137 column 1. 137F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 137F$ enter: U1 = V $ 137F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 137O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 137O$ enter: U1 = U $ 137O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 138 Enter FORTRAN expressions for the functions whose integrals are to be 138 calculated and printed. They may be functions of 138 138 X,$$1,$$1x,$$1xx and (if applicable) T 138 138 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 138 + If you only want to integrate a function over part of the interval, + 138 + define that function to be zero on the rest of the interval. + 138 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 138O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 138O$ We want to compute the integral of U**2 over the entire 3D space, $ 138O$ which will be used later in normalizing the probability density for $ 138O$ plotting. The integral over the entire 3D space can be calculated $ 138O$ as the integral from X=0 to X=infinity of 4*PI*X**2*U**2, where X is $ 138O$ the spherical coordinate Rho. Thus, $ 138O$ enter: INTEGRAL = 4*PI*X**2*U**2 $ 138O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 139 Enter FORTRAN expressions for the functions whose integrals are to be 139 calculated and printed. They may be functions of 139 139 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx and (if applicable) T 139 139 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 139 + If you only want to integrate a function over part of the interval, + 139 + define that function to be zero on the rest of the interval. + 139 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 140 Enter FORTRAN expressions for the functions whose integrals are to be 140 calculated and printed. They may be functions of 140 140 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx and (if applicable) T 140 140 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 140 + If you only want to integrate a function over part of the interval, + 140 + define that function to be zero on the rest of the interval. + 140 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 141 Enter FORTRAN expressions for the functions whose integrals are to be 141 calculated and printed. They may be functions of 141 141 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx,$$4,$$4x,$$4xx ... 141 and (if applicable) T 141 141 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 141 + If you only want to integrate a function over part of the interval, + 141 + define that function to be zero on the rest of the interval. + 141 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 142 Enter FORTRAN expressions for the functions whose "integrals" (sum 142 over two boundary points) are to be calculated and printed. They may 142 be functions of 142 142 X,$$1,$$1x,$$1xx and (if applicable) T 142 142 The unit outward normal, NORMx (=1 at right endpoint, -1 at left), 142 may also be referenced. 142 142 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 142 + If you only want to "integrate" a function over one boundary point, + 142 + define that function to be zero at the other point. + 142 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 143 Enter FORTRAN expressions for the functions whose "integrals" (sum 143 over two boundary points) are to be calculated and printed. They may 143 be functions of 143 143 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx and (if applicable) T 143 143 The unit outward normal, NORMx (=1 at right endpoint, -1 at left), 143 may also be referenced. 143 143 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 143 + If you only want to "integrate" a function over one boundary point, + 143 + define that function to be zero at the other point. + 143 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 144 Enter FORTRAN expressions for the functions whose "integrals" (sum 144 over two boundary points) are to be calculated and printed. They may 144 be functions of 144 144 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx and (if applicable) T 144 144 The unit outward normal, NORMx (=1 at right endpoint, -1 at left), 144 may also be referenced. 144 144 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 144 + If you only want to "integrate" a function over one boundary point, + 144 + define that function to be zero at the other point. + 144 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 145 Enter FORTRAN expressions for the functions whose "integrals" (sum 145 over two boundary points) are to be calculated and printed. They may 145 be functions of 145 145 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx,$$4,$$4x,$$4xx ... 145 and (if applicable) T 145 145 The unit outward normal, NORMx (=1 at right endpoint, -1 at left), 145 may also be referenced. 145 145 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 145 + If you only want to "integrate" a function over one boundary point, + 145 + define that function to be zero at the other point. + 145 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 146 Now enter FORTRAN expressions to define the PDE coefficients. 146 RHO may be a function of X, while F may be a function of 146 146 X,$$1,$$1x,$$1xx 146 146 Recall that the PDE has the form 146 146 F = lambda*RHO*$$1 146 146O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 146O$ The differential equation is $ 146O$ $ 146O$ Uxx + 2/x*Ux + C1/x*U = lambda*C2*U $ 146O$ $ 146O$ When asked if you want to write a FORTRAN block, $ 146O$ enter: no $ 146O$ then enter the following, when prompted: $ 146O$ F = Uxx + 2/x*Ux + C1/x*U RHO = C2 $ 146O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 147 Now enter FORTRAN expressions to define the PDE coefficients. 147 RHO11,RHO12,RHO21,RHO22 may be functions of X, while F1,F2 147 may be functions of 147 147 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx 147 147 Recall that the PDEs have the form 147 147 F1 = lambda*(RHO11*$$1 + RHO12*$$2) 147 F2 = lambda*(RHO21*$$1 + RHO22*$$2) 147 148 Now enter FORTRAN expressions to define the PDE coefficients. 148 RHO11,RHO12,RHO13,RHO21,RHO22,RHO23,RHO31,RHO32,RHO33 may be 148 functions of X, while F1,F2,F3 may be functions of 148 148 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx 148 148 Recall that the PDEs have the form 148 148 F1 = lambda*(RHO11*$$1 + RHO12*$$2 + RHO13*$$3) 148 F2 = lambda*(RHO21*$$1 + RHO22*$$2 + RHO23*$$3) 148 F3 = lambda*(RHO31*$$1 + RHO32*$$2 + RHO33*$$3) 148 149 Now enter FORTRAN expressions to define the PDE coefficients. The 149 RHOIJ may be functions of X, while F1,F2,F3,F4,... may be 149 functions of 149 149 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx,$$4,$$4x,$$4xx,... 149 149 Recall that the PDEs have the form 149 149 F1 = lambda*(RHO11*$$1 + RHO12*$$2 + RHO13*$$3 + RHO14*$$4...) 149 F2 = lambda*(RHO21*$$1 + RHO22*$$2 + RHO23*$$3 + RHO24*$$4...) 149 F3 = lambda*(RHO31*$$1 + RHO32*$$2 + RHO33*$$3 + RHO34*$$4...) 149 F4 = lambda*(RHO41*$$1 + RHO42*$$2 + RHO43*$$3 + RHO44*$$4...) 149 . . 149 150 Now enter FORTRAN expressions to define the PDE coefficients, which 150 may be functions of 150 150 X,$$1,$$1x,$$1xx 150 150 and, in some cases, of the parameter T. 150 150 Recall that the PDE has the form 150 150 F = 0 150 151 Now enter FORTRAN expressions to define the PDE coefficients, which 151 may be functions of 151 151 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx 151 151 and, in some cases, of the parameter T. 151 151 Recall that the PDEs have the form 151 151 F1 = 0 151 F2 = 0 151 152 Now enter FORTRAN expressions to define the PDE coefficients, which 152 may be functions of 152 152 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx 152 152 and, in some cases, of the parameter T. 152 152 Recall that the PDEs have the form 152 152 F1 = 0 152 F2 = 0 152 F3 = 0 152 153 Now enter FORTRAN expressions to define the PDE coefficients, which 153 may be functions of 153 153 X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx,$$4,$$4x,$$4xx,... 153 153 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 F3 = 0 153 F4 = 0 153 . . 153 154 Now enter FORTRAN expressions to define the PDE coefficients, which 154 may be functions of 154 154 X,T,$$1,$$1x,$$1xx 154 154 Recall that the PDE has the form 154 154 C*d($$1)/dT = F 154 154F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 154F$ The differential equation is $ 154F$ $ 154F$ -Vt = 0.5*Sigma**2*x**2*Vxx+(R-Rlam*Rk)*x*Vx-(Rlam+R)*V + Rlam*AINT $ 154F$ $ 154F$ where AINT is the integral from y=0 to y=2 (g(y) is almost 0 outside $ 154F$ this range) of V(x*y,t)*g(y)dy. $ 154F$ $ 154F$ The midpoint rule is used to approximate this integral, using 200 $ 154F$ subintervals. We use the function DOLDSOL1(1,1,X*Y,2) to return $ 154F$ V(X*Y,t_n) at the last saved time value t_n, using quadratic $ 154F$ interpolation. $ 154F$ $ 154F$ Note that since y may be greater than 1, X*Y may be greater than $ 154F$ Smax, in which case we have to extrapolate a value for V beyond the $ 154F$ right boundary using the fact that dV/dx = 1 at x = Smax. $ 154F$ $ 154F$ When asked if you want to write a FORTRAN block, $ 154F$ enter: yes $ 154F$ then, when prompted, enter: $ 154F$ VAR = 0.09 $ 154F$ YB = 2.0 $ 154F$ NY = 200 $ 154F$ HY = YB/NY $ 154F$ AINT = 0.0 $ 154F$ DO 10 K=1,NY $ 154F$ Y = (K-0.5)*HY $ 154F$ GY = EXP(-(Y-1.0)**2/(2*VAR))/SQRT(2*PI*VAR) $ 154F$ IF (X*Y.LE.Smax) THEN $ 154F$ VXY = DOLDSOL1(1,1,X*Y,2) $ 154F$ ELSE $ 154F$ VXY = DOLDSOL1(1,1,Smax,2) + (X*Y-Smax) $ 154F$ ENDIF $ 154F$ AINT = AINT + VXY*GY*HY $ 154F$ 10 CONTINUE $ 154F$ [blank line] $ 154F$ then, when prompted, enter: $ 154F$ C = -1 $ 154F$ F = 0.5*Sigma**2*x**2*Vxx+(R-Rlam*Rk)*x*Vx-(Rlam+R)*V + Rlam*AINT $ 154F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 155 Now enter FORTRAN expressions to define the PDE coefficients, which 155 may be functions of 155 155 X,T,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx 155 155 Recall that the PDEs have the form 155 155 C11*d($$1)/dT + C12*d($$2)/dT = F1 155 C21*d($$1)/dT + C22*d($$2)/dT = F2 155 156 Now enter FORTRAN expressions to define the PDE coefficients, which 156 may be functions of 156 156 X,T,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx 156 156 Recall that the PDEs have the form 156 156 C11*d($$1)/dT + C12*d($$2)/dT + C13*d($$3)/dT = F1 156 C21*d($$1)/dT + C22*d($$2)/dT + C23*d($$3)/dT = F2 156 C31*d($$1)/dT + C32*d($$2)/dT + C33*d($$3)/dT = F3 156 157 Now enter FORTRAN expressions to define the PDE coefficients, which 157 may be functions of 157 157 X,T,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx,$$4,$$4x,$$4xx,... 157 157 Recall that the PDEs have the form 157 157 C11*d($$1)/dT + C12*d($$2)/dT + C13*d($$3)/dT + C14*d($$4)/dT +...= F1 157 C21*d($$1)/dT + C22*d($$2)/dT + C23*d($$3)/dT + C24*d($$4)/dT +...= F2 157 C31*d($$1)/dT + C32*d($$2)/dT + C33*d($$3)/dT + C34*d($$4)/dT +...= F3 157 C41*d($$1)/dT + C42*d($$2)/dT + C43*d($$3)/dT + C44*d($$4)/dT +...= F4 157 . . . . 157 158 If you don't want to read the FINE PRINT, enter 'no'. 158 158 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 158 + Normally, interpolation is done to approximate the initial values + 158 + using cubic Hermites. Since some derivatives must be interpolated, + 158 + if the initial values are not smooth (ie, have large or infinite + 158 + derivatives), the resulting cubic interpolants may have undesired + 158 + noise or large spikes. Do you want to compute a least squares + 158 + approximation to the initial values, rather than an interpolant? + 158 + The least squares fit is generally much smoother, but requires one + 158 + extra linear system solution. + 158 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 158F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 158F$ enter: no $ 158F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 158J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 158J$ enter: yes $ 158J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 159 If you do not have periodic boundary conditions, enter IPERDC=0. 159 159 Enter IPERDC=1 for periodic conditions at X = XGRID(1),XGRID(NXGRID) 159 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 159 + When periodic boundary conditions are selected, they apply to all + 159 + variables by default. To turn off periodic boundary conditions on + 159 + the I-th variable, set PERDC(I) to 0 below in the main program and + 159 + set the desired boundary conditions in subroutine GB8Z, "by hand". + 159 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 159F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 159F$ enter: IPERDC = 0 $ 159F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 159O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 159O$ enter: IPERDC = 0 $ 159O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 160 Enter FORTRAN expressions to define the boundary condition functions, 160 which may be functions of 160 160 X,$$1,$$1x and (if applicable) T 160 160 Recall that the boundary conditions have the form 160 160 G = 0 160 160 Enter NONE to indicate "no" boundary condition. 160 160 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 160 + If "no" boundary condition is specified, the PDE is enforced at a + 160 + point just inside the boundary (exactly on the boundary, if EPS8Z + 160 + is set to 0 in the main program). + 160 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 161 Enter FORTRAN expressions to define the boundary condition functions, 161 which may be functions of 161 161 X,$$1,$$1x,$$2,$$2x and (if applicable) T 161 161 Recall that the boundary conditions have the form 161 161 G1 = 0 161 G2 = 0 161 161 Enter NONE to indicate "no" boundary condition. 161 161 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 161 + If "no" boundary condition is specified, the corresponding PDE is + 161 + enforced at a point just inside the boundary (exactly on the + 161 + boundary, if EPS8Z is set to 0 in the main program). + 161 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 162 Enter FORTRAN expressions to define the boundary condition functions, 162 which may be functions of 162 162 X,$$1,$$1x,$$2,$$2x,$$3,$$3x and (if applicable) T 162 162 Recall that the boundary conditions have the form 162 162 G1 = 0 162 G2 = 0 162 G3 = 0 162 162 Enter NONE to indicate "no" boundary condition. 162 162 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 162 + If "no" boundary condition is specified, the corresponding PDE is + 162 + enforced at a point just inside the boundary (exactly on the + 162 + boundary, if EPS8Z is set to 0 in the main program). + 162 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 163 Enter FORTRAN expressions to define the boundary condition functions, 163 which may be functions of 163 163 X,$$1,$$1x,$$2,$$2x,$$3,$$3x,$$4,$$4x,... and (if applicable) T 163 163 Recall that the boundary conditions have the form 163 163 G1 = 0 163 G2 = 0 163 G3 = 0 163 G4 = 0 163 . . 163 Enter NONE to indicate "no" boundary condition. 163 163 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 163 + If "no" boundary condition is specified, the corresponding PDE is + 163 + enforced at a point just inside the boundary (exactly on the + 163 + boundary, if EPS8Z is set to 0 in the main program). + 163 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 164 164 First define the boundary conditions at the point X = XGRID(1). 164F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 164F$ enter: G = V $ 164F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 164O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 164O$ enter: G = NONE $ 164O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 165 165 Now define the boundary conditions at the point X = XGRID(NXGRID). 165F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 165F$ enter: G = Vx-1.0 $ 165F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 165O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 165O$ enter: G = U $ 165O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 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,$$1x at the output points. + 166 + If different variables are to be saved (for later printing or + 166 + plotting) the following functions can be used to re-define the + 166 + output variables: + 166 + define UPRINT(1) to replace $$1 + 166 + UXPRINT(1) $$1x + 166 + Each function may be a function of + 166 + + 166 + X,$$1,$$1x,$$1xx and (if applicable) T + 166 + + 166 + Each may also be a function of the integral estimates SINT(1),..., + 166 + BINT(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" +++++++++++++++++++++++++ 166F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 166F$ press [RETURN] to default all output modification variables $ 166F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 166O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 166O$ We want to plot the probability density, which is proportional to $ 166O$ U**2, but normalized so that the integral of the probability density $ 166O$ is equal to 1. Since SINT(1) will contain the integral of U**2, $ 166O$ to get plots of the probability density, $ 166O$ enter: UPRINT(1) = U**2/SINT(1) $ 166O$ and default the other output modification variable $ 166O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 167 If you don't want to read the FINE PRINT, default all of the following 167 variables. 167 167 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 167 + Normally, PDE2D saves the values of $$1,$$1x,$$2,$$2x at the output + 167 + points. If different variables are to be saved (for later printing + 167 + or plotting) the following functions can be used to re-define the + 167 + output variables: + 167 + define UPRINT(1) to replace $$1 + 167 + UXPRINT(1) $$1x + 167 + UPRINT(2) $$2 + 167 + UXPRINT(2) $$2x + 167 + Each function may be a function of + 167 + + 167 + X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx and (if applicable) T + 167 + + 167 + Each may also be a function of the integral estimates SINT(1),..., + 167 + BINT(1),... + 167 + + 167 + The default for each variable is no change, for example, UPRINT(1) + 167 + defaults to $$1. Enter FORTRAN expressions for each of the + 167 + following functions (or default). + 167 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 168 If you don't want to read the FINE PRINT, default all of the following 168 variables. 168 168 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 168 + Normally, PDE2D saves the values of $$1,$$1x,$$2,$$2x,$$3,$$3x at + 168 + the output points. If different variables are to be saved (for + 168 + later printing or plotting) the following functions can be used to + 168 + re-define the output variables: + 168 + define UPRINT(1) to replace $$1 + 168 + UXPRINT(1) $$1x + 168 + UPRINT(2) $$2 + 168 + UXPRINT(2) $$2x + 168 + UPRINT(3) $$3 + 168 + UXPRINT(3) $$3x + 168 + Each function may be a function of + 168 + + 168 + X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx and (if applicable) T + 168 + + 168 + Each may also be a function of the integral estimates SINT(1),..., + 168 + BINT(1),... + 168 + + 168 + The default for each variable is no change, for example, UPRINT(1) + 168 + defaults to $$1. Enter FORTRAN expressions for each of the + 168 + following functions (or default). + 168 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 169 If you don't want to read the FINE PRINT, default all of the following 169 variables. 169 169 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 169 + Normally, PDE2D saves the values of $$1,$$1x,$$2,$$2x,$$3,$$3x,$$4, + 169 + $$4x...at the output points. If different variables are to be saved + 169 + (for later printing or plotting) the following functions can be used + 169 + to re-define the output variables: + 169 + define UPRINT(1) to replace $$1 + 169 + UXPRINT(1) $$1x + 169 + UPRINT(2) $$2 + 169 + UXPRINT(2) $$2x + 169 + UPRINT(3) $$3 + 169 + UXPRINT(3) $$3x + 169 + UPRINT(4) $$4 + 169 + UXPRINT(4) $$4x + 169 + . . + 169 + . . + 169 + Each function may be a function of + 169 + + 169 + X,$$1,$$1x,$$1xx,$$2,$$2x,$$2xx,$$3,$$3x,$$3xx,$$4,$$4x,$$4xx,... + 169 + and (if applicable) T + 169 + + 169 + Each may also be a function of the integral estimates SINT(1),..., + 169 + BINT(1),... + 169 + + 169 + The default for each variable is no change, for example, UPRINT(1) + 169 + defaults to $$1. Enter FORTRAN expressions for each of the + 169 + following functions (or default). + 169 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 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 $$1x 170F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 170F$ enter: IVAR = 1 $ 170F$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 6 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 170O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 170O$ enter: IVAR = 1 $ 170O$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 15 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 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 $$1x 171 3 $$2 171 4 $$2x 172 Enter a value for IVAR, to select the variable to be plotted or 172 printed: 172 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 172 2 $$1x 172 3 $$2 172 4 $$2x 172 5 $$3 172 6 $$3x 173 Enter a value for IVAR, to select the variable to be plotted or 173 printed: 173 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 173 2 $$1x 173 3 $$2 173 4 $$2x 173 5 $$3 173 6 $$3x 173 7 $$4 173 8 $$4x 173 . . 173 . . 174 PDE2D solves the time-dependent system (note: U,A,B,F,FB,GB,U0 may be 174 vectors, C,RHO may be matrices): 174 174 C(X,Y,T,U,Ux,Uy)*d(U)/dT = d/dX* A(X,Y,T,U,Ux,Uy) 174 + d/dY* B(X,Y,T,U,Ux,Uy) 174 - F(X,Y,T,U,Ux,Uy) 174 174 or the steady-state system: 174 174 d/dX* A(X,Y,U,Ux,Uy) 174 + d/dY* B(X,Y,U,Ux,Uy) 174 = F(X,Y,U,Ux,Uy) 174 174 or the linear and homogeneous eigenvalue system: 174 174 d/dX* A(X,Y,U,Ux,Uy) 174 + d/dY* B(X,Y,U,Ux,Uy) 174 = F(X,Y,U,Ux,Uy) + lambda*RHO(X,Y)*U 174 174 in an arbitrary two-dimensional region, R, with 'fixed' boundary 174 conditions on part of the boundary: 174 174 U = FB(X,Y,[T]) 174 174 and 'free' boundary conditions on the other part: 174 174 A*nx + B*ny = GB(X,Y,[T],U,Ux,Uy) 174 174 For time-dependent problems there are also initial conditions: 174 174 U = U0(X,Y) at T=T0 174 174 Here Ux,Uy represent the (vector) functions dU/dX,dU/dY, and (nx,ny) 174 represents the unit outward normal to the boundary. 174 174 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 174 + If your PDEs involve the solution at points other than (X,Y), the + 174 + function + 174 + (D)OLDSOL2(IDER,IEQ,XX,YY,KDEG) + 174 + will interpolate (using interpolation of degree KDEG=1,2 or 3) to + 174 + (XX,YY) the function saved in UOUT(*,*,IDER,IEQ,ISET) on the last + 174 + time step or iteration (ISET) for which it has been saved. Thus, + 174 + for example, if IDER=1, this will return the latest value of + 174 + component IEQ of the solution at (XX,YY), assuming this has not been + 174 + modified using UPRINT... If your equations involve integrals of the + 174 + solution, for example, you can use (D)OLDSOL2 to approximate these + 174 + using the solution from the last time step or iteration. + 174 + + 174 + CAUTION: For a steady-state or eigenvalue problem, you must reset + 174 + NOUT=1 if you want to save the solution each iteration. + 174 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 174 + A system of NEQN complex partial differential equations must be + 174 + written as a system of 2*NEQN real equations, by separating the + 174 + equations into their real and imaginary parts. However, note that + 174 + the complex arithmetic abilities of FORTRAN can be used to simplify + 174 + this separation. For example, the complex PDE: + 174 + I*(Uxx+Uyy) = 1/(1+U**10), where U = UR + UI*I + 174 + would be difficult to split up analytically, but using FORTRAN + 174 + expressions it is easy: + 174 + A1 = -UIx, B1 = -UIy, F1 = REAL(1.0/(1.0+CMPLX(UR,UI)**10)) + 174 + A2 = URx, B2 = URy, F2 = AIMAG(1.0/(1.0+CMPLX(UR,UI)**10)) + 174 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 174 You may now define global parameters, which may be referenced in any 174 of the "FORTRAN expressions" you input throughout the rest of this 174 interactive session. You will be prompted alternately for parameter 174 names and their values; enter a blank name when you are finished. 174 174 Parameter names are valid FORTRAN variable names, starting in 174 column 1. Thus each name consists of 1 to 6 alphanumeric characters, 174 the first of which must be a letter. If the first letter is in the 174 range I-N, the parameter must be an integer. 174 174 Parameter values are either FORTRAN constants or FORTRAN expressions 174 involving only constants and global parameters defined on earlier 174 lines. They may also be functions of the problem number IPROB, if 174 you are solving several similar problems in one run (NPROB > 1). Note 174 that you are defining global CONSTANTS, not functions; e.g., parameter 174 values may not reference any of the independent or dependent variables 174 of your problem. 174 174 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 174 + If you define other parameters here later, using an editor, you must + 174 + add them to COMMON block /PARM8Z/ everywhere this block appears, if + 174 + they are to be "global" parameters. + 174 + + 174 + The variable PI is already included as a global parameter, with an + 174 + accurate value 3.14159... + 174 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 174A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 174A$ press [RETURN] to skip global parameter definitions $ 174A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 174B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 174B$ enter: R0 $ 174B$ 0.05 $ 174B$ R1 $ 174B$ 1 $ 174B$ [blank line] $ 174B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 174C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 174C$ enter: D1 $ 174C$ 5 $ 174C$ D2 $ 174C$ 1 $ 174C$ [blank line] $ 174C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 174D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 174D$ enter: ZINIT $ 174D$ 300.0 $ 174D$ ZWALL $ 174D$ 400.0 $ 174D$ [blank line] $ 174D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 174E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 174E$ enter: ZINIT $ 174E$ 300.0 $ 174E$ E $ 174E$ 1.E7 $ 174E$ VNU $ 174E$ 0.3 $ 174E$ AL $ 174E$ 1.E-6 $ 174E$ [blank line] $ 174E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 174G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 174G$ enter: C $ 174G$ 2.9979 E8 $ 174G$ W $ 174G$ 2*PI*C/0.85E-6 $ 174G$ AMU $ 174G$ 12.566 E-7 $ 174G$ [blank line] $ 174G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 174H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 174H$ enter: ALPHA $ 174H$ 1.D8 $ 174H$ [blank line] $ 174H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 175 Now, the first step in creating a 2D PDE2D program is to construct 175 an initial triangulation of the region R over which the partial 175 differential equations are to be solved. This initial triangulation 175 can later be refined and graded to your specifications. 175 175 The boundary of the region R should be divided into distinct 175 (curved or straight) arcs, each of which is smooth with smooth 175 boundary conditions. Thus at every corner or point where the boundary 175 conditions have a discontinuity or change type, a new boundary arc 175 should begin. Each arc is assigned a unique integer arc number, which 175 is arbitrary except that it must be negative if 'fixed' boundary 175 conditions are specified on that arc, and positive (but < 1000) if 175 'free' boundary conditions are specified. 175 175 'Fixed' means that all unknowns are specified on that boundary 175 (Dirichlet type conditions) and 'free' refers to more general boundary 175 conditions, as defined earlier. These more general conditions include 175 specification of the boundary flux (or normal derivative in the case 175 of a Laplacian operator). 175 175 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 175 + If some, but not all, of the unknowns are specified on a boundary + 175 + arc, that arc should be considered 'free', since even 'fixed' + 175 + type conditions of the form: + 175 + Ui = FBi(X,Y,[T]) + 175 + can be expressed as 'free' boundary conditions in the form: + 175 + Ai*nx + Bi*ny = zero(Ui-FBi(X,Y,[T])) + 175 + where zero(f) = Big_Number*f is a PDE2D-supplied function. + 175 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 175 + If Ai=Bi=0 (eg, if the PDE is first order), then setting GBi=0 is + 175 + equivalent to setting "no" boundary condition (which is sometimes + 175 + appropriate for first order PDEs), because the boundary condition + 175 + Ai*nx + Bi*ny = GBi reduces to 0=0. + 175 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 175 + Note: while 'fixed' boundary conditions are enforced exactly (at the + 175 + nodes), 'free' boundary conditions are not; the greater the overall + 175 + solution accuracy, the more closely they are satisfied. + 175 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 175 175 There are 3 options for generating the initial triangulation: 175 175 1. If the region R is a rectangle with sides parallel to the X and Y 175 axes, then the initial triangulation can be generated automatically. 175 2. If the region R can be conveniently described by parametric 175 equations in the form: 175 X = X(P,Q) 175 Y = Y(P,Q) 175 where P and Q have constant limits (for example, if X=P*COS(Q), 175 Y=P*SIN(Q), P and Q will represent polar coordinates), then the 175 initial triangulation can also be generated automatically. 175 3. For more general regions, you will need to create an initial 175 triangulation by hand. 175 175 Enter INTRI = 1,2 or 3 to choose an initial triangulation option. 175A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 175A$ Since U=V=0 on the boundary, we must assign negative arc numbers $ 175A$ to the four sides--let us number them -1,-2,-3,-4 (in any order). $ 175A$ Then since the region is a square, $ 175A$ enter: INTRI = 1 $ 175A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 175B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 175B$ We can parameterize using polar coordinates, with an arc number of $ 175B$ -1 assigned to the inner boundary, +1 to the outer boundary. $ 175B$ $ 175B$ enter: INTRI = 2 $ 175B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 175C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 175C$ To the three sides where QQ=0, we assign a negative arc number (-1), $ 175C$ and to the left side, where the normal derivative is zero, we assign $ 175C$ positive arc number 1. $ 175C$ $ 175C$ enter: INTRI = 3 $ 175C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 175D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 175D$ There are five arcs: $ 175D$ $ 175D$ arc 2 $ 175D$ ++++++++++++++++++++++++++- $ 175D$ + - $ 175D$ arc 2 + - $ 175D$ + - $ 175D$ + - $ 175D$ + - $ 175D$ arc 3 + - arc -1 $ 175D$ + - $ 175D$ + - $ 175D$ + - $ 175D$ + - $ 175D$ ++++++++++++++++++++++++++++++- $ 175D$ arc 2 $ 175D$ $ 175D$ enter: INTRI = 3 $ 175D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 175E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 175E$ There are five arcs. On the line of symmetry, the boundary $ 175E$ conditions are mixed, so a positive arc number (3) is used. $ 175E$ $ 175E$ arc 2 $ 175E$ ++++++++++++++++++++++++++- $ 175E$ + - $ 175E$ arc 2 + - $ 175E$ + - $ 175E$ + - $ 175E$ + - $ 175E$ arc 3 + - arc -1 $ 175E$ + - $ 175E$ + - $ 175E$ + - $ 175E$ + - $ 175E$ ++++++++++++++++++++++++++++++- $ 175E$ arc 2 $ 175E$ $ 175E$ enter: INTRI = 3 $ 175E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 175G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 175G$ Since the boundary conditions are mixed, and the same on all arcs, $ 175G$ we assign a positive number (1) to each arc, and since the region $ 175G$ is a square, $ 175G$ enter: INTRI = 1 $ 175G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 175H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 175H$ The inlet and outlet boundary arcs can be assigned arc numbers -1 $ 175H$ and 1, respectively, the circular arc is -3, and the remaining two $ 175H$ arcs can be given the number -2. $ 175H$ $ 175H$ arc -1 $ 175H$ ------------- $ 175H$ - - $ 175H$ - - $ 175H$ - - $ 175H$ - - $ 175H$ - - $ 175H$ - - arc -2 $ 175H$ - - $ 175H$ - - $ 175H$ - - $ 175H$ - - $ 175H$ - - $ 175H$ - --------------------- $ 175H$ - + $ 175H$ - + $ 175H$ - + arc 1 $ 175H$ - + $ 175H$ - + $ 175H$ arc -3 - - $ 175H$ - - $ 175H$ - - $ 175H$ - - $ 175H$ - - $ 175H$ -- -- $ 175H$ --- $ 175H$ $ 175H$ $ 175H$ enter: INTRI = 3 $ 175H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 176 For a rectangular region, the initial triangulation is defined by a 176 set of grid lines corresponding to 176 X = XGRID(1),XGRID(2),...,XGRID(NXGRID) 176 Y = YGRID(1),YGRID(2),...,YGRID(NYGRID) 176 Each grid rectangle is divided into four equal area triangles. 176 176 You will first be prompted for NXGRID, the number of X-grid points, 176 then for XGRID(1),...,XGRID(NXGRID). Any points defaulted will be 176 uniformly spaced between the points you define; the first and last 176 points represent the values of X on the left and right sides of the 176 rectangle R, and cannot be defaulted. Then you will be prompted 176 similarly for the number and values of the Y-grid points. 176A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 176A$ enter: NXGRID = 10 $ 176A$ XGRID(1) = -1.0 $ 176A$ XGRID(NXGRID) = 1.0 $ 176A$ and default XGRID(2),...,XGRID(9) $ 176A$ NYGRID = 10 $ 176A$ YGRID(1) = -1.0 $ 176A$ YGRID(NYGRID) = 1.0 $ 176A$ and default YGRID(2),...,YGRID(9) $ 176A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 176G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 176G$ enter: NXGRID = 4 $ 176G$ It is important for accuracy considerations that no triangles in $ 176G$ the initial triangulation (hence none in the final triangulation) $ 176G$ straddle the interface between the glass and silica, so enter: $ 176G$ XGRID(1) = -4.E-6 $ 176G$ XGRID(2) = -1.E-6 $ 176G$ XGRID(3) = 1.E-6 $ 176G$ XGRID(NXGRID) = 4.E-6 $ 176G$ similarly, $ 176G$ enter: NYGRID = 4 $ 176G$ YGRID(1) = -4.E-6 $ 176G$ YGRID(2) = -1.E-6 $ 176G$ YGRID(3) = 1.E-6 $ 176G$ YGRID(NYGRID) = 4.E-6 $ 176G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 177 Enter the arc numbers IXARC(1),IXARC(2) of the left and right sides, 177 respectively, and the arc numbers IYARC(1),IYARC(2) of the bottom and 177 top sides of the rectangle R. Recall that negative arc numbers 177 correspond to 'fixed' boundary conditions, and positive arc numbers 177 ( < 1000) correspond to 'free' boundary conditions. 177A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 177A$ enter: IXARC(1) = -1 IXARC(2) = -2 $ 177A$ IYARC(1) = -3 IYARC(2) = -4 $ 177A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 177G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 177G$ enter: IXARC(1) = 1 IXARC(2) = 1 $ 177G$ IYARC(1) = 1 IYARC(2) = 1 $ 177G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 178 Define the Cartesian coordinates X,Y as functions of the parameters 178 P and Q, so that your region is generated as P and Q vary between 178 constant limits PGRID(1) < P < PGRID(NPGRID) 178 QGRID(1) < Q < QGRID(NQGRID) 178 where PGRID and QGRID will be defined later. X=P, Y=Q by default. 178 178 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 178 + X and Y must be continuous functions of P and Q, but their + 178 + derivatives need not be continuous. + 178 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 178B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 178B$ The region can be described using polar coordinates, with radius P $ 178B$ and angle Q, with R0 < P < R1 and 0 < Q < 2*PI. $ 178B$ enter: X = P*COS(Q) $ 178B$ Y = P*SIN(Q) $ 178B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 179 For a parameterized region, the initial triangulation is defined by a 179 set of curved grid lines corresponding to 179 P = PGRID(1),PGRID(2),...,PGRID(NPGRID) 179 Q = QGRID(1),QGRID(2),...,QGRID(NQGRID) 179 Each grid quadrilateral is divided into three or four triangles. 179 179 You will first be prompted for NPGRID, the number of P-grid points, 179 then for PGRID(1),...,PGRID(NPGRID). Any points defaulted will be 179 uniformly spaced between the points you define; the first and last 179 represent the lower and upper limits of P, and cannot be defaulted. 179 Then you will be prompted similarly for the number and values of 179 the Q-grid points. 179B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 179B$ enter: NPGRID = 4 $ 179B$ PGRID(1) = R0 $ 179B$ PGRID(NPGRID) = R1 $ 179B$ and default PGRID(2),PGRID(3) $ 179B$ NQGRID = 9 $ 179B$ QGRID(1) = 0.0 $ 179B$ QGRID(NQGRID) = 2*PI $ 179B$ and default QGRID(2),...,QGRID(8) $ 179B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 180 Enter the arc numbers IPARC(1),IPARC(2) corresponding to the arcs 180 P = PGRID(1) and P = PGRID(NPGRID), respectively, and the arc numbers 180 IQARC(1),IQARC(2) corresponding to the arcs Q = QGRID(1) and 180 Q = QGRID(NQGRID). Recall that negative arc numbers correspond to 180 'fixed' boundary conditions, and positive arc numbers ( < 1000) 180 correspond to 'free' boundary conditions. 180 180 For a parameterized region, an "arc" may be a single point (for 180 example, R=0 if polar coordinates are used), in which case the arc 180 number must be set to 0, or it may be interior to the region (for 180 example, Theta=0 and Theta=2*pi if polar coordinates are used), in 180 which case the arc number must be > 999. 180B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 180B$ enter: IPARC(1) = -1 IPARC(2) = 1 $ 180B$ IQARC(1) = 1001 IQARC(2) = 1001 $ 180B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 181 For a general region, an initial triangulation is constructed 181 which generally consists of only as many triangles as needed to define 181 the region and to satisfy the following rules (triangles adjacent 181 to a curved boundary may be considered to have one curved edge): 181 181 1. The end points of each arc are included as vertices in the 181 triangulation. 181 181 2. No vertex of any triangle may touch another in a point which is 181 not a vertex of the other triangle. 181 181 3. No triangle may have all three vertices on the boundary. 181 181 Now enter the number of vertices in the initial triangulation (NV0) 181 and the vertices (VXY(1,i),VXY(2,i)), i=1,...,NV0, when prompted. 181 181 The vertices may be numbered in any order, but that order will define 181 the vertex numbers referred to in the next list. 181 181 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 181 + If the elements of VXY, IABC and IARC are defaulted, these initial + 181 + triangulation arrays will be read from the file 'pde2d.tri'; in this + 181 + case the values of NV0 and NT0 entered below must be the same as + 181 + those in the file. + 181 + + 181 + A file 'pde2d.tri' is normally created when the final triangulation + 181 + from another program (cases INTRI=1,2 or 3) is dumped. Reset IOTRI + 181 + to 1 in the other program, to cause the final triangulation to be + 181 + dumped into pde2d.tri. + 181 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 181C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 181C$ We do not want any initial triangles to straddle the interface, so $ 181C$ we construct an initial triangulation of 8 triangles $ 181C$ $ 181C$ (1,2) 4--------------------------------------3 (3,2) $ 181C$ /*+ * * / $ 181C$ / + * * / $ 181C$ / * + (2.2,1.4) 7 / $ 181C$ / + * / $ 181C$ / * + * * / $ 181C$ / 6 (1.5,1) / $ 181C$ / * * + * / $ 181C$ / * + / $ 181C$ / 5 (0.8,0.6) + * / $ 181C$ / * * + / $ 181C$ / * * + */ $ 181C$ (0,0) 1--------------------------------------2 (2,0) $ 181C$ $ 181C$ where the seven vertices are numbered as indicated. $ 181C$ enter: NV0 = 7 $ 181C$ $ 181C$ VXY(1,1) = 0 VXY(2,1) = 0 $ 181C$ VXY(1,2) = 2 VXY(2,2) = 0 $ 181C$ VXY(1,3) = 3 VXY(2,3) = 2 $ 181C$ VXY(1,4) = 1 VXY(2,4) = 2 $ 181C$ VXY(1,5) = 0.8 VXY(2,5) = 0.6 $ 181C$ VXY(1,6) = 1.5 VXY(2,6) = 1 $ 181C$ VXY(1,7) = 2.2 VXY(2,7) = 1.4 $ 181C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 181D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 181D$ For this example, we can construct an initial triangulation $ 181D$ of five triangles $ 181D$ $ 181D$ (1,5) 4+++++++++++++++++++++++++3 (5,5) $ 181D$ + * *- $ 181D$ + * * - $ 181D$ + * * - $ 181D$ (0,4) 5* * * - $ 181D$ + * * * - $ 181D$ + * 6 (2,3) - $ 181D$ + * * - $ 181D$ + * * - $ 181D$ + * * - $ 181D$ + * * - $ 181D$ (0,0) 1+++++++++++++++++++++++++++++2 (5,0) $ 181D$ $ 181D$ where the six vertices are numbered as indicated. $ 181D$ enter: NV0 = 6 $ 181D$ $ 181D$ VXY(1,1) = 0 VXY(2,1) = 0 $ 181D$ VXY(1,2) = 5 VXY(2,2) = 0 $ 181D$ VXY(1,3) = 5 VXY(2,3) = 5 $ 181D$ VXY(1,4) = 1 VXY(2,4) = 5 $ 181D$ VXY(1,5) = 0 VXY(2,5) = 4 $ 181D$ VXY(1,6) = 2 VXY(2,6) = 3 $ 181D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 181E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 181E$ For this example, we can construct an initial triangulation $ 181E$ of five triangles $ 181E$ $ 181E$ (1,5) 4+++++++++++++++++++++++++3 (5,5) $ 181E$ + * *- $ 181E$ + * * - $ 181E$ + * * - $ 181E$ (0,4) 5* * * - $ 181E$ + * * * - $ 181E$ + * 6 (2,3) - $ 181E$ + * * - $ 181E$ + * * - $ 181E$ + * * - $ 181E$ + * * - $ 181E$ (0,0) 1+++++++++++++++++++++++++++++2 (5,0) $ 181E$ $ 181E$ where the six vertices are numbered as indicated. $ 181E$ enter: NV0 = 6 $ 181E$ $ 181E$ VXY(1,1) = 0 VXY(2,1) = 0 $ 181E$ VXY(1,2) = 5 VXY(2,2) = 0 $ 181E$ VXY(1,3) = 5 VXY(2,3) = 5 $ 181E$ VXY(1,4) = 1 VXY(2,4) = 5 $ 181E$ VXY(1,5) = 0 VXY(2,5) = 4 $ 181E$ VXY(1,6) = 2 VXY(2,6) = 3 $ 181E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 181H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 181H$ For this example, we can construct an initial triangulation $ 181H$ of eight triangles $ 181H$ $ 181H$ (0,4) 6-----------5 (1,4) $ 181H$ - *- $ 181H$ - * * - $ 181H$ - * - $ 181H$ - * * - $ 181H$ - * - $ 181H$ - 7 (0.3,2)- $ 181H$ - * - $ 181H$ - * - $ 181H$ - * * - $ 181H$ - * - $ 181H$ - *- (1,1) $ 181H$ - * 4-------------------3 (4,1) $ 181H$ - * * * + $ 181H$ - * * * + $ 181H$ - * * * * + $ 181H$ - * 8 (2,0.3) + $ 181H$ - * * * + $ 181H$ (0,0) 1 * * 2 (4,0) $ 181H$ - - $ 181H$ - - $ 181H$ - - $ 181H$ - - $ 181H$ -- -- $ 181H$ --- $ 181H$ $ 181H$ where the eight vertices are numbered as indicated. $ 181H$ enter: NV0 = 8 $ 181H$ $ 181H$ VXY(1,1) = 0 VXY(2,1) = 0 $ 181H$ VXY(1,2) = 4 VXY(2,2) = 0 $ 181H$ VXY(1,3) = 4 VXY(2,3) = 1 $ 181H$ VXY(1,4) = 1 VXY(2,4) = 1 $ 181H$ VXY(1,5) = 1 VXY(2,5) = 4 $ 181H$ VXY(1,6) = 0 VXY(2,6) = 4 $ 181H$ VXY(1,7) = 0.3 VXY(2,7) = 2 $ 181H$ VXY(1,8) = 2 VXY(2,8) = 0.3 $ 181H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 182 Now enter the number of triangles in the initial triangulation (NT0), 182 and for each triangle k, give the vertex numbers of vertices a,b,c: 182 IABC(1,k) , IABC(2,k) , IABC(3,k) 182 where the third vertex (c) is not on the boundary of R (or on a curved 182 interface arc), and the number, 182 IARC(k) 182 of the arc cut off by the base, ab, of the triangle. Put IARC(k)=0 182 if the base of triangle k does not intersect any boundary (or curved 182 interface) arc. Recall that negative arc numbers correspond to 182 'fixed' boundary conditions, and positive arc numbers ( < 1000) 182 correspond to 'free' boundary conditions. 182 182 The order of this list defines the initial triangle numbers. 182 182 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 182 + Any of the partial differential equation coefficients or other + 182 + functions of X and Y which you are asked to supply later may be + 182 + defined as functions of a variable 'KTRI', which holds the number + 182 + of the INITIAL triangle in which (X,Y) lies. This is useful when + 182 + the region is a composite of different materials, so that some + 182 + material parameters have different values in different subregions. + 182 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 182 + If any interfaces between subregions are curved, the interface arcs + 182 + may be assigned unique arc numbers of 1000 and above, and treated + 182 + like boundary arcs in the initial triangulation definition. (You + 182 + will not be allowed to specify boundary conditions on them, however.)+ 182 + The triangulation refinement will follow the interface arcs, so that + 182 + no final triangles will straddle an interface. + 182 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 182C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 182C$ Recall that the initial triangulation is: $ 182C$ arc -1 $ 182C$ 4--------------------------------------3 $ 182C$ /*+ * VI * / $ 182C$ / + * * / $ 182C$ / * + VII 7 / $ 182C$ / + * V / $ 182C$ / * III + * * / $ 182C$ arc 1 / 6 / arc -1 $ 182C$ / * * + VIII * / $ 182C$ / IV * + / $ 182C$ / 5 II + * / $ 182C$ / * I * + / $ 182C$ / * * + */ $ 182C$ 1--------------------------------------2 $ 182C$ arc -1 $ 182C$ $ 182C$ where I,II,...,VIII are the initial triangle numbers. $ 182C$ $ 182C$ The curved interior interface is assigned arc number 1001, while $ 182C$ the boundary arcs are assigned numbers as shown. $ 182C$ Note that D(X,Y)=5 in triangles number 1-4, $ 182C$ D(X,Y)=1 in triangles number 5-8 $ 182C$ enter: NT0 = 8 $ 182C$ $ 182C$ IABC(1,1) = 1 IABC(2,1) = 2 IABC(3,1) = 5 IARC(1) = -1 $ 182C$ IABC(1,2) = 2 IABC(2,2) = 6 IABC(3,2) = 5 IARC(2) = 1001 $ 182C$ IABC(1,3) = 6 IABC(2,3) = 4 IABC(3,3) = 5 IARC(3) = 1001 $ 182C$ IABC(1,4) = 4 IABC(2,4) = 1 IABC(3,4) = 5 IARC(4) = 1 $ 182C$ IABC(1,5) = 2 IABC(2,5) = 3 IABC(3,5) = 7 IARC(5) = -1 $ 182C$ IABC(1,6) = 3 IABC(2,6) = 4 IABC(3,6) = 7 IARC(6) = -1 $ 182C$ IABC(1,7) = 4 IABC(2,7) = 6 IABC(3,7) = 7 IARC(7) = 1001 $ 182C$ IABC(1,8) = 6 IABC(2,8) = 2 IABC(3,8) = 7 IARC(8) = 1001 $ 182C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 182D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 182D$ Recall that the initial triangulation is: $ 182D$ $ 182D$ arc 2 $ 182D$ 4+++++++++++++++++++++++++3 $ 182D$ + * *- $ 182D$ arc 2 + * III * - $ 182D$ + IV * * - $ 182D$ 5* * * - $ 182D$ + * * * - $ 182D$ arc 3 + * 6 II - arc -1 $ 182D$ + V * * - $ 182D$ + * * - $ 182D$ + * I * - $ 182D$ + * * - $ 182D$ 1+++++++++++++++++++++++++++++2 $ 182D$ arc 2 $ 182D$ $ 182D$ where I,II,III,IV,V are the initial triangle numbers. $ 182D$ enter: NT0 = 5 $ 182D$ $ 182D$ IABC(1,1) = 1 IABC(2,1) = 2 IABC(3,1) = 6 IARC(1) = 2 $ 182D$ IABC(1,2) = 2 IABC(2,2) = 3 IABC(3,2) = 6 IARC(2) = -1 $ 182D$ IABC(1,3) = 3 IABC(2,3) = 4 IABC(3,3) = 6 IARC(3) = 2 $ 182D$ IABC(1,4) = 4 IABC(2,4) = 5 IABC(3,4) = 6 IARC(4) = 2 $ 182D$ IABC(1,5) = 5 IABC(2,5) = 1 IABC(3,5) = 6 IARC(5) = 3 $ 182D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 182E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 182E$ Recall that the initial triangulation is: $ 182E$ $ 182E$ arc 2 $ 182E$ 4+++++++++++++++++++++++++3 $ 182E$ + * *- $ 182E$ arc 2 + * III * - $ 182E$ + IV * * - $ 182E$ 5* * * - $ 182E$ + * * * - $ 182E$ arc 3 + * 6 II - arc -1 $ 182E$ + V * * - $ 182E$ + * * - $ 182E$ + * I * - $ 182E$ + * * - $ 182E$ 1+++++++++++++++++++++++++++++2 $ 182E$ arc 2 $ 182E$ $ 182E$ where I,II,III,IV,V are the initial triangle numbers. $ 182E$ enter: NT0 = 5 $ 182E$ $ 182E$ IABC(1,1) = 1 IABC(2,1) = 2 IABC(3,1) = 6 IARC(1) = 2 $ 182E$ IABC(1,2) = 2 IABC(2,2) = 3 IABC(3,2) = 6 IARC(2) = -1 $ 182E$ IABC(1,3) = 3 IABC(2,3) = 4 IABC(3,3) = 6 IARC(3) = 2 $ 182E$ IABC(1,4) = 4 IABC(2,4) = 5 IABC(3,4) = 6 IARC(4) = 2 $ 182E$ IABC(1,5) = 5 IABC(2,5) = 1 IABC(3,5) = 6 IARC(5) = 3 $ 182E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 182H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 182H$ Recall that the initial triangulation is: $ 182H$ arc -1 $ 182H$ 6-----------5 $ 182H$ - *- $ 182H$ - * VII * - $ 182H$ - * - $ 182H$ - * * - $ 182H$ - * - $ 182H$ - 7 - arc -2 $ 182H$ - * VI - $ 182H$ - VIII * - $ 182H$ - * * - $ 182H$ - * - $ 182H$ - *- arc -2 $ 182H$ - * V 4-------------------3 $ 182H$ - * * III * + $ 182H$ - * * * + $ 182H$ - * * IV * * II + arc 1 $ 182H$ arc -3 - * 8 + $ 182H$ - * * * + $ 182H$ 1 * * 2 $ 182H$ - - $ 182H$ - I - $ 182H$ - - $ 182H$ arc -3 - - $ 182H$ -- -- $ 182H$ --- $ 182H$ $ 182H$ where I,II,III,IV,V,VI,VII,VIII are the initial triangle numbers $ 182H$ enter: NT0 = 8 $ 182H$ $ 182H$ IABC(1,1) = 1 IABC(2,1) = 2 IABC(3,1) = 8 IARC(1) = -3 $ 182H$ IABC(1,2) = 2 IABC(2,2) = 3 IABC(3,2) = 8 IARC(2) = 1 $ 182H$ IABC(1,3) = 3 IABC(2,3) = 4 IABC(3,3) = 8 IARC(3) = -2 $ 182H$ IABC(1,4) = 4 IABC(2,4) = 1 IABC(3,4) = 8 IARC(4) = 0 $ 182H$ IABC(1,5) = 1 IABC(2,5) = 4 IABC(3,5) = 7 IARC(5) = 0 $ 182H$ IABC(1,6) = 4 IABC(2,6) = 5 IABC(3,6) = 7 IARC(6) = -2 $ 182H$ IABC(1,7) = 5 IABC(2,7) = 6 IABC(3,7) = 7 IARC(7) = -1 $ 182H$ IABC(1,8) = 6 IABC(2,8) = 1 IABC(3,8) = 7 IARC(8) = -3 $ 182H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 183 Are there any curved boundary (or curved interface) arcs? 183C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 183C$ enter: yes $ 183C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 183D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 183D$ enter: no $ 183D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 183E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 183E$ enter: no $ 183E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 183H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 183H$ enter: yes $ 183H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 184 Enter the arc number (IARC) of a curved arc. 184C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 184C$ enter: IARC = 1001 $ 184C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 184H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 184H$ enter: IARC = -3 $ 184H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 185 You must either supply the parametric equations (X(S),Y(S)) of this arc 185 or else provide the coordinates (PXY(1,i),PXY(2,i)), i=1,...,NPTS, 185 of several points on the arc through which a smooth curve will be 185 drawn. Do you want to supply the parametric equations? 185C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 185C$ enter: no $ 185C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 185H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 185H$ enter: yes $ 185H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 186 The arc is parameterized as X=X(S),Y=Y(S) where S varies from S0 to SF 186 as it traces out the arc, in either direction. 186 186 Enter FORTRAN expressions for S0, SF, X(S) and Y(S). S0 and SF default 186 to 0 and 1. 186H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 186H$ enter: S0 = 0.75*PI $ 186H$ SF = 1.75*PI $ 186H$ X = 2 + SQRT(8.D0)*COS(S) $ 186H$ Y = 2 + SQRT(8.D0)*SIN(S) $ 186H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 187 Enter the number of points on the arc (NPTS) to be input, and the 187 coordinates (PXY(1,i),PXY(2,i)),i=1,...,NPTS, of these points, when 187 prompted. The points can be ordered in either direction along the 187 arc, but the first and last points must be the endpoints of the arc. 187 A smooth curve will be drawn through these points. 187 187 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 187 + To guarantee that the arc drawn through these user-supplied points + 187 + does not miss any vertices in the initial triangulation which are + 187 + supposed to lie on this arc, any such vertices should be included in + 187 + the user-supplied points. + 187 + + 187 + If the arc makes a sharp turn at one of the input points, so that + 187 + drawing a smooth curve through that point is not appropriate, you + 187 + can include this point twice (consecutively) in the input list, and + 187 + continuity of the derivatives will not be imposed there. + 187 + + 187 + The parametric equations (X(S),Y(S)) of the arc drawn are computed + 187 + so that S ranges from 0 to 1 and is approximately, but not exactly, + 187 + proportional to distance along the arc, and X(S) and Y(S) are + 187 + cubic spline interpolants to the X and Y coordinates of the points. + 187 + + 187 + If a boundary curve is very wiggly, you may need to increase the + 187 + value of NBPT8Z in the PARAMETER statement in the main program, so + 187 + that this curve will be accurately drawn in the graphical output. + 187 + (Note: NBPT8Z does not affect the internal representation of a + 187 + curve, only its graphical representation.) + 187 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 187C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 187C$ We will supply 5 points to approximately define the interface, so $ 187C$ enter: NPTS = 5 $ 187C$ $ 187C$ PXY(1,1) = 2 PXY(2,1) = 0 $ 187C$ PXY(1,2) = 1.6 PXY(2,2) = 0.5 $ 187C$ PXY(1,3) = 1.5 PXY(2,3) = 1 $ 187C$ PXY(1,4) = 1.4 PXY(2,4) = 1.5 $ 187C$ PXY(1,5) = 1 PXY(2,5) = 2 $ 187C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 188 Are there any more curved arcs? 188C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 188C$ enter: no $ 188C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 188H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 188H$ enter: no $ 188H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 189 How many triangles (NTF) are desired for the final triangulation? 189A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 189A$ enter: NTF = 324 $ 189A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 189B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 189B$ enter: NTF = 1000 $ 189B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 189C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 189C$ enter: NTF = 350 $ 189C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 189D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 189D$ enter: NTF = 500 $ 189D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 189E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 189E$ enter: NTF = 100 $ 189E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 189G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 189G$ enter: NTF = 100 $ 189G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 189H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 189H$ enter: NTF = 200 $ 189H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 190 Enter a FORTRAN expression for TRIDEN(X,Y), which controls the 190 grading of the triangulation. TRIDEN should be largest where the 190 triangulation is to be most dense. The default is TRIDEN(X,Y)=1.0 190 (a uniform triangulation). 190 190 TRIDEN may also be a function of the initial triangle number KTRI. 190A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 190A$ press [RETURN] to default TRIDEN $ 190A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 190B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 190B$ press [RETURN] to default TRIDEN $ 190B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 190C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 190C$ press [RETURN] to default TRIDEN $ 190C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 190D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 190D$ press [RETURN] to default TRIDEN $ 190D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 190E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 190E$ press [RETURN] to default TRIDEN $ 190E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 190G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 190G$ enter: TRIDEN = EXP(-(X/1.E-6)**2-(Y/1.E-6)**2) $ 190G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 190H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 190H$ enter: TRIDEN = 1.0/(1.0+X**2+Y**2) $ 190H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 191 If you don't want to read the FINE PRINT, enter 'no'. 191 191 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 191 + Do you want the triangulation to be graded adaptively? + 191 + + 191 + If you answer "yes", make sure there is no "pde2d.adp" file in the + 191 + working directory the first time you run the program, then run the + 191 + program two or more times, possibly increasing NTF each time. On + 191 + the first run, the triangulation will be graded as guided by + 191 + TRIDEN(X,Y), but on each subsequent run, information output by the + 191 + previous run to "pde2d.adp" will be used to guide the grading of the + 191 + new triangulation. + 191 + 191 + If ADAPT=.TRUE., after each run a file "pde2d.adp" is written + 191 + which tabulates the values of the magnitude of the gradient of the + 191 + solution (at the last time step or iteration) at an output NXP8Z by + 191 + NYP8Z grid of points (NXP8Z and NYP8Z are set to 101 in a PARAMETER + 191 + statement in the main program, so they can be changed if desired). + 191 + If NEQN > 1, a normalized average of the gradients of the NEQN + 191 + solution components is used. + 191 + + 191 + You can do all the "runs" in one program, by setting NPROB > 1. + 191 + Each pass through the DO loop, PDE2D will read the gradient values + 191 + output the previous pass. If RESTRT=.TRUE., GRIDID=.FALSE., and + 191 + T0,TF are incremented each pass through the DO loop, it is possible + 191 + in this way to solve a time-dependent problem with an adaptive, + 191 + moving, grid. + 191 + + 191 + Increase the variable EXAG from its default value of 1.5 if you want + 191 + to exaggerate the grading of an adaptive triangulation (make it less + 191 + uniform). EXAG should normally not be larger than about 2.0. + 191 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 191 191 If you don't want to read the FINE PRINT, enter 'no'. 191A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 191A$ enter: no $ 191A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 191B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 191B$ enter: yes $ 191B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 191C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 191C$ enter: no $ 191C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 191D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 191D$ enter: no $ 191D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 191E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 191E$ enter: no $ 191E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 191G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 191G$ enter: no $ 191G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 191H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 191H$ enter: no $ 191H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 192 If you don't want to read the FINE PRINT, default SHAPE. 192 192 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 192 + Enter a FORTRAN expression for SHAPE(X,Y), which controls the + 192 + approximate shape of the triangles. The triangulation refinement + 192 + will proceed with the goal of generating triangles with an average + 192 + height to width ratio of approximately SHAPE(X,Y) near the point + 192 + (X,Y). SHAPE must be positive. The default is SHAPE(X,Y)=1.0. + 192 + + 192 + SHAPE may also be a function of the initial triangle number KTRI. + 192 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 192A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 192A$ press [RETURN] to default SHAPE $ 192A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 192B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 192B$ press [RETURN] to default SHAPE $ 192B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 192C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 192C$ press [RETURN] to default SHAPE $ 192C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 192D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 192D$ press [RETURN] to default SHAPE $ 192D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 192E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 192E$ press [RETURN] to default SHAPE $ 192E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 192G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 192G$ press [RETURN] to default SHAPE $ 192G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 192H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 192H$ press [RETURN] to default SHAPE $ 192H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 193 If you don't want to read the FINE PRINT, enter ISOLVE = 4. 193 193 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 193 + The following linear system solvers are available: + 193 + + 193 + 1. Band method + 193 + The band solver uses a reverse Cuthill-McKee ordering. + 193 + 2. Frontal method + 193 + This is an out-of-core version of the band solver. + 193 + 3. Jacobi bi-conjugate gradient method + 193 + This is a preconditioned bi-conjugate gradient, or + 193 + Lanczos, iterative method. (This solver is MPI- + 193 + enhanced, if MPI is available.) If you want to + 193 + override the default convergence tolerance, set a + 193 + new relative tolerance CGTL8Z in the main program. + 193 + 4. Sparse direct method + 193 + This is based on Harwell Library routines MA27/MA37, + 193 + developed by AEA Industrial Technology at Harwell + 193 + Laboratory, Oxfordshire, OX11 0RA, United Kingdom + 193 + (used by permission). + 193 + 5. Local solver + 193 + Choose this option ONLY if alternative linear system + 193 + solvers have been installed locally. See subroutines + 193 + (D)TD3M, (D)TD3N in file (d)subs.f for instructions + 193 + on how to add local solvers. + 193 + 6. MPI-based parallel band solver + 193 + This is a parallel solver which runs efficiently on + 193 + multiple processor machines, under MPI. It is a + 193 + band solver, with the matrix distributed over the + 193 + available processors. Choose this option ONLY if the + 193 + solver has been activated locally. See subroutine + 193 + (D)TD3O in file (d)subs.f for instructions on how to + 193 + activate this solver and the MPI-enhancements to the + 193 + conjugate gradient solver. + 193 + + 193 + Enter ISOLVE = 1,2,3,4,5 or 6 to select a linear system solver. + 193 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 193 193 If you don't want to read the FINE PRINT, enter ISOLVE = 4. 193A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 193A$ enter: ISOLVE = 1 $ 193A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 193B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 193B$ enter: ISOLVE = 4 $ 193B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 193C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 193C$ enter: ISOLVE = 2 $ 193C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 193D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 193D$ enter: ISOLVE = 4 $ 193D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 193E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 193E$ enter: ISOLVE = 3 $ 193E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 193G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 193G$ enter: ISOLVE = 4 $ 193G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 193H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 193H$ enter: ISOLVE = 4 $ 193H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 194 Enter the element degree (1,2,3 or 4) desired. A suggested value is 194 IDEG = 3. 194 194 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 194 + A negative value for IDEG can be entered, and elements of degree + 194 + ABS(IDEG) will be used, with a lower order numerical integration + 194 + scheme. This results in a slight increase in speed, but negative + 194 + values of IDEG are normally not recommended. + 194 + + 194 + The spatial discretization error is O(h**2), O(h**3), O(h**4) or + 194 + O(h**5) when IDEG = 1,2,3 or 4, respectively, is used, where h is + 194 + the maximum triangle diameter, even if the region is curved. + 194 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 194A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 194A$ enter: IDEG = 3 $ 194A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 194B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 194B$ enter: IDEG = 3 $ 194B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 194C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 194C$ If we want to later change ITYPE to 4 and compute all eigenvalues, $ 194C$ IDEG=-1 or -3 are the best choices, for a symmetric 2D problem. $ 194C$ enter: IDEG = -3 $ 194C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 194D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 194D$ enter: IDEG = -1 $ 194D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 194E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 194E$ enter: IDEG = 4 $ 194E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 194G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 194G$ enter: IDEG = 3 $ 194G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 194H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 194H$ IDEG = -1 or 1 should NOT be used with the penalty method, so $ 194H$ enter: IDEG = 4 $ 194H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 195 You may now choose names for the component(s) of the (possibly vector) 195 solution U. Each must be an alphanumeric string of one to three 195 characters, beginning with a letter in the range A-H or O-Z. The 195 variable names X,Y,T,S,A and B must not be used. The name should 195 start in column 1. 195A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 195A$ enter: U1 = U $ 195A$ U2 = V $ 195A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 195B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 195B$ enter: U1 = U $ 195B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 195C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 195C$ enter: U1 = QQ $ 195C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 195D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 195D$ enter: U1 = Z $ 195D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 195E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 195E$ enter: U1 = U $ 195E$ U2 = V $ 195E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 195G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 195G$ enter: U1 = H $ 195G$ U2 = E $ 195G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 195H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 195H$ enter: U1 = U $ 195H$ U2 = V $ 195H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 196 PDE2D finds an eigenvalue, lambda, of the (linear and homogeneous) 196 equation: 196 196 d/dX* A(X,Y,$$1,$$1x,$$1y) 196 + d/dY* B(X,Y,$$1,$$1x,$$1y) 196 = F(X,Y,$$1,$$1x,$$1y) 196 + lambda*RHO(X,Y)*$$1 196 196 with 'fixed' boundary condition: 196 196 $$1 = 0 196 196 or 'free' boundary condition: 196 196 A*nx + B*ny = GB(X,Y,$$1,$$1x,$$1y) 196 196 where $$1(X,Y) is the unknown and F,A,B,RHO,GB are user-supplied 196 functions. 196 196 note: 196 (nx,ny) = unit outward normal to the boundary 196 $$1x = d($$1)/dX 196 $$1y = d($$1)/dY 196 196 Is this problem symmetric? If you don't want to read the FINE PRINT, 196 it is safe to enter 'no'. 196 196 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 196 + This problem is called symmetric if the matrix + 196 + + 196 + F.$$1 F.$$1x F.$$1y + 196 + A.$$1 A.$$1x A.$$1y + 196 + B.$$1 B.$$1x B.$$1y + 196 + + 196 + is always symmetric, where F.$$1 means d(F)/d($$1), and similarly + 196 + for the other terms. In addition, GB must not depend on $$1x,$$1y. + 196 + + 196 + The memory and execution time are halved if the problem is known to + 196 + be symmetric. + 196 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 196C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 196C$ enter: yes $ 196C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 197 PDE2D finds an eigenvalue, lambda, of the (linear and homogeneous) 197 system: 197 197 d/dX* A1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 197 + d/dY* B1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 197 = F1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 197 + lambda*(RHO11(X,Y)*$$1 + RHO12(X,Y)*$$2) 197 197 d/dX* A2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 197 + d/dY* B2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 197 = F2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 197 + lambda*(RHO21(X,Y)*$$1 + RHO22(X,Y)*$$2) 197 197 with 'fixed' boundary conditions: 197 197 $$1 = 0 197 $$2 = 0 197 197 or 'free' boundary conditions: 197 197 A1*nx + B1*ny = GB1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 197 A2*nx + B2*ny = GB2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 197 197 where $$1(X,Y) and $$2(X,Y) are the unknowns and F1,A1,B1,RHO11,RHO12, 197 F2,A2,B2,RHO21,RHO22,GB1,GB2 are user-supplied functions. 197 197 note: 197 (nx,ny) = unit outward normal to the boundary 197 $$1x = d($$1)/dX $$2x = d($$2)/dX 197 $$1y = d($$1)/dY $$2y = d($$2)/dY 197 197 Is this problem symmetric? If you don't want to read the FINE PRINT, 197 it is safe to enter 'no'. 197 197 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 197 + This problem is called symmetric if each of the matrices + 197 + + 197 + F1.$$1 F1.$$1x F1.$$1y F1.$$2 F1.$$2x F1.$$2y + 197 + A1.$$1 A1.$$1x A1.$$1y A1.$$2 A1.$$2x A1.$$2y + 197 + B1.$$1 B1.$$1x B1.$$1y B1.$$2 B1.$$2x B1.$$2y + 197 + F2.$$1 F2.$$1x F2.$$1y F2.$$2 F2.$$2x F2.$$2y + 197 + A2.$$1 A2.$$1x A2.$$1y A2.$$2 A2.$$2x A2.$$2y + 197 + B2.$$1 B2.$$1x B2.$$1y B2.$$2 B2.$$2x B2.$$2y + 197 + + 197 + RHO11 RHO12 + 197 + RHO21 RHO22 + 197 + and + 197 + GB1.$$1 GB1.$$2 + 197 + GB2.$$1 GB2.$$2 + 197 + + 197 + is always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 197 + for the other terms. In addition, EV0I must be 0, and GB1,GB2 must + 197 + not depend on $$1x,$$1y,$$2x,$$2y. + 197 + + 197 + The memory and execution time are halved if the problem is known to + 197 + be symmetric. + 197 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 197 197 If you don't want to read the FINE PRINT, enter 'no'. 198 PDE2D finds an eigenvalue, lambda, of the (linear and homogeneous) 198 system: 198 198 d/dX* A1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 198 + d/dY* B1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 198 = F1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 198 + lambda*(RHO11(X,Y)*$$1 + RHO12(X,Y)*$$2 + RHO13(X,Y)*$$3) 198 198 d/dX* A2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 198 + d/dY* B2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 198 = F2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 198 + lambda*(RHO21(X,Y)*$$1 + RHO22(X,Y)*$$2 + RHO23(X,Y)*$$3) 198 198 d/dX* A3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 198 + d/dY* B3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 198 = F3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 198 + lambda*(RHO31(X,Y)*$$1 + RHO32(X,Y)*$$2 + RHO33(X,Y)*$$3) 198 198 with 'fixed' boundary conditions: 198 198 $$1 = 0 198 $$2 = 0 198 $$3 = 0 198 198 or 'free' boundary conditions: 198 198 A1*nx + B1*ny = GB1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 198 A2*nx + B2*ny = GB2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 198 A3*nx + B3*ny = GB3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 198 198 where $$1(X,Y),$$2(X,Y),$$3(X,Y) are the unknowns and F1,A1,B1,RHO11, 198 RHO12,RHO13,F2,A2,B2,RHO21,RHO22,RHO23,F3,A3,B3,RHO31,RHO32,RHO33, 198 GB1,GB2,GB3 are user-supplied functions. 198 198 note: 198 (nx,ny) = unit outward normal to the boundary 198 $$1x = d($$1)/dX $$2x = d($$2)/dX $$3x = d($$3)/dX 198 $$1y = d($$1)/dY $$2y = d($$2)/dY $$3y = d($$3)/dY 198 198 Is this problem symmetric? If you don't want to read the FINE PRINT, 198 it is safe to enter 'no'. 198 198 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 198 + This problem is called symmetric if each of the matrices + 198 + + 198 + F1.$$1 F1.$$1x F1.$$1y F1.$$2 F1.$$2x F1.$$2y .. + 198 + A1.$$1 A1.$$1x A1.$$1y A1.$$2 A1.$$2x A1.$$2y .. + 198 + B1.$$1 B1.$$1x B1.$$1y B1.$$2 B1.$$2x B1.$$2y .. + 198 + F2.$$1 F2.$$1x F2.$$1y F2.$$2 F2.$$2x F2.$$2y .. + 198 + A2.$$1 A2.$$1x A2.$$1y A2.$$2 A2.$$2x A2.$$2y .. + 198 + B2.$$1 B2.$$1x B2.$$1y B2.$$2 B2.$$2x B2.$$2y .. + 198 + . . . . . . + 198 + . . . . . . + 198 + + 198 + RHO11 RHO12 RHO13 + 198 + RHO21 RHO22 RHO23 + 198 + RHO31 RHO32 RHO33 + 198 + and + 198 + GB1.$$1 GB1.$$2 GB1.$$3 + 198 + GB2.$$1 GB2.$$2 GB2.$$3 + 198 + GB3.$$1 GB3.$$2 GB3.$$3 + 198 + + 198 + is always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 198 + for the other terms. In addition GB1,GB2,GB3 must not depend on + 198 + $$1x,$$1y,$$2x,$$2y,$$3x,$$3y. + 198 + + 198 + The memory and execution time are halved if the problem is known to + 198 + be symmetric. + 198 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 198 198 If you don't want to read the FINE PRINT, enter 'no'. 199 PDE2D finds an eigenvalue, lambda, of the (linear and homogeneous) 199 system: 199 199 d/dX*A1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 199 +d/dY*B1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 199 = F1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 199 +lambda*(RHO11(X,Y)*$$1+RHO12(X,Y)*$$2+RHO13(X,Y)*$$3+RHO14(X,Y)*$$4..) 199 199 d/dX*A2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 199 +d/dY*B2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 199 = F2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 199 +lambda*(RHO21(X,Y)*$$1+RHO22(X,Y)*$$2+RHO23(X,Y)*$$3+RHO24(X,Y)*$$4..) 199 199 d/dX*A3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 199 +d/dY*B3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 199 = F3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 199 +lambda*(RHO31(X,Y)*$$1+RHO32(X,Y)*$$2+RHO33(X,Y)*$$3+RHO34(X,Y)*$$4..) 199 199 d/dX*A4(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 199 +d/dY*B4(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 199 = F4(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 199 +lambda*(RHO41(X,Y)*$$1+RHO42(X,Y)*$$2+RHO43(X,Y)*$$3+RHO44(X,Y)*$$4..) 199 . 199 . 199 with 'fixed' boundary conditions: 199 199 $$1 = 0 199 $$2 = 0 199 $$3 = 0 199 $$4 = 0 199 . . 199 . . 199 or 'free' boundary conditions: 199 199 A1*nx + B1*ny = GB1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 199 A2*nx + B2*ny = GB2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 199 A3*nx + B3*ny = GB3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 199 A4*nx + B4*ny = GB4(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 199 . . . 199 . . . 199 where $$1(X,Y),$$2(X,Y),$$3(X,Y),$$4(X,Y)... are the unknowns and 199 FI,AI,BI,RHOIJ,GBI are user-supplied functions. 199 199 note: 199 (nx,ny) = unit outward normal to the boundary 199 $$1x=d($$1)/dX $$2x=d($$2)/dX $$3x=d($$3)/dX $$4x=d($$4)/dX ... 199 $$1y=d($$1)/dY $$2y=d($$2)/dY $$3y=d($$3)/dY $$4y=d($$4)/dY ... 199 199 Is this problem symmetric? If you don't want to read the FINE PRINT, 199 it is safe to enter 'no'. 199 199 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 199 + This problem is called symmetric if each of the matrices + 199 + + 199 + F1.$$1 F1.$$1x F1.$$1y F1.$$2 F1.$$2x F1.$$2y .. + 199 + A1.$$1 A1.$$1x A1.$$1y A1.$$2 A1.$$2x A1.$$2y .. + 199 + B1.$$1 B1.$$1x B1.$$1y B1.$$2 B1.$$2x B1.$$2y .. + 199 + F2.$$1 F2.$$1x F2.$$1y F2.$$2 F2.$$2x F2.$$2y .. + 199 + A2.$$1 A2.$$1x A2.$$1y A2.$$2 A2.$$2x A2.$$2y .. + 199 + B2.$$1 B2.$$1x B2.$$1y B2.$$2 B2.$$2x B2.$$2y .. + 199 + . . . . . . + 199 + . . . . . . + 199 + + 199 + RHO11 RHO12 RHO13 RHO14 .... + 199 + RHO21 RHO22 RHO23 RHO24 .... + 199 + RHO31 RHO32 RHO33 RHO34 .... + 199 + RHO41 RHO42 RHO43 RHO44 .... + 199 + . . . . + 199 + . . . . + 199 + and + 199 + GB1.$$1 GB1.$$2 GB1.$$3 GB1.$$4 .... + 199 + GB2.$$1 GB2.$$2 GB2.$$3 GB2.$$4 .... + 199 + GB3.$$1 GB3.$$2 GB3.$$3 GB3.$$4 .... + 199 + GB4.$$1 GB4.$$2 GB4.$$3 GB4.$$4 .... + 199 + . . . . + 199 + . . . . + 199 + is always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 199 + for the other terms. In addition, EV0I must be 0, and GB1,GB2,GB3, + 199 + GB4... must not depend on $$1x,$$1y,$$2x,$$2y,$$3x,$$3y,$$4x,$$4y... + 199 + + 199 + The memory and execution time are halved if the problem is known to + 199 + be symmetric. + 199 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 199 199 If you don't want to read the FINE PRINT, enter 'no'. 200 PDE2D solves the equation: 200 200 d/dX* A(X,Y,$$1,$$1x,$$1y) 200 + d/dY* B(X,Y,$$1,$$1x,$$1y) 200 = F(X,Y,$$1,$$1x,$$1y) 200 200 with 'fixed' boundary condition: 200 200 $$1 = FB(X,Y) 200 200 or 'free' boundary condition: 200 200 A*nx + B*ny = GB(X,Y,$$1,$$1x,$$1y) 200 200 where $$1(X,Y) is the unknown and F,A,B,FB,GB are user-supplied 200 functions. 200 200 note: 200 (nx,ny) = unit outward normal to the boundary 200 $$1x = d($$1)/dX 200 $$1y = d($$1)/dY 200 200 Is this problem symmetric? If you don't want to read the FINE PRINT, 200 it is safe to enter 'no'. 200 200 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 200 + This problem is called symmetric if the matrix + 200 + + 200 + F.$$1 F.$$1x F.$$1y + 200 + A.$$1 A.$$1x A.$$1y + 200 + B.$$1 B.$$1x B.$$1y + 200 + + 200 + is always symmetric, where F.$$1 means d(F)/d($$1), and similarly + 200 + for the other terms. In addition, GB must not depend on $$1x,$$1y. + 200 + + 200 + The memory and execution time are halved if the problem is known to + 200 + be symmetric. + 200 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 200B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 200B$ The Jacobian matrix is diagonal so, $ 200B$ enter: yes $ 200B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 201 PDE2D solves the system of equations: 201 201 d/dX* A1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 201 + d/dY* B1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 201 = F1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 201 201 d/dX* A2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 201 + d/dY* B2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 201 = F2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 201 201 with 'fixed' boundary conditions: 201 201 $$1 = FB1(X,Y) 201 $$2 = FB2(X,Y) 201 201 or 'free' boundary conditions: 201 201 A1*nx + B1*ny = GB1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 201 A2*nx + B2*ny = GB2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 201 201 where $$1(X,Y) and $$2(X,Y) are the unknowns and F1,A1,B1,F2,A2,B2, 201 FB1,FB2,GB1,GB2 are user-supplied functions. 201 201 note: 201 (nx,ny) = unit outward normal to the boundary 201 $$1x = d($$1)/dX $$2x = d($$2)/dX 201 $$1y = d($$1)/dY $$2y = d($$2)/dY 201 201 Is this problem symmetric? If you don't want to read the FINE PRINT, 201 it is safe to enter 'no'. 201 201 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 201 + This problem is called symmetric if each of the matrices + 201 + + 201 + F1.$$1 F1.$$1x F1.$$1y F1.$$2 F1.$$2x F1.$$2y + 201 + A1.$$1 A1.$$1x A1.$$1y A1.$$2 A1.$$2x A1.$$2y + 201 + B1.$$1 B1.$$1x B1.$$1y B1.$$2 B1.$$2x B1.$$2y + 201 + F2.$$1 F2.$$1x F2.$$1y F2.$$2 F2.$$2x F2.$$2y + 201 + A2.$$1 A2.$$1x A2.$$1y A2.$$2 A2.$$2x A2.$$2y + 201 + B2.$$1 B2.$$1x B2.$$1y B2.$$2 B2.$$2x B2.$$2y + 201 + + 201 + and + 201 + GB1.$$1 GB1.$$2 + 201 + GB2.$$1 GB2.$$2 + 201 + + 201 + is always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 201 + for the other terms. In addition, GB1,GB2 must not depend on + 201 + $$1x,$$1y,$$2x,$$2y. + 201 + + 201 + The memory and execution time are halved if the problem is known to + 201 + be symmetric. + 201 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 201 201 If you don't want to read the FINE PRINT, enter 'no'. 201A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 201A$ enter: no $ 201A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 201E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 201E$ enter: yes $ 201E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 201H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 201H$ enter: no $ 201H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 202 PDE2D solves the system of equations: 202 202 d/dX* A1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 202 + d/dY* B1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 202 = F1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 202 202 d/dX* A2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 202 + d/dY* B2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 202 = F2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 202 202 d/dX* A3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 202 + d/dY* B3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 202 = F3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 202 202 with 'fixed' boundary conditions: 202 202 $$1 = FB1(X,Y) 202 $$2 = FB2(X,Y) 202 $$3 = FB3(X,Y) 202 202 or 'free' boundary conditions: 202 202 A1*nx + B1*ny = GB1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 202 A2*nx + B2*ny = GB2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 202 A3*nx + B3*ny = GB3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 202 202 where $$1(X,Y),$$2(X,Y),$$3(X,Y) are the unknowns and F1,A1,B1,F2, 202 A2,B2,F3,A3,B3,FB1,FB2,FB3,GB1,GB2,GB3 are user-supplied functions. 202 202 note: 202 (nx,ny) = unit outward normal to the boundary 202 $$1x = d($$1)/dX $$2x = d($$2)/dX $$3x = d($$3)/dX 202 $$1y = d($$1)/dY $$2y = d($$2)/dY $$3y = d($$3)/dY 202 202 Is this problem symmetric? If you don't want to read the FINE PRINT, 202 it is safe to enter 'no'. 202 202 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 202 + This problem is called symmetric if each of the matrices + 202 + + 202 + F1.$$1 F1.$$1x F1.$$1y F1.$$2 F1.$$2x F1.$$2y .. + 202 + A1.$$1 A1.$$1x A1.$$1y A1.$$2 A1.$$2x A1.$$2y .. + 202 + B1.$$1 B1.$$1x B1.$$1y B1.$$2 B1.$$2x B1.$$2y .. + 202 + F2.$$1 F2.$$1x F2.$$1y F2.$$2 F2.$$2x F2.$$2y .. + 202 + A2.$$1 A2.$$1x A2.$$1y A2.$$2 A2.$$2x A2.$$2y .. + 202 + B2.$$1 B2.$$1x B2.$$1y B2.$$2 B2.$$2x B2.$$2y .. + 202 + . . . . . . + 202 + . . . . . . + 202 + + 202 + and + 202 + GB1.$$1 GB1.$$2 GB1.$$3 + 202 + GB2.$$1 GB2.$$2 GB2.$$3 + 202 + GB3.$$1 GB3.$$2 GB3.$$3 + 202 + + 202 + is always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 202 + for the other terms. In addition, GB1,GB2,GB3 must not depend on + 202 + $$1x,$$1y,$$2x,$$2y,$$3x,$$3y. + 202 + + 202 + The memory and execution time are halved if the problem is known to + 202 + be symmetric. + 202 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 202 202 If you don't want to read the FINE PRINT, enter 'no'. 203 PDE2D solves the system of equations: 203 203 d/dX*A1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 203 +d/dY*B1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 203 = F1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 203 203 d/dX*A2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 203 +d/dY*B2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 203 = F2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 203 203 d/dX*A3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 203 +d/dY*B3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 203 = F3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 203 203 d/dX*A4(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 203 +d/dY*B4(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 203 = F4(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y..) 203 . 203 . 203 with 'fixed' boundary conditions: 203 203 $$1 = FB1(X,Y) 203 $$2 = FB2(X,Y) 203 $$3 = FB3(X,Y) 203 $$4 = FB4(X,Y) 203 . . 203 . . 203 or 'free' boundary conditions: 203 203 A1*nx + B1*ny = GB1(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 203 A2*nx + B2*ny = GB2(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 203 A3*nx + B3*ny = GB3(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 203 A4*nx + B4*ny = GB4(X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 203 . . . 203 . . . 203 where $$1(X,Y),$$2(X,Y),$$3(X,Y),$$4(X,Y)... are the unknowns and 203 FI,AI,BI,FBI,GBI are user-supplied functions. 203 203 note: 203 (nx,ny) = unit outward normal to the boundary 203 $$1x=d($$1)/dX $$2x=d($$2)/dX $$3x=d($$3)/dX $$4x=d($$4)/dX ... 203 $$1y=d($$1)/dY $$2y=d($$2)/dY $$3y=d($$3)/dY $$4y=d($$4)/dY ... 203 203 Is this problem symmetric? If you don't want to read the FINE PRINT, 203 it is safe to enter 'no'. 203 203 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 203 + This problem is called symmetric if each of the matrices + 203 + + 203 + F1.$$1 F1.$$1x F1.$$1y F1.$$2 F1.$$2x F1.$$2y .. + 203 + A1.$$1 A1.$$1x A1.$$1y A1.$$2 A1.$$2x A1.$$2y .. + 203 + B1.$$1 B1.$$1x B1.$$1y B1.$$2 B1.$$2x B1.$$2y .. + 203 + F2.$$1 F2.$$1x F2.$$1y F2.$$2 F2.$$2x F2.$$2y .. + 203 + A2.$$1 A2.$$1x A2.$$1y A2.$$2 A2.$$2x A2.$$2y .. + 203 + B2.$$1 B2.$$1x B2.$$1y B2.$$2 B2.$$2x B2.$$2y .. + 203 + . . . . . . + 203 + . . . . . . + 203 + and + 203 + GB1.$$1 GB1.$$2 GB1.$$3 GB1.$$4 .... + 203 + GB2.$$1 GB2.$$2 GB2.$$3 GB2.$$4 .... + 203 + GB3.$$1 GB3.$$2 GB3.$$3 GB3.$$4 .... + 203 + GB4.$$1 GB4.$$2 GB4.$$3 GB4.$$4 .... + 203 + . . . . + 203 + . . . . + 203 + is always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 203 + for the other terms. In addition, GB1,GB2,GB3,GB4... must not + 203 + depend on $$1x,$$1y,$$2x,$$2y,$$3x,$$3y,$$4x,$$4y... + 203 + + 203 + The memory and execution time are halved if the problem is known to + 203 + be symmetric. + 203 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 203 203 If you don't want to read the FINE PRINT, enter 'no'. 204 PDE2D solves the equation: 204 204 C(X,Y,T,$$1,$$1x,$$1y)*d($$1)/dT = 204 d/dX* A(X,Y,T,$$1,$$1x,$$1y) 204 + d/dY* B(X,Y,T,$$1,$$1x,$$1y) 204 - F(X,Y,T,$$1,$$1x,$$1y) 204 204 with 'fixed' boundary condition: 204 204 $$1 = FB(X,Y,T) 204 204 or 'free' boundary condition: 204 204 A*nx + B*ny = GB(X,Y,T,$$1,$$1x,$$1y) 204 204 and initial condition: 204 204 $$1 = $$10(X,Y) at T=T0 204 204 where $$1(X,Y,T) is the unknown and C,F,A,B,FB,GB,$$10 are 204 user-supplied functions. 204 204 note: 204 (nx,ny) = unit outward normal to the boundary 204 $$1x = d($$1)/dX 204 $$1y = d($$1)/dY 204 204 Is this problem symmetric? If you don't want to read the FINE PRINT, 204 it is safe to enter 'no'. 204 204 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 204 + This problem is called symmetric if the matrix + 204 + + 204 + F.$$1 F.$$1x F.$$1y + 204 + A.$$1 A.$$1x A.$$1y + 204 + B.$$1 B.$$1x B.$$1y + 204 + + 204 + is always symmetric, where F.$$1 means d(F)/d($$1), and similarly + 204 + for the other terms. In addition, GB must not depend on $$1x,$$1y. + 204 + + 204 + The memory and execution time are halved if the problem is known to + 204 + be symmetric. + 204 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 204D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 204D$ The Jacobian matrix is diagonal so, $ 204D$ enter: yes $ 204D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 205 PDE2D solves the system of equations: 205 205 C11(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y)*d($$1)/dT 205 + C12(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y)*d($$2)/dT = 205 d/dX* A1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 205 + d/dY* B1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 205 - F1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 205 C21(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y)*d($$1)/dT 205 + C22(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y)*d($$2)/dT = 205 d/dX* A2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 205 + d/dY* B2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 205 - F2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 205 205 with 'fixed' boundary conditions: 205 205 $$1 = FB1(X,Y,T) 205 $$2 = FB2(X,Y,T) 205 205 or 'free' boundary conditions: 205 205 A1*nx + B1*ny = GB1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 205 A2*nx + B2*ny = GB2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y) 205 205 and initial conditions: 205 205 $$1 = $$10(X,Y) at T=T0 205 $$2 = $$20(X,Y) 205 205 where $$1(X,Y,T) and $$2(X,Y,T) are the unknowns and C11,C12,F1,A1,B1, 205 C21,C22,F2,A2,B2,FB1,FB2,GB1,GB2,$$10,$$20 are user-supplied functions. 205 205 note: 205 (nx,ny) = unit outward normal to the boundary 205 $$1x = d($$1)/dX $$2x = d($$2)/dX 205 $$1y = d($$1)/dY $$2y = d($$2)/dY 205 205 Is this problem symmetric? If you don't want to read the FINE PRINT, 205 it is safe to enter 'no'. 205 205 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 205 + This problem is called symmetric if each of the matrices + 205 + + 205 + F1.$$1 F1.$$1x F1.$$1y F1.$$2 F1.$$2x F1.$$2y + 205 + A1.$$1 A1.$$1x A1.$$1y A1.$$2 A1.$$2x A1.$$2y + 205 + B1.$$1 B1.$$1x B1.$$1y B1.$$2 B1.$$2x B1.$$2y + 205 + F2.$$1 F2.$$1x F2.$$1y F2.$$2 F2.$$2x F2.$$2y + 205 + A2.$$1 A2.$$1x A2.$$1y A2.$$2 A2.$$2x A2.$$2y + 205 + B2.$$1 B2.$$1x B2.$$1y B2.$$2 B2.$$2x B2.$$2y + 205 + + 205 + C11 C12 + 205 + C21 C22 + 205 + and + 205 + GB1.$$1 GB1.$$2 + 205 + GB2.$$1 GB2.$$2 + 205 + + 205 + is always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 205 + for the other terms. In addition, GB1,GB2 must not depend on + 205 + $$1x,$$1y,$$2x,$$2y. + 205 + + 205 + The memory and execution time are halved if the problem is known to + 205 + be symmetric. + 205 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 205 205 If you don't want to read the FINE PRINT, enter 'no'. 205G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 205G$ It can be verified with some effort that the PDE system is symmetric,$ 205G$ and it will be seen later that GB1.E=GB2.H=0, so $ 205G$ enter: yes $ 205G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 206 PDE2D solves the system of equations: 206 206 C11(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y)*d($$1)/dT 206 + C12(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y)*d($$2)/dT 206 + C13(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y)*d($$3)/dT = 206 d/dX* A1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 206 + d/dY* B1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 206 - F1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 206 C21(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y)*d($$1)/dT 206 + C22(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y)*d($$2)/dT 206 + C23(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y)*d($$3)/dT = 206 d/dX* A2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 206 + d/dY* B2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 206 - F2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 206 C31(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y)*d($$1)/dT 206 + C32(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y)*d($$2)/dT 206 + C33(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y)*d($$3)/dT = 206 d/dX* A3(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 206 + d/dY* B3(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 206 - F3(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 206 206 with 'fixed' boundary conditions: 206 206 $$1 = FB1(X,Y,T) 206 $$2 = FB2(X,Y,T) 206 $$3 = FB3(X,Y,T) 206 206 or 'free' boundary conditions: 206 206 A1*nx + B1*ny = GB1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 206 A2*nx + B2*ny = GB2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 206 A3*nx + B3*ny = GB3(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y) 206 206 and initial conditions: 206 206 $$1 = $$10(X,Y) at T=T0 206 $$2 = $$20(X,Y) 206 $$3 = $$30(X,Y) 206 206 where $$1(X,Y,T),$$2(X,Y,T),$$3(X,Y,T) are the unknowns and C11,C12, 206 C13,F1,A1,B1,C21,C22,C23,F2,A2,B2,C31,C32,C33,F3,A3,B3,FB1,FB2,FB3, 206 GB1,GB2,GB3,$$10,$$20,$$30 are user-supplied functions. 206 206 note: 206 (nx,ny) = unit outward normal to the boundary 206 $$1x = d($$1)/dX $$2x = d($$2)/dX $$3x = d($$3)/dX 206 $$1y = d($$1)/dY $$2y = d($$2)/dY $$3y = d($$3)/dY 206 206 Is this problem symmetric? If you don't want to read the FINE PRINT, 206 it is safe to enter 'no'. 206 206 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 206 + This problem is called symmetric if each of the matrices + 206 + + 206 + F1.$$1 F1.$$1x F1.$$1y F1.$$2 F1.$$2x F1.$$2y .. + 206 + A1.$$1 A1.$$1x A1.$$1y A1.$$2 A1.$$2x A1.$$2y .. + 206 + B1.$$1 B1.$$1x B1.$$1y B1.$$2 B1.$$2x B1.$$2y .. + 206 + F2.$$1 F2.$$1x F2.$$1y F2.$$2 F2.$$2x F2.$$2y .. + 206 + A2.$$1 A2.$$1x A2.$$1y A2.$$2 A2.$$2x A2.$$2y .. + 206 + B2.$$1 B2.$$1x B2.$$1y B2.$$2 B2.$$2x B2.$$2y .. + 206 + . . . . . . + 206 + . . . . . . + 206 + + 206 + C11 C12 C13 + 206 + C21 C22 C23 + 206 + C31 C32 C33 + 206 + and + 206 + GB1.$$1 GB1.$$2 GB1.$$3 + 206 + GB2.$$1 GB2.$$2 GB2.$$3 + 206 + GB3.$$1 GB3.$$2 GB3.$$3 + 206 + + 206 + is always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 206 + for the other terms. In addition, GB1,GB2,GB3 must not depend on + 206 + $$1x,$$1y,$$2x,$$2y,$$3x,$$3y. + 206 + + 206 + The memory and execution time are halved if the problem is known to + 206 + be symmetric. + 206 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 206 206 If you don't want to read the FINE PRINT, enter 'no'. 207 PDE2D solves the system of equations: 207 207 C11(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$1)/dT 207 + C12(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$2)/dT 207 + C13(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$3)/dT 207 + C14(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$4)/dT...= 207 d/dX* A1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 207 + d/dY* B1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 207 - F1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 207 C21(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$1)/dT 207 + C22(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$2)/dT 207 + C23(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$3)/dT 207 + C24(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$4)/dT...= 207 d/dX* A2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 207 + d/dY* B2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 207 - F2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 207 C31(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$1)/dT 207 + C32(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$2)/dT 207 + C33(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$3)/dT 207 + C34(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$4)/dT...= 207 d/dX* A3(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 207 + d/dY* B3(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 207 - F3(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 207 C41(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$1)/dT 207 + C42(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$2)/dT 207 + C43(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$3)/dT 207 + C44(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...)*d($$4)/dT...= 207 d/dX* A4(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 207 + d/dY* B4(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 207 - F4(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y...) 207 . 207 . 207 with 'fixed' boundary conditions: 207 207 $$1 = FB1(X,Y,T) 207 $$2 = FB2(X,Y,T) 207 $$3 = FB3(X,Y,T) 207 $$4 = FB4(X,Y,T) 207 . . 207 . . 207 or 'free' boundary conditions: 207 207 A1*nx + B1*ny = GB1(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y..) 207 A2*nx + B2*ny = GB2(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y..) 207 A3*nx + B3*ny = GB3(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y..) 207 A4*nx + B4*ny = GB4(X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y..) 207 . . . 207 . . . 207 and initial conditions: 207 207 $$1 = $$10(X,Y) at T=T0 207 $$2 = $$20(X,Y) 207 $$3 = $$30(X,Y) 207 $$4 = $$40(X,Y) 207 . . 207 . . 207 where $$1(X,Y,T),$$2(X,Y,T),$$3(X,Y,T),$$4(X,Y,T)... are the unknowns 207 and CIJ,FI,AI,BI,FBI,GBI,$$10,$$20,$$30,$$40...are user-supplied 207 functions. 207 207 note: 207 (nx,ny) = unit outward normal to the boundary 207 $$1x=d($$1)/dX $$2x=d($$2)/dX $$3x=d($$3)/dX $$4x=d($$4)/dX ... 207 $$1y=d($$1)/dY $$2y=d($$2)/dY $$3y=d($$3)/dY $$4y=d($$4)/dY ... 207 207 Is this problem symmetric? If you don't want to read the FINE PRINT, 207 it is safe to enter 'no'. 207 207 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 207 + This problem is called symmetric if each of the matrices + 207 + + 207 + F1.$$1 F1.$$1x F1.$$1y F1.$$2 F1.$$2x F1.$$2y .. + 207 + A1.$$1 A1.$$1x A1.$$1y A1.$$2 A1.$$2x A1.$$2y .. + 207 + B1.$$1 B1.$$1x B1.$$1y B1.$$2 B1.$$2x B1.$$2y .. + 207 + F2.$$1 F2.$$1x F2.$$1y F2.$$2 F2.$$2x F2.$$2y .. + 207 + A2.$$1 A2.$$1x A2.$$1y A2.$$2 A2.$$2x A2.$$2y .. + 207 + B2.$$1 B2.$$1x B2.$$1y B2.$$2 B2.$$2x B2.$$2y .. + 207 + . . . . . . + 207 + . . . . . . + 207 + C11 C12 C13 C14 ... + 207 + C21 C22 C23 C24 ... + 207 + C31 C32 C33 C34 ... + 207 + C41 C42 C43 C44 ... + 207 + . . . . + 207 + . . . . + 207 + and + 207 + GB1.$$1 GB1.$$2 GB1.$$3 GB1.$$4 .... + 207 + GB2.$$1 GB2.$$2 GB2.$$3 GB2.$$4 .... + 207 + GB3.$$1 GB3.$$2 GB3.$$3 GB3.$$4 .... + 207 + GB4.$$1 GB4.$$2 GB4.$$3 GB4.$$4 .... + 207 + . . . . + 207 + . . . . + 207 + is always symmetric, where F1.$$1 means d(F1)/d($$1), and similarly + 207 + for the other terms. In addition, GB1,GB2,GB3,GB4... must not + 207 + depend on $$1x,$$1y,$$2x,$$2y,$$3x,$$3y,$$4x,$$4y... + 207 + + 207 + The memory and execution time are halved if the problem is known to + 207 + be symmetric. + 207 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 207 207 If you don't want to read the FINE PRINT, enter 'no'. 208 Enter FORTRAN expressions for the functions whose integrals are to be 208 calculated and printed. They may be functions of 208 208 X,Y,$$1,$$1x,$$1y and (if applicable) T 208 208 The integrals may also contain references to the initial triangle 208 number KTRI. 208 208 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 208 + If you only want to integrate a function over part of the region, + 208 + define that function to be zero in the rest of the region. + 208 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 208B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 208B$ We want to calculate the L1 norm of the error, so $ 208B$ enter: INTEGRAL = ABS(U-TRUE(X,Y)) $ 208B$ where TRUE(X,Y) is the true solution, to be defined later. $ 208B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 209 Enter FORTRAN expressions for the functions whose integrals are to be 209 calculated and printed. They may be functions of 209 209 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y and (if applicable) T 209 209 The integrals may also contain references to the initial triangle 209 number KTRI. 209 209 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 209 + If you only want to integrate a function over part of the region, + 209 + define that function to be zero in the rest of the region. + 209 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 209A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 209A$ It can be shown that for this problem, the integral of (Uxx+Uyy)^2 $ 209A$ is equal to -U(0,0) = 0.0464. As a check on the solution, $ 209A$ enter: INTEGRAL = V**2 $ 209A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 209E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 209E$ We will calculate the total volume change by integrating 2*(Ux+Vy) $ 209E$ over the half-block. (Correct value is about 0.00333.) $ 209E$ enter: INTEGRAL = 2*(Ux+Vy) $ 209E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 209G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 209G$ We will integrate abs(H)+abs(E), and identify eigenvalues as those $ 209G$ values of beta (=T) which make this solution norm large. $ 209G$ enter: INTEGRAL = ABS(H)+ABS(E) $ 209G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 210 Enter FORTRAN expressions for the functions whose integrals are to be 210 calculated and printed. They may be functions of 210 210 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y and (if applicable) T 210 210 The integrals may also contain references to the initial triangle 210 number KTRI. 210 210 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 210 + If you only want to integrate a function over part of the region, + 210 + define that function to be zero in the rest of the region. + 210 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 211 Enter FORTRAN expressions for the functions whose integrals are to be 211 calculated and printed. They may be functions of 211 211 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y... 211 and (if applicable) T 211 211 The integrals may also contain references to the initial triangle 211 number KTRI. 211 211 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 211 + If you only want to integrate a function over part of the region, + 211 + define that function to be zero in the rest of the region. + 211 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 212 Enter FORTRAN expressions for the functions whose integrals are to be 212 calculated and printed. They may be functions of 212 212 X,Y,$$1,$$1x,$$1y and (if applicable) T 212 212 The components (NORMx,NORMy) of the unit outward normal vector, and the 212 initial triangle number KTRI, and the boundary arc number IARC may also 212 be referenced. You can also reference the normal derivative $$1norm. 212 212 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 212 + CURVED interior interface arcs are considered part of the boundary, + 212 + for the boundary integral computations, ONLY IF they have arc numbers+ 212 + in the range 8000-8999. In this case, since an interface arc is + 212 + considered to be a boundary for both of the subregions it separates, + 212 + the boundary integral will be computed twice on each curved + 212 + interface arc, once with (NORMx,NORMy) defined in each direction. + 212 + + 212 + If you only want to integrate a function over part of the boundary, + 212 + define that function to be zero on the rest of the boundary. You + 212 + can examine the point (X,Y) to determine if it is on the desired + 212 + boundary segment, or the boundary arc number IARC, or the initial + 212 + triangle number KTRI (if INTRI=3), + 212 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 212D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 212D$ We want to calculate the total boundary flux, which is the integral $ 212D$ of dZ/dn = Znorm = Zx*NORMx + Zy*NORMy, so $ 212D$ enter: BND. INTEGRAL = Znorm $ 212D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 213 Enter FORTRAN expressions for the functions whose integrals are to be 213 calculated and printed. They may be functions of 213 213 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y and (if applicable) T 213 213 The components (NORMx,NORMy) of the unit outward normal vector, and the 213 initial triangle number KTRI, and the boundary arc number IARC may also 213 be referenced. You can also reference the normal derivatives $$1norm, 213 $$2norm. 213 213 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 213 + CURVED interior interface arcs are considered part of the boundary, + 213 + for the boundary integral computations, ONLY IF they have arc numbers+ 213 + in the range 8000-8999. In this case, since an interface arc is + 213 + considered to be a boundary for both of the subregions it separates, + 213 + the boundary integral will be computed twice on each curved + 213 + interface arc, once with (NORMx,NORMy) defined in each direction. + 213 + + 213 + If you only want to integrate a function over part of the boundary, + 213 + define that function to be zero on the rest of the boundary. You + 213 + can examine the point (X,Y) to determine if it is on the desired + 213 + boundary segment, or the boundary arc number IARC, or the initial + 213 + triangle number KTRI (if INTRI=3), + 213 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 213A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 213A$ Since Vxx+Vyy=-DEL(x,y), by the divergence theorem the integral of $ 213A$ Vnorm = Vx*NORMx + Vy*NORMy should be -1.0, so as an accuracy check $ 213A$ enter: BND. INTEGRAL = Vnorm $ 213A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 214 Enter FORTRAN expressions for the functions whose integrals are to be 214 calculated and printed. They may be functions of 214 214 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y and (if applicable) T 214 214 The components (NORMx,NORMy) of the unit outward normal vector, and the 214 initial triangle number KTRI, and the boundary arc number IARC may also 214 be referenced. You can also reference the normal derivatives $$1norm, 214 $$2norm,$$3norm. 214 214 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 214 + CURVED interior interface arcs are considered part of the boundary, + 214 + for the boundary integral computations, ONLY IF they have arc numbers+ 214 + in the range 8000-8999. In this case, since an interface arc is + 214 + considered to be a boundary for both of the subregions it separates, + 214 + the boundary integral will be computed twice on each curved + 214 + interface arc, once with (NORMx,NORMy) defined in each direction. + 214 + + 214 + If you only want to integrate a function over part of the boundary, + 214 + define that function to be zero on the rest of the boundary. You + 214 + can examine the point (X,Y) to determine if it is on the desired + 214 + boundary segment, or the boundary arc number IARC, or the initial + 214 + triangle number KTRI (if INTRI=3), + 214 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 215 Enter FORTRAN expressions for the functions whose integrals are to be 215 calculated and printed. They may be functions of 215 215 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y... 215 and (if applicable) T 215 215 The components (NORMx,NORMy) of the unit outward normal vector, and the 215 initial triangle number KTRI, and the boundary arc number IARC may also 215 be referenced. You can also reference the normal derivatives $$1norm, 215 $$2norm,$$3norm,$$4norm... 215 215 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 215 + CURVED interior interface arcs are considered part of the boundary, + 215 + for the boundary integral computations, ONLY IF they have arc numbers+ 215 + in the range 8000-8999. In this case, since an interface arc is + 215 + considered to be a boundary for both of the subregions it separates, + 215 + the boundary integral will be computed twice on each curved + 215 + interface arc, once with (NORMx,NORMy) defined in each direction. + 215 + + 215 + If you only want to integrate a function over part of the boundary, + 215 + define that function to be zero on the rest of the boundary. You + 215 + can examine the point (X,Y) to determine if it is on the desired + 215 + boundary segment, or the boundary arc number IARC, or the initial + 215 + triangle number KTRI (if INTRI=3), + 215 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 216 If you don't want to read the FINE PRINT, enter 'no'. 216 216 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 216 + Do you have point source terms in your PDEs, involving "Dirac Delta" + 216 + functions? A Dirac Delta function DEL(x-xd0,y-yd0) is a function + 216 + whose integral is 1, but which is zero everywhere except at a + 216 + singular point (xd0,yd0). + 216 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 216A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 216A$ enter: yes $ 216A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 216B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 216B$ enter: no $ 216B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 216D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 216D$ enter: no $ 216D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 216E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 216E$ enter: no $ 216E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 216G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 216G$ enter: no $ 216G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 216H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 216H$ enter: no $ 216H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 217 Enter the number of points (NDEL) at which Dirac Delta functions are 217 to be defined, then the coordinates (XD0(L),YD0(L)), L=1,...,NDEL 217 of these points. 217A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 217A$ enter: NDEL = 1 $ 217A$ XD0(1) = 0.0 $ 217A$ YD0(1) = 0.0 $ 217A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 218 The PDE coefficient Fi (i=1,...,NEQN) may include point source terms 218 of the form 218 DELAMP(1,i)*DEL(X-XD0(1),Y-YD0(1)) + ... 218 + DELAMP(NDEL,i)*DEL(X-XD0(NDEL),Y-YD0(NDEL)) 218 Enter the Delta function amplitudes (DELAMP), which may be constants 218 or (if applicable) functions of T. When you are later prompted for the 218 coefficients Fi, do NOT include these point source terms then. 218A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 218A$ enter: DELAMP(1,1) = 0 $ 218A$ DELAMP(1,2) = -1 $ 218A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 219 Now enter FORTRAN expressions to define the PDE coefficients. 219 RHO may be a function of X,Y. The other coefficients may be functions 219 of 219 219 X,Y,$$1,$$1x,$$1y 219 219 All coefficients may also reference the initial triangle number KTRI. 219 219 Recall that the PDE has the form 219 219 d/dX*A + d/dY*B = F + lambda*RHO*$$1 219 219C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 219C$ The partial differential equation may be written $ 219C$ $ 219C$ d/dX*(-D(X,Y)*QQx) + d/dY*(-D(X,Y)*QQy) = lambda*1.0*QQ $ 219C$ $ 219C$ When asked if you want to write a FORTRAN block, $ 219C$ enter: yes $ 219C$ then, when prompted, define D as a function of the initial $ 219C$ triangle number, KTRI: $ 219C$ IF (KTRI.LE.4) D = D1 $ 219C$ IF (KTRI.GE.5) D = D2 $ 219C$ [blank line] $ 219C$ then enter the following, when prompted: $ 219C$ F = 0.0 A = -D*QQx B = -D*QQy RHO = 1.0 $ 219C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 220 Now enter FORTRAN expressions to define the PDE coefficients. 220 RHO11,RHO12,RHO21,RHO22 may be functions of X,Y. The other 220 coefficients may be functions of 220 220 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y 220 220 All coefficients may also reference the initial triangle number KTRI. 220 220 Recall that the PDEs have the form 220 220 d/dX*A1 + d/dY*B1 = F1 + lambda*(RHO11*$$1 + RHO12*$$2) 220 d/dX*A2 + d/dY*B2 = F2 + lambda*(RHO21*$$1 + RHO22*$$2) 220 221 Now enter FORTRAN expressions to define the PDE coefficients. 221 RHO11,RHO12,RHO13,RHO21,RHO22,RHO23,RHO31,RHO32,RHO33 may be 221 functions of X,Y. The other coefficients may be functions of 221 221 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y 221 221 All coefficients may also reference the initial triangle number KTRI. 221 221 Recall that the PDEs have the form 221 221 d/dX*A1 + d/dY*B1 = F1 + lambda*(RHO11*$$1 + RHO12*$$2 + RHO13*$$3) 221 d/dX*A2 + d/dY*B2 = F2 + lambda*(RHO21*$$1 + RHO22*$$2 + RHO23*$$3) 221 d/dX*A3 + d/dY*B3 = F3 + lambda*(RHO31*$$1 + RHO32*$$2 + RHO33*$$3) 221 222 Now enter FORTRAN expressions to define the PDE coefficients. The 222 RHOIJ may be functions of X,Y. The other coefficients may be functions 222 of 222 222 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y... 222 222 All coefficients may also reference the initial triangle number KTRI. 222 222 Recall that the PDEs have the form 222 222 d/dX*A1+d/dY*B1 = F1+lambda*(RHO11*$$1+RHO12*$$2+RHO13*$$3+RHO14*$$4..) 222 d/dX*A2+d/dY*B2 = F2+lambda*(RHO21*$$1+RHO22*$$2+RHO23*$$3+RHO24*$$4..) 222 d/dX*A3+d/dY*B3 = F3+lambda*(RHO31*$$1+RHO32*$$2+RHO33*$$3+RHO34*$$4..) 222 d/dX*A4+d/dY*B4 = F4+lambda*(RHO41*$$1+RHO42*$$2+RHO43*$$3+RHO44*$$4..) 222 . . 222 . . 222 223 Now enter FORTRAN expressions to define the PDE coefficients, which 223 may be functions of 223 223 X,Y,$$1,$$1x,$$1y 223 223 They may also be functions of the initial triangle number KTRI 223 and, in some cases, of the parameter T. 223 223 Recall that the PDE has the form 223 223 d/dX*A + d/dY*B = F 223 223B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 223B$ The partial differential equation may be written $ 223B$ $ 223B$ d/dX*(Ux) + d/dY*(Uy) = U**3 $ 223B$ $ 223B$ When asked if you want to write a FORTRAN block, $ 223B$ enter: no $ 223B$ then enter the following, when prompted: $ 223B$ F = U**3 A = Ux B = Uy $ 223B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 224 Now enter FORTRAN expressions to define the PDE coefficients, which 224 may be functions of 224 224 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y 224 224 They may also be functions of the initial triangle number KTRI 224 and, in some cases, of the parameter T. 224 224 Recall that the PDEs have the form 224 224 d/dX*A1 + d/dY*B1 = F1 224 d/dX*A2 + d/dY*B2 = F2 224 224A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 224A$ The partial differential equations may be written $ 224A$ $ 224A$ d/dX*(Ux) + d/dY*(Uy) = V $ 224A$ d/dX*(Vx) + d/dY*(Vy) = -DEL(x,y) $ 224A$ $ 224A$ When asked if you want to write a FORTRAN block, $ 224A$ enter: no $ 224A$ then enter the following, when prompted (recall that the delta $ 224A$ function is already included in F2): $ 224A$ F1 = V A1 = Ux B1 = Uy $ 224A$ F2 = 0 A2 = Vx B2 = Vy $ 224A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 224E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 224E$ The partial differential equations may be written $ 224E$ $ 224E$ d/dX*(s11) + d/dY*(s12) = 0 $ 224E$ d/dX*(s12) + d/dY*(s22) = 0 $ 224E$ where $ 224E$ s11 = E*(e11 + vnu*e22)/(1-vnu**2) $ 224E$ s22 = E*(vnu*e11 + e22)/(1-vnu**2) $ 224E$ s12 = 0.5*E*e12/(1+vnu) $ 224E$ and $ 224E$ e11 = Ux - al*(Z(x,y) - ZINIT) $ 224E$ e22 = Vy - al*(Z(x,y) - ZINIT) $ 224E$ e12 = Uy + Vx $ 224E$ $ 224E$ When asked if you want to write a FORTRAN block, $ 224E$ enter: yes $ 224E$ then, when prompted, define: $ 224E$ E11 = Ux - AL*(Z(X,Y) - ZINIT) $ 224E$ E22 = Vy - AL*(Z(X,Y) - ZINIT) $ 224E$ E12 = Uy + Vx $ 224E$ S11 = E*(E11 + VNU*E22)/(1-VNU**2) $ 224E$ S22 = E*(VNU*E11 + E22)/(1-VNU**2) $ 224E$ S12 = 0.5*E*E12/(1+VNU) $ 224E$ [blank line] $ 224E$ (The function Z(X,Y) will be defined later by interpolating the $ 224E$ tabular output created by example 4.) $ 224E$ then enter the following, when prompted: $ 224E$ F1 = 0 A1 = S11 B1 = S12 $ 224E$ F2 = 0 A2 = S12 B2 = S22 $ 224E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 224H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 224H$ The partial differential equations may be written $ 224H$ $ 224H$ (-P + 2*Visc*Ux)x + (Visc*(Uy+Vx))y = Rho*(U*Ux+V*Uy) $ 224H$ (Visc*(Uy+Vx))x + (-P + 2*Visc*Vy)y = Rho*(U*Vx+V*Vy) $ 224H$ $ 224H$ where Visc = 0.002 $ 224H$ Rho = 1 $ 224H$ P = -alpha*Visc*(Ux+Vy) $ 224H$ We parameterize this nonlinear problem by increasing the density $ 224H$ gradually from Rho=0 at T=1 to Rho=1.0 for T>5. Thus on the first $ 224H$ Newton iteration the problem is linear and initial values U0=V0=0 $ 224H$ can be used, and on the final iterations the original nonlinear $ 224H$ problem is solved. $ 224H$ $ 224H$ When asked if you want to write a FORTRAN block, $ 224H$ enter: yes $ 224H$ then, when prompted, define: $ 224H$ Visc = 0.002 $ 224H$ Rho = 1.0*MIN(1.D0,(T-1.0)/5.D0) $ 224H$ P = -alpha*Visc*(Ux+Vy) $ 224H$ [blank line] $ 224H$ then enter the following, when prompted: $ 224H$ F1 = Rho*(U*Ux+V*Uy) A1 = -P+2*Visc*Ux B1 = Visc*(Uy+Vx) $ 224H$ F2 = Rho*(U*Vx+V*Vy) A2 = Visc*(Uy+Vx) B2 = -P+2*Visc*Vy $ 224H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 225 Now enter FORTRAN expressions to define the PDE coefficients, which 225 may be functions of 225 225 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y 225 225 They may also be functions of the initial triangle number KTRI 225 and, in some cases, of the parameter T. 225 225 Recall that the PDEs have the form 225 225 d/dX*A1 + d/dY*B1 = F1 225 d/dX*A2 + d/dY*B2 = F2 225 d/dX*A3 + d/dY*B3 = F3 225 226 Now enter FORTRAN expressions to define the PDE coefficients, which 226 may be functions of 226 226 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y... 226 226 They may also be functions of the initial triangle number KTRI 226 and, in some cases, of the parameter T. 226 226 Recall that the PDEs have the form 226 226 d/dX*A1 + d/dY*B1 = F1 226 d/dX*A2 + d/dY*B2 = F2 226 d/dX*A3 + d/dY*B3 = F3 226 d/dX*A4 + d/dY*B4 = F4 226 . . 226 . . 227 Now enter FORTRAN expressions to define the PDE coefficients, which 227 may be functions of 227 227 X,Y,T,$$1,$$1x,$$1y 227 227 They may also be functions of the initial triangle number KTRI. 227 227 Recall that the PDE has the form 227 227 C*d($$1)/dT = d/dX*A + d/dY*B - F 227 227D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 227D$ The partial differential equation may be written $ 227D$ $ 227D$ 1.0*Zt = d/dX*(Zx) + d/dY*(Zy) $ 227D$ $ 227D$ When asked if you want to write a FORTRAN block, $ 227D$ enter: no $ 227D$ then enter the following, when prompted: $ 227D$ C = 1 F = 0 A = Zx B = Zy $ 227D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 228 Now enter FORTRAN expressions to define the PDE coefficients, which 228 may be functions of 228 228 X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y 228 228 They may also be functions of the initial triangle number KTRI. 228 228 Recall that the PDEs have the form 228 228 C11*d($$1)/dT + C12*d($$2)/dT = d/dX*A1 + d/dY*B1 - F1 228 C21*d($$1)/dT + C22*d($$2)/dT = d/dX*A2 + d/dY*B2 - F2 228 228G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 228G$ The partial differential equations may be written $ 228G$ $ 228G$ 0 = (E2)x + (-E1)y + w*amu*H + G1(X,Y) $ 228G$ 0 = (-H2)x + (H1)y + w*eps*E + G2(X,Y) $ 228G$ where $ 228G$ E1 = (-w*amu*Hy - beta*Ex)/(w**2*amu*eps - beta**2) $ 228G$ E2 = (w*amu*Hx - beta*Ey)/(w**2*amu*eps - beta**2) $ 228G$ H1 = (w*eps*Ey - beta*Hx)/(w**2*amu*eps - beta**2) $ 228G$ H2 = (-w*eps*Ex - beta*Hy)/(w**2*amu*eps - beta**2) $ 228G$ G1,G2 = "random" nonhomogeneous terms $ 228G$ $ 228G$ When asked if you want to write a FORTRAN block, $ 228G$ enter: yes $ 228G$ then, when prompted, define: $ 228G$ IF (ABS(X).LE.1.E-6 .AND. ABS(Y).LE.1.E-6) THEN $ 228G$ C GLASS REGION $ 228G$ EPS = 8.854 E-12*1.55**2 $ 228G$ ELSE $ 228G$ C SILICA REGION $ 228G$ EPS = 8.854 E-12*1.50**2 $ 228G$ ENDIF $ 228G$ BETA = T $ 228G$ DENOM = W**2*AMU*EPS - BETA**2 $ 228G$ E1 = (-W*AMU*Hy - BETA*Ex)/DENOM $ 228G$ E2 = ( W*AMU*Hx - BETA*Ey)/DENOM $ 228G$ H1 = ( W*EPS*Ey - BETA*Hx)/DENOM $ 228G$ H2 = (-W*EPS*Ex - BETA*Hy)/DENOM $ 228G$ G1 = SIN(X/0.1E-6 + Y/0.2E-6) $ 228G$ G2 = SIN(X/0.2E-6 + Y/0.1E-6) $ 228G$ [blank line] $ 228G$ then enter the following, when prompted: $ 228G$ C11 = C12 = 0 F1 = -W*AMU*H - G1 A1 = E2 B1 = -E1 $ 228G$ C21 = C22 = 0 F2 = -W*EPS*E - G2 A2 = -H2 B2 = H1 $ 228G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 229 Now enter FORTRAN expressions to define the PDE coefficients, which 229 may be functions of 229 229 X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y 229 229 They may also be functions of the initial triangle number KTRI. 229 229 Recall that the PDEs have the form 229 229 C11*d($$1)/dT + C12*d($$2)/dT + C13*d($$3)/dT = d/dX*A1 + d/dY*B1 - F1 229 C21*d($$1)/dT + C22*d($$2)/dT + C23*d($$3)/dT = d/dX*A2 + d/dY*B2 - F2 229 C31*d($$1)/dT + C32*d($$2)/dT + C33*d($$3)/dT = d/dX*A3 + d/dY*B3 - F3 229 230 Now enter FORTRAN expressions to define the PDE coefficients, which 230 may be functions of 230 230 X,Y,T,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y... 230 230 They may also be functions of the initial triangle number KTRI. 230 230 Recall that the PDEs have the form 230 230 C11*d($$1)/dT + C12*d($$2)/dT + C13*d($$3)/dT + C14*d($$4)/dT +... 230 = d/dX*A1 + d/dY*B1 - F1 230 C21*d($$1)/dT + C22*d($$2)/dT + C23*d($$3)/dT + C24*d($$4)/dT +... 230 = d/dX*A2 + d/dY*B2 - F2 230 C31*d($$1)/dT + C32*d($$2)/dT + C33*d($$3)/dT + C34*d($$4)/dT +... 230 = d/dX*A3 + d/dY*B3 - F3 230 C41*d($$1)/dT + C42*d($$2)/dT + C43*d($$3)/dT + C44*d($$4)/dT +... 230 = d/dX*A4 + d/dY*B4 - F4 230 . . 230 . . 231 If you don't want to read the FINE PRINT, default the initial values. 231 231 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 231 + Now the initial values for the inverse power method may be defined + 231 + using FORTRAN expressions. They may be functions of X and Y, and + 231 + also of the initial triangle number KTRI. + 231 + + 231 + By default, the initial values are generated by a random number + 231 + generator. This virtually eliminates any possibility of convergence + 231 + to the wrong eigenvalue, due to an unlucky choice of initial values. + 231 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 231C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 231C$ Press [RETURN] to default QQ0 $ 231C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 232 Now the initial values for Newton's method must be defined using 232 FORTRAN expressions. They may be functions of X and Y, and of the 232 initial triangle number KTRI. 232 232 It is important to provide initial values which are at least of the 232 correct order of magnitude. 232B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 232B$ enter: U0 = 1.0 $ 232B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 232H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 232H$ press [RETURN] to default U0 and V0 $ 232H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 233 Now the initial values must be defined using FORTRAN expressions. 233 They may be functions of X and Y, and of the initial triangle number 233 KTRI. They may also reference the initial time T0. 233D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 233D$ enter: Z0 = ZINIT $ 233D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 233G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 233G$ press [RETURN] to default H0 and E0 $ 233G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 234 Now the 'fixed' boundary conditions are described. 234 234 Are there any boundary arcs with negative arc numbers, where nonzero 234 'fixed' boundary conditions must be specified? (The boundary 234 conditions on arcs with negative numbers default to FB=0.) 234A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 234A$ All boundary conditions may be defaulted to U=V=0, so $ 234A$ enter: no $ 234A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 234B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 234B$ enter: yes $ 234B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 234D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 234D$ enter: yes $ 234D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 234E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 234E$ On the only arc with negative arc number (-1), U and V may be $ 234E$ defaulted to 0, so $ 234E$ enter: no $ 234E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 234G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 234G$ enter: no $ 234G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 234H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 234H$ enter: yes $ 234H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 235 Enter the arc number (IARC) of a boundary arc with negative arc number. 235B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 235B$ enter: IARC = -1 $ 235B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 235D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 235D$ enter: IARC = -1 $ 235D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 235H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 235H$ enter: IARC = -1 $ 235H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 236 Enter a FORTRAN expression to define FB on this arc. It may be a 236 function of X,Y and (if applicable) T. 236 236 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 236 + This function may also reference the initial triangle number KTRI, + 236 + and the arc parameter S (S = P or Q when INTRI=2). + 236 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 236 236 Recall that fixed boundary conditions have the form 236 236 $$1 = FB 236 236B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 236B$ enter: FB = 1.0/R0 $ 236B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 236D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 236D$ enter: FB = ZWALL $ 236D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 237 Enter FORTRAN expressions to define FB1,FB2 on this arc. They may 237 be functions of X,Y and (if applicable) T. 237 237 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 237 + These functions may also reference the initial triangle number KTRI, + 237 + and the arc parameter S (S = P or Q when INTRI=2). + 237 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 237 237 Recall that fixed boundary conditions have the form 237 237 $$1 = FB1 237 $$2 = FB2 237 237H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 237H$ enter: FB1 = 0.0 $ 237H$ FB2 = -X*(1-X) $ 237H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 238 Enter FORTRAN expressions to define FB1,FB2,FB3 on this arc. They may 238 be functions of X,Y and (if applicable) T. 238 238 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 238 + These functions may also reference the initial triangle number KTRI, + 238 + and the arc parameter S (S = P or Q when INTRI=2). + 238 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 238 238 Recall that fixed boundary conditions have the form 238 238 $$1 = FB1 238 $$2 = FB2 238 $$3 = FB3 238 239 Enter FORTRAN expressions to define FB1,FB2,FB3,FB4... on this arc. 239 They may be functions of X,Y and (if applicable) T. 239 239 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 239 + These functions may also reference the initial triangle number KTRI, + 239 + and the arc parameter S (S = P or Q when INTRI=2). + 239 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 239 239 Recall that fixed boundary conditions have the form 239 239 $$1 = FB1 239 $$2 = FB2 239 $$3 = FB3 239 $$4 = FB4 239 . 239 . 240 Are there any more negative arcs, with nonzero boundary conditions? 240B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 240B$ enter: no $ 240B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 240D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 240D$ enter: no $ 240D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 240H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 240H$ On the other arcs with negative arc numbers (-2 and -3), the $ 240H$ boundary conditions may be defaulted to FB1=FB2=0, so $ 240H$ enter: no $ 240H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 241 Now the 'free' boundary conditions are described. 241 241 Are there any boundary arcs with positive (but < 1000) arc numbers, 241 where nonzero 'free' boundary conditions must be specified? (The 241 boundary conditions on arcs with positive numbers default to GB=0.) 241A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 241A$ enter: no $ 241A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 241B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 241B$ enter: yes $ 241B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 241C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 241C$ On the only arc with positive arc number (1), the boundary condition $ 241C$ is GB = A*nx+B*ny = -D*QQx*nx - D*QQy*ny = -D*dQQ/dn = 0 $ 241C$ and GB can be defaulted to 0, so $ 241C$ enter: no $ 241C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 241D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 241D$ enter: yes $ 241D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 241E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 241E$ enter: yes $ 241E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 241G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 241G$ enter: yes $ 241G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 241H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 241H$ On the only arc with positive arc number (1), the normal vector is $ 241H$ (nx,ny) = (1,0), so the boundary conditions are $ 241H$ GB1 = A1*nx+B1*ny = A1 = -P+2*Visc*Ux = 0 $ 241H$ GB2 = A2*nx+B2*ny = A2 = Visc*(Uy+Vx) = 0 $ 241H$ and GB1,GB2 can be defaulted to zero, so $ 241H$ enter: no $ 241H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 242 Enter the arc number (IARC) of a boundary arc with positive arc number. 242B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 242B$ enter: IARC = 1 $ 242B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 242D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 242D$ enter: IARC = 2 $ 242D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 242E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 242E$ enter: IARC = 3 $ 242E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 242G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 242G$ enter: IARC = 1 $ 242G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 243 Enter FORTRAN expressions to define the following free boundary 243 condition functions on this arc. They may be functions of 243 243 X,Y,$$1,$$1x,$$1y and (if applicable) T 243 243 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 243 + These functions may also reference the components (NORMx,NORMy) of + 243 + the unit outward normal vector, the initial triangle number KTRI, + 243 + and the arc parameter S (S = P or Q when INTRI=2). + 243 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 243 243 Recall that free boundary conditions have the form 243 243 A*nx+B*ny = GB 243 243B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 243B$ Recall that GB = A*nx+B*ny = Ux*nx+Uy*ny = dU/dn = -1/R1**2 $ 243B$ Thus enter, when prompted: $ 243B$ GB = -1.0/R1**2 $ 243B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 243D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 243D$ Recall that at the metal-air boundary (arcs number 2) $ 243D$ GB = A*nx+B*ny = Zx*nx+Zy*ny = dZ/dn = -1.E-9*(Z**4 - ZINIT**4) $ 243D$ Thus enter, when prompted: $ 243D$ GB = -1.E-9*(Z**4 - ZINIT**4) $ 243D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 244 Enter FORTRAN expressions to define the following free boundary 244 condition functions on this arc. They may be functions of 244 244 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y and (if applicable) T 244 244 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 244 + These functions may also reference the components (NORMx,NORMy) of + 244 + the unit outward normal vector, the initial triangle number KTRI, + 244 + and the arc parameter S (S = P or Q when INTRI=2). + 244 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 244 244 Recall that free boundary conditions have the form 244 244 A1*nx+B1*ny = GB1 244 A2*nx+B2*ny = GB2 244 244 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 244 + Note that 'fixed' boundary conditions: + 244 + Ui = FBi(X,Y,[T]) + 244 + can be expressed as 'free' boundary conditions in the form: + 244 + GBi = zero(Ui-FBi(X,Y,[T])) + 244 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 244E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 244E$ Recall that along the line of symmetry (arc number 3, X=0) we have $ 244E$ (nx,ny) = (-1,0) and U=s12=0, so we can set $ 244E$ GB1 = A1*nx + B1*ny = -A1 = -s11 = zero(U) $ 244E$ GB2 = A2*nx + B2*ny = -A2 = -s12 = 0 $ 244E$ The first boundary condition is (almost) equivalent to U=0. $ 244E$ Thus enter, when prompted: $ 244E$ GB1 = zero(U) $ 244E$ GB2 = 0.0 $ 244E$++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 244E$ Note: this "symmetry" boundary condition is the same as the "free- + 244E$ slip" boundary condition, which requires that the normal velocity + 244E$ and tangential force both be 0. This can be imposed by setting: + 244E$ GB1 = Big_number*NORMx*(U*NORMx+V*NORMy) + 244E$ GB2 = Big_number*NORMy*(U*NORMx+V*NORMy) + 244E$ so that U*NORMx+V*NORMy, the normal velocity, is 0; the tangential + 244E$ force, NORMy*GB1-NORMx*GB2=0 also. On vertical or horizontal + 244E$ boundaries such as the above (NORMx=0 or NORMy=0), Big_number can be + 244E$ arbitrarily large; in the general case, however, choosing Big_number + 244E$ too large may result in an ill-conditioned matrix. + 244E$+++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 244E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 244G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 244G$ Recall that on the entire boundary we have dH/dn=E=0, and thus $ 244G$ dE/ds=tangential derivative=0 also, so $ 244G$ GB1 = A1*nx + B1*ny = E2*nx - E1*ny $ 244G$ = (w*amu*dH/dn - beta*dE/ds)/(w**2*amu*eps-beta**2) = 0 $ 244G$ GB2 = A2*nx + B2*ny = -H2*nx + H1*ny $ 244G$ = (w*eps*dE/dn + beta*dH/ds)/(w**2*amu*eps-beta**2) = zero(E) $ 244G$ The second boundary condition is (almost) equivalent to E=0. $ 244G$ Thus enter, when prompted: $ 244G$ GB1 = 0.0 $ 244G$ GB2 = zero(E) $ 244G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 245 Enter FORTRAN expressions to define the following free boundary 245 condition functions on this arc. They may be functions of 245 245 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y and (if applicable) T 245 245 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 245 + These functions may also reference the components (NORMx,NORMy) of + 245 + the unit outward normal vector, the initial triangle number KTRI, + 245 + and the arc parameter S (S = P or Q when INTRI=2). + 245 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 245 245 Recall that free boundary conditions have the form 245 245 A1*nx+B1*ny = GB1 245 A2*nx+B2*ny = GB2 245 A3*nx+B3*ny = GB3 245 245 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 245 + Note that 'fixed' boundary conditions: + 245 + Ui = FBi(X,Y,[T]) + 245 + can be expressed as 'free' boundary conditions in the form: + 245 + GBi = zero(Ui-FBi(X,Y,[T])) + 245 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 246 Enter FORTRAN expressions to define the following free boundary 246 condition functions on this arc. They may be functions of 246 246 X,Y,$$1,$$1x,$$1y,$$2,$$2x,$$2y,$$3,$$3x,$$3y,$$4,$$4x,$$4y... 246 and (if applicable) T 246 246 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 246 + These functions may also reference the components (NORMx,NORMy) of + 246 + the unit outward normal vector, the initial triangle number KTRI, + 246 + and the arc parameter S (S = P or Q when INTRI=2). + 246 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 246 246 Recall that free boundary conditions have the form 246 246 A1*nx+B1*ny = GB1 246 A2*nx+B2*ny = GB2 246 A3*nx+B3*ny = GB3 246 A4*nx+B4*ny = GB4 246 . . . 246 . . . 246 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 246 + Note that 'fixed' boundary conditions: + 246 + Ui = FBi(X,Y,[T]) + 246 + can be expressed as 'free' boundary conditions in the form: + 246 + GBi = zero(Ui-FBi(X,Y,[T])) + 246 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 247 Are there any more positive arcs, with nonzero boundary conditions? 247B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 247B$ enter: no $ 247B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 247D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 247D$ On the only other arc with positive arc number (3), GB may be $ 247D$ defaulted, since GB = dZ/dn = 0 there, so $ 247D$ enter: no $ 247D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 247E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 247E$ On the only other arc with positive arc number (2), GB1 and GB2 may $ 247E$ be defaulted, since GB1 = A1*nx + B1*ny = s11*nx + s12*ny = 0 $ 247E$ and GB2 = A2*nx + B2*ny = s12*nx + s22*ny = 0, so $ 247E$ enter: no $ 247E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 247G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 247G$ enter: no $ 247G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 248 If you don't want to read the FINE PRINT, default all of the following 248 variables. 248 248 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 248 + Normally, PDE2D saves the values of $$1,A,B at the output points. + 248 + If different variables are to be saved (for later printing or + 248 + plotting) the following functions can be used to re-define the + 248 + output variables: + 248 + define UPRINT(1) to replace $$1 + 248 + APRINT(1) A + 248 + BPRINT(1) B + 248 + Each function may be a function of + 248 + + 248 + X,Y,$$1,$$1x,$$1y,A,B and (if applicable) T + 248 + + 248 + Each may also be a function of the initial triangle number KTRI and + 248 + the integral estimates SINT(1),...,BINT(1),... + 248 + + 248 + The default for each variable is no change, for example, UPRINT(1) + 248 + defaults to $$1. Enter FORTRAN expressions for each of the + 248 + following functions (or default). + 248 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 248B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 248B$ press [RETURN] to default all output modification variables $ 248B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 248C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 248C$ press [RETURN] to default all output modification variables $ 248C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 248D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 248D$ press [RETURN] to default all output modification variables $ 248D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 249 If you don't want to read the FINE PRINT, default all of the following 249 variables. 249 249 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 249 + Normally, PDE2D saves the values of $$1,A1,B1,$$2,A2,B2 at the + 249 + output points. If different variables are to be saved (for later + 249 + printing or plotting) the following functions can be used to + 249 + re-define the output variables: + 249 + define UPRINT(1) to replace $$1 + 249 + APRINT(1) A1 + 249 + BPRINT(1) B1 + 249 + UPRINT(2) $$2 + 249 + APRINT(2) A2 + 249 + BPRINT(2) B2 + 249 + Each function may be a function of + 249 + + 249 + X,Y,$$1,$$1x,$$1y,A1,B1,$$2,$$2x,$$2y,A2,B2 and (if applicable) T + 249 + + 249 + Each may also be a function of the initial triangle number KTRI and + 249 + the integral estimates SINT(1),...,BINT(1),... + 249 + + 249 + The default for each variable is no change, for example, UPRINT(1) + 249 + defaults to $$1. Enter FORTRAN expressions for each of the + 249 + following functions (or default). + 249 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 249A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 249A$ press [RETURN] to default all output modification variables $ 249A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 249E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 249E$ We will want to plot the temperature distribution Z(X,Y) (which will $ 249E$ be defined later by interpolating the output from example 4), so to $ 249E$ save Z in B1 $ 249E$ enter: BPRINT(1) = Z(X,Y) $ 249E$ and default the other output modification variables $ 249E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 249G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 249G$ We want to save a norm of the solution in A1, and later plot this $ 249G$ norm as a function of time, so $ 249G$ enter: APRINT(1) = SINT(1) $ 249G$ and default the other output modification variables $ 249G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 249H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 249H$ press [RETURN] to default all output modification variables $ 249H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 250 If you don't want to read the FINE PRINT, default all of the following 250 variables. 250 250 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 250 + Normally, PDE2D saves the values of $$1,A1,B1,$$2,A2,B2,$$3,A3,B3 at + 250 + the output points. If different variables are to be saved (for + 250 + later printing or plotting) the following functions can be used to + 250 + re-define the output variables: + 250 + define UPRINT(1) to replace $$1 + 250 + APRINT(1) A1 + 250 + BPRINT(1) B1 + 250 + UPRINT(2) $$2 + 250 + APRINT(2) A2 + 250 + BPRINT(2) B2 + 250 + UPRINT(3) $$3 + 250 + APRINT(3) A3 + 250 + BPRINT(3) B3 + 250 + Each function may be a function of + 250 + + 250 + X,Y,$$1,$$1x,$$1y,A1,B1,$$2,$$2x,$$2y,A2,B2, + 250 + $$3,$$3x,$$3y,A3,B3 and (if applicable) T + 250 + + 250 + Each may also be a function of the initial triangle number KTRI and + 250 + the integral estimates SINT(1),...,BINT(1),... + 250 + + 250 + The default for each variable is no change, for example, UPRINT(1) + 250 + defaults to $$1. Enter FORTRAN expressions for each of the + 250 + following functions (or default). + 250 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 251 If you don't want to read the FINE PRINT, default all of the following 251 variables. 251 251 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 251 + Normally, PDE2D saves the values of $$1,A1,B1,$$2,A2,B2,$$3,A3,B3, + 251 + $$4,A4,B4...at the output points. If different variables are to be + 251 + saved (for later printing or plotting) the following functions can + 251 + be used to re-define the output variables: + 251 + define UPRINT(1) to replace $$1 + 251 + APRINT(1) A1 + 251 + BPRINT(1) B1 + 251 + UPRINT(2) $$2 + 251 + APRINT(2) A2 + 251 + BPRINT(2) B2 + 251 + UPRINT(3) $$3 + 251 + APRINT(3) A3 + 251 + BPRINT(3) B3 + 251 + UPRINT(4) $$4 + 251 + APRINT(4) A4 + 251 + BPRINT(4) B4 + 251 + . . + 251 + . . + 251 + Each function may be a function of + 251 + + 251 + X,Y,$$1,$$1x,$$1y,A1,B1,$$2,$$2x,$$2y,A2,B2, + 251 + $$3,$$3x,$$3y,A3,B3,$$4,$$4x,$$4y,A4,B4... and (if applicable) T + 251 + + 251 + Each may also be a function of the initial triangle number KTRI and + 251 + the integral estimates SINT(1),...,BINT(1),... + 251 + + 251 + The default for each variable is no change, for example, UPRINT(1) + 251 + defaults to $$1. Enter FORTRAN expressions for each of the + 251 + following functions (or default). + 251 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 252 The solution is normally saved on a NX+1 by NY+1 rectangular grid of 252 points 252 (XA + I*(XB-XA)/NX , YA + J*(YB-YA)/NY) 252 I=0,...,NX, J=0,...,NY. Enter values for NX and NY. Suggested values 252 are NX=NY=25. 252 252 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 252 + If you want to save the solution at an arbitrary user-specified + 252 + set of points, set NY=0 and NX+1=number of points. In this case you + 252 + can request tabular output of the solution, but you cannot make any + 252 + solution plots. + 252 + + 252 + If you set NEAR8Z=1 in the main program, the values saved at each + 252 + output point will actually be the solution as evaluated at a nearby + 252 + integration point. For most problems this obviously will produce + 252 + less accurate output or plots, but for certain (rare) problems, a + 252 + solution component may be much less noisy when plotted only at + 252 + integration points. + 252 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 252A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 252A$ enter: NX = 30 $ 252A$ NY = 30 $ 252A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 252B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 252B$ enter: NX = 40 $ 252B$ NY = 40 $ 252B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 252C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 252C$ enter: NX = 40 $ 252C$ NY = 40 $ 252C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 252D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 252D$ enter: NX = 40 $ 252D$ NY = 40 $ 252D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 252E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 252E$ enter: NX = 9 $ 252E$ NY = 9 $ 252E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 252G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 252G$ enter: NX = 10 $ 252G$ NY = 10 $ 252G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 252H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 252H$ enter: NX = 20 $ 252H$ NY = 20 $ 252H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 253 Enter a block of FORTRAN statements to define the output points: 253 (XOUT8Z(I,0) , YOUT8Z(I,0)), I=0,...,NX 254 The solution is saved on an NX+1 by NY+1 rectangular grid covering the 254 rectangle (XA,XB) x (YA,YB). Enter values for XA,XB,YA,YB. These 254 variables are usually defaulted. 254 254 The default is a rectangle which just covers the entire region. 254A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 254A$ press [RETURN] to default XA,XB,YA,YB $ 254A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 254B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 254B$ press [RETURN] to default XA,XB,YA,YB $ 254B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 254C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 254C$ press [RETURN] to default XA,XB,YA,YB $ 254C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 254D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 254D$ press [RETURN] to default XA,XB,YA,YB $ 254D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 254E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 254E$ press [RETURN] to default XA,XB,YA,YB $ 254E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 254G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 254G$ press [RETURN] to default XA,XB,YA,YB $ 254G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 254H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 254H$ press [RETURN] to default XA,XB,YA,YB $ 254H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 255 To generate tabular or graphical output, choose an output option from 255 the list below. 255 255 0. No further output is desired 255 1. Table of values at output points 255 The tabulated output is saved in a file. 255 2. Surface plot of a scalar variable 255 3. Contour plot of a scalar variable 255 4. Vector field plot, with arrows indicating magnitude and direction 255 5. One-dimensional cross-sectional plots (versus X, Y or T) 255 or, if applicable: 255 6. Stress field plot (requires 2 or more PDES) 255 A plot of the principal stresses. Compression is indicated 255 by arrows pointing toward each other, and tension by 255 arrows pointing away from each other. 255 255 Enter 0,1,2,3,4,5 or 6 to select an output option. 255 255 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 255 + If you set NY=0 and saved the solution at an arbitrary set of + 255 + user-specified output points, you can only request tabular output. + 255 + + 255 + If you decide later that you want additional types of plots not + 255 + requested during this interactive session, you will have to work + 255 + through a new interactive session, so it is recommended that you + 255 + request all output or plots you think you MIGHT eventually want now, + 255 + during this session. + 255 + + 255 + Regardless of the options you select, a dummy subroutine POSTPR + 255 + will be included in the program created by the interactive driver; + 255 + you can add your own postprocessing code to this subroutine. + 255 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 255A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 255A$ enter: 2, the first time you see this message and $ 255A$ 0, the second time $ 255A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 255B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 255B$ enter: 3, the first time you see this message and $ 255B$ 0, the second time $ 255B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 255C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 255C$ enter: 2, the first time you see this message and $ 255C$ 0, the second time $ 255C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 255D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 255D$ enter: 1, the first time you see this message and $ 255D$ 0, the second time $ 255D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 255E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 255E$ We want three plots: a vector field plot of the displacements, a $ 255E$ stress field plot, and a contour plot of the temperature. Thus $ 255E$ enter: 4, the first time you see this message and $ 255E$ 6, the second time $ 255E$ 3, the third time $ 255E$ 0, the fourth time $ 255E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 255G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 255G$ enter: 5, the first time you see this message and $ 255G$ 0, the second time $ 255G$ We could also (but won't) plot H and E for each value of beta (=T). $ 255G$ Those corresponding to values of beta near eigenvalues will $ 255G$ approximate the corresponding eigenfunctions; the others are not of $ 255G$ interest. In addition, once the eigenvalues in the current range $ 255G$ have been approximately located (by the peaks in the norm vs beta $ 255G$ plot), other runs should probably be made with the eigenvalues $ 255G$ bracketed more tightly, to yield more accurate estimates for the $ 255G$ eigenvalues and eigenfunctions. $ 255G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 255H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 255H$ We want a vector plot of the fluid velocity, so $ 255H$ enter: 4, the first time you see this message and $ 255H$ 0, the second time $ 255H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 256 Enter a value for IVAR, to select the variable to be plotted or 256 printed: 256 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 256 2 A 256 3 B 256B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 256B$ We want a contour plot of U, so $ 256B$ enter: IVAR = 1 $ 256B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 256C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 256C$ We want a surface plot of QQ, so $ 256C$ enter: IVAR = 1 $ 256C$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 3 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 256D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 256D$ We want to write Z to a tabular output file, so $ 256D$ enter: IVAR = 1 $ 256D$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 4 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 257 Enter a value for IVAR, to select the variable to be plotted or 257 printed: 257 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 257 2 A1 257 3 B1 257 4 $$2 257 5 A2 257 6 B2 257A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 257A$ We want a surface plot of the displacement U(x,y), so $ 257A$ enter: IVAR = 1 $ 257A$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 1 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 257E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 257E$ We want a contour plot of Z(X,Y), which has been saved in B1, so $ 257E$ enter: IVAR = 3 $ 257E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 257G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 257G$ We want to plot the integral (solution norm), which has been saved $ 257G$ in A1, as a function of beta (=T), so $ 257G$ enter: IVAR = 2 $ 257G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 258 Enter a value for IVAR, to select the variable to be plotted or 258 printed: 258 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 258 2 A1 258 3 B1 258 4 $$2 258 5 A2 258 6 B2 258 7 $$3 258 8 A3 258 9 B3 259 Enter a value for IVAR, to select the variable to be plotted or 259 printed: 259 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 259 2 A1 259 3 B1 259 4 $$2 259 5 A2 259 6 B2 259 7 $$3 259 8 A3 259 9 B3 259 10 $$4 259 11 A4 259 12 B4 259 . . 259 . . 260 If you don't want to read the FINE PRINT, enter 'no'. 260 260 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 260 + Do you want to scale the axes on the plot so that the region is + 260 + undistorted? Otherwise the axes will be scaled so that the figure + 260 + approximately fills the plot space. + 260 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 260B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 260B$ enter: yes $ 260B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 260E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 260E$ enter: yes $ 260E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 260H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 260H$ enter: yes $ 260H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 260I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 260I$ enter: no $ 260I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 260K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 260K$ enter: yes $ 260K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 260M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 260M$ enter: yes $ 260M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 261 Enter lower (UMIN) and upper (UMAX) bounds for the contour values. UMIN 261 and UMAX are often defaulted. 261 261 Labeled contours will be drawn corresponding to the values 261 261 UMIN + S*(UMAX-UMIN), for S=0.05,0.15,...0.95. 261 261 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 261 + By default, UMIN and UMAX are set to the minimum and maximum values + 261 + of the variable to be plotted. For a common scaling, you may want + 261 + to set UMIN=ALOW, UMAX=AHIGH. ALOW and AHIGH are the minimum and + 261 + maximum values over all output points and over all saved time steps + 261 + or iterations. + 261 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 261B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 261B$ press [RETURN] to default UMIN and UMAX $ 261B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 261E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 261E$ press [RETURN] to default UMIN and UMAX $ 261E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 261K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 261K$ press [RETURN] to default UMIN and UMAX $ 261K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 261M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 261M$ press [RETURN] to default UMIN and UMAX $ 261M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 262 Do you want two additional unlabeled contours to be drawn between each 262 pair of labeled contours? 262B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 262B$ enter: no $ 262B$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 262E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 262E$ enter: yes $ 262E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 262K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 262K$ enter: no $ 262K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 262M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 262M$ enter: no $ 262M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 263 Enter values for IVARX, IVARY to select the X and Y components of 263 the vector to be plotted. 263 IVARX or IVARY = 1 means $$1 (possibly as modified by UPRINT,..) 263 2 A 263 3 B 264 Enter values for IVARX, IVARY to select the X and Y components of 264 the vector to be plotted. 264 IVARX or IVARY = 1 means $$1 (possibly as modified by UPRINT,..) 264 2 A1 264 3 B1 264 4 $$2 264 5 A2 264 6 B2 264E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 264E$ We want a vector field plot of (U,V), so $ 264E$ enter: IVARX = 1 $ 264E$ IVARY = 4 $ 264E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 264H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 264H$ We want a vector field plot of (U,V), so $ 264H$ enter: IVARX = 1 $ 264H$ IVARY = 4 $ 264H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 265 Enter values for IVARX, IVARY to select the X and Y components of 265 the vector to be plotted. 265 IVARX or IVARY = 1 means $$1 (possibly as modified by UPRINT,..) 265 2 A1 265 3 B1 265 4 $$2 265 5 A2 265 6 B2 265 7 $$3 265 8 A3 265 9 B3 266 Enter values for IVARX, IVARY to select the X and Y components of 266 the vector to be plotted. 266 IVARX or IVARY = 1 means $$1 (possibly as modified by UPRINT,..) 266 2 A1 266 3 B1 266 4 $$2 266 5 A2 266 6 B2 266 7 $$3 266 8 A3 266 9 B3 266 10 $$4 266 11 A4 266 12 B4 266 . . 266 . . 267 For the purpose of scaling the arrows, the ranges of the two components 267 of the vector are assumed to be (-VR1MAG,VR1MAG) and (-VR2MAG,VR2MAG). 267 Enter values for VR1MAG and VR2MAG. VR1MAG and VR2MAG are often 267 defaulted. 267 267 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 267 + By default, VR1MAG and VR2MAG are the maxima of the absolute values + 267 + of the first and second components. For a common scaling, you may + 267 + want to set VR1MAG=A1MAG, VR2MAG=A2MAG. A1MAG, A2MAG are the + 267 + maxima of the absolute values over all output points and over all + 267 + saved time steps or iterations. + 267 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 267E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 267E$ press [RETURN] to default VR1MAG and VR2MAG $ 267E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 267H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 267H$ press [RETURN] to default VR1MAG and VR2MAG $ 267H$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 8 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 267I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 267I$ press [RETURN] to default VR1MAG and VR2MAG $ 267I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 267M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 267M$ press [RETURN] to default VR1MAG and VR2MAG $ 267M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 268 Which type of cross-sectional plots do you want? 268 268 1. Plots of output variable as function of X (constant Y [and T]) 268 2. Plots of output variable as function of Y (constant X [and T]) 268 or, if applicable: 268 3. Plots of output variable as function of T (constant X and Y) 268 268 Enter 1,2 or 3 to select a plot type. 268G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 268G$ enter: 3 $ 268G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 269 One-dimensional plots of the output variable as a function of X will 269 be made, at the output grid Y-points closest to 269 Y = YCROSS(1),...,YCROSS(NYVALS) 269 269 Enter values for NYVALS and YCROSS(1),...,YCROSS(NYVALS). 270 One-dimensional plots of the output variable as a function of Y will 270 be made, at the output grid X-points closest to 270 X = XCROSS(1),...,XCROSS(NXVALS) 270 270 Enter values for NXVALS and XCROSS(1),...,XCROSS(NXVALS). 271 One-dimensional plots of the output variable as a function of T will 271 be made, at the output grid points (X,Y) closest to 271 (XCROSS(I),YCROSS(J)), I=1,...,NXVALS, J=1,...,NYVALS 271 271 Enter values for NXVALS, XCROSS(1),...,XCROSS(NXVALS), 271 and NYVALS, YCROSS(1),...,YCROSS(NYVALS) 271G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 271G$ Since A1 = SINT(1) is independent of X and Y, all cross-sections $ 271G$ will look the same, so $ 271G$ enter: NXVALS = 1 $ 271G$ XCROSS(1) = 0 $ 271G$ NYVALS = 1 $ 271G$ YCROSS(1) = 0 $ 271G$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 7 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 272 Enter values for IVAR11, IVAR22, IVAR12 to select the components which 272 represent tensile stress in the X-direction, tensile stress in the 272 Y-direction, and shear stress, respectively. 272 IVAR11,IVAR22,IVAR12 = 1 means $$1 (possibly as modified by UPRINT,..) 272 2 A1 272 3 B1 272 4 $$2 272 5 A2 272 6 B2 272E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 272E$ Since A1=S11, B2=S22 and A2=S12 (since BPRINT(1)=Z(X,Y), do not set $ 272E$ IVAR12 = 3): $ 272E$ enter: IVAR11 = 2 $ 272E$ IVAR22 = 6 $ 272E$ IVAR12 = 5 $ 272E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 273 Enter values for IVAR11, IVAR22, IVAR12 to select the components which 273 represent tensile stress in the X-direction, tensile stress in the 273 Y-direction, and shear stress, respectively. 273 IVAR11,IVAR22,IVAR12 = 1 means $$1 (possibly as modified by UPRINT,..) 273 2 A1 273 3 B1 273 4 $$2 273 5 A2 273 6 B2 273 7 $$3 273 8 A3 273 9 B3 274 Enter values for IVAR11, IVAR22, IVAR12 to select the components which 274 represent tensile stress in the X-direction, tensile stress in the 274 Y-direction, and shear stress, respectively. 274 IVAR11,IVAR22,IVAR12 = 1 means $$1 (possibly as modified by UPRINT,..) 274 2 A1 274 3 B1 274 4 $$2 274 5 A2 274 6 B2 274 7 $$3 274 8 A3 274 9 B3 274 10 $$4 274 11 A4 274 12 B4 274 . . 274 . . 275 If you don't want to read the FINE PRINT, default STRMAX. 275 275 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 275 + For the purpose of scaling the stresses, the maximum magnitude of + 275 + the principle stresses is assumed to be STRMAX. If the default is + 275 + used, the stress tensors drawn will be as large as possible without + 275 + tensors running together. If stress plots at several time steps or + 275 + iterations are made and a common scale is desired, STRMAX = ASTRMX + 275 + is suggested. + 275 + + 275 + Enter a value for STRMAX, or default it. + 275 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 275E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 275E$ press [RETURN] to default STRMAX $ 275E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 276 Enter the name of the FORTRAN function subprogram, in columns 1-6. 276 It must be a function of X and Y only, but do not enter the '(X,Y)'. 276E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 276E$ enter: Z $ 276E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 277 If you don't want to read the FINE PRINT, enter NWORK = 20000. 277 277 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 277 + Enter a dimension, NWORK, for the workarray, WORK, which is used to + 277 + store the tabulated values, for interpolation on later calls. NWORK + 277 + must be at least (NX+1)*(NY+1)+6, where NX,NY are the output grid + 277 + parameters used by the program which generated the tabulated values. + 277 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 277E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 277E$ enter: NWORK = 2000 $ 277E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 278 Enter, WITHOUT quotation marks, the name (FNAME) of the file which 278 contains the tabulated values to be read and interpolated. The 278 tabulated values must have been generated by PDE2D using the 278 rectangular output grid option. 278E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 278E$ Enter the name of the example 4 tabular output file, e.g: $ 278E$ enter: FNAME = dex4.out $ 278E$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 5 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 279 PDE2D solves the time-dependent system (note: U,F,G,U0 may be vectors, 279 C,RHO may be matrices): 279 279 C(X,Y,T,U,Ux,Uy)*d(U)/dT = F(X,Y,T,U,Ux,Uy,Uxx,Uyy,Uxy) 279 279 or the steady-state system: 279 279 F(X,Y,U,Ux,Uy,Uxx,Uyy,Uxy) = 0 279 279 or the linear and homogeneous eigenvalue system: 279 279 F(X,Y,U,Ux,Uy,Uxx,Uyy,Uxy) = lambda*RHO(X,Y)*U 279 279 with boundary conditions: 279 279 G(X,Y,[T],U,Ux,Uy) = 0 279 (periodic boundary conditions are also permitted) 279 279 For time-dependent problems there are also initial conditions: 279 279 U = U0(X,Y) at T=T0 279 279 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 279 + If your PDEs involve the solution at points other than (P1,P2), the + 279 + function + 279 + (D)OLDSOL2(IDER,IEQ,PP1,PP2,KDEG) + 279 + will interpolate (using interpolation of degree KDEG=1,2 or 3) to + 279 + (PP1,PP2) the function saved in UOUT(*,*,IDER,IEQ,ISET) on the last + 279 + time step or iteration (ISET) for which it has been saved. Thus, + 279 + for example, if IDER=1, this will return the latest value of + 279 + component IEQ of the solution at (PP1,PP2), assuming this has not + 279 + been modified using UPRINT... If your equations involve integrals of + 279 + the solution, for example, you can use (D)OLDSOL2 to approximate + 279 + these using the solution from the last time step or iteration. + 279 + + 279 + CAUTION: For a steady-state or eigenvalue problem, you must reset + 279 + NOUT=1 if you want to save the solution each iteration. + 279 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 279 + A system of NEQN complex partial differential equations must be + 279 + written as a system of 2*NEQN real equations, by separating the + 279 + equations into their real and imaginary parts. However, note that + 279 + the complex arithmetic abilities of FORTRAN can be used to simplify + 279 + this separation. For example, the complex PDE: + 279 + I*(Uxx+Uyy) - 1/(1+U**10) = 0, where U = UR + UI*I + 279 + would be difficult to split up analytically, but using FORTRAN + 279 + expressions it is easy: + 279 + F1 = -(UIxx+UIyy) - REAL(1.0/(1.0+CMPLX(UR,UI)**10)) + 279 + F2 = (URxx+URyy) - AIMAG(1.0/(1.0+CMPLX(UR,UI)**10)) + 279 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 279 You may now define global parameters, which may be referenced in any 279 of the "FORTRAN expressions" you input throughout the rest of this 279 interactive session. You will be prompted alternately for parameter 279 names and their values; enter a blank name when you are finished. 279 279 Parameter names are valid FORTRAN variable names, starting in 279 column 1. Thus each name consists of 1 to 6 alphanumeric characters, 279 the first of which must be a letter. If the first letter is in the 279 range I-N, the parameter must be an integer. 279 279 Parameter values are either FORTRAN constants or FORTRAN expressions 279 involving only constants and global parameters defined on earlier 279 lines. They may also be functions of the problem number IPROB, if 279 you are solving several similar problems in one run (NPROB > 1). Note 279 that you are defining global CONSTANTS, not functions; e.g., parameter 279 values may not reference any of the independent or dependent variables 279 of your problem. 279 279 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 279 + If you define other parameters here later, using an editor, you must + 279 + add them to COMMON block /PARM8Z/ everywhere this block appears, if + 279 + they are to be "global" parameters. + 279 + + 279 + The variable PI is already included as a global parameter, with an + 279 + accurate value 3.14159... + 279 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 279M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 279M$ enter: VISC $ 279M$ 0.02 $ 279M$ RHO $ 279M$ 1.0 $ 279M$ [blank line] $ 279M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 280 You can solve problems in your region only if you can describe it by 280 X = X(P1,P2) 280 Y = Y(P1,P2) 280 with constant limits on the parameters P1,P2. If your region is 280 rectangular, enter ITRANS=0 and the trivial parameterization 280 X = P1 280 Y = P2 280 will be used. Otherwise, you need to read the FINE PRINT below. 280 280 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 280 + If P1,P2 represent polar or other non-Cartesian coordinates, you can + 280 + reference the Cartesian coordinates X,Y and derivatives of your + 280 + unknowns with respect to these coordinates, when you define your + 280 + PDE coefficients, boundary conditions, and volume and boundary + 280 + integrals, if you enter ITRANS .NE. 0. Enter: + 280 + ITRANS = 1, if P1,P2 are polar coordinates, that is, if + 280 + P1=R, P2=Theta, where X = R*cos(Theta) + 280 + Y = R*sin(Theta) + 280 + ITRANS = -1, same as ITRANS=1, but P1=Theta, P2=R + 280 + ITRANS = 3, to define your own coordinate transformation. In + 280 + this case, you will be prompted to define X,Y and + 280 + their first and second derivatives in terms of P1,P2. + 280 + Because of symmetry, you will not be prompted for all + 280 + of the second derivatives. If you make a mistake in + 280 + computing any of these derivatives, PDE2D will usually + 280 + be able to issue a warning message. (X1 = dX/dP1, etc) + 280 + ITRANS = -3, same as ITRANS=3, but you will only be prompted to + 280 + define X,Y; their first and second derivatives will + 280 + be approximated using finite differences. + 280 + When ITRANS = -3 or 3, the first derivatives of X,Y must all be + 280 + continuous. + 280 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 280M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 280M$ Although in the X,Y (r,z) coordinate system the region is not $ 280M$ rectangular, we can define a new coordinate system, with constant $ 280M$ limits on the new variables: $ 280M$ X = P1*(1+P2**2) 0 < P1 < 1 $ 280M$ Y = P2 -1 < P2 < 1 $ 280M$ so $ 280M$ enter: ITRANS = -3 $ 280M$ $ 280M$ Then enter the following, when prompted: $ 280M$ X = P1*(1+P2**2) $ 280M$ Y = P2 $ 280M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 281 A collocation finite element method is used, with bi-cubic Hermite 281 basis functions on the elements (small rectangles) defined by the grid 281 points: 281 P1GRID(1),...,P1GRID(NP1GRID) 281 P2GRID(1),...,P2GRID(NP2GRID) 281 You will first be prompted for NP1GRID, the number of P1-grid points, 281 then for P1GRID(1),...,P1GRID(NP1GRID). Any points defaulted will be 281 uniformly spaced between the points you define; the first and last 281 points cannot be defaulted. Then you will be prompted similarly 281 for the number and values of the P2-grid points. The limits on the 281 parameters are then: 281 P1GRID(1) < P1 < P1GRID(NP1GRID) 281 P2GRID(1) < P2 < P2GRID(NP2GRID) 281 281M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 281M$ enter: NP1GRID = 20 $ 281M$ P1GRID(1) = 0 $ 281M$ P1GRID(NP1GRID) = 1 $ 281M$ and default P1GRID(2),...,P1GRID(19) $ 281M$ NP2GRID = 20 $ 281M$ P2GRID(1) = -1 $ 281M$ P2GRID(NP2GRID) = 1 $ 281M$ and default P2GRID(2),...,P2GRID(19) $ 281M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 282 If you don't want to read the FINE PRINT, enter ISOLVE = 1. 282 282 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 282 + The following linear system solvers are available: + 282 + + 282 + 1. Sparse direct method + 282 + Harwell Library routine MA27 (used by permission) is + 282 + used to solve the (positive definite) "normal" + 282 + equations A**T*A*x = A**T*b. The normal equations, + 282 + which are essentially the equations which would result + 282 + if a least squares finite element method were used + 282 + instead of a collocation method, are substantially + 282 + more ill-conditioned than the original system Ax = b, + 282 + so it may be important to use high precision if this + 282 + option is chosen. + 282 + 2. Frontal method + 282 + This is an out-of-core band solver. If you want to + 282 + override the default number of rows in the buffer (11),+ 282 + set a new value for NPMX8Z in the main program. + 282 + 3. Jacobi conjugate gradient iterative method + 282 + A preconditioned conjugate gradient iterative method + 282 + is used to solve the (positive definite) normal + 282 + equations. High precision is also important if this + 282 + option is chosen. (This solver is MPI-enhanced, if + 282 + MPI is available.) If you want to override the + 282 + default convergence tolerance, set a new relative + 282 + tolerance CGTL8Z in the main program. + 282 + 4. Local solver (normal equations) + 282 + 5. Local solver (original equations) + 282 + Choose these options ONLY if alterative linear system + 282 + solvers have been installed locally. See subroutines + 282 + (D)TD3M, (D)TD3N in file (d)subs.f for instructions + 282 + on how to add local solvers. + 282 + 6. MPI-based parallel band solver + 282 + This is a parallel solver which runs efficiently on + 282 + multiple processor machines, under MPI. It is a + 282 + band solver, with the matrix distributed over the + 282 + available processors. Choose this option ONLY if the + 282 + solver has been activated locally. See subroutine + 282 + (D)TD3O in file (d)subs.f for instructions on how to + 282 + activate this solver and the MPI-enhancements to the + 282 + conjugate gradient solver. + 282 + + 282 + Enter ISOLVE = 1,2,3,4,5 or 6 to select a linear system solver. + 282 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 282 282 If you don't want to read the FINE PRINT, enter ISOLVE = 1. 282I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 282I$ enter: ISOLVE = 3 $ 282I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 282J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 282J$ enter: ISOLVE = 1 $ 282J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 282K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 282K$ enter: ISOLVE = 2 $ 282K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 282L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 282L$ enter: ISOLVE = 2 $ 282L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 282M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 282M$ enter: ISOLVE = 2 $ 282M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 283 You may now choose names for the component(s) of the (possibly vector) 283 solution U. Each must be an alphanumeric string of one to three 283 characters, beginning with a letter in the range A-H or O-Z. The 283 variable names X,Y,P and T must not be used. The name should start 283 in column 1. 283M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 283M$ enter: U1 = U $ 283M$ U2 = W $ 283M$ U3 = H $ 283M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 284 Enter FORTRAN expressions for the functions whose integrals are to be 284 calculated and printed. They may be functions of 284 284 X,Y,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy and (if applicable) T 284 284 The parameters P1,P2 and derivatives with respect to these may also 284 be referenced ($$11 = d$$1/dP1, etc): 284 $$11,$$12,$$111,$$122,$$112 284 284 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 284 + If you only want to integrate a function over part of the region, + 284 + define that function to be zero in the rest of the region. + 284 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 285 Enter FORTRAN expressions for the functions whose integrals are to be 285 calculated and printed. They may be functions of 285 285 X,Y,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy 285 $$2,$$2x,$$2y,$$2xx,$$2yy,$$2xy and (if applicable) T 285 285 The parameters P1,P2 and derivatives with respect to these may also 285 be referenced ($$11 = d$$1/dP1, etc): 285 $$11,$$12,$$111,$$122,$$112 285 $$21,$$22,$$211,$$222,$$212 285 285 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 285 + If you only want to integrate a function over part of the region, + 285 + define that function to be zero in the rest of the region. + 285 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 286 Enter FORTRAN expressions for the functions whose integrals are to be 286 calculated and printed. They may be functions of 286 286 X,Y,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy 286 $$2,$$2x,$$2y,$$2xx,$$2yy,$$2xy 286 $$3,$$3x,$$3y,$$3xx,$$3yy,$$3xy and (if applicable) T 286 286 The parameters P1,P2 and derivatives with respect to these may also 286 be referenced ($$11 = d$$1/dP1, etc): 286 $$11,$$12,$$111,$$122,$$112 286 $$21,$$22,$$211,$$222,$$212 286 $$31,$$32,$$311,$$322,$$312 286 286 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 286 + If you only want to integrate a function over part of the region, + 286 + define that function to be zero in the rest of the region. + 286 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 286M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 286M$ We want to monitor the progress of the iteration by looking at the $ 286M$ value of some integral of the solution, so $ 286M$ enter: INTEGRAL = U+W $ 286M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 287 Enter FORTRAN expressions for the functions whose integrals are to be 287 calculated and printed. They may be functions of 287 287 X,Y,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy 287 $$2,$$2x,$$2y,$$2xx,$$2yy,$$2xy 287 $$3,$$3x,$$3y,$$3xx,$$3yy,$$3xy 287 $$4,$$4x,$$4y,$$4xx,$$4yy,$$4xy and (if applicable) T 287 . . . . . . . 287 287 The parameters P1,P2 and derivatives with respect to these may also 287 be referenced ($$11 = d$$1/dP1, etc): 287 $$11,$$12,$$111,$$122,$$112 287 $$21,$$22,$$211,$$222,$$212 287 $$31,$$32,$$311,$$322,$$312 287 $$41,$$42,$$411,$$422,$$412 287 . . . . . 287 287 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 287 + If you only want to integrate a function over part of the region, + 287 + define that function to be zero in the rest of the region. + 287 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 288 Enter FORTRAN expressions for the functions whose integrals are to be 288 calculated and printed. They may be functions of 288 288 X,Y,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy and (if applicable) T 288 288 The components (NORMx,NORMy) of the unit outward normal vector 288 may also be referenced. 288 288 The parameters P1,P2 and derivatives with respect to these may also 288 be referenced: 288 $$11,$$12,$$111,$$122,$$112 288 You can also reference the normal derivative $$1norm. 288 288 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 288 + If you only want to integrate a function over part of the boundary, + 288 + define that function to be zero on the rest of the boundary. + 288 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 289 Enter FORTRAN expressions for the functions whose integrals are to be 289 calculated and printed. They may be functions of 289 289 X,Y,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy 289 $$2,$$2x,$$2y,$$2xx,$$2yy,$$2xy and (if applicable) T 289 289 The components (NORMx,NORMy) of the unit outward normal vector 289 may also be referenced. 289 289 The parameters P1,P2 and derivatives with respect to these may also 289 be referenced: 289 $$11,$$12,$$111,$$122,$$112 289 $$21,$$22,$$211,$$222,$$212 289 You can also reference the normal derivatives $$1norm,$$2norm. 289 289 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 289 + If you only want to integrate a function over part of the boundary, + 289 + define that function to be zero on the rest of the boundary. + 289 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 290 Enter FORTRAN expressions for the functions whose integrals are to be 290 calculated and printed. They may be functions of 290 290 X,Y,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy 290 $$2,$$2x,$$2y,$$2xx,$$2yy,$$2xy 290 $$3,$$3x,$$3y,$$3xx,$$3yy,$$3xy and (if applicable) T 290 290 The components (NORMx,NORMy) of the unit outward normal vector 290 may also be referenced. 290 290 The parameters P1,P2 and derivatives with respect to these may also 290 be referenced: 290 $$11,$$12,$$111,$$122,$$112 290 $$21,$$22,$$211,$$222,$$212 290 $$31,$$32,$$311,$$322,$$312 290 You can also reference the normal derivatives $$1norm,$$2norm,$$3norm. 290 290 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 290 + If you only want to integrate a function over part of the boundary, + 290 + define that function to be zero on the rest of the boundary. + 290 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 291 Enter FORTRAN expressions for the functions whose integrals are to be 291 calculated and printed. They may be functions of 291 291 X,Y,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy 291 $$2,$$2x,$$2y,$$2xx,$$2yy,$$2xy 291 $$3,$$3x,$$3y,$$3xx,$$3yy,$$3xy 291 $$4,$$4x,$$4y,$$4xx,$$4yy,$$4xy and (if applicable) T 291 . . . . . . 291 291 The components (NORMx,NORMy) of the unit outward normal vector 291 may also be referenced. 291 291 The parameters P1,P2 and derivatives with respect to these may also 291 be referenced: 291 $$11,$$12,$$111,$$122,$$112 291 $$21,$$22,$$211,$$222,$$212 291 $$31,$$32,$$311,$$322,$$312 291 $$41,$$42,$$411,$$422,$$412 291 . . . . . 291 You can also reference the normal derivatives $$1norm,$$2norm,$$3norm, 291 $$4norm... 291 291 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 291 + If you only want to integrate a function over part of the boundary, + 291 + define that function to be zero on the rest of the boundary. + 291 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 292 Now enter FORTRAN expressions to define the PDE coefficients. 292 RHO may be a function of X,Y, while F may be a function of 292 292 X,Y,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy 292 292 Recall that the PDE has the form 292 292 F = lambda*RHO*$$1 292 292 The parameters P1,P2 and derivatives with respect to these may also 292 be referenced ($$11 = d$$1/dP1, etc): 292 $$11,$$12,$$111,$$122,$$112 293 Now enter FORTRAN expressions to define the PDE coefficients. 293 RHO11,RHO12,RHO21,RHO22 may be functions of X,Y, while F1,F2 293 may be functions of 293 293 X,Y,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy 293 $$2,$$2x,$$2y,$$2xx,$$2yy,$$2xy 293 293 Recall that the PDEs have the form 293 293 F1 = lambda*(RHO11*$$1 + RHO12*$$2) 293 F2 = lambda*(RHO21*$$1 + RHO22*$$2) 293 293 The parameters P1,P2 and derivatives with respect to these may also 293 be referenced ($$11 = d$$1/dP1, etc): 293 $$11,$$12,$$111,$$122,$$112 293 $$21,$$22,$$211,$$222,$$212 294 Now enter FORTRAN expressions to define the PDE coefficients. 294 RHO11,RHO12,RHO13,RHO21,RHO22,RHO23,RHO31,RHO32,RHO33 may be 294 functions of X,Y, while F1,F2,F3 may be functions of 294 294 X,Y,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy 294 $$2,$$2x,$$2y,$$2xx,$$2yy,$$2xy 294 $$3,$$3x,$$3y,$$3xx,$$3yy,$$3xy 294 294 Recall that the PDEs have the form 294 294 F1 = lambda*(RHO11*$$1 + RHO12*$$2 + RHO13*$$3) 294 F2 = lambda*(RHO21*$$1 + RHO22*$$2 + RHO23*$$3) 294 F3 = lambda*(RHO31*$$1 + RHO32*$$2 + RHO33*$$3) 294 294 The parameters P1,P2 and derivatives with respect to these may also 294 be referenced ($$11 = d$$1/dP1, etc): 294 $$11,$$12,$$111,$$122,$$112 294 $$21,$$22,$$211,$$222,$$212 294 $$31,$$32,$$311,$$322,$$312 295 Now enter FORTRAN expressions to define the PDE coefficients. The 295 RHOIJ may be functions of X,Y, while F1,F2,F3,F4,... may be 295 functions of 295 295 X,Y,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy 295 $$2,$$2x,$$2y,$$2xx,$$2yy,$$2xy 295 $$3,$$3x,$$3y,$$3xx,$$3yy,$$3xy 295 $$4,$$4x,$$4y,$$4xx,$$4yy,$$4xy 295 . . . . . . 295 295 Recall that the PDEs have the form 295 295 F1 = lambda*(RHO11*$$1 + RHO12*$$2 + RHO13*$$3 + RHO14*$$4...) 295 F2 = lambda*(RHO21*$$1 + RHO22*$$2 + RHO23*$$3 + RHO24*$$4...) 295 F3 = lambda*(RHO31*$$1 + RHO32*$$2 + RHO33*$$3 + RHO34*$$4...) 295 F4 = lambda*(RHO41*$$1 + RHO42*$$2 + RHO43*$$3 + RHO44*$$4...) 295 . . 295 295 The parameters P1,P2 and derivatives with respect to these may also 295 be referenced ($$11 = d$$1/dP1, etc): 295 $$11,$$12,$$111,$$122,$$112 295 $$21,$$22,$$211,$$222,$$212 295 $$31,$$32,$$311,$$322,$$312 295 $$41,$$42,$$411,$$422,$$412 295 . . . . . . . . . 296 Now enter FORTRAN expressions to define the PDE coefficients, which 296 may be functions of 296 296 X,Y,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy 296 296 and, in some cases, of the parameter T. 296 296 Recall that the PDE has the form 296 296 F = 0 296 296 The parameters P1,P2 and derivatives with respect to these may also 296 be referenced ($$11 = d$$1/dP1, etc): 296 $$11,$$12,$$111,$$122,$$112 297 Now enter FORTRAN expressions to define the PDE coefficients, which 297 may be functions of 297 297 X,Y,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy 297 $$2,$$2x,$$2y,$$2xx,$$2yy,$$2xy 297 297 and, in some cases, of the parameter T. 297 297 Recall that the PDEs have the form 297 297 F1 = 0 297 F2 = 0 297 297 The parameters P1,P2 and derivatives with respect to these may also 297 be referenced ($$11 = d$$1/dP1, etc): 297 $$11,$$12,$$111,$$122,$$112 297 $$21,$$22,$$211,$$222,$$212 298 Now enter FORTRAN expressions to define the PDE coefficients, which 298 may be functions of 298 298 X,Y,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy 298 $$2,$$2x,$$2y,$$2xx,$$2yy,$$2xy 298 $$3,$$3x,$$3y,$$3xx,$$3yy,$$3xy 298 298 and, in some cases, of the parameter T. 298 298 Recall that the PDEs have the form 298 298 F1 = 0 298 F2 = 0 298 F3 = 0 298 298 The parameters P1,P2 and derivatives with respect to these may also 298 be referenced ($$11 = d$$1/dP1, etc): 298 $$11,$$12,$$111,$$122,$$112 298 $$21,$$22,$$211,$$222,$$212 298 $$31,$$32,$$311,$$322,$$312 298M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 298M$ The partial differential equations may be written $ 298M$ $ 298M$ Visc*(Uxx+Ux/X-U/X**2+Uyy) - Hx - Rho*(U*Ux+W*Uy) = 0 $ 298M$ Visc*(Wxx+Wx/X +Wyy) - Hy - Rho*(U*Wx+W*Wy) = 0 $ 298M$ Ux+Wy+U/X = 0 $ 298M$ $ 298M$ When asked if you want to write a FORTRAN block, $ 298M$ enter: no $ 298M$ then enter the following, when prompted: $ 298M$ F1 = Visc*(Uxx+Ux/X-U/X**2+Uyy) - Hx - Rho*(U*Ux+W*Uy) $ 298M$ F2 = Visc*(Wxx+Wx/X+Wyy) - Hy - Rho*(U*Wx+W*Wy) $ 298M$ F3 = Ux+Wy+U/X $ 298M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 299 Now enter FORTRAN expressions to define the PDE coefficients, which 299 may be functions of 299 299 X,Y,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy 299 $$2,$$2x,$$2y,$$2xx,$$2yy,$$2xy 299 $$3,$$3x,$$3y,$$3xx,$$3yy,$$3xy 299 $$4,$$4x,$$4y,$$4xx,$$4yy,$$4xy 299 . . . . . . 299 299 and, in some cases, of the parameter T. 299 299 Recall that the PDEs have the form 299 299 F1 = 0 299 F2 = 0 299 F3 = 0 299 F4 = 0 299 . . 299 299 The parameters P1,P2 and derivatives with respect to these may also 299 be referenced ($$11 = d$$1/dP1, etc): 299 $$11,$$12,$$111,$$122,$$112 299 $$21,$$22,$$211,$$222,$$212 299 $$31,$$32,$$311,$$322,$$312 299 $$41,$$42,$$411,$$422,$$412 299 . . . . . 300 Now enter FORTRAN expressions to define the PDE coefficients, which 300 may be functions of 300 300 X,Y,T,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy 300 300 Recall that the PDE has the form 300 300 C*d($$1)/dT = F 300 300 The parameters P1,P2 and derivatives with respect to these may also 300 be referenced ($$11 = d$$1/dP1, etc): 300 $$11,$$12,$$111,$$122,$$112 301 Now enter FORTRAN expressions to define the PDE coefficients, which 301 may be functions of 301 301 X,Y,T,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy 301 $$2,$$2x,$$2y,$$2xx,$$2yy,$$2xy 301 301 Recall that the PDEs have the form 301 301 C11*d($$1)/dT + C12*d($$2)/dT = F1 301 C21*d($$1)/dT + C22*d($$2)/dT = F2 301 301 The parameters P1,P2 and derivatives with respect to these may also 301 be referenced ($$11 = d$$1/dP1, etc): 301 $$11,$$12,$$111,$$122,$$112 301 $$21,$$22,$$211,$$222,$$212 302 Now enter FORTRAN expressions to define the PDE coefficients, which 302 may be functions of 302 302 X,Y,T,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy 302 $$2,$$2x,$$2y,$$2xx,$$2yy,$$2xy 302 $$3,$$3x,$$3y,$$3xx,$$3yy,$$3xy 302 302 Recall that the PDEs have the form 302 302 C11*d($$1)/dT + C12*d($$2)/dT + C13*d($$3)/dT = F1 302 C21*d($$1)/dT + C22*d($$2)/dT + C23*d($$3)/dT = F2 302 C31*d($$1)/dT + C32*d($$2)/dT + C33*d($$3)/dT = F3 302 302 The parameters P1,P2 and derivatives with respect to these may also 302 be referenced ($$11 = d$$1/dP1, etc): 302 $$11,$$12,$$111,$$122,$$112 302 $$21,$$22,$$211,$$222,$$212 302 $$31,$$32,$$311,$$322,$$312 303 Now enter FORTRAN expressions to define the PDE coefficients, which 303 may be functions of 303 303 X,Y,T,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy 303 $$2,$$2x,$$2y,$$2xx,$$2yy,$$2xy 303 $$3,$$3x,$$3y,$$3xx,$$3yy,$$3xy 303 $$4,$$4x,$$4y,$$4xx,$$4yy,$$4xy 303 . . . . . . 303 303 Recall that the PDEs have the form 303 303 C11*d($$1)/dT + C12*d($$2)/dT + C13*d($$3)/dT + C14*d($$4)/dT +...= F1 303 C21*d($$1)/dT + C22*d($$2)/dT + C23*d($$3)/dT + C24*d($$4)/dT +...= F2 303 C31*d($$1)/dT + C32*d($$2)/dT + C33*d($$3)/dT + C34*d($$4)/dT +...= F3 303 C41*d($$1)/dT + C42*d($$2)/dT + C43*d($$3)/dT + C44*d($$4)/dT +...= F4 303 . . . . 303 303 The parameters P1,P2 and derivatives with respect to these may also 303 be referenced ($$11 = d$$1/dP1, etc): 303 $$11,$$12,$$111,$$122,$$112 303 $$21,$$22,$$211,$$222,$$212 303 $$31,$$32,$$311,$$322,$$312 303 $$41,$$42,$$411,$$422,$$412 303 . . . . . . . . . 304 If you don't want to read the FINE PRINT, default the initial values. 304 304 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 304 + Now the initial values for the inverse power method may be defined + 304 + using FORTRAN expressions. They may be functions of X and Y + 304 + (and the parameters P1,P2). + 304 + + 304 + By default, the initial values are generated by a random number + 304 + generator. This virtually eliminates any possibility of convergence + 304 + to the wrong eigenvalue, due to an unlucky choice of initial values. + 304 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 305 Now the initial values for Newton's method must be defined using 305 FORTRAN expressions. They may be functions of X and Y (and the 305 parameters P1,P2). 305 305 It is important to provide initial values which are at least of the 305 correct order of magnitude. 305M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 305M$ enter: U0 = 0 $ 305M$ W0 = 1-(X/2)**2 $ 305M$ H0 = 0 $ 305M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 306 Now the initial values must be defined using FORTRAN expressions. 306 They may be functions of X and Y (and the parameters P1,P2), and may 306 also reference the initial time T0. 307 If the program dumping the solution and the program restarting from 307 the dump have identical finite element grids, the solution at the 307 nodes can be dumped to the restart file "pde2d.res", and there will 307 be no loss of accuracy due to interpolation when this solution is read 307 back. Will the dumping and restarting programs have identical grids? 307 307 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 307 + If you answer 'no', then you can change the grid between runs, but + 307 + the solution on the new grid will be interpolated from the dumped + 307 + solution, so there may be some loss of accuracy due to interpolation.+ 307 + The solution will be dumped to the restart file on a uniform grid + 307 + of size + 307 + 2D problems: NXP8Z=101 by NYP8Z=101 + 307 + 3D problems: NXP8Z=41 by NYP8Z=41 by NZP8Z=41 + 307 + The values of NXP8Z,NYP8Z,NZP8Z are set in a PARAMETER statement + 307 + in the main program, so they can be changed, if desired. The + 307 + interpolation degree (KDEG8Z) is also set in this PARAMETER + 307 + statement, to 1 (linear interpolation), but KDEG8Z can be reset to + 307 + 2 or 3 if desired. + 307 + + 307 + If you want to modify the data in the restart file after it has + 307 + been dumped (each trip through the loop IPROB=1,NPROB in the main + 307 + program), answer 'no' even if your grid does not change, then + 307 + uncomment the two calls to (D)TDPR3 in the main program (and also + 307 + the dimension statement for xres8z,yres8z,zres8z,ures8z). You + 307 + can modify the restart file by modifying the solution as stored in + 307 + the array URES8Z, after it is read from 'pde2d.res' by the first + 307 + call, and before it is written back by the second call. The + 307 + solution is stored as follows: + 307 + URES8Z(IEQN,I,J,K) = unknown #IEQN at + 307 + P1 = XRES8Z(I), P2 = YRES8Z(J), P3 = ZRES8Z(K) + 307 + where I=1,...,NXP8Z, J=1,...,NYP8Z, K=1,...,NZP8Z. You may NOT + 307 + modify the arrays XRES8Z,YRES8Z,ZRES8Z. (Note: for the 2D problem, + 307 + P3=ZRES8Z(K)=0 for all K.) + 307 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 307 307 Will the dumping and restarting programs have identical grids? 308 If you do not have any periodic boundary conditions, enter IPERDC=0. 308 308 Enter IPERDC=1 for periodic conditions at P1 = P1GRID(1),P1GRID(NP1GRID) 308 IPERDC=2 for periodic conditions at P2 = P2GRID(1),P2GRID(NP2GRID) 308 IPERDC=4 for periodic conditions on both P1 and P2 308 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 308 + When periodic boundary conditions are selected, they apply to all + 308 + variables by default. To turn off periodic boundary conditions on + 308 + the I-th variable, set PERDC(I) to 0 (or another appropriate value + 308 + of IPERDC) below in the main program and set the desired boundary + 308 + conditions in subroutine GB8Z, "by hand". + 308 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 308M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 308M$ enter: IPERDC = 0 $ 308M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 309 Enter FORTRAN expressions to define the boundary condition functions, 309 which may be functions of 309 309 X,Y,$$1,$$1x,$$1y and (if applicable) T 309 309 Recall that the boundary conditions have the form 309 309 G = 0 309 309 Enter NONE to indicate "no" boundary condition. 309 309 The parameters P1,P2 and derivatives with respect to these may also 309 be referenced ($$11 = d$$1/dP1, etc): 309 $$11,$$12 309 The components (NORMx,NORMy) of the unit outward normal vector 309 may also be referenced, as well as the normal derivative $$1norm. 309 309 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 309 + If "no" boundary condition is specified, the PDE is enforced at + 309 + points just inside the boundary (exactly on the boundary, if EPS8Z + 309 + is set to 0 in the main program). + 309 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 310 Enter FORTRAN expressions to define the boundary condition functions, 310 which may be functions of 310 310 X,Y,$$1,$$1x,$$1y, 310 $$2,$$2x,$$2y and (if applicable) T 310 310 Recall that the boundary conditions have the form 310 310 G1 = 0 310 G2 = 0 310 310 Enter NONE to indicate "no" boundary condition. 310 310 The parameters P1,P2 and derivatives with respect to these may also 310 be referenced ($$11 = d$$1/dP1, etc): 310 $$11,$$12 310 $$21,$$22 310 The components (NORMx,NORMy) of the unit outward normal vector 310 may also be referenced, as well as the normal derivatives $$1norm, 310 $$2norm. 310 310 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 310 + If "no" boundary condition is specified, the corresponding PDE is + 310 + enforced at points just inside the boundary (exactly on the + 310 + boundary, if EPS8Z is set to 0 in the main program). + 310 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 311 Enter FORTRAN expressions to define the boundary condition functions, 311 which may be functions of 311 311 X,Y,$$1,$$1x,$$1y, 311 $$2,$$2x,$$2y, 311 $$3,$$3x,$$3y and (if applicable) T 311 311 Recall that the boundary conditions have the form 311 311 G1 = 0 311 G2 = 0 311 G3 = 0 311 311 Enter NONE to indicate "no" boundary condition. 311 311 The parameters P1,P2 and derivatives with respect to these may also 311 be referenced ($$11 = d$$1/dP1, etc): 311 $$11,$$12 311 $$21,$$22 311 $$31,$$32 311 The components (NORMx,NORMy) of the unit outward normal vector 311 may also be referenced, as well as the normal derivatives $$1norm, 311 $$2norm,$$3norm. 311 311 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 311 + If "no" boundary condition is specified, the corresponding PDE is + 311 + enforced at points just inside the boundary (exactly on the + 311 + boundary, if EPS8Z is set to 0 in the main program). + 311 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 312 Enter FORTRAN expressions to define the boundary condition functions, 312 which may be functions of 312 312 X,Y,$$1,$$1x,$$1y, 312 $$2,$$2x,$$2y, 312 $$3,$$3x,$$3y, 312 $$4,$$4x,$$4y and (if applicable) T 312 . . . 312 312 Recall that the boundary conditions have the form 312 312 G1 = 0 312 G2 = 0 312 G3 = 0 312 G4 = 0 312 . . 312 Enter NONE to indicate "no" boundary condition. 312 312 The parameters P1,P2 and derivatives with respect to these may also 312 be referenced ($$11 = d$$1/dP1, etc): 312 $$11,$$12 312 $$21,$$22 312 $$31,$$32 312 $$41,$$42 312 . . 312 The components (NORMx,NORMy) of the unit outward normal vector 312 may also be referenced, as well as the normal derivatives $$1norm, 312 $$2norm,$$3norm,$$4norm... 312 312 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 312 + If "no" boundary condition is specified, the corresponding PDE is + 312 + enforced at points just inside the boundary (exactly on the + 312 + boundary, if EPS8Z is set to 0 in the main program). + 312 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 313 313 First define the boundary conditions on the face P1 = P1GRID(1). 313J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 313J$ enter: G1 = Ux $ 313J$ G2 = Vx $ 313J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 313K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 313K$ enter: G = NONE $ 313K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 313L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 313L$ enter: G = NONE $ 313L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 313M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 313M$ enter: G1 = NONE $ 313M$ G2 = NONE $ 313M$ G3 = NONE $ 313M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 314 314 Now define the boundary conditions on the face P1 = P1GRID(NP1GRID). 314J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 314J$ enter: G1 = Ux $ 314J$ G2 = Vx $ 314J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 314K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 314K$ enter: G = U $ 314K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 314L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 314L$ enter: G = U $ 314L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 314M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 314M$ enter: G1 = U $ 314M$ G2 = W $ 314M$ G3 = NONE $ 314M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 315 315 Now define the boundary conditions on the face P2 = P2GRID(1). 315J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 315J$ enter: G1 = Uy $ 315J$ G2 = Vy $ 315J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 315K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 315K$ enter: G = NONE $ 315K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 315M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 315M$ enter: G1 = Uy+Wx $ 315M$ G2 = W - (1-(X/2)**2) $ 315M$ G3 = H2 $ 315M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 316 316 Now define the boundary conditions on the face P2 = P2GRID(NP2GRID). 316J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 316J$ enter: G1 = Uy $ 316J$ G2 = Vy $ 316J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 316K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 316K$ enter: G = NONE $ 316K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 316M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 316M$ enter: G1 = Uy+Wx $ 316M$ G2 = 2*Visc*Wy - H $ 316M$ G3 = NONE $ 316M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 317 317 Now define the boundary conditions on the face P3 = P3GRID(1). 317I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 317I$ enter: G1 = U $ 317I$ G2 = V $ 317I$ G3 = W $ 317I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 317J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 317J$ enter: G1 = Uz $ 317J$ G2 = Vz $ 317J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 317L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 317L$ enter: G = U $ 317L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 318 318 Now define the boundary conditions on the face P3 = P3GRID(NP3GRID). 318I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 318I$ enter: $ 318I$ G1 = (A*Ux+B*Vy+B*Wz)*NORMx+C*(Uy+Vx)*NORMy+C*(Uz+Wx)*NORMz + NORMx $ 318I$ G2 = C*(Uy+Vx)*NORMx+(A*Vy+B*Ux+B*Wz)*NORMy+C*(Vz+Wy)*NORMz + NORMy $ 318I$ G3 = C*(Uz+Wx)*NORMx+C*(Vz+Wy)*NORMy+(A*Wz+B*Ux+B*Vy)*NORMz + NORMz $ 318I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 318J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 318J$ enter: G1 = Uz $ 318J$ G2 = Vz $ 318J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 318L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 318L$ enter: G = U $ 318L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 319 If you don't want to read the FINE PRINT, default all of the following 319 variables. 319 319 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 319 + Normally, PDE2D saves the values of $$1,$$1x,$$1y at the output + 319 + points. If different variables are to be saved (for later printing + 319 + or plotting) the following functions can be used to re-define the + 319 + output variables: + 319 + define UPRINT(1) to replace $$1 + 319 + UXPRINT(1) $$1x + 319 + UYPRINT(1) $$1y + 319 + Each function may be a function of + 319 + + 319 + X,Y,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy and (if applicable) T + 319 + + 319 + Each may also be a function of the integral estimates SINT(1),..., + 319 + BINT(1),... + 319 + + 319 + The parameters P1,P2 and derivatives with respect to these may also + 319 + be referenced ($$11 = d$$1/dP1, etc): + 319 + $$11,$$12,$$111,$$122,$$112 + 319 + + 319 + The default for each variable is no change, for example, UPRINT(1) + 319 + defaults to $$1. Enter FORTRAN expressions for each of the + 319 + following functions (or default). + 319 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 320 If you don't want to read the FINE PRINT, default all of the following 320 variables. 320 320 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 320 + Normally, PDE2D saves the values of $$1,$$1x,$$1y,$$2,$$2x,$$2y at + 320 + the output points. If different variables are to be saved (for + 320 + later printing or plotting) the following functions can be used to + 320 + re-define the output variables: + 320 + define UPRINT(1) to replace $$1 + 320 + UXPRINT(1) $$1x + 320 + UYPRINT(1) $$1y + 320 + UPRINT(2) $$2 + 320 + UXPRINT(2) $$2x + 320 + UYPRINT(2) $$2y + 320 + Each function may be a function of + 320 + + 320 + X,Y,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy + 320 + $$2,$$2x,$$2y,$$2xx,$$2yy,$$2xy and (if applicable) T + 320 + + 320 + Each may also be a function of the integral estimates SINT(1),..., + 320 + BINT(1),... + 320 + + 320 + The parameters P1,P2 and derivatives with respect to these may also + 320 + be referenced ($$11 = d$$1/dP1, etc): + 320 + $$11,$$12,$$111,$$122,$$112 + 320 + $$21,$$22,$$211,$$222,$$212 + 320 + + 320 + The default for each variable is no change, for example, UPRINT(1) + 320 + defaults to $$1. Enter FORTRAN expressions for each of the + 320 + following functions (or default). + 320 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 321 If you don't want to read the FINE PRINT, default all of the following 321 variables. 321 321 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 321 + Normally, PDE2D saves the values of $$1,$$1x,$$1y,$$2,$$2x,$$2y, + 321 + $$3,$$3x,$$3y at the output points. If different variables are to + 321 + be saved (for later printing or plotting) the following functions + 321 + can be used to re-define the output variables: + 321 + define UPRINT(1) to replace $$1 + 321 + UXPRINT(1) $$1x + 321 + UYPRINT(1) $$1y + 321 + UPRINT(2) $$2 + 321 + UXPRINT(2) $$2x + 321 + UYPRINT(2) $$2y + 321 + UPRINT(3) $$3 + 321 + UXPRINT(3) $$3x + 321 + UYPRINT(3) $$3y + 321 + Each function may be a function of + 321 + + 321 + X,Y,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy + 321 + $$2,$$2x,$$2y,$$2xx,$$2yy,$$2xy + 321 + $$3,$$3x,$$3y,$$3xx,$$3yy,$$3xy and (if applicable) T + 321 + + 321 + Each may also be a function of the integral estimates SINT(1),..., + 321 + BINT(1),... + 321 + + 321 + The parameters P1,P2 and derivatives with respect to these may also + 321 + be referenced ($$11 = d$$1/dP1, etc): + 321 + $$11,$$12,$$111,$$122,$$112 + 321 + $$21,$$22,$$211,$$222,$$212 + 321 + $$31,$$32,$$311,$$322,$$312 + 321 + + 321 + The default for each variable is no change, for example, UPRINT(1) + 321 + defaults to $$1. Enter FORTRAN expressions for each of the + 321 + following functions (or default). + 321 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 321M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 321M$ press [RETURN] to default all output modification variables $ 321M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 322 If you don't want to read the FINE PRINT, default all of the following 322 variables. 322 322 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 322 + Normally, PDE2D saves the values of $$1,$$1x,$$1y,$$2,$$2x,$$2y, + 322 + $$3,$$3x,$$3y,$$4,$$4x,$$4y...at the output points. If different + 322 + variables are to be saved (for later printing or plotting) the + 322 + following functions can be used to re-define the output variables: + 322 + define UPRINT(1) to replace $$1 + 322 + UXPRINT(1) $$1x + 322 + UYPRINT(1) $$1y + 322 + UPRINT(2) $$2 + 322 + UXPRINT(2) $$2x + 322 + UYPRINT(2) $$2y + 322 + UPRINT(3) $$3 + 322 + UXPRINT(3) $$3x + 322 + UYPRINT(3) $$3y + 322 + UPRINT(4) $$4 + 322 + UXPRINT(4) $$4x + 322 + UYPRINT(4) $$4y + 322 + . . + 322 + . . + 322 + Each function may be a function of + 322 + + 322 + X,Y,$$1,$$1x,$$1y,$$1xx,$$1yy,$$1xy + 322 + $$2,$$2x,$$2y,$$2xx,$$2yy,$$2xy + 322 + $$3,$$3x,$$3y,$$3xx,$$3yy,$$3xy + 322 + $$4,$$4x,$$4y,$$4xx,$$4yy,$$4xy and (if applicable) T + 322 + . . . . . . + 322 + + 322 + Each may also be a function of the integral estimates SINT(1),..., + 322 + BINT(1),... + 322 + + 322 + The parameters P1,P2 and derivatives with respect to these may also + 322 + be referenced ($$11 = d$$1/dP1, etc): + 322 + $$11,$$12,$$111,$$122,$$112 + 322 + $$21,$$22,$$211,$$222,$$212 + 322 + $$31,$$32,$$311,$$322,$$312 + 322 + $$41,$$42,$$411,$$422,$$412 + 322 + . . . . . + 322 + + 322 + The default for each variable is no change, for example, UPRINT(1) + 322 + defaults to $$1. Enter FORTRAN expressions for each of the + 322 + following functions (or default). + 322 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 323 The solution is normally saved on an NP1+1 by NP2+1 rectangular grid 323 of points, 323 P1 = P1A + I*(P1B-P1A)/NP1, I = 0,...,NP1 323 P2 = P2A + J*(P2B-P2A)/NP2, J = 0,...,NP2 323 Enter values for NP1 and NP2. Suggested values: NP1=NP2=25. 323 323 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 323 + If you want to save the solution at an arbitrary user-specified set + 323 + of points, set NP2=0 and NP1+1=number of points. In this case you + 323 + can request tabular output, but no plots can be made. + 323 + + 323 + If you set NEAR8Z=1 in the main program, the values saved at each + 323 + output point will actually be the solution as evaluated at a nearby + 323 + collocation point. For most problems this obviously will produce + 323 + less accurate output or plots, but for certain (rare) problems, a + 323 + solution component may be much less noisy when plotted only at + 323 + collocation points. + 323 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 323M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 323M$ enter: NP1 = 20 $ 323M$ NP2 = 20 $ 323M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 324 Enter a block of FORTRAN statements to define the output points: 324 (P1OUT8Z(I,0) , P2OUT8Z(I,0)), I=0,...,NP1 325 The solution is saved on an NP1+1 by NP2+1 rectangular grid covering 325 the rectangle (P1A,P1B) x (P2A,P2B). Enter values for P1A,P1B,P2A,P2B. 325 These variables are usually defaulted. 325 325 The defaults are P1A = P1GRID(1), P1B = P1GRID(NP1GRID) 325 P2A = P2GRID(1), P2B = P2GRID(NP2GRID) 325 325M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 325M$ To avoid division by 0 at r=0, $ 325M$ enter: P1A = 0.001 $ 325M$ and default the other variables $ 325M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 326 To generate tabular or graphical output, choose an output option from 326 the list below. 326 326 0. No further output is desired 326 1. Table of values at output points 326 The tabulated output is saved in a file. 326 2. Surface plot of a scalar variable. Plots will only reflect the true 326 geometry of the region if ITRANS=0. 326 3. Contour plot of a scalar variable. Plots will be made which reflect 326 the true geometry of the region. 326 4. Vector field plot. Plots will be made which reflect the true 326 geometry of the region. 326 5. One dimensional cross-sectional plots (versus P1, P2 or T) 326 326 Enter 0,1,2,3,4 or 5 to select an output option. 326 326 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 326 + If you set NP2=0 and saved the solution at an arbitrary set of + 326 + user-specified output points, you can only request tabular output. + 326 + + 326 + If you decide later that you want additional types of plots not + 326 + requested during this interactive session, you will have to work + 326 + through a new interactive session, so it is recommended that you + 326 + request all output or plots you think you MIGHT eventually want now, + 326 + during this session. + 326 + + 326 + Regardless of the options you select, a dummy subroutine POSTPR + 326 + will be included in the program created by the interactive driver; + 326 + you can add your own postprocessing code to this subroutine. + 326 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 326M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 326M$ enter: 4, the first time you see this message and $ 326M$ 3, the second time $ 326M$ 0, the third time $ 326M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 327 Enter a value for IVAR, to select the variable to be plotted or 327 printed: 327 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 327 2 $$1x 327 3 $$1y 328 Enter a value for IVAR, to select the variable to be plotted or 328 printed: 328 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 328 2 $$1x 328 3 $$1y 328 4 $$2 328 5 $$2x 328 6 $$2y 329 Enter a value for IVAR, to select the variable to be plotted or 329 printed: 329 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 329 2 $$1x 329 3 $$1y 329 4 $$2 329 5 $$2x 329 6 $$2y 329 7 $$3 329 8 $$3x 329 9 $$3y 329M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 329M$ We want a contour plot of H, so $ 329M$ enter: IVAR = 7 $ 329M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 330 Enter a value for IVAR, to select the variable to be plotted or 330 printed: 330 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 330 2 $$1x 330 3 $$1y 330 4 $$2 330 5 $$2x 330 6 $$2y 330 7 $$3 330 8 $$3x 330 9 $$3y 330 10 $$4 330 11 $$4x 330 12 $$4y 330 . . 330 . . 331 Enter values for IVAR1, IVAR2 to select the components Vr1 and Vr2 331 of the vector to be plotted. 331 IVAR1,IVAR2 = 1 means $$1 (possibly as modified by UPRINT,...) 331 2 $$1x 331 3 $$1y 331 331 Vr1 and Vr2 are assumed to be the components of the vector in 331 Cartesian coordinates. 332 Enter values for IVAR1, IVAR2 to select the components Vr1 and Vr2 332 of the vector to be plotted. 332 IVAR1,IVAR2 = 1 means $$1 (possibly as modified by UPRINT,...) 332 2 $$1x 332 3 $$1y 332 4 $$2 332 5 $$2x 332 6 $$2y 332 332 Vr1 and Vr2 are assumed to be the components of the vector in 332 Cartesian coordinates. 333 Enter values for IVAR1, IVAR2 to select the components Vr1 and Vr2 333 of the vector to be plotted. 333 IVAR1,IVAR2 = 1 means $$1 (possibly as modified by UPRINT,...) 333 2 $$1x 333 3 $$1y 333 4 $$2 333 5 $$2x 333 6 $$2y 333 7 $$3 333 8 $$3x 333 9 $$3y 333 333 Vr1 and Vr2 are assumed to be the components of the vector in 333 Cartesian coordinates. 333M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 333M$ We want a vector plot of (U,W), so $ 333M$ enter: IVAR1 = 1 $ 333M$ IVAR2 = 4 $ 333M$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 13 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 334 Enter values for IVAR1, IVAR2 to select the components Vr1 and Vr2 334 of the vector to be plotted. 334 IVAR1,IVAR2 = 1 means $$1 (possibly as modified by UPRINT,...) 334 2 $$1x 334 3 $$1y 334 4 $$2 334 5 $$2x 334 6 $$2y 334 7 $$3 334 8 $$3x 334 9 $$3y 334 10 $$4 334 11 $$4x 334 12 $$4y 334 . . 334 . . 334 Vr1 and Vr2 are assumed to be the components of the vector in 334 Cartesian coordinates. 335 Which type of cross-sectional plots do you want? 335 335 1. Plots of output variable as function of P1 (constant P2 [and T]) 335 2. Plots of output variable as function of P2 (constant P1 [and T]) 335 or, if applicable: 335 3. Plots of output variable as function of T (constant P1 and P2) 335 335 Enter 1,2 or 3 to select a plot type. 336 One-dimensional plots of the output variable as a function of P1 will 336 be made, at the output grid P2-points closest to 336 P2 = P2CROSS(1),...,P2CROSS(NP2VALS) 336 336 Enter values for NP2VALS and P2CROSS(1),...,P2CROSS(NP2VALS). 337 One-dimensional plots of the output variable as a function of P2 will 337 be made, at the output grid P1-points closest to 337 P1 = P1CROSS(1),...,P1CROSS(NP1VALS) 337 337 Enter values for NP1VALS and P1CROSS(1),...,P1CROSS(NP1VALS). 338 One-dimensional plots of the output variable as a function of T will 338 be made, at the output grid points (P1,P2) closest to 338 (P1CROSS(I),P2CROSS(J)), I=1,...,NP1VALS, J=1,...,NP2VALS 338 338 Enter values for NP1VALS, P1CROSS(1),...,P1CROSS(NP1VALS), 338 and NP2VALS, P2CROSS(1),...,P2CROSS(NP2VALS) 339 Enter the name of the FORTRAN function subprogram, in columns 1-6. It 339 must be a function of P1 and P2 only, but do not enter the '(P1,P2)'. 340 If you don't want to read the FINE PRINT, enter NWORK = 20000. 340 340 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 340 + Enter a dimension, NWORK, for the workarray, WORK, which is used to + 340 + store the tabulated values, for interpolation on later calls. NWORK + 340 + must be at least (NP1+1)*(NP2+1)+6, where NP1,NP2 are the output + 340 + grid parameters used by the program which generated the tabulated + 340 + values. + 340 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 341 PDE2D solves the time-dependent system (note: U,F,G,U0 may be vectors, 341 C,RHO may be matrices): 341 341 C(X,Y,Z,T,U,Ux,Uy,Uz)*d(U)/dT = 341 F(X,Y,Z,T,U,Ux,Uy,Uz,Uxx,Uyy,Uzz,Uxy,Uxz,Uyz) 341 341 or the steady-state system: 341 341 F(X,Y,Z,U,Ux,Uy,Uz,Uxx,Uyy,Uzz,Uxy,Uxz,Uyz) = 0 341 341 or the linear and homogeneous eigenvalue system: 341 341 F(X,Y,Z,U,Ux,Uy,Uz,Uxx,Uyy,Uzz,Uxy,Uxz,Uyz) = lambda*RHO(X,Y,Z)*U 341 341 with boundary conditions: 341 341 G(X,Y,Z,[T],U,Ux,Uy,Uz) = 0 341 (periodic boundary conditions are also permitted) 341 341 For time-dependent problems there are also initial conditions: 341 341 U = U0(X,Y,Z) at T=T0 341 341 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 341 + If your PDEs involve the solution at points other than (P1,P2,P3), + 341 + the function + 341 + (D)OLDSOL3(IDER,IEQ,PP1,PP2,PP3,KDEG) + 341 + will interpolate (using interpolation of degree KDEG=1,2 or 3) to + 341 + (PP1,PP2,PP3) the function saved in UOUT(*,*,*,IDER,IEQ,ISET) on the + 341 + last time step or iteration (ISET) for which it has been saved. + 341 + Thus, for example, if IDER=1, this will return the latest value of + 341 + component IEQ of the solution at (PP1,PP2,PP3), assuming this has + 341 + not been modified using UPRINT... If your equations involve + 341 + integrals of the solution, for example, you can use (D)OLDSOL3 to + 341 + approximate these using the solution from the last time step or + 341 + iteration. + 341 + + 341 + CAUTION: For a steady-state or eigenvalue problem, you must reset + 341 + NOUT=1 if you want to save the solution each iteration. + 341 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 341 + A system of NEQN complex partial differential equations must be + 341 + written as a system of 2*NEQN real equations, by separating the + 341 + equations into their real and imaginary parts. However, note that + 341 + the complex arithmetic abilities of FORTRAN can be used to simplify + 341 + this separation. For example, the complex PDE: + 341 + I*(Uxx+Uyy+Uzz) - 1/(1+U**10) = 0, where U = UR + UI*I + 341 + would be difficult to split up analytically, but using FORTRAN + 341 + expressions it is easy: + 341 + F1 = -(UIxx+UIyy+UIzz) - REAL(1.0/(1.0+CMPLX(UR,UI)**10)) + 341 + F2 = (URxx+URyy+URzz) - AIMAG(1.0/(1.0+CMPLX(UR,UI)**10)) + 341 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 341 You may now define global parameters, which may be referenced in any 341 of the "FORTRAN expressions" you input throughout the rest of this 341 interactive session. You will be prompted alternately for parameter 341 names and their values; enter a blank name when you are finished. 341 341 Parameter names are valid FORTRAN variable names, starting in 341 column 1. Thus each name consists of 1 to 6 alphanumeric characters, 341 the first of which must be a letter. If the first letter is in the 341 range I-N, the parameter must be an integer. 341 341 Parameter values are either FORTRAN constants or FORTRAN expressions 341 involving only constants and global parameters defined on earlier 341 lines. They may also be functions of the problem number IPROB, if 341 you are solving several similar problems in one run (NPROB > 1). Note 341 that you are defining global CONSTANTS, not functions; e.g., parameter 341 values may not reference any of the independent or dependent variables 341 of your problem. 341 341 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 341 + If you define other parameters here later, using an editor, you must + 341 + add them to COMMON block /PARM8Z/ everywhere this block appears, if + 341 + they are to be "global" parameters. + 341 + + 341 + The variable PI is already included as a global parameter, with an + 341 + accurate value 3.14159... + 341 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 341I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 341I$ enter: R0 $ 341I$ 5 $ 341I$ R1 $ 341I$ 4 $ 341I$ E $ 341I$ 2 $ 341I$ VNU $ 341I$ 0.33 $ 341I$ A $ 341I$ E*(1-VNU)/(1+VNU)/(1-2*VNU) $ 341I$ B $ 341I$ E*VNU/(1+VNU)/(1-2*VNU) $ 341I$ C $ 341I$ E/2.0/(1+VNU) $ 341I$ [blank line] $ 341I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 341J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 341J$ press [RETURN] to skip global parameter definitions $ 341J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 341K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 341K$ enter: C1 $ 341K$ 3.7796 $ 341K$ C2 $ 341K$ -0.26248 $ 341K$ [blank line] $ 341K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 341L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 341L$ enter: EPS $ 341L$ 0.001 $ 341L$ [blank line] $ 341L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 342 You can solve problems in your region only if you can describe it by 342 X = X(P1,P2,P3) 342 Y = Y(P1,P2,P3) 342 Z = Z(P1,P2,P3) 342 with constant limits on the parameters P1,P2,P3. If your region is 342 rectangular, enter ITRANS=0 and the trivial parameterization 342 X = P1 342 Y = P2 342 Z = P3 342 will be used. Otherwise, you need to read the FINE PRINT below. 342 342 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 342 + If P1,P2,P3 represent cylindrical, spherical or other non-Cartesian + 342 + coordinates, you can reference the Cartesian coordinates X,Y,Z + 342 + and derivatives of your unknowns with respect to these coordinates, + 342 + when you define your PDE coefficients, boundary conditions, and + 342 + volume and boundary integrals, if you enter ITRANS .NE. 0. Enter: + 342 + ITRANS = 1, if P1,P2,P3 are cylindrical coordinates, that is, if + 342 + P1=R, P2=Theta, P3=Z, where X = R*cos(Theta) + 342 + Y = R*sin(Theta) + 342 + Z = Z + 342 + ITRANS = -1, same as ITRANS=1, but P1=Theta, P2=R, P3=Z + 342 + ITRANS = 2, if P1,P2,P3 are spherical coordinates, that is, if + 342 + P1=Rho, P2=Phi, P3=Theta, where + 342 + X = Rho*sin(Phi)*cos(Theta) + 342 + Y = Rho*sin(Phi)*sin(Theta) + 342 + Z = Rho*cos(Phi) + 342 + (Theta is longitude, Phi is measured from north pole) + 342 + ITRANS = -2, same as ITRANS=2, but P1=Rho, P2=Theta, P3=Phi + 342 + ITRANS = 3, to define your own coordinate transformation. In this + 342 + case, you will be prompted to define X,Y,Z and their + 342 + first and second derivatives in terms of P1,P2,P3. + 342 + Because of symmetry, you will not be prompted for all + 342 + of the second derivatives. If you make a mistake in + 342 + computing any of these derivatives, PDE2D will usually + 342 + be able to issue a warning message. (X1 = dX/dP1, etc) + 342 + ITRANS = -3, same as ITRANS=3, but you will only be prompted to + 342 + define X,Y,Z; their first and second derivatives will + 342 + be approximated using finite differences. + 342 + When ITRANS = -3 or 3, the first derivatives of X,Y,Z must all be + 342 + continuous. + 342 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 342I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 342I$ enter: ITRANS = -3 $ 342I$ $ 342I$ Then enter the following, when prompted: $ 342I$ X = (R0 + P3*COS(P2))*COS(P1) $ 342I$ Y = (R0 + P3*COS(P2))*SIN(P1) $ 342I$ Z = P3*SIN(P2) $ 342I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 342J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 342J$ enter: ITRANS = 0 $ 342J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 342K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 342K$ enter: ITRANS = 2 $ 342K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 342L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 342L$ enter: ITRANS = 1 $ 342L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 343 A collocation finite element method is used, with tri-cubic Hermite 343 basis functions on the elements (small boxes) defined by the grid 343 points: 343 P1GRID(1),...,P1GRID(NP1GRID) 343 P2GRID(1),...,P2GRID(NP2GRID) 343 P3GRID(1),...,P3GRID(NP3GRID) 343 You will first be prompted for NP1GRID, the number of P1-grid points, 343 then for P1GRID(1),...,P1GRID(NP1GRID). Any points defaulted will be 343 uniformly spaced between the points you define; the first and last 343 points cannot be defaulted. Then you will be prompted similarly 343 for the number and values of the P2 and P3-grid points. The limits 343 on the parameters are then: 343 P1GRID(1) < P1 < P1GRID(NP1GRID) 343 P2GRID(1) < P2 < P2GRID(NP2GRID) 343 P3GRID(1) < P3 < P3GRID(NP3GRID) 343 343I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 343I$ enter: NP1GRID = 5 $ 343I$ P1GRID(1) = 0 $ 343I$ P1GRID(NP1GRID) = 2*PI $ 343I$ and default the other P1GRID points $ 343I$ NP2GRID = 8 $ 343I$ P2GRID(1) = 0 $ 343I$ P2GRID(NP2GRID) = 2*PI $ 343I$ and default the other P2GRID points $ 343I$ NP3GRID = 8 $ 343I$ P3GRID(1) = 0.2*R1 $ 343I$ P3GRID(NP3GRID) = R1 $ 343I$ and default the other P3GRID points $ 343I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 343J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 343J$ enter: NP1GRID = 7 $ 343J$ P1GRID(1) = -1 $ 343J$ P1GRID(NP1GRID) = 1 $ 343J$ and default P1GRID(2),P1GRID(3),P1GRID(4),P1GRID(5),P1GRID(6) $ 343J$ NP2GRID = 7 $ 343J$ P2GRID(1) = -1 $ 343J$ P2GRID(NP2GRID) = 1 $ 343J$ and default P2GRID(2),P2GRID(3),P2GRID(4),P2GRID(5),P2GRID(6) $ 343J$ NP3GRID = 7 $ 343J$ P3GRID(1) = -1 $ 343J$ P3GRID(NP3GRID) = 1 $ 343J$ and default P3GRID(2),P3GRID(3),P3GRID(4),P3GRID(5),P3GRID(6) $ 343J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 343K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 343K$ enter: NP1GRID = 8 $ 343K$ P1GRID(1) = 0 $ 343K$ P1GRID(2) = 0.3 $ 343K$ P1GRID(3) = 0.6 $ 343K$ P1GRID(4) = 1.0 $ 343K$ P1GRID(5) = 1.5 $ 343K$ P1GRID(6) = 2.5 $ 343K$ P1GRID(7) = 4.0 $ 343K$ P1GRID(NP1GRID) = 10 $ 343K$ NP2GRID = 5 $ 343K$ P2GRID(1) = 0 $ 343K$ P2GRID(NP2GRID) = PI $ 343K$ and default P2GRID(2),P2GRID(3),P2GRID(4) $ 343K$ NP3GRID = 5 $ 343K$ P3GRID(1) = 0 $ 343K$ P3GRID(NP3GRID) = 2*PI $ 343K$ and default P3GRID(2),P3GRID(3),P3GRID(4) $ 343K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 343L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 343L$ It is essential to put gridlines at Z=1 and Z=1+EPS, because there $ 343L$ are sudden changes in Dz there. $ 343L$ $ 343L$ enter: NP1GRID = 8 $ 343L$ P1GRID(1) = 0 $ 343L$ P1GRID(NP1GRID) = 1 $ 343L$ and default the other P1GRID values $ 343L$ NP2GRID = 6 $ 343L$ P2GRID(1) = 0 $ 343L$ P2GRID(NP2GRID) = 2*PI $ 343L$ and default the other P2GRID values $ 343L$ NP3GRID = 8 $ 343L$ P3GRID(1) = 0 $ 343L$ P3GRID(4) = 1 $ 343L$ P3GRID(5) = 1+EPS $ 343L$ P3GRID(NP3GRID) = 2 $ 343L$ and default the other P3GRID values $ 343L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 344 You may now choose names for the component(s) of the (possibly vector) 344 solution U. Each must be an alphanumeric string of one to three 344 characters, beginning with a letter in the range A-H or O-Z. The 344 variable names X,Y,Z,P and T must not be used. The name should 344 start in column 1. 344I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 344I$ enter: U1 = U $ 344I$ U2 = V $ 344I$ U3 = W $ 344I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 344J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 344J$ enter: U1 = U $ 344J$ U2 = V $ 344J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 344K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 344K$ enter: U1 = U $ 344K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 344L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 344L$ enter: U1 = U $ 344L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 345 Enter FORTRAN expressions for the functions whose integrals are to be 345 calculated and printed. They may be functions of 345 345 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 345 and (if applicable) T 345 345 The parameters P1,P2,P3 and derivatives with respect to these may also 345 be referenced ($$11 = d$$1/dP1, etc): 345 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 345 345 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 345 + If you only want to integrate a function over part of the region, + 345 + define that function to be zero in the rest of the region. + 345 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 345K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 345K$ We want to compute the integral of U**2, which will be used later in $ 345K$ normalizing the probability density for plotting. $ 345K$ enter: INTEGRAL = U**2 $ 345K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 346 Enter FORTRAN expressions for the functions whose integrals are to be 346 calculated and printed. They may be functions of 346 346 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 346 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 346 and (if applicable) T 346 346 The parameters P1,P2,P3 and derivatives with respect to these may also 346 be referenced ($$11 = d$$1/dP1, etc): 346 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 346 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 346 346 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 346 + If you only want to integrate a function over part of the region, + 346 + define that function to be zero in the rest of the region. + 346 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 346J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 346J$ We want to compute the total energy in the box, the integral of $ 346J$ Ut**2 + Ux**2 + Uy**2 + Uz**2 (which should be constant), so $ 346J$ enter: INTEGRAL = V**2+Ux**2+Uy**2+Uz**2 $ 346J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 347 Enter FORTRAN expressions for the functions whose integrals are to be 347 calculated and printed. They may be functions of 347 347 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 347 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 347 $$3,$$3x,$$3y,$$3z,$$3xx,$$3yy,$$3zz,$$3xy,$$3xz,$$3yz 347 and (if applicable) T 347 347 The parameters P1,P2,P3 and derivatives with respect to these may also 347 be referenced ($$11 = d$$1/dP1, etc): 347 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 347 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 347 $$31,$$32,$$33,$$311,$$322,$$333,$$312,$$313,$$323 347 347 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 347 + If you only want to integrate a function over part of the region, + 347 + define that function to be zero in the rest of the region. + 347 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 347I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 347I$ We want to compute the total volume change, which is the integral $ 347I$ over our region of Ux+Vy+Wz ("true" value = -697.200). Thus, $ 347I$ enter: INTEGRAL = Ux+Vy+Wz $ 347I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 348 Enter FORTRAN expressions for the functions whose integrals are to be 348 calculated and printed. They may be functions of 348 348 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 348 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 348 $$3,$$3x,$$3y,$$3z,$$3xx,$$3yy,$$3zz,$$3xy,$$3xz,$$3yz 348 $$4,$$4x,$$4y,$$4z,$$4xx,$$4yy,$$4zz,$$4xy,$$4xz,$$4yz 348 . . . . . . . . and (if applicable) T 348 348 The parameters P1,P2,P3 and derivatives with respect to these may also 348 be referenced ($$11 = d$$1/dP1, etc): 348 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 348 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 348 $$31,$$32,$$33,$$311,$$322,$$333,$$312,$$313,$$323 348 $$41,$$42,$$43,$$411,$$422,$$433,$$412,$$413,$$423 348 . . . . . . . . . 348 348 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 348 + If you only want to integrate a function over part of the region, + 348 + define that function to be zero in the rest of the region. + 348 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 349 Enter FORTRAN expressions for the functions whose integrals are to be 349 calculated and printed. They may be functions of 349 349 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 349 and (if applicable) T 349 349 The components (NORMx,NORMy,NORMz) of the unit outward normal vector 349 may also be referenced. 349 349 The parameters P1,P2,P3 and derivatives with respect to these may 349 also be referenced: 349 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 349 You can also reference the normal derivative $$1norm. 349 349 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 349 + If you only want to integrate a function over part of the boundary, + 349 + define that function to be zero on the rest of the boundary. + 349 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 350 Enter FORTRAN expressions for the functions whose integrals are to be 350 calculated and printed. They may be functions of 350 350 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 350 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 350 and (if applicable) T 350 350 The components (NORMx,NORMy,NORMz) of the unit outward normal vector 350 may also be referenced. 350 350 The parameters P1,P2,P3 and derivatives with respect to these may 350 also be referenced: 350 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 350 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 350 You can also reference the normal derivatives $$1norm,$$2norm. 350 350 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 350 + If you only want to integrate a function over part of the boundary, + 350 + define that function to be zero on the rest of the boundary. + 350 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 351 Enter FORTRAN expressions for the functions whose integrals are to be 351 calculated and printed. They may be functions of 351 351 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 351 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 351 $$3,$$3x,$$3y,$$3z,$$3xx,$$3yy,$$3zz,$$3xy,$$3xz,$$3yz 351 and (if applicable) T 351 351 The components (NORMx,NORMy,NORMz) of the unit outward normal vector 351 may also be referenced. 351 351 The parameters P1,P2,P3 and derivatives with respect to these may 351 also be referenced: 351 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 351 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 351 $$31,$$32,$$33,$$311,$$322,$$333,$$312,$$313,$$323 351 You can also reference the normal derivatives $$1norm,$$2norm,$$3norm. 351 351 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 351 + If you only want to integrate a function over part of the boundary, + 351 + define that function to be zero on the rest of the boundary. + 351 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 351I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 351I$ By the divergence theorem, the volume integral of Ux+Vy+Wz should $ 351I$ equal the boundary integral of U*NORMx+V*NORMy+W*NORMz, so we want $ 351I$ to compute this boundary integral to verify the equality. Note that $ 351I$ boundary integrals are computed over all 6 boundary pieces, but in $ 351I$ this case the integrals at p1=0 and p1=2*pi will cancel, and $ 351I$ similarly at p2=0 and p2=2*pi. Thus enter: $ 351I$ BND. INTEGRAL = U*NORMx+V*NORMy+W*NORMz $ 351I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 352 Enter FORTRAN expressions for the functions whose integrals are to be 352 calculated and printed. They may be functions of 352 352 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 352 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 352 $$3,$$3x,$$3y,$$3z,$$3xx,$$3yy,$$3zz,$$3xy,$$3xz,$$3yz 352 $$4,$$4x,$$4y,$$4z,$$4xx,$$4yy,$$4zz,$$4xy,$$4xz,$$4yz 352 . . . . . . . and (if applicable) T 352 352 The components (NORMx,NORMy,NORMz) of the unit outward normal vector 352 may also be referenced. 352 352 The parameters P1,P2,P3 and derivatives with respect to these may 352 also be referenced: 352 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 352 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 352 $$31,$$32,$$33,$$311,$$322,$$333,$$312,$$313,$$323 352 $$41,$$42,$$43,$$411,$$422,$$433,$$412,$$413,$$423 352 . . . . . . . . . 352 You can also reference the normal derivatives $$1norm,$$2norm,$$3norm, 352 $$4norm... 352 352 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 352 + If you only want to integrate a function over part of the boundary, + 352 + define that function to be zero on the rest of the boundary. + 352 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 353 Now enter FORTRAN expressions to define the PDE coefficients. 353 RHO may be a function of X,Y,Z, while F may be a function of 353 353 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 353 353 Recall that the PDE has the form 353 353 F = lambda*RHO*$$1 353 353 The parameters P1,P2,P3 and derivatives with respect to these may also 353 be referenced ($$11 = d$$1/dP1, etc): 353 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 353K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 353K$ The partial differential equation may be written $ 353K$ $ 353K$ Uxx + Uyy + Uzz + C1/P1*U = lambda*C2*U $ 353K$ $ 353K$ where P1 is the spherical coordinate Rho. $ 353K$ $ 353K$ When asked if you want to write a FORTRAN block, $ 353K$ enter: no $ 353K$ then enter the following, when prompted: $ 353K$ F = Uxx + Uyy + Uzz + C1/P1*U $ 353K$ RHO = C2 $ 353K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 353L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 353L$ The partial differential equation may be written: $ 353L$ $ 353L$ D*(Uxx + Uyy + Uzz) + Dz*Uz = lambda*1.0*U $ 353L$ $ 353L$ where D(Z) is defined to vary rapidly, but continuously, from D=1 in $ 353L$ the bottom cylinder to D=5 in the top. Now, when asked if you want $ 353L$ to write a FORTRAN block, $ 353L$ enter: yes $ 353L$ then, when prompted, enter: $ 353L$ IF (Z.LE.1) THEN $ 353L$ D = 1 $ 353L$ Dz = 0 $ 353L$ ELSE IF (Z.GE.1+EPS) THEN $ 353L$ D = 5 $ 353L$ Dz = 0 $ 353L$ ELSE $ 353L$ D = 1 + 4.0*(Z-1)/EPS $ 353L$ Dz = 4.0/EPS $ 353L$ ENDIF $ 353L$ [blank line] $ 353L$ then, when prompted, enter: $ 353L$ F = D*(Uxx+Uyy+Uzz) + Dz*Uz $ 353L$ RHO = 1 $ 353L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 354 Now enter FORTRAN expressions to define the PDE coefficients. 354 RHO11,RHO12,RHO21,RHO22 may be functions of X,Y,Z, while F1,F2 354 may be functions of 354 354 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 354 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 354 354 Recall that the PDEs have the form 354 354 F1 = lambda*(RHO11*$$1 + RHO12*$$2) 354 F2 = lambda*(RHO21*$$1 + RHO22*$$2) 354 354 The parameters P1,P2,P3 and derivatives with respect to these may also 354 be referenced ($$11 = d$$1/dP1, etc): 354 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 354 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 355 Now enter FORTRAN expressions to define the PDE coefficients. 355 RHO11,RHO12,RHO13,RHO21,RHO22,RHO23,RHO31,RHO32,RHO33 may be 355 functions of X,Y,Z, while F1,F2,F3 may be functions of 355 355 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 355 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 355 $$3,$$3x,$$3y,$$3z,$$3xx,$$3yy,$$3zz,$$3xy,$$3xz,$$3yz 355 355 Recall that the PDEs have the form 355 355 F1 = lambda*(RHO11*$$1 + RHO12*$$2 + RHO13*$$3) 355 F2 = lambda*(RHO21*$$1 + RHO22*$$2 + RHO23*$$3) 355 F3 = lambda*(RHO31*$$1 + RHO32*$$2 + RHO33*$$3) 355 355 The parameters P1,P2,P3 and derivatives with respect to these may also 355 be referenced ($$11 = d$$1/dP1, etc): 355 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 355 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 355 $$31,$$32,$$33,$$311,$$322,$$333,$$312,$$313,$$323 356 Now enter FORTRAN expressions to define the PDE coefficients. The 356 RHOIJ may be functions of X,Y,Z, while F1,F2,F3,F4,... may be 356 functions of 356 356 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 356 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 356 $$3,$$3x,$$3y,$$3z,$$3xx,$$3yy,$$3zz,$$3xy,$$3xz,$$3yz 356 $$4,$$4x,$$4y,$$4z,$$4xx,$$4yy,$$4zz,$$4xy,$$4xz,$$4yz 356 . . . . . . . . . . 356 356 Recall that the PDEs have the form 356 356 F1 = lambda*(RHO11*$$1 + RHO12*$$2 + RHO13*$$3 + RHO14*$$4...) 356 F2 = lambda*(RHO21*$$1 + RHO22*$$2 + RHO23*$$3 + RHO24*$$4...) 356 F3 = lambda*(RHO31*$$1 + RHO32*$$2 + RHO33*$$3 + RHO34*$$4...) 356 F4 = lambda*(RHO41*$$1 + RHO42*$$2 + RHO43*$$3 + RHO44*$$4...) 356 . . 356 356 The parameters P1,P2,P3 and derivatives with respect to these may also 356 be referenced ($$11 = d$$1/dP1, etc): 356 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 356 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 356 $$31,$$32,$$33,$$311,$$322,$$333,$$312,$$313,$$323 356 $$41,$$42,$$43,$$411,$$422,$$433,$$412,$$413,$$423 356 . . . . . . . . . 357 Now enter FORTRAN expressions to define the PDE coefficients, which 357 may be functions of 357 357 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 357 357 and, in some cases, of the parameter T. 357 357 Recall that the PDE has the form 357 357 F = 0 357 357 The parameters P1,P2,P3 and derivatives with respect to these may also 357 be referenced ($$11 = d$$1/dP1, etc): 357 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 358 Now enter FORTRAN expressions to define the PDE coefficients, which 358 may be functions of 358 358 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 358 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 358 358 and, in some cases, of the parameter T. 358 358 Recall that the PDEs have the form 358 358 F1 = 0 358 F2 = 0 358 358 The parameters P1,P2,P3 and derivatives with respect to these may also 358 be referenced ($$11 = d$$1/dP1, etc): 358 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 358 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 359 Now enter FORTRAN expressions to define the PDE coefficients, which 359 may be functions of 359 359 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 359 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 359 $$3,$$3x,$$3y,$$3z,$$3xx,$$3yy,$$3zz,$$3xy,$$3xz,$$3yz 359 359 and, in some cases, of the parameter T. 359 359 Recall that the PDEs have the form 359 359 F1 = 0 359 F2 = 0 359 F3 = 0 359 359 The parameters P1,P2,P3 and derivatives with respect to these may also 359 be referenced ($$11 = d$$1/dP1, etc): 359 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 359 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 359 $$31,$$32,$$33,$$311,$$322,$$333,$$312,$$313,$$323 359I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 359I$ When asked if you want to write a FORTRAN block, $ 359I$ enter: no $ 359I$ then enter the following, when prompted: $ 359I$ F1 = A*Uxx+B*Vyx+B*Wzx + C*(Uyy+Vxy) + C*(Uzz+Wxz) $ 359I$ F2 = C*(Uyx+Vxx) + A*Vyy+B*Uxy+B*Wzy + C*(Vzz+Wyz) $ 359I$ F3 = C*(Uzx+Wxx) + C*(Vzy+Wyy) + A*Wzz+B*Uxz+B*Vyz $ 359I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 360 Now enter FORTRAN expressions to define the PDE coefficients, which 360 may be functions of 360 360 X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 360 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 360 $$3,$$3x,$$3y,$$3z,$$3xx,$$3yy,$$3zz,$$3xy,$$3xz,$$3yz 360 $$4,$$4x,$$4y,$$4z,$$4xx,$$4yy,$$4zz,$$4xy,$$4xz,$$4yz 360 . . . . . . . . . . 360 360 and, in some cases, of the parameter T. 360 360 Recall that the PDEs have the form 360 360 F1 = 0 360 F2 = 0 360 F3 = 0 360 F4 = 0 360 . . 360 360 The parameters P1,P2,P3 and derivatives with respect to these may also 360 be referenced ($$11 = d$$1/dP1, etc): 360 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 360 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 360 $$31,$$32,$$33,$$311,$$322,$$333,$$312,$$313,$$323 360 $$41,$$42,$$43,$$411,$$422,$$433,$$412,$$413,$$423 360 . . . . . . . . . 361 Now enter FORTRAN expressions to define the PDE coefficients, which 361 may be functions of 361 361 X,Y,Z,T,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 361 361 Recall that the PDE has the form 361 361 C*d($$1)/dT = F 361 361 The parameters P1,P2,P3 and derivatives with respect to these may also 361 be referenced ($$11 = d$$1/dP1, etc): 361 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 362 Now enter FORTRAN expressions to define the PDE coefficients, which 362 may be functions of 362 362 X,Y,Z,T,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 362 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 362 362 Recall that the PDEs have the form 362 362 C11*d($$1)/dT + C12*d($$2)/dT = F1 362 C21*d($$1)/dT + C22*d($$2)/dT = F2 362 362 The parameters P1,P2,P3 and derivatives with respect to these may also 362 be referenced ($$11 = d$$1/dP1, etc): 362 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 362 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 362J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 362J$ The partial differential equations may be written $ 362J$ $ 362J$ 1.0*Ut = V $ 362J$ 1.0*Vt = Uxx + Uyy + Uzz $ 362J$ $ 362J$ Thus when asked if you want to write a FORTRAN block, $ 362J$ enter: no $ 362J$ then, when prompted, enter: $ 362J$ C11 = 1 C12 = 0 F1 = V $ 362J$ C21 = 0 C22 = 1 F2 = Uxx + Uyy + Uzz $ 362J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 363 Now enter FORTRAN expressions to define the PDE coefficients, which 363 may be functions of 363 363 X,Y,Z,T,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 363 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 363 $$3,$$3x,$$3y,$$3z,$$3xx,$$3yy,$$3zz,$$3xy,$$3xz,$$3yz 363 363 Recall that the PDEs have the form 363 363 C11*d($$1)/dT + C12*d($$2)/dT + C13*d($$3)/dT = F1 363 C21*d($$1)/dT + C22*d($$2)/dT + C23*d($$3)/dT = F2 363 C31*d($$1)/dT + C32*d($$2)/dT + C33*d($$3)/dT = F3 363 363 The parameters P1,P2,P3 and derivatives with respect to these may also 363 be referenced ($$11 = d$$1/dP1, etc): 363 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 363 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 363 $$31,$$32,$$33,$$311,$$322,$$333,$$312,$$313,$$323 364 Now enter FORTRAN expressions to define the PDE coefficients, which 364 may be functions of 364 364 X,Y,Z,T,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz 364 $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz 364 $$3,$$3x,$$3y,$$3z,$$3xx,$$3yy,$$3zz,$$3xy,$$3xz,$$3yz 364 $$4,$$4x,$$4y,$$4z,$$4xx,$$4yy,$$4zz,$$4xy,$$4xz,$$4yz 364 . . . . . . . . . . 364 364 Recall that the PDEs have the form 364 364 C11*d($$1)/dT + C12*d($$2)/dT + C13*d($$3)/dT + C14*d($$4)/dT +...= F1 364 C21*d($$1)/dT + C22*d($$2)/dT + C23*d($$3)/dT + C24*d($$4)/dT +...= F2 364 C31*d($$1)/dT + C32*d($$2)/dT + C33*d($$3)/dT + C34*d($$4)/dT +...= F3 364 C41*d($$1)/dT + C42*d($$2)/dT + C43*d($$3)/dT + C44*d($$4)/dT +...= F4 364 . . . . 364 364 The parameters P1,P2,P3 and derivatives with respect to these may also 364 be referenced ($$11 = d$$1/dP1, etc): 364 $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 364 $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 364 $$31,$$32,$$33,$$311,$$322,$$333,$$312,$$313,$$323 364 $$41,$$42,$$43,$$411,$$422,$$433,$$412,$$413,$$423 364 . . . . . . . . . 365 If you don't want to read the FINE PRINT, default the initial values. 365 365 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 365 + Now the initial values for the inverse power method may be defined + 365 + using FORTRAN expressions. They may be functions of X, Y and Z + 365 + (and the parameters P1,P2,P3). + 365 + + 365 + By default, the initial values are generated by a random number + 365 + generator. This virtually eliminates any possibility of convergence + 365 + to the wrong eigenvalue, due to an unlucky choice of initial values. + 365 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 365K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 365K$ Enter: U0 = COS(P3) $ 365K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 365L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 365L$ Press [RETURN] to default U0 $ 365L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 366 Now the initial values for Newton's method must be defined using 366 FORTRAN expressions. They may be functions of X,Y and Z (and the 366 parameters P1,P2,P3). 366 366 It is important to provide initial values which are at least of the 366 correct order of magnitude. 367 Now the initial values must be defined using FORTRAN expressions. 367 They may be functions of X,Y and Z (and the parameters P1,P2,P3), and 367 may also reference the initial time T0. 367J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 367J$ enter: U0 = EXP(-10*(X**2+Y**2+Z**2)) $ 367J$ V0 = 0 $ 367J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 368 If you do not have any periodic boundary conditions, enter IPERDC=0. 368 368 Enter IPERDC=1 for periodic conditions at P1 = P1GRID(1),P1GRID(NP1GRID) 368 IPERDC=2 for periodic conditions at P2 = P2GRID(1),P2GRID(NP2GRID) 368 IPERDC=3 for periodic conditions at P3 = P3GRID(1),P3GRID(NP3GRID) 368 IPERDC=4 for periodic conditions on both P1 and P2 368 IPERDC=5 for periodic conditions on both P1 and P3 368 IPERDC=6 for periodic conditions on both P2 and P3 368 IPERDC=7 for periodic conditions on P1, P2 and P3. 368 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 368 + When periodic boundary conditions are selected, they apply to all + 368 + variables by default. To turn off periodic boundary conditions on + 368 + the I-th variable, set PERDC(I) to 0 (or another appropriate value + 368 + of IPERDC) below in the main program and set the desired boundary + 368 + conditions in subroutine GB8Z, "by hand". + 368 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 368I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 368I$ enter: IPERDC = 4 $ 368I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 368J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 368J$ enter: IPERDC = 0 $ 368J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 368K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 368K$ enter: IPERDC = 3 $ 368K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 368L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 368L$ enter: IPERDC = 2 $ 368L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 369 Enter FORTRAN expressions to define the boundary condition functions, 369 which may be functions of 369 369 X,Y,Z,$$1,$$1x,$$1y,$$1z and (if applicable) T 369 369 Recall that the boundary conditions have the form 369 369 G = 0 369 369 Enter NONE to indicate "no" boundary condition. 369 369 The parameters P1,P2,P3 and derivatives with respect to these may also 369 be referenced ($$11 = d$$1/dP1, etc): 369 $$11,$$12,$$13 369 The components (NORMx,NORMy,NORMz) of the unit outward normal vector 369 may also be referenced, as well as the normal derivative $$1norm. 369 369 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 369 + If "no" boundary condition is specified, the PDE is enforced at + 369 + points just inside the boundary (exactly on the boundary, if EPS8Z + 369 + is set to 0 in the main program). + 369 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 370 Enter FORTRAN expressions to define the boundary condition functions, 370 which may be functions of 370 370 X,Y,Z,$$1,$$1x,$$1y,$$1z, 370 $$2,$$2x,$$2y,$$2z and (if applicable) T 370 370 Recall that the boundary conditions have the form 370 370 G1 = 0 370 G2 = 0 370 370 Enter NONE to indicate "no" boundary condition. 370 370 The parameters P1,P2,P3 and derivatives with respect to these may also 370 be referenced ($$11 = d$$1/dP1, etc): 370 $$11,$$12,$$13 370 $$21,$$22,$$23 370 The components (NORMx,NORMy,NORMz) of the unit outward normal vector 370 may also be referenced, as well as the normal derivatives $$1norm, 370 $$2norm. 370 370 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 370 + If "no" boundary condition is specified, the corresponding PDE is + 370 + enforced at points just inside the boundary (exactly on the + 370 + boundary, if EPS8Z is set to 0 in the main program). + 370 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 371 Enter FORTRAN expressions to define the boundary condition functions, 371 which may be functions of 371 371 X,Y,Z,$$1,$$1x,$$1y,$$1z, 371 $$2,$$2x,$$2y,$$2z, 371 $$3,$$3x,$$3y,$$3z and (if applicable) T 371 371 Recall that the boundary conditions have the form 371 371 G1 = 0 371 G2 = 0 371 G3 = 0 371 371 Enter NONE to indicate "no" boundary condition. 371 371 The parameters P1,P2,P3 and derivatives with respect to these may also 371 be referenced ($$11 = d$$1/dP1, etc): 371 $$11,$$12,$$13 371 $$21,$$22,$$23 371 $$31,$$32,$$33 371 The components (NORMx,NORMy,NORMz) of the unit outward normal vector 371 may also be referenced, as well as the normal derivatives $$1norm, 371 $$2norm,$$3norm. 371 371 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 371 + If "no" boundary condition is specified, the corresponding PDE is + 371 + enforced at points just inside the boundary (exactly on the + 371 + boundary, if EPS8Z is set to 0 in the main program). + 371 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 372 Enter FORTRAN expressions to define the boundary condition functions, 372 which may be functions of 372 372 X,Y,Z,$$1,$$1x,$$1y,$$1z, 372 $$2,$$2x,$$2y,$$2z, 372 $$3,$$3x,$$3y,$$3z, 372 $$4,$$4x,$$4y,$$4z and (if applicable) T 372 . . . . 372 372 Recall that the boundary conditions have the form 372 372 G1 = 0 372 G2 = 0 372 G3 = 0 372 G4 = 0 372 . . 372 Enter NONE to indicate "no" boundary condition. 372 372 The parameters P1,P2,P3 and derivatives with respect to these may also 372 be referenced ($$11 = d$$1/dP1, etc): 372 $$11,$$12,$$13 372 $$21,$$22,$$23 372 $$31,$$32,$$33 372 $$41,$$42,$$43 372 . . . 372 The components (NORMx,NORMy,NORMz) of the unit outward normal vector 372 may also be referenced, as well as the normal derivatives $$1norm, 372 $$2norm,$$3norm,$$4norm... 372 372 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 372 + If "no" boundary condition is specified, the corresponding PDE is + 372 + enforced at points just inside the boundary (exactly on the + 372 + boundary, if EPS8Z is set to 0 in the main program). + 372 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 373 If you don't want to read the FINE PRINT, default all of the following 373 variables. 373 373 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 373 + Normally, PDE2D saves the values of $$1,$$1x,$$1y,$$1z at the output + 373 + points. If different variables are to be saved (for later printing + 373 + or plotting) the following functions can be used to re-define the + 373 + output variables: + 373 + define UPRINT(1) to replace $$1 + 373 + UXPRINT(1) $$1x + 373 + UYPRINT(1) $$1y + 373 + UZPRINT(1) $$1z + 373 + Each function may be a function of + 373 + + 373 + X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz + 373 + and (if applicable) T + 373 + + 373 + Each may also be a function of the integral estimates SINT(1),..., + 373 + BINT(1),... + 373 + + 373 + The parameters P1,P2,P3 and derivatives with respect to these may + 373 + also be referenced ($$11 = d$$1/dP1, etc): + 373 + $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 + 373 + + 373 + The default for each variable is no change, for example, UPRINT(1) + 373 + defaults to $$1. Enter FORTRAN expressions for each of the + 373 + following functions (or default). + 373 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 373K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 373K$ We want to plot the probability density, which is proportional to $ 373K$ U**2, but normalized so that the integral of the probability density $ 373K$ is equal to 1. Since SINT(1) will contain the integral of U**2, $ 373K$ to get plots of the probability density, $ 373K$ enter: UPRINT(1) = U**2/SINT(1) $ 373K$ and default the other output modification variables $ 373K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 373L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 373L$ press [RETURN] to default all output modification variables $ 373L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 374 If you don't want to read the FINE PRINT, default all of the following 374 variables. 374 374 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 374 + Normally, PDE2D saves the values of $$1,$$1x,$$1y,$$1z,$$2,$$2x, + 374 + $$2y,$$2z at the output points. If different variables are to be + 374 + saved (for later printing or plotting) the following functions can + 374 + be used to re-define the output variables: + 374 + define UPRINT(1) to replace $$1 + 374 + UXPRINT(1) $$1x + 374 + UYPRINT(1) $$1y + 374 + UZPRINT(1) $$1z + 374 + UPRINT(2) $$2 + 374 + UXPRINT(2) $$2x + 374 + UYPRINT(2) $$2y + 374 + UZPRINT(2) $$2z + 374 + Each function may be a function of + 374 + + 374 + X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz + 374 + $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz + 374 + and (if applicable) T + 374 + + 374 + Each may also be a function of the integral estimates SINT(1),..., + 374 + BINT(1),... + 374 + + 374 + The parameters P1,P2,P3 and derivatives with respect to these may + 374 + also be referenced ($$11 = d$$1/dP1, etc): + 374 + $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 + 374 + $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 + 374 + + 374 + The default for each variable is no change, for example, UPRINT(1) + 374 + defaults to $$1. Enter FORTRAN expressions for each of the + 374 + following functions (or default). + 374 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 374J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 374J$ We want to plot the magnitude of U rather than U, so $ 374J$ enter: UPRINT(1) = ABS(U) $ 374J$ and default the other output modification variables $ 374J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 375 If you don't want to read the FINE PRINT, default all of the following 375 variables. 375 375 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 375 + Normally, PDE2D saves the values of $$1,$$1x,$$1y,$$1z,$$2,$$2x, + 375 + $$2y,$$2z,$$3,$$3x,$$3y,$$3z at the output points. If different + 375 + variables are to be saved (for later printing or plotting) the + 375 + following functions can be used to re-define the output variables: + 375 + define UPRINT(1) to replace $$1 + 375 + UXPRINT(1) $$1x + 375 + UYPRINT(1) $$1y + 375 + UZPRINT(1) $$1z + 375 + UPRINT(2) $$2 + 375 + UXPRINT(2) $$2x + 375 + UYPRINT(2) $$2y + 375 + UZPRINT(2) $$2z + 375 + UPRINT(3) $$3 + 375 + UXPRINT(3) $$3x + 375 + UYPRINT(3) $$3y + 375 + UZPRINT(3) $$3z + 375 + Each function may be a function of + 375 + + 375 + X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz + 375 + $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz + 375 + $$3,$$3x,$$3y,$$3z,$$3xx,$$3yy,$$3zz,$$3xy,$$3xz,$$3yz + 375 + and (if applicable) T + 375 + + 375 + Each may also be a function of the integral estimates SINT(1),..., + 375 + BINT(1),... + 375 + + 375 + The parameters P1,P2,P3 and derivatives with respect to these may + 375 + also be referenced ($$11 = d$$1/dP1, etc): + 375 + $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 + 375 + $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 + 375 + $$31,$$32,$$33,$$311,$$322,$$333,$$312,$$313,$$323 + 375 + + 375 + The default for each variable is no change, for example, UPRINT(1) + 375 + defaults to $$1. Enter FORTRAN expressions for each of the + 375 + following functions (or default). + 375 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 375I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 375I$ We are going to plot the displacements at two P1=constant cross- $ 375I$ sections. The in-plane axes at these cross-sections are in the $ 375I$ directions of unit vectors (cos(p1),sin(p1),0) and (0,0,1) and the $ 375I$ out-of-plane axis is in the direction of (-sin(p1),cos(p1),0). Thus $ 375I$ the in-plane displacement components are (UPRINT(1),W) and the $ 375I$ out-of-plane displacement component is UPRINT(2) if we $ 375I$ enter: UPRINT(1) = COS(P1)*U + SIN(P1)*V $ 375I$ UPRINT(2) = -SIN(P1)*U + COS(P1)*V $ 375I$ and default the other output modification variables $ 375I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 376 If you don't want to read the FINE PRINT, default all of the following 376 variables. 376 376 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 376 + Normally, PDE2D saves the values of $$1,$$1x,$$1y,$$1z,$$2,$$2x, + 376 + $$2y,$$2z,$$3,$$3x,$$3y,$$3z,$$4,$$4x,$$4y,$$4z...at the output + 376 + points. If different variables are to be saved (for later printing + 376 + or plotting) the following functions can be used to re-define the + 376 + output variables: + 376 + define UPRINT(1) to replace $$1 + 376 + UXPRINT(1) $$1x + 376 + UYPRINT(1) $$1y + 376 + UZPRINT(1) $$1z + 376 + UPRINT(2) $$2 + 376 + UXPRINT(2) $$2x + 376 + UYPRINT(2) $$2y + 376 + UZPRINT(2) $$2z + 376 + UPRINT(3) $$3 + 376 + UXPRINT(3) $$3x + 376 + UYPRINT(3) $$3y + 376 + UZPRINT(3) $$3z + 376 + UPRINT(4) $$4 + 376 + UXPRINT(4) $$4x + 376 + UYPRINT(4) $$4y + 376 + UZPRINT(4) $$4z + 376 + . . + 376 + . . + 376 + Each function may be a function of + 376 + + 376 + X,Y,Z,$$1,$$1x,$$1y,$$1z,$$1xx,$$1yy,$$1zz,$$1xy,$$1xz,$$1yz + 376 + $$2,$$2x,$$2y,$$2z,$$2xx,$$2yy,$$2zz,$$2xy,$$2xz,$$2yz + 376 + $$3,$$3x,$$3y,$$3z,$$3xx,$$3yy,$$3zz,$$3xy,$$3xz,$$3yz + 376 + $$4,$$4x,$$4y,$$4z,$$4xx,$$4yy,$$4zz,$$4xy,$$4xz,$$4yz + 376 + . . . . . . and (if applicable) T + 376 + + 376 + Each may also be a function of the integral estimates SINT(1),..., + 376 + BINT(1),... + 376 + + 376 + The parameters P1,P2,P3 and derivatives with respect to these may + 376 + also be referenced ($$11 = d$$1/dP1, etc): + 376 + $$11,$$12,$$13,$$111,$$122,$$133,$$112,$$113,$$123 + 376 + $$21,$$22,$$23,$$211,$$222,$$233,$$212,$$213,$$223 + 376 + $$31,$$32,$$33,$$311,$$322,$$333,$$312,$$313,$$323 + 376 + $$41,$$42,$$43,$$411,$$422,$$433,$$412,$$413,$$423 + 376 + . . . . . . . . . + 376 + + 376 + The default for each variable is no change, for example, UPRINT(1) + 376 + defaults to $$1. Enter FORTRAN expressions for each of the + 376 + following functions (or default). + 376 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 377 The solution is normally saved on an NP1+1 by NP2+1 by NP3+1 377 rectangular grid of points, 377 P1 = P1A + I*(P1B-P1A)/NP1, I = 0,...,NP1 377 P2 = P2A + J*(P2B-P2A)/NP2, J = 0,...,NP2 377 P3 = P3A + K*(P3B-P3A)/NP3, K = 0,...,NP3 377 Enter values for NP1, NP2 and NP3. Suggested values: NP1=NP2=NP3=16. 377 377 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 377 + If you want to save the solution at an arbitrary user-specified set + 377 + of points, set NP2=NP3=0 and NP1+1=number of points. In this case + 377 + you can request tabular output, but no plots can be made. + 377 + + 377 + If you set NEAR8Z=1 in the main program, the values saved at each + 377 + output point will actually be the solution as evaluated at a nearby + 377 + collocation point. For most problems this obviously will produce + 377 + less accurate output or plots, but for certain (rare) problems, a + 377 + solution component may be much less noisy when plotted only at + 377 + collocation points. + 377 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 377I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 377I$ enter: NP1 = 12 $ 377I$ NP2 = 15 $ 377I$ NP3 = 8 $ 377I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 377J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 377J$ enter: NP1 = 16 $ 377J$ NP2 = 16 $ 377J$ NP3 = 16 $ 377J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 377K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 377K$ enter: NP1 = 30 $ 377K$ NP2 = 30 $ 377K$ NP3 = 30 $ 377K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 377L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 377L$ enter: NP1 = 20 $ 377L$ NP2 = 20 $ 377L$ NP3 = 20 $ 377L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 378 Enter a block of FORTRAN statements to define the output points: 378 (P1OUT8Z(I,0,0) , P2OUT8Z(I,0,0) , P3OUT8Z(I,0,0)), I=0,...,NP1 379 The solution is saved on an NP1+1 by NP2+1 by NP3+1 rectangular grid 379 covering the box (P1A,P1B) x (P2A,P2B) x (P3A,P3B). Enter values for 379 P1A,P1B,P2A,P2B,P3A,P3B. These variables are usually defaulted. 379 379 The defaults are P1A = P1GRID(1), P1B = P1GRID(NP1GRID) 379 P2A = P2GRID(1), P2B = P2GRID(NP2GRID) 379 P3A = P3GRID(1), P3B = P3GRID(NP3GRID) 379 379I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 379I$ press [RETURN] to default P1A,P1B,P2A,P2B,P3A,P3B $ 379I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 379J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 379J$ press [RETURN] to default P1A,P1B,P2A,P2B,P3A,P3B $ 379J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 379K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 379K$ We are not interested in the region where P1 (R) is large, so $ 379K$ enter: P1B = 3.0 $ 379K$ and default the other variables $ 379K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 379L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 379L$ press [RETURN] to default P1A,P1B,P2A,P2B,P3A,P3B $ 379L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 380 To generate tabular or graphical output, choose an output option from 380 the list below. 380 380 0. No further output is desired 380 1. Table of values at output points 380 The tabulated output is saved in a file. 380 2. A plot of the contour (level) surfaces of a scalar variable. 380 This plot gives only a coarse overview of the solution, but is 380 unique in that it shows the general form of the solution in a 380 single picture. The different levels are identified by color. 380 These plots will only reflect the true geometry if ITRANS=0. 380 3. Surface plot of a scalar variable, at P1, P2 or P3 = constant 380 cross-sections. 380 4. Contour plot of a scalar variable, at P1, P2 or P3 = constant 380 cross-sections. These plots can be made to reflect the true 380 geometry of the cross-section. 380 5. Vector field plot, at P1, P2 or P3 = constant cross-sections. 380 A 3D vector field is plotted using arrows to represent the 380 in-plane components, with a contour plot of the out-of-plane 380 component superimposed. These plots can be made to reflect 380 the true geometry of the cross-section. 380 6. One dimensional cross-sectional plots (versus P1, P2, P3 or T) 380 380 Enter 0,1,2,3,4,5 or 6 to select an output option. 380 380 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 380 + If you set NP2=NP3=0 and saved the solution at an arbitrary set of + 380 + user-specified output points, you can only request tabular output. + 380 + + 380 + If you decide later that you want additional types of plots not + 380 + requested during this interactive session, you will have to work + 380 + through a new interactive session, so it is recommended that you + 380 + request all output or plots you think you MIGHT eventually want now, + 380 + during this session. + 380 + + 380 + Regardless of the options you select, a dummy subroutine POSTPR + 380 + will be included in the program created by the interactive driver; + 380 + you can add your own postprocessing code to this subroutine. + 380 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 380I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 380I$ enter: 5, the first time you see this message and $ 380I$ 0, the second time $ 380I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 380J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 380J$ We want three types of plots for ABS(U): level surface plots, $ 380J$ surface plots at a constant Z (P3) cross-section, and a couple of $ 380J$ time-plots, so $ 380J$ enter: 2, the first time you see this message and $ 380J$ 3, the second time $ 380J$ 6, the third time $ 380J$ 0, the fourth time $ 380J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 380K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 380K$ enter: 4, the first time you see this message and $ 380K$ 0, the second time $ 380K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 380L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 380L$ enter: 3, the first time you see this message and $ 380L$ 0, the second time $ 380L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 381 Enter a value for IVAR, to select the variable to be plotted or 381 printed: 381 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 381 2 $$1x 381 3 $$1y 381 4 $$1z 381K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 381K$ We want to plot probability density, which has been saved in U, so $ 381K$ enter: IVAR = 1 $ 381K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 381L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 381L$ enter: IVAR = 1 $ 381L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 382 Enter a value for IVAR, to select the variable to be plotted or 382 printed: 382 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 382 2 $$1x 382 3 $$1y 382 4 $$1z 382 5 $$2 382 6 $$2x 382 7 $$2y 382 8 $$2z 382J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 382J$ We want to plot ABS(U), which has been saved in U, so $ 382J$ enter: IVAR = 1 $ 382J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 383 Enter a value for IVAR, to select the variable to be plotted or 383 printed: 383 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 383 2 $$1x 383 3 $$1y 383 4 $$1z 383 5 $$2 383 6 $$2x 383 7 $$2y 383 8 $$2z 383 9 $$3 383 10 $$3x 383 11 $$3y 383 12 $$3z 384 Enter a value for IVAR, to select the variable to be plotted or 384 printed: 384 IVAR = 1 means $$1 (possibly as modified by UPRINT,..) 384 2 $$1x 384 3 $$1y 384 4 $$1z 384 5 $$2 384 6 $$2x 384 7 $$2y 384 8 $$2z 384 9 $$3 384 10 $$3x 384 11 $$3y 384 12 $$3z 384 13 $$4 384 14 $$4x 384 15 $$4y 384 16 $$4z 384 . . 384 . . 385 Enter the number (NC) of contour surfaces to be drawn. A maximum 385 of 10 are allowed, and more than the default of NC=4 will often 385 be too many. 385J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 385J$ We want to draw only one level surface, corresponding to mid-range $ 385J$ intensity, so $ 385J$ enter: NC = 1 $ 385J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 386 Do you want the contour surfaces to be drawn using solid bands? 386 (If you answer 'no' they will be drawn using hollow bands.) 386J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 386J$ enter: no $ 386J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 387 Enter lower (UMIN) and upper (UMAX) bounds for the contour values. 387 UMIN and UMAX are often defaulted. 387 387 Labeled contours will be drawn corresponding to the values 387 387 UMIN + (I-0.5)/NC*(UMAX-UMIN), for I=1,2,...,NC 387 387 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 387 + By default, UMIN and UMAX are set to the minimum and maximum values + 387 + of the variable to be plotted. For a common scaling, you may want + 387 + to set UMIN=ALOW, UMAX=AHIGH. ALOW and AHIGH are the minimum and + 387 + maximum values over all output points and over all saved time steps + 387 + or iterations. + 387 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 387J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 387J$ press [RETURN] to default UMIN,UMAX $ 387J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 388 Plots can be made at: 388 388 1. P1 = constant cross-sections 388 2. P2 = constant cross-sections 388 3. P3 = constant cross-sections 388 388 Enter 1,2 or 3 to select the cross-section type. 388I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 388I$ enter: 1 $ 388I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 388J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 388J$ enter: 3 $ 388J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 388K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 388K$ enter: 2 $ 388K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 388L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 388L$ enter: 2 $ 388L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 389 Plots of the variable or vector as a function of P2 and P3 will be 389 made, at the output grid P1-points closest to 389 P1 = P1CROSS(1),...,P1CROSS(NP1VALS) 389 389 Enter values for NP1VALS and P1CROSS(1),...,P1CROSS(NP1VALS). 389I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 389I$ We want plots of the displacements at cross-sections P1 = 0,pi/2 so $ 389I$ enter: NP1VALS = 2 $ 389I$ P1CROSS(1) = 0 $ 389I$ P1CROSS(2) = pi/2 $ 389I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 390 Plots of the variable or vector as a function of P1 and P3 will be 390 made, at the output grid P2-points closest to 390 P2 = P2CROSS(1),...,P2CROSS(NP2VALS) 390 390 Enter values for NP2VALS and P2CROSS(1),...,P2CROSS(NP2VALS). 390K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 390K$ We want a plot at the "equator", ie, co-latitude = pi/2, so $ 390K$ enter: NP2VALS = 1 $ 390K$ P2CROSS(1) = PI/2. $ 390K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 390L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 390L$ We want a plot of the eigenfunction at the cross-sections P2=0,PI/2, $ 390L$ and PI, so $ 390L$ enter: NP2VALS = 3 $ 390L$ P2CROSS(1) = 0 $ 390L$ P2CROSS(2) = PI/2 $ 390L$ P2CROSS(3) = PI $ 390L$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 12 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 391 Plots of the variable or vector as a function of P1 and P2 will be 391 made, at the output grid P3-points closest to 391 P3 = P3CROSS(1),...,P3CROSS(NP3VALS) 391 391 Enter values for NP3VALS and P3CROSS(1),...,P3CROSS(NP3VALS). 391J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 391J$ We want one cross-section per time value, at Z(P3)=0, so $ 391J$ enter: NP3VALS = 1 $ 391J$ P3CROSS(1) = 0 $ 391J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 392 If your region is rectangular, enter ITPLOT=0, and you need not read 392 the FINE PRINT. 392 392 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 392 + Enter: + 392 + ITPLOT = 0 if you want a rectangular cross-section to be drawn, + 392 + with axes P2 and P3 (A1=P2,A2=P3, recommended when + 392 + ITRANS=0,1,-1,2 or -2). + 392 + ITPLOT = 1 if you want a polar cross-section to be drawn, with + 392 + P2=radius, P3=angle (axes A1=P2*COS(P3) and + 392 + A2=P2*SIN(P3)). + 392 + ITPLOT = -1 if you want a polar cross-section to be drawn, with + 392 + P3=radius, P2=angle (axes A1=P3*COS(P2) and + 392 + A2=P3*SIN(P2)). + 392 + ITPLOT = 2 if the desired cross-section is neither rectangular + 392 + nor polar, and you want to define the axes A1,A2 + 392 + yourself. (Sometimes recommended when ITRANS=3,-3.) + 392 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 392I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 392I$ enter: ITPLOT = -1 $ 392I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 393 If your region is rectangular, enter ITPLOT=0, and you need not read 393 the FINE PRINT. 393 393 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 393 + Enter: + 393 + ITPLOT = 0 if you want a rectangular cross-section to be drawn, + 393 + with axes P1 and P3 (A1=P1,A2=P3, recommended when + 393 + ITRANS=0,1,-1). + 393 + ITPLOT = 1 if you want a polar cross-section to be drawn, with + 393 + P1=radius, P3=angle (axes A1=P1*COS(P3) and + 393 + A2=P1*SIN(P3); recommended when ITRANS=2,-2). + 393 + ITPLOT = -1 if you want a polar cross-section to be drawn, with + 393 + P3=radius, P1=angle (axes A1=P3*COS(P1) and + 393 + A2=P3*SIN(P1)). + 393 + ITPLOT = 2 if the desired cross-section is neither rectangular + 393 + nor polar, and you want to define the axes A1,A2 + 393 + yourself. (Sometimes recommended when ITRANS=3,-3.) + 393 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 393K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 393K$ enter: ITPLOT = 1 $ 393K$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 11 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 394 If your region is rectangular, enter ITPLOT=0, and you need not read 394 the FINE PRINT. 394 394 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 394 + Enter: + 394 + ITPLOT = 0 if you want a rectangular cross-section to be drawn, + 394 + with axes P1 and P2 (A1=P1,A2=P2, recommended when + 394 + ITRANS=0). + 394 + ITPLOT = 1 if you want a polar cross-section to be drawn, with + 394 + P1=radius, P2=angle (axes A1=P1*COS(P2) and + 394 + A2=P1*SIN(P2); recommended when ITRANS=1,2,-2). + 394 + ITPLOT = -1 if you want a polar cross-section to be drawn, with + 394 + P2=radius, P1=angle (axes A1=P2*COS(P1) and + 394 + A2=P2*SIN(P1); recommended when ITRANS=-1). + 394 + ITPLOT = 2 if the desired cross-section is neither rectangular + 394 + nor polar, and you want to define the axes A1,A2 + 394 + yourself. (Sometimes recommended when ITRANS=3,-3.) + 394 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 395 Define the axes A1 and A2 as functions of P2 and P3. A1 and A2 may 395 also reference the constant P1 and the Cartesian coordinates X,Y,Z. 396 Define the axes A1 and A2 as functions of P1 and P3. A1 and A2 may 396 also reference the constant P2 and the Cartesian coordinates X,Y,Z. 397 Define the axes A1 and A2 as functions of P1 and P2. A1 and A2 may 397 also reference the constant P3 and the Cartesian coordinates X,Y,Z. 398 If you don't want to read the FINE PRINT, default A1MIN,A1MAX,A2MIN, 398 and A2MAX. 398 398 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 398 + By default, at each cross-section the limits (A1MIN,A1MAX) and + 398 + (A2MIN,A2MAX) on the axes A1 and A2 are chosen so that the plot just + 398 + fills the plot space. For a non-rectangular region, this means the + 398 + scale may vary from cross-section to cross-section. Enter values + 398 + for A1MIN,A1MAX,A2MIN,A2MAX here if you want to ensure a common + 398 + scale for all cross-sections. (You must specify all four variables, + 398 + or default all four.) + 398 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 399 Enter values for IVAR1, IVAR2, IVAR3 to select the components Vr1,Vr2 399 and Vr3 of the vector to be plotted. 399 IVAR1,IVAR2,IVAR3 = 1 means $$1 (possibly as modified by UPRINT,...) 399 2 $$1x 399 3 $$1y 399 4 $$1z 399 399 A vector plot of the in-plane components (Vr1,Vr2) will be made, with a 399 contour plot of the out-of-plane component Vr3 superimposed. 399 399 Caution: Vr1 and Vr2 are assumed to be the components of the in-plane 399 vector in the directions of the NEW axes A1,A2. 400 Enter values for IVAR1, IVAR2, IVAR3 to select the components Vr1,Vr2 400 and Vr3 of the vector to be plotted. 400 IVAR1,IVAR2,IVAR3 = 1 means $$1 (possibly as modified by UPRINT,...) 400 2 $$1x 400 3 $$1y 400 4 $$1z 400 5 $$2 400 6 $$2x 400 7 $$2y 400 8 $$2z 400 400 A vector plot of the in-plane components (Vr1,Vr2) will be made, with a 400 contour plot of the out-of-plane component Vr3 superimposed. 400 400 Caution: Vr1 and Vr2 are assumed to be the components of the in-plane 400 vector in the directions of the NEW axes A1,A2. 401 Enter values for IVAR1, IVAR2, IVAR3 to select the components Vr1,Vr2 401 and Vr3 of the vector to be plotted. 401 IVAR1,IVAR2,IVAR3 = 1 means $$1 (possibly as modified by UPRINT,...) 401 2 $$1x 401 3 $$1y 401 4 $$1z 401 5 $$2 401 6 $$2x 401 7 $$2y 401 8 $$2z 401 9 $$3 401 10 $$3x 401 11 $$3y 401 12 $$3z 401 401 A vector plot of the in-plane components (Vr1,Vr2) will be made, with a 401 contour plot of the out-of-plane component Vr3 superimposed. 401 401 Caution: Vr1 and Vr2 are assumed to be the components of the in-plane 401 vector in the directions of the NEW axes A1,A2. 401I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 401I$ UPRINT(1),UPRINT(2) were defined earlier so that at P1=constant $ 401I$ cross-sections, after U and V are replaced by these, the in-plane $ 401I$ displacement components are (U,W) and the out-of-plane component is $ 401I$ V, so $ 401I$ enter: IVAR1 = 1 $ 401I$ IVAR2 = 9 $ 401I$ IVAR3 = 5 $ 401I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 402 Enter values for IVAR1, IVAR2, IVAR3 to select the components Vr1,Vr2 402 and Vr3 of the vector to be plotted. 402 IVAR1,IVAR2,IVAR3 = 1 means $$1 (possibly as modified by UPRINT,...) 402 2 $$1x 402 3 $$1y 402 4 $$1z 402 5 $$2 402 6 $$2x 402 7 $$2y 402 8 $$2z 402 9 $$3 402 10 $$3x 402 11 $$3y 402 12 $$3z 402 13 $$4 402 14 $$4x 402 15 $$4y 402 16 $$4z 402 . . 402 . . 402 A vector plot of the in-plane components (Vr1,Vr2) will be made, with a 402 contour plot of the out-of-plane component Vr3 superimposed. 402 402 Caution: Vr1 and Vr2 are assumed to be the components of the in-plane 402 vector in the directions of the NEW axes A1,A2. 403 Enter lower (VR3MIN) and upper (VR3MAX) bounds for the contour values 403 for the third component of the vector. VR3MIN and VR3MAX are often 403 defaulted. 403 403 Contours will be drawn corresponding to the values 403 403 VR3MIN + S*(VR3MAX-VR3MIN), for S=0.05,0.15,...0.95. 403 403 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 403 + By default, VR3MIN and VR3MAX are set to the minimum and maximum + 403 + values of the variable to be plotted. For a common scaling, you may + 403 + want to set VR3MIN=A3LOW, VR3MAX=A3HIGH. A3LOW and A3HIGH are the + 403 + minimum and maximum values over all output points and over all saved + 403 + time steps or iterations. + 403 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 403I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 403I$ Press [RETURN] to default VR3MIN and VR3MAX $ 403I$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 9 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 404 Which type of cross-sectional plots do you want? 404 404 1. Plots of output variable as function of P1 (constant P2,P3 [and T]) 404 2. Plots of output variable as function of P2 (constant P1,P3 [and T]) 404 3. Plots of output variable as function of P3 (constant P1,P2 [and T]) 404 or, if applicable: 404 4. Plots of output variable as function of T (constant P1,P2 and P3) 404 404 Enter 1,2,3 or 4 to select a plot type. 404J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 404J$ enter: 4 $ 404J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 405 One-dimensional plots of the output variable as a function of P1 405 will be made, at the output grid points (P2,P3) closest to 405 (P2CROSS(J),P3CROSS(K)), J=1,...,NP2VALS, K=1,...,NP3VALS 405 405 Enter values for NP2VALS, P2CROSS(1),...,P2CROSS(NP2VALS), 405 and NP3VALS, P3CROSS(1),...,P3CROSS(NP3VALS) 406 One-dimensional plots of the output variable as a function of P2 406 will be made, at the output grid points (P1,P3) closest to 406 (P1CROSS(I),P3CROSS(K)), I=1,...,NP1VALS, K=1,...,NP3VALS 406 406 Enter values for NP1VALS, P1CROSS(1),...,P1CROSS(NP1VALS), 406 and NP3VALS, P3CROSS(1),...,P3CROSS(NP3VALS) 407 One-dimensional plots of the output variable as a function of P3 407 will be made, at the output grid points (P1,P2) closest to 407 (P1CROSS(I),P2CROSS(J)), I=1,...,NP1VALS, J=1,...,NP2VALS 407 407 Enter values for NP1VALS, P1CROSS(1),...,P1CROSS(NP1VALS), 407 and NP2VALS, P2CROSS(1),...,P2CROSS(NP2VALS) 408 One-dimensional plots of the output variable as a function of T 408 will be made, at the output grid points (P1,P2,P3) closest to 408 (P1CROSS(I),P2CROSS(J),P3CROSS(K)), 408 I=1,...,NP1VALS, J=1,...,NP2VALS, K=1,...,NP3VALS 408 408 Enter values for NP1VALS, P1CROSS(1),...,P1CROSS(NP1VALS), 408 and NP2VALS, P2CROSS(1),...,P2CROSS(NP2VALS), 408 and NP3VALS, P3CROSS(1),...,P3CROSS(NP3VALS) 408J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 408J$ We want two time plots, at (0,0,0) and (0,0,0.5), so $ 408J$ enter: NP1VALS = 1 $ 408J$ P1CROSS(1) = 0 $ 408J$ NP2VALS = 1 $ 408J$ P2CROSS(1) = 0 $ 408J$ NP3VALS = 2 $ 408J$ P3CROSS(1) = 0 $ 408J$ P3CROSS(2) = 0.5 $ 408J$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ EXAMPLE 10 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 409 Enter the name of the FORTRAN function subprogram, in columns 1-6. It 409 must be a function of P1,P2 and P3 only, but do not enter the 409 '(P1,P2,P3)'. 410 If you don't want to read the FINE PRINT, enter NWORK = 200000. 410 410 +++++++++++++++ THE "FINE PRINT" (CAN USUALLY BE IGNORED) ++++++++++++++ 410 + Enter a dimension, NWORK, for the workarray, WORK, which is used to + 410 + store the tabulated values, for interpolation on later calls. NWORK + 410 + must be at least (NP1+1)*(NP2+1)*(NP3+1)+9, where NP1,NP2,NP3 are + 410 + the output grid parameters used by the program which generated the + 410 + tabulated values. + 410 ++++++++++++++++++++++++++ END OF "FINE PRINT" +++++++++++++++++++++++++ 411 More detailed information about PDE2D can be found in the book 411 "Solving Partial Differential Equation Applications with PDE2D," 411 Granville Sewell, John Wiley & Sons, 2018. 411 411 ******************************************* 411 ***** Input program has been created ***** 411 ******************************************* 411 412 9999