Enabling to pass surface composition for B' calculation#279
Open
capriatim wants to merge 3 commits intomutationpp:masterfrom
Open
Enabling to pass surface composition for B' calculation#279capriatim wants to merge 3 commits intomutationpp:masterfrom
capriatim wants to merge 3 commits intomutationpp:masterfrom
Conversation
Collaborator
mgoodson-cvd
left a comment
There was a problem hiding this comment.
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(); |
Collaborator
There was a problem hiding this comment.
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 |
Collaborator
There was a problem hiding this comment.
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); |
Collaborator
There was a problem hiding this comment.
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, |
Collaborator
There was a problem hiding this comment.
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.