Mesh
After write a code for mesh in notepad
How do run it
15 replies
-
Hey Dilan,
You would call the file “MESH” and copy it into the directory with your other TOUGH input files. Make sure your main TOUGH input file does not contain an ELEME or CONNE block. Otherwise, it’ll write the information from those blocks over the file you generate once you attempt to run a simulation.
-
I see. I misunderstood your first question. I now understand that you were attempting to generate a MESH file using meshmaker. In order to run this, you will need to create an input file with a title line, followed by a line beginning with the MESHM (the meshmaker keyword). After that, you'll paste the contents you provided in your previous message. At the end of this, you'll leave a blank line after 1.0e01. On the following line you'll enter the keyword ENDFI, which informs TOUGH that you won't be running a simulation. Once you run this file, you should receive a file called MESH containing the mesh you're trying to generate.
It looks like this will create elements with radii of 0.005 m, followed by one with a radius of 0.007 m (perhaps a well casing?) followed by 30 logarithmically spaced cylindrical elements out to 100 m, followed by a single element from spanning 100 m to 500.1 m. The reason for the final radius (500.1 m) may be to stipulate a Dirichlet boundary at a location far from your injection well. If you wanted to ensure that the outer extend of your reservoir maintains its initial conditions far from the injector, you'll make the volume of the final element (between 100 m to 500.1 m) very large in the ELEME list. But I really can't be certain the intentions of the inputs.
You can find more details about setting up meshmaker in the TOUGH Manual (Appendix F, pg. 177).
-
I used the reported input for MeshMaker to build the grid using the standard TOUGH2 V.2.0 internal grid generator (MESHM keyword in TOUGH2 input file).
Actually the produced MESH file is different than that generated by MeshMaker:
ELEME --- 33 4 0 30 0.00000 500.100
A1 1 10.7854E-010.1571E-01 0.2500E-01 -.5000E+01
A1 2 10.7540E-010.1508E-01 0.6000E-01 -.5000E+01
A1 3 10.5913E+000.1183E+00 0.1120E+00 -.5000E+01
A1 4 10.1296E+010.2591E+00 0.2044E+00 -.5000E+01
A1 5 10.2399E+010.4798E+00 0.3154E+00 -.5000E+01
A1 6 10.4095E+010.8191E+00 0.4486E+00 -.5000E+01
A1 7 10.6668E+010.1334E+01 0.6084E+00 -.5000E+01
A1 8 10.1053E+020.2105E+01 0.8003E+00 -.5000E+01
A1 9 10.1627E+020.3254E+01 0.1031E+01 -.5000E+01
A1 10 10.2477E+020.4954E+01 0.1307E+01 -.5000E+01
A1 11 10.3728E+020.7456E+01 0.1639E+01 -.5000E+01
A1 12 10.5562E+020.1112E+02 0.2037E+01 -.5000E+01
A1 13 10.8243E+020.1649E+02 0.2515E+01 -.5000E+01
A1 14 10.1215E+030.2430E+02 0.3089E+01 -.5000E+01
A1 15 10.1784E+030.3568E+02 0.3778E+01 -.5000E+01
A1 16 10.2610E+030.5219E+02 0.4605E+01 -.5000E+01
A1 17 10.3808E+030.7615E+02 0.5597E+01 -.5000E+01
A1 18 10.5543E+030.1109E+03 0.6788E+01 -.5000E+01
A1 19 10.8055E+030.1611E+03 0.8218E+01 -.5000E+01
A1 20 10.1169E+040.2337E+03 0.9934E+01 -.5000E+01
A1 21 10.1694E+040.3387E+03 0.1199E+02 -.5000E+01
A1 22 10.2452E+040.4904E+03 0.1447E+02 -.5000E+01
A1 23 10.3547E+040.7094E+03 0.1743E+02 -.5000E+01
A1 24 10.5127E+040.1025E+04 0.2100E+02 -.5000E+01
A1 25 10.7408E+040.1482E+04 0.2527E+02 -.5000E+01
A1 26 10.1070E+050.2140E+04 0.3041E+02 -.5000E+01
A1 27 10.1544E+050.3088E+04 0.3657E+02 -.5000E+01
A1 28 10.2228E+050.4457E+04 0.4396E+02 -.5000E+01
A1 29 10.3215E+050.6430E+04 0.5284E+02 -.5000E+01
A1 30 10.4637E+050.9274E+04 0.6349E+02 -.5000E+01
A1 31 10.6687E+050.1337E+05 0.7628E+02 -.5000E+01
A1 32 10.9641E+050.1928E+05 0.9163E+02 -.5000E+01
A1 33 10.7543E+070.1509E+07 0.3000E+03 -.5000E+01Looking also at the grid info printed in the standard TOUGH2 output, it seems that the grid built by TOUGH2 is actually representing what was intended, i.e. a logarithmic grid from 0.07 m till the radius of 100.0 m, and then a single element from 100.0 m to 500.1 m, with the node at a radius of 300.05 m.
* * * * * M E S H G E O M E T R Y * * * * * VOLUME AND AREA ARE GIVEN FOR HEIGHT = 1 METER
ELEM REL RCON D V A
1 0.25000E-01 0.50000E-01 0.25000E-01 0.78540E-02 0.31416E+00
2 0.60000E-01 0.70000E-01 0.10000E-01 0.75398E-02 0.43982E+00
3 0.11201E+00 0.15402E+00 0.42011E-01 0.59133E-01 0.96775E+00
4 0.20445E+00 0.25487E+00 0.50426E-01 0.12955E+00 0.16014E+01
5 0.31540E+00 0.37593E+00 0.60527E-01 0.23990E+00 0.23620E+01
6 0.44858E+00 0.52123E+00 0.72652E-01 0.40954E+00 0.32750E+01
7 0.60844E+00 0.69564E+00 0.87205E-01 0.66675E+00 0.43708E+01
8 0.80031E+00 0.90499E+00 0.10467E+00 0.10527E+01 0.56862E+01
9 0.10306E+01 0.11563E+01 0.12564E+00 0.16272E+01 0.72650E+01
10 0.13071E+01 0.14579E+01 0.15081E+00 0.24770E+01 0.91601E+01
11 0.16389E+01 0.18199E+01 0.18102E+00 0.37280E+01 0.11435E+02
12 0.20372E+01 0.22545E+01 0.21728E+00 0.55623E+01 0.14165E+02
13 0.25153E+01 0.27761E+01 0.26080E+00 0.82433E+01 0.17443E+02
14 0.30891E+01 0.34021E+01 0.31304E+00 0.12152E+02 0.21376E+02
15 0.37779E+01 0.41536E+01 0.37575E+00 0.17838E+02 0.26098E+02
16 0.46047E+01 0.50557E+01 0.45101E+00 0.26097E+02 0.31766E+02
17 0.55970E+01 0.61384E+01 0.54136E+00 0.38076E+02 0.38569E+02
18 0.67882E+01 0.74380E+01 0.64980E+00 0.55429E+02 0.46734E+02
19 0.82179E+01 0.89979E+01 0.77996E+00 0.80546E+02 0.56535E+02
20 0.99341E+01 0.10870E+02 0.93620E+00 0.11687E+03 0.68300E+02
21 0.11994E+02 0.13118E+02 0.11237E+01 0.16937E+03 0.82421E+02
22 0.14467E+02 0.15815E+02 0.13488E+01 0.24521E+03 0.99371E+02
23 0.17434E+02 0.19053E+02 0.16190E+01 0.35470E+03 0.11972E+03
24 0.20997E+02 0.22940E+02 0.19433E+01 0.51275E+03 0.14414E+03
25 0.25273E+02 0.27605E+02 0.23326E+01 0.74080E+03 0.17345E+03
26 0.30405E+02 0.33205E+02 0.27998E+01 0.10698E+04 0.20863E+03
27 0.36566E+02 0.39926E+02 0.33607E+01 0.15442E+04 0.25086E+03
28 0.43960E+02 0.47994E+02 0.40339E+01 0.22284E+04 0.30156E+03
29 0.52836E+02 0.57678E+02 0.48419E+01 0.32148E+04 0.36240E+03
30 0.63490E+02 0.69301E+02 0.58118E+01 0.46368E+04 0.43543E+03
31 0.76277E+02 0.83253E+02 0.69760E+01 0.66867E+04 0.52310E+03
32 0.91627E+02 0.10000E+03 0.83733E+01 0.96412E+04 0.62832E+03
33 0.30005E+03 0.50010E+03 0.20005E+03 0.75430E+06 0.31422E+04So, apparently MeshMaker is building a different grid than what would be expected for TOUGH2. Is there any special option involved in the MeshMaker run?
Alfredo
-
Depending on the problem you’re setting up (which I admittedly haven’t looked into yours in great detail), I would expect some changes in the simulation output with different mesh resolutions. I don’t know if this will solve your specific problem, but the standard way to look into “grid independence” is to keep adding resolution to your mesh until the solution stops changing.
-
Hello Dilan:
Did you get clarity on this? Are you available for a brief Meeting on Teams or Zoom?