Skip to content

Conversation

@capriatim
Copy link
Contributor

No description provided.

@rdbisme rdbisme requested a review from mgoodson-cvd November 22, 2025 16:55
Copy link
Collaborator

@mgoodson-cvd mgoodson-cvd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested this yet, but just from looking at the code, I don't see any reason it shouldn't work.

double* const hw, double *const p_Xs)
{
p_mix->surfaceMassBalance(p_Yke, p_Ykg, *T, *P, *Bg, *Bc, *hw, p_Xs);
const int ne = p_mix->nElements();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why leave the Fortran interface unchanged? Why not update it at the same time? Could preserve the old behavior with additional function, e.g., surface_mass_balance_char function.

* bprime \f$-T\f$ \f$T_1\f$:\f$\Delta T\f$:\f$T_2\f$ \f$-p\f
* \f$p\f$ \f$-b\f \f$B'_g\f$ \f$-m\f mixture \f$-bl\f BL \f$-py \f Pyrolysis
*
* \f$-cp \f CondencedPhase
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling: Condenced -> condensed throughout.

Bc = (p_Yke[ic] + Bg*p_Ykg[ic] - ywc*(1.0 + Bg)) / (ywc - 1.0);
Bc = std::max(Bc, 0.0);
Bc = (Bg*(sum_Yg - sum_Yw) + sum_Ye - sum_Yw)/(sum_Yw - sum_YCp);
Bc = std::max(Bc, 1.0e-8);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the new floor of 1e-8?

void surfaceMassBalance(
const double *const p_Yke, const double *const p_Ykg, const double T,
const double P, const double Bg, double &Bc, double &hw,
const double *const p_Yke, const double *const p_Ykg, const double *const p_Ycp,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change to the API; the version number of Mutation++ should be updated to reflect this, from 1.1.3 to 1.2, or even 2.0 (if we are following semantic versioning).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants