I would like to understand the connections among the classes called for the aerostructural optimization by running the openmdao command “check_partials”.
Now, I run the case via the blade_driver.py script in the examples\03_blade folder, where the wisdem::run_wisdem function is imported (from wisdem\glue_code\runWISDEM.py, I believe) and used to run the optimization.
In the script of this run_wisdem function I have found the following lines
if "check_partials" in opt_options["driver"]:
if opt_options["driver"]["check_partials"]:
wt_opt.run_model()
checks = wt_opt.check_partials(compact_print=True)
so I modify my analysis_options_aerostruct.yaml file as below (last two lines)
driver:
optimization:
flag: True # Flag to enable optimization
tol: 1.e-5 # Optimality tolerance
# max_major_iter: 10 # Maximum number of major design iterations (SNOPT)
# max_minor_iter: 100 # Maximum number of minor design iterations (SNOPT)
max_iter: 2 # Maximum number of iterations (SLSQP)
solver: SLSQP # Optimization solver. Other options are 'SLSQP' - 'CONMIN'
step_size: 1.e-3 # Step size for finite differencing
form: forward # Finite differencing mode, either forward or central
check_partials: # 1 Sept 2021
flag: True
and run to try to have the results of check_partials.
After few seconds some NaNs appear in the CLI and the run gets stuck:
I abort the run with CTRL+C, and this message pops out in the CLI:
I can not decipher the meaning of the stack, but the easiest cause of my problem may well be my input in the .yaml file is wrong.
So may someone tell me how can I call correctly check_partials from the analysis_options.yaml file?
You won’t get partial derivative information in WISDEM because we set it up to do finite differencing on the total derivatives. Everything dealing with partials in the WISDEM scripts should be treated as experimental or untested code.