NREL / SOWFA

Other
130 stars 113 forks source link

Error running SOWFA-6 example.ALM, keyword tipRootLossCorr is undefined in dictionary ~/example.ALM/constant/turbineArrayProperties.turbine0" #106

Open fengbao8 opened 6 months ago

fengbao8 commented 6 months ago

When I run the SOWFA-6 example.ALM, I get the following error in the log file after submitting the runscript.preprocess script

--> FOAM FATAL IO ERROR: keyword tipRootLossCorr is undefined in dictionary "/public21/home/sc94363/openfoam6/run/8/example.ALM/constant/turbineArrayProperties.turbine0" file: /public21/home/sc94363/openfoam6/run/8/example.ALM/constant/turbineArrayProperties.turbine0 from line 39 to line 78. From function Foam::dictionary &Foam::dictionary::subDict(const Foam::word &) in file db/dictionary/dictionary.C at line 718. FOAM exiting

But I defined tipRootLossCorrType instead of tipRootLossCorr in the turbineArrayProperties file, then I changed tipRootLossCorrType to tipRootLossCorr in the file and got a different error as follows:

--> FOAM FATAL ERROR: Attempt to return primitive entry ITstream : /public21/home/sc94363/openfoam6/run/8/example.ALM/constant/turbineArrayProperties.turbine0.tipRootLossCorr, line 71, IOstream: Version 2.0, format ASCII, line 0, OPENED, GOOD primitiveEntry 'tipRootLossCorr' comprises on line 71 the string "Glauert" as a sub-dictionary From function Foam::dictionary &Foam::primitiveEntry::dict() in file db/dictionary/primitiveEntry/primitiveEntry.C at line 200. FOAM aborting

I haven't encountered this problem in SOWFA-2.4, but now I encountered it in SOWFA-6, now I don't know how to solve it, looking forward to getting help! Thank you!

rthedin commented 6 months ago

The error is given to you:

primitiveEntry 'tipRootLossCorr' comprises
on line 71 the string "Glauert"
as a sub-dictionary

You have the entry listed as a sub-dictionary, and not a simple string entry. You might have extras curly braces around such entry.

fengbao8 commented 6 months ago

Thank you for your reply! However, I see that the original code defines the tipRootLossCorrType as "Glauert" or "none" instead of tipRootLossCorr, but after submitting the script it gives an error that the tipRootLossCorr is undefined, is this a problem with my SOWFA6 settings? I'm not sure how to go about tweaking it now.

rthedin commented 5 months ago

You're mixing up SOWFA 2.4 with SOWFA-6. This is the SOWFA 2.4 repository. I believe you might be mixing up both in several of your issues. For SOWFA-6, see the lines below

https://github.com/NREL/SOWFA-6/blob/d80e7c638340c641d934b90b1eb381296bd7cd63/src/turbineModels/turbineModelsOpenFAST/horizontalAxisWindTurbinesALMOpenFAST/horizontalAxisWindTurbinesALMOpenFAST.C#L409-L411

Please note that the code does not define any variable, your input files do.

The code above is saying that there is a sub-dictionary called tipRootLossCorr with entries topRootLossCorrType and tipRootLossCorrField. This is what you should have in your input files.

Please open a new issue on the correct repository if you have further questions.