Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revive 1D radiation improvements of PR965 #1799

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 9 additions & 19 deletions include/cantera/oneD/Flow1D.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
#define CT_FLOW1D_H

#include "Domain1D.h"
#include "Radiation1D.h"
#include "cantera/base/Array.h"
#include "cantera/base/Solution.h"
#include "cantera/thermo/ThermoPhase.h"
#include "cantera/kinetics/Kinetics.h"


namespace Cantera
{

Expand Down Expand Up @@ -259,12 +261,12 @@ class Flow1D : public Domain1D

//! Return emissivity at left boundary
double leftEmissivity() const {
return m_epsilon_left;
return m_radiation->leftEmissivity();
}

//! Return emissivity at right boundary
double rightEmissivity() const {
return m_epsilon_right;
return m_radiation->rightEmissivity();
}

//! Specify that the the temperature should be held fixed at point `j`.
Expand Down Expand Up @@ -461,22 +463,8 @@ class Flow1D : public Domain1D
//! to be updated are defined.
virtual void updateProperties(size_t jg, double* x, size_t jmin, size_t jmax);

/**
* Computes the radiative heat loss vector over points jmin to jmax and stores
* the data in the qdotRadiation variable.
*
* The simple radiation model used was established by Liu and Rogg
* @cite liu1991. This model considers the radiation of CO2 and H2O.
*
* This model uses the optically thin limit and the gray-gas approximation to
* simply calculate a volume specified heat flux out of the Planck absorption
* coefficients, the boundary emissivities and the temperature. Polynomial lines
* calculate the species Planck coefficients for H2O and CO2. The data for the
* lines are taken from the RADCAL program @cite RADCAL.
* The coefficients for the polynomials are taken from
* [TNF Workshop](https://tnfworkshop.org/radiation/) material.
*/
void computeRadiation(double* x, size_t jmin, size_t jmax);
//! Compute the radiative heat loss at each grid point
void computeRadiation(double*, size_t, size_t);

//! @}

Expand Down Expand Up @@ -902,6 +890,9 @@ class Flow1D : public Domain1D
//! radiative heat loss.
double m_epsilon_right = 0.0;

//! Radiation object used for calculating radiative heat loss
std::unique_ptr<Radiation1D> m_radiation;

//! Indices within the ThermoPhase of the radiating species. First index is
//! for CO2, second is for H2O.
vector<size_t> m_kRadiating;
Expand Down Expand Up @@ -1006,5 +997,4 @@ class Flow1D : public Domain1D
};

}

#endif
Loading
Loading