Methods / Computational study 01

Every result starts
with an assumption.

The physical model, analytical solution, numerical checks, and reproduction instructions for our courtyard sunlight study.

01 / Physical scope

A precisely bounded model.

The courtyard has a flat rectangular floor, four opaque vertical walls of equal height, and an open top. Incoming sunlight is represented by parallel rays at a specified elevation and azimuth.

Included

  • Direct geometric shading by the four courtyard walls.
  • Changes in aspect ratio at a constant 100 m² floor area.
  • Uniform wall height and a single chosen sun position per calculation.

Outside the model

Weather, diffuse sky radiation, reflections, wall thickness, vegetation, neighboring buildings, surface materials, and thermal response are excluded. Sun position is supplied as an angle, rather than derived from latitude, date, or time.

The output is direct sunlit floor area under prescribed geometry and solar angles. Numerical verification checks this calculation within the stated model.

02 / Analytical method

From a ray
to an area.

Let W and L be the courtyard’s floor width and length, H the wall height, α the solar elevation, and β the azimuth measured clockwise from the upward length axis in plan view.

Trace a ray from the floor toward the sun. Over the vertical distance H, the ray moves horizontally by d. A floor point receives direct sunlight if that ray passes through the open top without intersecting a wall.

d = H / tan(α)Δx = d × sin(β)Δy = d × cos(β)f = max(0, W − |Δx|) × max(0, L − |Δy|) / (W × L)

The sunlit region is the overlap between the floor rectangle and its displaced opening. If either overlap dimension reaches zero, the whole floor is shaded.

Fixed area, variable proportions

For floor area A and aspect ratio r = L/W, width is √(A/r) and length is √(A × r). The published sweep uses A = 100 m².

Published parameter sweep · 315 combinations
Aspect ratio1:1, 2:1, 4:1
Wall height2.5, 5, 7.5 m
Solar elevation15°, 30°, 45°, 60°, 75°
Sun direction0° to 90°, in 15° steps

The interactive model also accepts intermediate values and a wider input range. A downloaded single calculation may therefore fall outside the published 315-case sweep.

03 / Verification

Check the equation.
Check the implementation.

Internal verification combines limiting cases, ray sampling and cross-language comparisons. The checks evaluate the implementations under the same physical assumptions.

Geometric checks

The released checker executes 1,585 assertions: 6 reference and limiting checks, 1,575 checks across the parameter sweep, and 4 ray-grid error bounds. The sweep checks cover bounded fractions, symmetry under a 180° change in sun direction, wall-height and solar-elevation monotonicity, and geometric scale invariance.

Separate ray-sampling comparison

A separate calculation samples floor points and tests whether rays toward the sun clear the walls. Six configurations are compared at four sampling resolutions: one benchmark from the published grid and five configurations outside it.

Largest absolute difference from the analytical sunlit fraction
Sampling gridDifference
40 × 400.01097929
80 × 800.00730196
160 × 1600.00347916
320 × 3200.00187773

The largest discrepancy at 320 × 320 points is about 0.188 percentage points. This measures discretization differences in the tested idealized geometries.

The ray sampler was developed within the study and evaluates the same geometry through point-by-point wall intersections.

Browser and Python agreement

The JavaScript module used by the browser and the Python model were compared across all 315 published cases. Their largest absolute difference in sunlit fraction was 2.78 × 10−16, consistent with floating-point arithmetic. This checks consistency between the two implementations.

The complete verification report records the six ray-sampling inputs, all 24 comparisons, exact dataset regeneration, implementation agreement, software versions, and source hashes. The reproduction script reruns these checks locally.

04 / Reproduction

Run the calculation.

Download the Python source and use Python 3.10 or later. No additional packages are required.

Run the verification checks

python3 courtyard-study.v1.py --check

Generate the complete dataset

python3 courtyard-study.v1.py > courtyard-results.csv

Compare the output with the published CSV. The release manifest records parameters, numerical checks, byte sizes, and SHA-256 hashes for the distributed files.

The browser’s JavaScript model implements the same analytical calculation. The interactive controls call this model locally.

Reproduce the complete verification

Use Python 3.10 or later and Node.js 18 or later. No extra packages or network access are required. Save these six files in the same folder:

python3 -B courtyard-reproduce.v1.py --browser-model courtyard-model.v1.js

The script prints a JSON report after checking file integrity, regenerating the CSV, running the released assertions, recording the ray-sampling comparisons, and comparing Python with the JavaScript module in Node.js. A changed input file or failed comparison returns an error. Runtime versions can differ from the published report; the numerical acceptance tolerance is stated in that report.

Report a reproducibility issue

Include the model version, command or input values, expected result, and observed result in a message to osama.khaled@ablaqstudios.com.

05 / Scientific context

Established geometry.
Explicit provenance.

The study applies established solar-shading geometry to rectangular courtyards. Its contribution is a reproducible parameter sweep, analytical derivation and comparison of numerical implementations.

EnergyPlus Engineering Reference: Shading Module describes the geometric treatment of direct solar shading in building simulation. This reference provides context for the study’s published analytical model and ray-sampling implementation.

Publication record

The study was first published by ABLAQ Studios on 20 November 2025. The report includes its analytical method, numerical comparisons and reproducible research materials. See the publication standards for review status.

The first documentation update identified the exact check inventory, distinguished one benchmark from five off-grid cases, and added the reproduction script and detailed report. Version 1.0.1 updated contributor credits, method descriptions and metadata. Calculation algorithms and CSV values were unchanged.

Version 1.0.2 updated institutional authorship, research responsibilities and computational-tool documentation, and aligned CSV export version labels. Calculation algorithms and parameter-sweep values are unchanged; the manifest and verification report identify the current files.

Download the study and verification files.

06 / Research responsibility

Scientific decisions.
Traceable contributions.

Scientific leadership and decision authority

Osama Khaled directs the research questions, methods, interpretation and publication, working with the research team. The leadership profile defines that remit.

Researcher contributions

The research team has defined responsibilities for methods, modelling, verification, data, and documentation. This study credits Osama Khaled for scientific research leadership and decision-making, research commissioning, and publication accountability.

Institutional authorship

ABLAQ Studios is the institutional author and publisher. The analytical model, ray sampler and reproduction scripts form the study’s computational record.

Computational tools

AI-assisted coding tools were used for computational implementation, numerical execution, and technical analysis and documentation. ABLAQ retains responsibility for scientific direction, interpretation and publication.

Scientific review and release records

The release record brings together the physical assumptions, analytical reasoning, interpretation, limitations, contributor credits, and reproducible files. Execution records document the numerical checks.

Corrections

Scientific questions and proposed corrections go to the research lead at osama.khaled@ablaqstudios.com. Include the version, inputs, expected outcome, and observed result. The manifest identifies the current files and their hashes; the numerical report records the executed comparisons.

Related investigations

Extend the question.