Skip to content

Commit

Permalink
[oneD] Add unstrained-flow domain
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl authored and speth committed Apr 14, 2023
1 parent 708a8bf commit ef8c935
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 8 deletions.
21 changes: 16 additions & 5 deletions include/cantera/oneD/StFlow.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,21 +171,31 @@ class StFlow : public Domain1D
virtual shared_ptr<SolutionArray> asArray(const double* soln) const;
virtual void fromArray(SolutionArray& arr, double* soln);

//! Set flow configuration for freely-propagating flames, using an internal
//! point with a fixed temperature as the condition to determine the inlet
//! mass flux.
//! Set flow configuration for freely-propagating flames, using an internal point
//! with a fixed temperature as the condition to determine the inlet mass flux.
void setFreeFlow() {
m_type = cFreeFlow;
m_dovisc = false;
m_isFree = true;
m_usesLambda = false;
}

//! Set flow configuration for axisymmetric counterflow or burner-stabilized
//! flames, using specified inlet mass fluxes.
//! Set flow configuration for axisymmetric counterflow flames, using specified
//! inlet mass fluxes.
void setAxisymmetricFlow() {
m_type = cAxisymmetricStagnationFlow;
m_dovisc = true;
m_isFree = false;
m_usesLambda = true;
}

//! Set flow configuration for burner-stabilized flames, using specified inlet mass
//! fluxes.
void setUnstrainedFlow() {
m_type = cAxisymmetricStagnationFlow;
m_dovisc = false;
m_isFree = false;
m_usesLambda = false;
}

//! Return the type of flow domain being represented, either "Free Flame" or
Expand Down Expand Up @@ -482,6 +492,7 @@ class StFlow : public Domain1D

bool m_dovisc;
bool m_isFree;
bool m_usesLambda;

//! Update the transport properties at grid points in the range from `j0`
//! to `j1`, based on solution `x`.
Expand Down
5 changes: 5 additions & 0 deletions src/oneD/DomainFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ DomainFactory::DomainFactory()
ret->setAxisymmetricFlow();
return ret;
});
reg("unstrained-flow", [](shared_ptr<Solution> solution, const string& id) {
StFlow* ret = new StFlow(solution, id);
ret->setUnstrainedFlow();
return ret;
});
}

DomainFactory* DomainFactory::factory()
Expand Down
9 changes: 6 additions & 3 deletions src/oneD/StFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ string StFlow::type() const {
if (m_isFree) {
return "free-flow";
}
return "axisymmetric-flow";
if (m_usesLambda) {
return "axisymmetric-flow";
}
return "unstrained-flow";
}

void StFlow::setThermo(IdealGasPhase& th) {
Expand Down Expand Up @@ -730,9 +733,9 @@ bool StFlow::componentActive(size_t n) const
{
switch (n) {
case c_offset_V: // spread_rate
return !m_isFree;
return m_usesLambda;
case c_offset_L: // lambda
return !m_isFree;
return m_usesLambda;
case c_offset_E: // eField
return false;
default:
Expand Down

0 comments on commit ef8c935

Please sign in to comment.