-
Notifications
You must be signed in to change notification settings - Fork 47
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
Minor fix for NekBinnedPlaneIntegral use in non-dimensional cases #882
base: devel
Are you sure you want to change the base?
Conversation
Job Precheck on 9ef4fff wanted to post the following: Your code requires style changes. A patch was auto generated and copied here
Alternatively, with your repository up to date and in the top level of your repository:
|
Job Documentation on 8b8e8c4 wanted to post the following: View the site here This comment will be updated on new commits. |
@@ -171,7 +171,7 @@ NekBinnedPlaneIntegral::executeUserObject() | |||
|
|||
// correct the values to areas | |||
for (unsigned int i = 0; i < _n_bins; ++i) | |||
_bin_values[i] /= _gap_thickness; | |||
_bin_values[i] /= (_gap_thickness * nekrs::referenceLength()); |
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.
shouldn't it be divided by, not multiplied? That way, _gap_thickness
is always specified in dimensional form (like the rest of the quantities in NekRSProblem
).
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 have been treating _gap_thickness
as non-dimensional when the mesh has been non-dimensionalized. After scaling the mesh in the usr
file, I have noticed that treating gap_thickness
as dimensional results in errors like:
The following error occurred in the UserObject 'pressure_planar_integral' of type NekBinnedPlaneIntegral.
Failed to map any GLL points to bin 1!
I have had better luck treating it as non-dimensional when the mesh has been non-dimensionalized. However, that means at the end of the process, it needs to be re-dimensionalized so that after dimensionalizeVolume
acts on the integral and multiplies it by L_ref^3
, the division by L_ref
at the end results in a final scaling factor of L_ref^2
for the area. I have verified this by using Nek's internal routines to calculate the same area.
Please let me know if the intended usage is different.
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 also prefer treating _gap_thickness
as non-dimensional when the mesh is non-dimensional because I can get a sense of the gap thickness directly from the Nek output field files.
Small fix that dimensionalises the
_gap_width
parameter for use with non-dimensional cases. Without it, the volume integral from the bins gets multiplied byL_ref^3
, resulting in incorrect scaling for a userobject that should ultimately yield an area (for an appropriategap_width
).