Solar-h2o:Copper-Graphs: Difference between revisions

From Earlham CS Department
Jump to navigation Jump to search
Copelco (talk | contribs)
No edit summary
 
Copelco (talk | contribs)
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Plots of Ehren's Equation Against Recorded Values ==


http://cs.earlham.edu/~hip/enpr256/test1.png
[[http://cs.earlham.edu/~hip/enpr256/test1.eps EPS]]
http://cs.earlham.edu/~hip/enpr256/test2.png
[[http://cs.earlham.edu/~hip/enpr256/test1.eps EPS]]
http://cs.earlham.edu/~hip/enpr256/test3.png
[[http://cs.earlham.edu/~hip/enpr256/test1.eps EPS]]
== Process (so I can remember) ==
=== Export database table to file ===
=== Export database table to file ===
  hip=# BEGIN;
  hip=# BEGIN;
  BEGIN
  BEGIN
  hip=# CREATE TEMP TABLE copper_over_time AS  
  hip=# CREATE TEMP TABLE copper_runs AS
  hip-# SELECT to_char(date, 'MI:SS'),run1,run2,run3 FROM ss_copper_lab ORDER BY date ASC;
  hip-# SELECT to_char(run3,'099.99') as run3, \
  to_char(run2,'099.99') as run2, \
  to_char(run1,'099.99') as run1 FROM ss_copper_lab ORDER BY date ASC;
  SELECT
  SELECT
  hip=# COPY copper_over_time TO '/clients/users/copelco/copper_lab.txt';
  hip=# COPY copper_runs TO '/clients/users/copelco/copper_lab.txt' NULL AS '-';
  COPY
  COPY
  hip=# ROLLBACK;
  hip=# ROLLBACK;
  ROLLBACK
  ROLLBACK
hip=#
=== Add 3 second time interval to data file ===
#    run3    run2    run1
#--------------------------
000  073.96  073.74  072.72
003  075.54  075.09  073.29
006  076.55  076.66  074.41
...
[[http://cs.earlham.edu/~hip/enpr256/copper_lab.txt Data File]]
=== Create gnuplot file ===
set xrange [0:210]
set xlabel "Time (seconds)"
set ylabel "Temperature (F)"
########### Test 1 ###########
set title "Copper Pipe Heat Exchanger Test - Test #1"
A = 97.5
F = 72.72
f(x) = A - (A - F) * exp(-0.009547*x)
set terminal png
set output "test1.png"
plot f(x) with lines lt 1 lw 2, \
  "copper_lab.txt" using 1:4 title "Test 1" with lines lt 3 lw 3
set term postscript eps enhanced color
set output "test1.eps"
replot
########### Test 2 ###########
set title "Copper Pipe Heat Exchanger Test - Test #2"
A = 107
F = 72.28
f(x) = A - (A - F) * exp(-0.009547*x)
set terminal png
set output "test2.png"
plot f(x) with lines lt 1 lw 2, \
  "copper_lab.txt" using 1:3 title "Test 2" with lines lt 3 lw 3
set term postscript eps enhanced color
set output "test2.eps"
replot
########### Test 3 ###########
set title "Copper Pipe Heat Exchanger Test - Test #3"
 
A = 105
F = 72.28
f(x) = A - (A - F) * exp(-0.009547*x)
set terminal png
set output "test3.png"
plot f(x) with lines lt 1 lw 2, \
  "copper_lab.txt" using 1:2 title "Test 3" with lines lt 3 lw 3
set term postscript eps enhanced color
set output "test3.eps"
replot
[[http://cs.earlham.edu/~hip/enpr256/graph.plot Plot File]]

Latest revision as of 01:48, 22 November 2006

Plots of Ehren's Equation Against Recorded Values

http://cs.earlham.edu/~hip/enpr256/test1.png

[EPS]

http://cs.earlham.edu/~hip/enpr256/test2.png

[EPS]

http://cs.earlham.edu/~hip/enpr256/test3.png

[EPS]

Process (so I can remember)

Export database table to file

hip=# BEGIN;
BEGIN
hip=# CREATE TEMP TABLE copper_runs AS
hip-# SELECT to_char(run3,'099.99') as run3, \
  to_char(run2,'099.99') as run2, \
  to_char(run1,'099.99') as run1 FROM ss_copper_lab ORDER BY date ASC;
SELECT
hip=# COPY copper_runs TO '/clients/users/copelco/copper_lab.txt' NULL AS '-';
COPY
hip=# ROLLBACK;
ROLLBACK
hip=#

Add 3 second time interval to data file

#    run3    run2    run1
#--------------------------
000  073.96  073.74  072.72
003  075.54  075.09  073.29
006  076.55  076.66  074.41
...

[Data File]

Create gnuplot file

set xrange [0:210]
set xlabel "Time (seconds)"
set ylabel "Temperature (F)"

########### Test 1 ###########
set title "Copper Pipe Heat Exchanger Test - Test #1"

A = 97.5
F = 72.72
f(x) = A - (A - F) * exp(-0.009547*x)

set terminal png
set output "test1.png"
plot f(x) with lines lt 1 lw 2, \
  "copper_lab.txt" using 1:4 title "Test 1" with lines lt 3 lw 3

set term postscript eps enhanced color
set output "test1.eps"
replot

########### Test 2 ###########
set title "Copper Pipe Heat Exchanger Test - Test #2"

A = 107
F = 72.28
f(x) = A - (A - F) * exp(-0.009547*x)

set terminal png
set output "test2.png"
plot f(x) with lines lt 1 lw 2, \
 "copper_lab.txt" using 1:3 title "Test 2" with lines lt 3 lw 3

set term postscript eps enhanced color
set output "test2.eps"
replot

########### Test 3 ###########
set title "Copper Pipe Heat Exchanger Test - Test #3"
 
A = 105
F = 72.28
f(x) = A - (A - F) * exp(-0.009547*x)

set terminal png
set output "test3.png"
plot f(x) with lines lt 1 lw 2, \
  "copper_lab.txt" using 1:2 title "Test 3" with lines lt 3 lw 3
set term postscript eps enhanced color
set output "test3.eps"
replot

[Plot File]