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

Simulation settings check - Unrecognised settings raise Error #148

Merged
merged 32 commits into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c55df31
Raise exception when setting not recognised
ngoiz Apr 21, 2021
156c731
fix output_folder in restart cases
ArturoMS13 Apr 21, 2021
0dd32ae
Filter settings for linuvlm.Dynamic()
ngoiz Apr 21, 2021
2b8df4d
Unrecognised settings now raise list of Exception
ngoiz Apr 21, 2021
84be3f1
Remove deprecated settings
ngoiz Apr 21, 2021
92123ce
Remove deprecated settings
ngoiz Apr 21, 2021
0b28f39
minor fixes examples wt (WIP)
ArturoMS13 Apr 21, 2021
77f4616
fix wt test route
ArturoMS13 Apr 21, 2021
ed5f755
Update Goland flutter tutorial
ngoiz Apr 21, 2021
1d5bb4d
Update Horten tutorial
ngoiz Apr 21, 2021
e05ff10
Update Horten tutorial
ngoiz Apr 21, 2021
a0956b2
Gust settings now specified only through gust_parameters
ngoiz Apr 21, 2021
6f5770f
Update simple HALE case
ngoiz Apr 21, 2021
bd246c5
Remove Horten from cases (same info in Jupyter tutorial)
ngoiz Apr 21, 2021
db9c0f2
Update X-HALE case
ngoiz Apr 21, 2021
961bf4b
Fix typo in description
ngoiz Apr 21, 2021
7f7deca
Update control case
ngoiz Apr 21, 2021
cdf93f7
Update T-tail tutorial
ngoiz Apr 21, 2021
39a1fdc
update blade discretisation
ArturoMS13 Apr 24, 2021
bb7c4b4
matplotlib inline and remove values
ArturoMS13 Apr 24, 2021
4fd2c01
run wind turbine notebook
ArturoMS13 Apr 25, 2021
948ca71
update case wind turbine
ArturoMS13 Apr 28, 2021
c303106
update cantilever wing
ArturoMS13 Apr 28, 2021
09ecc04
hide output pip
ArturoMS13 Apr 28, 2021
9bd1d63
update last solvers with instance attributes
ArturoMS13 May 5, 2021
df08f28
classification generators
ArturoMS13 May 5, 2021
2561520
minor changes git installation instructions
ArturoMS13 May 5, 2021
2990f75
delete create snapshot
ArturoMS13 May 6, 2021
b783441
Update Mac environment
ngoiz May 10, 2021
dbbbf24
Update example cases
ngoiz May 10, 2021
1ff9634
refactor [exceptions]: avoid duplicate code
sduess May 12, 2021
817c6b7
Add note required files
ngoiz May 12, 2021
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
94 changes: 56 additions & 38 deletions cases/coupled/WindTurbine/generate_rotor.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,32 @@

mstar = int(revs_in_wake*2.*np.pi/dphi)

rotor = template_wt.rotor_from_excel_type02(
chord_panels,
rotation_velocity,
pitch_deg,
excel_file_name = route + '../../../docs/source/content/example_notebooks/source/type02_db_NREL5MW_v02.xlsx',
excel_sheet_parameters = 'parameters',
excel_sheet_structural_blade = 'structural_blade',
excel_sheet_discretization_blade = 'discretization_blade',
excel_sheet_aero_blade = 'aero_blade',
excel_sheet_airfoil_info = 'airfoil_info',
excel_sheet_airfoil_coord = 'airfoil_coord',
m_distribution = 'uniform',
n_points_camber = 100,
tol_remove_points = 1e-8)
op_params = {'rotation_velocity': rotation_velocity,
'pitch_deg': pitch_deg,
'wsp': WSP,
'dt': dt}

geom_params = {'chord_panels':chord_panels,
'tol_remove_points': 1e-8,
'n_points_camber': 100,
'm_distribution': 'uniform'}

excel_description = {'excel_file_name': route + '../../../docs/source/content/example_notebooks/source/type02_db_NREL5MW_v02.xlsx',
'excel_sheet_parameters': 'parameters',
'excel_sheet_structural_blade': 'structural_blade',
'excel_sheet_discretization_blade': 'discretization_blade',
'excel_sheet_aero_blade': 'aero_blade',
'excel_sheet_airfoil_info': 'airfoil_info',
'excel_sheet_airfoil_chord': 'airfoil_coord'}

options = {'camber_effect_on_twist': False,
'user_defined_m_distribution_type': None,
'include_polars': False}

rotor = template_wt.rotor_from_excel_type03(op_params,
geom_params,
excel_description,
options)

######################################################################
###################### DEFINE SIMULATION ###########################
Expand All @@ -60,11 +72,12 @@

SimInfo.solvers['SHARPy']['flow'] = ['BeamLoader',
'AerogridLoader',
'StaticCoupledRBM',
'StaticCoupled',
'BeamPlot',
'AerogridPlot',
'DynamicCoupled',
'SaveData']

SimInfo.solvers['SHARPy']['case'] = case
SimInfo.solvers['SHARPy']['route'] = route
SimInfo.solvers['SHARPy']['write_log'] = True
Expand All @@ -80,39 +93,44 @@
SimInfo.solvers['AerogridLoader']['unsteady'] = 'on'
SimInfo.solvers['AerogridLoader']['mstar'] = mstar
SimInfo.solvers['AerogridLoader']['freestream_dir'] = np.array([0.,0.,0.])
SimInfo.solvers['AerogridLoader']['wake_shape_generator'] = 'HelicoidalWake'
SimInfo.solvers['AerogridLoader']['wake_shape_generator_input'] = {'u_inf': WSP,
'u_inf_direction': SimInfo.solvers['SteadyVelocityField']['u_inf_direction'],
'rotation_velocity': rotation_velocity*np.array([0., 0., 1.]),
'dt': dt,
'dphi1': dphi,
'ndphi1': mstar,
'r': 1.,
'dphimax': 10*deg2rad}

SimInfo.solvers['NonLinearStatic']['max_iterations'] = 200
SimInfo.solvers['NonLinearStatic']['num_load_steps'] = 1
SimInfo.solvers['NonLinearStatic']['min_delta'] = 1e-5

SimInfo.solvers['StaticCoupledRBM']['structural_solver'] = 'RigidDynamicPrescribedStep'
SimInfo.solvers['StaticCoupledRBM']['structural_solver_settings'] = SimInfo.solvers['RigidDynamicPrescribedStep']
SimInfo.solvers['StaticCoupledRBM']['structural_solver'] = 'NonLinearDynamicPrescribedStep'
SimInfo.solvers['StaticCoupledRBM']['structural_solver_settings'] = SimInfo.solvers['NonLinearDynamicPrescribedStep']
SimInfo.solvers['StaticCoupledRBM']['structural_solver'] = 'NonLinearStatic'
SimInfo.solvers['StaticCoupledRBM']['structural_solver_settings'] = SimInfo.solvers['NonLinearStatic']
SimInfo.solvers['StaticCoupledRBM']['aero_solver'] = 'SHWUvlm'
SimInfo.solvers['StaticCoupledRBM']['aero_solver_settings'] = SimInfo.solvers['SHWUvlm']

SimInfo.solvers['StaticCoupledRBM']['tolerance'] = 1e-6
SimInfo.solvers['StaticCoupledRBM']['n_load_steps'] = 0
SimInfo.solvers['StaticCoupledRBM']['relaxation_factor'] = 0.

SimInfo.solvers['SHWUvlm']['convection_scheme'] = 2
SimInfo.solvers['SHWUvlm']['num_cores'] = 15
SimInfo.solvers['SHWUvlm']['rot_vel'] = rotation_velocity
SimInfo.solvers['SHWUvlm']['rot_axis'] = np.array([0.,0.,1.])
SimInfo.solvers['SHWUvlm']['rot_center'] = np.zeros((3),)

# SimInfo.solvers['StaticCoupledRBM']['newmark_damp'] = 0.1
SimInfo.solvers['StaticUvlm']['horseshoe'] = False
SimInfo.solvers['StaticUvlm']['num_cores'] = 8
SimInfo.solvers['StaticUvlm']['n_rollup'] = 0
SimInfo.solvers['StaticUvlm']['rollup_dt'] = dt
SimInfo.solvers['StaticUvlm']['rollup_aic_refresh'] = 1
SimInfo.solvers['StaticUvlm']['rollup_tolerance'] = 1e-8
SimInfo.solvers['StaticUvlm']['velocity_field_generator'] = 'SteadyVelocityField'
SimInfo.solvers['StaticUvlm']['velocity_field_input'] = SimInfo.solvers['SteadyVelocityField']

SimInfo.solvers['StaticCoupled']['structural_solver'] = 'NonLinearStatic'
SimInfo.solvers['StaticCoupled']['structural_solver_settings'] = SimInfo.solvers['NonLinearStatic']
SimInfo.solvers['StaticCoupled']['aero_solver'] = 'StaticUvlm'
SimInfo.solvers['StaticCoupled']['aero_solver_settings'] = SimInfo.solvers['StaticUvlm']

SimInfo.solvers['StaticCoupled']['tolerance'] = 1e-6
SimInfo.solvers['StaticCoupled']['n_load_steps'] = 0
SimInfo.solvers['StaticCoupled']['relaxation_factor'] = 0.

SimInfo.solvers['StepUvlm']['convection_scheme'] = 2
SimInfo.solvers['StepUvlm']['num_cores'] = 15
SimInfo.solvers['StepUvlm']['num_cores'] = 8

SimInfo.solvers['WriteVariablesTime']['FoR_variables'] = ['total_forces',]
SimInfo.solvers['WriteVariablesTime']['FoR_number'] = [0,]

# SimInfo.solvers['DynamicCoupled']['structural_solver'] = 'NonLinearDynamicMultibody'
# SimInfo.solvers['DynamicCoupled']['structural_solver_settings'] = SimInfo.solvers['NonLinearDynamicMultibody']
SimInfo.solvers['DynamicCoupled']['structural_solver'] = 'RigidDynamicPrescribedStep'
SimInfo.solvers['DynamicCoupled']['structural_solver_settings'] = SimInfo.solvers['RigidDynamicPrescribedStep']
SimInfo.solvers['DynamicCoupled']['aero_solver'] = 'StepUvlm'
Expand Down
18 changes: 5 additions & 13 deletions cases/coupled/X-HALE/generate_xhale.py
Original file line number Diff line number Diff line change
Expand Up @@ -1669,7 +1669,6 @@ def generate_solver_file():
'num_load_steps': 1,
'delta_curved': 1e-1,
'min_delta': tolerance,
'balancing': 'off',
'gravity_on': gravity,
'gravity': gravity_value}

Expand Down Expand Up @@ -1750,23 +1749,18 @@ def generate_solver_file():
'thrust_nodes': thrust_nodes}

settings['StepUvlm'] = {'print_info': 'off',
'horseshoe': horseshoe,
'num_cores': 6,
'n_rollup': 0,
'convection_scheme': 2,
'rollup_dt': dt,
'rollup_aic_refresh': 1,
'rollup_tolerance': 1e-4,
'gamma_dot_filtering': 6,
# this is where the gust is input.
'velocity_field_generator': 'GustVelocityField',
'velocity_field_input': {'u_inf': u_inf,
'u_inf_direction': [1., 0, 0],
'gust_shape': gust_shape,
'gust_length': gust_length,
'gust_intensity': gust_intensity*u_inf,
'offset': -space_offset,
'span': span_main},
'gust_parameters': {
'gust_length': gust_length,
'gust_intensity': gust_intensity * u_inf},
'offset': -space_offset},
'rho': rho,
'n_time_steps': n_tstep,
'dt': dt}
Expand Down Expand Up @@ -1847,13 +1841,11 @@ def generate_solver_file():
'NumLambda': 100,
'write_modes_vtk': 'on',
'print_matrices': 'on',
'write_data': 'on',
'continuous_eigenvalues': 'off',
'dt': dt,
'plot_eigenvalues': 'on'}
settings['BeamPlot'] = {'include_rbm': 'on',
'include_applied_forces': 'on',
'include_forward_motion': 'off'}
'include_applied_forces': 'on'}

settings['AerogridPlot'] = {'include_rbm': 'on',
'include_forward_motion': 'off',
Expand Down
Loading