Skip to content
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

Tilting-pad thermo-hidro-dynamic bearing models #690

Closed
wants to merge 145 commits into from

Conversation

verg1lio
Copy link
Contributor

@verg1lio verg1lio commented Oct 13, 2020

Creation of the hydrodynamic tilting-pad bearing model for their properties determination inside ROSS.

This is a WIP, currently being ported to Python from a functional and validated Matlab code. The code is in Running through all relevant formulation. The current development target is the post-processing phase, translating the bearing fields into practical K and C coefficients.

@verg1lio verg1lio changed the title WIP: Dev tilting-pad bearing models WIP: Tilting-pad hidrodynamic bearing models Oct 13, 2020
@verg1lio
Copy link
Contributor Author

Hello and good afternoon!

This is the pull request created for the tilting pad bearings model we are implementing. Since we have a working code on Matlab, it is a matter of translating and converting it to object-oriented programming style. This work has been started recently, and should take some time until it nears its completion, but if possible, we would like to request a sample of the results you obtain from your commercial code, so that we can standardize our code outputs.

Changes in the output generation will undoubtedly incur in many structural modifications inside the code, so the sooner we have a defined standard to follow the better. We have a sample of this that has been provided for the cylindrical bearing model, and a similar one for the tilting-pad bearing should be enough to set the standard for this code too.

Thanks in advance, and have a great evening!

(@bela-bs , @marcusfilipesr , @hiagopinacio , @raphaeltimbo , @rodrigomoliveira1 )

@elyqg
Copy link
Contributor

elyqg commented Oct 14, 2020

Hello everyone. I am joining you in this work. Any questions about hydrodynamic bearing will be available to help.

@verg1lio
Copy link
Contributor Author

Hello everyone. I am joining you in this work. Any questions about hydrodynamic bearing will be available to help.

@elyqg is our expert on the bearing models, and both me (@verg1lio) and @marcusfilipesr will be assisting on the coding and debug.

@rodrigomoliveira1
Copy link
Collaborator

Hello, @verg1lio, good morning.

It's a very nice initiative. Besides, I think @JuliaMota and @davidjgm can help you out, since they work mainly with the FluidFlow code.

@rodrigomoliveira1 rodrigomoliveira1 linked an issue Oct 26, 2020 that may be closed by this pull request
@verg1lio
Copy link
Contributor Author

Hello there!

Just a quick update here... I have been translating the iterative loops to build the variable fields inside the bearings, and since they are all one inside the other and very much recursive in nature, they will be done all at once. So, on Trello (https://trello.com/c/zm7tJ29x/11-bearing-tilting-pad-thermohydrodynamic) my Tilting pad bearing card will be updated in a burst when the loops are done. After that the process should be more streamlined, but until then i'll focus here to get it right.

Hope you guys are having a productive week!

verg1lio and others added 2 commits February 12, 2021 15:28
Co-authored-by: Marcus Filipe Sousa Reis <marcusfilipesr@gmail.com>
Co-authored-by: Marcus Filipe Sousa Reis <marcusfilipesr@gmail.com>
@ross-bott
Copy link
Collaborator

Hi there!
I have marked this issue as stale because it has not had activity for 45 days.
Consider the following options:

  • If the issue refers to a large task, break it in smaller issues that can be solved in
    less than 45 days;
  • Label the issue as wontfix or wontfix for now and close it.

@ross-bott ross-bott added the stale Issues with no activity for a long period label Mar 31, 2021
@verg1lio
Copy link
Contributor Author

Dear all (@raphaeltimbo , @marcusfilipesr , @hiagopinacio , @elyqg , @bela-bs ), good morning!

This THD tilting pad bearing model is accurately matching our results from other methodologies and previous benchmarks found in the specific literature. I believe it is ready for merging in the main ROSS code.

Is there something else to make on it or we can proceed with the merging?

Thanks, and have a great day!

P.S. I am working locally on the THD thrust tilting pad bearing model, and should finish its rough translation soon. Once that is done it will be committed to its branch for debugging and corrections to its code.

@verg1lio
Copy link
Contributor Author

Dear all (@raphaeltimbo , @marcusfilipesr , @hiagopinacio , @elyqg , @bela-bs ), good morning!

This THD tilting pad bearing model is accurately matching our results from other methodologies and previous benchmarks found in the specific literature. I believe it is ready for merging in the main ROSS code.

Is there something else to make on it or we can proceed with the merging?

Thanks, and have a great day!

P.S. I am working locally on the THD thrust tilting pad bearing model, and should finish its rough translation soon. Once that is done it will be committed to its branch for debugging and corrections to its code.

I have also provided the relevant information for a simulation on MaxBRG for comparison, but never got the results back. I therefore utilized literature benchmarks and experimental tests performed in our lab (LMEst) for this model validation. The code IS VALIDATED both experimentally and numerically, as of today, matching our benchmark results to its numerical precision.

@verg1lio
Copy link
Contributor Author

Dear @raphaeltimbo, I hope to find you in better health!

We (@verg1lio and @elyqg) will take this week to add the K and C coefficients determination to this methodology, adapting the modular code made for the THD cylindrical bearings model. I will get back to you once its done, to remove the WIP from here and do the final conference and merge.

Cheers!

@raphaeltimbo
Copy link
Collaborator

Hi @verg1lio ! Thank you for the message.
Ok. Let me know if you need any help in the implementation.

@verg1lio verg1lio changed the title WIP: Tilting-pad thermo-hidro-dynamic bearing models Tilting-pad thermo-hidro-dynamic bearing models Apr 20, 2021
@verg1lio
Copy link
Contributor Author

Dear @raphaeltimbo , good morning!

I believe that this function is now finished and ready for merging. @elyqg and I did the inclusion of the K and C coefficients determination procedure to it, and it is working as intended. If there is any modification or correction still to be done, please let us know.

I am currently doing the hard translation of the Thrust THD bearing model from Matlab to Python, and have about a third of it done as of now. In the next few weeks I will upload the translated code to our Thrust bearing branch and start the debugging.

Have a great day!

@raphaeltimbo raphaeltimbo removed the stale Issues with no activity for a long period label Apr 20, 2021
Copy link
Collaborator

@raphaeltimbo raphaeltimbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @verg1lio !
I have added some comments to the tilting_pad.py file.
Also, notice that the CI is failing because the code has not been formated with black.
Additionally, we will need to have a class that will inherit from BearingElement and implements the .K() and .C() methods so that the user can add a tilting pad bearing to their model.
See here how this was done to the fluidflow bearing:
https://github.com/ross-rotordynamics/ross/blob/09ace08c6aed999bdf9ded887690637f92dad0e5/ross/bearing_seal_element.py#L917

This part we could do in a separate PR in the future.

from decimal import Decimal


class Tilting:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add documentation to the Class explaining how the user should provide each argument to instantiate an object.
Also, I think a name such as class TiltingPadBearing would be more descriptive.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, i changed the name and am adding the documentation atm.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, the example details will be added in the next PR, but all the variables are described in detail and with relevant units indicated.

Comment on lines 539 to 543
## Pressure border conditions ====================================================
# for i in range(0, self.nZ - 1): # Loop in Z
# for j in range(0, self.ntheta - 1): # Loop in THETA
# if P[i, j] < 0:
# P[i, j] = 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove code that is commented out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Comment on lines 1224 to 1227
matcoef_test = np.loadtxt(
"/home/verg1lio/Desktop/ross/ross/fluid_flow/matcoef.txt"
)
b_test = np.loadtxt("/home/verg1lio/Desktop/ross/ross/fluid_flow/b.txt")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These paths won't work in other systems.
Do we need to have the matcoef and b files in the repository?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not need them, these were validation files, and did their job just fine. I'm keeping the testing code there commented out, just in case we need to do the same task once merged into the main ROSS code.


def run(self):
Fhx, Fhy = self._forces()
print(f"Fhx = {Fhx}\nFhy = {Fhy}\n")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend removing all the print from the code.
These can be very useful for debugging, but at the final code the user might not be interested in these print and it may clutter there shell/ide when running the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I am commenting them in case debugging is needed in the next PR.

Comment on lines 1490 to 1606
psi_pad = np.array([x[0], x[1], x[2], x[3], x[4], x[5]])
npad = 6

# Radial clearance
Cr = 250e-6

# Oil tank temperature
Tcuba = 40

alpha = 0 # * (2 * np.pi * 5) * alpha

# Geometric parameters for the bearing --------------------------------------------
# Journal radius
R = 0.5 * 930e-3

# Pad radius
Rs = 0.5 * 934e-3 # [m]

# Pad thickness
esp = 67e-3 # [m]

# Pad arc
betha_s = 25 # [degree]

# Pivot position (arc pivot/arc pad)
rp_pad = 0.6

# Bength of bearing
L = 197e-3 # [m]

# Angular position of the pivots [degrees]
sigma = np.array([0, 60, 120, 180, 240, 300])

# Bearing loading
fR = 90.6e3 # [N]

# Rotor speed
wa = 300 # [rpm]

# Reference temperature
T_ref = Tcuba # [Celsius]

# Thermal properties for the oil ----------------------------------------------------
# Thermal conductivity
kt = 0.07031 * np.exp(484.1 / (Tcuba + 273.15 + 474)) # [J/s.m.C]

# Specific heat
Cp = (16.5 * np.exp(-2442 / (Tcuba + 273.15 + 829.1))) * 1e3 # [J/kgC]

# Specific mass
rho = 0.04514 * np.exp(9103 / (Tcuba + 273.15 + 2766)) * 1e3 # [kg/m**2]

# Reference viscosity
# mi_ref=0.0752
mi_ref = 5.506e-09 * np.exp(5012 / (Tcuba + 273.15 + 0.1248)) # [N.s/m**2]

# Bearing Position ---------------------------------------------------------

# Discretized Mesh ------------------------------------------------------

# Number of volumes in theta direction
ntheta = 48

# Number of volumes in x direction
nX = ntheta

# Number of volumes in z direction
nZ = 48

# Number of volumes in neta direction
nN = 30

mancal = Tilting(
R,
Rs,
esp,
betha_s,
rp_pad,
L,
sigma,
fR,
wa,
kt,
Cp,
rho,
mi_ref,
E,
phi,
psi_pad,
npad,
Cr,
alpha,
Tcuba,
ntheta,
nX,
nZ,
nN,
)
mancal.run()
# mancal.coefficients()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a test file and move this part of the code to there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, this is the next task in line. It should be done in a bit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! I will run a few tests with it and leave some default values for conference of code validity.

@raphaeltimbo
Copy link
Collaborator

Hi @verg1lio !
You have some doc tests failing for this PR. You can check that by clicking 'Details' in the Tests / build actions above.
As an example:

=================================== FAILURES ===================================
______ [doctest] ross.fluid_flow.tilting_pad.tilting_pad_bearing_example _______
1577     This function returns pressure and temperature fields as well as the dynamic 
1578     coefficients. The purpose is to make available a simple model so that a doctest 
1579     can be written using it.
1580     Returns
1581     -------
1582     TiltingPadBearing : ross.TiltingPadBearing Object
1583         An instance of a termo-hydrodynamic tilting pad bearing model object.
1584     Examples
1585     --------
1586     >>> bearing = tilting_pad_bearing_example()
UNEXPECTED EXCEPTION: AttributeError("'TiltingPadBearing' object has no attribute 'equilibrium_pos'")
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.10/x64/lib/python3.8/doctest.py", line 1336, in __run
    exec(compile(example.source, filename, "single",
  File "<doctest ross.fluid_flow.tilting_pad.tilting_pad_bearing_example[0]>", line 1, in <module>
  File "/home/runner/work/ross/ross/ross/fluid_flow/tilting_pad.py", line 1674, in tilting_pad_bearing_example
    THD_tilting_pad.coefficients()
  File "/home/runner/work/ross/ross/ross/fluid_flow/tilting_pad.py", line 1459, in coefficients
    if self.equilibrium_pos is None:
AttributeError: 'TiltingPadBearing' object has no attribute 'equilibrium_pos'

@verg1lio
Copy link
Contributor Author

Hi @verg1lio !
You have some doc tests failing for this PR. You can check that by clicking 'Details' in the Tests / build actions above.
As an example:

=================================== FAILURES ===================================
______ [doctest] ross.fluid_flow.tilting_pad.tilting_pad_bearing_example _______
1577     This function returns pressure and temperature fields as well as the dynamic 
1578     coefficients. The purpose is to make available a simple model so that a doctest 
1579     can be written using it.
1580     Returns
1581     -------
1582     TiltingPadBearing : ross.TiltingPadBearing Object
1583         An instance of a termo-hydrodynamic tilting pad bearing model object.
1584     Examples
1585     --------
1586     >>> bearing = tilting_pad_bearing_example()
UNEXPECTED EXCEPTION: AttributeError("'TiltingPadBearing' object has no attribute 'equilibrium_pos'")
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.10/x64/lib/python3.8/doctest.py", line 1336, in __run
    exec(compile(example.source, filename, "single",
  File "<doctest ross.fluid_flow.tilting_pad.tilting_pad_bearing_example[0]>", line 1, in <module>
  File "/home/runner/work/ross/ross/ross/fluid_flow/tilting_pad.py", line 1674, in tilting_pad_bearing_example
    THD_tilting_pad.coefficients()
  File "/home/runner/work/ross/ross/ross/fluid_flow/tilting_pad.py", line 1459, in coefficients
    if self.equilibrium_pos is None:
AttributeError: 'TiltingPadBearing' object has no attribute 'equilibrium_pos'

Good morning @raphaeltimbo , and thanks for the input!

I will get to work on this right away, and work out the details for it to be successfully merged to the main.

Have a great week,
Vergílio

@ross-bott
Copy link
Collaborator

Hi there!
I have marked this issue as stale because it has not had activity for 45 days.
Consider the following options:

  • If the issue refers to a large task, break it in smaller issues that can be solved in
    less than 45 days;
  • Label the issue as wontfix or wontfix for now and close it.

@ross-bott ross-bott added the stale Issues with no activity for a long period label Jul 31, 2021
@marcusfilipesr
Copy link
Collaborator

I'll be closing this PR since it has not any updates for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale Issues with no activity for a long period
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New tilting-pad hidrodynamic bearing models
6 participants