Browse code

Поправил 1й тест и довёл до ума рисовалку.

Dmitrii Kashin authored on 04/09/2014 08:44:20
Showing 8 changed files
... ...
@@ -37,5 +37,5 @@ $(EXECUTABLE): $(OBJECTS)
37 37
 	$(CC) -MM $(CFLAGS) $*.cxx > $*.deps
38 38
 
39 39
 clean:
40
-	rm -f $(EXECUTABLE) $(OBJECTS) $(DEPENDS)
40
+	rm -f $(EXECUTABLE) *.o *.deps
41 41
 	find test/ -not \( -name "test" -o -name "README" -o -name "frolov" \) -delete
42 42
new file mode 120000
... ...
@@ -0,0 +1 @@
0
+../test
0 1
\ No newline at end of file
1 2
new file mode 100755
... ...
@@ -0,0 +1,15 @@
0
+#!/bin/sh
1
+
2
+gridsDir="grids"
3
+CWD=`pwd`
4
+
5
+
6
+cd $gridsDir
7
+for file in grid*
8
+do
9
+    num=${file##grid}
10
+    mkdir -p $num
11
+    sed "s/XXX/${num}/" $CWD/sheme.gnuplot | gnuplot
12
+    mv *.png $num
13
+done
14
+cd -
0 15
new file mode 100644
... ...
@@ -0,0 +1,21 @@
0
+set term png size 1280,1024
1
+set grid
2
+set xlabel "Grid"
3
+
4
+set xrange [0:1]
5
+
6
+set output "Phi.png"
7
+plot "gridXXX" using 1:2 title "Volume Part of Gas" with lines;
8
+
9
+set output "Rg.png"
10
+plot "gridXXX" using 1:3 title "Density of Gas" with lines;
11
+
12
+set output "U.png"
13
+set yrange [150:450]
14
+plot "gridXXX" using 1:4 title "Velocity of Gas" with lines,\
15
+     "gridXXX" using 1:5 title "Velocity of Liquid" with lines;
16
+
17
+#set xlabel "Step"
18
+#set xrange [0:5000]
19
+#set output "Conv.png"
20
+#plot "convergenceXXX" using 1:2 title "Convergence of Density" with lines;
... ...
@@ -5,21 +5,14 @@
5 5
 #define R0 287.065476372 // Gas Constant
6 6
 #define sos 340.174 // Speed of Sound
7 7
 
8
-#define liquidDensity 1000 // kg/m^3 // can't be zero
8
+#define liquidDensity 800 // kg/m^3 // can't be zero
9 9
 
10 10
 // Synonyms
11 11
 
12
-#define T (340 / kappa * R0) // ??
12
+#define T (340 / kappa * R0) // тесты Власенко
13 13
 #define u3def liquidDensity
14 14
 
15 15
 // additional pressure
16 16
 #define sigma 0
17 17
 
18
-#define outputEveryStep 100
19
-#define outputEveryTime 0
20
-
21
-#define finTime 0
22
-#define finStep 1000
23
-
24
-
25 18
 #endif // INITIAL_PARAMETERS
... ...
@@ -8,7 +8,7 @@
8 8
 
9 9
 using namespace std;
10 10
 
11
-const int NumOfCells = 10;
11
+const int NumOfCells = 1000;
12 12
 const int x0 = 0;
13 13
 const int x1 = 1;
14 14
 
15 15
new file mode 100644
... ...
@@ -0,0 +1,14 @@
0
+/*
1
+  Этот файл содержит необходимые для маршевых функций настройки.
2
+ */
3
+
4
+#ifndef MARCH_CONFIG
5
+#define MARCH_CONFIG
6
+
7
+#define outputEveryStep 100
8
+#define outputEveryTime 0
9
+
10
+#define finTime 0
11
+#define finStep 10000
12
+
13
+#endif // MARCH_CONFIG
... ...
@@ -2,6 +2,7 @@
2 2
 #include <math.h>
3 3
 #include "timestep.h"
4 4
 #include "solver.h"
5
+#include "march-config.h"
5 6
 
6 7
 void
7 8
 march (Grid1D grid)