Aerostruct Problem

class blackbox.aerostruct_problem.problem.WingAeroStructVSP(options)[source]

Bases: BaseProblem

__call__(x, return_results=False)[source]

Method to evaluate given x. It can be a single or multiple samples of size (d,) or (N,d) where N is the number of samples and d is the number of parameters added

Parameters:
  • x (np.ndarray) – a numpy array representing values for added parameters

  • return_results (bool) – flag to determine if the results should be returned or not. This should be set to True only when you want this function to return the results. NOTE: This is only useful when you are doing sequential data generation

property bounds

Method to get upper and lower bound based on added parameters

Returns:

bounds – a tuple containing two 1d numpy arrays - one for lower bound and other for upper bound

Return type:

tuple

read_results(dir_name)[source]

Method to read scalars.json and field_outputs.hdf5 files containing results from a wing analysis and convert it to a dictionary which can be used later

Parameters:

dir_name (str) – name of directory where the results from the analysis are saved

Returns:

out – a dictionary containing data stored in the folder

Return type:

dict