-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathParameterClass.cpp
More file actions
77 lines (60 loc) · 1.3 KB
/
ParameterClass.cpp
File metadata and controls
77 lines (60 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#include <iostream>
using namespace std;
#include <cmath>
#include "ParameterClass.h"
#include "resistanceFunction.h"
#include "GlobalConstants.h"
ParameterClass::ParameterClass(double speed,int cars,int hulls)
{
velocity = speed;
numberCars = cars;
numberHulls = hulls;
// Based on input ranges for Series 64 Resistance Prediction Method
minLength = pow(velocity*0.51444,2)/9.81;
maxLength = pow(velocity*0.51444,2)/1.57;
minDraft = pow(velocity*0.51444,2)/567.45;
maxDraft = pow(velocity*0.51444,2)/29.72;
minBeam = 2*minDraft;
maxBeam = 4*maxDraft;
}
double ParameterClass::getMaxResistance()
{
return (getResistance(maxLength,maxBeam,maxDraft,MAX_BLOCK_COEFF,
velocity,numberHulls));
}
double ParameterClass::getMaxLength()
{
return (maxLength);
}
double ParameterClass::getMinLength()
{
return (minLength);
}
double ParameterClass::getMaxBeam()
{
return (maxBeam);
}
double ParameterClass::getMinBeam()
{
return (minBeam);
}
double ParameterClass::getMaxDraft()
{
return (maxDraft);
}
double ParameterClass::getMinDraft()
{
return (minDraft);
}
double ParameterClass::getVelocity()
{
return (velocity);
}
int ParameterClass::getCars()
{
return (numberCars);
}
int ParameterClass::getHulls()
{
return (numberHulls);
}