NREL / bifacial_radiance

Toolkit for working with RADIANCE for the ray-trace modeling of Bifacial Photovoltaics
https://bifacial-radiance.readthedocs.io
BSD 3-Clause "New" or "Revised" License
84 stars 46 forks source link

Error with AnalysisObj.analysis when recreating introductory example #446

Closed olipfeifferthkoeln closed 1 year ago

olipfeifferthkoeln commented 1 year ago

Hello,

i am using an older version of bifacial_radiance (attached main_script) to simulate vertical bifacial pv pants. My script is oriented on the introductory example and to beginwith, i am only simulating a single day. Everything works fine until the OCT is made.

image

The function RadianceObj.getfilelist() is not working properly, so i needed to hardcode the filepaths. With that workaround an OCT file gets created, eventhogh it is empty when i open it in the texteditor (dont know if this is usual). Then erverything works until AnalysisObj.analysis. I always get the following message:

"Linescan in process: 06.02_Front message: Der Befehl "rtrace" ist entweder falsch geschrieben oder konnte nicht gefunden werden. None"

In english: 'the rtrace command is either misspelled or could not be found'

I dont really know how to fix this and where the error comes from. Do you have any Idea? The bifacial_radiance version that i am using and the jupyter notebook with my code are attached to this docment.

kind regards! Oliver

Test_bifacial_Radiance.md bifacial_radiance_main.md

shirubana commented 1 year ago

That means Radiance is not properly installed or the environment does not know about where to find it.

to test, open a terminal or command prompt and type 'rtrace'. The error that appears when calling the function like that should be the following:

image

Add the location of the Radiance\bin folder to your environment variables. In windows it should look something like this

image

In linux, I usually do something like the following:

export PATH="$PATH:/home/sayala/Radiance/bin"
  export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/sayala/Radiance/lib"
  export RAYPATH="$RAYPATH:/home/sayala/Radiance/lib"

you can check if it added properly with: echo $PATH

olipfeifferthkoeln commented 1 year ago

Hello,

thanks for the quick response! I checked my environment variables and i do have the necessary path to the radiance_bin.

image

When i search in the terminal the error is excaclty the same as in the jupyter notebook.

image

Is there maybe something else i can try?

kind regards Oliver

shirubana commented 1 year ago

Do you have it on system variables, or on user variables?

shirubana commented 1 year ago

And the typical question... did you try to restart after doing the change?

and...

check that the file is there

image

olipfeifferthkoeln commented 1 year ago

I had it on user variables not on system variables! Now it is working! Thank you for your help!

shirubana commented 1 year ago

great! :)

olipfeifferthkoeln commented 1 year ago

FYI: I rewached the installation instructions on Youtube. There it seems like the raiance/bin must be added to the user variables and not the system variables. Maybe it would be helpful to add a comment about that in the video descripton

kind regards Oliver

shirubana commented 1 year ago

Hi Oliver, thanks, I'm about to redo the instructions so this is helpful. Closing the thread otherwise.