0

Element Numbering

I am wondering what convention is used for the alphanumeric (described online as AAAII?) element numbering.

 

For instance: cell #1 = 001, cell #1000 = A01, but I'm not able to figure out the pattern.

Additionally, if anyone has an elegant system for getting rid of the spaces in the element names, omitting zeros, I would love to know about it!

 

Thanks for any help,

John

5 replies

null
    • fuchsia_flower
    • 9 yrs ago
    • Reported - view

    Any thoughts? I am relatively new to TOUGH but I haven't been ale to find any documentation for this.

    • Finsterle GeoConsulting
    • Stefan_Finsterle
    • 9 yrs ago
    • Reported - view

    Hi John,

    There are no naming conventions - you can device any system you like! TOUGH2 does not care as long as element names are unique. The internal mesh generators (see block MESHM) employ some scheme to help identify rows and columns and layers, but it's difficult to describe this scheme in general as it has some "overflow" features that kick in depending on the number of elements in each direction (i.e., it is mesh-specific). But you can figure it out as the node center coordinates are also printed for each element.

    I could give you simple Unix commands (e.g., sed) or editor instructions (e.g., in vi) to globally replace blanks/zeroes in element names (but I don't know whether you like Unix...). Alternatively, write your own little program in your favorite scripting/programming language to accomplish this. As an alternative to this alternative, go to SUBROUTINE OUT in file eosX.f and change the element names before you print them out.

    Hope this helps,

    Stefan

    • fuchsia_flower
    • 9 yrs ago
    • Reported - view

    Thanks very much, good to know. I was in fact using the node centers, so sounds like that is a good way to go.

    A Unix command for replacement would be great. I was working on a regex command but I would be interested to see what you use.

    Thanks again,

     

    John

    • Finsterle GeoConsulting
    • Stefan_Finsterle
    • 9 yrs ago
    • Reported - view

    John,

    Let me know exactly what you want (I did not understand "get rid of space, omit zeroes"). Assuming you want to replace a potential blank in the fourth slot of an element name by a zero, here is a simple command:

    sed "s/^ \(...\) \(.\)  / \10\2  /" OUTFILE  | sed "s/^ \(..........\) \(.\)/ \10\2/" > OUTFILE_NO_BLANKS

     

    This removes blanks in all elements and connection names in an output file, but is very basic and thus still ugly, as is throws some zeros in where they would not belong, but these extra can be removed equally easily if needed. I just want to give you the idea.

    Cheers,

    Stefan

    • fuchsia_flower
    • 9 yrs ago
    • Reported - view

    That pretty much works for what I'm trying to do. Thanks for the help, much appreciated.

Content aside

  • 9 yrs agoLast active
  • 5Replies
  • 579Views
  • 2 Following