Harp_opt help

Discuss tidal-current device design and modeling

Moderator: Bonnie.Jonkman

Mujahid Badshah
Posts: 12
Joined: Wed Sep 16, 2015 9:28 am
Organization: International Islamic University Islamabad
Location: Pakistan

Harp_opt help

Postby Mujahid Badshah » Wed Sep 16, 2015 10:29 pm

I have designed a research hydro kinetic turbine for my PhD research work and want to optimize plus validate it through harp_opt. I have checked the harp code with the provided case of 1MW wind turbine case and it worked well. But for the provided case of 200kw hydro kinetic case, with VSVP, it give error. whereas for FSFP option selected, it goes into a never ending cycle of creating generations and finds non as feasible. I have also tried it with the approximate setting for the NREL 550 KW turbine but it creates only one generation with VSVP selected and then gives some errors. the first error as (Error in ==> Main at 127 OmgCC = TSR_Opt.*V.*30/(pi.*RotorRad);). Please some body help me with the issue and provide me some GUI setting for any hydro kinetic turbine or through any mean possible.

Danny.Sale
Posts: 40
Joined: Tue Jul 13, 2010 4:55 pm

Re: Harp_opt help

Postby Danny.Sale » Wed Sep 30, 2015 4:44 pm

hello Mujahid,

Regarding the repeated cycles of infeasible solutions, I think this is because the constraints could be set too tightly. Try changing the upper/lower limits on your design variables to increase the range, and hopefully the code should find more feasible solutions. I think the problem you are facing has been discussed in this thread: viewtopic.php?f=26&t=875&p=3639&hilit=HARP_opt+cavitation#p3639 My guess is that cavitation constraint is giving you problem, and best way to remedy is to limit the maximum rotor speed. Hope that helps, otherwise you could try describing your input values and error messages in more detail.

~Danny

Mujahid Badshah
Posts: 12
Joined: Wed Sep 16, 2015 9:28 am
Organization: International Islamic University Islamabad
Location: Pakistan

Re: Harp_opt help

Postby Mujahid Badshah » Thu Oct 01, 2015 12:27 am

Thanks a lot. I will soon shear my experience.
Best Regards

Mujahid Badshah
Posts: 12
Joined: Wed Sep 16, 2015 9:28 am
Organization: International Islamic University Islamabad
Location: Pakistan

Re: Harp_opt help

Postby Mujahid Badshah » Tue Oct 06, 2015 2:25 am

Hi ,
I have tried different combinations of settings but still the problem of "not finding the feasible solution and continuous generation creation", exists. I have also tried it with the cavitation check disabled and using different bounds as you directed. Regarding the applied GUI setting, i have used the settings for 200 KW Hydro kinetic turbine provided in the Harp downloaded package. I am trying to attach the GUI settings but its not getting attached with this post. I will send you the setting through email.

Best Regards

Danny.Sale
Posts: 40
Joined: Tue Jul 13, 2010 4:55 pm

Re: Harp_opt help

Postby Danny.Sale » Wed Oct 07, 2015 9:49 am

hi Mujahid,

I thought of another cause. Often the code will crash because something crashed the WT_Perf code ... the WT_Perf code is not always robust and HARP_Opt was supposed to detect if WT_Perf crashed while reading the output files of WT_Perf. After you get this error message, can you check if the WT_Perf output files (*.oup and *.bed) have empty or nonsensical values? Sometimes tweaking some of the WT_Perf solver parameters can help fix this.

thanks,
Danny

Mujahid Badshah
Posts: 12
Joined: Wed Sep 16, 2015 9:28 am
Organization: International Islamic University Islamabad
Location: Pakistan

Re: Harp_opt help

Postby Mujahid Badshah » Thu Oct 08, 2015 5:04 am

Hi Dany,
Thanks for your continued support. Output file *.oup is empty as you predicted and *.bed is not available in the output file folder. Plz guide me how to rectify the problem.
Thanking in anticipation.
Best Regards

Danny.Sale
Posts: 40
Joined: Tue Jul 13, 2010 4:55 pm

Re: Harp_opt help

Postby Danny.Sale » Wed Oct 14, 2015 3:04 pm

Hi Mujahid,

maybe first try decreasing tolerance and increasing maximum iterations (and next maybe change TI_SINGULARITY or other parameters) within the section labeled "BEMT Options" ... and if that cannot help then HARP_Opt v2 does not recognize the WT_Perf error. And then I suggest trying v3 (https://github.com/NREL/HARP_Opt) or v4 (https://github.com/andrewning/HARP_Opt).

hope that helps,
~Danny

Mujahid Badshah
Posts: 12
Joined: Wed Sep 16, 2015 9:28 am
Organization: International Islamic University Islamabad
Location: Pakistan

Re: Harp_opt help

Postby Mujahid Badshah » Wed Oct 21, 2015 6:08 am

Hi Danny,
Thanks for your continued support. Wt_Perf runs out side the Harp_opt on my computer. I have checked it with various input files and settings and it worked well.
But when i run Harp_opt V3, it gives the following errors.

Warning: Out of range or non-integer values truncated during conversion to character.
> In parseOptimizationOptions at 40
In HARP_Opt at 66
Error using readOutFileWTPerf (line 22)
ERROR: Could not locate and open file C:\Users\Acer
pc\Documents\MATLAB\HARP_Opt-master\Output\test_FSFP\test_FSFP.oup

Error in wtperf_CC (line 37)
WTPoup = readOutFileWTPerf(SIM,WTP,'cc');

Error in optAero (line 32)
WTPoup = wtperf_CC(state,WTP,SIM,TURB,CAV,ENV,BLADE);

Error in optFitness (line 30)
[f(1), BLADE, WTP, WTPoup] = optAero(x_aero, SIM,OPT,TURB,BLADE,ENV,WTP,CAV,state);

Error in HARP_Opt_Init>@(x0)optFitness(x0,SIM,OPT,TURB,BLADE,ENV,WTP,CAV,state) (line
246)
OPT.objective = @(x0) optFitness(x0,SIM,OPT,TURB,BLADE,ENV,WTP,CAV,state);

Error in funevaluate (line 41)
f = feval(FUN,reshapeinput(Xin,X),varargin{:});

Error in poptimfcnchk (line 20)
[y,count] = funevaluate(FUN,Xin,X,'init',[],[],objFcnArg{:});

Error in patternsearch (line 342)
[Iterate,OUTPUT.funccount] = poptimfcnchk(FUN,nonlcon,initialX,Iterate, ...

Error in HARP_Opt (line 180)
case 'PatternSearch'; [OPT.xBest, OPT.fval, OPT.exitflag, OPT.output]
= patternsearch(OPT.objective, OPT.x0, OPT.Aineq, OPT.bineq, [], [], OPT.lb,
OPT.ub,
Caused by:
Failure in initial user-supplied objective function evaluation. PATTERNSEARCH cannot
continue.

Please help me debug these errors

Best Regards

Mujahid Badshah
Posts: 12
Joined: Wed Sep 16, 2015 9:28 am
Organization: International Islamic University Islamabad
Location: Pakistan

Re: Harp_opt help

Postby Mujahid Badshah » Mon Oct 26, 2015 2:11 am

Hi Danny,
I am back to work after a long week end. The entire out put directory is attached by the name mujahid_FSFP. The input file used is the same as test_FSFP. I have just changed the name of the input file. Hope you will find an answer.
one more thing, does these errors have some thing to do with the location of the other files that Harp uses on my computer.

Best Regards
Attachments
mujahid_FSFP.zip
out put file
(362.08 KiB) Downloaded 178 times

Danny.Sale
Posts: 40
Joined: Tue Jul 13, 2010 4:55 pm

Re: Harp_opt help

Postby Danny.Sale » Mon Nov 02, 2015 12:07 pm

Hi Mujahid,

it appears you are using directory names containing "spaces", Matlab has some trouble with this sometimes. Try renaming "Acer pc" to something like "Acer_pc", this is what the Matlab error is indicating.

~Danny

Mujahid Badshah
Posts: 12
Joined: Wed Sep 16, 2015 9:28 am
Organization: International Islamic University Islamabad
Location: Pakistan

Re: Harp_opt help

Postby Mujahid Badshah » Wed Nov 04, 2015 10:52 pm

Hi Danny,
Thanks for your continued support. Harp code has started working. I have used it for several cases. I still have some problem with understanding some of the parameters like the hub dia and circular root. I am working on it and will share my thoughts if unable to understand.

Thanks a lot once again.

Best Regards

Mujahid Badshah
Posts: 12
Joined: Wed Sep 16, 2015 9:28 am
Organization: International Islamic University Islamabad
Location: Pakistan

Re: Harp_opt help

Postby Mujahid Badshah » Thu Nov 05, 2015 8:00 am

Hi,
All the new user of the HARP_Opt follow the procedure below:(Note: the procedure is only valid for users who have already Matlab installed on their systems)
1. Go to the link https://github.com/NREL/HARP_Opt? and download the archive Harp_opt-master.
2. Save the archive to a location of your choice. Ensure that none of the folder name on the path to the code contain space.
3. On the Matlab command prompt make the folder containing the Harp_Opt-master as your current folder.
4.On the command window enter HARP_Opt test_FSFP.inp and press enter. The test_FSFP is one of the input file provided in the input folder of the down loaded archive.
5. Make a copy of one of the input files and make necessary changes according to your own requirement.
6. Repeat the procedure as in 4 for your created input file.
7. The out put files for your designed turbine are stored in the output folder by the name as of your input file.
8. Enjoy this excellent code and keeping sharing your problems and experiences on this forum.

Best Regards

Ha.Tran
Posts: 11
Joined: Sun May 29, 2016 5:42 pm
Organization: The university of Auckland
Location: New Zealand

Re: Harp_opt help

Postby Ha.Tran » Wed Jun 01, 2016 10:08 pm

Hi Danny and Mujahid Badshah,

I design a horizontal axis tidal turbine using BEM theory. Now, I try to use Harp_opt v3 for the purpose of optimizing. However, as I run VSFP case, I encounter the following error:

Attempted to access WTPoup.rpm(2); index out of bounds because
numel(WTPoup.rpm)=0.

Error in optAero (line 121)

Error in optFitness (line 14)

Error in HARP_Opt_Init>@(x0)optFitness(x0,SIM,OPT,TURB,BLADE,ENV,WTP,CAV,state)
(line 230)

Error in funevaluate (line 41)

Error in poptimfcnchk (line 20)

Error in patternsearch (line 354)

Error in HARP_Opt (line 165)

Caused by:
Failure in initial user-supplied objective function evaluation.
PATTERNSEARCH cannot continue.

MATLAB[i]:badsubscript[/color]

I do not know how to fix this error.

Please help me to solve this problem.

I will be very grateful for this help.

Thank you so much!

Mujahid Badshah
Posts: 12
Joined: Wed Sep 16, 2015 9:28 am
Organization: International Islamic University Islamabad
Location: Pakistan

Re: Harp_opt help

Postby Mujahid Badshah » Thu Jun 02, 2016 1:02 am

Hi,
At the moment I am unable to give you a specific reply. But I will suggest you to try using other optimization algorithms available in the code like genetic algorithm etc.,.
I also think that, your BEM design can also cause this problem. So, as a second step try using more flexible constraints instead of using very strict constraints that you already have from your BEM design. As a third step, I will suggest that you should start from the design cases provided in the code. Then make step wise changes and obtain solution after each change, to shape the parameters to closely match your design.

Best Regards

Ha.Tran
Posts: 11
Joined: Sun May 29, 2016 5:42 pm
Organization: The university of Auckland
Location: New Zealand

Re: Harp_opt help

Postby Ha.Tran » Thu Jun 02, 2016 11:41 pm

Hi Mujahid Badshah,

Due to your suggestion, I can run Harp_opt v3 successfully.

I am really happy for this.

Thank you very much.

Best regards,
Ngoc Ha Tran.


Return to “Tidal Current”

Who is online

Users browsing this forum: No registered users and 1 guest