Software Requirements Specification for Solar Water Heating Systems¶

Thulasi Jegatheesan¶

Table of Contents¶

An outline of all sections included in this SRS is recorded here for easy reference.

  • Table of Contents
  • Reference Material
    • Table of Units
    • Table of Symbols
    • Abbreviations and Acronyms
  • Introduction
    • Purpose of Document
    • Scope of Requirements
    • Characteristics of Intended Reader
    • Organization of Document
  • General System Description
    • System Context
    • User Characteristics
    • System Constraints
  • Specific System Description
  • Problem Description
    • Terminology and Definitions
    • Physical System Description
    • Goal Statements
  • Solution Characteristics Specification
    • Assumptions
    • Theoretical Models
    • General Definitions
    • Data Definitions
    • Instance Models
    • Data Constraints
    • Properties of a Correct Solution
  • Requirements
    • Functional Requirements
    • Non-Functional Requirements
  • Likely Changes
  • Unlikely Changes
  • Traceability Matrices and Graphs
  • Values of Auxiliary Constants
  • References

Reference Material¶

This section records information for easy reference.

Table of Units¶

The unit system used throughout is SI (Système International d'Unités). In addition to the basic units, several derived units are also used. For each unit, the Table of Units lists the symbol, a description, and the SI name.

Symbol Description SI Name
$°C$ temperature centigrade
$J$ energy joule
$kg$ mass kilogram
$m$ length metre
$s$ time second
$W$ power watt

Table of Symbols¶

The symbols used in this document are summarized in the Table of Symbols along with their units. The choice of symbols was made to be consistent with the heat transfer literature and with existing documentation for solar water heating systems with no phase change material. The symbols are listed in alphabetical order. For vector quantities, the units shown are for each component of the vector.

Symbol Description Units
$A_C$ Heating coil surface area $m^2$
$A_C^max$ Maximum surface area of coil $m^2$
$A_in$ Surface area over which heat is transferred in $m^2$
$A_out$ Surface area over which heat is transferred out $m^2$
$A_tol$ Absolute tolerance --
$AR_max$ Maximum aspect ratio --
$AR_min$ Minimum aspect ratio --
$C$ Specific heat capacity $\frac{J}{kg°C}$
$C^L$ Specific heat capacity of a liquid $\frac{J}{kg°C}$
$C_W$ Specific heat capacity of water $\frac{J}{kg°C}$
$C_W^max$ Maximum specific heat capacity of water $\frac{J}{kg°C}$
$C_W^min$ Minimum specific heat capacity of water $\frac{J}{kg°C}$
$D$ Diameter of tank $m$
$E$ Sensible heat $J$
$E_W$ Change in heat energy in the water $J$
$g$ Volumetric heat generation per unit volume $\frac{W}{m^3}$
$h$ Convective heat transfer coefficient $\frac{W}{m^2°C}$
$h_C$ Convective heat transfer coefficient between coil and water $\frac{W}{m^2°C}$
$h_C^max$ Maximum convective heat transfer coefficient between coil and water $\frac{W}{m^2°C}$
$h_C^min$ Minimum convective heat transfer coefficient between coil and water $\frac{W}{m^2°C}$
$L$ Length of tank $m$
$L_max$ Maximum length of tank $m$
$L_min$ Minimum length of tank $m$
$m$ Mass $kg$
$m_W$ Mass of water $kg$
$n̂$ Normal vector --
$q$ Heat flux $\frac{W}{m^2}$
$q_C$ Heat flux into the water from the coil $\frac{W}{m^2}$
$q_in$ Heat flux input $\frac{W}{m^2}$
$q_out$ Heat flux output $\frac{W}{m^2}$
$q$ Thermal flux vector $\frac{W}{m^2}$
$R_tol$ Relative tolerance --
$S$ Surface $m^2$
$T$ Temperature $°C$
$ΔT$ Change in temperature $°C$
$T_C$ Temperature of the heating coil $°C$
$T_env$ Temperature of the environment $°C$
$T_init$ Initial temperature $°C$
$T_W$ Temperature of the water $°C$
$t$ Time $s$
$t_final$ Final time $s$
$t_final^max$ Maximum final time $s$
$t_step$ Time step for simulation $s$
$V$ Volume $m^3$
$V_tank$ Volume of the cylindrical tank $m^3$
$V_W$ Volume of water $m^3$
$π$ Ratio of circumference to diameter for any circle --
$ρ$ Density $\frac{kg}{m^3}$
$ρ_W$ Density of water $\frac{kg}{m^3}$
$ρ_W^max$ Maximum density of water $\frac{kg}{m^3}$
$ρ_W^min$ Minimum density of water $\frac{kg}{m^3}$
$τ_W$ ODE parameter for water related to decay time $s$
$∇$ Gradient --

Abbreviations and Acronyms¶

Abbreviation Full Form
A Assumption
DD Data Definition
GD General Definition
GS Goal Statement
IM Instance Model
LC Likely Change
ODE Ordinary Differential Equation
PS Physical System Description
R Requirement
RefBy Referenced by
Refname Reference Name
SRS Software Requirements Specification
SWHSNoPCM Solar Water Heating System With No Phase Change Material
TM Theoretical Model
UC Unlikely Change
Uncert. Typical Uncertainty

Introduction¶

Due to increasing costs, diminishing availability, and negative environmental impact of fossil fuels, the demand is high for renewable energy sources and energy storage technology. Solar Water Heating System with no Phase Change Material provide a novel way of storing energy.

The following section provides an overview of the Software Requirements Specification (SRS) for solar water heating systems with no phase change material The developed program will be referred to as Solar Water Heating System With No Phase Change Material (SWHSNoPCM) based on the original, manually created version of <a href=\"https://github.com/smiths/caseStudies/blob/master/CaseStudies/noPCM\">SWHSNoPCM</a>. This section explains the purpose of this document, the scope of the requirements, the characteristics of the intended reader, and the organization of the document.

Purpose of Document¶

The primary purpose of this document is to record the requirements of SWHSNoPCM. Goals, assumptions, theoretical models, definitions, and other model derivation information are specified, allowing the reader to fully understand and verify the purpose and scientific basis of SWHSNoPCM. With the exception of system constraints, this SRS will remain abstract, describing what problem is being solved, but not how to solve it.

This document will be used as a starting point for subsequent development phases, including writing the design specification and the software verification and validation plan. The design document will show how the requirements are to be realized, including decisions on the numerical algorithms and programming environment. The verification and validation plan will show the steps that will be used to increase confidence in the software documentation and the implementation. Although the SRS fits in a series of documents that follow the so-called waterfall model, the actual development process is not constrained in any way. Even when the waterfall model is not followed, as Parnas and Clements point out parnasClements1986 , the most logical way to present the documentation is still to "fake" a rational design process.

Scope of Requirements¶

The scope of the requirements includes thermal analysis of a single solar water heating tank.

Characteristics of Intended Reader¶

Reviewers of this documentation should have an understanding of heat transfer theory from level 3 or 4 mechanical engineering and differential equations from level 1 and 2 calculus. The users of SWHSNoPCM can have a lower level of expertise, as explained in Sec:User Characteristics.

Organization of Document¶

The organization of this document follows the template for an SRS for scientific computing software proposed by koothoor2013 , smithLai2005 , smithEtAl2007 , and smithKoothoor2016 . The presentation follows the standard pattern of presenting goals, theories, definitions, and assumptions. For readers that would like a more bottom up approach, they can start reading the instance models and trace back to find any additional information they require.

The goal statements are refined to the theoretical models and the theoretical models to the instance models. The instance model to be solved is referred to as IM:eBalanceOnWtr. The instance model provides the Ordinary Differential Equation (ODE) that models the solar water heating system with no phase change material. SWHSNoPCM solves this ODE.

General System Description¶

This section provides general information about the system. It identifies the interfaces between the system and its environment, describes the user characteristics, and lists the system constraints.

System Context¶

Fig:SysCon shows the system context. A circle represents an external entity outside the software, the user in this case. A rectangle represents the software system itself (SWHSNoPCM). Arrows are used to show the data flow between the system and its environment.

System Context

SWHSNoPCM is mostly self-contained. The only external interaction is through the user interface. The responsibilities of the user and the system are as follows:

  • User Responsibilities:
    • Provide the input data to the system, ensuring no errors in the data entry
    • Take care that consistent units are used for input variables
  • SWHSNoPCM Responsibilities:
    • Detect data type mismatch, such as a string of characters instead of a floating point number
    • Determine if the inputs satisfy the required physical and software constraints
    • Calculate the required outputs

User Characteristics¶

The end user of SWHSNoPCM should have an understanding of undergraduate Level 1 Calculus and Physics.

System Constraints¶

There are no system constraints.

Specific System Description¶

This section first presents the problem description, which gives a high-level view of the problem to be solved. This is followed by the solution characteristics specification, which presents the assumptions, theories, and definitions that are used.

Problem Description¶

A system is needed to investigate the heating of water in a solar water heating tank.

Terminology and Definitions¶

This subsection provides a list of terms that are used in the subsequent sections and their meaning, with the purpose of reducing ambiguity and making it easier to correctly understand the requirements.

  • Heat flux: The rate of thermal energy transfer through a given surface per unit time.
  • Specific heat capacity: The amount of energy required to raise the temperature of the unit mass of a given substance by a given amount.
  • Thermal conduction: The transfer of heat energy through a substance.
  • Transient: Changing with time.

Physical System Description¶

The physical system of SWHSNoPCM, as shown in Fig:Tank, includes the following elements:

PS1: Tank containing water.

PS2: Heating coil at bottom of tank. ($q_C$ represents the heat flux into the water from the coil.)

Solar water heating tank, with heat flux from heating coil of $q_C$

Goal Statements¶

Given the temperature of the heating coil, the initial temperature of the water, and the material properties, the goal statements are:

<div id=\"waterTempGS\"> Predict-Water-Temperature: Predict the temperature of the water over time.

</div>

<div id=\"waterEnergyGS\"> Predict-Water-Energy: Predict the change in heat energy in the water over time.

</div>

Solution Characteristics Specification¶

The instance models that govern SWHSNoPCM are presented in the Instance Model Section. The information to understand the meaning of the instance models and their derivation is also presented, so that the instance models can be verified.

Assumptions¶

This section simplifies the original problem and helps in developing the theoretical models by filling in the missing information for the physical system. The assumptions refine the scope by providing more detail.

<div id=\"assumpTEO\"> Thermal-Energy-Only: The only form of energy that is relevant for this problem is thermal energy. All other forms of energy, such as mechanical energy, are assumed to be negligible. (RefBy: TM:consThermE.)

</div>

<div id=\"assumpHTCC\"> Heat-Transfer-Coeffs-Constant: All heat transfer coefficients are constant over time. (RefBy: TM:nwtnCooling.)

</div>

<div id=\"assumpCWTAT\"> Constant-Water-Temp-Across-Tank: The water in the tank is fully mixed, so the temperature of the water is the same throughout the entire tank. (RefBy: GD:rocTempSimp.)

</div>

<div id=\"assumpDWCoW\"> Density-Water-Constant-over-Volume: The density of water has no spatial variation; that is, it is constant over their entire volume. (RefBy: GD:rocTempSimp.)

</div>

<div id=\"assumpSHECoW\"> Specific-Heat-Energy-Constant-over-Volume: The specific heat capacity of water has no spatial variation; that is, it is constant over its entire volume. (RefBy: GD:rocTempSimp.)

</div>

<div id=\"assumpLCCCW\"> Newton-Law-Convective-Cooling-Coil-Water: Newton's law of convective cooling applies between the heating coil and the water. (RefBy: GD:htFluxWaterFromCoil.)

</div>

<div id=\"assumpTHCCoT\"> Temp-Heating-Coil-Constant-over-Time: The temperature of the heating coil is constant over time. (RefBy: GD:htFluxWaterFromCoil and LC:Temperature-Coil-Variable-Over-Day.)

</div>

<div id=\"assumpTHCCoL\"> Temp-Heating-Coil-Constant-over-Length: The temperature of the heating coil does not vary along its length. (RefBy: LC:Temperature-Coil-Variable-Over-Length.)

</div>

<div id=\"assumpCTNTD\"> Charging-Tank-No-Temp-Discharge: The model only accounts for charging the tank, not discharging. The temperature of the water can only increase, or remain constant; it cannot decrease. This implies that the initial temperature is less than (or equal to) the temperature of the heating coil. (RefBy: LC:Discharging-Tank.)

</div>

<div id=\"assumpWAL\"> Water-Always-Liquid: The operating temperature range of the system is such that the material (water in this case) is always in liquid state. That is, the temperature will not drop below the melting point temperature of water, or rise above its boiling point temperature. (RefBy: TM:sensHtE, IM:heatEInWtr, IM:eBalanceOnWtr, and UC:Water-Fixed-States.)

</div>

<div id=\"assumpPIT\"> Perfect-Insulation-Tank: The tank is perfectly insulated so that there is no heat loss from the tank. (RefBy: IM:eBalanceOnWtr and LC:Tank-Lose-Heat.)

</div>

<div id=\"assumpNIHGBW\"> No-Internal-Heat-Generation-By-Water: No internal heat is generated by the water; therefore, the volumetric heat generation per unit volume is zero. (RefBy: IM:eBalanceOnWtr and UC:No-Internal-Heat-Generation.)

</div>

<div id=\"assumpAPT\"> Atmospheric-Pressure-Tank: The pressure in the tank is atmospheric, so the melting point temperature and boiling point temperature of water are 0$&deg;C$ and 100$&deg;C$, respectively. (RefBy: IM:heatEInWtr.)

</div>

<div id=\"assumpVCN\"> Volume-Coil-Negligible: When considering the volume of water in the tank, the volume of the heating coil is assumed to be negligible. (RefBy: DD:waterVolume_nopcm.)

</div>

Theoretical Models¶

This section focuses on the general equations and laws that SWHSNoPCM is based on.

<table class=\"tdefn\">

Refname

TM:consThermE </tr>

Label

Conservation of thermal energy </td> </tr>

Equation

$$-∇\cdot{}\symbf{q}+g=ρ\,C\,\frac{\,\partial{}T}{\,\partial{}t}$$ </tr>

Description

  • $∇$ is the gradient (Unitless)
  • $q$ is the thermal flux vector ($\frac{W}{m^2}$)
  • $g$ is the volumetric heat generation per unit volume ($\frac{W}{m^3}$)
  • $ρ$ is the density ($\frac{kg}{m^3}$)
  • $C$ is the specific heat capacity ($\frac{J}{kg°C}$)
  • $t$ is the time ($s$)
  • $T$ is the temperature ($°C$)
  • </td> </tr>

    Notes

    The above equation gives the law of conservation of energy for transient heat transfer in a given material.

    For this equation to apply, other forms of energy, such as mechanical energy, are assumed to be negligible in the system (A:Thermal-Energy-Only). </td> </tr>

    Source

    <a href=\"http://www.efunda.com/formulae/heat_transfer/conduction/overview_cond.cfm\">Fourier Law of Heat Conduction and Heat Equation</a> </td> </tr>

    RefBy

    GD:rocTempSimp </td> </tr> </table>

    <table class=\"tdefn\">

    Refname

    TM:sensHtE </tr>

    Label

    Sensible heat energy (no state change) </td> </tr>

    Equation

    $$E={C^{\text{L}}}\,m\,ΔT$$ </tr>

    Description

  • $E$ is the sensible heat ($J$)
  • $C^L$ is the specific heat capacity of a liquid ($\frac{J}{kg°C}$)
  • $m$ is the mass ($kg$)
  • $ΔT$ is the change in temperature ($°C$)
  • </td> </tr>

    Notes

    $E$ occurs as long as the material does not reach a temperature where a phase change occurs, as assumed in A:Water-Always-Liquid. </td> </tr>

    Source

    <a href=\"http://en.wikipedia.org/wiki/Sensible_heat\">Definition of Sensible Heat</a> </td> </tr>

    RefBy

    IM:heatEInWtr </td> </tr> </table>

    <table class=\"tdefn\">

    Refname

    TM:nwtnCooling </tr>

    Label

    Newton's law of cooling </td> </tr>

    Equation

    $$q\left(t\right)=h\,ΔT\left(t\right)$$ </tr>

    Description

  • $q$ is the heat flux ($\frac{W}{m^2}$)
  • $t$ is the time ($s$)
  • $h$ is the convective heat transfer coefficient ($\frac{W}{m^2°C}$)
  • $ΔT$ is the change in temperature ($°C$)
  • </td> </tr>

    Notes

    Newton's law of cooling describes convective cooling from a surface. The law is stated as: the rate of heat loss from a body is proportional to the difference in temperatures between the body and its surroundings.

    $h$ is assumed to be independent of $T$ (from A:Heat-Transfer-Coeffs-Constant).

    $ΔT(t) = T(t) - T_env(t)$ is the time-dependant thermal gradient between the environment and the object. </td> </tr>

    Source

    incroperaEtAl2007 (pg. 8) </td> </tr>

    RefBy

    GD:htFluxWaterFromCoil </td> </tr> </table>

    General Definitions¶

    This section collects the laws and equations that will be used to build the instance models.

    <table class=\"gdefn\">

    Refname

    GD:rocTempSimp </tr>

    Label

    Simplified rate of change of temperature </td> </tr>

    Equation

    $$m\,C\,\frac{\,dT}{\,dt}={q_{\text{in}}}\,{A_{\text{in}}}-{q_{\text{out}}}\,{A_{\text{out}}}+g\,V$$ </tr>

    Description

  • $m$ is the mass ($kg$)
  • $C$ is the specific heat capacity ($\frac{J}{kg°C}$)
  • $t$ is the time ($s$)
  • $T$ is the temperature ($°C$)
  • $q_in$ is the heat flux input ($\frac{W}{m^2}$)
  • $A_in$ is the surface area over which heat is transferred in ($m^2$)
  • $q_out$ is the heat flux output ($\frac{W}{m^2}$)
  • $A_out$ is the surface area over which heat is transferred out ($m^2$)
  • $g$ is the volumetric heat generation per unit volume ($\frac{W}{m^3}$)
  • $V$ is the volume ($m^3$)
  • </td> </tr>

    Source

    -- </td> </tr>

    RefBy

    GD:rocTempSimp and IM:eBalanceOnWtr </td> </tr> </table>

    Detailed derivation of simplified rate of change of temperature:¶

    Integrating TM:consThermE over a volume ($V$), we have: $$-\int_{V}{∇\cdot{}\symbf{q}}\,dV+\int_{V}{g}\,dV=\int_{V}{ρ\,C\,\frac{\,\partial{}T}{\,\partial{}t}}\,dV$$

    Applying Gauss's Divergence Theorem to the first term over the surface $S$ of the volume, with $q$ as the thermal flux vector for the surface and $n&#770;$ as a unit outward normal vector for a surface: $$-\int_{S}{\symbf{q}\cdot{}\symbf{\hat{n}}}\,dS+\int_{V}{g}\,dV=\int_{V}{ρ\,C\,\frac{\,\partial{}T}{\,\partial{}t}}\,dV$$

    We consider an arbitrary volume. The volumetric heat generation per unit volume is assumed constant. Then Equation (1) can be written as: $${q_{\text{in}}}\,{A_{\text{in}}}-{q_{\text{out}}}\,{A_{\text{out}}}+g\,V=\int_{V}{ρ\,C\,\frac{\,\partial{}T}{\,\partial{}t}}\,dV$$

    Where $q_in$, $q_out$, $A_in$, and $A_out$ are explained in GD:rocTempSimp. Assuming $ρ$, $C$, and $T$ are constant over the volume, which is true in our case by A:Constant-Water-Temp-Across-Tank, A:Density-Water-Constant-over-Volume, and A:Specific-Heat-Energy-Constant-over-Volume, we have: $$ρ\,C\,V\,\frac{\,dT}{\,dt}={q_{\text{in}}}\,{A_{\text{in}}}-{q_{\text{out}}}\,{A_{\text{out}}}+g\,V$$

    Using the fact that $ρ$=$m$/$V$, Equation (2) can be written as: $$m\,C\,\frac{\,dT}{\,dt}={q_{\text{in}}}\,{A_{\text{in}}}-{q_{\text{out}}}\,{A_{\text{out}}}+g\,V$$

    <table class=\"gdefn\">

    Refname

    GD:htFluxWaterFromCoil </tr>

    Label

    Heat flux into the water from the coil </td> </tr>

    Units

    $\frac{W}{m^2}$ </td> </tr>

    Equation

    $${q_{\text{C}}}={h_{\text{C}}}\,\left({T_{\text{C}}}-{T_{\text{W}}}\left(t\right)\right)$$ </tr>

    Description

  • $q_C$ is the heat flux into the water from the coil ($\frac{W}{m^2}$)
  • $h_C$ is the convective heat transfer coefficient between coil and water ($\frac{W}{m^2°C}$)
  • $T_C$ is the temperature of the heating coil ($°C$)
  • $T_W$ is the temperature of the water ($°C$)
  • $t$ is the time ($s$)
  • </td> </tr>

    Notes

    $q_C$ is found by assuming that Newton's law of cooling applies (A:Newton-Law-Convective-Cooling-Coil-Water). This law (defined in TM:nwtnCooling) is used on the surface of the heating coil.

    A:Temp-Heating-Coil-Constant-over-Time </td> </tr>

    Source

    koothoor2013 </td> </tr>

    RefBy

    IM:eBalanceOnWtr </td> </tr> </table>

    Data Definitions¶

    This section collects and defines all the data needed to build the instance models.

    <table class=\"ddefn\">

    Refname

    DD:waterMass </tr>

    Label

    Mass of water </td> </tr>

    Symbol

    $m_W$ </td> </tr>

    Units

    $kg$ </td> </tr>

    Equation

    $${m_{\text{W}}}={V_{\text{W}}}\,{ρ_{\text{W}}}$$ </tr>

    Description

  • $m_W$ is the mass of water ($kg$)
  • $V_W$ is the volume of water ($m^3$)
  • $ρ_W$ is the density of water ($\frac{kg}{m^3}$)
  • </td> </tr>

    Source

    -- </td> </tr>

    RefBy

    FR:Find-Mass </td> </tr> </table>

    <table class=\"ddefn\">

    Refname

    DD:waterVolume.nopcm </tr>

    Label

    Volume of water </td> </tr>

    Symbol

    $V_W$ </td> </tr>

    Units

    $m^3$ </td> </tr>

    Equation

    $${V_{\text{W}}}={V_{\text{tank}}}$$ </tr>

    Description

  • $V_W$ is the volume of water ($m^3$)
  • $V_tank$ is the volume of the cylindrical tank ($m^3$)
  • </td> </tr>

    Notes

    Based on A:Volume-Coil-Negligible. $V_tank$ is defined in DD:tankVolume. </td> </tr>

    Source

    -- </td> </tr>

    RefBy

    FR:Find-Mass </td> </tr> </table>

    <table class=\"ddefn\">

    Refname

    DD:tankVolume </tr>

    Label

    Volume of the cylindrical tank </td> </tr>

    Symbol

    $V_tank$ </td> </tr>

    Units

    $m^3$ </td> </tr>

    Equation

    $${V_{\text{tank}}}=π\,\left(\frac{D}{2}\right)^{2}\,L$$ </tr>

    Description

  • $V_tank$ is the volume of the cylindrical tank ($m^3$)
  • $π$ is the ratio of circumference to diameter for any circle (Unitless)
  • $D$ is the diameter of tank ($m$)
  • $L$ is the length of tank ($m$)
  • </td> </tr>

    Source

    -- </td> </tr>

    RefBy

    FR:Find-Mass and DD:waterVolume_nopcm </td> </tr> </table>

    <table class=\"ddefn\">

    Refname

    DD:balanceDecayRate </tr>

    Label

    ODE parameter for water related to decay time </td> </tr>

    Symbol

    $τ_W$ </td> </tr>

    Units

    $s$ </td> </tr>

    Equation

    $${τ_{\text{W}}}=\frac{{m_{\text{W}}}\,{C_{\text{W}}}}{{h_{\text{C}}}\,{A_{\text{C}}}}$$ </tr>

    Description

  • $τ_W$ is the ODE parameter for water related to decay time ($s$)
  • $m_W$ is the mass of water ($kg$)
  • $C_W$ is the specific heat capacity of water ($\frac{J}{kg°C}$)
  • $h_C$ is the convective heat transfer coefficient between coil and water ($\frac{W}{m^2°C}$)
  • $A_C$ is the heating coil surface area ($m^2$)
  • </td> </tr>

    Source

    koothoor2013 </td> </tr>

    RefBy

    IM:eBalanceOnWtr and FR:Output-Input-Derived-Values </td> </tr> </table>

    Instance Models¶

    This section transforms the problem defined in the problem description into one which is expressed in mathematical terms. It uses concrete symbols defined in the data definitions to replace the abstract symbols in the models identified in theoretical models and general definitions.

    The goal GS:Predict-Water-Temperature is met by IM:eBalanceOnWtr and the goal GS:Predict-Water-Energy is met by IM:heatEInWtr.

    <table class=\"idefn\">

    Refname

    IM:eBalanceOnWtr </tr>

    Label

    Energy balance on water to find the temperature of the water </td> </tr>

    Input

    $T_C$, $T_init$, $t_final$, $A_C$, $h_C$, $C_W$, $m_W$ </td> </tr>

    Output

    $T_W$ </td> </tr>

    Input Constraints

    $${T_{\text{C}}}\geq{}{T_{\text{init}}}$$ </tr>

    Output Constraints

    </tr>

    Equation

    $$\frac{\,d{T_{\text{W}}}}{\,dt}+\frac{1}{{τ_{\text{W}}}}\,{{T_{\text{W}}}}=\frac{1}{{τ_{\text{W}}}}\,{T_{\text{C}}}$$ </tr>

    Description

  • $t$ is the time ($s$)
  • $T_W$ is the temperature of the water ($°C$)
  • $τ_W$ is the ODE parameter for water related to decay time ($s$)
  • $T_C$ is the temperature of the heating coil ($°C$)
  • </td> </tr>

    Notes

    $τ_W$ is calculated from DD:balanceDecayRate.

    The above equation applies as long as the water is in liquid form, $0&thinsp;&lt;&thinsp;T_W&thinsp;&lt;&thinsp;100$ ($&deg;C$) where $0$ ($&deg;C$) and $100$ ($&deg;C$) are the melting and boiling point temperatures of water, respectively (A:Water-Always-Liquid). </td> </tr>

    Source

    koothoor2013 (with PCM removed) </td> </tr>

    RefBy

    UC:No-Internal-Heat-Generation, FR:Output-Values, FR:Find-Mass, and FR:Calculate-Values </td> </tr> </table>

    Detailed derivation of the energy balance on water:¶

    To find the rate of change of $T_W$, we look at the energy balance on water. The volume being considered is the volume of water in the tank $V_W$, which has mass $m_W$ and specific heat capacity, $C_W$. Heat transfer occurs in the water from the heating coil as $q_C$ (GD:htFluxWaterFromCoil), over area $A_C$. No heat transfer occurs to the outside of the tank, since it has been assumed to be perfectly insulated (A:Perfect-Insulation-Tank). Since the assumption is made that no internal heat is generated (A:No-Internal-Heat-Generation-By-Water), $g = 0$. Therefore, the equation for GD:rocTempSimp can be written as: $${m_{\text{W}}}\,{C_{\text{W}}}\,\frac{\,d{T_{\text{W}}}}{\,dt}={q_{\text{C}}}\,{A_{\text{C}}}$$

    Using GD:htFluxWaterFromCoil for $q_C$, this can be written as: $${m_{\text{W}}}\,{C_{\text{W}}}\,\frac{\,d{T_{\text{W}}}}{\,dt}={h_{\text{C}}}\,{A_{\text{C}}}\,\left({T_{\text{C}}}-{T_{\text{W}}}\right)$$

    Dividing Equation (2) by $m_WC_W$, we obtain: $$\frac{\,d{T_{\text{W}}}}{\,dt}=\frac{{h_{\text{C}}}\,{A_{\text{C}}}}{{m_{\text{W}}}\,{C_{\text{W}}}}\,\left({T_{\text{C}}}-{T_{\text{W}}}\right)$$

    By substituting $τ_W$ (from DD:balanceDecayRate), this can be written as: $$\frac{\,d{T_{\text{W}}}}{\,dt}=\frac{1}{{τ_{\text{W}}}}\,\left({T_{\text{C}}}-{T_{\text{W}}}\right)$$

    <table class=\"idefn\">

    Refname

    IM:heatEInWtr </tr>

    Label

    Heat energy in the water </td> </tr>

    Input

    $T_init$, $m_W$, $C_W$, $m_W$ </td> </tr>

    Output

    $E_W$ </td> </tr>

    Input Constraints

    </tr>

    Output Constraints

    </tr>

    Equation

    $${E_{\text{W}}}\left(t\right)={C_{\text{W}}}\,{m_{\text{W}}}\,\left({T_{\text{W}}}\left(t\right)-{T_{\text{init}}}\right)$$ </tr>

    Description

  • $E_W$ is the change in heat energy in the water ($J$)
  • $t$ is the time ($s$)
  • $C_W$ is the specific heat capacity of water ($\frac{J}{kg°C}$)
  • $m_W$ is the mass of water ($kg$)
  • $T_W$ is the temperature of the water ($°C$)
  • $T_init$ is the initial temperature ($°C$)
  • </td> </tr>

    Notes

    The above equation is derived using TM:sensHtE.

    The change in temperature is the difference between the temperature at time $t$ ($s$), $T_W$ and the initial temperature, $T_init$ ($&deg;C$).

    This equation applies as long as $0&thinsp;&lt;&thinsp;T_W&thinsp;&lt;&thinsp;100$$&deg;C$ (A:Water-Always-Liquid, A:Atmospheric-Pressure-Tank). </td> </tr>

    Source

    koothoor2013 </td> </tr>

    RefBy

    FR:Output-Values and FR:Calculate-Values </td> </tr> </table>

    Data Constraints¶

    The Data Constraints Table shows the data constraints on the input variables. The column for physical constraints gives the physical limitations on the range of values that can be taken by the variable. The uncertainty column provides an estimate of the confidence with which the physical quantities can be measured. This information would be part of the input if one were performing an uncertainty quantification exercise. The constraints are conservative to give the user of the model the flexibility to experiment with unusual situations. The column of typical values is intended to provide a feel for a common scenario. The column for software constraints restricts the range of inputs to reasonable values.

    Var Physical Constraints Software Constraints Typical Value Uncert.
    $A_C$ $A_C&thinsp;&gt;&thinsp;0$ $A_C&thinsp;&le;&thinsp;A_C^max$ $0.12$ $m^2$ 10$%$
    $C_W$ $C_W&thinsp;&gt;&thinsp;0$ $C_W^min&thinsp;&lt;&thinsp;C_W&thinsp;&lt;&thinsp;C_W^max$ $4186$ $\frac{J}{kg&deg;C}$ 10$%$
    $D$ $D&thinsp;&gt;&thinsp;0$ $AR_min&thinsp;&le;&thinsp;D&thinsp;&le;&thinsp;AR_max$ $0.412$ $m$ 10$%$
    $h_C$ $h_C&thinsp;&gt;&thinsp;0$ $h_C^min&thinsp;&le;&thinsp;h_C&thinsp;&le;&thinsp;h_C^max$ $1000$ $\frac{W}{m^2&deg;C}$ 10$%$
    $L$ $L&thinsp;&gt;&thinsp;0$ $L_min&thinsp;&le;&thinsp;L&thinsp;&le;&thinsp;L_max$ $1.5$ $m$ 10$%$
    $T_C$ $0&thinsp;&lt;&thinsp;T_C&thinsp;&lt;&thinsp;100$ -- $50$ $&deg;C$ 10$%$
    $T_init$ $0&thinsp;&lt;&thinsp;T_init&thinsp;&lt;&thinsp;100$ -- $40$ $&deg;C$ 10$%$
    $t_final$ $t_final&thinsp;&gt;&thinsp;0$ $t_final&thinsp;&lt;&thinsp;t_final^max$ $50000$ $s$ 10$%$
    $t_step$ $0&thinsp;&lt;&thinsp;t_step&thinsp;&lt;&thinsp;t_final$ -- $0.01$ $s$ 10$%$
    $ρ_W$ $ρ_W&thinsp;&gt;&thinsp;0$ $ρ_W^min&thinsp;&lt;&thinsp;ρ_W&thinsp;&le;&thinsp;ρ_W^max$ $1000$ $\frac{kg}{m^3}$ 10$%$

    Properties of a Correct Solution¶

    The Data Constraints Table shows the data constraints on the output variables. The column for physical constraints gives the physical limitations on the range of values that can be taken by the variable.

    Var Physical Constraints
    $T_W$ $T_init&thinsp;&le;&thinsp;T_W&thinsp;&le;&thinsp;T_C$
    $E_W$ $E_W&thinsp;&ge;&thinsp;0$

    Requirements¶

    This section provides the functional requirements, the tasks and behaviours that the software is expected to complete, and the non-functional requirements, the qualities that the software is expected to exhibit.

    Functional Requirements¶

    This section provides the functional requirements, the tasks and behaviours that the software is expected to complete.

    <div id=\"inputValues\"> Input-Values: Input the values from Tab:ReqInputs, which define the tank parameters, material properties, and initial conditions.

    </div>

    <div id=\"findMass\"> Find-Mass: Use the inputs in FR:Input-Values to find the mass needed for IM:eBalanceOnWtr, using DD:waterMass, DD:waterVolume_nopcm, and DD:tankVolume.

    </div>

    <div id=\"checkWithPhysConsts\"> Check-Input-with-Physical_Constraints: Verify that the inputs satisfy the required physical constraints.

    </div>

    <div id=\"outputInputDerivVals\"> Output-Input-Derived-Values: Output the input values and derived values in the following list: the values (from FR:Input-Values), the mass (from FR:Find-Mass), and $τ_W$ (from DD:balanceDecayRate).

    </div>

    <div id=\"calcValues\"> Calculate-Values: Calculate the following values: $T_W$($t$) (from IM:eBalanceOnWtr) and $E_W$($t$) (from IM:heatEInWtr).

    </div>

    <div id=\"outputValues\"> Output-Values: Output $T_W$($t$) (from IM:eBalanceOnWtr) and $E_W$($t$) (from IM:heatEInWtr).

    </div>

    Symbol Description Units
    $A_C$ Heating coil surface area $m^2$
    $A_tol$ Absolute tolerance --
    $C_W$ Specific heat capacity of water $\frac{J}{kg&deg;C}$
    $D$ Diameter of tank $m$
    $E_W$ Change in heat energy in the water $J$
    $h_C$ Convective heat transfer coefficient between coil and water $\frac{W}{m^2&deg;C}$
    $L$ Length of tank $m$
    $R_tol$ Relative tolerance --
    $T_C$ Temperature of the heating coil $&deg;C$
    $T_init$ Initial temperature $&deg;C$
    $t_final$ Final time $s$
    $t_step$ Time step for simulation $s$
    $ρ_W$ Density of water $\frac{kg}{m^3}$

    Non-Functional Requirements¶

    This section provides the non-functional requirements, the qualities that the software is expected to exhibit.

    <div id=\"correct\"> Correctness: The outputs of the code have the properties of a correct solution.

    </div>

    <div id=\"verifiable\"> Verifiability: The code is tested with complete verification and validation plan.

    </div>

    <div id=\"understandable\"> Understandability: The code is modularized with complete module guide and module interface specification.

    </div>

    <div id=\"reusable\"> Reusability: The code is modularized.

    </div>

    <div id=\"maintainable\"> Maintainability: If a likely change is made to the finished software, it will take at most 10$%$ of the original development time, assuming the same development resources are available.

    </div>

    Likely Changes¶

    This section lists the likely changes to be made to the software.

    <div id=\"likeChgTCVOD\"> Temperature-Coil-Variable-Over-Day: A:Temp-Heating-Coil-Constant-over-Time - The temperature of the heating coil will change over the course of the day, depending on the energy received from the sun.

    </div>

    <div id=\"likeChgTCVOL\"> Temperature-Coil-Variable-Over-Length: A:Temp-Heating-Coil-Constant-over-Length - The temperature of the heating coil will actually change along its length as the water within it cools.

    </div>

    <div id=\"likeChgDT\"> Discharging-Tank: A:Charging-Tank-No-Temp-Discharge - The model currently only accounts for charging of the tank. That is, increasing the temperature of the water to match the temperature of the coil. A more complete model would also account for discharging of the tank.

    </div>

    <div id=\"likeChgTLH\"> Tank-Lose-Heat: A:Perfect-Insulation-Tank - Any real tank cannot be perfectly insulated and will lose heat.

    </div>

    Unlikely Changes¶

    This section lists the unlikely changes to be made to the software.

    <div id=\"unlikeChgWFS\"> Water-Fixed-States: A:Water-Always-Liquid - It is unlikely for the change of water from liquid to a solid, or from liquid to gas to be considered.

    </div>

    <div id=\"unlikeChgNIHG\"> No-Internal-Heat-Generation: A:No-Internal-Heat-Generation-By-Water - Is used for the derivations of IM:eBalanceOnWtr.

    </div>

    Traceability Matrices and Graphs¶

    The purpose of the traceability matrices is to provide easy references on what has to be additionally modified if a certain component is changed. Every time a component is changed, the items in the column of that component that are marked with an "X" should be modified as well. Tab:TraceMatAvsA shows the dependencies of the assumptions on each other. Tab:TraceMatAvsAll shows the dependencies of the data definitions, theoretical models, general definitions, instance models, requirements, likely changes, and unlikely changes on the assumptions. Tab:TraceMatRefvsRef shows the dependencies of the data definitions, theoretical models, general definitions, and instance models on each other. Tab:TraceMatAllvsR shows the dependencies of the requirements and goal statements on the data definitions, theoretical models, general definitions, and instance models.

    A:Thermal-Energy-Only A:Heat-Transfer-Coeffs-Constant A:Constant-Water-Temp-Across-Tank A:Density-Water-Constant-over-Volume A:Specific-Heat-Energy-Constant-over-Volume A:Newton-Law-Convective-Cooling-Coil-Water A:Temp-Heating-Coil-Constant-over-Time A:Temp-Heating-Coil-Constant-over-Length A:Charging-Tank-No-Temp-Discharge A:Water-Always-Liquid A:Perfect-Insulation-Tank A:No-Internal-Heat-Generation-By-Water A:Atmospheric-Pressure-Tank A:Volume-Coil-Negligible
    A:Thermal-Energy-Only
    A:Heat-Transfer-Coeffs-Constant
    A:Constant-Water-Temp-Across-Tank
    A:Density-Water-Constant-over-Volume
    A:Specific-Heat-Energy-Constant-over-Volume
    A:Newton-Law-Convective-Cooling-Coil-Water
    A:Temp-Heating-Coil-Constant-over-Time
    A:Temp-Heating-Coil-Constant-over-Length
    A:Charging-Tank-No-Temp-Discharge
    A:Water-Always-Liquid
    A:Perfect-Insulation-Tank
    A:No-Internal-Heat-Generation-By-Water
    A:Atmospheric-Pressure-Tank
    A:Volume-Coil-Negligible

    A:Thermal-Energy-Only A:Heat-Transfer-Coeffs-Constant A:Constant-Water-Temp-Across-Tank A:Density-Water-Constant-over-Volume A:Specific-Heat-Energy-Constant-over-Volume A:Newton-Law-Convective-Cooling-Coil-Water A:Temp-Heating-Coil-Constant-over-Time A:Temp-Heating-Coil-Constant-over-Length A:Charging-Tank-No-Temp-Discharge A:Water-Always-Liquid A:Perfect-Insulation-Tank A:No-Internal-Heat-Generation-By-Water A:Atmospheric-Pressure-Tank A:Volume-Coil-Negligible
    DD:waterMass
    DD:waterVolume_nopcm X
    DD:tankVolume
    DD:balanceDecayRate
    TM:consThermE X
    TM:sensHtE X
    TM:nwtnCooling X
    GD:rocTempSimp X X X
    GD:htFluxWaterFromCoil X X
    IM:eBalanceOnWtr X X X
    IM:heatEInWtr X X
    FR:Input-Values
    FR:Find-Mass
    FR:Check-Input-with-Physical_Constraints
    FR:Output-Input-Derived-Values
    FR:Calculate-Values
    FR:Output-Values
    NFR:Correctness
    NFR:Verifiability
    NFR:Understandability
    NFR:Reusability
    NFR:Maintainability
    LC:Temperature-Coil-Variable-Over-Day X
    LC:Temperature-Coil-Variable-Over-Length X
    LC:Discharging-Tank X
    LC:Tank-Lose-Heat X
    UC:Water-Fixed-States X
    UC:No-Internal-Heat-Generation X

    DD:waterMass DD:waterVolume_nopcm DD:tankVolume DD:balanceDecayRate TM:consThermE TM:sensHtE TM:nwtnCooling GD:rocTempSimp GD:htFluxWaterFromCoil IM:eBalanceOnWtr IM:heatEInWtr
    DD:waterMass
    DD:waterVolume_nopcm X
    DD:tankVolume
    DD:balanceDecayRate
    TM:consThermE
    TM:sensHtE
    TM:nwtnCooling
    GD:rocTempSimp X X
    GD:htFluxWaterFromCoil X
    IM:eBalanceOnWtr X X X
    IM:heatEInWtr X

    DD:waterMass DD:waterVolume_nopcm DD:tankVolume DD:balanceDecayRate TM:consThermE TM:sensHtE TM:nwtnCooling GD:rocTempSimp GD:htFluxWaterFromCoil IM:eBalanceOnWtr IM:heatEInWtr FR:Input-Values FR:Find-Mass FR:Check-Input-with-Physical_Constraints FR:Output-Input-Derived-Values FR:Calculate-Values FR:Output-Values NFR:Correctness NFR:Verifiability NFR:Understandability NFR:Reusability NFR:Maintainability
    GS:Predict-Water-Temperature
    GS:Predict-Water-Energy
    FR:Input-Values
    FR:Find-Mass X X X X X
    FR:Check-Input-with-Physical_Constraints
    FR:Output-Input-Derived-Values X X X
    FR:Calculate-Values X X
    FR:Output-Values X X
    NFR:Correctness
    NFR:Verifiability
    NFR:Understandability
    NFR:Reusability
    NFR:Maintainability

    The purpose of the traceability graphs is also to provide easy references on what has to be additionally modified if a certain component is changed. The arrows in the graphs represent dependencies. The component at the tail of an arrow is depended on by the component at the head of that arrow. Therefore, if a component is changed, the components that it points to should also be changed. Fig:TraceGraphAvsA shows the dependencies of assumptions on each other. Fig:TraceGraphAvsAll shows the dependencies of data definitions, theoretical models, general definitions, instance models, requirements, likely changes, and unlikely changes on the assumptions. Fig:TraceGraphRefvsRef shows the dependencies of data definitions, theoretical models, general definitions, and instance models on each other. Fig:TraceGraphAllvsR shows the dependencies of requirements and goal statements on the data definitions, theoretical models, general definitions, and instance models. Fig:TraceGraphAllvsAll shows the dependencies of dependencies of assumptions, models, definitions, requirements, goals, and changes with each other.

    TraceGraphAvsA
    TraceGraphAvsAll
    TraceGraphRefvsRef
    TraceGraphAllvsR
    TraceGraphAllvsAll

    For convenience, the following graphs can be found at the links below:

    • <a href=\"../../../../traceygraphs/swhsnopcm/avsa.svg\">TraceGraphAvsA</a>
    • <a href=\"../../../../traceygraphs/swhsnopcm/avsall.svg\">TraceGraphAvsAll</a>
    • <a href=\"../../../../traceygraphs/swhsnopcm/refvsref.svg\">TraceGraphRefvsRef</a>
    • <a href=\"../../../../traceygraphs/swhsnopcm/allvsr.svg\">TraceGraphAllvsR</a>
    • <a href=\"../../../../traceygraphs/swhsnopcm/allvsall.svg\">TraceGraphAllvsAll</a>

    Values of Auxiliary Constants¶

    This section contains the standard values that are used for calculations in SWHSNoPCM.

    Symbol Description Value Unit
    $A_C^max$ maximum surface area of coil $100000$ $m^2$
    $AR_max$ maximum aspect ratio $100$ --
    $AR_min$ minimum aspect ratio $0.01$ --
    $C_W^max$ maximum specific heat capacity of water $4210$ $\frac{J}{kg&deg;C}$
    $C_W^min$ minimum specific heat capacity of water $4170$ $\frac{J}{kg&deg;C}$
    $h_C^max$ maximum convective heat transfer coefficient between coil and water $10000$ $\frac{W}{m^2&deg;C}$
    $h_C^min$ minimum convective heat transfer coefficient between coil and water $10$ $\frac{W}{m^2&deg;C}$
    $L_max$ maximum length of tank $50$ $m$
    $L_min$ minimum length of tank $0.1$ $m$
    $t_final^max$ maximum final time $86400$ $s$
    $ρ_W^max$ maximum density of water $1000$ $\frac{kg}{m^3}$
    $ρ_W^min$ minimum density of water $950$ $\frac{kg}{m^3}$

    References¶

    [1]: Incropera, F. P., Dewitt, D. P., Bergman, T. L., and Lavine, A. S. Fundamentals of Heat and Mass Transfer. 6th. ed., Hoboken, New Jersey: John Wiley and Sons, 2007. Print. [2]: Koothoor, Nirmitha. A Document Driven Approach to Certifying Scientific Computing Software. McMaster University, Hamilton, ON, Canada: 2013. Print. [3]: Lightstone, Marilyn. Derivation of tank/pcm model. 2012. From Marilyn Lightstone's Personal Notes [4]: Parnas, David L. and Clements, P. C. "A rational design process: How and why to fake it." IEEE Transactions on Software Engineering, vol. 12, no. 2, Washington, USA: February, 1986. pp. 251–257. Print. [5]: Smith, W. Spencer and Koothoor, Nirmitha. "A Document-Driven Method for Certifying Scientific Computing Software for Use in Nuclear Safety Analysis." Nuclear Engineering and Technology, vol. 48, no. 2, April, 2016. http://www.sciencedirect.com/science/article/pii/S1738573315002582. pp. 404–418. [6]: Smith, W. Spencer and Lai, Lei. "A new requirements template for scientific computing." Proceedings of the First International Workshop on Situational Requirements Engineering Processes - Methods, Techniques and Tools to Support Situation-Specific Requirements Engineering Processes, SREP'05. Edited by PJ Agerfalk, N. Kraiem, and J. Ralyte, Paris, France: 2005. pp. 107–121. In conjunction with 13th IEEE International Requirements Engineering Conference, [7]: Smith, W. Spencer, Lai, Lei, and Khedri, Ridha. "Requirements Analysis for Engineering Computation: A Systematic Approach for Improving Software Reliability." Reliable Computing, Special Issue on Reliable Engineering Computation, vol. 13, no. 1, February, 2007. https://doi.org/10.1007/s11155-006-9020-7. pp. 83–107.