diff --git a/Cantera/python/examples/equilibrium/multiphase_plasma/Makefile.in b/Cantera/python/examples/equilibrium/multiphase_plasma/Makefile.in index 221f79aa4..61d59e13d 100644 --- a/Cantera/python/examples/equilibrium/multiphase_plasma/Makefile.in +++ b/Cantera/python/examples/equilibrium/multiphase_plasma/Makefile.in @@ -13,15 +13,13 @@ test: install: @INSTALL@ -d $(INST_DIR) - @INSTALL@ -c -m ug+rw,o+r Makefile $(INST_DIR) - @INSTALL@ -c -m ug+rw,o+r multiphase_plasma.py $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r multiphase_plasma.py $(INST_DIR) @INSTALL@ -c runtest $(INST_DIR) @INSTALL@ -c cleanup $(INST_DIR) @INSTALL@ -c -m ug+rw,o+r output_blessed_0.txt $(INST_DIR) @INSTALL@ -c -m ug+rw,o+r equil_koh_blessed_0.csv $(INST_DIR) clean: - rm -f *.log *.csv *.xml ./cleanup # end of file diff --git a/Cantera/python/examples/flames/Makefile.in b/Cantera/python/examples/flames/Makefile.in index c16ff0821..81be219df 100644 --- a/Cantera/python/examples/flames/Makefile.in +++ b/Cantera/python/examples/flames/Makefile.in @@ -3,7 +3,7 @@ INST_DIR=@ct_demodir@/python/flames PY_DEMOS = flame1 flame2 stflame1 npflame1 free_h2_air \ - adiabatic_flame flame_fixed_T + adiabatic_flame flame_fixed_T PYTHON_CMD = @PYTHON_CMD@ all: @@ -28,9 +28,9 @@ install: @INSTALL@ -d $(INST_DIR) @INSTALL@ -c -m ug+rw,o+r Makefile $(INST_DIR) @(for py in $(PY_DEMOS) ; do \ - echo "running $${py}..."; \ - (cd $${py} ; @MAKE@ install ) \ - done) + echo "running $${py}..."; \ + (cd $${py} ; @MAKE@ install ) \ + done) clean: diff --git a/Cantera/python/examples/gasdynamics/Makefile.in b/Cantera/python/examples/gasdynamics/Makefile.in index 51ab2917b..eb0c6c0b8 100644 --- a/Cantera/python/examples/gasdynamics/Makefile.in +++ b/Cantera/python/examples/gasdynamics/Makefile.in @@ -1,11 +1,12 @@ #!/bin/sh +INST_DIR=@ct_demodir@/python/gasdynamics + PY_DEMOS = isentropic soundSpeed all: @(for py in $(PY_DEMOS) ; do \ - echo "running $${py}..."; \ (cd $${py} ; @MAKE@ ) \ done) @@ -17,13 +18,22 @@ run: test: @(for py in $(PY_DEMOS) ; do \ - echo "running $${py}..."; \ + echo "testing $${py}..."; \ (cd $${py} ; @MAKE@ test ) \ done) +install: + @INSTALL@ -d $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r Makefile $(INST_DIR) + @(for py in $(PY_DEMOS) ; do \ + echo "install $${py}..."; \ + (cd $${py} ; @MAKE@ install ) \ + done) + + clean: @(for py in $(PY_DEMOS) ; do \ - echo "running $${py}..."; \ + echo "cleaning $${py}..."; \ (cd $${py} ; @MAKE@ clean ) \ done) diff --git a/Cantera/python/examples/gasdynamics/isentropic/Makefile.in b/Cantera/python/examples/gasdynamics/isentropic/Makefile.in index 915561a65..ae724c6e2 100644 --- a/Cantera/python/examples/gasdynamics/isentropic/Makefile.in +++ b/Cantera/python/examples/gasdynamics/isentropic/Makefile.in @@ -1,5 +1,8 @@ #!/bin/sh +INST_DIR=@ct_demodir@/python/gasdynamics/isentropic + + PYTHON_CMD = @PYTHON_CMD@ run: @@ -7,8 +10,15 @@ run: test: ./runtest + +install: + @INSTALL@ -d $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r isentropic.py $(INST_DIR) + @INSTALL@ -c runtest $(INST_DIR) + @INSTALL@ -c cleanup $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r output_blessed_0.txt $(INST_DIR) + clean: - rm -f *.log *.csv *.xml ./cleanup # end of file diff --git a/Cantera/python/examples/gasdynamics/soundSpeed/Makefile.in b/Cantera/python/examples/gasdynamics/soundSpeed/Makefile.in index 7c1fd3c14..c21141166 100644 --- a/Cantera/python/examples/gasdynamics/soundSpeed/Makefile.in +++ b/Cantera/python/examples/gasdynamics/soundSpeed/Makefile.in @@ -1,5 +1,7 @@ #!/bin/sh +INST_DIR=@ct_demodir@/python/gasdynamics/soundSpeed + PYTHON_CMD = @PYTHON_CMD@ run: @@ -7,8 +9,15 @@ run: test: ./runtest + +install: + @INSTALL@ -d $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r soundSpeed.py $(INST_DIR) + @INSTALL@ -c runtest $(INST_DIR) + @INSTALL@ -c cleanup $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r output_blessed_0.txt $(INST_DIR) + clean: - rm -f *.log *.csv *.xml ./cleanup # end of file diff --git a/Cantera/python/examples/gasdynamics/soundSpeeds.py b/Cantera/python/examples/gasdynamics/soundSpeeds.py deleted file mode 100644 index 7e2dfaa6b..000000000 --- a/Cantera/python/examples/gasdynamics/soundSpeeds.py +++ /dev/null @@ -1,63 +0,0 @@ -from Cantera import * -import math - -def equilSoundSpeeds(gas, rtol = 1.0e-6, maxiter = 5000): - - """Returns a tuple containing the equilibrium and frozen sound - speeds for a gas with an equilibrium composition. The gas is - first set to an equilibrium state at the temperature and pressure - of the gas, since otherwise the equilibrium sound speed is not - defined. - - """ - - # set the gas to equilibrium at its current T and P - gas.equilibrate('TP', rtol = rtol, maxiter = maxiter) - - # save properties - s0 = gas.entropy_mass() - p0 = gas.pressure() - r0 = gas.density() - - # perturb the pressure - p1 = p0*1.0001 - - # set the gas to a state with the same entropy and composition but - # the perturbed pressure - gas.set(S = s0, P = p1) - - # save the density for this case for the frozen sound speed - rho_frozen = gas.density() - - # now equilibrate the gas holding S and P constant - gas.equilibrate("SP", loglevel=0, rtol = rtol, maxiter = maxiter) # , rtol = 1.0e-3, maxsteps=10000) - - r1 = gas.density() - - # equilibrium sound speed - aequil = math.sqrt((p1 - p0)/(r1 - r0)); - - # frozen sound speed - afrozen = math.sqrt((p1 - p0)/(rho_frozen - r0)); - - # compute the frozen sound speed using the ideal gas - # expression as a check - cp = gas.cp_mass() - cv = gas.cv_mass() - gamma = cp/cv - afrozen2 = math.sqrt(gamma*GasConstant*gas.temperature() - /gas.meanMolecularWeight()) - return (aequil, afrozen, afrozen2) - - -# test program -if __name__ == "__main__": - - gas = GRI30() - gas.set(X = 'CH4:1.00, O2:2.0, N2:7.52') - for n in range(27): - temp = 300.0 + n*100.0 - gas.set(T = temp, P = OneAtm) - print temp, equilSoundSpeeds(gas) - - diff --git a/Cantera/python/examples/liquid_vapor/Makefile.in b/Cantera/python/examples/liquid_vapor/Makefile.in index ee59709a1..09aad18ee 100644 --- a/Cantera/python/examples/liquid_vapor/Makefile.in +++ b/Cantera/python/examples/liquid_vapor/Makefile.in @@ -1,10 +1,11 @@ #!/bin/sh +INST_DIR=@ct_demodir@/python/liquid_vapor + PY_DEMOS = critProperties rankine all: @(for py in $(PY_DEMOS) ; do \ - echo "running $${py}..."; \ (cd $${py} ; @MAKE@ ) \ done) @@ -16,13 +17,22 @@ run: test: @(for py in $(PY_DEMOS) ; do \ - echo "running $${py}..."; \ + echo "testing $${py}..."; \ (cd $${py} ; @MAKE@ test) \ done) +install: + @INSTALL@ -d $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r Makefile $(INST_DIR) + @(for py in $(PY_DEMOS) ; do \ + echo "installing $${py}..."; \ + (cd $${py} ; @MAKE@ install) \ + done) + + clean: @(for py in $(PY_DEMOS) ; do \ - echo "running $${py}..."; \ + echo "cleaning $${py}..."; \ (cd $${py} ; @MAKE@ clean) \ done) diff --git a/Cantera/python/examples/liquid_vapor/critProperties/Makefile.in b/Cantera/python/examples/liquid_vapor/critProperties/Makefile.in index 62df74fa6..586cb17c6 100644 --- a/Cantera/python/examples/liquid_vapor/critProperties/Makefile.in +++ b/Cantera/python/examples/liquid_vapor/critProperties/Makefile.in @@ -1,5 +1,7 @@ #!/bin/sh +INST_DIR=@ct_demodir@/python/liquid_vapor/critProperties + PYTHON_CMD = @PYTHON_CMD@ run: @@ -7,8 +9,16 @@ run: test: ./runtest + +install: + @INSTALL@ -d $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r critProperties.py $(INST_DIR) + @INSTALL@ -c runtest $(INST_DIR) + @INSTALL@ -c cleanup $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r output_blessed_0.txt $(INST_DIR) + + clean: - rm -f *.log *.csv *.xml ./cleanup # end of file diff --git a/Cantera/python/examples/liquid_vapor/rankine/Makefile.in b/Cantera/python/examples/liquid_vapor/rankine/Makefile.in index 5bfb6b1b4..099ec1e60 100644 --- a/Cantera/python/examples/liquid_vapor/rankine/Makefile.in +++ b/Cantera/python/examples/liquid_vapor/rankine/Makefile.in @@ -1,5 +1,8 @@ #!/bin/sh +INST_DIR=@ct_demodir@/python/liquid_vapor/rankine + + PYTHON_CMD = @PYTHON_CMD@ run: @@ -7,8 +10,16 @@ run: test: ./runtest + +install: + @INSTALL@ -d $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r rankine.py $(INST_DIR) + @INSTALL@ -c runtest $(INST_DIR) + @INSTALL@ -c cleanup $(INST_DIR) + @INSTALL@ -c -m ug+rw,o+r output_blessed_0.txt $(INST_DIR) + + clean: - rm -f *.log *.csv *.xml ./cleanup # end of file diff --git a/Cantera/python/examples/misc/.cvsignore b/Cantera/python/examples/misc/.cvsignore index 06f9a2eba..25474a3b0 100644 --- a/Cantera/python/examples/misc/.cvsignore +++ b/Cantera/python/examples/misc/.cvsignore @@ -9,3 +9,5 @@ h2o2.xml output_0.txt rp.txt rxnpath.log +transport_log.xml + diff --git a/Cantera/python/examples/transport/Makefile.in b/Cantera/python/examples/transport/Makefile.in index f938bfa22..37f9301a4 100644 --- a/Cantera/python/examples/transport/Makefile.in +++ b/Cantera/python/examples/transport/Makefile.in @@ -5,7 +5,7 @@ INST_DIR=@ct_demodir@/python/transport PYTHON_CMD = @PYTHON_CMD@ -all +all: $(PYTHON_CMD) dustygas.py run: @@ -22,8 +22,6 @@ install: @INSTALL@ -c cleanup $(INST_DIR) @INSTALL@ -c -m ug+rw,o+r output_blessed_0.txt $(INST_DIR) - - clean: ./cleanup