CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Understanding solar calculator code

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By fedenr

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 14, 2021, 07:50
Default Understanding solar calculator code
  #1
Member
 
Bushra Rasheed
Join Date: Dec 2020
Posts: 97
Rep Power: 5
B_R_Khan is on a distinguished road
Hi!

I am trying to understand how solar calculator calculates coordinates for sun direction. I have gone through all the formulas for calculating azimuth and altitude angle but I don't understand how open foam converts these angles into coordinates. In solarCalculator.C, there is a piece of code that calculates xyz coordinates as:
Code:
     direction_.z() = -sin(beta_);
     direction_.y() =  cos(beta_)*cos(theta_); // South axis
     direction_.x() =  cos(beta_)*sin(theta_); // West axis
The above trigonometric formulas do not consider the hypotenuse multiplication to calculates x, y and z coordinates.
I might be missing something. Please guide

Thanks!
B_R_Khan is offline   Reply With Quote

Old   December 21, 2021, 15:41
Default
  #2
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16
mAlletto will become famous soon enough
This looks like sperical coordinates
mAlletto is offline   Reply With Quote

Old   December 23, 2021, 05:42
Default
  #3
New Member
 
Federico Nahuel Ramírez
Join Date: Dec 2020
Location: Spain
Posts: 16
Rep Power: 5
fedenr is on a distinguished road
It seems that these lines are not calculating the coordinates, but the unit vectors of x, y, and z.
B_R_Khan likes this.
fedenr is offline   Reply With Quote

Old   December 23, 2021, 15:27
Default
  #4
Member
 
Bushra Rasheed
Join Date: Dec 2020
Posts: 97
Rep Power: 5
B_R_Khan is on a distinguished road
Quote:
Originally Posted by fedenr View Post
It seems that these lines are not calculating the coordinates, but the unit vectors of x, y, and z.
Yes you are right. I figured out that they are unit vectors calculated via theta and beta in radians.
Thanks!
B_R_Khan is offline   Reply With Quote

Old   June 13, 2023, 15:31
Default Solar calculator with transient simulation
  #5
New Member
 
Join Date: May 2023
Posts: 1
Rep Power: 0
Leon1864 is on a distinguished road
I've modelled a solar dryer that I want to simulate with irradiance data from the solar calculator. I would like to know how to run the simulation daily for a month for a year.

Thanks in advance for your help!
Leon1864 is offline   Reply With Quote

Reply

Tags
solar calculator, solar load, solar radiation


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Odd results with solar load me3840 OpenFOAM Running, Solving & CFD 2 January 11, 2022 06:07
Does OpenFoam use solar ray tracing or solar discrete ordinate method? B_R_Khan OpenFOAM Running, Solving & CFD 0 November 26, 2021 04:58
Modelling solar and thermal radiation in CSP solar receiver Gioacchino La Rochelle CFX 1 November 15, 2018 08:52
Ansys Analysis and Simulate Solar Panel Johnny leow FLUENT 0 November 25, 2015 19:21
Solar Calculator Dorasemon FLUENT 1 July 25, 2013 10:20


All times are GMT -4. The time now is 04:30.