프로젝트

일반

사용자정보

개정판 d1e76237

IDd1e76237b40dc5d67a61629508159248c93cd9aa
상위 e69a3fd8
하위 a25e9bcd

김연진이(가) 약 5년 전에 추가함

issue #1043 : 시스템분석/설계 : Template.db 수정

Change-Id: If98c22dc59adeda49392ae20e64277525e54f86b

차이점 보기:

HYTOS/HYTOS/AppDocData.py
348 348
        path = os.path.join(os.getenv('ALLUSERSPROFILE'), App.NAME)
349 349
        return os.path.join(path, 'svg')
350 350

  
351
    def getRoughness(self):
351
    def getRoughness(self, phase_type):
352 352
        res = []
353 353

  
354 354
        conn = sqlite3.connect(self.activeDrawing.path)
......
359 359
                # Get a cursor object
360 360
                cursor = conn.cursor()
361 361

  
362
                sql = "select UID, Material, Meter, Inch, Feet, Milimeter from Roughness"
363
                cursor.execute(sql)
362
                sql = "select UID, Material, Meter, Inch, Feet, Milimeter from Roughness where phase_type = ?"
363
                param = (phase_type, )
364
                cursor.execute(sql, param)
364 365
                rows = cursor.fetchall()
365 366
                for row in rows:
366 367
                    res.append((row[0], row[1], row[2], row[3], row[4], row[5]))
HYTOS/HYTOS/Scripts/CreateTables.sql
46 46
    Components_UID           TEXT    NOT NULL,
47 47
    Stream_No                INTEGER NOT NULL,
48 48
    Phase_Type               TEXT,
49
    Flowrate_Mass            REAL,
50
    Flowrate_Volume          REAL,
51
    Density                  REAL,
52
    Viscosity                REAL,
53
    Temperature              REAL,
54
    Molecular_Weight         REAL,
55
    Specific_Heat_Ratio      REAL,
56
    Compress_Factor          REAL,
57
    Nominal_Pipe_Size        REAL,
58
    Inside_Pipe_Size         REAL,
49
    Flowrate_Mass            TEXT,
50
    Flowrate_Volume          TEXT,
51
    Density                  TEXT,
52
    Viscosity                TEXT,
53
    Temperature              TEXT,
54
    Molecular_Weight         TEXT,
55
    Specific_Heat_Ratio      TEXT,
56
    Compress_Factor          TEXT,
57
    Nominal_Pipe_Size        TEXT,
58
    Inside_Pipe_Size         TEXT,
59 59
    Schedule_No              TEXT,
60
    Straight_Length          REAL,
61
    Equivalent_Length        REAL,
62
    Equivalent_Length_Input  REAL,
63
    Fitting_Length           REAL,
64
    Fitting_K                REAL,
65
    Equivalent_Length_Cal    REAL,
66
    Roughness                REAL,
67
    Limitation_Velocity      REAL,
68
    Limitation_Pressure_Drop REAL,
69
    Velocity                 REAL,
70
    Reynolds                 REAL,
71
    Friction_Factor          REAL,
72
    Pressure_Drop            REAL,
73
    Pressure_Drop_Friction   REAL,
74
    Pressure_Drop_Static     REAL,
75
    Pressure_Pipe_End_Point  REAL,
76
    Power                    REAL,
60
    Straight_Length          TEXT,
61
    Equivalent_Length        TEXT,
62
    Equivalent_Length_Input  TEXT,
63
    Fitting_Length           TEXT,
64
    Fitting_K                TEXT,
65
    Equivalent_Length_Cal    TEXT,
66
    Roughness                TEXT,
67
    Limitation_Velocity      TEXT,
68
    Limitation_Pressure_Drop TEXT,
69
    Velocity                 TEXT,
70
    Reynolds                 TEXT,
71
    Friction_Factor          TEXT,
72
    Pressure_Drop            TEXT,
73
    Pressure_Drop_Friction   TEXT,
74
    Pressure_Drop_Static     TEXT,
75
    Pressure_Pipe_End_Point  TEXT,
76
    Power                    TEXT,
77
    Vapor_Flowrate_Mass		 TEXT,
78
	Vapor_Density   		 TEXT,
79
	Vapor_Viscosity   		 TEXT,
80
	Vapor_Pressure   		 TEXT,
81
	Vapor_Temperature  		 TEXT,
82
	Vapor_Molecular_Weight   TEXT,
83
	Vapor_Compress_Factor    TEXT,
84
	Liquid_Flowrate_Mass     TEXT,
85
	Liquid_Density           TEXT,
86
	Liquid_Viscosity         TEXT,
77 87
    CONSTRAINT PK_HMB PRIMARY KEY (
78 88
        UID
79 89
    ),
......
130 140
);
131 141

  
132 142
CREATE TABLE IF NOT EXISTS Roughness (
133
    UID       TEXT NOT NULL,
134
    Material  TEXT NOT NULL,
135
    Meter     REAL NOT NULL,
136
    Inch      REAL NOT NULL,
137
    Feet      REAL NOT NULL,
138
    Milimeter REAL NOT NULL,
143
    UID         TEXT NOT NULL,
144
    Material    TEXT NOT NULL,
145
    Milimeter   REAL NOT NULL,
146
    Meter       REAL NOT NULL,
147
    Inch        REAL NOT NULL,
148
    Feet        REAL NOT NULL,
149
    Phase_Type  TEXT NOT NULL,
139 150
    CONSTRAINT PK_Roughness PRIMARY KEY (
140 151
        UID
141 152
    ),
142 153
    CONSTRAINT UQ_Roughness UNIQUE (
143
        Material
154
        Material,
155
        Phase_Type
144 156
    )
145 157
);
146 158

  
HYTOS/HYTOS/Scripts/InitialData.sql
65 65

  
66 66

  
67 67
-- Roughness
68
INSERT INTO Roughness (UID, Material, Meter, Inch, Feet, Milimeter) VALUES ('cb11e760-bf73-438c-8a7f-e5ef81f863f2', 'Carbon Steel', 0.0001524, 0.006, 0.0005, 0.1524);
69
INSERT INTO Roughness (UID, Material, Meter, Inch, Feet, Milimeter) VALUES ('56e8405c-4dce-4ccf-97e3-f26cb3345916', 'Stainless Steel', 0.000046, 0.0018, 0.00015, 0.046);
70
INSERT INTO Roughness (UID, Material, Meter, Inch, Feet, Milimeter) VALUES ('6d2556e9-477b-4765-92ec-bd45fdb8e825', 'Cast Iron - Asphalt Dipped', 0.00012192, 0.0048, 0.0004, 0.12192);
71
INSERT INTO Roughness (UID, Material, Meter, Inch, Feet, Milimeter) VALUES ('c35c4149-93ec-4bb0-84bf-c9b7600ea9ac', 'Cast Iron - Uncoated', 0.00025908, 0.0102, 0.00085, 0.25908);
72
INSERT INTO Roughness (UID, Material, Meter, Inch, Feet, Milimeter) VALUES ('03e5098a-d8f7-4f22-b800-5f19673af2ee', 'Wood Stave', 0.00009144, 0.0036, 0.0003, 0.09144);
73
INSERT INTO Roughness (UID, Material, Meter, Inch, Feet, Milimeter) VALUES ('9c258941-3af0-4266-aaab-2ad49d576846', 'Concrete', 0.003048, 0.12, 0.001, 3.048);
74
INSERT INTO Roughness (UID, Material, Meter, Inch, Feet, Milimeter) VALUES ('c09f1f7e-f61c-44f5-9b69-3c79f911011c', 'Riveted Steel', 0.009144, 0.36, 0.003, 9.144);
68
INSERT INTO Roughness (UID, Material, Milimeter, Meter, Inch, Feet, Phase_Type) VALUES ('cb11e760-bf73-438c-8a7f-e5ef81f863f2', 'Carbon Steel', 0.1524, 0.0001524, 0.006, 0.0005, 'Normal');
69
INSERT INTO Roughness (UID, Material, Milimeter, Meter, Inch, Feet, Phase_Type) VALUES ('56e8405c-4dce-4ccf-97e3-f26cb3345916', 'Stainless Steel', 0.046, 0.000046, 0.0018, 0.00015, 'Normal');
70
INSERT INTO Roughness (UID, Material, Milimeter, Meter, Inch, Feet, Phase_Type) VALUES ('6d2556e9-477b-4765-92ec-bd45fdb8e825', 'Cast Iron - Asphalt Dipped', 0.12192, 0.00012192, 0.0048, 0.0004, 'Normal');
71
INSERT INTO Roughness (UID, Material, Milimeter, Meter, Inch, Feet, Phase_Type) VALUES ('c35c4149-93ec-4bb0-84bf-c9b7600ea9ac', 'Cast Iron - Uncoated', 0.25908, 0.00025908, 0.0102, 0.00085, 'Normal');
72
INSERT INTO Roughness (UID, Material, Milimeter, Meter, Inch, Feet, Phase_Type) VALUES ('03e5098a-d8f7-4f22-b800-5f19673af2ee', 'Wood Stave', 0.09144, 0.00009144, 0.0036, 0.0003, 'Normal');
73
INSERT INTO Roughness (UID, Material, Milimeter, Meter, Inch, Feet, Phase_Type) VALUES ('9c258941-3af0-4266-aaab-2ad49d576846', 'Concrete', 3.048, 0.003048, 0.12, 0.001, 'Normal');
74
INSERT INTO Roughness (UID, Material, Milimeter, Meter, Inch, Feet, Phase_Type) VALUES ('c09f1f7e-f61c-44f5-9b69-3c79f911011c', 'Riveted Steel', 9.144, 0.009144, 0.36, 0.003, 'Normal');
75
INSERT INTO Roughness (UID, Material, Milimeter, Meter, Inch, Feet, Phase_Type) VALUES ('dcdc07e3-f409-4423-befc-c07837c20acc', 'Carbon Steel', 0.1524, 0.0001524, 0.006, 0.0005, 'Mixed');
76
INSERT INTO Roughness (UID, Material, Milimeter, Meter, Inch, Feet, Phase_Type) VALUES ('7db95d99-b28f-4138-a025-18923648f3ae', 'Stainless Steel', 0.04572, 0.00004572, 0.0018, 0.00015, 'Mixed');
77
INSERT INTO Roughness (UID, Material, Milimeter, Meter, Inch, Feet, Phase_Type) VALUES ('69d355be-6458-415b-978a-790925110add', 'Cast Iron - Asphalt Dipped', 0.12192, 0.00012192, 0.0048, 0.0004, 'Mixed');
78
INSERT INTO Roughness (UID, Material, Milimeter, Meter, Inch, Feet, Phase_Type) VALUES ('2250d4fb-0064-4b47-8200-544a80ab5d8f', 'Cast Iron - Uncoated', 0.25908, 0.00025908, 0.0102, 0.00085, 'Mixed');
79
INSERT INTO Roughness (UID, Material, Milimeter, Meter, Inch, Feet, Phase_Type) VALUES ('b69a17e7-a17d-4b45-934a-09d6cabb8baf', 'Wood Stave', 0.09144, 0.00009144, 0.0036, 0.0003, 'Mixed');
80
INSERT INTO Roughness (UID, Material, Milimeter, Meter, Inch, Feet, Phase_Type) VALUES ('5bbde06b-97c5-4e17-9e8e-73fa6ca3fbdf', 'Concrete', 3.048, 0.003048, 0.12, 0.01, 'Mixed');
81
INSERT INTO Roughness (UID, Material, Milimeter, Meter, Inch, Feet, Phase_Type) VALUES ('f370af25-0c8f-4509-a197-8ecdbb2bfbca', 'Riveted Steel', 9.144, 0.009144, 0.36, 0.03, 'Mixed');
75 82

  
76 83
-- Units
77 84
INSERT INTO Units (UID, "Key", Value) VALUES ('44eb178d-ed62-4c8e-84d6-e547e4573ea3', 'Density', 'kg/m3');

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)