@openpv/simshady

    Getting Started

    Install the package using your preferred package manager:

    npm install @openpv/simshady
    
    1. Initialize the Scene

    Begin by creating a new ShadingScene instance:

    import ShadingScene from '@openpv/simshady';

    const scene = new ShadingScene();
    1. Add Geometries

    Add one or more simulation geometries—such as buildings or PV panels—using addSimulationGeometry.
    Add shading geometries using addShadingGeometry:

    scene.addShadingGeometry(someShadingGeometry);
    scene.addSimulationGeometry(someSimulationGeometry);
    1. Add Solar Irradiance Data

    Include irradiance data in the required format via addSolarIrradiance. This data should contain time series for both direct and diffuse irradiance:

    scene.addSolarIrradiance(someSolarIrradianceData);
    
    1. Run the Simulation

    Call the calculate method to perform the simulation. It returns a Three.js Mesh, which can be used directly in a Three.js scene:

    let mesh = await scene.calculate({
    solarToElectricityConversionEfficiency: 0.15,
    });

    showThreeJS(mesh);

    💡 You can see a real-world usage example at openpv.de.

    MMNEPVFCICPMFPCPTTAAATR