-
Notifications
You must be signed in to change notification settings - Fork 35
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
Aero-acoustics from analytical CFD solutions or an analytical expression of the source term #659
Conversation
include/exadg/aero_acoustic/calculators/source_term_calculator.h
Outdated
Show resolved
Hide resolved
include/exadg/aero_acoustic/calculators/source_term_calculator.h
Outdated
Show resolved
Hide resolved
include/exadg/aero_acoustic/single_field_solvers/analytical_time_int_fluid.h
Outdated
Show resolved
Hide resolved
include/exadg/functions_and_boundary_conditions/evaluate_functions.h
Outdated
Show resolved
Hide resolved
include/exadg/aero_acoustic/single_field_solvers/analytical_time_int_fluid.h
Outdated
Show resolved
Hide resolved
I looked at the code and I think the "time integrator" suggested here is an elegant way to achieve what you need here. As detailed in the comments, I see some points of discussion regarding the usage of lambda functions and the design/naming of parameters. |
@nfehn Thank you for the review. I adjusted the code. Introducing a version of |
include/exadg/incompressible_navier_stokes/spatial_discretization/spatial_operator_base.cpp
Show resolved
Hide resolved
velocity.zero_out_ghost_values(); | ||
pressure.zero_out_ghost_values(); |
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 is not clear to me why we have these lines of code here, while we do not have them e.g. in the function prescribe_initial_conditions()
above.
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 will move the line to the analytical time integrator:)
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 fine with this. I think a comment explaining why we have/need these lines of code would help me to better understand the code (e.g.: what would happen if one forgot to write these lines of code? segmentation-fault or performance penalty or ...?).
We can also do this as a follow-up so that we can merge the present PR soon.
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.
dealii::VT::interpolate()
simply throws an exception with zeroed out ghost values. During time stepping the vectors are not zeroed out though, so we have to care about that ourselves.
@jh66637 Many thanks for your updates (and sorry for my late response, I was on holidays ...). I like the changes. I have one more comment regarding code duplication. |
or analytical cfd solution
5efc732
to
f9ff14a
Compare
The co-rotating vortex test case is quite nice to benchmark different coupling algorithms for aero-acoustics since an analytical CFD solution is known in addition to an analytical solution for the acoustics in the far field. Additionally, it is possible to derive an analytical expression of the aero-acoustic source term.
We have used this procedure successfully to gain insight into the advantages and disadvantages of different coupling strategies.
This PR introduces two methods to compute the acoustic propagation from analytical solutions.
AnalyticalTimeIntegrator
. This way, we do not have to check at numerous places if the analytical solution should be used instead of a computed one.AnalyticalTimeIntegrator
in this case as well. However, the source term is now computed from the analytical function of the source term instead of the analytical CFD solution.In my opinion, this PR is a prerequisite for some follow-up PRs that introduce different volume coupling algorithms.