FEM: code formating, flake8

This commit is contained in:
Bernd Hahnebach 2017-02-28 11:50:58 +01:00 committed by wmayer
parent cc2c51b81d
commit 07d1dccebb
5 changed files with 6 additions and 7 deletions

View File

@ -1346,7 +1346,7 @@ def liquid_section_def(obj, section_type):
bend_radius_diameter = str(obj.BendRadiusDiameter)
bend_angle = str(obj.BendAngle)
bend_loss_coefficient = str(obj.BendLossCoefficient)
section_geo = bend_pipe_area + ',' + bend_radius_diameter + ',' + bend_angle +',' + bend_loss_coefficient + '\n'
section_geo = bend_pipe_area + ',' + bend_radius_diameter + ',' + bend_angle + ',' + bend_loss_coefficient + '\n'
return section_geo
elif section_type == 'PIPE GATE VALVE':
gatevalve_pipe_area = str(obj.GateValvePipeArea.getValueAs('mm^2').Value)

View File

@ -1453,7 +1453,6 @@ def use_correct_fluidinout_ele_def(FluidInletoutlet_ele, fileName):
line = f.readline()
cnt = cnt + 1
# obtain element line numbers for inlet and outlet
while (len(line) > 1):
ind = line.find(',')

View File

@ -214,8 +214,8 @@ class _TaskPanelFemFluidSection:
self.form.if_colebrooke_grain_diameter.setText(self.ColebrookeGrainDiameter.UserString)
self.form.sb_colebrooke_form_factor.setValue(self.ColebrookeFormFactor)
for i in range(len(self.PumpFlowRate)):
self.form.tw_pump_characteristics.setItem(i,0,QtGui.QTableWidgetItem(str(self.PumpFlowRate[i])))
self.form.tw_pump_characteristics.setItem(i,1,QtGui.QTableWidgetItem(str(self.PumpHeadLoss[i])))
self.form.tw_pump_characteristics.setItem(i, 0, QtGui.QTableWidgetItem(str(self.PumpFlowRate[i])))
self.form.tw_pump_characteristics.setItem(i, 1, QtGui.QTableWidgetItem(str(self.PumpHeadLoss[i])))
self.rebuild_list_References()
def sectiontype_changed(self, index):

View File

@ -86,7 +86,7 @@ class _FemFluidSection:
obj.ChannelSectionType = 'NONE'
obj.ManningArea = 10.0
obj.ManningRadius = 1.0
obj.ManningCoefficient = 0.0015 # has units of s/mm^(1/3)
obj.ManningCoefficient = 0.0015 # has units of s/mm^(1/3)
obj.EnlargeArea1 = 10.0
obj.EnlargeArea2 = 20.0
obj.ContractArea1 = 20.0

View File

@ -595,12 +595,12 @@ def readResult(frd_input):
if mode_massflow_found and (line[1:3] == "-1"):
elem = int(line[4:13])
massflow = float(line[13:25])
mode_massflow[elem] = (massflow * 1000) # convert units to kg/s from t/s
mode_massflow[elem] = (massflow * 1000) # convert units to kg/s from t/s
if inout_nodes_exist:
for i in range(len(inout_nodes)):
if elem == int(inout_nodes[i][1]):
node = int(inout_nodes[i][2])
mode_massflow[node] = (massflow * 1000) # convert units to kg/s from t/s
mode_massflow[node] = (massflow * 1000) # convert units to kg/s from t/s
if line[5:11] == "STPRES":
mode_networkpressure_found = True
# we found a network pressure line in the frd file