FEM: solver writer and tasks, code formating
This commit is contained in:
@@ -81,7 +81,8 @@ class Prepare(run.Prepare):
|
||||
c.beam_rotations,
|
||||
c.shell_thicknesses,
|
||||
c.fluid_sections,
|
||||
self.directory)
|
||||
self.directory
|
||||
)
|
||||
path = w.write_calculix_input_file()
|
||||
# report to user if task succeeded
|
||||
if path != "":
|
||||
|
||||
@@ -38,30 +38,30 @@ import six
|
||||
|
||||
|
||||
class FemInputWriterCcx(FemInputWriter.FemInputWriter):
|
||||
def __init__(self,
|
||||
analysis_obj,
|
||||
solver_obj,
|
||||
mesh_obj,
|
||||
matlin_obj,
|
||||
matnonlin_obj,
|
||||
fixed_obj,
|
||||
displacement_obj,
|
||||
contact_obj,
|
||||
planerotation_obj,
|
||||
transform_obj,
|
||||
selfweight_obj,
|
||||
force_obj,
|
||||
pressure_obj,
|
||||
temperature_obj,
|
||||
heatflux_obj,
|
||||
initialtemperature_obj,
|
||||
beamsection_obj,
|
||||
beamrotation_obj,
|
||||
shellthickness_obj,
|
||||
fluidsection_obj,
|
||||
dir_name=None
|
||||
):
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
analysis_obj,
|
||||
solver_obj,
|
||||
mesh_obj,
|
||||
matlin_obj,
|
||||
matnonlin_obj,
|
||||
fixed_obj,
|
||||
displacement_obj,
|
||||
contact_obj,
|
||||
planerotation_obj,
|
||||
transform_obj,
|
||||
selfweight_obj,
|
||||
force_obj,
|
||||
pressure_obj,
|
||||
temperature_obj,
|
||||
heatflux_obj,
|
||||
initialtemperature_obj,
|
||||
beamsection_obj,
|
||||
beamrotation_obj,
|
||||
shellthickness_obj,
|
||||
fluidsection_obj,
|
||||
dir_name=None
|
||||
):
|
||||
FemInputWriter.FemInputWriter.__init__(
|
||||
self,
|
||||
analysis_obj,
|
||||
@@ -84,7 +84,8 @@ class FemInputWriterCcx(FemInputWriter.FemInputWriter):
|
||||
beamrotation_obj,
|
||||
shellthickness_obj,
|
||||
fluidsection_obj,
|
||||
dir_name)
|
||||
dir_name
|
||||
)
|
||||
from os.path import join
|
||||
self.main_file_name = self.mesh_object.Name + '.inp'
|
||||
self.file_name = join(self.dir_name, self.main_file_name)
|
||||
|
||||
@@ -32,29 +32,30 @@ import os
|
||||
|
||||
|
||||
class FemInputWriter():
|
||||
def __init__(self,
|
||||
analysis_obj,
|
||||
solver_obj,
|
||||
mesh_obj,
|
||||
matlin_obj,
|
||||
matnonlin_obj,
|
||||
fixed_obj,
|
||||
displacement_obj,
|
||||
contact_obj,
|
||||
planerotation_obj,
|
||||
transform_obj,
|
||||
selfweight_obj,
|
||||
force_obj,
|
||||
pressure_obj,
|
||||
temperature_obj,
|
||||
heatflux_obj,
|
||||
initialtemperature_obj,
|
||||
beamsection_obj,
|
||||
beamrotation_obj,
|
||||
shellthickness_obj,
|
||||
fluidsection_obj,
|
||||
dir_name
|
||||
):
|
||||
def __init__(
|
||||
self,
|
||||
analysis_obj,
|
||||
solver_obj,
|
||||
mesh_obj,
|
||||
matlin_obj,
|
||||
matnonlin_obj,
|
||||
fixed_obj,
|
||||
displacement_obj,
|
||||
contact_obj,
|
||||
planerotation_obj,
|
||||
transform_obj,
|
||||
selfweight_obj,
|
||||
force_obj,
|
||||
pressure_obj,
|
||||
temperature_obj,
|
||||
heatflux_obj,
|
||||
initialtemperature_obj,
|
||||
beamsection_obj,
|
||||
beamrotation_obj,
|
||||
shellthickness_obj,
|
||||
fluidsection_obj,
|
||||
dir_name
|
||||
):
|
||||
self.analysis = analysis_obj
|
||||
self.solver_obj = solver_obj
|
||||
self.analysis_type = self.solver_obj.AnalysisType
|
||||
|
||||
@@ -75,7 +75,8 @@ class Prepare(run.Prepare):
|
||||
c.beam_rotations,
|
||||
c.shell_thicknesses,
|
||||
c.fluid_sections,
|
||||
self.directory)
|
||||
self.directory
|
||||
)
|
||||
path = w.write_z88_input()
|
||||
# report to user if task succeeded
|
||||
if path is not None:
|
||||
|
||||
@@ -34,30 +34,30 @@ from .. import writerbase as FemInputWriter
|
||||
|
||||
|
||||
class FemInputWriterZ88(FemInputWriter.FemInputWriter):
|
||||
def __init__(self,
|
||||
analysis_obj,
|
||||
solver_obj,
|
||||
mesh_obj,
|
||||
matlin_obj,
|
||||
matnonlin_obj,
|
||||
fixed_obj,
|
||||
displacement_obj,
|
||||
contact_obj,
|
||||
planerotation_obj,
|
||||
transform_obj,
|
||||
selfweight_obj,
|
||||
force_obj,
|
||||
pressure_obj,
|
||||
temperature_obj,
|
||||
heatflux_obj,
|
||||
initialtemperature_obj,
|
||||
beamsection_obj,
|
||||
beamrotation_obj,
|
||||
shellthickness_obj,
|
||||
fluidsection_obj,
|
||||
dir_name=None
|
||||
):
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
analysis_obj,
|
||||
solver_obj,
|
||||
mesh_obj,
|
||||
matlin_obj,
|
||||
matnonlin_obj,
|
||||
fixed_obj,
|
||||
displacement_obj,
|
||||
contact_obj,
|
||||
planerotation_obj,
|
||||
transform_obj,
|
||||
selfweight_obj,
|
||||
force_obj,
|
||||
pressure_obj,
|
||||
temperature_obj,
|
||||
heatflux_obj,
|
||||
initialtemperature_obj,
|
||||
beamsection_obj,
|
||||
beamrotation_obj,
|
||||
shellthickness_obj,
|
||||
fluidsection_obj,
|
||||
dir_name=None
|
||||
):
|
||||
FemInputWriter.FemInputWriter.__init__(
|
||||
self,
|
||||
analysis_obj,
|
||||
@@ -80,7 +80,8 @@ class FemInputWriterZ88(FemInputWriter.FemInputWriter):
|
||||
beamrotation_obj,
|
||||
shellthickness_obj,
|
||||
fluidsection_obj,
|
||||
dir_name)
|
||||
dir_name
|
||||
)
|
||||
from os.path import join
|
||||
self.file_name = join(self.dir_name, 'z88')
|
||||
FreeCAD.Console.PrintLog('FemInputWriterZ88 --> self.dir_name --> ' + self.dir_name + '\n')
|
||||
|
||||
Reference in New Issue
Block a user