FEM: fix z88 solver and resort fem objects in tools and writer

This commit is contained in:
Bernd Hahnebach 2016-08-01 21:56:35 +01:00 committed by wmayer
parent d8c294c54d
commit 4df30061e5
5 changed files with 39 additions and 32 deletions

View File

@ -41,23 +41,24 @@ import os
class FemInputWriter():
def __init__(self, analysis_obj, solver_obj,
def __init__(self,
analysis_obj, solver_obj,
mesh_obj, mat_obj,
fixed_obj,
fixed_obj, displacement_obj,
selfweight_obj, force_obj, pressure_obj,
displacement_obj,
beamsection_obj, shellthickness_obj,
analysis_type, eigenmode_parameters,
dir_name):
dir_name
):
self.analysis = analysis_obj
self.solver_obj = solver_obj
self.mesh_object = mesh_obj
self.material_objects = mat_obj
self.fixed_objects = fixed_obj
self.displacement_objects = displacement_obj
self.selfweight_objects = selfweight_obj
self.force_objects = force_obj
self.pressure_objects = pressure_obj
self.displacement_objects = displacement_obj
self.beamsection_objects = beamsection_obj
self.shellthickness_objects = shellthickness_obj
self.analysis_type = analysis_type

View File

@ -36,22 +36,24 @@ import FemInputWriter
class FemInputWriterCcx(FemInputWriter.FemInputWriter):
def __init__(self, analysis_obj, solver_obj,
def __init__(self,
analysis_obj, solver_obj,
mesh_obj, mat_obj,
fixed_obj,
fixed_obj, displacement_obj,
selfweight_obj, force_obj, pressure_obj,
displacement_obj,
beamsection_obj, shellthickness_obj,
analysis_type=None, eigenmode_parameters=None,
dir_name=None):
FemInputWriter.FemInputWriter.__init__(self, analysis_obj, solver_obj,
dir_name=None
):
FemInputWriter.FemInputWriter.__init__(self,
analysis_obj, solver_obj,
mesh_obj, mat_obj,
fixed_obj,
fixed_obj, displacement_obj,
selfweight_obj, force_obj, pressure_obj,
displacement_obj,
beamsection_obj, shellthickness_obj,
analysis_type, eigenmode_parameters,
dir_name)
dir_name
)
self.file_name = self.dir_name + '/' + self.mesh_object.Name + '.inp'
print('FemInputWriterCcx --> self.dir_name --> ' + self.dir_name)
print('FemInputWriterCcx --> self.file_name --> ' + self.file_name)

View File

@ -33,22 +33,24 @@ import FemInputWriter
class FemInputWriterZ88(FemInputWriter.FemInputWriter):
def __init__(self, analysis_obj, solver_obj,
def __init__(self,
analysis_obj, solver_obj,
mesh_obj, mat_obj,
fixed_obj,
force_obj, pressure_obj,
displacement_obj,
fixed_obj, displacement_obj,
selfweight_obj, force_obj, pressure_obj,
beamsection_obj, shellthickness_obj,
analysis_type=None, eigenmode_parameters=None,
dir_name=None):
FemInputWriter.FemInputWriter.__init__(self, analysis_obj, solver_obj,
dir_name=None
):
FemInputWriter.FemInputWriter.__init__(self,
analysis_obj, solver_obj,
mesh_obj, mat_obj,
fixed_obj,
force_obj, pressure_obj,
displacement_obj,
fixed_obj, displacement_obj,
selfweight_obj, force_obj, pressure_obj,
beamsection_obj, shellthickness_obj,
analysis_type, eigenmode_parameters,
dir_name)
dir_name
)
self.file_name = self.dir_name + '/z88'
print('FemInputWriterZ88 --> self.dir_name --> ' + self.dir_name)
print('FemInputWriterZ88 --> self.file_name --> ' + self.file_name)

View File

@ -88,14 +88,15 @@ class FemToolsCcx(FemTools.FemTools):
import sys
self.inp_file_name = ""
try:
inp_writer = iw.FemInputWriterCcx(self.analysis, self.solver,
inp_writer = iw.FemInputWriterCcx(
self.analysis, self.solver,
self.mesh, self.materials,
self.fixed_constraints,
self.fixed_constraints, self.displacement_constraints,
self.selfweight_constraints, self.force_constraints, self.pressure_constraints,
self.displacement_constraints,
self.beam_sections, self.shell_thicknesses,
self.analysis_type, self.eigenmode_parameters,
self.working_dir)
self.working_dir
)
self.inp_file_name = inp_writer.write_calculix_input_file()
except:
print("Unexpected error when writing CalculiX input file:", sys.exc_info()[0])

View File

@ -80,14 +80,15 @@ class FemToolsZ88(FemTools.FemTools):
import sys
self.inp_file_name = ""
try:
inp_writer = iw.FemInputWriterZ88(self.analysis, self.solver,
inp_writer = iw.FemInputWriterZ88(
self.analysis, self.solver,
self.mesh, self.materials,
self.fixed_constraints,
self.force_constraints, self.pressure_constraints,
self.displacement_constraints,
self.fixed_constraints, self.displacement_constraints,
self.selfweight_constraints, self.force_constraints, self.pressure_constraints,
self.beam_sections, self.shell_thicknesses,
self.analysis_type, None,
self.working_dir)
self.working_dir
)
self.inp_file_name = inp_writer.write_z88_input()
except:
print("Unexpected error when writing Z88 input files:", sys.exc_info()[0])