Skip to content

Instantly share code, notes, and snippets.

Avatar
😀

jstults

😀
View GitHub Profile
@jstults
jstults / qu8k_trajectory.py
Created Nov 17, 2011
integrate qu8k accelerometer data
View qu8k_trajectory.py
import scipy as sp
from scipy import fft, ifft
from scipy.integrate import cumtrapz
from scipy.integrate import simps
import csv
from matplotlib import rc
fig_width_pt = 469.75
inch_per_pt = 1.0 / 72.27
figw = fig_width_pt * inch_per_pt
figh = (620.43 / 2.1) * inch_per_pt
@jstults
jstults / d8ndiode_template.html
Created Jan 14, 2012
Template for Dayton Diode site
View d8ndiode_template.html
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html b:version='2' class='v2' expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
<meta content='IE=EmulateIE7' http-equiv='X-UA-Compatible'/>
<b:if cond='data:blog.isMobile'>
<meta content='width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0' name='viewport'/>
<b:else/>
<meta content='width=1100' name='viewport'/>
</b:if>
@jstults
jstults / fs.f90
Created Jan 29, 2012
Falkner-Skan IVP
View fs.f90
module fs
implicit none
contains
subroutine rates(F, t, y, arg)
double complex, intent(in) :: t
double complex, intent(in), dimension(3) :: y, arg
double complex, intent(out), dimension(3,1) :: F
F(1,1) = y(2)*arg(3)
@jstults
jstults / integrate_fs.py
Created Jan 29, 2012
Falkner-Skan IVP flat plate
View integrate_fs.py
import scipy as sp
from scipy.integrate import ode
from scipy.optimize import fsolve
from matplotlib import rc
#rc('text', usetex=True)
tick_size = 'large'
label_size = 'xx-large'
rc('xtick', labelsize=8)
rc('ytick', labelsize=8)
rc('legend', fontsize=12)
@jstults
jstults / falknerskan.mac
Created Jan 29, 2012
Maxima definition of Falkner-Skan governing equations
View falknerskan.mac
/* Falkner-Skan ODE
Zhang, J., Chen, B., 'An iterative method for solving the
Falkner-Skan equation'
Nachtsheim, P., Swigert, P., 'Satisfaction of Asymptotic Boundary
Conditions in Numerical Solution of Systems of Nonlinear Equations
of Boundary-Layer Type,' NASA TN D-3004, Lewis Research Center,
Cleveland, Oct, 1965.
@jstults
jstults / ice-code.R
Created Feb 4, 2012
Comparison of Northern Hemisphere Perennial and Seasonal Sea Ice
View ice-code.R
ssq = function (x) {sum(x ^ 2)}
plotTrend = function (x, st = 1978, en = c(2012, 12), y.pos = NA, x.pos = NA, main.t = "Untitled") {
### Get trend
trend = lm(window(x, st, en) ~ I(time(window(x, st, en))))
### Initialize variables
N = length(window(x, st, en))
I = seq(1:N) / frequency(x)
@jstults
jstults / falknerskan_beta_sweep.py
Created Feb 5, 2012
Parameter sweep for Falkner-Skan flat plate flow
View falknerskan_beta_sweep.py
import scipy as sp
from scipy.integrate import ode
from scipy.optimize import fsolve
from matplotlib import rc
rc('text', usetex=True)
tick_size = 'large'
label_size = 'xx-large'
rc('xtick', labelsize=8)
rc('ytick', labelsize=8)
rc('legend', fontsize=12)
@jstults
jstults / arctanh_fs.py
Created Feb 5, 2012
Hyperbolic tangent point distribution for Falkner-Skan
View arctanh_fs.py
import scipy as sp
from scipy.integrate import ode
from scipy.optimize import fsolve
from matplotlib import rc
rc('text', usetex=True)
tick_size = 'large'
label_size = 'xx-large'
rc('xtick', labelsize=8)
rc('ytick', labelsize=8)
rc('legend', fontsize=12)
@jstults
jstults / integrate_fs2.py
Created Feb 5, 2012
Non-uniqueness of Falkner-Skan solutions with adverse pressure gradient
View integrate_fs2.py
import scipy as sp
from scipy.integrate import ode
from scipy.optimize import fsolve
from matplotlib import rc
rc('text', usetex=True)
tick_size = 'large'
label_size = 'xx-large'
rc('xtick', labelsize=8)
rc('ytick', labelsize=8)
rc('legend', fontsize=12)
@jstults
jstults / sears_haack.py
Created Feb 13, 2012
Script to generate a Sears-Haack body for a mini-Estes motor
View sears_haack.py
import scipy as sp
from scipy.integrate import ode
from scipy.optimize import fsolve
from scipy.optimize import fmin
from matplotlib import rc
rc('text', usetex=True)
tick_size = 'large'
label_size = 'xx-large'
rc('xtick', labelsize=8)
rc('ytick', labelsize=8)
You can’t perform that action at this time.