Skip to content

Instantly share code, notes, and snippets.

View moorepants's full-sized avatar

Jason K. Moore moorepants

View GitHub Profile
@moorepants
moorepants / engrxiv-papers.csv
Last active February 20, 2024 08:40
A look at download counts from Engrxiv
We can't make this file beautiful and searchable because it's too large.
GUID,Title,Abstract,status,"file url","Download count",URL,"Preprint DOI","Publisher DOI","Date created","Date modified"
mkzp5,"A stochastic multiscale peridynamic model for corrosion-induced fracture","Concrete fracture caused by corrosion of the reinforcing bars plays a key role in accelerating rebar corrosion and causing subsequent structure failure. To better predict this process, we introduce a three-phase stochastic peridynamic model, with the simplest constitutive relation (linear elastic with brittle failure), that avoids the need for explicit concrete microstructure geometry representations. The model links information from the composition at the microscale (phase volume fractions) to the macroscale fracture behavior, while costing the same as a fully homogenized model. We show that a similar peridynamic homogenized model fails in capturing the correct fracture modes/patterns in these problems where the microstructure controls failure behavior. The multiscale model is used to study fracture in reinfo
@moorepants
moorepants / environment.yml
Last active January 18, 2024 03:49
Realtime Low and High Pass Butterworth Filters
name: filter
channels:
- conda-forge
- defaults
dependencies:
- numpy
- scipy
- matplotlib
- sympy
- dynamicisttoolkit
@moorepants
moorepants / monolithic-extra-packages-conda.txt
Created September 19, 2023 14:51
TU Delft Anaconda Extra Packages 2023-2024
# channel priority strict (pull from defaults, then look to conda forge, then
# look to twh)
# defaults
# conda-forge
# twh
# these are all the requested packages (conda names)
anaconda
alpaca_kernel_2
anaconda
asciitree
@moorepants
moorepants / kalman_filter.m
Last active July 7, 2023 05:59
Special Topics in Sports Engineering Smartphone Exercise Files
function [x, P] = kalman_filter(A, B, C, Q, R, x, u, y, P)
% kalman_filter - Returns the next state estimate and its covariance matrix
% using the Kalman Filter predict & update. Note that this implementation is
% not numerically stable, use production code for non-textbook problems.
%
% Syntax: [x, P] = kalman_filter(A, B, C, Q, R, x, u, y, P)
%
% Inputs:
% A - State matrix, size 5 x 5
% B - Input matrix, size 5 x 1
@moorepants
moorepants / visuals_clustering.py
Created January 25, 2023 10:06
Script that runs a weighted k-means on overlapping rectangles on a grid to find clusters of "focus"
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as pat
import sklearn.cluster as clu
# set the seed if you want the same random numbers on eac execution
#np.random.seed(5)
# generate data for random overlapping rectangles
num_rectangles = 50
@moorepants
moorepants / simple_jump.py
Created November 18, 2022 13:37
Simple examples of jump modeling with power and work breakdowns
# This is a simple point mass "jumping" simulation. Given a point mass of a
# realistic human mass that starts some height above the ground with a force
# that acts vertically between the ground and mass that represents the force
# that legs can generate, we simulate from standstill to maximum height in the
# air and calculate the work done by all forces on the mass as well as the
# potential and kinetic energy at all times in the simulation. There is also a
# Coulomb friction term that can represent some dissapative resistance to the
# motion.
#
# O |g
@moorepants
moorepants / example_results.txt
Last active August 12, 2022 16:54
Figuring out how to do speedy evaluation of lists of SymPy expressions.
Testing results.
Timing the functions.
Timing: cython
cython time: 0.00288254904747 s
Timing: numpy_broadcast
numpy_broadcast time: 0.00597401690483 s
@moorepants
moorepants / Frame_test_n_pendulum.ipynb
Created June 30, 2021 14:27
Peter Stahlecker's example that has a large number of operations
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@moorepants
moorepants / chaos_pendulum_pythreejs_manual.ipynb
Created November 24, 2019 16:09
Example of how to manually use pythreejs to animate a PyDy scene.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@moorepants
moorepants / dcc-fair-support-dmp.rst
Last active January 8, 2021 13:00
DCC FAIR Support Request Data Management Plan

Data Management Plan

This assignment will utilize two types of data:

  1. Existing static and motion data collected from bicycle and bicyclists during prior research. For example, time series from rate gyros or motion capture systems, geometry of vehicles, and anthropomorphic data of the riders.
  2. Bicycle and rider motion data generated from simulations.