-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue1575 add pv model #1766
base: master
Are you sure you want to change the base?
Issue1575 add pv model #1766
Conversation
The proper way to load files is with Modelica.Utilities.Files.loadResource
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LauraMaier : Pleae see the inline comment for the required changes. I still need to run the model (which fail in Dymola 2024x and Optimica, see inline comment for the cause).
IBPSA/Electrical/BaseClasses/PV/BaseClasses/PVOptical/AirMass.mo
Outdated
Show resolved
Hide resolved
IBPSA/Electrical/BaseClasses/PV/BaseClasses/PVOptical/AirMass.mo
Outdated
Show resolved
Hide resolved
IBPSA/Electrical/BaseClasses/PV/BaseClasses/PVOptical/AirMassModifier.mo
Outdated
Show resolved
Hide resolved
IBPSA/Electrical/BaseClasses/PV/BaseClasses/PVOptical/AirMassModifier.mo
Outdated
Show resolved
Hide resolved
HGloHor=realPassThroughHGloHor.y; | ||
|
||
solHouAng = realPassThroughSolHouAng.y; | ||
solDec=realPassThroughSolDec.y; | ||
cloTim=realPassThroughCloTim.y; | ||
|
||
k_t =if HGloHor <= 0.01 | ||
then 0 | ||
else min(1, max(0, (HGloHor/(GSC*(1 + 0.033* | ||
cos(360*(Modelica.Constants.pi/180)*cloTim/24/60/60/365)* | ||
(cos(lat)*cos(solDec)*cos(solHouAng) + sin(lat)*sin(solDec))))))) | ||
"Factor needed for Erbs diffuse fraction relation"; | ||
|
||
// Erbs diffuse fraction relation | ||
HDifHor = if HGloHor <= 0.01 | ||
then 0 | ||
elseif k_t <= 0.22 | ||
then (HGloHor)*(1.0 - 0.09*k_t) | ||
elseif k_t > 0.8 | ||
then (HGloHor)*0.165 | ||
else (HGloHor)* | ||
(0.9511 - 0.1604*k_t + 4.388*k_t^2 - 16.638*k_t^3 + 12.336*k_t^4); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make these assignments in the variable declaration so that we don't mix connect statements with assignments, and use regularization (also as it is only an example, regularization is less critical here).
This closes #1575
We added a new PV model to the IBPSA library.
The model has the following characteristics: