2 #------------------------------------------------------------------------------
4 # \\ / F ield | foam-extend: Open Source CFD
5 # \\ / O peration | Version: 4.0
6 # \\ / A nd | Web: http://www.foam-extend.org
7 # \\/ M anipulation | For copyright notice see file Copyright
8 #------------------------------------------------------------------------------
10 # This file is part of foam-extend.
12 # foam-extend is free software: you can redistribute it and/or modify it
13 # under the terms of the GNU General Public License as published by the
14 # Free Software Foundation, either version 3 of the License, or (at your
15 # option) any later version.
17 # foam-extend is distributed in the hope that it will be useful, but
18 # WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 # General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
30 #------------------------------------------------------------------------------
33 cat $1 |
grep "Solving for Ux" |
grep -v "solution singularity" |
sed s
/,//g |
awk 'BEGIN { NENTRIES = 0 }{NENTRIES++; printf("%d %e\n", NENTRIES, $8)}' - > $tmpU
36 cat $1 |
grep "Solving for Uy" |
grep -v "solution singularity" |
sed s
/,//g |
awk 'BEGIN { NENTRIES = 0 }{NENTRIES++; printf("%d %e\n", NENTRIES, $8)}' - > $tmpV
39 cat $1 |
grep "Solving for Uz" |
grep -v "solution singularity" |
sed s
/,//g |
awk 'BEGIN { NENTRIES = 0 }{NENTRIES++; printf("%d %e\n", NENTRIES, $8)}' - > $tmpW
42 cat $1 |
grep "Solving for p" |
grep -v "solution singularity" |
sed s
/,//g |
awk 'BEGIN { NENTRIES = 0 }{NENTRIES++; printf("%d %e\n", NENTRIES, $8)}' - > $tmpP
44 set linesU
= `cat $tmpU | wc -l`
45 set linesV
= `cat $tmpV | wc -l`
46 set linesW
= `cat $tmpW | wc -l`
47 set linesP
= `cat $tmpP | wc -l`
52 @ ngraphs
= $ngraphs + 1
56 @ ngraphs
= $ngraphs + 1
60 @ ngraphs
= $ngraphs + 1
64 @ ngraphs
= $ngraphs + 1
67 cat << EOF > residualUVWP.dat
78 cat << EOF >> residualUVWP.dat
85 cat $tmpU >> residualUVWP.dat
89 cat << EOF >> residualUVWP.dat
96 cat $tmpV >> residualUVWP.dat
100 cat << EOF >> residualUVWP.dat
107 cat $tmpW >> residualUVWP.dat
110 if ($linesP > 1) then
111 cat << EOF >> residualUVWP.dat
118 cat $tmpP >> residualUVWP.dat
126 #------------------------------------------------------------------------------