*** empty log message ***

This commit is contained in:
Dave Goodwin 2003-08-06 20:05:00 +00:00
parent 7f16539c86
commit d81d185bf9
10 changed files with 49 additions and 41 deletions

View file

@ -2,10 +2,10 @@ function y = massFractions(r)
% MASSFRACTION - Mass fractions of reactor contents after last call
% to 'advance' or 'step'.
%
nsp = nSpecies(r.contents)
ir = reactor_hndl(r)
nsp = nSpecies(r.contents);
ir = reactor_hndl(r);
for k = 1:nsp
yy(k) = reactormethods(30, ir, k-1);
end
y = yy
y = yy;

View file

@ -24,5 +24,5 @@ function t = step(r, tout)
%
% See also: Reactor/advance
%
t = reactormethods(21, reactor_hndl(r), tend);
t = reactormethods(21, reactor_hndl(r), tout);

View file

@ -43,6 +43,7 @@ elseif isa(x,'XML_Node')
else
doc = XML_Node('doc');
build(doc, x, 1);
write(doc,'xp.out');
xp = child(doc,'ctml/phase');
end
t = ThermoPhase(xp);

View file

@ -4,10 +4,10 @@ if nargin < 2 | ~isa(file,'char')
error('Syntax error. Type "help build" for more information.')
end
if nargin == 2
iok = ctmethods(10, 4, x.id, file);
if nargin == 3 & pre > 0
iok = ctmethods(10, 15, x.id, file)
else
iok = ctmethods(10, 15, x.id, file);
iok = ctmethods(10, 4, x.id, file)
end

View file

@ -17,6 +17,7 @@ namespace Cantera {
}
else
ss += ch;
if (ch == '\'') ss += ch;
n++;
ch = s[n];
}

View file

@ -744,7 +744,7 @@ class phase(writer):
rtoks = r[1].split()
if rtoks[0] <> 'all':
i = ra.addChild('include')
i['prefix'] = 'reaction_'
#i['prefix'] = 'reaction_'
i['min'] = rtoks[0]
if len(rtoks) > 2 and (rtoks[1] == 'to' or rtoks[1] == '-'):
i['max'] = rtoks[2]
@ -835,7 +835,8 @@ class pure_solid(phase):
if self._tr:
t = ph.addChild('transport')
t['model'] = self._tr
k = ph.addChild("kinetics")
k['model'] = 'none'
class ideal_interface(phase):
"""An ideal interface."""

View file

@ -40,6 +40,5 @@ def importInterface(file = '', name = '', phases = []):
src = file+'#'+name
else:
src = file
print phases
return Interface.Interface(src = src, root = root, phases = phases)

View file

@ -775,11 +775,11 @@ namespace Cantera {
rxns.getChildren("include",incl);
int ninc = incl.size();
vector<XML_Node*> allrxns;
rdata->getChildren("reaction",allrxns);
nrxns = allrxns.size();
// if no 'include' directive, then include all reactions
if (ninc == 0) {
vector<XML_Node*> allrxns;
rdata->getChildren("reaction",allrxns);
nrxns = allrxns.size();
for (i = 0; i < nrxns; i++) {
XML_Node* r = allrxns[i];
if (r) {
@ -790,25 +790,40 @@ namespace Cantera {
}
else {
for (int nii = 0; nii < ninc; nii++) {
nrxns = 0;
XML_Node& ii = *incl[nii];
vector<string> rxn_ids;
string pref = ii["prefix"];
int imin = atoi(ii["min"].c_str());
int imax = atoi(ii["max"].c_str());
if (imin != 0 && imax != 0) {
nrxns = imax - imin + 1;
for (int nn=0; nn<nrxns; nn++) {
rxn_ids.push_back(pref+int2str(imin+nn));
}
}
//vector<string> rxn_ids;
//string pref = ii["prefix"];
//int imin = atoi(ii["min"].c_str());
//int imax = atoi(ii["max"].c_str());
string imin = ii["min"];
string imax = ii["max"];
for (i = 0; i < nrxns; i++) {
XML_Node* r = rdata->findID(rxn_ids[i],1);
XML_Node* r = allrxns[i];
string rxid;
if (r) {
if (installReaction(itot, *r, &kin,
default_phase, rxnrule)) ++itot;
rxid = (*r)["id"];
cout << rxid << " " << imin << " " << imax << endl;
cout << (rxid >= imin) << " " << (rxid <= imax) << endl;
if ((rxid >= imin) && (rxid <= imax)) {
if (installReaction(itot, *r, &kin,
default_phase, rxnrule)) ++itot;
}
}
// if (imin != 0 && imax != 0) {
// nrxns = imax - imin + 1;
// for (int nn=0; nn<nrxns; nn++) {
// rxn_ids.push_back(pref+int2str(imin+nn));
// }
// }
// for (i = 0; i < nrxns; i++) {
// XML_Node* r = rdata->findID(rxn_ids[i],1);
// if (r) {
// if (installReaction(itot, *r, &kin,
// default_phase, rxnrule)) ++itot;
// }
// }
}
}
}

4
config/configure vendored
View file

@ -1297,8 +1297,8 @@ else
echo
echo "********************************************************************"
echo "Configuration error. Python is required to build Cantera, but it"
echo "cannot be found. Set environment variable PYTHON_CMD to the command to"
echo "run the Python interpreter on your system, and run configure again."
echo "cannot be found. Set environment variable PYTHON_CMD to the full path to"
echo "the Python interpreter on your system, and run configure again."
echo "********************************************************************"
exit 1
fi

View file

@ -34,15 +34,6 @@ fi
fi
echo "Cantera will be installed in ${prefix}"
if test ! -w ${prefix}; then
echo "checking for write-access... no"
echo
echo "**** Since you do not have write-access to ${prefix}, you will need to"
echo "**** run the 'make install' step as super-user."
echo
else
echo "checking for write-access... yes"
fi
AC_SUBST(prefix)
AC_SUBST(local_inst)
@ -263,8 +254,8 @@ else
echo
echo "********************************************************************"
echo "Configuration error. Python is required to build Cantera, but it"
echo "cannot be found. Set environment variable PYTHON_CMD to the command to"
echo "run the Python interpreter on your system, and run configure again."
echo "cannot be found. Set environment variable PYTHON_CMD to the full path to"
echo "the Python interpreter on your system, and run configure again."
echo "********************************************************************"
exit 1
fi