FEM: calculix writer, materials, delete code added by mistake with 68aba941df1
This commit is contained in:
@@ -120,74 +120,3 @@ def write_femelement_material(f, ccxwriter):
|
||||
if nl_mat_obj.YieldPoint3:
|
||||
f.write("{}\n".format(nl_mat_obj.YieldPoint3))
|
||||
f.write("\n")
|
||||
|
||||
|
||||
# ************************************************************************************************
|
||||
# Helpers
|
||||
def liquid_section_def(obj, section_type):
|
||||
if section_type == "PIPE MANNING":
|
||||
manning_area = str(obj.ManningArea.getValueAs("mm^2").Value)
|
||||
manning_radius = str(obj.ManningRadius.getValueAs("mm"))
|
||||
manning_coefficient = str(obj.ManningCoefficient)
|
||||
section_geo = manning_area + "," + manning_radius + "," + manning_coefficient + "\n"
|
||||
return section_geo
|
||||
elif section_type == "PIPE ENLARGEMENT":
|
||||
enlarge_area1 = str(obj.EnlargeArea1.getValueAs("mm^2").Value)
|
||||
enlarge_area2 = str(obj.EnlargeArea2.getValueAs("mm^2").Value)
|
||||
section_geo = enlarge_area1 + "," + enlarge_area2 + "\n"
|
||||
return section_geo
|
||||
elif section_type == "PIPE CONTRACTION":
|
||||
contract_area1 = str(obj.ContractArea1.getValueAs("mm^2").Value)
|
||||
contract_area2 = str(obj.ContractArea2.getValueAs("mm^2").Value)
|
||||
section_geo = contract_area1 + "," + contract_area2 + "\n"
|
||||
return section_geo
|
||||
elif section_type == "PIPE ENTRANCE":
|
||||
entrance_pipe_area = str(obj.EntrancePipeArea.getValueAs("mm^2").Value)
|
||||
entrance_area = str(obj.EntranceArea.getValueAs("mm^2").Value)
|
||||
section_geo = entrance_pipe_area + "," + entrance_area + "\n"
|
||||
return section_geo
|
||||
elif section_type == "PIPE DIAPHRAGM":
|
||||
diaphragm_pipe_area = str(obj.DiaphragmPipeArea.getValueAs("mm^2").Value)
|
||||
diaphragm_area = str(obj.DiaphragmArea.getValueAs("mm^2").Value)
|
||||
section_geo = diaphragm_pipe_area + "," + diaphragm_area + "\n"
|
||||
return section_geo
|
||||
elif section_type == "PIPE BEND":
|
||||
bend_pipe_area = str(obj.BendPipeArea.getValueAs("mm^2").Value)
|
||||
bend_radius_diameter = str(obj.BendRadiusDiameter)
|
||||
bend_angle = str(obj.BendAngle)
|
||||
bend_loss_coefficient = str(obj.BendLossCoefficient)
|
||||
section_geo = ("{},{},{},{}\n".format(
|
||||
bend_pipe_area,
|
||||
bend_radius_diameter,
|
||||
bend_angle,
|
||||
bend_loss_coefficient
|
||||
))
|
||||
return section_geo
|
||||
elif section_type == "PIPE GATE VALVE":
|
||||
gatevalve_pipe_area = str(obj.GateValvePipeArea.getValueAs("mm^2").Value)
|
||||
gatevalve_closing_coeff = str(obj.GateValveClosingCoeff)
|
||||
section_geo = gatevalve_pipe_area + "," + gatevalve_closing_coeff + "\n"
|
||||
return section_geo
|
||||
elif section_type == "PIPE WHITE-COLEBROOK":
|
||||
colebrooke_area = str(obj.ColebrookeArea.getValueAs("mm^2").Value)
|
||||
colebrooke_diameter = str(2 * obj.ColebrookeRadius.getValueAs("mm"))
|
||||
colebrooke_grain_diameter = str(obj.ColebrookeGrainDiameter.getValueAs("mm"))
|
||||
colebrooke_form_factor = str(obj.ColebrookeFormFactor)
|
||||
section_geo = ("{},{},{},{},{}\n".format(
|
||||
colebrooke_area,
|
||||
colebrooke_diameter,
|
||||
"-1",
|
||||
colebrooke_grain_diameter,
|
||||
colebrooke_form_factor
|
||||
))
|
||||
return section_geo
|
||||
elif section_type == "LIQUID PUMP":
|
||||
section_geo = ""
|
||||
for i in range(len(obj.PumpFlowRate)):
|
||||
flow_rate = str(obj.PumpFlowRate[i])
|
||||
top = str(obj.PumpHeadLoss[i])
|
||||
section_geo = section_geo + flow_rate + "," + top + ","
|
||||
section_geo = section_geo + "\n"
|
||||
return section_geo
|
||||
else:
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user