sketchucation logo sketchucation
    • Login
    1. Home
    2. dfwlarch
    3. Topics
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download
    D
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 6
    • Groups 1

    Topics

    • D

      [Plugin] Plugin to profile/optimize code

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      5
      0 Votes
      5 Posts
      3k Views
      D
      No, I didn't test it with the Developer Console. I was thinking the people who would most want to profile their code would have such a huge trace that they would want to dump to a file. Maybe printing to stdout should have an option of showing the top N entries...
    • D

      [Plugin] Solar/daylight analysis (v0.98, 2013-08-11)

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      6
      0 Votes
      6 Posts
      13k Views
      D
      I posted a new version (see original post for files to download). Recent changes: ` %(#00BF00)[# Rev. | .Date..... | Notes -----|------------|----------------------------------- 0.98 | 2013-08-11 | Add ability to read weather data from TMY3 file .... | .......... | Bug: in fine/tmy3 mode, adjust for surface tilt .... | .......... | based on beam strength on horiz. surface, not to .... | .......... | normal-to-beam surface 0.97 | 2013-08-07 | Bug: remove Numeric class overloads, make help .... | .......... | file search relative]` The enhancement in v0.98 lets you calculate the daylight factor as a ratio of observed weather to clear sky (Bird-Hulstrum model). So for example, this is the clear sky expectation over the course of a year for some geometry geolocated in Seattle, Washington (note the max daylight factor appearing in the bottom left corner area): [image: 9489912899_8d30b0ac60.jpg] Using a weather file from Seattle, the daylight factor looked like this: [image: 9492664718_87f5fbc91c.jpg] In other words, over a typical year the cloud cover allows only 78% of the theoretical maximum sunlight reaching a horizontal surface. Contrast that with the same geometry geolocated to Phoenix, Arizona. This is the daylight factor using the Phoenix TMY3 weather file. Very little cloud cover. [image: 9492657232_c8a9a7ae59.jpg] In TMY3 mode (a.k.a weather file), I could also have displayed the results in terms of watts per square meter, to get an idea of the amount of solar energy I could capture with a photovoltaic array. Note, however, that you would have to factor in PV efficiency (or inefficiency). It should also be noted that the computations currently take a while. The above test uses really simple geometry. Here is what is being calculated: triangulated network of 96 faces to analyze 27 faces make up the shading structure analyzed from Jan 1 through Dec 31 run on a laptop with a core2 duo processor @2.26Ghz, 32 bit OS, 3GB ram and it takes 126 secondsto crunch. Hence the need for this plugin: http://sketchucation.com/forums/viewtopic.php?f=323&t=53685. Profiling the code when it's trying to simulate a run of 15 days showed the following: % cumulative self self total time seconds seconds calls ms/call ms/call name 41.80 285.60 285.60 660648 0.43 0.60 BM_SimpleSolarStudy.inShadow 20.81 427.80 142.20 81464 1.75 23.65 Range#each 5.69 466.65 38.84 2404861 0.02 0.02 Array#[] 3.80 492.60 25.96 59682 0.43 0.78 BM_SimpleSolarStudy.adjustForTilt 1.89 505.49 12.88 660648 0.02 0.02 Geom.intersect_line_plane 1.81 517.84 12.36 660648 0.02 0.02 Sketchup;;Face#plane 1.70 529.47 11.63 660857 0.02 0.02 String#to_i 1.68 540.93 11.46 660648 0.02 0.02 Sketchup;;Face#classify_point 1.66 552.26 11.33 660648 0.02 0.02 Geom;;Point3d#- 1.63 563.41 11.15 661263 0.02 0.02 Hash#[] 1.62 574.51 11.10 662207 0.02 0.02 Fixnum#== 1.58 585.31 10.80 662137 0.02 0.02 Kernel.nil? 1.53 595.79 10.48 660853 0.02 0.02 Fixnum#& 1.51 606.14 10.35 661345 0.02 0.02 Fixnum#> 1.49 616.29 10.15 660648 0.02 0.02 Sketchup;;Drawingelement#hidden? 1.40 625.85 9.56 144037 0.07 0.10 Numeric#to_rad 0.98 632.53 6.68 203 32.89 32.89 Sketchup;;Drawingelement#material= 0.91 638.75 6.22 660851 0.01 0.01 Kernel.== 0.80 644.20 5.45 388599 0.01 0.01 Float#* 0.71 649.05 4.85 63402 0.08 0.10 Numeric#to_deg 0.62 653.26 4.22 119364 0.04 0.05 Geom;;Vector3d#new 0.61 657.43 4.16 744 5.60 13.40 BM_SimpleSolarStudy;;SSS_sunData#calcSun
    • 1 / 1