-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add frequency (Hz) coordinate to datasets #456
Comments
We could completely support
This fifth case is making the code a bit longer but not more complicated. But I don't know if it is worth it, given that the conversion from omega is straightforward. |
Thanks @mancellin! As far as how useful this is, it might be good to let others weigh in. I definitely do present plots like this with frequency in Hz because I find it easier to interpret (no need to divide by |
I agree with you @ryancoe Prof. Salter once chastised me for plotting hydrodynamic coefficients as a function of rad/s..."engineers have a hard time thinking in rad/s...its much easier for them to understand if you plot these in Hz or S"
@mancellin it used to be more common back in the day - the Edinburgh Wave Power Project used seconds extensively (e.g. Pizer - Numerical Modelling of Wave Energy Absorbers: |
I guess it really depends on who you are working with. For practical reports and presentations, I always use seconds (like above). |
Well, that is an example of using periods in seconds (already implemented in Capytaine). My question was about frequencies in Hertz. But if several of you find useful to add that, I won't refuse a PR. |
I think the consensus seems to be towards Hz being the best of both worlds..., but I still personally find rad/s quite useful. The dynamic response shows up as a well distributed lobe, it is easier to interpret phases and how it relates to excitations, easy to map it to diff equations, and to Laplace domain, especially for applications where I want to see the resonant peaks, such as controls. Whereas the periods way, plots it the other way round... slow/large waves on the left and fast/short waves on the right.... Again a matter of preference and application... @mancellin BEM Rosetta seems to switch between these worlds quite quickly and seamlessly. A tighter integration with Rosetta, might be an expedient route. |
I often do the following after running the Capytaine solver:
which allows me to more easily make plots with the
x_label
beingFrequency [Hz]
by usingda.plot(x='freq', ...)
, e.g.,Looking at the source (for the first time in a while...), I think this could be handled cleanly in
xarray.py
in two ways:frequency
to thefrequency_keys
-- this would allow the user to formulate problems usingfrequency
in addition to the existing options.capytaine/capytaine/io/xarray.py
Line 77 in f5f0b9f
assemble_dataset
function to add thefrequency
coordinate to the results of any problem.I can definitely do 2, and probably do 1 with some guidance. Any thoughts @mancellin?
The text was updated successfully, but these errors were encountered: