wecopttool.WEC.post_process

WEC.post_process(wec, res, waves, nsubsteps=1)[source]

Post-process the results from wecopttool.WEC.solve().

Parameters:
Returns:

  • results_fd – Dynamic responses in the frequency-domain.

  • results_td – Dynamic responses in the time-domain.

Return type:

tuple[list[Dataset], list[Dataset]]

Examples

The wecopttool.WEC.solve() method only returns the raw results dictionary produced by scipy.optimize.minimize().

>>> res_opt = wec.solve(waves=wave,
                        obj_fun=pto.average_power,
                        nstate_opt=2*nfreq+1)

To get the post-processed results we may call

>>> res_wec_fd, res_wec_td = wec.post_process(wec, res_opt,wave)

Note that wecopttool.WEC.solve() method produces a list of results objects (one for each phase realization).