#1 2017-05-10 15:00:27

vob
Member
Registered: 2014-06-06
Posts: 27

Script fails for more than two wind farms

Dear all,

I have a workspace with three identical projects, each consisting of a 'Terrain analysis (IBZ)', a 'wind farm' and a GWC (plus some notes). I also have a script, which iterates through the projects and calculates the respective windfarm using the DoAllPossibleCalculations method.


The weird thing is that the wind farm calculation works well for the first two projects, but fails for the third (and all further) wind farms. More specifically it fails to calculate the wake losses and net AEP, while the free AEP is calculated for each turbine and the wind farm.


By default, each wind farm is calculated by issuing WindFarm.AsICalculatingHierarchyMember.DoAllPossibleCalculations(False). This works as expected for the first two projects/wind farms. However, in the third project nothing happens. I then check the properties of WindFarm.AsICalculatingHierarchyMember.CalculationByType(ectWakeLosses). In the third wind farm I find that:
.Status = 3 (i.e. echmsResultsDirtyCanRecalculate)
.AreResultsDirty = True
.CanCalculate = True
.AreThereResults = False                                                                                                                                                                                                                                                                                                                                                         

However, when I then run the WindFarm.AsICalculatingHierarchyMember.CalculationByType(ectWakeLosses).Calculate method immediately after checking these variables, still nothing happens, and the variables keep the same values a as before.


I have no clue what happens here and how to resolve that. As I said, the three projects/windfarms are identical (checked this by exporting the projects to w.p files and compared the resulting Inventory.xml files, which differ only in the ID strings and the references to the .tmp files). Why does the WindFarm refuse to calculate in the third project?                                                                                 


I also checked to put all three farms inside of one project, but the result is the same, so I suppose that this issue is related to the wind farm calculation method.


Any suggestion is welcome. Thanks in advance!

Offline

#2 2017-05-11 08:54:07

Brian Ohrbeck Hansen
WAsP team
Registered: 2011-12-06
Posts: 25

Re: Script fails for more than two wind farms

Hi vob,

Can you please send this message to "waspsupport@dtu.dk" and include your WAsP workspace?

Thanks,

Brian

Offline

#3 2017-05-16 13:26:09

vob
Member
Registered: 2014-06-06
Posts: 27

Re: Script fails for more than two wind farms

Hi again,


I did some more research and discovered that it's not the calculation itself that's causing the problem. The problematic step actually is when after the calculation I also write the respective Project to a file using Project.AsIRveaPreservableObject.PreserveToFile. This method appears to work well for the first three times it is called, but then fails for whatever reason. After that failure, wake calculations fail for all subsequently evaluated projects.


Is there any in-depth documentation about the WAsP scriptig environment and what happens when we save parts of the workspace? The latest info I have is from a post by Duncan in May 2011...


Thanks

Offline

#4 2018-05-16 13:20:21

vob
Member
Registered: 2014-06-06
Posts: 27

Re: Script fails for more than two wind farms

Just to close this topic: it turned out that there was a bug in the PreserveToFile function, which has been fixed by the developers in WAsP version 11.6.0018 and all newer releases. Thanks again for the great support!

Offline

Board footer

Powered by FluxBB

[ Generated in 0.010 seconds, 10 queries executed - Memory usage: 539.74 KiB (Peak: 562.55 KiB) ]