Skip to content

Commit

Permalink
[1D] Use StFlow::fixed_mdot when applicable
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl authored and speth committed Mar 18, 2023
1 parent bf4ab52 commit 2884a08
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
6 changes: 0 additions & 6 deletions include/cantera/oneD/StFlow.h
Expand Up @@ -188,12 +188,6 @@ class StFlow : public Domain1D
m_isFree = false;
}

//! Return flag indicating whether flow is free
//! @see setFreeFlow setAxisymmetricFlow
bool isFree() {
return m_isFree;
}

//! Return the type of flow domain being represented, either "Free Flame" or
//! "Axisymmetric Stagnation".
//! @see setFreeFlow setAxisymmetricFlow
Expand Down
6 changes: 3 additions & 3 deletions src/oneD/Sim1D.cpp
Expand Up @@ -625,7 +625,7 @@ int Sim1D::setFixedTemperature(double t)
StFlow* d_free = dynamic_cast<StFlow*>(&domain(n));
size_t npnow = d.nPoints();
size_t nstart = znew.size();
if (d_free && d_free->isFree()) {
if (d_free && !d_free->fixed_mdot()) {
for (size_t m = 0; m < npnow - 1; m++) {
bool fixedpt = false;
double t1 = value(n, 2, m);
Expand Down Expand Up @@ -703,7 +703,7 @@ double Sim1D::fixedTemperature()
double t_fixed = std::numeric_limits<double>::quiet_NaN();
for (size_t n = 0; n < nDomains(); n++) {
StFlow* d = dynamic_cast<StFlow*>(&domain(n));
if (d && d->isFree() && d->m_tfixed > 0) {
if (d && !d->fixed_mdot() && d->m_tfixed > 0) {
t_fixed = d->m_tfixed;
break;
}
Expand All @@ -716,7 +716,7 @@ double Sim1D::fixedTemperatureLocation()
double z_fixed = std::numeric_limits<double>::quiet_NaN();
for (size_t n = 0; n < nDomains(); n++) {
StFlow* d = dynamic_cast<StFlow*>(&domain(n));
if (d && d->isFree() && d->m_tfixed > 0) {
if (d && !d->fixed_mdot() && d->m_tfixed > 0) {
z_fixed = d->m_zfixed;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/oneD/refine.cpp
Expand Up @@ -183,7 +183,7 @@ int Refiner::analyze(size_t n, const doublereal* z,
}

// Keep the point where the temperature is fixed
if (fflame && fflame->isFree() && z[j] == fflame->m_zfixed) {
if (fflame && !fflame->fixed_mdot() && z[j] == fflame->m_zfixed) {
m_keep[j] = 1;
}
}
Expand Down

0 comments on commit 2884a08

Please sign in to comment.