Coder Social home page Coder Social logo

moorepants / resonance Goto Github PK

View Code? Open in Web Editor NEW
46.0 9.0 12.0 60.16 MB

Learning Mechanical Vibration Engineering Through Computation

Home Page: https://moorepants.github.io/resonance

License: MIT License

Jupyter Notebook 88.26% Shell 0.06% Python 11.67%
vibrations engineering mechanical-engineering python jupyter

resonance's Introduction

Resonance: Learning Mechanical Vibration Engineering Through Computation

Documentation Status https://travis-ci.org/moorepants/resonance.svg?branch=master

Introduction

This repository contains the interactive learning materials designed for the upper-level UC Davis engineering course on Mechanical Vibrations (ENG 122). The materials are designed with these ideas in mind:

  • That students can learn about mechanical vibrations engineering through "computational thinking" and "computational experimentation", i.e. actively interacting with a computer by writing code to simulate and analyze computational models and experimental data.
  • That the computer allows students to solve vibration engineering problems without knowing all of the mathematical theory a priori. This means that we can motivate students to dig deeper into the theory and by presenting it posteriori when the motivation is high. The students will be introduced to data analysis techniques to study vibrations before analytical techniques.
  • Students learn best by doing. The content is meant to used in class while the instructors act as a coach through the learning.
  • That each lesson should have a motivated real life example that drives the investigation.
  • Open access materials promote easy reuse, remixing, and dissemination.

The current course website can be found at:

https://moorepants.github.io/eng122/

All of the Jupyter notebooks are rendered at:

http://moorepants.github.io/resonance

Learning Objectives

There are three broad learning objectives that we focus on in the course:

  1. Students will be able to analyze vibrational measurement data to draw conclusions about the measured system's vibrational nature and describe how the systems behaves vibrational.
  2. Students will be able to create simple mathematical and computational models of real vibrating systems that can be used to answer specific questions about the system by concisely demonstrating the vibrational phenomena.
  3. Students will be able to design a mechanical structure that has desirable vibrational behavior.

Students that master these three core learning objectives will be well prepared to use mechanical vibration concepts, theories, and tools to solve engineering problems.

For a more detailed topical outline with specific per-activity learning objectives see the outline.

Assessment

The students will be assessed through a series of in- and out-of- class exercises that focus on individual lesson topics, two examinations, and on an individual open-ended vibration design project.

Authors

  • Jason K. Moore, Faculty, Mechanical and Aerospace Engineering Department, University of California, Davis
  • Kenneth Lyons, Graduate Student, Mechanical and Aerospace Engineering Department, University of California, Davis

License

The contents of this repository are licensed under the MIT license.

Acknowledgements

Much of this work has been made possible through the Undergraduate Instructional Innovation Program funds provided by the Association of American Universities (AAU) and Google which is administered by UC Davis's Center for Educational Effectiveness.

This work is also made possible by the broad open source software stack that underpins the Scientific Python Ecosystem, in particular: Jupyter, NumPy, SymPy, SciPy, and matplotlib.

Installation

For users, you can create a conda environment called resonance by downloading the environment.yml file and typing the following at the command line:

$ conda env create -f environment.yml

This environment can be activated with:

$ conda activate resonance

To properly view the exercises you will need to enable the exercise2 notebook extension:

(resonance)$ jupyter nbextension enable exercise2/main

If you want to develop resonance, use the dev-environment.yml file:

$ conda env create -f dev-environment.yml
$ conda activate resonance-dev

If you don't want to use our environments, you can use pip to install resonance:

$ pip install resonance

resonance's People

Contributors

ixjlyons avatar moorepants avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

resonance's Issues

The animation function is causing an continous exception

ERROR:tornado.application:Exception in callback <bound method TimerBase._on_timer of <matplotlib.backends.backend_webagg_core.TimerTornado object at 0x7f2b5f1da748>>
Traceback (most recent call last):
  File "/home/moorepants/miniconda3/envs/resonance/lib/python3.6/site-packages/tornado/ioloop.py", line 1026, in _run
    return self.callback()
  File "/home/moorepants/miniconda3/envs/resonance/lib/python3.6/site-packages/matplotlib/backend_bases.py", line 1319, in _on_timer
    ret = func(*args, **kwargs)
  File "/home/moorepants/miniconda3/envs/resonance/lib/python3.6/site-packages/matplotlib/animation.py", line 1293, in _step
    self._init_draw()
  File "/home/moorepants/miniconda3/envs/resonance/lib/python3.6/site-packages/matplotlib/animation.py", line 1540, in _init_draw
    self._draw_frame(next(self.new_frame_seq()))
StopIteration

I have to CTRL-C to kill it from the terminal.

Interesting vibratory systems

  • Rattleback:
    • Modeling this system is quite a learning experience. Complex geometry and constraints. Students in 122 would have a hard time with this.
    • This system is interesting because when spun it begins to vibrate about an axis normal to the spin axis. This vibration grows in energy by reducing the energy of the spin (conservatively) and actually causes the spin to stop and then reverse. The reversal is a function of the geometry, constraints, and the skewed inertia.
    • ENG 122 students would probably get most out of simulating this system and playing with the parameters associated with geometry and inertia to see how these affect the vibration.
    • This is a small simple system that can be brought into the classroom. We could maybe even take data with it.
    • Could 3D print one like this: https://i.ytimg.com/vi/vmXB0UUwb2k/hqdefault.jpg
  • Passive walkers (e.g. Jason's bunny walking down slope)
  • Record player needle
    • Don't know much about this but a student sent me a detailed diagram of a needle design.
    • Would be interesting to play with how the geometry maximizes volume and human hearing bandwidth.
    • Can we create a record surface pattern and have the students tune the needle to create the correct vibrations and then play back a song?
  • Rally car suspension
    • A 2D planar model can really capture this. We could let them do the base excitation 1D problem and then as homework do the 2D one?
  • Hearing
    • Need to look into the vibration of the ear drum.
    • Sound waves enter the ear canal and make the ear drum vibrate. This action moves the tiny chain of bones (ossicles – malleus, incus, stapes) in the middle ear. The last bone in this chain ‘knocks’ on the membrane window of the cochlea and makes the fluid in the cochlea move. The fluid movement then triggers a response in the hearing nerve. from https://www.hearinglink.org/your-hearing/how-the-ear-works/
  • Snakes sensing vibration in ground (squirrels warn)
    • Need to read Sanjay Joshi's work on this.
      -Seismic stuff
  • Tacoma narrows Bridge
    • Need to see if someone has the simplest model that explains this.
  • The isolators in big buildings for earthquake (large masses at top of building)
  • Balancing a car tire
  • Vibration motor in cellphones (use cellphone app to analyze data)
  • The causeway had beams every X feet and it sagged in middle, if you drive over about 60 mph with average car it excites the car
    • Very nice demonstration of how resonance can be bad
  • Detecting structural cracks with vibration
  • Check with friend about his washing machine vibration controllers
  • Camera motion isolators
  • Measure something like force with a sensor, but vibration corrupts the signal, filter to get nominal force.
  • Dither: https://en.wikipedia.org/wiki/Dither read the etomolgy
  • http://www.racecar-engineering.com/articles/f1/understanding-the-j-damper/
  • snake hear through vibrating skulls: http://jeb.biologists.org/content/215/2/ii

[WIP] Object model for vibrational concepts

My current thought is that if we want these materials to standout and be unique in the way vibrations is taught that we do need to develop an object model to go along with the text. Here are some ideas to start with.

We need at least two types of parameters: time varying (SymPy undefined
functions of time) and constant (SymPy symbols).

NOTE : Does it make sense to assign a value to a time varying parameter? If so,
does the value of time also need to be indicated?

>>> from sympy import Eq
>>> from resonance import meter, second, Parameter
>>> x = Parameter('x', units=meter, description='position')
>>> x
x(t) : position in m
>>> v = Parameter('v', value=2.0, units=meter / second, description='speed')
>>> v
v(t) = 2.0 : speed in m/s

There is the concept of a system's state. The state tells you what the
numerical values are at a specificed time and should be mutable. As time
changes we can update the state values. It is desirable to preserve the order
of the state variables, so that matrix operations work nicely in subsequent
code.

>>> s = State([Eq(x, 1.0), Eq(v, 2.0)], time=0.1, units=second)
>>> s
|x(t)|   |1.0| : position in m
|    | = |   |
|v(t)|   |2.0| : speed in m/s
t = 0.1 s
>>> s.x.sym
x(t)
>>> s.x.val
1.0
>>> s.time.val
0.1
>>> s.time.sym
t
>>> s.vals
[1.0, 2.0]
>>> s.vals_as_array
array([1.0, 2.0])
>>> s.syms
[x(t), v(t)]
>>> s.syms_as_matrix
Matrix([[x(t)],
        [v(t)]])

We also need an object that contains a monotonic collection of state values.
Maybe a subclass of a Pandas DataFrame is appropriate (NOTE : I've had little
luck successfuly subclassing a DataFrame in the past.)

>>> times = linspace(0, 5, num=6)
>>> st = TimeFrame(times, s)
t  x    v
0  1.0  2.0
1  1.0  2.0
2  1.0  2.0
3  1.0  2.0
4  1.0  2.0
5  1.0  2.0
>>> st.values
array([[1.0, 1.0, 1.0, 1.0, 1.0],
       [2.0, 2.0, 2.0, 2.0, 2.0]])
>>> st.plot()  # plots a line chart versus time

A row would then be a State instance.

The students will have to specify the equations of motion manually in symbolic
form. This forces them to design the model versus some kind of approach that
assembles models from Springs, Masses, etc. This would be the result of
Lagrange's method in our case.

>>> m = ConstantParameter('m', value=1.0, units=kilogram, description='mass')
>>> m
m = 1.0 : mass in kg
>>> c = ConstantParameter('c', value=1.0, units=newton * second / meter, description='viscous damping coefficient')
>>> k = ConstantParameter('k', value=1.0, units=newton / meter, description='stiffness')
>>> eom = Eq(m * x.diff(t, 2) + c * x.diff(t) + k * x, 0)
>>> eom
c*x'(t) + k*x(t) + m*x''(t) = 0

There is also the concept of a model that contains the mathematical equations
that attempt to describe reality.

>>> m = Model(odes=eom, aux_var=Eq(v, x.diff(t)))
>>> m.state
|x(t)|   |0.0| : position in m
|    | = |   |
|v(t)|   |2.0| : speed in m/s
t = 0.1 s
>>> m.constants
[m, c, k]
>>> m.inputs  # these would be any time varying forcing parameters
[]
>>> m.first_order_eom
[x'(t)] = [v(t)                ]
[v'(t)]   [-c*v(t)/m - k*x(t)/m]
>>> m.eval_first_order(x=1, v=4, t=1.5)
|x(t)|   |1.0| : position in m
|    | = |   |
|v(t)|   |4.0| : speed in m/s
t = 1.5 s

I'd like the students to be able to use custom integrators, even one they might
write themselves.

>>> def euler_integrate(rhs, init_cond, times):
...     state_traj = np.zeros((len(times), *init_cond.shape))
...     state_traj[0] = init_cond
...     for i, t in enumerate(times[:-1]):
...         h = t - times[i - 1]
...         state_traj[i + 1] = states_traj[i] + h * rhs(t, states_traj[i])
...     return state_traj
>>> m.integrator = euler_integrator
# simulate the sytem given some monotonic time values
>>> m.evolve_state([0, 1, 2, 3])
array([[?, ?, ?, ?],
       [?, ?, ?, ?]])
# maybe this should return a StateEvolution object

In many cases, we'd like to linearize a non-linear model about an equilibrium
point. If the symbolic form of the model i

>>> theta = Parameter('theta', value=0.0)
>>> omega = Parameter('omega', value=0.0)
# passing in a list to State preserves the state order
>>> s = State([theta, omega])
>>> s.theta_val
0
>>> s.theta_sym
theta
>>> s.state_vals
|0|
|0|
>>> s.state_syms
[theta]
[omega]
>>> s.state_vec
|θ| = |0|
|ω|   |0|
>>> eom = Eq(omega.diff() + g / l * sin(theta), 0)
>>> pendulum_model = Model(eom)
# linearize the system (if not already linear) about an equilibrium state,
# returns a LinearModel
>>> lin_m = pendulum_model.linearize(
>>> lin_m.eom
omega' + g / l * theta = 0
>>> lin_m.first_order_form()
[theta'(t)] = [omega(t)      ]
[omega'(t)]   [-g / l * theta]
>>> lin_m.eval_first_order_form(s)
[0]
[0]

The coefficients of the canoncial form can be accessed:

>>> lin_m.M
1
>>> lin_m.C
0
>>> lin_m.K
g / l
>>> lin_m.A
[0,      1]
[-g / l, 0]
>>> lin.m.evolve(StateEvolution(...))
[0, 1, 2, 3]
[0, 4, 5, 6]

Frequency analysis of a linear system.

>>> lin_m.natural_frequency()
>>> lin_m.damping_ratio()

Time series. Allen uses a TimeSeries object to hold values with a time index.
I'm not that fond of indexing Series and DataFrames using floating point time
values but maybe some hack to use an integer index for microseconds from epoch
would work?

SWC vs Downey method

SWC: single notebook, 5-10 minutes of live explaining/coding, 5-10 minute exercise

Downey: textbook, powerpoint slides for 5-10 minutes, work through notebook 10-15 minutes

What are interesting vibration topics we currently are not teaching?

  • Waves
  • Continuous media vibrations (non-lumped)
  • Sound
  • Active control of vibration
  • Vehicle suspension design
  • Vibration testing
  • Human vibration tolerance
  • ISO standards
  • FFT of real data and interpreting
  • Relationship between control and vibration: controlled linear system is just vibration

License

We need to pick a license. Tentaviely I have CC-BY in the README. But there are some other options that need a bit of thinking about:

CC0

I like the idea of just making it CC0 and simply asking people that reuse the content to cite us. I think most people will. One potential issue is that people can sell the content we created, but it will be available for free, but I'm sure there might be some that get tricked into buying.

CC-BY

I like having one license that covers everything. I'd pick CC-BY as the one that encompasses everything. But the CC website says this: https://creativecommons.org/faq/#can-i-apply-a-creative-commons-license-to-software. It isn't clear to me how CC-BY isn't compatible with MIT or BSD or what MIT offers that CC-BY doesn't. CC-BY is not OSI approved. Not sure why...

CC-BY for everything but source code and MIT/BSD/etc for source code

I personally don't like this. It just seems overly complicated but it seems to be what people do that put some thought into this. It seems to be the recommendation of CC.

MIT/BSD for everything

This is one license for all, but since these are software licenses it seems odd to apply to other content.

Issues with matplotlib notebook backend

  • I noticed in submitting an assignment through nbgrader that plots don't show up (I think they work with %matplotlib inline but need to test)
  • The line >>> trajectories['book_angle'].plot(); in the book balancing notebook updates the plot above instead of creating a new figure

I've noticed a few other somewhat buggy behaviors compared to inline, but can't remember them specifically (iirc similar to the second point above). The animation doesn't appear to work with the inline backend at the moment though.

Learning Objective Dump

Just a place to dump excess, redundant learning objectives in case we need them.

  • model a physical vibrating system and understand it's essential motion characteristics
  • numerically integrate non-linear systems
  • understand how the eigenvalue problem can model a vibrational system
  • design a mechanical system with vibration in mind
  • measure vibrations and interpret the meaning of the data
  • to analyze a vibrational system using computation

1 Introduction [100 mins]

The goal here is to lead the students through solving a vibration engineering
problem while simultaneously introducing the foundation Python commands they
will need to build on. This shouldn't be overwhelming with too many new Python
things but should ease them in but show them that they can solve something
useful the first day.

  • Students will be able to use the core Python computing commands in the class.
  • Students Will be able solve an introductory vibration engineering problem.

TODO : What problem to open with?

2 Modeling Vibrating Systems [50 min]

The key thing here is that we want students to be able to look at real physical
objects and visualize what the essential motion is. They should be able to
sketch out free body diagrams that indicate:

  • an appropriate number of degrees of freedom
  • appropriate generalized coordinate definitions
  • appropriate lumped elements that describe the rigid bodies and lumped
    elements (springs, dampers) and external loads acting on the system

I'd also like them to come away with an appreciation of why it may be important
to try to create the simplest model that is capable of explaining the phenomena
of interest.

3 Formulating Equations of Motion [150 min]

  • recognize that the relationship between mass/inertia, acceleration, and the
    loads acting on a system are second order ordinary differential equations
  • be able to express the linear and angular velocity magnitude expressions of
    important points and rotating reference frames
  • be able to write the system's kinetic energy in terms of generalized
    coordinates
  • be able to write the system's potential energy in terms of the generalized
    coordinates
  • be able to form the Lagrangian
  • be able write the Lagrange's equation of the first kind and evaluate it
  • add non-conservative forces with Rayleigh's principle
  • recognize advantages over a Newton-Euler formulation
  • be able to convert between first and second order form
  • be able to convert from canonical form to state space
  • single and multi dof
  • linearizing eoms

https://en.wikipedia.org/wiki/Lagrangian_mechanics

4 Free harmonic motion with and without viscous damping

  • determine the natural frequency
  • find the solution to the ODE
  • compare different ways to express ODE solution
  • write the SDoF system in terms of nat. freq and damping ratio
  • underdamped, critically damped, overdamped
  1. Estimating system parameters from vibrations (live experiment where we give them data)
  2. Forced harmonic motion with and without viscous damping
  3. Non-linear vibration (Coulomb) + simulation of non-linear systems
  4. Impulse response (heaviside)
  5. Stability: book balance
  6. Base excitation: car on bumpy road
  7. Mass imbalance
  8. Arbitrary forcing (convolution integral)
  9. Arbitrary periodic forcing (Fourier series)
  10. Modal analysis of decomposable systems: building
  11. Modal analysis of non-decomposable: bicycle modeshapes
  12. Isolator design
  13. Vibration absorbers

Other:

  • Stiffness
  • Equivalency in stiffness, damping, mass, etc
  • Free response to two dof
  • Transform methods
  • Response random inputs
  • Analogy to electrical circuits or other energy domains
  • More in-depth non-linear vibratory systems
  • Relationship to FEA of structures
  • Beams and membranes: continuous systems (Euler’s beam equation)

Analyzing Vibrating Systems

After finishing this section students will be able to:

  • state the three fundamental characteristics that make a system vibrate
  • describe different methods of measuring vibrations
  • choose appropriate sensors and a placement
  • visualize the vibrational measurements
  • visualize a system’s free response
  • identify critically damped, underdamped, and overdamped behavior
  • excite a system with different input signals
  • use time domain techniques to characterize a system's behavior
  • use frequency domain techniques to characterize a system's behavior
  • identify a MDoF system and see effects of coupling through time and frequency domain
  • interactively adjust core system parameters to affect response

The story arc:

  • Start with a conversation about real things that vibrate. Show vibrating
    systems and ask for examples. Have class discussion on commonalities with the
    instructor goal of identifying mass/inertia, flexibility/stiffness, damping
    as core common attributes of vibratory systems.
  • How might we measure the motion of these things? What are important
    measurements? Talk about position, velocity, and acceleration measurement
    techniques. Mass, stiffness, damping measurement?
  • Introduce a 1 DoF system (block on an ice rink) (mass and damping?). Show how
    to simulate an initial value problem and have the students inspect the
    measurements (position, velocity, acceleration, .. jerk). What do you
    observe with initial velocity? (velocity decreases over time) Have them look
    at short sim, so velocity doesn't change, and then a long sim where velicity
    does change (goes to zero)
  • Introduce a rotational 1 DOF system (mass and damping) and it's measurements
    (angle, angular velocity, angular acceleration)
  • Now introduce a 1 DoF ?bungee jumper? system (or something without gravity).
    Explain that this sysem has an elastic element that resists the motion of
    mass. Let the students simulate this and talk about the characteristics of
    the measurements? What does position functino look like? What is the
    relationship among the three measurements? Can they determine the dreivative
    relationship?
  • Show how to adjust the mass, and stiffness values of the system. Let
    students explore to discover effects of the parameters on the free response.
    Can they find out that m and k primarily affect the frequency of oscillation?
    Introduce the concept of natural frequency.
  • Introduce autocorrleation to see period of signal?
  • Call the signal frequency spectrum method (FFT of signal) to look at the
    frequency vs amplitude of the signal. Introduce the frequency domain view of
    the signal.
  • Introduce the effects of damping on the free response: over, under, critical
  • Introduce multi dof system (two bungee jumpers?), talk about dof, coordinates, etc
  • Simulate initial value problem and look at signals in time and frequency
    domain.
  • Now let's poke at the systems with an input. Starting with a sinusoidal
    input. What does the output look like? Should identify that it is also
    sinusoidal but diff amplitude. Try different frequencies.
  • Introduce the frequency response. Use a sweep frequency input, call a
    underlying sys id method that produces the frequency response plot? Talk
    about amplitude and phase relationships.
  • Explore how the mass, stifneess, and damping affect the response plot.
  • Introduce resonance.
  • Look at frequency response of mdof systems.

Modeling Vibrating Systems

After finishing this section students will be able to:

  • identify the essential aspects to model (# degrees of freedom, coordinates,
    modeling assumptions)
  • draw a vibration free body diagram of a real system
  • write the non-linear equations of motion of a vibrating system
  • write a linear equation of motion for a vibrating system
  • transform a mathematical model into a computational model
  • validate that the model behaves like the real system in a way that is optimal
    for answering your questions about the system

Designing Vibrating Systems

After finishing this section students will be able to:

  • realize that mass, stiffness, damping, and geometry affect behavior in a
    complex coupled way. Understand the tradeoffs among adjusting model
    parameters
  • use common methods like isolators, mass balance, mass abosrber to control
    behavior

Finalize and test authentication

Current plan is to test out using Google OAuth so students can log in with their UCD credentials and system users will be added automatically. When starting a class you'd just need to manage the user whitelist.

Set up JupyterHub and nbgrader in a VM

Things to experiment with still:

  • having in-class and assignment notebooks
  • collecting student notebooks in some way
  • check on validating/submitting notebooks with errors and such
  • check on due dates and submissions (i.e. does deadline affect ability to submit)?

Backup setup

Deployment should be basically fully automated, so mainly student notebooks and the nbgrader database and such should be backed up.

Look into:

Audit of existing notebooks

bicycle2dof

  • topics:
    • multi degree of freedom systems
    • turning a system of second order equations of motion into first order in matrix form
    • the eigenvalue problem (in general)
    • phasors
    • mode shapes
    • odeint
    • stability
  • needs a sketch of the system with steering and roll state variables
  • needs explanation for the two different stiffness matrices
  • I think this example would be good for teaching some of the topics listed above, whereas they are currently treated more like dependencies and this is just a real-world example for motivation
  • the benchmark_parameters could benefit from being a class where you can set attributes rather than a function that returns a dict
  • benchmark_par_to_canonical should probably be hidden
  • the exercises at the end are good, including some exploration and design tasks

book_balancing

  • topics:
    • non-linear dynamics
    • linearization
    • Lagrange method
    • odeint
  • linearization exercise maybe should be testable in some way
  • having them approximate the period of the nonlinear oscillations by looking for zero crossings is nice as a practical exercise
  • the real demo up in front of the class went well I think
  • the final question (derive the equations of motion) was frustrating to them and may not have been all that enlightening

bumpy_road

  • topics:
    • base excitation
    • homogeneous and particular solution
    • damper design
    • force transmissibility
  • needs a drawing (currently refers to book example)
  • currently is a bunch of code and a couple design exercise prompts -- need to determine if/how much they should code
  • needs significantly more text and equations

forced_vibrations_with_viscous_damping

  • topics:
    • harmonic excitation (force)
    • homogeneous and particular solution
    • phasors
    • resonance
  • this notebook is pretty well fleshed out
  • the vector representation section could be the introduction to the topic rather than assuming it's a prereq -- a little phasor widget could be useful here
  • there is a lot of plotting code here

nonlinear_vibrations

  • topics:
    • 2nd-order equation of motion to system of first ODEs
    • nonlinear dynamics
    • Coulomb friction
    • pendulum
    • stability (inverted pendulum)
    • comparing linear vs. nonlinear free responses
  • this was the first notebook introducing numerical ODE integration
  • the intro material of this notebook could be good to just add to the top of the book balancing notebook, since that's a bit more interesting of an example

sawtooth_forcing

  • topics
    • arbitrary periodic forcing
    • Fourier series
    • symbolic computation
  • if used as standalone notebook on Fourier series and periodic forcing, needs more intro material
  • when moving to numerical use of the Fourier coefficients, should we use subs on the sympy expressions?
  • needs a real-world example
  • the concept of using Fourier series coefficients to approximate a complicated forcing function and analytically evaluate the output seems somewhat antiquated -- it's fairly theoretical and I can't come up with a good real-world example

vibrating_building

  • topics:
    • multi-dimensional systems (>2dof)
    • the eigenproblem
    • mode shapes
    • spring only
  • needs a diagram/model
  • assumes they've already seen the theoretical material -- needs more text and equations
  • seems common for students to be lost by all of the matrix manipulations

viscous_damping

  • topics:
    • linear damping
    • under/over/critical damping
  • needs a mass-spring-damper diagram
  • a motivational real-world example would be cool
  • programming of the damping regimes was not great, e.g. hard to choose a c value to make zeta=1

Potential mechanical vibration resources to fork/use

Use this issue to curate a list of various resources we could make use of.

Open Access Text

Open Courses

Open Software

Proprietary Software

Proprietary Texts

Various Course Websites and Syllabi

Other

Content format

I'm reluctant to write the materials in Jupyter notebooks mainly because I want to use a text editor to write the content. I'd ideally like to write RestructuredText and then convert to notebooks, html, and/or PDF. Allen Downey seems to write his books in LaTeX or something and then has separate notebooks. I'm not sure we have the time/resources to write both a book and the accompanying notebooks, I'd rather them be the same. I'd also like the code we write in the materials to be able to be used as doctests. If they are in RestructuredText we can run normal Python doctests on them and if they are notebooks we can just execute the notebooks.

I've found these less-than-inspiring rst to ipynb packages:

Another option is to write in rst, convert to md with pandoc, and then to notebook with (the above may do this):

Found this too:

Notebook 1: Introduction to Jupyter

  • First draft
  • Final draft
  • Learning Python homework assignment in nbgrader

Topics:

  • get on the server
  • show how to fetch assignments (need first week's assignment up)
  • this notebook can have some nbgrader assignments they can submit
  • assignments: import numpy and a python function
  • tell what jupyter and python are and why are using them
  • jupyter interface/ui, etc
  • have them all submit the assignment
  • point them to local install instructions

Limit memory available to jupyterhub users

Currently using SystemdSpawner, and we're bit by this bug. For example, you can set a small memory limit like 256M, then allocate a large list (>1G), and you can see the memory usage for that process go up to 256M and the rest goes to swap. I'm not sure at this point whether or not it's a problem.

Testing I've done so far:

  • Set a small memory limit, allocate a huge list x = list(range(100000000)). Memory up to the limit is taken up, then the rest goes to swap. Run the command a few more times and when swap is full the kernel dies.

Testing I'd like to do:

  • Set a moderate memory limit. Have one user over-use memory so it goes to swap. Have another user run some things normally. Have the first user fill up swap and kill their kernel. See what happens for the second user. If the first user's kernel dies but the second user is unaffected (as long as they stay under the limit), I don't think this will be a major issue.

rst2ipynb bugs

There isn't an issue tracker here: https://github.com/nthiery/rst-to-ipynb

If you have a function like:

.. code-block:: pycon
   >>> def animate(time, book_angle, bottom_left_x, bottom_left_y):
   ...
   ...     text.set_text('Time = {:0.3f} s'.format(time))
   ...
   ...     rect.set_xy((bottom_left_x, bottom_left_y))
   ...
   ...     # TODO : This should be a public set_angle method.
   ...     rect._angle = -np.rad2deg(book_angle)

only the first line with the leading >>> gets put into a code cell, the remainder gets put into a markdown cell.

Serve rendered notebooks

Should make sure output is cleared on notebooks before committing them here, then serve the output somewhere else.

  • set up CI to run notebooks
  • upload rendered notebooks to server and serve them (e.g. bicycle.ucdavis.edu/eng122/notebooks)
  • tidy it up

Most useful things a student can come away with

  • Being able to numerically integrate non-linear systems
  • Understanding how the eigenvalue problem can model a vibrational system
  • Being able to design a mechanical system with vibration in mind
  • Being able to measure vibrations and interpret the meaning of the data
  • Being able to model a physical vibrating machine and discover it’s essential motion characteristics
  • Being able to analyze a vibrational system using computation

Project name

Some words to play with:

  • learning
  • education
  • resonance
  • engineering
  • computation
  • frequency
  • vibration
  • oscillation
  • damping
  • natrual frequency
  • phase shift
  • degree of freedom
  • mass spring damper
  • mode shape
  • mode
  • eigen*
  • stability

JupyterLab on JupyterHub

It is currently fairly straightforward to enable JupyterLab (see here) and make it the default page users see when they visit the hub. It does not show any of the nbgrader interface, though, so students wouldn't see where to fetch assignments.

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.