COMPASSi/trunk/code/inc/DataManager/Infrastructure.Data/StabCalculation/BasicInf.h

445 lines
13 KiB
C
Raw Normal View History

2025-06-25 15:06:42 +08:00
#pragma once
// ====================================================================================================
// ====================================================================================================
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <stdexcept>
#include <memory>
class BasicInf
{
public:
BasicInf(bool hasIntact = true, bool hasInclining = true, bool hasDamProb = false);
BasicInf();
// #region 公共
std::string ShipName; // 船名
std::string Design; // 设计单位
std::string Signature; //计算签名20170901 added by czb
std::string CalDate; // 计算日期
std::string WorkNo; // 控制号,20161209 by czb
int Origin = 0; // 原点位置,-1;0;1船尾、船舯、船首
int XType = 0; //X坐标类型
double OrgOff = 0.0; // 船壳模型的原点相对于船中的偏移量
/// <summary>
/// 用户坐标系下的艉垂线坐标
/// </summary>
double getXofAP() const;
/// <summary>
/// 用户坐标系下的舯垂线坐标
/// </summary>
double getXofMP() const;
/// <summary>
/// 用户坐标系下的艏垂线坐标
/// </summary>
double getXofFP() const;
/// <summary>
/// 尾垂线为原点的X坐标转换为用户坐标原点由Orgin决定)
/// </summary>
double XofAP2User(double x); //20160906新增
/// <summary>
/// 用户指定原点的X坐标原点由Orgin决定)转换为尾垂线原点的X坐标
/// </summary>
double XofUser2AP(double x); //20160906新增
/// <summary>
/// 船舯为原点的X坐标转换为用户坐标原点由Orgin决定)
/// </summary>
double XofMP2User(double x); //20160906新增
/// <summary>
/// 用户指定原点的X坐标原点由Orgin决定),转换为船舯原点的坐标
/// </summary>
double XofUser2MP(double x); //20160906新增
/// <summary>
/// 肋位表X值
/// </summary>
std::vector<double> LabelX;
bool IsCatamaran = false; // 双体船
double Lpp = 0.0; // 垂线间长 m ,数据集对象尚未添加相应内容 2016.6.24
double L = 0.0; // 船长 m
double B = 0.0; // 船宽 m
double D = 0.0; // 型深 m
double d = 0.0; // 吃水 m
//public double DraftEvalMax; // 最大计算吃水 m
//public double DraftEvalInterval; // 吃水计算间隔 m
std::string DraftList; // 计算吃水列表,从小到大排列,分号、冒号、逗号、空格作为分隔符
std::vector<double> Draft; // 计算吃水列表,从小到大排列
// #endregion
// #region 静水力、完整稳性、破损稳性、许用重心高度
double Density = 0.0; // 舷外水密度 t/m3
//public int HullAffect; // 船壳计入方式 调整到Shell表格 20161024 by czb
//public double HullAffectCoef; // 船壳系数/平均板厚 mm 调整到Shell表格 20161024 by czb
std::vector<double> Trims; // 静水力计算纵倾数据表m0为第一个
double AngleEvalMax = 0.0; // 角度曲线、稳性曲线最大计算横倾角 deg
double AngleEvalInterval = 0.0; // 角度曲线、稳性曲线横倾角计算间隔 deg
// #endregion
// #region 完整稳性、破损稳性、许用重心高度
std::string ShipType; // 船舶类型
//public int ChildType; // 船舶子类
bool IsSelfNav = false; // 自航船
bool IsHighspeed = false; //高速船20190225增加高速船项 added by czb
bool IsBox = false; // 箱型船体
bool IsDoubleDeck = false; // 双甲板船 20201214 by czb 远洋渔船
/// <summary>
/// 航区, A、B、C、T特定航线江海直达、U无限/远洋Unrestricted、G近海Greater Coastal、C沿海Coastal、S遮蔽Sheltered
/// </summary>
std::string NavArea; // 航区
int NavSeg = 0; // 航段
double Vm = 0.0; // 最大航速 m/s
bool IsFullWindScale = false; // 非满实受风面积按满实面积取
//public double FullWindScaleArea; // 非满实面积相对满实面积比值20160801删除此输入参数
//public double FullWindScaleMoment; // 非满实面积静矩相对满实面积静矩比值20160801删除此输入参数
std::string ProfileYList; // 侧投影计算纵剖面列表,分号、冒号、逗号、空格作为分隔符,20160912新增
std::vector<double> ProfileY; // 侧投影计算纵剖面列表20160912新增
double BilgeKeelArea = 0.0; // 舭龙骨总面积 m2
int BilgeType = 0; // 舭部型式
double BilgeC2 = 0.0; // 舭部系数C2
double BilgeC3 = 0.0; // 舭部系数C3
double BilgeC4 = 0.0; // 舭部系数C4
bool HasMudHold = false; // 设有泥舱
double StaticAngleReq = 0.0; // 正常作业许用极限静倾角 deg
bool IsStaticAngleReturnTest = false; // 实船试验确定回航极限静倾角, 20190405 added by czb
double TankCapStep = 0.0; //舱容曲线计算步长 20190601 added by czb
double RollingPeriod = 0.0; // 渔船横摇周期 20201214 by czb 远洋渔船如为Double.NaN则软件自动按法规的近似公式计算
double RollingAngle = 0.0; // 渔船横摇角 20201214 by czb 远洋渔船
//public string CriteriaFactor; // 衡准因素
std::string IntactRemark; // 完整稳性备注20170601 by czb
double Vd = 0.0; // //cqr-20190302 高速船报告输出 代码改1
// #endregion
// #region 概率破损稳性 //20210803 by czb
double Ls_p = 0.0; //分舱长度
double Xa_p = 0.0; //分舱长度尾端点X坐标
double Bs_p = 0.0; //最深水线船宽
// #endregion
// #region 倾斜试验
/// <summary>
/// 倾斜试验水域舷外水密度
/// </summary>
double IncliningDensity = 0.0;
/// <summary>
/// 原始纵倾,deg
/// </summary>
double AT = 0.0;
/// <summary>
/// 倾斜试验初始横倾,deg
/// </summary>
double IncliningAH0 = 0.0;
/// <summary>
/// 倾斜试验移动重量组数
/// </summary>
int IncliningMobileWeightNo = 0;
/// <summary>
/// 倾斜试验横倾测量设备类型
/// 1-挂摆;2-两端读数U型管;3-一端读数U型管;4-倾斜仪
/// </summary>
int IncliningDeviceType = 0;
/// <summary>
/// 倾斜试验横倾测量设备组数
/// 1~5
/// </summary>
int IncliningDeviceNo = 0;
/// <summary>
/// 倾斜试验读数记录次数
/// 0~9
/// </summary>
int IncliningRecordNo = 0;
/// <summary>
/// 倾斜试验倾角算法
/// 1-相对法;2-绝对法
/// </summary>
int IncliningAngleAlgorithm = 0;
/// <summary>
/// 倾斜试验实测初稳性高算法
/// 1-最小二乘法;2-算数平均法
/// </summary>
int IncliningGMAlgorithm = 0;
// #endregion
};
/*
/// <summary>
/// 船舶类型
/// 内法规1-客船;2-干货船;3-液货船;4-推拖船;5-消防船;6-集装箱船;7-起重船;8-挖泥船;9-趸船
/// 特定航线法规101-散货船102-集装箱船, 103-商品汽车滚装船 20180604 added by czb
/// 远洋渔船法规201-普通渔船202-桁拖网渔船203-罩网船204-笼捕船 20201214 added by czb
/// </summary>
enum class ShipType
{
PassengerShip = 1,
DryCargoShip = 2,
Tanker = 3,
Tug = 4,
FireBoat = 5,
ContainerShip = 6,
CraneShip = 7,
Dredger = 8,
Pontoon = 9,
T_BulkcargoShip = 101, //江海直达散货船
T_ContainerShip = 102, //江海直达集装箱船
T_RoRoShip = 103, //江海直达商品汽车滚装船
O_GeneralFisher = 201, //远洋普通渔船
O_TrussTrawler = 202, //远洋桁拖网渔船
O_NetFisher = 203, //远洋罩网船
O_CageFisher = 204 //远洋笼捕船
};
/// <summary>
/// 船舶子类
/// 0-无;101-静倾受限型客船;102-漓江游览船;111-水翼船;112-全垫升气垫船;113-水面效应船;201-散装水泥船;301-浮油回收船
/// 701-旋转吊臂式起重船;702-固定吊臂式起重船;703-打桩船;704-旋转输送臂自卸砂船
/// 801-绞吸式挖泥船;802-耙吸式挖泥船;803-链斗式挖泥船;804-抓斗式挖泥船
/// </summary>
enum class ChildShipType
{
None = 0,
LimitedPassengerShip = 101,
LijiangCruiseShip = 102, //20200428 by czbadded 漓江游览船
HydrofoilShip = 111, //cqr-20190302 高速船,水翼船
AirCushionCraft = 112, //全垫升气垫船
SurfaceEffectCraft = 113, //水面效应船
BulkCementShip = 201,
OilRecoveryShip = 301, //20200428 by czb, added 浮油回收船
RotatableArm_CraneShip = 701,
FixedArm_CraneShip = 702,
PilingShip = 703,
RotatableArm_SelfunloadingShip = 704,
CutterSuction_Dredger = 801, //绞吸式挖泥船
TrailingSuction_Dredger = 802, //耙吸式挖泥船
ChainBucket_Dredger = 803, //链斗式挖泥船
Grab_Dredger = 804 //抓斗式挖泥船
};
*/
/// <summary>
/// 航段
/// 0-无;1-J1;2-J2
/// </summary>
/*
enum NavSeg
{
None = 0,
J1 = 1,
J2 = 2
};
*/
/// <summary>
/// -1-尾垂线;0-船舯;1-船首
/// </summary>
enum XOriginType
{
Stern = -1,
Amidship = 0,
Bow = 1
};
/// <summary>
/// 空船重量类型
/// 1-船体结构;2-木作舾装;3-机电设备;4-固定压载
/// </summary>
enum LwtType
{
Structure = 1,
Outfittin = 2,
Equipment = 3,
FixedBallast = 4
};
/// <summary>
/// 装载重量类型
/// 20161118 by czb0-其他;1-压载水;2-油水
/// </summary>
enum LoadWeightType
// 0-其他;1-干货;2-液货;3-压载水;4-油水
{
Other = 0,
DryCargo = 1,
LiquidCargo = 2,
BallastWater = 3,
Oil_Water = 4
};
///// <summary>
///// 舱室类型
///// 0-其他;1-储物处所;2-机器处所;3-空舱处所;4-起居处所;5-干货处所;6-液体处所
///// </summary>
//public enum CompartmentType
//{
// Other = 0,
// StorageSpace = 1,
// MachinerySpace = 2,
// EmptySpace = 3,
// LivingSpace = 4,
// DryCargoSpace = 5,
// Tank = 6
//}
/// <summary>
/// 舱室类型
/// 0-其他;1-储物处所;2-机器处所;3-空舱处所;4-起居处所;5-散货舱;6-集装箱货舱;7-滚装处所;8-杂货舱;9-其他干货舱;
/// 10-压载舱;11-燃油舱;12-柴油舱;13-滑油舱;14-淡水舱;15-液货舱;16-其他液舱;17-鱼货处所
/// </summary>
/*
enum CompartmentType
{
Other = 0,
StorageSpace = 1,
MachinerySpace = 2,
EmptySpace = 3,
LivingSpace = 4,
BulkSpace = 5,
ContainerSpace = 6,
ROROSpace = 7,
GeneralCargoSpace = 8,
OtheDryCargoSpace = 9,
BallastTank = 10,
FueloilTank = 11,
DieseloilTank = 12,
LubricatingoilTank = 13,
FreshwaterTank = 14,
CargoTank = 15, //液货舱
OtherTank = 16,
FishCargo = 17 //鱼货处所, 20201214 by czb add
};
*/
/// <summary>
/// 受风项类型
/// 0-其他;1-加网栏杆;2-无网栏杆;3-桁架结构;4-横桁和索具;5-圆剖面物体;6-起吊物体;7-货物;8-网具
/// </summary>
/*
enum WindType
{
Other = 0,
NettingRail = 1,
CommonRail = 2,
TrussStructure = 3,
Spar_Rig = 4,
CircularSectionObject = 5,
LiftingObject = 6,
Cargo = 7,
Net = 8 //20201214 by czb, 远洋渔船
};
*/
/// <summary>
/// 校核状态
/// 1-航行/停泊;2-作业;3-避风;4-装卸
/// </summary>
enum CheckState
{
Sailing = 1,
Working = 2,
Safing = 3,
Loading = 4,
Immersion = 5 // 增加浸水工况, cqr-20170725
};
/// <summary>
/// 衡准因素
/// 1-突风;2-集舷;3-散货;0-自定义力矩
/// 增加4-甲板货 cqr-20170725
/// </summary>
enum CriteriaFactor
{
CustomMoment = 0,
GustWind = 1,
FocusSide = 2,
BulkSlip = 3,
DeckCargo = 4
};
/// <summary>
/// 倾斜试验设备类型
/// 1-挂摆2-两端读数U型管3-一端读数U型管4-倾斜仪
/// </summary>
enum IncliningDeviceType
{
HangingPendulum = 1,
U_Tube_2 = 2,
U_Tube_1 = 3,
Clinometer = 4
};
/// <summary>
/// 倾斜试验倾角算法
/// 1-相对法;2-绝对法
/// </summary>
enum IncliningAngleAlgorithm
{
Relative = 1,
Absolute = 2
};
/// <summary>
/// 实测初稳性高算法
/// 1-最小二乘法;2-算数平均法
/// </summary>
enum IncliningGMAlgorithm
{
LeastSquare = 1,
ArithmeticMean = 2
};
/*
/// <summary>
/// 稳性衡准标准
/// </summary>
enum class StabCrRule //20180701 modified by czb 从Interface类搬移到该处
{
CN_IS_2011 = 1, //内法规2011
CN_IS_2015 = 2, //内法规2015
CN_IS_2016 = 3, //内法规2016
CN_IS_2018 = 4, //内法规2018 //20190705 added by czb
CN_IS_2019 = 5, //内法规2019 //20200428 by czbadded
CN_IB_2009 = 101, //内河散化船法规2009
CN_IC_2009 = 201, //内河液化船法规2009
CN_RS_2018 = 1001, //特定航线江海直达2018 //20180701 added by czb
CN_OF_2019 = 2001 //远洋渔船法规2019 //20201214 added by czb
};
*/
/// <summary>
/// 概率破损工况类型
/// </summary>
enum DamcaseProbType
{
Deepest = 0, //最深吃水
PartLoad = 1, // 部分装载吃水
LightLoad = 2 // 轻载吃水
};