Added two more tests that exercise the surface solver capability.

This commit is contained in:
Harry Moffat 2007-08-23 21:51:22 +00:00
parent 60a93559af
commit e27e80a28c
14 changed files with 3610 additions and 0 deletions

View file

@ -0,0 +1,11 @@
Makefile
csvCode.txt
t2ctml.log
diff_test.txt
diff_test2.txt
output.txt
output2.txt
surfaceSolver
surfaceSolver2
ct2ctml.log

View file

@ -0,0 +1,138 @@
#!/bin/sh
############################################################################
#
# Makefile to compile and link a C++ application to
# Cantera.
#
#############################################################################
# addition to suffixes
.SUFFIXES : .d
# the name of the executable program to be created
PROG_NAME = surfaceSolver
# the object files to be linked together. List those generated from Fortran
# and from C/C++ separately
OBJS = surfaceSolver.o
# Location of the current build. Will assume that tests are run
# in the source directory tree location
src_dir_tree = 0
# additional flags to be passed to the linker. If your program
# requires other external libraries, put them here
LINK_OPTIONS = @EXTRA_LINK@
#############################################################################
# Check to see whether we are in the msvc++ environment
os_is_win = @OS_IS_WIN@
# Fortran libraries
FORT_LIBS = @FLIBS@
# the C++ compiler
CXX = @CXX@
# C++ compile flags
ifeq ($(src_dir_tree), 1)
CXX_FLAGS = -DSRCDIRTREE @CXXFLAGS@
else
CXX_FLAGS = @CXXFLAGS@
endif
# Ending C++ linking libraries
LCXX_END_LIBS = @LCXX_END_LIBS@
# the directory where the Cantera libraries are located
CANTERA_LIBDIR=@buildlib@
CANTERA_LIB_DEP=$(CANTERA_LIBDIR)/libctbase.a \
$(CANTERA_LIBDIR)/libcvode.a \
$(CANTERA_LIBDIR)/libctnumerics.a \
$(CANTERA_LIBDIR)/libthermo.a \
$(CANTERA_LIBDIR)/libtransport.a \
$(CANTERA_LIBDIR)/libkinetics.a \
$(CANTERA_LIBDIR)/libequil.a \
$(CANTERA_LIBDIR)/libzeroD.a \
$(CANTERA_LIBDIR)/liboneD.a
# required Cantera libraries
CANTERA_LIBS = @LOCAL_LIBS@ -lctcxx
# the directory where Cantera include files may be found.
ifeq ($(src_dir_tree), 1)
CANTERA_INCDIR=../../Cantera/src
else
CANTERA_INCDIR=@ctroot@/build/include/cantera
endif
# flags passed to the C++ compiler/linker for the linking step
LCXX_FLAGS = -L$(CANTERA_LIBDIR) @LOCAL_LIB_DIRS@ @CXXFLAGS@
# How to compile C++ source files to object files
.@CXX_EXT@.@OBJ_EXT@: Interface.h
$(CXX) -c $< -I$(CANTERA_INCDIR) @CXX_INCLUDES@ $(CXX_FLAGS)
# How to compile the dependency file
.cpp.d:
@CXX_DEPENDS@ -I$(CANTERA_INCDIR) $(CXX_FLAGS) $*.cpp > $*.d
# List of dependency files to be created
DEPENDS=$(OBJS:.o=.d) surfaceSolver2.d
# Program Name
PROGRAM = $(PROG_NAME)$(EXE_EXT)
# all rule makes a single program
all: $(PROGRAM) surfaceSolver2
# Rule to make the program
$(PROGRAM): $(OBJS) $(CANTERA_LIB_DEP)
$(CXX) -o $(PROGRAM) $(OBJS) $(LCXX_FLAGS) $(LINK_OPTIONS) \
$(CANTERA_LIBS) @LIBS@ $(FORT_LIBS) \
$(LCXX_END_LIBS)
surfaceSolver2: surfaceSolver2.o $(CANTERA_LIB_DEP)
$(CXX) -o surfaceSolver2 surfaceSolver2.o $(LCXX_FLAGS) $(LINK_OPTIONS) \
$(CANTERA_LIBS) @LIBS@ $(FORT_LIBS) \
$(LCXX_END_LIBS)
# Add an additional target for stability:
$(OBJS): $(CANTERA_LIBDIR)/libctbase.a $(CANTERA_LIBDIR)/libthermo.a
# depends target
depends:
$(RM) *.d .depends
@MAKE@ .depends
.depends: $(DEPENDS)
cat *.d > .depends
# Do the test -> For the windows vc++ environment, we have to skip checking on
# whether the program is uptodate, because we don't utilize make
# in that environment to build programs.
test:
ifeq ($(os_is_win), 1)
else
@ @MAKE@ -s $(PROGRAM)
endif
@ ./runtest
@ ./runtest2
# clean target -> clean up
clean:
$(RM) $(OBJS) $(PROGRAM) $(DEPENDS) .depends surfaceSolver2 *.o
../../bin/rm_cvsignore
(if test -d SunWS_cache ; then \
$(RM) -rf SunWS_cache ; \
fi )
ifeq ($(wildcard .depends), .depends)
include .depends
endif

View file

@ -0,0 +1,99 @@
#
# HACA Mechanism - very rough prototype
# Reference:
# (1) M. Frenklach, H. Wang,
# "Detailed Mechanism and Modeling of Soot Particle Formation"
# in Soot Formation in Combustion: Mechanisms and Models"
# J. Bockhorn Ed., Springer Verlag, Heidelberg (1994).
#
#
# HKM Notes -> The elements in the element arrays all have to be equal and
# in the same order. This is a limitation of cads.
units(length = 'cm', quantity = 'mol', act_energy = 'kcal/mol')
#------------- the gas -------------------------------------
ideal_gas(name = 'gas',
elements = 'O H C N Ar',
species = 'gri30: H N2 CH3 CH4 C2H2 H2 OH H2O CO O2',
initial_state = state(temperature = 1400.0,
pressure = OneAtm,
mole_fractions = 'H:0.01, N2:0.8899, H2:0.04, CH4:0.01 C2H2:0.01 \
OH:0.0001 H2O:0.04 O2:0.001'))
#------------- bulk soot -------------------------------------
# Taken from Bensen's book.
# However, entropy is negative; this is not correct.
# Group contribution approach needs to be modified. Bensen has a
# negative value for S here, because the group contribution is usually
# lumped in with other groups which have positive S contributions.
# However, for the current mechanism, bulk thermodynamics doesn't
# matter since all reactions involving bulk growth or etching
# are irreversible.
#
stoichiometric_solid(name = 'soot',
elements = 'O H C N Ar',
density = (3.52, 'g/cm3'),
species = 'CB-CB3')
species(name = 'CB-CB3',
atoms = 'C:1',
thermo = const_cp(t0 = (1000., 'K'),
h0 = (9.22, 'kcal/mol') ,
s0 = (-3.02, 'cal/mol/K'),
cp0 = (5.95, 'cal/mol/K') ))
#------------- the diamond surface -------------------------------------
#
# Site density taken from Frenklach/Wang p. 179.
#
ideal_interface(name = 'soot_interface',
elements = 'O H C N Ar ',
species = 'Csoot-* Csoot-H',
reactions = 'all',
phases = 'gas soot',
site_density = (3.8E-9, 'mol/cm2'),
initial_state = state(temperature= 1000.0,
coverages = 'Csoot-*:0.1, Csoot-H:0.9'))
# HKM -> Note, thermo from the following source:
# 'S. J. Harris and D. G. Goodwin, 'Growth on
# the reconstructed diamond (100) surface, 'J. Phys. Chem. vo. 97,
# 23-28 (1993). reactions a - t are taken directly from Table II,
# with thermochemistry from Table IV.
# -> Thermo needs to be reviewed, as deltaG for reactions are
# very important.
#
species(name = 'Csoot-*',
atoms = 'H:0 C:1',
thermo = const_cp(t0 = (1000., 'K'),
h0 = (51.7, 'kcal/mol'),
s0 = (19.5, 'cal/mol/K'),
cp0 = (8.41, 'cal/mol/K') ))
species(name = 'Csoot-H',
atoms = 'H:1 C:1',
thermo = const_cp(t0 = (1000., 'K'),
h0 = (11.4, 'kcal/mol'),
s0 = (21.0, 'cal/mol/K'),
cp0 = (8.41, 'cal/mol/K')) )
#
# Forward rate constant taken from Frenklach/Wang:
surface_reaction( 'Csoot-H + H => Csoot-* + H2', [4.17E13, 0.0, 13.0])
surface_reaction( 'Csoot-* + H2 => Csoot-H + H', [3.9E12, 0.0, 11.0])
surface_reaction( 'Csoot-H + OH => Csoot-* + H2O', [1.0E10, 0.734, 1.43])
surface_reaction( 'Csoot-* + H2O => Csoot-H + OH', [3.68E8, 1.139, 17.1])
surface_reaction( 'Csoot-* + H => Csoot-H', [2.0E13, 0.0, 0.0])
surface_reaction( 'Csoot-* + C2H2 => Csoot-H + H + 2 CB-CB3', [8.0E7, 1.56, 3.8])
surface_reaction( 'Csoot-* + O2 + 2 CB-CB3 => Csoot-* + 2 CO', [2.2E12, 0.00, 7.5])
#surface_reaction( 'OH + Csoot-H + CB-CB3 => Csoot-* + CO + H2', [3.01577E10, 0.5, 0.0])
surface_reaction( 'OH + Csoot-H + CB-CB3 => Csoot-* + CO + H2', stick(0.13, 0.0, 0.0))

View file

@ -0,0 +1,203 @@
<?xml version="1.0"?>
<ctml>
<validate reactions="yes" species="yes"/>
<!-- phase gas -->
<phase dim="3" id="gas">
<elementArray datasrc="elements.xml">O H C N Ar</elementArray>
<speciesArray datasrc="gri30.xml#species_data">H N2 CH3 CH4 C2H2 H2 OH H2O CO O2</speciesArray>
<state>
<temperature units="K">1400.0</temperature>
<pressure units="Pa">101325.0</pressure>
<moleFractions>H:0.01, N2:0.8899, H2:0.04, CH4:0.01 C2H2:0.01 OH:0.0001 H2O:0.04 O2:0.001</moleFractions>
</state>
<thermo model="IdealGas"/>
<kinetics model="GasKinetics"/>
<transport model="None"/>
</phase>
<!-- phase soot -->
<phase dim="3" id="soot">
<elementArray datasrc="elements.xml">O H C N Ar</elementArray>
<speciesArray datasrc="#species_data">CB-CB3</speciesArray>
<thermo model="StoichSubstance">
<density units="g/cm3">3.52</density>
</thermo>
<transport model="None"/>
<kinetics model="none"/>
</phase>
<!-- phase soot_interface -->
<phase dim="2" id="soot_interface">
<elementArray datasrc="elements.xml">O H C N Ar </elementArray>
<speciesArray datasrc="#species_data">Csoot-* Csoot-H</speciesArray>
<reactionArray datasrc="#reaction_data"/>
<state>
<temperature units="K">1000.0</temperature>
<coverages>Csoot-*:0.1, Csoot-H:0.9</coverages>
</state>
<thermo model="Surface">
<site_density units="mol/cm2">3.8000000000000001e-09</site_density>
</thermo>
<kinetics model="Interface"/>
<transport model="None"/>
<phaseArray>gas soot</phaseArray>
</phase>
<!-- species definitions -->
<speciesData id="species_data">
<!-- species CB-CB3 -->
<species name="CB-CB3">
<atomArray>C:1 </atomArray>
<thermo>
<const_cp Tmax="5000.0" Tmin="100.0">
<t0 units="K">1000.0</t0>
<h0 units="kcal/mol">9.2200000000000006</h0>
<s0 units="cal/mol/K">-3.02</s0>
<cp0 units="cal/mol/K">5.9500000000000002</cp0>
</const_cp>
</thermo>
</species>
<!-- species Csoot-* -->
<species name="Csoot-*">
<atomArray>H:0 C:1 </atomArray>
<thermo>
<const_cp Tmax="5000.0" Tmin="100.0">
<t0 units="K">1000.0</t0>
<h0 units="kcal/mol">51.700000000000003</h0>
<s0 units="cal/mol/K">19.5</s0>
<cp0 units="cal/mol/K">8.4100000000000001</cp0>
</const_cp>
</thermo>
</species>
<!-- species Csoot-H -->
<species name="Csoot-H">
<atomArray>H:1 C:1 </atomArray>
<thermo>
<const_cp Tmax="5000.0" Tmin="100.0">
<t0 units="K">1000.0</t0>
<h0 units="kcal/mol">11.4</h0>
<s0 units="cal/mol/K">21.0</s0>
<cp0 units="cal/mol/K">8.4100000000000001</cp0>
</const_cp>
</thermo>
</species>
</speciesData>
<reactionData id="reaction_data">
<!-- reaction 0001 -->
<reaction reversible="no" type="surface" id="0001">
<equation>Csoot-H + H =] Csoot-* + H2</equation>
<rateCoeff>
<Arrhenius>
<A>4.170000E+10</A>
<b>0.0</b>
<E units="kcal/mol">13.000000</E>
</Arrhenius>
</rateCoeff>
<reactants>Csoot-H:1.0 H:1</reactants>
<products>H2:1 Csoot-*:1.0</products>
</reaction>
<!-- reaction 0002 -->
<reaction reversible="no" type="surface" id="0002">
<equation>Csoot-* + H2 =] Csoot-H + H</equation>
<rateCoeff>
<Arrhenius>
<A>3.900000E+09</A>
<b>0.0</b>
<E units="kcal/mol">11.000000</E>
</Arrhenius>
</rateCoeff>
<reactants>H2:1 Csoot-*:1.0</reactants>
<products>Csoot-H:1.0 H:1</products>
</reaction>
<!-- reaction 0003 -->
<reaction reversible="no" type="surface" id="0003">
<equation>Csoot-H + OH =] Csoot-* + H2O</equation>
<rateCoeff>
<Arrhenius>
<A>1.000000E+07</A>
<b>0.73399999999999999</b>
<E units="kcal/mol">1.430000</E>
</Arrhenius>
</rateCoeff>
<reactants>Csoot-H:1.0 OH:1</reactants>
<products>Csoot-*:1.0 H2O:1</products>
</reaction>
<!-- reaction 0004 -->
<reaction reversible="no" type="surface" id="0004">
<equation>Csoot-* + H2O =] Csoot-H + OH</equation>
<rateCoeff>
<Arrhenius>
<A>3.680000E+05</A>
<b>1.139</b>
<E units="kcal/mol">17.100000</E>
</Arrhenius>
</rateCoeff>
<reactants>Csoot-*:1.0 H2O:1</reactants>
<products>Csoot-H:1.0 OH:1</products>
</reaction>
<!-- reaction 0005 -->
<reaction reversible="no" type="surface" id="0005">
<equation>Csoot-* + H =] Csoot-H</equation>
<rateCoeff>
<Arrhenius>
<A>2.000000E+10</A>
<b>0.0</b>
<E units="kcal/mol">0.000000</E>
</Arrhenius>
</rateCoeff>
<reactants>H:1 Csoot-*:1.0</reactants>
<products>Csoot-H:1.0</products>
</reaction>
<!-- reaction 0006 -->
<reaction reversible="no" type="surface" id="0006">
<equation>Csoot-* + C2H2 =] Csoot-H + H + 2 CB-CB3</equation>
<rateCoeff>
<Arrhenius>
<A>8.000000E+04</A>
<b>1.5600000000000001</b>
<E units="kcal/mol">3.800000</E>
</Arrhenius>
</rateCoeff>
<reactants>Csoot-*:1.0 C2H2:1</reactants>
<products>Csoot-H:1.0 H:1 CB-CB3:2.0</products>
</reaction>
<!-- reaction 0007 -->
<reaction reversible="no" type="surface" id="0007">
<equation>Csoot-* + O2 + 2 CB-CB3 =] Csoot-* + 2 CO</equation>
<rateCoeff>
<Arrhenius>
<A>2.200000E+09</A>
<b>0.0</b>
<E units="kcal/mol">7.500000</E>
</Arrhenius>
</rateCoeff>
<reactants>CB-CB3:2.0 Csoot-*:1.0 O2:1</reactants>
<products>Csoot-*:1.0 CO:2.0</products>
</reaction>
<!-- reaction 0008 -->
<reaction reversible="no" type="surface" id="0008">
<equation>OH + Csoot-H + CB-CB3 =] Csoot-* + CO + H2</equation>
<rateCoeff>
<Arrhenius type="stick" species="OH">
<A>1.300000E-01</A>
<b>0.0</b>
<E units="kcal/mol">0.000000</E>
</Arrhenius>
</rateCoeff>
<reactants>Csoot-H:1 CB-CB3:1 OH:1.0</reactants>
<products>H2:1 Csoot-*:1.0 CO:1</products>
</reaction>
</reactionData>
</ctml>

View file

@ -0,0 +1,34 @@
#!/bin/sh
#
#
temp_success="1"
/bin/rm -f output.txt diff_test.txt
tname="surfaceSolver"
#################################################################
#
#################################################################
CANTERA_DATA=${CANTERA_DATA:=../../data/inputs}; export CANTERA_DATA
CANTERA_BIN=${CANTERA_BIN:=../../bin}
./surfaceSolver haca2.xml > output.txt
retnStat=$?
if [ $retnStat != "0" ]
then
temp_success="0"
echo "surfaceSolver ($tname test) returned with bad status, $retnStat, check output"
fi
diff -w output.txt surfaceSolver_blessed.out > diff_test.txt
retnStat=$?
if [ $retnStat = "0" ]
then
echo "successful diff comparison on $tname test"
else
echo "unsuccessful diff comparison on $tname test"
echo "FAILED" > csvCode.txt
temp_success="0"
fi

View file

@ -0,0 +1,33 @@
#!/bin/sh
#
#
temp_success="1"
/bin/rm -f output2.txt diff_test2.txt
tname="surfaceSolver2"
#
#################################################################
#
#################################################################
CANTERA_DATA=${CANTERA_DATA:=../../data/inputs}; export CANTERA_DATA
CANTERA_BIN=${CANTERA_BIN:=../../bin}
./surfaceSolver2 haca2.xml > output2.txt
retnStat=$?
if [ $retnStat != "0" ]
then
temp_success="0"
echo "surfaceSolver ($tname test) returned with bad status, $retnStat, check output"
fi
diff -w output2.txt surfaceSolver2_blessed.out > diff_test2.txt
retnStat=$?
if [ $retnStat = "0" ]
then
echo "successful diff comparison on $tname test"
else
echo "unsuccessful diff comparison on $tname test"
echo "FAILED" > csvCode.txt
temp_success="0"
fi

View file

@ -0,0 +1,33 @@
#!/bin/sh
#
#
temp_success="1"
/bin/rm -f output2.txt diff_test2.txt
tname="surfaceSolver2"
#
#################################################################
#
#################################################################
CANTERA_DATA=${CANTERA_DATA:=../../data/inputs}; export CANTERA_DATA
CANTERA_BIN=${CANTERA_BIN:=../../bin}
./surfaceSolver2 -d 3 haca2.xml > output2.txt
retnStat=$?
if [ $retnStat != "0" ]
then
temp_success="0"
echo "surfaceSolver ($tname test) returned with bad status, $retnStat, check output"
fi
diff -w output2.txt surfaceSolver2_blessed3.out > diff_test2.txt
retnStat=$?
if [ $retnStat = "0" ]
then
echo "successful diff comparison on $tname d3 test"
else
echo "unsuccessful diff comparison on $tname d3 test"
echo "FAILED" > csvCode.txt
temp_success="0"
fi

View file

@ -0,0 +1,34 @@
#!/bin/sh
#
#
temp_success="1"
/bin/rm -f output.txt diff_test.txt
tname="surfaceSolver"
#################################################################
#
#################################################################
CANTERA_DATA=${CANTERA_DATA:=../../data/inputs}; export CANTERA_DATA
CANTERA_BIN=${CANTERA_BIN:=../../bin}
./surfaceSolver -d 3 haca2.xml > output.txt
retnStat=$?
if [ $retnStat != "0" ]
then
temp_success="0"
echo "surfaceSolver ($tname test) returned with bad status, $retnStat, check output"
fi
diff -w output.txt surfaceSolver_blessed3.out > diff_test.txt
retnStat=$?
if [ $retnStat = "0" ]
then
echo "successful diff comparison on $tname d3 test"
else
echo "unsuccessful diff comparison on $tname d3 test"
echo "FAILED" > csvCode.txt
temp_success="0"
fi

View file

@ -0,0 +1,415 @@
/**
* @file surfaceSolver.cpp
*
*/
/*
* Copywrite 2004 Sandia Corporation. Under the terms of Contract
* DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
* retains certain rights in this software.
* See file License.txt for licensing information.
*/
// Example
//
// Read a surface growth mechanism and calculate the solution
// using Placid.
//
#include <iostream>
#include <string>
#include <vector>
#define MSSIZE 200
using namespace std;
#ifdef DEBUG_HKM
int iDebug_HKM = 0;
#endif
/*****************************************************************/
/*****************************************************************/
/*****************************************************************/
static void printUsage()
{
}
#include "Cantera.h"
#include "Interface.h"
#include "kinetics.h"
#include "kernel/ImplicitSurfChem.h"
#include "kernel/solveSP.h"
using namespace Cantera;
void printGas(ThermoPhase *gasTP, InterfaceKinetics * iKin_ptr, double *src) {
double x[MSSIZE];
double C[MSSIZE];
string gasPhaseName = "gas";
gasTP->getMoleFractions(x);
gasTP->getConcentrations(C);
double Temp = gasTP->temperature();
double p = gasTP->pressure();
cout << "Gas Temperature = " << Temp << endl;
cout << "Gas Pressure = " << p << endl;
int kstart = iKin_ptr->kineticsSpeciesIndex(0, 0);
cout << "Gas Phase: " << gasPhaseName << " "
<< "(" << kstart << ")" << endl;
cout << " Name "
<< " Conc MoleF SrcRate " << endl;
cout << " "
<< " (kmol/m^3) (kmol/m^2/s) " << endl;
double sum = 0.0;
int nspGas = gasTP->nSpecies();
for (int k = 0; k < nspGas; k++) {
kstart = iKin_ptr->kineticsSpeciesIndex(k, 0);
printf("%4d %24s %14g %14g %14e\n",
k, gasTP->speciesName(k).c_str(),
C[k], x[k], src[kstart]);
sum += x[k];
}
cout << "Sum of gas mole fractions= " << sum << endl;
cout << endl;
}
void printBulk(ThermoPhase *bulkPhaseTP, InterfaceKinetics * iKin_ptr, double *src) {
double x[MSSIZE];
double C[MSSIZE];
string bulkParticlePhaseName = bulkPhaseTP->id();
bulkPhaseTP->getMoleFractions(x);
bulkPhaseTP->getConcentrations(C);
int kstart = iKin_ptr->kineticsSpeciesIndex(0, 1);
double dens = bulkPhaseTP->density();
cout << "Bulk Phase: " << bulkParticlePhaseName << " "
<< "(" << kstart << ")" << endl;
double Temp = bulkPhaseTP->temperature();
double p = bulkPhaseTP->pressure();
cout << "Bulk Temperature = " << Temp << endl;
cout << "Bulk Pressure = " << p << endl;
cout << " Name "
<< " Conc MoleF SrcRate " << endl;
cout << " "
<< " (kmol/m^3) (kmol/m^2/s) " << endl;
double sum = 0.0;
double Wsum = 0.0;
const array_fp& molecW = bulkPhaseTP->molecularWeights();
int nspBulk = bulkPhaseTP->nSpecies();
for (int k = 0; k < nspBulk; k++) {
kstart = iKin_ptr->kineticsSpeciesIndex(k, 1);
printf("%4d %24s %14g %14g %14e\n",
k, bulkPhaseTP->speciesName(k).c_str(),
C[k], x[k], src[kstart]);
sum += x[k];
Wsum += src[kstart] * molecW[k];
}
cout << "Bulk Weight Growth Rate = " << Wsum << " kg/m^2/s" << endl;
double gr = Wsum / dens;
cout << "Bulk Growth Rate = " << gr << " m/s" << endl;
cout << "Bulk Growth Rate = " << gr * 1.0E6 * 3600.
<< " microns / hour" << endl;
cout << "Density of bulk phase = " << dens << " kg / m^3 "<< endl;
cout << " = " << dens / 1.0E3
<<" gm / cm^3 " << endl;
cout << "Sum of bulk mole fractions= " << sum << endl;
cout << endl;
}
void printSurf(ThermoPhase *surfPhaseTP, InterfaceKinetics * iKin_ptr, double *src) {
double x[MSSIZE];
string surfParticlePhaseName = surfPhaseTP->id();
surfPhaseTP->getMoleFractions(x);
int kstart = iKin_ptr->kineticsSpeciesIndex(0, 2);
cout << "Surface Phase: " << surfParticlePhaseName
<< " (" << kstart << ")" << endl;
double Temp = surfPhaseTP->temperature();
double p = surfPhaseTP->pressure();
cout << "Surface Temperature = " << Temp << endl;
cout << "Surface Pressure = " << p << endl;
cout << " Name "
<< " Coverage SrcRate " << endl;
double sum = 0.0;
int nspSurf = surfPhaseTP->nSpecies();
for (int k = 0; k < nspSurf; k++) {
kstart = iKin_ptr->kineticsSpeciesIndex(0, 2);
printf("%4d %24s %14g %14e\n",
k, surfPhaseTP->speciesName(k).c_str(),
x[k], src[kstart]);
sum += x[k];
}
cout << "Sum of coverages = " << sum << endl;
}
int main(int argc, char** argv) {
string infile;
int ioflag = 1;
int i, k;
// look for command-line options
if (argc > 1) {
string tok;
for (int j = 1; j < argc; j++) {
tok = string(argv[j]);
if (tok[0] == '-') {
int nopt = static_cast<int>(tok.size());
for (int n = 1; n < nopt; n++) {
if (tok[n] == 'h') {
printUsage();
exit(0);
} else if (tok[n] == 'd') {
int lvl = 0;
if (j < (argc - 1)) {
string tokla = string(argv[j+1]);
if (strlen(tokla.c_str()) > 0) {
lvl = atoi(tokla.c_str());
n = nopt - 1;
j += 1;
ioflag = lvl;
}
}
} else {
printUsage();
exit(1);
}
}
} else if (infile == "") {
infile = tok;
}
else {
printUsage();
exit(1);
}
}
}
if (infile == "") {
infile = "diamond.cti";
}
try {
/*************************************************************/
/*
* FILL IN THESE NAMES FOR EACH PROBLEM
*/
/*
* ProblemNumber = 0 : diamond.cti
* = 1 : haca.cti
*/
int ProblemNumber = 1;
string gasPhaseName = "gas";
string bulkParticlePhaseName = "diamond";
string surfParticlePhaseName = "diamond_100";
if (ProblemNumber == 1) {
gasPhaseName = "gas";
bulkParticlePhaseName = "soot";
surfParticlePhaseName = "soot_interface";
}
/************************************************************/
XML_Node *xc = new XML_Node();
string path = findInputFile(infile);
ctml::get_CTML_Tree(xc, path);
XML_Node * const xg = (XML_Node *) findXMLPhase(xc, gasPhaseName);
if (!xg) {
printf("ERROR: Could not find gas phase named, %s, in file\n",
gasPhaseName.c_str());
exit(-1);
}
ThermoPhase *gasTP = newPhase(*xg);
int nspGas = gasTP->nSpecies();
cout << "Number of species = " << nspGas << endl;
XML_Node * const xd =
(XML_Node *) findXMLPhase(xc, bulkParticlePhaseName);
if (!xd) {
printf("ERROR: Could not find bulk phase named, %s, in file\n",
bulkParticlePhaseName.c_str());
exit(-1);
}
ThermoPhase *bulkPhaseTP = newPhase(*xd);
int nspBulk = bulkPhaseTP->nSpecies();
cout << "Number of species in bulk phase named " <<
bulkParticlePhaseName << " = " << nspBulk << endl;
XML_Node * const xs =
(XML_Node *) findXMLPhase(xc, surfParticlePhaseName);
if (!xs) {
printf("ERROR: Could not find surf Particle phase named, %s, in file\n",
surfParticlePhaseName.c_str());
exit(-1);
}
ThermoPhase *surfPhaseTP = newPhase(*xs);
int nsp_d100 = surfPhaseTP->nSpecies();
cout << "Number of species in surface phase, " << surfParticlePhaseName
<< " = " << nsp_d100 << endl;
vector<ThermoPhase *> phaseList;
phaseList.push_back(gasTP);
phaseList.push_back(bulkPhaseTP);
phaseList.push_back(surfPhaseTP);
InterfaceKinetics *iKin_ptr = new InterfaceKinetics();
importKinetics(*xs, phaseList, iKin_ptr);
int nr = iKin_ptr->nReactions();
cout << "Number of reactions = " << nr << endl;
double x[MSSIZE], p = OneAtm;
/*
* Set the Gas State:
* -> note that the states are set in the xml files too
*/
for (i = 0; i < MSSIZE; i++) x[i] = 0.0;
if (ProblemNumber == 0) {
x[0] = 0.0010;
x[1] = 0.9888;
x[2] = 0.0002;
x[3] = 0.0100;
p = 20.0*OneAtm/760.0;
gasTP->setState_TPX(1200., p, x);
}
/*
* Set the surface initial state
*/
for (i = 0; i < MSSIZE; i++) x[i] = 0.0;
if (ProblemNumber == 0) {
int i0 = surfPhaseTP->speciesIndex("c6H*");
if (i0 >= 0) {
x[i0] = 0.1;
}
int i1 = surfPhaseTP->speciesIndex("c6HH");
if (i1 >= 0) {
x[i1] = 0.9;
}
surfPhaseTP->setState_TX(1200., x);
}
/*
* Set the bulk Phase State
*/
for (i = 0; i < MSSIZE; i++) x[i] = 0.0;
if (ProblemNumber == 0) {
x[0] = 1.0;
bulkPhaseTP->setState_TPX(1200., p, x);
}
iKin_ptr->setIOFlag(ioflag);
/*
* Solve the Equation system
*/
//iKin_ptr->advanceCoverages(100.);
iKin_ptr->solvePseudoSteadyStateProblem();
/*
* Download the source terms for the rate equations
*/
double src[MSSIZE];
iKin_ptr->getNetProductionRates(src);
double sum = 0.0;
if (ProblemNumber == 0) {
double naH;
for (k = 0; k < 13; k++) {
if (k < 4) {
naH = gasTP->nAtoms(k, 0);
} else if (k == 4) {
naH = 0;
} else if (k > 4) {
int itp = k - 5;
naH = surfPhaseTP->nAtoms(itp, 0);
}
cout << k << " " << naH << " " ;
if (fabs(src[k]) < 2.0E-17) {
cout << " nil" << endl;
} else {
cout << src[k] << endl;
}
sum += naH * src[k];
}
cout << "sum = " << sum << endl;
}
printGas(gasTP, iKin_ptr, src);
printBulk(bulkPhaseTP, iKin_ptr, src);
printSurf(surfPhaseTP, iKin_ptr, src) ;
/*****************************************************************************/
/* Now Tweak the inputs and do a quick calculation */
/****************************************************************************/
/*
* Set the Gas State:
* -> note that the states are set in the xml files too
*/
double pres = gasTP->pressure();
gasTP->getMoleFractions(x);
double tmp = 0.3 * x[0];
double tmp2 = 0.3 * x[1];
if (tmp2 < tmp) tmp = tmp2;
x[0] += tmp;
x[1] -= tmp;
gasTP->setState_PX(pres, x);
iKin_ptr->solvePseudoSteadyStateProblem();
iKin_ptr->getNetProductionRates(src);
printGas(gasTP, iKin_ptr, src);
printBulk(bulkPhaseTP, iKin_ptr, src);
printSurf(surfPhaseTP, iKin_ptr, src) ;
/*****************************************************************************/
/* Now Tweak the inputs and do a quick calculation */
/****************************************************************************/
/*
* Set the Gas State:
* -> note that the states are set in the xml files too
*/
/*
* Set the Gas State:
* -> note that the states are set in the xml files too
*/
pres = gasTP->pressure();
double temp = gasTP->temperature();
temp += 95;
gasTP->setState_TP(temp, pres);
iKin_ptr->solvePseudoSteadyStateProblem();
iKin_ptr->getNetProductionRates(src);
printGas(gasTP, iKin_ptr, src);
printBulk(bulkPhaseTP, iKin_ptr, src);
printSurf(surfPhaseTP, iKin_ptr, src) ;
/*****************************************************************************/
/* Now Don't Tweak the inputs at all */
/****************************************************************************/
gasTP->setState_TP(temp, pres);
iKin_ptr->solvePseudoSteadyStateProblem();
iKin_ptr->getNetProductionRates(src);
printGas(gasTP, iKin_ptr, src);
printBulk(bulkPhaseTP, iKin_ptr, src);
printSurf(surfPhaseTP, iKin_ptr, src) ;
delete iKin_ptr;
delete gasTP; gasTP = 0;
delete bulkPhaseTP; bulkPhaseTP = 0;
delete surfPhaseTP; surfPhaseTP = 0;
delete xc;
appdelete();
}
catch (CanteraError) {
showErrors(cout);
}
return 0;
}
/***********************************************************/

View file

@ -0,0 +1,462 @@
/**
* @file surfaceSolver2.cpp
*
*/
/*
* Copywrite 2004 Sandia Corporation. Under the terms of Contract
* DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
* retains certain rights in this software.
* See file License.txt for licensing information.
*/
// Example
//
// Read a surface growth mechanism and calculate the solution
// using Placid.
//
#include <iostream>
#include <string>
#include <vector>
#define MSSIZE 200
using namespace std;
#ifdef DEBUG_HKM
int iDebug_HKM = 0;
#endif
/*****************************************************************/
/*****************************************************************/
/*****************************************************************/
static void printUsage()
{
}
#include "Cantera.h"
#include "Interface.h"
#include "kinetics.h"
#include "kernel/ImplicitSurfChem.h"
#include "kernel/solveSP.h"
using namespace Cantera;
void printGas(ThermoPhase *gasTP, InterfaceKinetics * iKin_ptr, double *src) {
double x[MSSIZE];
double C[MSSIZE];
string gasPhaseName = "gas";
gasTP->getMoleFractions(x);
gasTP->getConcentrations(C);
double Temp = gasTP->temperature();
double p = gasTP->pressure();
cout << "Gas Temperature = " << Temp << endl;
cout << "Gas Pressure = " << p << endl;
int kstart = iKin_ptr->kineticsSpeciesIndex(0, 0);
cout << "Gas Phase: " << gasPhaseName << " "
<< "(" << kstart << ")" << endl;
cout << " Name "
<< " Conc MoleF SrcRate " << endl;
cout << " "
<< " (kmol/m^3) (kmol/m^2/s) " << endl;
double sum = 0.0;
int nspGas = gasTP->nSpecies();
for (int k = 0; k < nspGas; k++) {
kstart = iKin_ptr->kineticsSpeciesIndex(k, 0);
printf("%4d %24s %14g %14g %14e\n",
k, gasTP->speciesName(k).c_str(),
C[k], x[k], src[kstart]);
sum += x[k];
}
cout << "Sum of gas mole fractions= " << sum << endl;
cout << endl;
}
void printBulk(ThermoPhase *bulkPhaseTP, InterfaceKinetics * iKin_ptr, double *src) {
double x[MSSIZE];
double C[MSSIZE];
string bulkParticlePhaseName = bulkPhaseTP->id();
bulkPhaseTP->getMoleFractions(x);
bulkPhaseTP->getConcentrations(C);
int kstart = iKin_ptr->kineticsSpeciesIndex(0, 1);
double dens = bulkPhaseTP->density();
cout << "Bulk Phase: " << bulkParticlePhaseName << " "
<< "(" << kstart << ")" << endl;
double Temp = bulkPhaseTP->temperature();
double p = bulkPhaseTP->pressure();
cout << "Bulk Temperature = " << Temp << endl;
cout << "Bulk Pressure = " << p << endl;
cout << " Name "
<< " Conc MoleF SrcRate " << endl;
cout << " "
<< " (kmol/m^3) (kmol/m^2/s) " << endl;
double sum = 0.0;
double Wsum = 0.0;
const array_fp& molecW = bulkPhaseTP->molecularWeights();
int nspBulk = bulkPhaseTP->nSpecies();
for (int k = 0; k < nspBulk; k++) {
kstart = iKin_ptr->kineticsSpeciesIndex(k, 1);
printf("%4d %24s %14g %14g %14e\n",
k, bulkPhaseTP->speciesName(k).c_str(),
C[k], x[k], src[kstart]);
sum += x[k];
Wsum += src[kstart] * molecW[k];
}
cout << "Bulk Weight Growth Rate = " << Wsum << " kg/m^2/s" << endl;
double gr = Wsum / dens;
cout << "Bulk Growth Rate = " << gr << " m/s" << endl;
cout << "Bulk Growth Rate = " << gr * 1.0E6 * 3600.
<< " microns / hour" << endl;
cout << "Density of bulk phase = " << dens << " kg / m^3 "<< endl;
cout << " = " << dens / 1.0E3
<<" gm / cm^3 " << endl;
cout << "Sum of bulk mole fractions= " << sum << endl;
cout << endl;
}
void printSurf(ThermoPhase *surfPhaseTP, InterfaceKinetics * iKin_ptr, double *src) {
double x[MSSIZE];
string surfParticlePhaseName = surfPhaseTP->id();
surfPhaseTP->getMoleFractions(x);
int kstart = iKin_ptr->kineticsSpeciesIndex(0, 2);
cout << "Surface Phase: " << surfParticlePhaseName
<< " (" << kstart << ")" << endl;
double Temp = surfPhaseTP->temperature();
double p = surfPhaseTP->pressure();
cout << "Surface Temperature = " << Temp << endl;
cout << "Surface Pressure = " << p << endl;
cout << " Name "
<< " Coverage SrcRate " << endl;
double sum = 0.0;
int nspSurf = surfPhaseTP->nSpecies();
for (int k = 0; k < nspSurf; k++) {
kstart = iKin_ptr->kineticsSpeciesIndex(0, 2);
printf("%4d %24s %14g %14e\n",
k, surfPhaseTP->speciesName(k).c_str(),
x[k], src[kstart]);
sum += x[k];
}
cout << "Sum of coverages = " << sum << endl;
}
int main(int argc, char** argv) {
string infile;
int i, k;
int ioflag = 1;
// look for command-line options
if (argc > 1) {
string tok;
for (int j = 1; j < argc; j++) {
tok = string(argv[j]);
if (tok[0] == '-') {
int nopt = static_cast<int>(tok.size());
for (int n = 1; n < nopt; n++) {
if (tok[n] == 'h') {
printUsage();
exit(0);
} else if (tok[n] == 'd') {
int lvl = 0;
if (j < (argc - 1)) {
string tokla = string(argv[j+1]);
if (strlen(tokla.c_str()) > 0) {
lvl = atoi(tokla.c_str());
n = nopt - 1;
j += 1;
ioflag = lvl;
}
}
} else {
printUsage();
exit(1);
}
}
} else if (infile == "") {
infile = tok;
}
else {
printUsage();
exit(1);
}
}
}
if (infile == "") {
infile = "diamond.cti";
}
try {
/*************************************************************/
/*
* FILL IN THESE NAMES FOR EACH PROBLEM
*/
/*
* ProblemNumber = 0 : diamond.cti
* = 1 : haca.cti
*/
int ProblemNumber = 1;
string gasPhaseName = "gas";
string bulkParticlePhaseName = "diamond";
string surfParticlePhaseName = "diamond_100";
if (ProblemNumber == 1) {
gasPhaseName = "gas";
bulkParticlePhaseName = "soot";
surfParticlePhaseName = "soot_interface";
}
/************************************************************/
XML_Node *xc = new XML_Node();
string path = findInputFile(infile);
ctml::get_CTML_Tree(xc, path);
XML_Node * const xg = (XML_Node *) findXMLPhase(xc, gasPhaseName);
if (!xg) {
printf("ERROR: Could not find gas phase named, %s, in file\n",
gasPhaseName.c_str());
exit(-1);
}
ThermoPhase *gasTP = newPhase(*xg);
int nspGas = gasTP->nSpecies();
cout << "Number of species = " << nspGas << endl;
XML_Node * const xd =
(XML_Node *) findXMLPhase(xc, bulkParticlePhaseName);
if (!xd) {
printf("ERROR: Could not find bulk phase named, %s, in file\n",
bulkParticlePhaseName.c_str());
exit(-1);
}
ThermoPhase *bulkPhaseTP = newPhase(*xd);
int nspBulk = bulkPhaseTP->nSpecies();
cout << "Number of species in bulk phase named " <<
bulkParticlePhaseName << " = " << nspBulk << endl;
XML_Node * const xs =
(XML_Node *) findXMLPhase(xc, surfParticlePhaseName);
if (!xs) {
printf("ERROR: Could not find surf Particle phase named,"
"%s, in file\n",
surfParticlePhaseName.c_str());
exit(-1);
}
ThermoPhase *surfPhaseTP = newPhase(*xs);
int nsp_d100 = surfPhaseTP->nSpecies();
cout << "Number of species in surface phase, " << surfParticlePhaseName
<< " = " << nsp_d100 << endl;
vector<ThermoPhase *> phaseList;
phaseList.push_back(gasTP);
phaseList.push_back(bulkPhaseTP);
phaseList.push_back(surfPhaseTP);
InterfaceKinetics *iKin_ptr = new InterfaceKinetics();
importKinetics(*xs, phaseList, iKin_ptr);
int nr = iKin_ptr->nReactions();
cout << "Number of reactions = " << nr << endl;
// create a second copy of the same surface phase
// (this is a made up problem btw to check the software capability)
ThermoPhase *surfPhaseTP2 = newPhase(*xs);
int nsp2 = surfPhaseTP2->nSpecies();
string pname = surfPhaseTP2->id();
cout << "Number of species in 2nd surface phase, " << pname
<< " = " << nsp2 << endl;
vector<ThermoPhase *> phaseList2;
phaseList2.push_back(gasTP);
phaseList2.push_back(bulkPhaseTP);
phaseList2.push_back(surfPhaseTP2);
// create the second InterfaceKinetics object based on the
// second surface phase.
InterfaceKinetics *iKin2_ptr = new InterfaceKinetics();
importKinetics(*xs, phaseList2, iKin2_ptr);
nr = iKin_ptr->nReactions();
cout << "Number of reactions = " << nr << endl;
double x[MSSIZE], p = OneAtm;
/*
* Set the Gas State:
* -> note that the states are set in the xml files too
*/
for (i = 0; i < MSSIZE; i++) x[i] = 0.0;
if (ProblemNumber == 0) {
x[0] = 0.0010;
x[1] = 0.9888;
x[2] = 0.0002;
x[3] = 0.0100;
p = 20.0*OneAtm/760.0;
gasTP->setState_TPX(1200., p, x);
}
/*
* Set the surface initial state
* other problem numbers take their initial state from the xml files.
*/
for (i = 0; i < MSSIZE; i++) x[i] = 0.0;
if (ProblemNumber == 0) {
int i0 = surfPhaseTP->speciesIndex("c6H*");
if (i0 >= 0) {
x[i0] = 0.1;
}
int i1 = surfPhaseTP->speciesIndex("c6HH");
if (i1 >= 0) {
x[i1] = 0.9;
}
surfPhaseTP->setState_TX(1200., x);
}
/*
* Set the bulk Phase State
*/
for (i = 0; i < MSSIZE; i++) x[i] = 0.0;
if (ProblemNumber == 0) {
x[0] = 1.0;
bulkPhaseTP->setState_TPX(1200., p, x);
}
/*
* Set-up the Surface Problem
* This problem will consist of 2 identical InterfaceKinetics objects
*/
vector<InterfaceKinetics*> vecKinPtrs;
vecKinPtrs.push_back(iKin_ptr);
vecKinPtrs.push_back(iKin2_ptr);
// Create the ImplicitSurfChem problem
// Initialize it and call the pseudo steadystate capability.
ImplicitSurfChem *surfaceProb = new ImplicitSurfChem(vecKinPtrs);
surfaceProb->initialize();
surfaceProb->setIOFlag(ioflag);
surfaceProb->solvePseudoSteadyStateProblem();
/*
* Download the source terms for the rate equations
*/
double src[MSSIZE];
double src2[MSSIZE];
iKin_ptr->getNetProductionRates(src);
iKin2_ptr->getNetProductionRates(src2);
double sum = 0.0;
if (ProblemNumber == 0) {
double naH;
for (k = 0; k < 13; k++) {
if (k < 4) {
naH = gasTP->nAtoms(k, 0);
} else if (k == 4) {
naH = 0;
} else if (k > 4) {
int itp = k - 5;
naH = surfPhaseTP->nAtoms(itp, 0);
}
cout << k << " " << naH << " " ;
if (fabs(src[k]) < 2.0E-17) {
cout << " nil" << endl;
} else {
cout << src[k] << endl;
}
sum += naH * src[k];
}
cout << "sum = " << sum << endl;
}
printGas(gasTP, iKin_ptr, src);
printBulk(bulkPhaseTP, iKin_ptr, src);
printSurf(surfPhaseTP, iKin_ptr, src) ;
printSurf(surfPhaseTP2, iKin2_ptr, src2) ;
/*****************************************************************************/
/* Now Tweak the inputs and do a quick calculation */
/****************************************************************************/
/*
* Set the Gas State:
* -> note that the states are set in the xml files too
*/
double pres = gasTP->pressure();
gasTP->getMoleFractions(x);
double tmp = 0.3 * x[0];
double tmp2 = 0.3 * x[1];
if (tmp2 < tmp) tmp = tmp2;
x[0] += tmp;
x[1] -= tmp;
gasTP->setState_PX(pres, x);
surfaceProb->solvePseudoSteadyStateProblem();
iKin_ptr->getNetProductionRates(src);
iKin2_ptr->getNetProductionRates(src2);
printGas(gasTP, iKin_ptr, src);
printBulk(bulkPhaseTP, iKin_ptr, src);
printSurf(surfPhaseTP, iKin_ptr, src) ;
printSurf(surfPhaseTP2, iKin2_ptr, src2) ;
/*****************************************************************************/
/* Now Tweak the inputs and do a quick calculation */
/****************************************************************************/
/*
* Set the Gas State:
* -> note that the states are set in the xml files too
*/
/*
* Set the Gas State:
* -> note that the states are set in the xml files too
*/
pres = gasTP->pressure();
double temp = gasTP->temperature();
temp += 95;
gasTP->setState_TP(temp, pres);
surfaceProb->solvePseudoSteadyStateProblem();
iKin_ptr->getNetProductionRates(src);
iKin2_ptr->getNetProductionRates(src2);
printGas(gasTP, iKin_ptr, src);
printBulk(bulkPhaseTP, iKin_ptr, src);
printSurf(surfPhaseTP, iKin_ptr, src) ;
printSurf(surfPhaseTP2, iKin2_ptr, src2) ;
/*****************************************************************************/
/* Now Don't Tweak the inputs at all */
/****************************************************************************/
gasTP->setState_TP(temp, pres);
surfaceProb->solvePseudoSteadyStateProblem();
iKin_ptr->getNetProductionRates(src);
iKin2_ptr->getNetProductionRates(src2);
printGas(gasTP, iKin_ptr, src);
printBulk(bulkPhaseTP, iKin_ptr, src);
printSurf(surfPhaseTP, iKin_ptr, src) ;
printSurf(surfPhaseTP2, iKin2_ptr, src2) ;
delete surfaceProb; surfaceProb = 0;
delete iKin_ptr; iKin_ptr = 0;
delete iKin2_ptr; iKin2_ptr = 0;
delete gasTP; gasTP = 0;
delete bulkPhaseTP; bulkPhaseTP = 0;
delete surfPhaseTP; surfPhaseTP = 0;
delete surfPhaseTP2; surfPhaseTP2 = 0;
delete xc;
appdelete();
}
catch (CanteraError) {
showErrors(cout);
}
return 0;
}
/***********************************************************/

View file

@ -0,0 +1,246 @@
Number of species = 10
Number of species in bulk phase named soot = 1
Number of species in surface phase, soot_interface = 2
Number of reactions = 8
Number of species in 2nd surface phase, soot_interface = 2
Number of reactions = 8
================================ SOLVESP CALL SETUP ========================================
SOLVESP Called with Initialization turned on
Time scale input = 1.000e+00
Bulk Phases have fixed compositions
Damping is ON
Reltol = 1.000e-06, Abstol = 1.000e-20
Iter Time Del_t Damp DelX Resid Name-Time Name-Damp
-----------------------------------------------------------------------------------
1 6.3033e-07 6.3033e-07 3.1954e+05 2.9368e+05 Csoot-*
2 1.7900e-06 1.1597e-06 1.8053e+05 1.3190e+05 Csoot-*
3 4.8454e-06 3.0554e-06 6.8484e+04 4.0505e+04 Csoot-*
4 2.6364e-05 2.1519e-05 1.1250e+04 5.8320e+03 Csoot-*
5 1.3012e-03 1.2749e-03 1.4427e+03 7.3573e+02 Csoot-*
6 4.7372e+00 4.7359e+00 5.8161e-01 2.9647e-01 Csoot-*
7 6.1771e-08 3.1736e-08
FIN 7 6.1771e-08 2.1591e-11 -- success
Gas Temperature = 1400
Gas Pressure = 101325
Gas Phase: gas (0)
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 H 8.69601e-05 0.00999001 -2.365628e-03
1 N2 0.00773858 0.889011 0.000000e+00
2 CH3 0 0 0.000000e+00
3 CH4 8.69601e-05 0.00999001 0.000000e+00
4 C2H2 8.69601e-05 0.00999001 -1.007796e-04
5 H2 0.00034784 0.03996 1.282503e-03
6 OH 8.69601e-07 9.99001e-05 -7.542496e-05
7 H2O 0.00034784 0.03996 3.880305e-05
8 CO 0 0 3.843405e-05
9 O2 8.69601e-06 0.000999001 -9.060705e-07
Sum of gas mole fractions= 1
Bulk Phase: soot (10)
Bulk Temperature = 1400
Bulk Pressure = 101325
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 CB-CB3 293.065 1 1.631252e-04
Bulk Weight Growth Rate = 0.0019593 kg/m^2/s
Bulk Growth Rate = 5.56619e-07 m/s
Bulk Growth Rate = 2003.83 microns / hour
Density of bulk phase = 3520 kg / m^3
= 3.52 gm / cm^3
Sum of bulk mole fractions= 1
Surface Phase: soot_interface (11)
Surface Temperature = 1400
Surface Pressure = 101325
Name Coverage SrcRate
0 Csoot-* 0.0184677 -8.195044e-20
1 Csoot-H 0.981532 -8.195044e-20
Sum of coverages = 1
Surface Phase: soot_interface (11)
Surface Temperature = 1400
Surface Pressure = 101325
Name Coverage SrcRate
0 Csoot-* 0.0184677 -8.195044e-20
1 Csoot-H 0.981532 -8.195044e-20
Sum of coverages = 1
================================ SOLVESP CALL SETUP ========================================
SOLVESP Called to calculate steady state residual
from a good initial guess
Bulk Phases have fixed compositions
Damping is ON
Reltol = 1.000e-06, Abstol = 1.000e-20
Iter Time Del_t Damp DelX Resid Name-Time Name-Damp
-----------------------------------------------------------------------------------
1 5.3218e+03 2.7005e+03
2 8.9325e-06 4.0777e-06
FIN 2 8.9325e-06 6.2499e-12 -- success
Gas Temperature = 1400
Gas Pressure = 101325
Gas Phase: gas (0)
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 H 0.000113048 0.012987 -3.121840e-03
1 N2 0.00771249 0.886014 0.000000e+00
2 CH3 0 0 0.000000e+00
3 CH4 8.69601e-05 0.00999001 0.000000e+00
4 C2H2 8.69601e-05 0.00999001 -1.015380e-04
5 H2 0.00034784 0.03996 1.661370e-03
6 OH 8.69601e-07 9.99001e-05 -7.540863e-05
7 H2O 0.00034784 0.03996 3.879190e-05
8 CO 0 0 3.844250e-05
9 O2 8.69601e-06 0.000999001 -9.128886e-07
Sum of gas mole fractions= 1
Bulk Phase: soot (10)
Bulk Temperature = 1400
Bulk Pressure = 101325
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 CB-CB3 293.065 1 1.646335e-04
Bulk Weight Growth Rate = 0.00197741 kg/m^2/s
Bulk Growth Rate = 5.61765e-07 m/s
Bulk Growth Rate = 2022.35 microns / hour
Density of bulk phase = 3520 kg / m^3
= 3.52 gm / cm^3
Sum of bulk mole fractions= 1
Surface Phase: soot_interface (11)
Surface Temperature = 1400
Surface Pressure = 101325
Name Coverage SrcRate
0 Csoot-* 0.0186067 -3.028143e-20
1 Csoot-H 0.981393 -3.028143e-20
Sum of coverages = 1
Surface Phase: soot_interface (11)
Surface Temperature = 1400
Surface Pressure = 101325
Name Coverage SrcRate
0 Csoot-* 0.0186067 -3.028143e-20
1 Csoot-H 0.981393 -3.028143e-20
Sum of coverages = 1
================================ SOLVESP CALL SETUP ========================================
SOLVESP Called to calculate steady state residual
from a good initial guess
Bulk Phases have fixed compositions
Damping is ON
Reltol = 1.000e-06, Abstol = 1.000e-20
Iter Time Del_t Damp DelX Resid Name-Time Name-Damp
-----------------------------------------------------------------------------------
1 2.1569e+05 9.5571e+04
2 1.7622e-04 2.0108e-04
FIN 2 1.7622e-04 2.0335e-10 -- success
Gas Temperature = 1495
Gas Pressure = 101325
Gas Phase: gas (0)
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 H 0.000105864 0.012987 -3.833498e-03
1 N2 0.0072224 0.886014 0.000000e+00
2 CH3 0 0 0.000000e+00
3 CH4 8.14342e-05 0.00999001 0.000000e+00
4 C2H2 8.14342e-05 0.00999001 -1.499311e-04
5 H2 0.000325737 0.03996 2.065063e-03
6 OH 8.14342e-07 9.99001e-05 -7.369195e-05
7 H2O 0.000325737 0.03996 3.846262e-05
8 CO 0 0 3.787743e-05
9 O2 8.14342e-06 0.000999001 -1.324046e-06
Sum of gas mole fractions= 1
Bulk Phase: soot (10)
Bulk Temperature = 1495
Bulk Pressure = 101325
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 CB-CB3 293.065 1 2.619849e-04
Bulk Weight Growth Rate = 0.0031467 kg/m^2/s
Bulk Growth Rate = 8.93949e-07 m/s
Bulk Growth Rate = 3218.22 microns / hour
Density of bulk phase = 3520 kg / m^3
= 3.52 gm / cm^3
Sum of bulk mole fractions= 1
Surface Phase: soot_interface (11)
Surface Temperature = 1495
Surface Pressure = 101325
Name Coverage SrcRate
0 Csoot-* 0.0242812 -8.654559e-19
1 Csoot-H 0.975719 -8.654559e-19
Sum of coverages = 1
Surface Phase: soot_interface (11)
Surface Temperature = 1495
Surface Pressure = 101325
Name Coverage SrcRate
0 Csoot-* 0.0242812 -8.654559e-19
1 Csoot-H 0.975719 -8.654559e-19
Sum of coverages = 1
================================ SOLVESP CALL SETUP ========================================
SOLVESP Called to calculate steady state residual
from a good initial guess
Bulk Phases have fixed compositions
Damping is ON
Reltol = 1.000e-06, Abstol = 1.000e-20
Iter Time Del_t Damp DelX Resid Name-Time Name-Damp
-----------------------------------------------------------------------------------
1 2.8875e-10 1.4792e-10
FIN 1 2.8875e-10 1.2324e-10 -- success
Gas Temperature = 1495
Gas Pressure = 101325
Gas Phase: gas (0)
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 H 0.000105864 0.012987 -3.833498e-03
1 N2 0.0072224 0.886014 0.000000e+00
2 CH3 0 0 0.000000e+00
3 CH4 8.14342e-05 0.00999001 0.000000e+00
4 C2H2 8.14342e-05 0.00999001 -1.499311e-04
5 H2 0.000325737 0.03996 2.065063e-03
6 OH 8.14342e-07 9.99001e-05 -7.369195e-05
7 H2O 0.000325737 0.03996 3.846262e-05
8 CO 0 0 3.787743e-05
9 O2 8.14342e-06 0.000999001 -1.324046e-06
Sum of gas mole fractions= 1
Bulk Phase: soot (10)
Bulk Temperature = 1495
Bulk Pressure = 101325
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 CB-CB3 293.065 1 2.619849e-04
Bulk Weight Growth Rate = 0.0031467 kg/m^2/s
Bulk Growth Rate = 8.93949e-07 m/s
Bulk Growth Rate = 3218.22 microns / hour
Density of bulk phase = 3520 kg / m^3
= 3.52 gm / cm^3
Sum of bulk mole fractions= 1
Surface Phase: soot_interface (11)
Surface Temperature = 1495
Surface Pressure = 101325
Name Coverage SrcRate
0 Csoot-* 0.0242812 2.964615e-20
1 Csoot-H 0.975719 2.964615e-20
Sum of coverages = 1
Surface Phase: soot_interface (11)
Surface Temperature = 1495
Surface Pressure = 101325
Name Coverage SrcRate
0 Csoot-* 0.0242812 2.964615e-20
1 Csoot-H 0.975719 2.964615e-20
Sum of coverages = 1

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,216 @@
Number of species = 10
Number of species in bulk phase named soot = 1
Number of species in surface phase, soot_interface = 2
Number of reactions = 8
================================ SOLVESP CALL SETUP ========================================
SOLVESP Called with Initialization turned on
Time scale input = 1.000e+00
Bulk Phases have fixed compositions
Damping is ON
Reltol = 1.000e-06, Abstol = 1.000e-20
Iter Time Del_t Damp DelX Resid Name-Time Name-Damp
-----------------------------------------------------------------------------------
1 6.3033e-07 6.3033e-07 3.1954e+05 2.9368e+05 Csoot-*
2 1.7900e-06 1.1597e-06 1.8053e+05 1.3190e+05 Csoot-*
3 4.8454e-06 3.0554e-06 6.8484e+04 4.0505e+04 Csoot-*
4 2.6364e-05 2.1519e-05 1.1250e+04 5.8320e+03 Csoot-*
5 1.3012e-03 1.2749e-03 1.4427e+03 7.3573e+02 Csoot-*
6 4.7372e+00 4.7359e+00 5.8161e-01 2.9647e-01 Csoot-*
7 6.1771e-08 3.1736e-08
FIN 7 6.1771e-08 2.1591e-11 -- success
Gas Temperature = 1400
Gas Pressure = 101325
Gas Phase: gas (0)
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 H 8.69601e-05 0.00999001 -2.365628e-03
1 N2 0.00773858 0.889011 0.000000e+00
2 CH3 0 0 0.000000e+00
3 CH4 8.69601e-05 0.00999001 0.000000e+00
4 C2H2 8.69601e-05 0.00999001 -1.007796e-04
5 H2 0.00034784 0.03996 1.282503e-03
6 OH 8.69601e-07 9.99001e-05 -7.542496e-05
7 H2O 0.00034784 0.03996 3.880305e-05
8 CO 0 0 3.843405e-05
9 O2 8.69601e-06 0.000999001 -9.060705e-07
Sum of gas mole fractions= 1
Bulk Phase: soot (10)
Bulk Temperature = 1400
Bulk Pressure = 101325
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 CB-CB3 293.065 1 1.631252e-04
Bulk Weight Growth Rate = 0.0019593 kg/m^2/s
Bulk Growth Rate = 5.56619e-07 m/s
Bulk Growth Rate = 2003.83 microns / hour
Density of bulk phase = 3520 kg / m^3
= 3.52 gm / cm^3
Sum of bulk mole fractions= 1
Surface Phase: soot_interface (11)
Surface Temperature = 1400
Surface Pressure = 101325
Name Coverage SrcRate
0 Csoot-* 0.0184677 -8.195044e-20
1 Csoot-H 0.981532 -8.195044e-20
Sum of coverages = 1
================================ SOLVESP CALL SETUP ========================================
SOLVESP Called to calculate steady state residual
from a good initial guess
Bulk Phases have fixed compositions
Damping is ON
Reltol = 1.000e-06, Abstol = 1.000e-20
Iter Time Del_t Damp DelX Resid Name-Time Name-Damp
-----------------------------------------------------------------------------------
1 5.3218e+03 2.7005e+03
2 8.9325e-06 4.0777e-06
FIN 2 8.9325e-06 6.2499e-12 -- success
Gas Temperature = 1400
Gas Pressure = 101325
Gas Phase: gas (0)
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 H 0.000113048 0.012987 -3.121840e-03
1 N2 0.00771249 0.886014 0.000000e+00
2 CH3 0 0 0.000000e+00
3 CH4 8.69601e-05 0.00999001 0.000000e+00
4 C2H2 8.69601e-05 0.00999001 -1.015380e-04
5 H2 0.00034784 0.03996 1.661370e-03
6 OH 8.69601e-07 9.99001e-05 -7.540863e-05
7 H2O 0.00034784 0.03996 3.879190e-05
8 CO 0 0 3.844250e-05
9 O2 8.69601e-06 0.000999001 -9.128886e-07
Sum of gas mole fractions= 1
Bulk Phase: soot (10)
Bulk Temperature = 1400
Bulk Pressure = 101325
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 CB-CB3 293.065 1 1.646335e-04
Bulk Weight Growth Rate = 0.00197741 kg/m^2/s
Bulk Growth Rate = 5.61765e-07 m/s
Bulk Growth Rate = 2022.35 microns / hour
Density of bulk phase = 3520 kg / m^3
= 3.52 gm / cm^3
Sum of bulk mole fractions= 1
Surface Phase: soot_interface (11)
Surface Temperature = 1400
Surface Pressure = 101325
Name Coverage SrcRate
0 Csoot-* 0.0186067 -3.028143e-20
1 Csoot-H 0.981393 -3.028143e-20
Sum of coverages = 1
================================ SOLVESP CALL SETUP ========================================
SOLVESP Called to calculate steady state residual
from a good initial guess
Bulk Phases have fixed compositions
Damping is ON
Reltol = 1.000e-06, Abstol = 1.000e-20
Iter Time Del_t Damp DelX Resid Name-Time Name-Damp
-----------------------------------------------------------------------------------
1 2.1569e+05 9.5571e+04
2 1.7622e-04 2.0108e-04
FIN 2 1.7622e-04 2.0335e-10 -- success
Gas Temperature = 1495
Gas Pressure = 101325
Gas Phase: gas (0)
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 H 0.000105864 0.012987 -3.833498e-03
1 N2 0.0072224 0.886014 0.000000e+00
2 CH3 0 0 0.000000e+00
3 CH4 8.14342e-05 0.00999001 0.000000e+00
4 C2H2 8.14342e-05 0.00999001 -1.499311e-04
5 H2 0.000325737 0.03996 2.065063e-03
6 OH 8.14342e-07 9.99001e-05 -7.369195e-05
7 H2O 0.000325737 0.03996 3.846262e-05
8 CO 0 0 3.787743e-05
9 O2 8.14342e-06 0.000999001 -1.324046e-06
Sum of gas mole fractions= 1
Bulk Phase: soot (10)
Bulk Temperature = 1495
Bulk Pressure = 101325
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 CB-CB3 293.065 1 2.619849e-04
Bulk Weight Growth Rate = 0.0031467 kg/m^2/s
Bulk Growth Rate = 8.93949e-07 m/s
Bulk Growth Rate = 3218.22 microns / hour
Density of bulk phase = 3520 kg / m^3
= 3.52 gm / cm^3
Sum of bulk mole fractions= 1
Surface Phase: soot_interface (11)
Surface Temperature = 1495
Surface Pressure = 101325
Name Coverage SrcRate
0 Csoot-* 0.0242812 -8.654559e-19
1 Csoot-H 0.975719 -8.654559e-19
Sum of coverages = 1
================================ SOLVESP CALL SETUP ========================================
SOLVESP Called to calculate steady state residual
from a good initial guess
Bulk Phases have fixed compositions
Damping is ON
Reltol = 1.000e-06, Abstol = 1.000e-20
Iter Time Del_t Damp DelX Resid Name-Time Name-Damp
-----------------------------------------------------------------------------------
1 2.8875e-10 1.4792e-10
FIN 1 2.8875e-10 1.2324e-10 -- success
Gas Temperature = 1495
Gas Pressure = 101325
Gas Phase: gas (0)
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 H 0.000105864 0.012987 -3.833498e-03
1 N2 0.0072224 0.886014 0.000000e+00
2 CH3 0 0 0.000000e+00
3 CH4 8.14342e-05 0.00999001 0.000000e+00
4 C2H2 8.14342e-05 0.00999001 -1.499311e-04
5 H2 0.000325737 0.03996 2.065063e-03
6 OH 8.14342e-07 9.99001e-05 -7.369195e-05
7 H2O 0.000325737 0.03996 3.846262e-05
8 CO 0 0 3.787743e-05
9 O2 8.14342e-06 0.000999001 -1.324046e-06
Sum of gas mole fractions= 1
Bulk Phase: soot (10)
Bulk Temperature = 1495
Bulk Pressure = 101325
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 CB-CB3 293.065 1 2.619849e-04
Bulk Weight Growth Rate = 0.0031467 kg/m^2/s
Bulk Growth Rate = 8.93949e-07 m/s
Bulk Growth Rate = 3218.22 microns / hour
Density of bulk phase = 3520 kg / m^3
= 3.52 gm / cm^3
Sum of bulk mole fractions= 1
Surface Phase: soot_interface (11)
Surface Temperature = 1495
Surface Pressure = 101325
Name Coverage SrcRate
0 Csoot-* 0.0242812 2.964615e-20
1 Csoot-H 0.975719 2.964615e-20
Sum of coverages = 1

View file

@ -0,0 +1,686 @@
Number of species = 10
Number of species in bulk phase named soot = 1
Number of species in surface phase, soot_interface = 2
Number of reactions = 8
================================ SOLVESP CALL SETUP ========================================
SOLVESP Called with Initialization turned on
Time scale input = 1.000e+00
Bulk Phases have fixed compositions
Damping is ON
Reltol = 1.000e-06, Abstol = 1.000e-20
================================ INITIAL GUESS ========================================
IntefaceKinetics Object # 0
Number of Phases = 3
Temperature = 1.400e+03 Kelvin
Pressure = 1.01e+05 Pa
Phase:SpecName Prod_Rate MoleFraction kindexSP
-----------------------------------------------------------------
gas:H -7.124e-03 9.990e-03
gas:N2 0.000e+00 8.890e-01
gas:CH3 0.000e+00 0.000e+00
gas:CH4 0.000e+00 9.990e-03
gas:C2H2 -5.457e-04 9.990e-03
gas:H2 1.094e-03 3.996e-02
gas:OH -6.584e-05 9.990e-05
gas:H2O 3.226e-05 3.996e-02
gas:CO 4.339e-05 0.000e+00
gas:O2 -4.906e-06 9.990e-04
soot:CB-CB3 1.048e-03 1.000e+00
soot_interface:Csoot-* -6.029e-03 1.000e-01 0
soot_interface:Csoot-H 6.029e-03 9.000e-01 1
===========================================================================================
calc_t: spec=0(Csoot-*) sf=1.000000e-01 pr=-6.028568e-03 dt=6.303322e-07
===============================Iteration 1 =================================
Transient step with: Real Time_n-1 = 0.0000e+00 sec, Time_n = 6.3033e-07 sec
Delta t = 6.3033e-07 sec
Printout of residual and jacobian
Residual: weighted norm = 2.9368e+05
Index Species_Name Residual Resid/wtRes wtRes
0: soot_interface:Csoot-* : 6.029e-03 4.153e+05 1.452e-08
1: soot_interface:Csoot-H : 0.000e+00 0.000e+00 3.800e-14
Jacobian:
Row 0:Csoot-* :
3.4963e+06 -3.5935e+04
Row 1:Csoot-H :
-1.0000e-00 -1.0000e+00
Weighted norm of update = 3.1954e+05
Name Prod_Rate XMol Conc Conc_Old wtConc
--------------------------------------------------------------------------------------
Csoot-* -2.708e-03 5.509e-02 2.093e-09 3.800e-09 3.800e-15 Tctrl
Csoot-H 2.708e-03 9.449e-01 3.591e-08 3.420e-08 3.420e-14
--------------------------------------------------------------------------------------
Delta_t increase due to repeated controlling species = 1.500000e+00
calc_t: spec=0(Csoot-*) sf=5.508663e-02 pr=-2.707633e-03 dt=1.159662e-06
===============================Iteration 2 =================================
Transient step with: Real Time_n-1 = 6.3033e-07 sec, Time_n = 1.7900e-06 sec
Delta t = 1.1597e-06 sec
Printout of residual and jacobian
Residual: weighted norm = 1.3190e+05
Index Species_Name Residual Resid/wtRes wtRes
0: soot_interface:Csoot-* : 2.708e-03 1.865e+05 1.452e-08
1: soot_interface:Csoot-H : 1.321e-17 3.476e-04 3.800e-14
Jacobian:
Row 0:Csoot-* :
2.7722e+06 -3.5935e+04
Row 1:Csoot-H :
-1.0000e-00 -1.0000e-00
Weighted norm of update = 1.8053e+05
Name Prod_Rate XMol Conc Conc_Old wtConc
--------------------------------------------------------------------------------------
Csoot-* -8.315e-04 2.971e-02 1.129e-09 2.093e-09 3.800e-15 Tctrl
Csoot-H 8.315e-04 9.703e-01 3.687e-08 3.591e-08 3.420e-14
--------------------------------------------------------------------------------------
Delta_t increase due to repeated controlling species = 2.250000e+00
calc_t: spec=0(Csoot-*) sf=2.971266e-02 pr=-8.314589e-04 dt=3.055391e-06
===============================Iteration 3 =================================
Transient step with: Real Time_n-1 = 1.7900e-06 sec, Time_n = 4.8454e-06 sec
Delta t = 3.0554e-06 sec
Printout of residual and jacobian
Residual: weighted norm = 4.0505e+04
Index Species_Name Residual Resid/wtRes wtRes
0: soot_interface:Csoot-* : 8.315e-04 5.728e+04 1.452e-08
1: soot_interface:Csoot-H : 1.823e-17 4.797e-04 3.800e-14
Jacobian:
Row 0:Csoot-* :
2.2372e+06 -3.5935e+04
Row 1:Csoot-H :
-1.0000e-00 -1.0000e+00
Weighted norm of update = 6.8484e+04
Name Prod_Rate XMol Conc Conc_Old wtConc
--------------------------------------------------------------------------------------
Csoot-* -1.197e-04 2.009e-02 7.633e-10 1.129e-09 3.800e-15 Tctrl
Csoot-H 1.197e-04 9.799e-01 3.724e-08 3.687e-08 3.420e-14
--------------------------------------------------------------------------------------
Delta_t increase due to repeated controlling species = 3.375000e+00
calc_t: spec=0(Csoot-*) sf=2.008683e-02 pr=-1.197167e-04 dt=2.151860e-05
===============================Iteration 4 =================================
Transient step with: Real Time_n-1 = 4.8454e-06 sec, Time_n = 2.6364e-05 sec
Delta t = 2.1519e-05 sec
Printout of residual and jacobian
Residual: weighted norm = 5.8320e+03
Index Species_Name Residual Resid/wtRes wtRes
0: soot_interface:Csoot-* : 1.197e-04 8.248e+03 1.452e-08
1: soot_interface:Csoot-H : 2.316e-18 6.094e-05 3.800e-14
Jacobian:
Row 0:Csoot-* :
1.9563e+06 -3.5935e+04
Row 1:Csoot-H :
-1.0000e+00 -1.0000e+00
Weighted norm of update = 1.1250e+04
Name Prod_Rate XMol Conc Conc_Old wtConc
--------------------------------------------------------------------------------------
Csoot-* -2.792e-06 1.851e-02 7.032e-10 7.633e-10 3.800e-15 Tctrl
Csoot-H 2.792e-06 9.815e-01 3.730e-08 3.724e-08 3.420e-14
--------------------------------------------------------------------------------------
Delta_t increase due to repeated controlling species = 5.062500e+00
calc_t: spec=0(Csoot-*) sf=1.850551e-02 pr=-2.792476e-06 dt=1.274853e-03
===============================Iteration 5 =================================
Transient step with: Real Time_n-1 = 2.6364e-05 sec, Time_n = 1.3012e-03 sec
Delta t = 1.2749e-03 sec
Printout of residual and jacobian
Residual: weighted norm = 7.3573e+02
Index Species_Name Residual Resid/wtRes wtRes
0: soot_interface:Csoot-* : 2.792e-06 1.040e+03 2.684e-09
1: soot_interface:Csoot-H : -1.436e-18 -3.778e-05 3.800e-14
Jacobian:
Row 0:Csoot-* :
1.9107e+06 -3.5935e+04
Row 1:Csoot-H :
-1.0000e+00 -1.0000e+00
Weighted norm of update = 1.4427e+03
Name Prod_Rate XMol Conc Conc_Old wtConc
--------------------------------------------------------------------------------------
Csoot-* -1.125e-09 1.847e-02 7.018e-10 7.032e-10 7.032e-16 Tctrl
Csoot-H 1.125e-09 9.815e-01 3.730e-08 3.730e-08 3.730e-14
--------------------------------------------------------------------------------------
Delta_t increase due to repeated controlling species = 7.593750e+00
calc_t: spec=0(Csoot-*) sf=1.846776e-02 pr=-1.125263e-09 dt=4.735873e+00
===============================Iteration 6 =================================
Transient step with: Real Time_n-1 = 1.3012e-03 sec, Time_n = 4.7372e+00 sec
Delta t = 4.7359e+00 sec
Printout of residual and jacobian
Residual: weighted norm = 2.9647e-01
Index Species_Name Residual Resid/wtRes wtRes
0: soot_interface:Csoot-* : 1.125e-09 4.193e-01 2.684e-09
1: soot_interface:Csoot-H : -5.334e-20 -1.404e-06 3.800e-14
Jacobian:
Row 0:Csoot-* :
1.9099e+06 -3.5935e+04
Row 1:Csoot-H :
-1.0000e-00 -1.0000e+00
Weighted norm of update = 5.8161e-01
Name Prod_Rate XMol Conc Conc_Old wtConc
--------------------------------------------------------------------------------------
Csoot-* -1.204e-16 1.847e-02 7.018e-10 7.018e-10 7.032e-16 Tctrl
Csoot-H 1.206e-16 9.815e-01 3.730e-08 3.730e-08 3.730e-14
--------------------------------------------------------------------------------------
Switching to steady solve.
===============================Iteration 7 =================================
Steady Solve
Printout of residual and jacobian
Residual: weighted norm = 3.1736e-08
Index Species_Name Residual Resid/wtRes wtRes
0: soot_interface:Csoot-* : 1.204e-16 4.488e-08 2.684e-09
1: soot_interface:Csoot-H : 2.647e-23 6.966e-10 3.800e-14
Jacobian:
Row 0:Csoot-* :
1.9099e+06 -3.5935e+04
Row 1:Csoot-H :
-1.0000e+00 -1.0000e+00
Weighted norm of update = 6.1771e-08
Name Prod_Rate XMol Conc Conc_Old wtConc
--------------------------------------------------------------------------------------
Csoot-* -8.195e-20 1.847e-02 7.018e-10 7.018e-10 7.032e-16 Tctrl
Csoot-H 8.809e-20 9.815e-01 3.730e-08 3.730e-08 3.730e-14
--------------------------------------------------------------------------------------
================================== FINAL RESULT ===========================================================
Weighted norm of solution update = 6.1771e-08
Weighted norm of residual update = 2.1591e-11
Name Prod_Rate XMol Conc wtConc Resid Resid/wtResid wtResid
------------------------------------------------------------------------------------------------------------
Csoot-* -8.195e-20 1.847e-02 7.018e-10 7.032e-16 8.195e-20 3.053e-11 2.684e-09 Tctrl
Csoot-H 8.809e-20 9.815e-01 3.730e-08 3.730e-14 0.000e+00 0.000e+00 3.800e-14
------------------------------------------------------------------------------------------------------------
IntefaceKinetics Object # 0
Number of Phases = 3
Temperature = 1.400e+03 Kelvin
Pressure = 1.01e+05 Pa
Phase:SpecName Prod_Rate MoleFraction kindexSP
-----------------------------------------------------------------
gas:H -2.366e-03 9.990e-03
gas:N2 0.000e+00 8.890e-01
gas:CH3 0.000e+00 0.000e+00
gas:CH4 0.000e+00 9.990e-03
gas:C2H2 -1.008e-04 9.990e-03
gas:H2 1.283e-03 3.996e-02
gas:OH -7.542e-05 9.990e-05
gas:H2O 3.880e-05 3.996e-02
gas:CO 3.843e-05 0.000e+00
gas:O2 -9.061e-07 9.990e-04
soot:CB-CB3 1.631e-04 1.000e+00
soot_interface:Csoot-* -8.195e-20 1.847e-02 0
soot_interface:Csoot-H 8.809e-20 9.815e-01 1
===========================================================================================================
Gas Temperature = 1400
Gas Pressure = 101325
Gas Phase: gas (0)
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 H 8.69601e-05 0.00999001 -2.365628e-03
1 N2 0.00773858 0.889011 0.000000e+00
2 CH3 0 0 0.000000e+00
3 CH4 8.69601e-05 0.00999001 0.000000e+00
4 C2H2 8.69601e-05 0.00999001 -1.007796e-04
5 H2 0.00034784 0.03996 1.282503e-03
6 OH 8.69601e-07 9.99001e-05 -7.542496e-05
7 H2O 0.00034784 0.03996 3.880305e-05
8 CO 0 0 3.843405e-05
9 O2 8.69601e-06 0.000999001 -9.060705e-07
Sum of gas mole fractions= 1
Bulk Phase: soot (10)
Bulk Temperature = 1400
Bulk Pressure = 101325
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 CB-CB3 293.065 1 1.631252e-04
Bulk Weight Growth Rate = 0.0019593 kg/m^2/s
Bulk Growth Rate = 5.56619e-07 m/s
Bulk Growth Rate = 2003.83 microns / hour
Density of bulk phase = 3520 kg / m^3
= 3.52 gm / cm^3
Sum of bulk mole fractions= 1
Surface Phase: soot_interface (11)
Surface Temperature = 1400
Surface Pressure = 101325
Name Coverage SrcRate
0 Csoot-* 0.0184677 -8.195044e-20
1 Csoot-H 0.981532 -8.195044e-20
Sum of coverages = 1
================================ SOLVESP CALL SETUP ========================================
SOLVESP Called to calculate steady state residual
from a good initial guess
Bulk Phases have fixed compositions
Damping is ON
Reltol = 1.000e-06, Abstol = 1.000e-20
================================ INITIAL GUESS ========================================
IntefaceKinetics Object # 0
Number of Phases = 3
Temperature = 1.400e+03 Kelvin
Pressure = 1.01e+05 Pa
Phase:SpecName Prod_Rate MoleFraction kindexSP
-----------------------------------------------------------------
gas:H -3.111e-03 1.299e-02
gas:N2 0.000e+00 8.860e-01
gas:CH3 0.000e+00 0.000e+00
gas:CH4 0.000e+00 9.990e-03
gas:C2H2 -1.008e-04 9.990e-03
gas:H2 1.662e-03 3.996e-02
gas:OH -7.542e-05 9.990e-05
gas:H2O 3.880e-05 3.996e-02
gas:CO 3.843e-05 0.000e+00
gas:O2 -9.061e-07 9.990e-04
soot:CB-CB3 1.631e-04 1.000e+00
soot_interface:Csoot-* 1.308e-05 1.847e-02 0
soot_interface:Csoot-H -1.308e-05 9.815e-01 1
===========================================================================================
===============================Iteration 1 =================================
Steady Solve
Printout of residual and jacobian
Residual: weighted norm = 2.7005e+03
Index Species_Name Residual Resid/wtRes wtRes
0: soot_interface:Csoot-* : -1.308e-05 -3.819e+03 3.426e-09
1: soot_interface:Csoot-H : 0.000e+00 0.000e+00 3.800e-14
Jacobian:
Row 0:Csoot-* :
2.4316e+06 -4.6103e+04
Row 1:Csoot-H :
-1.0000e+00 -1.0000e+00
Weighted norm of update = 5.3218e+03
Name Prod_Rate XMol Conc Conc_Old wtConc
--------------------------------------------------------------------------------------
Csoot-* 1.328e-14 1.861e-02 7.071e-10 7.018e-10 7.018e-16
Csoot-H -1.328e-14 9.814e-01 3.729e-08 3.730e-08 3.730e-14
--------------------------------------------------------------------------------------
===============================Iteration 2 =================================
Steady Solve
Printout of residual and jacobian
Residual: weighted norm = 4.0777e-06
Index Species_Name Residual Resid/wtRes wtRes
0: soot_interface:Csoot-* : -1.328e-14 -3.877e-06 3.426e-09
1: soot_interface:Csoot-H : 1.622e-19 4.269e-06 3.800e-14
Jacobian:
Row 0:Csoot-* :
2.4316e+06 -4.6103e+04
Row 1:Csoot-H :
-1.0000e-00 -1.0000e+00
Weighted norm of update = 8.9325e-06
Name Prod_Rate XMol Conc Conc_Old wtConc
--------------------------------------------------------------------------------------
Csoot-* -3.028e-20 1.861e-02 7.071e-10 7.071e-10 7.018e-16
Csoot-H 9.487e-20 9.814e-01 3.729e-08 3.729e-08 3.730e-14
--------------------------------------------------------------------------------------
================================== FINAL RESULT ===========================================================
Weighted norm of solution update = 8.9325e-06
Weighted norm of residual update = 6.2499e-12
Name Prod_Rate XMol Conc wtConc Resid Resid/wtResid wtResid
------------------------------------------------------------------------------------------------------------
Csoot-* -3.028e-20 1.861e-02 7.071e-10 7.018e-16 3.028e-20 8.839e-12 3.426e-09
Csoot-H 9.487e-20 9.814e-01 3.729e-08 3.730e-14 0.000e+00 0.000e+00 3.800e-14
------------------------------------------------------------------------------------------------------------
IntefaceKinetics Object # 0
Number of Phases = 3
Temperature = 1.400e+03 Kelvin
Pressure = 1.01e+05 Pa
Phase:SpecName Prod_Rate MoleFraction kindexSP
-----------------------------------------------------------------
gas:H -3.122e-03 1.299e-02
gas:N2 0.000e+00 8.860e-01
gas:CH3 0.000e+00 0.000e+00
gas:CH4 0.000e+00 9.990e-03
gas:C2H2 -1.015e-04 9.990e-03
gas:H2 1.661e-03 3.996e-02
gas:OH -7.541e-05 9.990e-05
gas:H2O 3.879e-05 3.996e-02
gas:CO 3.844e-05 0.000e+00
gas:O2 -9.129e-07 9.990e-04
soot:CB-CB3 1.646e-04 1.000e+00
soot_interface:Csoot-* -3.028e-20 1.861e-02 0
soot_interface:Csoot-H 9.487e-20 9.814e-01 1
===========================================================================================================
Gas Temperature = 1400
Gas Pressure = 101325
Gas Phase: gas (0)
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 H 0.000113048 0.012987 -3.121840e-03
1 N2 0.00771249 0.886014 0.000000e+00
2 CH3 0 0 0.000000e+00
3 CH4 8.69601e-05 0.00999001 0.000000e+00
4 C2H2 8.69601e-05 0.00999001 -1.015380e-04
5 H2 0.00034784 0.03996 1.661370e-03
6 OH 8.69601e-07 9.99001e-05 -7.540863e-05
7 H2O 0.00034784 0.03996 3.879190e-05
8 CO 0 0 3.844250e-05
9 O2 8.69601e-06 0.000999001 -9.128886e-07
Sum of gas mole fractions= 1
Bulk Phase: soot (10)
Bulk Temperature = 1400
Bulk Pressure = 101325
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 CB-CB3 293.065 1 1.646335e-04
Bulk Weight Growth Rate = 0.00197741 kg/m^2/s
Bulk Growth Rate = 5.61765e-07 m/s
Bulk Growth Rate = 2022.35 microns / hour
Density of bulk phase = 3520 kg / m^3
= 3.52 gm / cm^3
Sum of bulk mole fractions= 1
Surface Phase: soot_interface (11)
Surface Temperature = 1400
Surface Pressure = 101325
Name Coverage SrcRate
0 Csoot-* 0.0186067 -3.028143e-20
1 Csoot-H 0.981393 -3.028143e-20
Sum of coverages = 1
================================ SOLVESP CALL SETUP ========================================
SOLVESP Called to calculate steady state residual
from a good initial guess
Bulk Phases have fixed compositions
Damping is ON
Reltol = 1.000e-06, Abstol = 1.000e-20
================================ INITIAL GUESS ========================================
IntefaceKinetics Object # 0
Number of Phases = 3
Temperature = 1.495e+03 Kelvin
Pressure = 1.01e+05 Pa
Phase:SpecName Prod_Rate MoleFraction kindexSP
-----------------------------------------------------------------
gas:H -3.431e-03 1.299e-02
gas:N2 0.000e+00 8.860e-01
gas:CH3 0.000e+00 0.000e+00
gas:CH4 0.000e+00 9.990e-03
gas:C2H2 -1.149e-04 9.990e-03
gas:H2 2.084e-03 3.996e-02
gas:OH -7.447e-05 9.990e-05
gas:H2O 3.903e-05 3.996e-02
gas:CO 3.746e-05 0.000e+00
gas:O2 -1.015e-06 9.990e-04
soot:CB-CB3 1.923e-04 1.000e+00
soot_interface:Csoot-* 5.111e-04 1.861e-02 0
soot_interface:Csoot-H -5.111e-04 9.814e-01 1
===========================================================================================
===============================Iteration 1 =================================
Steady Solve
Printout of residual and jacobian
Residual: weighted norm = 9.5571e+04
Index Species_Name Residual Resid/wtRes wtRes
0: soot_interface:Csoot-* : -5.111e-04 -1.352e+05 3.781e-09
1: soot_interface:Csoot-H : 0.000e+00 0.000e+00 3.800e-14
Jacobian:
Row 0:Csoot-* :
2.3127e+06 -5.7552e+04
Row 1:Csoot-H :
-1.0000e+00 -1.0000e+00
Weighted norm of update = 2.1569e+05
Name Prod_Rate XMol Conc Conc_Old wtConc
--------------------------------------------------------------------------------------
Csoot-* -6.424e-13 2.428e-02 9.227e-10 7.071e-10 7.071e-16
Csoot-H 6.424e-13 9.757e-01 3.708e-08 3.729e-08 3.729e-14
--------------------------------------------------------------------------------------
===============================Iteration 2 =================================
Steady Solve
Printout of residual and jacobian
Residual: weighted norm = 2.0108e-04
Index Species_Name Residual Resid/wtRes wtRes
0: soot_interface:Csoot-* : 6.424e-13 1.699e-04 3.781e-09
1: soot_interface:Csoot-H : 8.666e-18 2.281e-04 3.800e-14
Jacobian:
Row 0:Csoot-* :
2.3127e+06 -5.7552e+04
Row 1:Csoot-H :
-1.0000e+00 -1.0000e-00
Weighted norm of update = 1.7622e-04
Name Prod_Rate XMol Conc Conc_Old wtConc
--------------------------------------------------------------------------------------
Csoot-* -8.655e-19 2.428e-02 9.227e-10 9.227e-10 7.071e-16
Csoot-H 7.793e-19 9.757e-01 3.708e-08 3.708e-08 3.729e-14
--------------------------------------------------------------------------------------
================================== FINAL RESULT ===========================================================
Weighted norm of solution update = 1.7622e-04
Weighted norm of residual update = 2.0335e-10
Name Prod_Rate XMol Conc wtConc Resid Resid/wtResid wtResid
------------------------------------------------------------------------------------------------------------
Csoot-* -8.655e-19 2.428e-02 9.227e-10 7.071e-16 8.655e-19 2.289e-10 3.781e-09
Csoot-H 7.793e-19 9.757e-01 3.708e-08 3.729e-14 6.617e-24 1.741e-10 3.800e-14
------------------------------------------------------------------------------------------------------------
IntefaceKinetics Object # 0
Number of Phases = 3
Temperature = 1.495e+03 Kelvin
Pressure = 1.01e+05 Pa
Phase:SpecName Prod_Rate MoleFraction kindexSP
-----------------------------------------------------------------
gas:H -3.833e-03 1.299e-02
gas:N2 0.000e+00 8.860e-01
gas:CH3 0.000e+00 0.000e+00
gas:CH4 0.000e+00 9.990e-03
gas:C2H2 -1.499e-04 9.990e-03
gas:H2 2.065e-03 3.996e-02
gas:OH -7.369e-05 9.990e-05
gas:H2O 3.846e-05 3.996e-02
gas:CO 3.788e-05 0.000e+00
gas:O2 -1.324e-06 9.990e-04
soot:CB-CB3 2.620e-04 1.000e+00
soot_interface:Csoot-* -8.655e-19 2.428e-02 0
soot_interface:Csoot-H 7.793e-19 9.757e-01 1
===========================================================================================================
Gas Temperature = 1495
Gas Pressure = 101325
Gas Phase: gas (0)
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 H 0.000105864 0.012987 -3.833498e-03
1 N2 0.0072224 0.886014 0.000000e+00
2 CH3 0 0 0.000000e+00
3 CH4 8.14342e-05 0.00999001 0.000000e+00
4 C2H2 8.14342e-05 0.00999001 -1.499311e-04
5 H2 0.000325737 0.03996 2.065063e-03
6 OH 8.14342e-07 9.99001e-05 -7.369195e-05
7 H2O 0.000325737 0.03996 3.846262e-05
8 CO 0 0 3.787743e-05
9 O2 8.14342e-06 0.000999001 -1.324046e-06
Sum of gas mole fractions= 1
Bulk Phase: soot (10)
Bulk Temperature = 1495
Bulk Pressure = 101325
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 CB-CB3 293.065 1 2.619849e-04
Bulk Weight Growth Rate = 0.0031467 kg/m^2/s
Bulk Growth Rate = 8.93949e-07 m/s
Bulk Growth Rate = 3218.22 microns / hour
Density of bulk phase = 3520 kg / m^3
= 3.52 gm / cm^3
Sum of bulk mole fractions= 1
Surface Phase: soot_interface (11)
Surface Temperature = 1495
Surface Pressure = 101325
Name Coverage SrcRate
0 Csoot-* 0.0242812 -8.654559e-19
1 Csoot-H 0.975719 -8.654559e-19
Sum of coverages = 1
================================ SOLVESP CALL SETUP ========================================
SOLVESP Called to calculate steady state residual
from a good initial guess
Bulk Phases have fixed compositions
Damping is ON
Reltol = 1.000e-06, Abstol = 1.000e-20
================================ INITIAL GUESS ========================================
IntefaceKinetics Object # 0
Number of Phases = 3
Temperature = 1.495e+03 Kelvin
Pressure = 1.01e+05 Pa
Phase:SpecName Prod_Rate MoleFraction kindexSP
-----------------------------------------------------------------
gas:H -3.833e-03 1.299e-02
gas:N2 0.000e+00 8.860e-01
gas:CH3 0.000e+00 0.000e+00
gas:CH4 0.000e+00 9.990e-03
gas:C2H2 -1.499e-04 9.990e-03
gas:H2 2.065e-03 3.996e-02
gas:OH -7.369e-05 9.990e-05
gas:H2O 3.846e-05 3.996e-02
gas:CO 3.788e-05 0.000e+00
gas:O2 -1.324e-06 9.990e-04
soot:CB-CB3 2.620e-04 1.000e+00
soot_interface:Csoot-* -8.655e-19 2.428e-02 0
soot_interface:Csoot-H 7.793e-19 9.757e-01 1
===========================================================================================
===============================Iteration 1 =================================
Steady Solve
Printout of residual and jacobian
Residual: weighted norm = 1.4792e-10
Index Species_Name Residual Resid/wtRes wtRes
0: soot_interface:Csoot-* : 8.928e-19 2.092e-10 4.268e-09
1: soot_interface:Csoot-H : 0.000e+00 0.000e+00 3.800e-14
Jacobian:
Row 0:Csoot-* :
2.3127e+06 -5.7552e+04
Row 1:Csoot-H :
-1.0000e-00 -1.0000e-00
Weighted norm of update = 2.8875e-10
Name Prod_Rate XMol Conc Conc_Old wtConc
--------------------------------------------------------------------------------------
Csoot-* 2.965e-20 2.428e-02 9.227e-10 9.227e-10 9.227e-16
Csoot-H -5.218e-19 9.757e-01 3.708e-08 3.708e-08 3.708e-14
--------------------------------------------------------------------------------------
================================== FINAL RESULT ===========================================================
Weighted norm of solution update = 2.8875e-10
Weighted norm of residual update = 1.2324e-10
Name Prod_Rate XMol Conc wtConc Resid Resid/wtResid wtResid
------------------------------------------------------------------------------------------------------------
Csoot-* 2.965e-20 2.428e-02 9.227e-10 9.227e-16 -2.965e-20 -6.947e-12 4.268e-09
Csoot-H -5.218e-19 9.757e-01 3.708e-08 3.708e-14 6.617e-24 1.741e-10 3.800e-14
------------------------------------------------------------------------------------------------------------
IntefaceKinetics Object # 0
Number of Phases = 3
Temperature = 1.495e+03 Kelvin
Pressure = 1.01e+05 Pa
Phase:SpecName Prod_Rate MoleFraction kindexSP
-----------------------------------------------------------------
gas:H -3.833e-03 1.299e-02
gas:N2 0.000e+00 8.860e-01
gas:CH3 0.000e+00 0.000e+00
gas:CH4 0.000e+00 9.990e-03
gas:C2H2 -1.499e-04 9.990e-03
gas:H2 2.065e-03 3.996e-02
gas:OH -7.369e-05 9.990e-05
gas:H2O 3.846e-05 3.996e-02
gas:CO 3.788e-05 0.000e+00
gas:O2 -1.324e-06 9.990e-04
soot:CB-CB3 2.620e-04 1.000e+00
soot_interface:Csoot-* 2.965e-20 2.428e-02 0
soot_interface:Csoot-H -5.218e-19 9.757e-01 1
===========================================================================================================
Gas Temperature = 1495
Gas Pressure = 101325
Gas Phase: gas (0)
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 H 0.000105864 0.012987 -3.833498e-03
1 N2 0.0072224 0.886014 0.000000e+00
2 CH3 0 0 0.000000e+00
3 CH4 8.14342e-05 0.00999001 0.000000e+00
4 C2H2 8.14342e-05 0.00999001 -1.499311e-04
5 H2 0.000325737 0.03996 2.065063e-03
6 OH 8.14342e-07 9.99001e-05 -7.369195e-05
7 H2O 0.000325737 0.03996 3.846262e-05
8 CO 0 0 3.787743e-05
9 O2 8.14342e-06 0.000999001 -1.324046e-06
Sum of gas mole fractions= 1
Bulk Phase: soot (10)
Bulk Temperature = 1495
Bulk Pressure = 101325
Name Conc MoleF SrcRate
(kmol/m^3) (kmol/m^2/s)
0 CB-CB3 293.065 1 2.619849e-04
Bulk Weight Growth Rate = 0.0031467 kg/m^2/s
Bulk Growth Rate = 8.93949e-07 m/s
Bulk Growth Rate = 3218.22 microns / hour
Density of bulk phase = 3520 kg / m^3
= 3.52 gm / cm^3
Sum of bulk mole fractions= 1
Surface Phase: soot_interface (11)
Surface Temperature = 1495
Surface Pressure = 101325
Name Coverage SrcRate
0 Csoot-* 0.0242812 2.964615e-20
1 Csoot-H 0.975719 2.964615e-20
Sum of coverages = 1