Find the answer to your Linux question:
Results 1 to 1 of 1
Hello there, I need a bash script to automatically edit a file for simulations (input-example.inp, taken as input argument). This structure is like that one below -node list with coordinates ...
  1. #1
    Just Joined!
    Join Date
    Apr 2007
    Posts
    2

    Question editing mesh-file finding max value in a block

    Hello there,

    I need a bash script to automatically edit a file for simulations (input-example.inp, taken as input argument). This structure is like that one below
    -node list with coordinates
    -element list referring to the nodes
    -some text

    I need to:
    1. sort the node list in ascending order and find the highest node value --> max-node
    2. add following lines after line " *SOLID SECTION, ELSET=W, MATERIAL=W"

    *Nset, nset=PF, instance=PART-1-1, generate
    1, <max-node>, 1

    Many thanks for help !!!
    Alex


    *NODE
    3, 0.0, 0.0
    1, 0.00225704804161, 0.0
    6, 0.0051913319517, 0.0
    7, 0.00723961685581, 0.0
    21, 0.0107555460777, 0.0
    19, 0.01306875, 0.0
    132466, 0.0176946608117, 0.0
    31, 0.0209391103626, 0.0
    ...
    ...
    ** The element type is T3_3. The type provided for ABAQUS is only a guess
    ** and may have to be modified by the user to be meaningful.
    *ELEMENT, TYPE=CPS3
    1, 1, 2, 3
    2, 4, 1, 5
    3, 5, 1, 6
    4, 7, 5, 6
    5, 8, 7, 9
    6, 8, 5, 7
    ...
    ...
    ...
    *SOLID SECTION, ELSET=W, MATERIAL=W
    *MATERIAL, NAME=C
    ** Use the information in the header to complete these fields under MATERIAL
    *MATERIAL, NAME=W
    ** Use the information in the header to complete these fields under MATERIAL
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...