![]() |
ModelSpace
Documentation for ModelSpace models and classes.
|
/******************************************************************************
* Copyright (c) ATTX LLC 2024. All Rights Reserved.
*
* This software and associated documentation (the "Software") are the
* proprietary and confidential information of ATTX, LLC. The Software is
* furnished under a license agreement between ATTX and the user organization
* and may be used or copied only in accordance with the terms of the agreement.
* Refer to 'license/attx_license.adoc' for standard license terms.
*
* EXPORT CONTROL NOTICE: THIS SOFTWARE MAY INCLUDE CONTENT CONTROLLED UNDER THE
* INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) OR THE EXPORT ADMINISTRATION
* REGULATIONS (EAR99). No part of the Software may be used, reproduced, or
* transmitted in any form or by any means, for any purpose, without the express
* written permission of ATTX, LLC.
******************************************************************************/
/*
Solar panel model header file
Author: Alex Jackson
*/
/*
Metadata for MS GUI:
imdata = {"exclude" : True}
*/
#ifndef MODELS_POWER_SOLAR_PANEL_POWER_MODEL_H
#define MODELS_POWER_SOLAR_PANEL_POWER_MODEL_H
#include "simulation/Model.h"
namespace modelspace {
/**
* @brief Solar panel power model
*
* This model defines simple solar panel power generation. This is computed by simply
* taking the product of the solar panel efficiency, solar irradiance, effective solar area, and solar intensity
* Author: Alex Jackson
* Email: alex.jackson@attx.tech
*/
MODEL(SolarPanelPowerModel)
public:
// Model params
// NAME TYPE DEFAULT VALUE
START_PARAMS
/** The solar irradiance at the location of interest in power per area (the default is in W/m^2)*/
SIGNAL(solar_irr, double, 1361.0)
/** The solar panel efficiency on a scale of 0 to 1 where 0 is 0 percent efficiency and 1 is 100 percent efficiency */
SIGNAL(panel_eff, double, 0.28)
END_PARAMS
// Model inputs
// NAME TYPE DEFAULT VALUE
START_INPUTS
/** The current effective solar area (normal to sun vector) */
SIGNAL(area, double, 1.0)
/** The current solar intensity on a scale of 0 to 1 where 0 is eclipse and 1 is direct sunlight */
SIGNAL(solar_int, double, 0.0)
END_INPUTS
// Model outputs
// NAME TYPE DEFAULT VALUE
START_OUTPUTS
/** The power generated by the panel */
SIGNAL(power, double, 0.0)
END_OUTPUTS
protected:
int16 execute() override;
};
}
#endif