-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPOROUS2.SIF
177 lines (128 loc) · 4.08 KB
/
POROUS2.SIF
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
***************************
* SET UP THE INITIAL DATA *
***************************
NAME POROUS2
* Problem :
* *********
* The problem is to solve the porous medium equation on the unit square.
* The equation is
* \Delta ( u^2 ) + d \frac{\partial}{\partial x_1}( u^3 ) + f = 0
* within the domain. The boundary condition are that u = 1 on the bottom
* and left sides and u = 0 on the top and right sides. Discretization is
* using the usual central differences. The function f is a point source of
* maginitude 50 at the lower left grid point. The initial approximation
* is a discretization of 1 - x_1 x_2.
* Source: example 3.2.4 in
* S. Eisenstat and H. Walker,
* "Choosing the forcing terms in an inexact Newton method"
* Report 6/94/75, Dept of Maths, Utah State University, 1994.
* SIF input: Ph. Toint, July 1994.
* classification NOR2-MN-V-V
* P is the number of points in one side of the unit square.
* There are P*P variables.
*IE P 32 $-PARAMETER original value
*IE P 64 $-PARAMETER
IE P 72 $-PARAMETER
* D is the diffusion parameter d in the equation above.
* (see problem POROUS1 for D = 50.0)
RE D -50.0 $-PARAMETER diffusion parameter
* Define a few helpful parameters
IE 1 1
IE 2 2
IA P-1 P -1
RI RP-1 P-1
RD H RP-1 1.0
R* H2 H H
RD 1/H2 H2 1.0
RM 2H H 2.0
R/ D/2H D 2H
RM -D/2H D/2H -1.0
RM -4/H2 1/H2 -4.0
VARIABLES
* Define one variable per discretized point in the unit square
DO J 1 P
DO I 1 P
X U(I,J)
ND
GROUPS
* Define a group per inner discretized point.
* The linear term shows the Laplace operator.
DO I 2 P-1
DO J 2 P-1
XE G(I,J)
ND
CONSTANTS
X POROUS2 G(P-1,P-1)-50.0
BOUNDS
FR POROUS2 'DEFAULT'
* Fix the variables on the lower and upper edges of the unit square
DO J 1 P
XX POROUS2 U(1,J) 1.0
XX POROUS2 U(P,J) 0.0
ND
* Fix the variables on the left and right edges of the unit square
DO I 2 P-1
XX POROUS2 U(I,P) 1.0
XX POROUS2 U(I,1) 0.0
ND
START POINT
DO I 1 P
DO J 1 P
RI RI I
RI RJ J
RA I-1 RI -1.0
RA J-1 RJ -1.0
R* X1 I-1 H
R* X2 J-1 H
R* X1X2 X1 X2
RM MX1X2 X1X2 -1.0
RA UIJ MX1X2 1.0
ZV POROUS2 U(I,J) UIJ
ND
ELEMENT TYPE
EV SQ U
EV CB U
ELEMENT USES
DO I 1 P
DO J 1 P
XT US(I,J) SQ
ZV US(I,J) U U(I,J)
XT UC(I,J) CB
ZV UC(I,J) U U(I,J)
ND
GROUP USES
DO I 2 P-1
IA I-1 I -1
IA I+1 I 1
DO J 2 P-1
IA J-1 J -1
IA J+1 J 1
ZE G(I,J) US(I+1,J) 1/H2
ZE G(I,J) US(I-1,J) 1/H2
ZE G(I,J) US(I,J-1) 1/H2
ZE G(I,J) US(I,J+1) 1/H2
ZE G(I,J) US(I,J) -4/H2
ZE G(I,J) UC(I+1,J) D/2H
ZE G(I,J) UC(I-1,J) -D/2H
ND
OBJECT BOUND
LO POROUS2 0.0
* Solution
*LO SOLTN 0.0
ENDATA
***********************
* SET UP THE FUNCTION *
* AND RANGE ROUTINES *
***********************
ELEMENTS POROUS2
INDIVIDUALS
* Square
T SQ
F U * U
G U U + U
H U U 2.0
T CB
F U * U * U
G U 3.0 * U * U
H U U 6.0 * U
ENDATA