Skip to content

Commit

Permalink
Do not evaluate absorption coefficient via Kirkhoff
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Mullen committed Jan 16, 2025
1 parent d93837f commit 64f970d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions singularity-opac/photons/gray_opacity_photons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ class GrayOpacity {
PORTABLE_INLINE_FUNCTION
Real AbsorptionCoefficient(const Real rho, const Real temp, const Real nu,
Real *lambda = nullptr) const {
return dist_.AbsorptionCoefficientFromKirkhoff(*this, rho, temp, nu,
lambda);
return rho * kappa_;
}

template <typename FrequencyIndexer, typename DataIndexer>
Expand All @@ -67,8 +66,7 @@ class GrayOpacity {
Real AngleAveragedAbsorptionCoefficient(const Real rho, const Real temp,
const Real nu,
Real *lambda = nullptr) const {
return dist_.AngleAveragedAbsorptionCoefficientFromKirkhoff(
*this, rho, temp, nu, lambda);
return AbsorptionCoefficient(rho, temp, nu, lambda);
}

template <typename FrequencyIndexer, typename DataIndexer>
Expand Down
6 changes: 2 additions & 4 deletions singularity-opac/photons/powerlaw_opacity_photons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ class PowerLawOpacity {
PORTABLE_INLINE_FUNCTION
Real AbsorptionCoefficient(const Real rho, const Real temp, const Real nu,
Real *lambda = nullptr) const {
return dist_.AbsorptionCoefficientFromKirkhoff(*this, rho, temp, nu,
lambda);
return rho * (kappa0_ * std::pow(rho, rho_exp_) * std::pow(temp, temp_exp_));
}

template <typename FrequencyIndexer, typename DataIndexer>
Expand All @@ -70,8 +69,7 @@ class PowerLawOpacity {
Real AngleAveragedAbsorptionCoefficient(const Real rho, const Real temp,
const Real nu,
Real *lambda = nullptr) const {
return dist_.AngleAveragedAbsorptionCoefficientFromKirkhoff(
*this, rho, temp, nu, lambda);
return AbsorptionCoefficient(rho, temp, nu, lambda);
}

template <typename FrequencyIndexer, typename DataIndexer>
Expand Down

0 comments on commit 64f970d

Please sign in to comment.