-
Notifications
You must be signed in to change notification settings - Fork 2
/
feconstants.py
24 lines (21 loc) · 1.35 KB
/
feconstants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import numpy as np
import copy
# Set default stim block for displ
displtimecoeff = np.loadtxt('./csvs/displtimecoeff.csv', delimiter=',')
stimBlockDefault = {'holdDisplArray': np.r_[.032:.16:5j]}
stimBlockDefault['rampLiftTimeArray'] = np.polyval(displtimecoeff, stimBlockDefault['holdDisplArray'])
# Set default stim block for force
stimBlockDefaultForce = {'holdForceArray': np.r_[1.2e-3:6e-3:5j]}
displforce = np.loadtxt('./csvs/FitFemDisplforce.csv', delimiter=',')
eqdisp = np.interp(stimBlockDefaultForce['holdForceArray'], displforce[:, 1], displforce[:, 0]*1e3)
stimBlockDefaultForce['rampLiftTimeArray'] = np.polyval(displtimecoeff, eqdisp)
# Set stim line and material
stimLineDefault = {'rampLiftTime': .4, 'holdDispl': .2*1e-3}
materialBlockDefault = {'thicknessAll': [418.5, 338.8, 10.1348], 'skin_g_array': [0.351, 0.154, 0.495],
'skin_tau_array': [np.inf, 1.111, .092], 'skin_mu': 6.354e3, 'skin_alpha': 8.787,
'sylgard_c10': 1.05e5, 'sylgard_g': 0.03, 'sylgard_tau': 0.7, 'cylinderRadius': .5}
# Try a new skin to fit the transduction function
skinThickArray, skinAlphaArray, sylgardThickArray, sylgardC10Array, g1Array, g2Array, ginfArray = np.genfromtxt('./csvs/simprop.csv', delimiter=',').T
materialBlockFiber = copy.deepcopy(materialBlockDefault)
# materialBlockFiber['thicknessAll'][0] = skinThickArray[0]
materialBlockFiber['thicknessAll'][0] = 225.33