FEM: objs, use single quotes instead of double ones
This commit is contained in:
@@ -33,24 +33,24 @@ __url__ = "http://www.freecadweb.org"
|
||||
class _FemElementFluid1D:
|
||||
"The FemElementFluid1D object"
|
||||
|
||||
known_fluid_types = ['Liquid']
|
||||
# 'Gas', 'Open Channel' are not implemented in ccx writer
|
||||
# known_fluid_types = ['Liquid', 'Gas', 'Open Channel']
|
||||
known_fluid_types = ["Liquid"]
|
||||
# "Gas", "Open Channel" are not implemented in ccx writer
|
||||
# known_fluid_types = ["Liquid", "Gas", "Open Channel"]
|
||||
known_liquid_types = [
|
||||
'PIPE MANNING',
|
||||
'PIPE ENLARGEMENT',
|
||||
'PIPE CONTRACTION',
|
||||
'PIPE INLET',
|
||||
'PIPE OUTLET',
|
||||
'PIPE ENTRANCE',
|
||||
'PIPE DIAPHRAGM',
|
||||
'PIPE BEND',
|
||||
'PIPE GATE VALVE',
|
||||
'LIQUID PUMP',
|
||||
'PIPE WHITE-COLEBROOK'
|
||||
"PIPE MANNING",
|
||||
"PIPE ENLARGEMENT",
|
||||
"PIPE CONTRACTION",
|
||||
"PIPE INLET",
|
||||
"PIPE OUTLET",
|
||||
"PIPE ENTRANCE",
|
||||
"PIPE DIAPHRAGM",
|
||||
"PIPE BEND",
|
||||
"PIPE GATE VALVE",
|
||||
"LIQUID PUMP",
|
||||
"PIPE WHITE-COLEBROOK"
|
||||
]
|
||||
known_gas_types = ['NONE']
|
||||
known_channel_types = ['NONE']
|
||||
known_gas_types = ["NONE"]
|
||||
known_channel_types = ["NONE"]
|
||||
|
||||
def __init__(self, obj):
|
||||
obj.addProperty(
|
||||
@@ -272,13 +272,13 @@ class _FemElementFluid1D:
|
||||
|
||||
# set property default values
|
||||
obj.SectionType = _FemElementFluid1D.known_fluid_types
|
||||
obj.SectionType = 'Liquid'
|
||||
obj.SectionType = "Liquid"
|
||||
obj.LiquidSectionType = _FemElementFluid1D.known_liquid_types
|
||||
obj.LiquidSectionType = 'PIPE INLET'
|
||||
obj.LiquidSectionType = "PIPE INLET"
|
||||
obj.GasSectionType = _FemElementFluid1D.known_gas_types
|
||||
obj.GasSectionType = 'NONE'
|
||||
obj.GasSectionType = "NONE"
|
||||
obj.ChannelSectionType = _FemElementFluid1D.known_channel_types
|
||||
obj.ChannelSectionType = 'NONE'
|
||||
obj.ChannelSectionType = "NONE"
|
||||
obj.ManningArea = 10.0
|
||||
obj.ManningRadius = 1.0
|
||||
obj.ManningCoefficient = 0.0015 # has units of s/mm^(1/3)
|
||||
|
||||
@@ -32,7 +32,7 @@ __url__ = "http://www.freecadweb.org"
|
||||
class _FemElementGeometry1D:
|
||||
"The FemElementGeometry1D object"
|
||||
|
||||
known_beam_types = ['Rectangular', 'Circular', 'Pipe']
|
||||
known_beam_types = ["Rectangular", "Circular", "Pipe"]
|
||||
|
||||
def __init__(self, obj):
|
||||
obj.addProperty(
|
||||
@@ -78,7 +78,7 @@ class _FemElementGeometry1D:
|
||||
"List of beam section shapes"
|
||||
)
|
||||
obj.SectionType = _FemElementGeometry1D.known_beam_types
|
||||
obj.SectionType = 'Rectangular'
|
||||
obj.SectionType = "Rectangular"
|
||||
obj.Proxy = self
|
||||
self.Type = "Fem::FemElementGeometry1D"
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ class _FemMaterial:
|
||||
"Material",
|
||||
"Material type: fluid or solid"
|
||||
)
|
||||
obj.Category = ['Solid', 'Fluid'] # used in TaskPanel
|
||||
obj.Category = ["Solid", "Fluid"] # used in TaskPanel
|
||||
obj.Proxy = self
|
||||
self.Type = "Fem::Material"
|
||||
|
||||
|
||||
@@ -50,8 +50,8 @@ class _FemMaterialReinforced:
|
||||
"Material",
|
||||
"Matrix material properties"
|
||||
)
|
||||
obj.Category = ['Solid']
|
||||
obj.Category = 'Solid'
|
||||
obj.Category = ["Solid"]
|
||||
obj.Category = "Solid"
|
||||
obj.Proxy = self
|
||||
self.Type = "Fem::MaterialReinforced"
|
||||
|
||||
|
||||
@@ -34,25 +34,25 @@ class _FemMeshGmsh():
|
||||
"""
|
||||
|
||||
# they will be used from the task panel too, thus they need to be outside of the __init__
|
||||
known_element_dimensions = ['From Shape', '1D', '2D', '3D']
|
||||
known_element_orders = ['1st', '2nd']
|
||||
known_element_dimensions = ["From Shape", "1D", "2D", "3D"]
|
||||
known_element_orders = ["1st", "2nd"]
|
||||
known_mesh_algorithm_2D = [
|
||||
'Automatic',
|
||||
'MeshAdapt',
|
||||
'Delaunay',
|
||||
'Frontal',
|
||||
'BAMG',
|
||||
'DelQuad'
|
||||
"Automatic",
|
||||
"MeshAdapt",
|
||||
"Delaunay",
|
||||
"Frontal",
|
||||
"BAMG",
|
||||
"DelQuad"
|
||||
]
|
||||
known_mesh_algorithm_3D = [
|
||||
'Automatic',
|
||||
'Delaunay',
|
||||
'New Delaunay',
|
||||
'Frontal',
|
||||
'Frontal Delaunay',
|
||||
'Frontal Hex',
|
||||
'MMG3D',
|
||||
'R-tree'
|
||||
"Automatic",
|
||||
"Delaunay",
|
||||
"New Delaunay",
|
||||
"Frontal",
|
||||
"Frontal Delaunay",
|
||||
"Frontal Hex",
|
||||
"MMG3D",
|
||||
"R-tree"
|
||||
]
|
||||
|
||||
def __init__(self, obj):
|
||||
@@ -115,7 +115,7 @@ class _FemMeshGmsh():
|
||||
"Dimension of mesh elements (Auto = according ShapeType of part to mesh)"
|
||||
)
|
||||
obj.ElementDimension = _FemMeshGmsh.known_element_dimensions
|
||||
obj.ElementDimension = 'From Shape' # according ShapeType of Part to mesh
|
||||
obj.ElementDimension = "From Shape" # according ShapeType of Part to mesh
|
||||
|
||||
obj.addProperty(
|
||||
"App::PropertyEnumeration",
|
||||
@@ -124,7 +124,7 @@ class _FemMeshGmsh():
|
||||
"Order of mesh elements"
|
||||
)
|
||||
obj.ElementOrder = _FemMeshGmsh.known_element_orders
|
||||
obj.ElementOrder = '2nd'
|
||||
obj.ElementOrder = "2nd"
|
||||
|
||||
obj.addProperty(
|
||||
"App::PropertyBool",
|
||||
@@ -181,7 +181,7 @@ class _FemMeshGmsh():
|
||||
"mesh algorithm 2D"
|
||||
)
|
||||
obj.Algorithm2D = _FemMeshGmsh.known_mesh_algorithm_2D
|
||||
obj.Algorithm2D = 'Automatic' # ?
|
||||
obj.Algorithm2D = "Automatic" # ?
|
||||
|
||||
obj.addProperty(
|
||||
"App::PropertyEnumeration",
|
||||
@@ -190,7 +190,7 @@ class _FemMeshGmsh():
|
||||
"mesh algorithm 3D"
|
||||
)
|
||||
obj.Algorithm3D = _FemMeshGmsh.known_mesh_algorithm_3D
|
||||
obj.Algorithm3D = 'Automatic' # ?
|
||||
obj.Algorithm3D = "Automatic" # ?
|
||||
|
||||
obj.addProperty(
|
||||
"App::PropertyBool",
|
||||
|
||||
@@ -174,47 +174,47 @@ class _FemSolverCalculix():
|
||||
|
||||
ccx_default_time_incrementation_control_parameter = {
|
||||
# iteration parameter
|
||||
'I_0': 4,
|
||||
'I_R': 8,
|
||||
'I_P': 9,
|
||||
'I_C': 200, # ccx default = 16
|
||||
'I_L': 10,
|
||||
'I_G': 400, # ccx default = 4
|
||||
'I_S': None,
|
||||
'I_A': 200, # ccx default = 5
|
||||
'I_J': None,
|
||||
'I_T': None,
|
||||
"I_0": 4,
|
||||
"I_R": 8,
|
||||
"I_P": 9,
|
||||
"I_C": 200, # ccx default = 16
|
||||
"I_L": 10,
|
||||
"I_G": 400, # ccx default = 4
|
||||
"I_S": None,
|
||||
"I_A": 200, # ccx default = 5
|
||||
"I_J": None,
|
||||
"I_T": None,
|
||||
# cutback parameter
|
||||
'D_f': 0.25,
|
||||
'D_C': 0.5,
|
||||
'D_B': 0.75,
|
||||
'D_A': 0.85,
|
||||
'D_S': None,
|
||||
'D_H': None,
|
||||
'D_D': 1.5,
|
||||
'W_G': None}
|
||||
"D_f": 0.25,
|
||||
"D_C": 0.5,
|
||||
"D_B": 0.75,
|
||||
"D_A": 0.85,
|
||||
"D_S": None,
|
||||
"D_H": None,
|
||||
"D_D": 1.5,
|
||||
"W_G": None}
|
||||
p = ccx_default_time_incrementation_control_parameter
|
||||
p_iter = '{0},{1},{2},{3},{4},{5},{6},{7},{8},{9}'.format(
|
||||
p['I_0'],
|
||||
p['I_R'],
|
||||
p['I_P'],
|
||||
p['I_C'],
|
||||
p['I_L'],
|
||||
p['I_G'],
|
||||
'',
|
||||
p['I_A'],
|
||||
'',
|
||||
''
|
||||
p_iter = "{0},{1},{2},{3},{4},{5},{6},{7},{8},{9}".format(
|
||||
p["I_0"],
|
||||
p["I_R"],
|
||||
p["I_P"],
|
||||
p["I_C"],
|
||||
p["I_L"],
|
||||
p["I_G"],
|
||||
"",
|
||||
p["I_A"],
|
||||
"",
|
||||
""
|
||||
)
|
||||
p_cutb = '{0},{1},{2},{3},{4},{5},{6},{7}'.format(
|
||||
p['D_f'],
|
||||
p['D_C'],
|
||||
p['D_B'],
|
||||
p['D_A'],
|
||||
'',
|
||||
'',
|
||||
p['D_D'],
|
||||
''
|
||||
p_cutb = "{0},{1},{2},{3},{4},{5},{6},{7}".format(
|
||||
p["D_f"],
|
||||
p["D_C"],
|
||||
p["D_B"],
|
||||
p["D_A"],
|
||||
"",
|
||||
"",
|
||||
p["D_D"],
|
||||
""
|
||||
)
|
||||
obj.addProperty(
|
||||
"App::PropertyString",
|
||||
|
||||
Reference in New Issue
Block a user