bifacial_radiance
bifacial_radiance copied to clipboard
Add Frames to makeModule
I actually started working on this a while ago but got sidetracked and never finished it. I added an antimatter material to create a cavity on the back surface of the module. This keeps the geometry simple but I don't think there's a way to know if one of the sensors is on the frame instead of the module surface.
nice! I don't understand the antimatter material very well but, as far as sensors go, that is why I recommend in all my journals / talks to do a cleanup of the results. The "matchers" search in the cleaning functions can find the name of the frame in the materials list and remove those sensors from the results... That's how we remove torque tubes, sky, and also when a sensor catches the inside edge of a panel (the surface number changes in those cases). Not sure if this helps.
My method doesn't create a new material for the frame, instead it makes the module deeper and then carves out some of the module material on the back. So the frame material is still 'black' (same as the module) and the rear of the module is material type 'framecavity'.
I think the cleanup you're describing will still work, but it's not intuitive that you'd remove results for material 'black' and only keep those for 'framecavity'.
Here's an example results csv:
jalderman@crunchy ~/Downloads/bifacial_radiance $ cat FramedModules/1P-1round/results/irr_1axis_07_02_08.csv | column -t -s,
x y z rearZ mattype rearMat Wm2Front Wm2Back Back/FrontRatio
0.6283781 3.847706e-17 1.17999 1.08999 a8.2.a0.framecavity.6457 a8.2.a0.framecavity.2310 380.0849666666666 58.025890000000004 0.15266517337875934
0.5567591 3.409166e-17 1.273326 1.183326 a8.2.a0.framecavity.6457 a8.2.a0.framecavity.2310 378.94406666666663 57.079373333333336 0.1506270389938665
0.4851401 2.970626e-17 1.366661 1.276661 a8.2.a0.framecavity.6457 a8.2.a0.framecavity.2310 377.8047333333334 55.361940000000004 0.14653546814006352
0.4135211 2.532086e-17 1.459997 1.369997 a8.2.a0.framecavity.6457 a8.2.a0.framecavity.2310 377.09336666666667 53.902593333333336 0.14294192143416623
0.3419021 2.093547e-17 1.553333 1.463333 a8.2.a0.framecavity.6457 a8.2.a0.framecavity.2310 375.55783333333335 49.96310666666667 0.1330366968690658
0.2702831 1.655007e-17 1.646668 1.556668 a8.2.a0.framecavity.6457 a8.2.a0.framecavity.2310 373.6973666666667 42.61986666666667 0.11404884384919708
0.1986641 1.216467e-17 1.740004 1.650004 a8.2.a0.framecavity.6457 a8.2.a0.framecavity.2310 372.2272 39.30168333333334 0.10558491627806099
0.1270451 7.779271e-18 1.83334 1.74334 a8.2.a0.framecavity.6457 a8.2.a0.framecavity.2310 371.5723666666667 41.86534333333333 0.11267046319520028
0.05542614 3.393872e-18 1.926675 1.836675 a8.2.a0.framecavity.6457 a8.2.a0.framecavity.2310 0.3446287333333333 36.29722 105.01794700324878
-0.01619285 -9.915263e-19 2.020011 1.930011 a8.2.a0.framecavity.6457 a8.2.a0.framecavity.2310 23.27856 40.60308333333333 1.7441516649512847
-0.08781184 -5.376925e-18 2.113347 2.023347 a8.2.a0.framecavity.6457 a8.2.a0.framecavity.2310 367.7467666666667 45.01263666666667 0.1224008430416029
-0.1594308 -9.762323e-18 2.206682 2.116682 a8.2.a0.framecavity.6457 a8.2.a0.framecavity.2310 365.9982333333333 45.75658333333334 0.12501824912748
-0.2310498 -1.414772e-17 2.300018 2.210018 a8.2.a0.framecavity.6457 a8.2.a0.framecavity.2310 363.9082333333333 46.05938666666666 0.12656833750760377
-0.3026688 -1.853312e-17 2.393354 2.303354 a8.2.a0.framecavity.6457 a8.2.a0.framecavity.2310 362.2932 46.60743 0.1286452557065501
-0.3742878 -2.291852e-17 2.48669 2.39669 a8.2.a0.framecavity.6457 a8.2.a0.framecavity.2310 362.0027 46.73423666666667 0.1290987817711992
-0.4459068 -2.730392e-17 2.580025 2.490025 a8.2.a0.framecavity.6457 a8.2.a0.framecavity.2310 360.5824333333333 43.01530333333333 0.11929362071820086
Oh, I understand now. With that methodology it wouldn't work. I do see an options with your carving method though:
-
Generate a box the size of the frame, and carve out everything but the borders. Then add the module itself the usual way. That way this will be two different identifiable materials. Number of objects: 2
-
Generate boxes for the frame itself by calculating location of edges and desired sizes as input. Number of objects goes up to 5 though.
@shirubana I finished my implementation of the module frames. I discovered that rtrace was giving me bad results when the sensors were located inside an antimatter volume, so I ended up just creating 4 separate pieces of geometry around the perimeter. Lesson learned.
So far my simulation results show a small decrease in rear irradiance with a frame vs no frame and an equivalent height zgap between torque tube and module.
The frames also make the renders look pretty:
Versus no frame:
@jalderman9 I was wondering if you could comment on how you made the support and tracker structure for the system shown in these images. It looks pretty detailed. I'm just starting out with the program, so any code or reference material would be a big help.
@shaca40 For the posts I created a function that calls genprism with a list of xy coordinates that defines the H shape and extrudes it in the z direction to the desired height with -l 0 0 <z height>
. Then you apply transforms to array the shape based on row spacing and North-South spacing.
The end result is a single line of text to add to your .rad file that looks something like this. The number 12 is the number of vertices and the long string of numbers that follow are the x y pairs, and finally the transforms to move/array the posts:
!genprism Metal_Grey Hpile 12 0 0 0.006 0 0.006 0.047 0.142 0.047 0.142 0 0.148 0 0.148 0.1 0.142 0.1 0.142 0.053 0.006 0.053 0.006 0.1 0 0.1 -l 0 0 1.543 | xform -t -0.074 -0.05 0 | xform -t -13.334 6.060 0 -a 5 -t 6.66667 0 0 -a 3 -t 0 -6.060 0
For the post caps/actuators I used dxf2rad as described here. For the purlins I again use genprism with xform.
The hardest part of this is keeping track of your reference frame and applying transforms in the correct order.
I believe bifacial_radiance has a method to add custom text to scenes but I just have my code directly open the .rad file for each hourly scene and append it.
while making module using makeModule module is getting shifted.
hence when I add frame to module, frame remain at same location. It does not get adjusted to updated module location.
This is the module image.
How to handle this?
@jalderman9 will you please give some example how you added frame?
this stems from the half-cell shift to center sensors on a cell in even-cell numbered modules. You can try doing an even number of cells or turning off the cell level module.
I thought there is a warning for using frames with the cell-level module. Maybe when we redid the module into a class-object that warning went away. I'll follow on the discussion on the thread you opened.
S.