Coder Social home page Coder Social logo

simplecentrifugalpump's People

Contributors

tormec avatar

Stargazers

 avatar

Watchers

 avatar

simplecentrifugalpump's Issues

Add methods to find the curvature radius of the front and back shrouds

construction-meridional-section

In the following steps, theta is the counterclockwise angle measured in the 4th quadrant.

Front shroud

  • find the circle whose projection on the horizontal axis has its right end major than all the others (in this case is circle 1)
  • trace the vertical segment 3 tangent to circle 1
  • shift the last circle (the circle at theta = 90 deg, here circle 2) so that its right end is tangent to the vertical segment 3
  • trace the tangent from the left end (5) of segment 4 (which is the width of the impeller at the outlet section) to circle 2
  • trace the horizontal tangent from the first circle (the circle at theta = 0 deg, here circle 7) to the intersection with the extension of the segment 5-6
  • trace the bisector 8 until it intersects the ray of the circle 9

Back shroud

  • trace the horizontal tangent from the first circle (the circle at theta = 0 deg, here circle 7) to the intersection with the vertical tangent 11
  • trace the bisector 12 until it intersects the ray of circle 13

Refactor the code

  • move options into a module
  • move shaft into a module
  • move constants into a module
  • only flow and head must be the required variables; the others should be moved in __init__() function as "suggested values" in case they are unknown
  • move impeller into a module
  • move volute into a module
  • integrate options in the impeller module and abandon the former
  • remove duplicate methods, i.e. those methods that differ only by the variable name but do the same thing
  • create a function that calculates the coefficients of a polynomial from given nodes
  • in methods, where possible, remove any explicit reference to section names
  • improve docstrings, especially for those methods that take optional arguments

Force solution

In the CLI add possibility to choose different option, among the ones offered, instead the recommended one:

python3 scp.py [flowrate] [head] [--np]

Selecting a solution with a different number of poles of the AC motor should be easy enough to type.

Impossibile dimensioning for some values

Thus are some values that raise the following error:

Traceback (most recent call last):
  File "simple_centrifugal_pump.py", line 328, in <module>
    main(flow=args.flowrate, head=args.head)  # [m^3/s], [m]
  File "simple_centrifugal_pump.py", line 303, in main
    prj = Project(**kwargs)
  File "simple_centrifugal_pump.py", line 47, in __init__
    impeller = self.calc_impeller(**{**choice, **shaft})
  File "simple_centrifugal_pump.py", line 199, in calc_impeller
    beta_2b = im.angle_beta(u_2, c_2m, 0, psi_th, u_2sf)
  File "/home/diego/Public/SimpleCentrifugalPump/lib/impeller.py", line 569, in angle_beta
    beta_b = math.atan(c_m * math.cos(gamma) / (u * (1 - psi_th) - u_sf))
TypeError: can't convert complex to float
[m^3/s] [h]
.012    50
.005    45
.020    70
.004    10
.015    70
.007    60
.008    15

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.