Skip to content

Commit

Permalink
[unittest] Test flame types
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl authored and speth committed Jun 27, 2023
1 parent a41991a commit 36faa94
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions test/oneD/test_oneD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "cantera/core.h"
#include "cantera/onedim.h"
#include "cantera/oneD/DomainFactory.h"
#include "cantera/oneD/IonFlow.h"

using namespace Cantera;

Expand Down Expand Up @@ -34,8 +35,7 @@ TEST(onedim, freeflame)
double Tad = gas->temperature();

// flow
auto flow = newDomain<StFlow>("gas-flow", sol, "flow");
flow->setFreeFlow();
auto flow = newDomain<StFlow>("free-flow", sol, "flow");

// grid
int nz = 21;
Expand Down Expand Up @@ -102,6 +102,30 @@ TEST(onedim, freeflame)
}
}

TEST(onedim, flame_types)
{
auto sol = newSolution("h2o2.yaml", "ohmech", "mixture-averaged");

auto free = newDomain<StFlow>("free-flow", sol, "flow");
ASSERT_EQ(free->type(), "free-flow");
auto symm = newDomain<StFlow>("axisymmetric-flow", sol, "flow");
ASSERT_EQ(symm->type(), "axisymmetric-flow");
auto burner = newDomain<StFlow>("unstrained-flow", sol, "flow");
ASSERT_EQ(burner->type(), "unstrained-flow");
}

TEST(onedim, ion_flame_types)
{
auto sol = newSolution("ch4_ion.yaml", "", "");
ASSERT_EQ(sol->transport()->transportModel(), "ionized-gas");

auto free = newDomain<IonFlow>("free-flow", sol, "flow");
ASSERT_EQ(free->type(), "free-ion-flow");
auto symm = newDomain<IonFlow>("axisymmetric-flow", sol, "flow");
ASSERT_EQ(symm->type(), "axisymmetric-ion-flow");
auto burner = newDomain<IonFlow>("unstrained-flow", sol, "flow");
ASSERT_EQ(burner->type(), "unstrained-ion-flow");
}

int main(int argc, char** argv)
{
Expand Down

0 comments on commit 36faa94

Please sign in to comment.