def test_Dynamics(): k = 0.08 freq = 1.6 chord = 0.15 dyn = Parameters.Dynamics(k, freq, 0.075, 70, chord, 1000, 1, 1.225) assert dyn.velocity_inf == freq * chord / k assert np.allclose(dyn.theta[250], -dyn.theta0) assert np.allclose(dyn.theta[1000], 0)
def test_genCFile(tmp_path): dyn = Parameters.Dynamics() geo = Parameters.Geometry() d = tmp_path / "sub" d.mkdir() #p = d / "hello.txt" #p.write_text("Stuff in txt file") folder_path = Parameters.FilePath(str(d)) UDF = CFile_Generation.genCFile(folder_path, geo, dyn)
def test_processWallshear(): folder_path = os.path.dirname(os.path.abspath(__file__)) k = 0.12 freq = 1.6 chord = 0.15 time_step = 1130 vortex_xC = 0.053220586717218 #vortex_xC is the x position relative to the chord length that the vortex is being shed dyn = Parameters.Dynamics(k, freq, 0.075, 70, chord, 1000, 2, 1.225) output = processWallshear.wallshearData(folder_path + r"\Assets", dyn) assert output[0] == time_step assert np.allclose(output[1], vortex_xC)
import sys from RigidFoilSimer import Parameters from RigidFoilSimer import RigidFoilSimer ## Reading in input form FilePaths = Parameters.FilePath("C:/Users/vicki/Desktop", "githubVersion") FoilGeo = Parameters.Geometry() FoilDyn = Parameters.Dynamics() RigidFoilSimer.main(FilePaths, FoilGeo, FoilDyn)