-
Notifications
You must be signed in to change notification settings - Fork 849
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
Species transport solver (passive for now) #1388
Conversation
Note that sources are empty for now. Axissymmetric source terms will be added later.
Right now, checking of these options is missing. Options also have to be added to the config_template once everything else is finalized.
Please note that Multizonedriver is not tested yet. Single and Multizonedriver get SetInitialCondition function which might be superfluous - needs checking.
The output should be able to handle arbitrary many species and should prob be generalized for comp and inc solvers to avoid code duplication.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was quick 🥇
Plus a tiny cfg change.
Deleting empty destructors Const-ing some code parts OMP ready container positions in CDriver Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
Removing unnecessary (void) Const-ing some return pointers Renamming enum class entry NO_SCALAR_MODEL to NONE
Alright, I think I am finished with this PR. Big thanks so far pedro, for all the comments, help, code suggestions and contributions 🤝 In case you have some final comments let me know |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor comments below on the recent changes, very nice addition 🥇
TestCases/species_regression.py
Outdated
species3_primitiveVenturi.test_vals = [-6.028145, -5.258104, -5.107927, -5.922051, -1.582604, -14.539029, -14.809699, 5, -0.808615, 5, -2.351160, 5, -0.288300, 1.645644, 0.499064, 0.601230, 0.545351] | ||
species3_primitiveVenturi.test_vals = [-6.028145, -5.258104, -5.107927, -5.922051, -1.582604, -6.314220, -6.431771, 5, -0.808615, 5, -2.351160, 5, -0.288300, 1.645644, 0.499064, 0.601230, 0.545351] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is any of the tests using the compressible solver?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, I don't have one. Tbh i never even ran a compressible case 🙊 I'll give it a try and report
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok i adatpted the rans/flatplate_SA to include some species inlet (with manually adapted inlet file to include something funny to happen). 0d37b2a I did not adapt the cfg too crazy to stay close to the original one. That is a task for another day
@@ -641,96 +756,13 @@ void CFlowOutput::SetAnalyzeSurface(const CSolver* const*solver, const CGeometry | |||
} | |||
|
|||
/*--- Set values on markers ---*/ | |||
for (iMarker_Analyze = 0; iMarker_Analyze < nMarker_Analyze; iMarker_Analyze++) { | |||
for (unsigned short iMarker_Analyze = 0; iMarker_Analyze < nMarker_Analyze; iMarker_Analyze++) { | |||
su2double SpeciesVariance = Surface_SpeciesVariance_Total[iMarker_Analyze]; | |||
SetHistoryOutputPerSurfaceValue("SURFACE_SPECIES_VARIANCE", SpeciesVariance, iMarker_Analyze); | |||
Tot_Surface_SpeciesVariance += SpeciesVariance; | |||
// Set value into config. Necessary to access as an OF. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's actually not needed, you can get it from the output, check if you can make the config const please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am currently following the template which is used to set the OF for the DA. I actually used the Config to set the variance OF for this #1388 (comment) below. So I keep that in mind for the adjoint PR that will come next
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I would postpone this thought to the species adjoint PR
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
This pull request introduces 1 alert and fixes 2 when merging d7757db into 42dcf5a - view on LGTM.com new alerts:
fixed alerts:
|
Proposed Changes
Hi all,
This PR implements a passive species transport solver. The passive means, that the mass fraction at each location does not influence any fluid-properties and thereby the mean flow (which reminds me that this is a good sanity check to compare mean flow residuals).
A new
CSpeciesSolver
andCSpeciesVariable
were added based on theCScalar*
things done in #1330 . Additionallyspecies_convection/diffusion/sources
were added just as it is the case for the turbulence solver (both based on the general scalar* framework)Please note that prob ~1000 lines are cfg's, README's, helping scripts.
Related Work
Preliminary work was done in #1330 with creating a base class for scalar transport equations.
#1223 and #1332 already mostly implement the here shown species solver and big chunks were copied over from there, but they are not based on the new CScalarSolver. In order to chunk the work for these branches this PR will not contain any species mixing properties or TableLookUps.
After this PR #1332 will be tackled next. Whether we try to merge develop then into those branches or copy stuff over in a new branch will be seen when we get there.
PR Checklist