-
-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Repair plotting script of elastic-tube-3d (#450)
* Repair plotting script of elastic-tube-3d * Work with folder name in the script plot-displacements.sh * Retore plot-all-displacements.sh file * Clarify how plotting scripts work in the README * Formatting
- Loading branch information
1 parent
59f5356
commit 64f9cf7
Showing
3 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/sh | ||
|
||
if [ "${1:-}" = "" ]; then | ||
echo "No target directory specified. Please specify the directory of the solid participant containing the watchpoint, e.g. ./plot-displacements.sh solid-calculix." | ||
exit 1 | ||
fi | ||
|
||
FILE="$1/precice-Solid-watchpoint-Tube-Midpoint.log" | ||
|
||
if [ ! -f "$FILE" ]; then | ||
echo "Unable to locate the watchpoint file (precice-Solid-watchpoint-Tube-Midpoint.log) in the specified solid directory '${1}'. Make sure the specified directory matches the solid participant you used for the calculations." | ||
exit 1 | ||
fi | ||
|
||
gnuplot -p << EOF | ||
set grid | ||
set title 'displacement of the tube midpoint' | ||
set xlabel 'time [s]' | ||
set ylabel 'displacement of the tube midpoint [m]' | ||
set term pngcairo enhanced size 900,654 | ||
set output "images/tutorials-elastic-tube-3d-displacement-watchpoints.png" | ||
plot "$1/precice-Solid-watchpoint-Tube-Midpoint.log" using 1:5 with lines title "$1 tube midpoint circumferential", \ | ||
"$1/precice-Solid-watchpoint-Tube-Midpoint.log" using 1:6 with lines title "$1 tube midpoint radial", \ | ||
"$1/precice-Solid-watchpoint-Tube-Midpoint.log" using 1:7 with lines title "$1 tube midpoint axial" | ||
EOF | ||
|
||
echo "Plot saved in images/tutorials-elastic-tube-3d-displacement-watchpoints.png" |