Processing math: 100%

Software Requirements Specification for Double Pendulum

Dong Chen

Table of Contents

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

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.

SymbolDescriptionSI Name
kgmasskilogram
mlengthmetre
Nforcenewton
radangleradian
stimesecond

Table of Units

Table of Symbols

The symbols used in this document are summarized in the Table of Symbols along with their units. Throughout the document, symbols in bold will represent vectors, and scalars otherwise. The symbols are listed in alphabetical order. For vector quantities, the units shown are for each component of the vector.

SymbolDescriptionUnits
ax1Horizontal acceleration of the first objectms2
ax2Horizontal acceleration of the second objectms2
ay1Vertical acceleration of the first objectms2
ay2Vertical acceleration of the second objectms2
a(t)Accelerationms2
FForceN
gMagnitude of gravitational accelerationms2
gGravitational accelerationms2
ˆiUnit vector
L1Length of the first rodm
L2Length of the second rodm
mMasskg
m1Mass of the first objectkg
m2Mass of the second objectkg
px1Horizontal position of the first objectm
px2Horizontal position of the second objectm
py1Vertical position of the first objectm
py2Vertical position of the second objectm
p(t)Positionm
TTensionN
T1Tension of the first objectN
T2Tension of the second objectN
tTimes
thetaDependent variablesrad
vx1Horizontal velocity of the first objectms
vx2Horizontal velocity of the second objectms
vy1Vertical velocity of the first objectms
vy2Vertical velocity of the second objectms
v(t)Velocityms
w1Angular velocity of the first objectrads
w2Angular velocity of the second objectrads
α1Angular acceleration of the first objectrads2
α2Angular acceleration of the second objectrads2
θ1Angle of the first rodrad
θ2Angle of the second rodrad
πRatio of circumference to diameter for any circle

Table of Symbols

Abbreviations and Acronyms

AbbreviationFull Form
2DTwo-Dimensional
AAssumption
DDData Definition
DblPendDouble Pendulum
GDGeneral Definition
GSGoal Statement
IMInstance Model
PSPhysical System Description
RRequirement
RefByReferenced by
RefnameReference Name
SRSSoftware Requirements Specification
TMTheoretical Model
Uncert.Typical Uncertainty

Abbreviations and Acronyms

Introduction

A pendulum consists of mass attached to the end of a rod and its moving curve is highly sensitive to initial conditions. Therefore, it is useful to have a program to simulate the motion of the pendulum to exhibit its chaotic characteristics. The document describes the program called Double Pendulum , which is based on the original, manually created version of Double Pendulum.

The following section provides an overview of the Software Requirements Specification (SRS) for Double Pendulum. 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 DblPend. 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 DblPend. 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 the analysis of a two-dimensional (2D) pendulum motion problem with various initial conditions.

Characteristics of Intended Reader

Reviewers of this documentation should have an understanding of undergraduate level 2 physics, undergraduate level 1 calculus, and ordinary differential equations. The users of DblPend 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.

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:sysCtxDiag shows the system context. A circle represents an entity external to the software, the user in this case. A rectangle represents the software system itself (DblPend). Arrows are used to show the data flow between the system and its environment.

System Context

Figure: System Context

The interaction between the product and the user is through an application programming interface. The responsibilities of the user and the system are as follows:

  • User Responsibilities
    • Provide initial conditions of the physical state of the motion and the input data related to the Double Pendulum, ensuring no errors in the data entry.
    • Ensure that consistent units are used for input variables.
    • Ensure required software assumptions are appropriate for any particular problem input to the software.
  • DblPend Responsibilities
    • Detect data type mismatch, such as a string of characters input instead of a floating point number.
    • Determine if the inputs satisfy the required physical and software constraints.
    • Calculate the required outputs.
    • Generate the required graphs.

User Characteristics

The end user of DblPend should have an understanding of high school physics, high school calculus and ordinary differential equations.

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 predict the motion of a double pendulum.

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.

  • Gravity: The force that attracts one physical body with mass to another.
  • Cartesian coordinate system: A coordinate system that specifies each point uniquely in a plane by a set of numerical coordinates, which are the signed distances to the point from two fixed perpendicular oriented lines, measured in the same unit of length (from cartesianWiki).

Physical System Description

The physical system of DblPend, as shown in Fig:dblpend, includes the following elements:

PS1: The first rod (with length of the first rod L1).

PS2: The second rod (with length of the second rod L2).

PS3: The first object.

PS4: The second object.

The physical system

Figure: The physical system

Goal Statements

Given the masses, length of the rods, initial angle of the masses and the gravitational constant, the goal statement is:

motionMass: Calculate the motion of the masses.

Solution Characteristics Specification

The instance models that govern DblPend 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.

twoDMotion: The pendulum motion is two-dimensional (2D).

cartSys: A Cartesian coordinate system is used.

cartSysR: The Cartesian coordinate system is right-handed where positive x-axis and y-axis point right up.

yAxisDir: The direction of the y-axis is directed opposite to gravity.

startOrigin: The first rod is attached to the origin.

firstPend: The first rod has two sides. One side attaches to the origin. Another side attaches to the first object.

secondPend: The second rod has two sides. One side attaches to the first object. Another side attaches to the second object.

Theoretical Models

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

RefnameTM:acceleration
LabelAcceleration
Equationa(t)=dv(t)dt
Description
  • a(t) is the acceleration (ms2)
  • t is the time (s)
  • v(t) is the velocity (ms)
SourceaccelerationWiki
RefBy
RefnameTM:velocity
LabelVelocity
Equationv(t)=dp(t)dt
Description
  • v(t) is the velocity (ms)
  • t is the time (s)
  • p(t) is the position (m)
SourcevelocityWiki
RefBy
RefnameTM:NewtonSecLawMot
LabelNewton’s second law of motion
EquationF=ma(t)
Description
  • F is the force (N)
  • m is the mass (kg)
  • a(t) is the acceleration (ms2)
Notes
  • The net force F on a body is proportional to the acceleration a(t) of the body, where m denotes the mass of the body as the constant of proportionality.
Source
RefBy

General Definitions

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

RefnameGD:velocityX1
LabelThe x-component of velocity of the first object
Unitsms
Equationvx1=w1L1cos(θ1)
Description
  • vx1 is the horizontal velocity of the first object (ms)
  • w1 is the angular velocity of the first object (rads)
  • L1 is the length of the first rod (m)
  • θ1 is the angle of the first rod (rad)
Source
RefBy

Detailed derivation of the x-component of velocity:

At a given point in time, velocity is defined in DD:positionGDD

v(t)=dp(t)dt

We also know the horizontal position that is defined in DD:positionXDD1

px1=L1sin(θ1)

Applying this,

vx1=dL1sin(θ1)dt

L1 is constant with respect to time, so

vx1=L1dsin(θ1)dt

Therefore, using the chain rule,

vx1=w1L1cos(θ1)

RefnameGD:velocityY1
LabelThe y-component of velocity of the first object
Unitsms
Equationvy1=w1L1sin(θ1)
Description
  • vy1 is the vertical velocity of the first object (ms)
  • w1 is the angular velocity of the first object (rads)
  • L1 is the length of the first rod (m)
  • θ1 is the angle of the first rod (rad)
Source
RefBy

Detailed derivation of the y-component of velocity:

At a given point in time, velocity is defined in DD:positionGDD

v(t)=dp(t)dt

We also know the vertical position that is defined in DD:positionYDD1

py1=L1cos(θ1)

Applying this,

vy1=(dL1cos(θ1)dt)

L1 is constant with respect to time, so

vy1=L1dcos(θ1)dt

Therefore, using the chain rule,

vy1=w1L1sin(θ1)

RefnameGD:velocityX2
LabelThe x-component of velocity of the second object
Unitsms
Equationvx2=vx1+w2L2cos(θ2)
Description
  • vx2 is the horizontal velocity of the second object (ms)
  • vx1 is the horizontal velocity of the first object (ms)
  • w2 is the angular velocity of the second object (rads)
  • L2 is the length of the second rod (m)
  • θ2 is the angle of the second rod (rad)
Source
RefBy

Detailed derivation of the x-component of velocity:

At a given point in time, velocity is defined in DD:positionGDD

v(t)=dp(t)dt

We also know the horizontal position that is defined in DD:positionXDD2

px2=px1+L2sin(θ2)

Applying this,

vx2=dpx1+L2sin(θ2)dt

L1 is constant with respect to time, so

vx2=vx1+w2L2cos(θ2)

RefnameGD:velocityY2
LabelThe y-component of velocity of the second object
Unitsms
Equationvy2=vy1+w2L2sin(θ2)
Description
  • vy2 is the vertical velocity of the second object (ms)
  • vy1 is the vertical velocity of the first object (ms)
  • w2 is the angular velocity of the second object (rads)
  • L2 is the length of the second rod (m)
  • θ2 is the angle of the second rod (rad)
Source
RefBy

Detailed derivation of the y-component of velocity:

At a given point in time, velocity is defined in DD:positionGDD

v(t)=dp(t)dt

We also know the vertical position that is defined in DD:positionYDD2

py2=py1L2cos(θ2)

Applying this,

vy2=(dpy1L2cos(θ2)dt)

Therefore, using the chain rule,

vy2=vy1+w2L2sin(θ2)

RefnameGD:accelerationX1
LabelThe x-component of acceleration of the first object
Unitsms2
Equationax1=w12L1sin(θ1)+α1L1cos(θ1)
Description
  • ax1 is the horizontal acceleration of the first object (ms2)
  • w1 is the angular velocity of the first object (rads)
  • L1 is the length of the first rod (m)
  • θ1 is the angle of the first rod (rad)
  • α1 is the angular acceleration of the first object (rads2)
Source
RefByIM:calOfAngle2

Detailed derivation of the x-component of acceleration:

Our acceleration is:

a(t)=dv(t)dt

Earlier, we found the horizontal velocity to be

vx1=w1L1cos(θ1)

Applying this to our equation for acceleration

ax1=dw1L1cos(θ1)dt

By the product and chain rules, we find

ax1=dw1dtL1cos(θ1)w1L1sin(θ1)dθ1dt

Simplifying,

ax1=w12L1sin(θ1)+α1L1cos(θ1)

RefnameGD:accelerationY1
LabelThe y-component of acceleration of the first object
Unitsms2
Equationay1=w12L1cos(θ1)+α1L1sin(θ1)
Description
  • ay1 is the vertical acceleration of the first object (ms2)
  • w1 is the angular velocity of the first object (rads)
  • L1 is the length of the first rod (m)
  • θ1 is the angle of the first rod (rad)
  • α1 is the angular acceleration of the first object (rads2)
Source
RefByIM:calOfAngle2

Detailed derivation of the y-component of acceleration:

Our acceleration is:

a(t)=dv(t)dt

Earlier, we found the vertical velocity to be

vy1=w1L1sin(θ1)

Applying this to our equation for acceleration

ay1=dw1L1sin(θ1)dt

By the product and chain rules, we find

ay1=dw1dtL1sin(θ1)+w1L1cos(θ1)dθ1dt

Simplifying,

ay1=w12L1cos(θ1)+α1L1sin(θ1)

RefnameGD:accelerationX2
LabelThe x-component of acceleration of the second object
Unitsms2
Equationax2=ax1w22L2sin(θ2)+α2L2cos(θ2)
Description
  • ax2 is the horizontal acceleration of the second object (ms2)
  • ax1 is the horizontal acceleration of the first object (ms2)
  • w2 is the angular velocity of the second object (rads)
  • L2 is the length of the second rod (m)
  • θ2 is the angle of the second rod (rad)
  • α2 is the angular acceleration of the second object (rads2)
Source
RefByIM:calOfAngle2

Detailed derivation of the x-component of acceleration:

Our acceleration is:

a(t)=dv(t)dt

Earlier, we found the horizontal velocity to be

vx2=vx1+w2L2cos(θ2)

Applying this to our equation for acceleration

ax2=dvx1+w2L2cos(θ2)dt

By the product and chain rules, we find

ax2=ax1w22L2sin(θ2)+α2L2cos(θ2)

RefnameGD:accelerationY2
LabelThe y-component of acceleration of the second object
Unitsms2
Equationay2=ay1+w22L2cos(θ2)+α2L2sin(θ2)
Description
  • ay2 is the vertical acceleration of the second object (ms2)
  • ay1 is the vertical acceleration of the first object (ms2)
  • w2 is the angular velocity of the second object (rads)
  • L2 is the length of the second rod (m)
  • θ2 is the angle of the second rod (rad)
  • α2 is the angular acceleration of the second object (rads2)
Source
RefByIM:calOfAngle2

Detailed derivation of the y-component of acceleration:

Our acceleration is:

a(t)=dv(t)dt

Earlier, we found the horizontal velocity to be

vy2=vy1+w2L2sin(θ2)

Applying this to our equation for acceleration

ay2=dvy1+w2L2sin(θ2)dt

By the product and chain rules, we find

ay2=ay1+w22L2cos(θ2)+α2L2sin(θ2)

RefnameGD:xForce1
LabelHorizontal force on the first object
UnitsN
EquationF=ma(t)=T1sin(θ1)+T2sin(θ2)
Description
  • F is the force (N)
  • m is the mass (kg)
  • a(t) is the acceleration (ms2)
  • T1 is the tension of the first object (N)
  • θ1 is the angle of the first rod (rad)
  • T2 is the tension of the second object (N)
  • θ2 is the angle of the second rod (rad)
Source
RefByIM:calOfAngle2

Detailed derivation of force on the first object:

F=ma(t)=T1sin(θ1)+T2sin(θ2)

RefnameGD:yForce1
LabelVertical force on the first object
UnitsN
EquationF=ma(t)=T1cos(θ1)T2cos(θ2)m1g
Description
  • F is the force (N)
  • m is the mass (kg)
  • a(t) is the acceleration (ms2)
  • T1 is the tension of the first object (N)
  • θ1 is the angle of the first rod (rad)
  • T2 is the tension of the second object (N)
  • θ2 is the angle of the second rod (rad)
  • m1 is the mass of the first object (kg)
  • g is the gravitational acceleration (ms2)
Source
RefByIM:calOfAngle2

Detailed derivation of force on the first object:

F=ma(t)=T1cos(θ1)T2cos(θ2)m1g

RefnameGD:xForce2
LabelHorizontal force on the second object
UnitsN
EquationF=ma(t)=T2sin(θ2)
Description
  • F is the force (N)
  • m is the mass (kg)
  • a(t) is the acceleration (ms2)
  • T2 is the tension of the second object (N)
  • θ2 is the angle of the second rod (rad)
Source
RefByIM:calOfAngle2

Detailed derivation of force on the second object:

F=ma(t)=T2sin(θ2)

RefnameGD:yForce2
LabelVertical force on the second object
UnitsN
EquationF=ma(t)=T2cos(θ2)m2g
Description
  • F is the force (N)
  • m is the mass (kg)
  • a(t) is the acceleration (ms2)
  • T2 is the tension of the second object (N)
  • θ2 is the angle of the second rod (rad)
  • m2 is the mass of the second object (kg)
  • g is the gravitational acceleration (ms2)
Source
RefByIM:calOfAngle2

Detailed derivation of force on the second object:

F=ma(t)=T2cos(θ2)m2g

Data Definitions

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

RefnameDD:positionGDD
LabelVelocity
Symbolv(t)
Unitsms
Equationv(t)=dp(t)dt
Description
  • v(t) is the velocity (ms)
  • t is the time (s)
  • p(t) is the position (m)
Source
RefByGD:velocityY2, GD:velocityY1, GD:velocityX2, and GD:velocityX1
RefnameDD:positionXDD1
LabelHorizontal position of the first object
Symbolpx1
Unitsm
Equationpx1=L1sin(θ1)
Description
  • px1 is the horizontal position of the first object (m)
  • L1 is the length of the first rod (m)
  • θ1 is the angle of the first rod (rad)
Notes
  • px1 is the horizontal position
  • px1 is shown in Fig:dblpend.
Source
RefByGD:velocityX1
RefnameDD:positionYDD1
LabelVertical position of the first object
Symbolpy1
Unitsm
Equationpy1=L1cos(θ1)
Description
  • py1 is the vertical position of the first object (m)
  • L1 is the length of the first rod (m)
  • θ1 is the angle of the first rod (rad)
Notes
  • py1 is the vertical position
  • py1 is shown in Fig:dblpend.
Source
RefByGD:velocityY1
RefnameDD:positionXDD2
LabelHorizontal position of the second object
Symbolpx2
Unitsm
Equationpx2=px1+L2sin(θ2)
Description
  • px2 is the horizontal position of the second object (m)
  • px1 is the horizontal position of the first object (m)
  • L2 is the length of the second rod (m)
  • θ2 is the angle of the second rod (rad)
Notes
  • px2 is the horizontal position
  • px2 is shown in Fig:dblpend.
Source
RefByGD:velocityX2
RefnameDD:positionYDD2
LabelVertical position of the second object
Symbolpy2
Unitsm
Equationpy2=py1L2cos(θ2)
Description
  • py2 is the vertical position of the second object (m)
  • py1 is the vertical position of the first object (m)
  • L2 is the length of the second rod (m)
  • θ2 is the angle of the second rod (rad)
Notes
  • py2 is the vertical position
  • py2 is shown in Fig:dblpend.
Source
RefByGD:velocityY2
RefnameDD:accelerationGDD
LabelAcceleration
Symbola(t)
Unitsms2
Equationa(t)=dv(t)dt
Description
  • a(t) is the acceleration (ms2)
  • t is the time (s)
  • v(t) is the velocity (ms)
Source
RefBy
RefnameDD:forceGDD
LabelForce
SymbolF
UnitsN
EquationF=ma(t)
Description
  • F is the force (N)
  • m is the mass (kg)
  • a(t) is the acceleration (ms2)
Source
RefBy

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.

RefnameIM:calOfAngle1
LabelCalculation of angle of first rod
InputL1, L2, m1, m2, θ1, θ2
Outputθ1
Input ConstraintsL1>0L2>0m1>0m2>0
Output Constraints
Equationα1(θ1,θ2,w1,w2)=g(2m1+m2)sin(θ1)m2gsin(θ12θ2)2sin(θ1θ2)m2(w22L2+w12L1cos(θ1θ2))L1(2m1+m2m2cos(2θ12θ2))
Description
  • α1 is the angular acceleration of the first object (rads2)
  • θ1 is the angle of the first rod (rad)
  • θ2 is the angle of the second rod (rad)
  • w1 is the angular velocity of the first object (rads)
  • w2 is the angular velocity of the second object (rads)
  • g is the magnitude of gravitational acceleration (ms2)
  • m1 is the mass of the first object (kg)
  • m2 is the mass of the second object (kg)
  • L2 is the length of the second rod (m)
  • L1 is the length of the first rod (m)
Notes
  • θ1 is calculated by solving the ODE here together with the initial conditions and IM:calOfAngle2.
Source
RefByIM:calOfAngle2, FR:Output-Values, and FR:Calculate-Angle-Of-Rod
RefnameIM:calOfAngle2
LabelCalculation of angle of second rod
InputL1, L2, m1, m2, θ1, θ2
Outputθ2
Input ConstraintsL1>0L2>0m1>0m2>0
Output Constraints
Equationα2(θ1,θ2,w1,w2)=2sin(θ1θ2)(w12L1(m1+m2)+g(m1+m2)cos(θ1)+w22L2m2cos(θ1θ2))L2(2m1+m2m2cos(2θ12θ2))
Description
  • α2 is the angular acceleration of the second object (rads2)
  • θ1 is the angle of the first rod (rad)
  • θ2 is the angle of the second rod (rad)
  • w1 is the angular velocity of the first object (rads)
  • w2 is the angular velocity of the second object (rads)
  • L1 is the length of the first rod (m)
  • m1 is the mass of the first object (kg)
  • m2 is the mass of the second object (kg)
  • g is the magnitude of gravitational acceleration (ms2)
  • L2 is the length of the second rod (m)
Notes
  • θ2 is calculated by solving the ODE here together with the initial conditions and IM:calOfAngle1.
Source
RefByIM:calOfAngle2, IM:calOfAngle1, FR:Output-Values, and FR:Calculate-Angle-Of-Rod

Detailed derivation of angle of the second rod:

By solving equations GD:xForce2 and GD:yForce2 for T2sin(θ2) and T2cos(θ2) and then substituting into equation GD:xForce1 and GD:yForce1 , we can get equations 1 and 2:

m1ax1=T1sin(θ1)m2ax2

m1ay1=T1cos(θ1)m2ay2m2gm1g

Multiply the equation 1 by cos(θ1) and the equation 2 by sin(θ1) and rearrange to get:

T1sin(θ1)cos(θ1)=cos(θ1)(m1ax1+m2ax2)

T1sin(θ1)cos(θ1)=sin(θ1)(m1ay1+m2ay2+m2g+m1g)

This leads to the equation 3

sin(θ1)(m1ay1+m2ay2+m2g+m1g)=cos(θ1)(m1ax1+m2ax2)

Next, multiply equation GD:xForce2 by cos(θ2) and equation GD:yForce2 by sin(θ2) and rearrange to get:

T2sin(θ2)cos(θ2)=cos(θ2)m2ax2

T1sin(θ2)cos(θ2)=sin(θ2)(m2ay2+m2g)

which leads to equation 4

sin(θ2)(m2ay2+m2g)=cos(θ2)m2ax2

By giving equations GD:accelerationX1 and GD:accelerationX2 and GD:accelerationY1 and GD:accelerationY2 plus additional two equations, 3 and 4, we can get IM:calOfAngle1 and IM:calOfAngle2 via a computer algebra program:

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.

VarPhysical ConstraintsTypical ValueUncert.
L1L1>01.0 m10%
L2L2>01.0 m10%
m1m1>00.5 kg10%
m2m2>00.5 kg10%

Input Data Constraints

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.

VarPhysical Constraints
θ1θ1>0
θ2θ2>0

Output Data Constraints

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.

Input-Values: Input the values from Tab:ReqInputs.

Verify-Input-Values: Check the entered input values to ensure that they do not exceed the data constraints. If any of the input values are out of bounds, an error message is displayed and the calculations stop.

Calculate-Angle-Of-Rod: Calculate the following values: θ1 and θ2 (from IM:calOfAngle1 and IM:calOfAngle2).

Output-Values: Output θ1 and θ2 (from IM:calOfAngle1 and IM:calOfAngle2).

SymbolDescriptionUnits
L1Length of the first rodm
L2Length of the second rodm
m1Mass of the first objectkg
m2Mass of the second objectkg

Required Inputs

Non-Functional Requirements

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

Correctness: The outputs of the code have the properties of a correct solution.

Portability: The code shall be portable to multiple environments, particularly Windows, Mac OSX, and Linux.

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.

Traceability Matrix Showing the Connections Between Assumptions and Other Assumptions

Traceability Matrix Showing the Connections Between Assumptions and Other Items

Traceability Matrix Showing the Connections Between Items and Other Sections

Traceability Matrix Showing the Connections Between Requirements, Goal Statements and Other Items

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

Figure: TraceGraphAvsA

TraceGraphAvsAll

Figure: TraceGraphAvsAll

TraceGraphRefvsRef

Figure: TraceGraphRefvsRef

TraceGraphAllvsR

Figure: TraceGraphAllvsR

TraceGraphAllvsAll

Figure: TraceGraphAllvsAll

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

Values of Auxiliary Constants

There are no auxiliary constants.

References

[1]: Hibbeler, R. C. Engineering Mechanics: Dynamics. Pearson Prentice Hall, 2004. Print.

[2]: Koothoor, Nirmitha. A Document Driven Approach to Certifying Scientific Computing Software. McMaster University, Hamilton, ON, Canada: 2013. Print.

[3]: 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.

[4]: 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.

[5]: 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,

[6]: 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.

[7]: Wikipedia Contributors. Acceleration. June, 2019. https://en.wikipedia.org/wiki/Acceleration.

[8]: Wikipedia Contributors. Cartesian coordinate system. June, 2019. https://en.wikipedia.org/wiki/Cartesian_coordinate_system.

[9]: Wikipedia Contributors. Velocity. June, 2019. https://en.wikipedia.org/wiki/Velocity.