Hello there,
I need a bash script to automatically edit a file for simulations (input2edit.inp, taken as input argument). This file (look at the bottom of this post) describes a "mesh" (set of nodes and elements) with
a. node list with coordinates
b. element list referring to the nodes
I need to:
1. sort the node list in ascending order and finding the highest node --> max-node
2. replacing line "*ELEMENT, TYPE=CPS3" with line "ELEMENT, TYPE=DC2D3"
3. adding following lines after line " *SOLID SECTION, ELSET=W, MATERIAL=W"
*Nset, nset=PF, instance=PART-1-1, generate
1, <max-node>, 1
4. attaching the textfile "k02TT.inp" at the end of the file and getting "input_ready.inp"
cat $1 k02TT.inp > input_ready.inp ???
Many thanks for help, especially for 1. and 3. !!!
Alex
Quote:
*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