Repository navigation
[WIP] Fix the HLLC scheme on moving grids and its Jacobians #2943
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
Draft
rois1995
wants to merge
4
commits into
fix_underrelaxation_factor
Choose a base branch
from
fix_hllc_moving_grids
base: fix_underrelaxation_factor
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
a59d827
Compute HLLC on moving grids in the frame of the face, fix its Jacobians
e323f4c
Merge fix_underrelaxation_factor into fix_hllc_moving_grids
d2701a8
Merge remote-tracking branch 'origin/fix_underrelaxation_factor' into…
4960dd0
Fix HLLC supersonic Jacobians for reconstructed face enthalpy
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,6 +39,7 @@ | |
| class CUpwHLLC_Flow final : public CNumerics { | ||
| private: | ||
| bool implicit, dynamic_grid; | ||
| bool useAccurateJacobian; /*!< \brief Jacobians computed exactly for fixed wave speeds (USE_ACCURATE_FLUX_JACOBIANS). */ | ||
| unsigned short iDim, jDim, iVar, jVar; | ||
|
|
||
| su2double *IntermediateState; | ||
|
|
@@ -55,6 +56,8 @@ class CUpwHLLC_Flow final : public CNumerics { | |
| su2double *dSm_dU, *dPI_dU, *drhoStar_dU, *dpStar_dU, *dEStar_dU; | ||
|
|
||
| su2double* Flux; /*!< \brief The flux accross the face. */ | ||
| bool fixedWaveSpeeds = false; /*!< \brief Use fixed_sL, fixed_sR as wave speeds (verification of the Jacobians). */ | ||
| su2double fixed_sL = 0.0, fixed_sR = 0.0; | ||
| su2double** Jacobian_i; /*!< \brief The Jacobian w.r.t. point i after computation. */ | ||
| su2double** Jacobian_j; /*!< \brief The Jacobian w.r.t. point j after computation. */ | ||
|
|
||
|
|
@@ -79,6 +82,18 @@ class CUpwHLLC_Flow final : public CNumerics { | |
| */ | ||
| ResidualType<> ComputeResidual(const CConfig* config) override; | ||
|
|
||
| /*! | ||
| * \brief Fix the left and right wave speeds (relative to the face), for the verification of the Jacobians, which | ||
| * treat them as constants. | ||
| * \param[in] active - Use the fixed values. | ||
| * \param[in] val_sL, val_sR - Left and right wave speeds. | ||
| */ | ||
| inline void SetFixedWaveSpeeds(bool active, su2double val_sL, su2double val_sR) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If these are only used for the unit test they should not be in the public API |
||
| fixedWaveSpeeds = active; | ||
| fixed_sL = val_sL; | ||
| fixed_sR = val_sR; | ||
| } | ||
|
|
||
| }; | ||
|
|
||
| /*! | ||
|
|
@@ -91,6 +106,7 @@ class CUpwHLLC_Flow final : public CNumerics { | |
| class CUpwGeneralHLLC_Flow final : public CNumerics { | ||
| private: | ||
| bool implicit, dynamic_grid; | ||
| bool useAccurateJacobian; /*!< \brief Jacobians computed exactly for fixed wave speeds (USE_ACCURATE_FLUX_JACOBIANS). */ | ||
| unsigned short iDim, jDim, iVar, jVar; | ||
|
|
||
| su2double *IntermediateState; | ||
|
|
@@ -108,6 +124,8 @@ class CUpwGeneralHLLC_Flow final : public CNumerics { | |
| su2double *dSm_dU, *dPI_dU, *drhoStar_dU, *dpStar_dU, *dEStar_dU; | ||
|
|
||
| su2double* Flux; /*!< \brief The flux accross the face. */ | ||
| bool fixedWaveSpeeds = false; /*!< \brief Use fixed_sL, fixed_sR as wave speeds (verification of the Jacobians). */ | ||
| su2double fixed_sL = 0.0, fixed_sR = 0.0; | ||
| su2double** Jacobian_i; /*!< \brief The Jacobian w.r.t. point i after computation. */ | ||
| su2double** Jacobian_j; /*!< \brief The Jacobian w.r.t. point j after computation. */ | ||
|
|
||
|
|
@@ -132,6 +150,18 @@ class CUpwGeneralHLLC_Flow final : public CNumerics { | |
| */ | ||
| ResidualType<> ComputeResidual(const CConfig* config) override; | ||
|
|
||
| /*! | ||
| * \brief Fix the left and right wave speeds (relative to the face), for the verification of the Jacobians, which | ||
| * treat them as constants. | ||
| * \param[in] active - Use the fixed values. | ||
| * \param[in] val_sL, val_sR - Left and right wave speeds. | ||
| */ | ||
| inline void SetFixedWaveSpeeds(bool active, su2double val_sL, su2double val_sR) { | ||
| fixedWaveSpeeds = active; | ||
| fixed_sL = val_sL; | ||
| fixed_sR = val_sR; | ||
| } | ||
|
|
||
| /*! | ||
| * \brief Compute the Average quantities for a general fluid flux between two nodes i and j. | ||
| * Using the approach of Vinokur and Montagne' | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Given the two behaviours here for AUSM/SLAU and HLLC, I think it would be better to split these into two separate options.