Skip to content

Conversation

@jtneedels
Copy link
Contributor

Proposed Changes

Setting MUSCL reconstruction in CNEMOEulerSolver to use the minimum limiter val for all primitives, consistent with the feature_NEMO branch, to try and address issues with non-physical points using MUSCL with the NEMO solver in Develop.

Related Work

PR Checklist

Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with the '-Wall -Wextra -Wno-unused-parameter -Wno-empty-body' compiler flags, or simply --warnlevel=2 when using meson).
  • My contribution is commented and consistent with SU2 style.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp) , if necessary.

Signed-off-by: jtneedels <jneedels@stanford.edu>
@pr-triage pr-triage bot added the PR: draft label Nov 8, 2021
@jtneedels jtneedels changed the base branch from master to develop November 8, 2021 01:27
@WallyMaier WallyMaier changed the title Set MUSCL Reconstruction for NEMO in Develop to use smallest limiter val for all primitives [WIP] Set MUSCL Reconstruction for NEMO in Develop to use smallest limiter val for all primitives Nov 9, 2021
Signed-off-by: jtneedels <jneedels@stanford.edu>
@jtneedels
Copy link
Contributor Author

jtneedels commented Nov 17, 2021

So instead of using arrays, since we are only choosing the smallest limiter value, it seems like we can just store a local variable in computing the Van Albada limiter. Does this look okay?. I have the feeling we want to generalize this for other limiters in the future, but this seems like the most efficien option for an implementation in CNEMOEulerSolver.

@lgtm-com
Copy link

lgtm-com bot commented Nov 17, 2021

This pull request introduces 1 alert when merging 9d134dd into a4836f4 - view on LGTM.com

new alerts:

  • 1 for Empty branch of conditional

Signed-off-by: jtneedels <jneedels@stanford.edu>
Signed-off-by: jtneedels <jneedels@stanford.edu>
@jtneedels
Copy link
Contributor Author

jtneedels commented Nov 18, 2021

I think this is working now, I'm seeing some non-physical reconstructed points initially for the axi_viscone test case, but these seem to go away after a few hundred iters using Van Albada. The solution looks physical. I'd like to change the regression tests to support these new values, but it would be great if everyone could double-check this before I make that change.

@lgtm-com
Copy link

lgtm-com bot commented Nov 18, 2021

This pull request introduces 1 alert when merging 8d3281c into a4836f4 - view on LGTM.com

new alerts:

  • 1 for Empty branch of conditional

Signed-off-by: jtneedels <jneedels@stanford.edu>
Copy link
Member

@pcarruscag pcarruscag left a comment

Choose a reason for hiding this comment

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

No need to generalize to other solvers IMO

Comment on lines +490 to +491
su2double dTvedU_i[MAXNVAR] = {0.0}, dTvedU_j[MAXNVAR] = {0.0};
su2double Eve_i[MAXNVAR] = {0.0}, Eve_j[MAXNVAR] = {0.0};
Copy link
Member

Choose a reason for hiding this comment

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

fyi these are not heap allocations, static arrays are on the stack and they do not cost anything to allocate.

jtneedels and others added 5 commits November 18, 2021 09:08
Signed-off-by: jtneedels <jneedels@stanford.edu>
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
Copy link
Contributor

@WallyMaier WallyMaier left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for doing this!

Could you possibly post a before and after of a basic test case?

/*--- Set the default convergence field --- */

if (convFields.empty() ) convFields.emplace_back("RMS_DENSITY");
if (convFields.empty() ) convFields.emplace_back("RMS_DENSITY_0");
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

@jtneedels
Copy link
Contributor Author

jtneedels commented Nov 20, 2021

LGTM! Thanks for doing this!

Could you possibly post a before and after of a basic test case?

before and after for the residuals? Or for the solution?

Here are the residuals for the serial regression of the axisymmetric viscous cone:

image

jtneedels and others added 4 commits November 21, 2021 17:13
Signed-off-by: jtneedels <jneedels@stanford.edu>
Signed-off-by: jtneedels <jneedels@stanford.edu>
Signed-off-by: jtneedels <jneedels@stanford.edu>
Signed-off-by: jtneedels <jneedels@stanford.edu>
@jtneedels
Copy link
Contributor Author

Hi @pcarruscag , I notice that I get very slightly different residuals for the parallel regression running with 2 cores on my laptop vs in the Github regression test. @WallyMaier said this might be due to difference in partitioning, should I just use the residual values from the Github regression so the test passes, or are there other checks I should run?

@pcarruscag
Copy link
Member

More likely to be due to compiler differences, yes please take the values from the github tests.

Signed-off-by: jtneedels <jneedels@stanford.edu>
@jtneedels jtneedels marked this pull request as ready for review November 24, 2021 00:08
@pr-triage pr-triage bot removed the PR: draft label Nov 24, 2021
@jtneedels jtneedels changed the title [WIP] Set MUSCL Reconstruction for NEMO in Develop to use smallest limiter val for all primitives Set MUSCL Reconstruction for NEMO in Develop to use smallest limiter val for all primitives Nov 24, 2021
@jtneedels jtneedels requested a review from WallyMaier November 24, 2021 02:17
Copy link
Contributor

@WallyMaier WallyMaier left a comment

Choose a reason for hiding this comment

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

LGTM!

@jtneedels jtneedels merged commit 60b91d7 into develop Nov 24, 2021
@jtneedels jtneedels deleted the dev_nemo_muscl_fix branch November 24, 2021 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants