Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pip support #175

Merged
merged 22 commits into from
May 4, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename and minor update to test
  • Loading branch information
ngoiz committed May 3, 2022
commit 985212be80521d592b1aaadeef8401cf16b7821e
1 change: 0 additions & 1 deletion tests/coupled/dynamic/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
from tests.coupled.dynamic.dynamic_test import *
2 changes: 1 addition & 1 deletion tests/coupled/dynamic/hale/generate_hale.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ def generate_solver_file():
settings['StepUvlm'] = {'print_info': 'off',
'num_cores': num_cores,
'convection_scheme': 2,
'gamma_dot_filtering': 6,
'gamma_dot_filtering': 7,
'velocity_field_generator': 'GustVelocityField',
'velocity_field_input': {'u_inf': int(not free_flight) * u_inf,
'u_inf_direction': [1., 0, 0],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,13 @@ class TestCoupledDynamic(unittest.TestCase):
- Gust response of the hale aircraft
"""



@classmethod
def setUpClass(cls):
# run all the cases generators
case = 'hale'
mod = importlib.import_module('tests.coupled.dynamic.' + case + '.generate_' + case)
pass




def test_hale_dynamic(self):
"""
Case and results from:
Expand All @@ -44,17 +39,16 @@ def test_hale_dynamic(self):
# compare results with reference values
ref_Fz = 50.4986064826483
ref_My = -1833.91402522644
file = os.path.join(output_folder, case_name, 'beam/beam_loads_%i.csv' %(n_tstep))
beam_loads_ts = np.loadtxt(file, delimiter = ',')
file = os.path.join(output_folder, case_name, 'beam/beam_loads_%i.csv' % (n_tstep))
beam_loads_ts = np.loadtxt(file, delimiter=',')
np.testing.assert_almost_equal(float(beam_loads_ts[0, 6]), ref_Fz,
decimal=3,
err_msg='Vertical load on wing root not within 3 decimal points of reference.',
verbose=True)
decimal=3,
err_msg='Vertical load on wing root not within 3 decimal points of reference.',
verbose=True)
np.testing.assert_almost_equal(float(beam_loads_ts[0, 8]), ref_My,
decimal=3,
err_msg='Pitching moment on wing root not within 3 decimal points of reference.',
verbose=True)

decimal=3,
err_msg='Pitching moment on wing root not within 3 decimal points of reference.',
verbose=True)

@classmethod
def tearDownClass(cls):
Expand All @@ -65,11 +59,10 @@ def tearDownClass(cls):
list_folders = ['output', '__pycache__']
for case in list_cases:
file_path = os.path.join(os.path.abspath(os.path.dirname(os.path.realpath(__file__))),
case)
case)
for folder in list_folders:
if os.path.isdir(folder):
shutil.rmtree(folder)
for extension in list_file_extensions:
os.remove(os.path.join(file_path, case + extension))
pass