Skip to content

Commit

Permalink
Merge branch 'petrobras:master' into dev-sync_ucs_map
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandarossi authored May 2, 2023
2 parents 0a11c0c + 18c64c3 commit bbef430
Show file tree
Hide file tree
Showing 12 changed files with 249 additions and 106 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.7
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Rotordynamic Open Source Software (ROSS)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ross-rotordynamics/ross/1.3.0?filepath=%2Fdocs%2Ftutorials)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ross-rotordynamics/ross/1.4.0?filepath=%2Fdocs%2Ftutorials)
![github actions](https://github.com/ross-rotordynamics/ross/workflows/Tests/badge.svg)
[![Documentation Status](https://readthedocs.org/projects/ross/badge/?version=latest)](https://ross.readthedocs.io/en/latest/?badge=latest)
<a href="https://codecov.io/gh/ross-rotordynamics/ross">
Expand Down
2 changes: 2 additions & 0 deletions docs/release_notes/release_notes.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Release notes
=============

.. include:: version-1.4.0.rst
.. include:: version-1.3.0.rst
.. include:: version-1.2.0.rst
.. include:: version-1.1.0.rst
.. include:: version-1.0.0.rst
Expand Down
18 changes: 18 additions & 0 deletions docs/release_notes/version-1.4.0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Version 1.4.0
-------------

The following enhancements and bug fixes were implemented for this release:


Fix y label for frequency response plots
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Fix the y label for the frequency response plots, showing 'magnitude' instead of displacement, velocity or acceleration.


Documentation improvements
^^^^^^^^^^^^^^^^^^^^^^^^^^

Documentation improvements in the tutorials and class/functions missing from the API reference.


3 changes: 2 additions & 1 deletion ross/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.3.0"
__version__ = "1.4.0"
from plotly import io as _pio

import ross.plotly_theme
Expand All @@ -8,6 +8,7 @@
from .disk_element import *
from .materials import *
from .point_mass import *
from .probe import *
from .results import *
from .rotor_assembly import *
from .shaft_element import *
Expand Down
49 changes: 49 additions & 0 deletions ross/probe.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
from ross.units import Q_, check_units


class Probe:
"""Class of a probe.
This class will create a probe object to be used in the rotor model.
The probe is used to measure the response of the rotor at a specific
location and orientation.
Parameters
----------
node : int
Indicate the node where the probe is located.
angle : float, pint.Quantity
Probe orientation angle about the shaft (rad).
tag : str, optional
A tag to name the element.
Example
-------
>>> import ross as rs
>>> probe1 = rs.Probe(10, Q_(45, "degree"), "Probe Drive End - X")
>>> probe1.node
10
>>> probe1.angle
0.7853981633974483
"""

@check_units
def __init__(self, node, angle, tag=None):
self.node = node
self.angle = angle
if tag is None:
self.tag = f"Probe - Node {self.node}, Angle {self.angle}"
else:
self.tag = tag

@property
def info(self):
return self.node, self.angle

def __str__(self):
return (
f"Probe {self.tag}"
f'\n{20*"-"}'
f"\nNode location : {self.node}"
f"\nProbe orientation angle (rad) : {self.angle}"
)
Loading

0 comments on commit bbef430

Please sign in to comment.