# get the rotations, axes and angular velocity aV, RV, wV, T = dfm.deform(t0,t1,dt,a0,lam,mu,gammadot,Gamma) # set some quantities for testing ind = 0 a = aV[ind] R = RV[ind] w = wV[ind] L = dfm.set_L(gammadot,R) ## Test some functions so make sure they run (not if they are right) print("\n TESTING FORCE FUNCTIONS \n") # Test py_set_farg print('\n set_farg \n') farg = frc.py_set_farg(a, w, L, p0, mu) print('runs') # Test py_scale_triangulation print('\n scale_triangulations \n') srf_cV_scaled, srf_areas_scaled, srf_normals_scaled = frc.py_scale_triangulations(a) print('runs') # Test py_set_force_facets print('\n set_force_facets \n') fonfTest = frc.py_set_force_facets(farg, srf_normals_scaled, srf_areas_scaled) print('runs') # Test set_fonfV print('\n set_fonfV \n') farg,fonfV,cV,srf_areas_scaled = frc.set_fonfV(a, w, R, gammadot, p0, mu) print('runs')
# set the initial axes a0 = np.array([180., 160., 140.]) # compute the time interval t0,t1,dt,tau,cap = dfm.set_tau_cap(a0, lam, mu, gammadot, Gamma) # get the rotations, axes and angular velocity aV, RV, wV, T = dfm.deform(t0,t1,dt,a0,lam,mu,gammadot,Gamma) # test force_facets, which sets the force on the centers of the facets # for a fixed time point time_ind = 200 a = aV[time_ind] w = wV[time_ind] R = RV[time_ind] # get L L = dfm.set_L(gammadot,R) # get chi chi = frc.py_set_chi(a) # get A A = frc.py_set_A(w, a, L, chi) # get farg farg = frc.py_set_farg(a, w, L, p0, mu) farg_now = frc.py_set_farg(a, np.zeros(3), L, p0, mu) pn = np.array([1.0, 0.0, 0.0]) px = np.array([-.8*a[0], 0.0, 0.0]) aoi = frc.py_area_of_intersection(a, pn, px) fonfV, cV = frc.set_fonfV(a, w, R, gammadot, p0, mu) stress = frc.py_stress(a, fonfV, cV, pn, px)