diff --git a/src/Mod/Fem/App/CMakeLists.txt b/src/Mod/Fem/App/CMakeLists.txt index 1e1957495958..fa3d05cdbd02 100755 --- a/src/Mod/Fem/App/CMakeLists.txt +++ b/src/Mod/Fem/App/CMakeLists.txt @@ -134,7 +134,7 @@ SET(FemScripts_SRCS SET(FemTests_SRCS test_files/ccx/mesh_points.csv - test_files/ccx/mesh_volumes.csv + test_files/ccx/mesh_volumes.csv test_files/ccx/cube_frequency.inp test_files/ccx/cube_frequency.dat test_files/ccx/cube_frequency.frd @@ -144,13 +144,13 @@ SET(FemTests_SRCS test_files/ccx/cube_static.frd test_files/ccx/cube_static_expected_values test_files/ccx/cube.fcstd - test_files/ccx/spine_points.csv + test_files/ccx/spine_points.csv test_files/ccx/spine_volumes.csv - test_files/ccx/spine_thermomech.inp - test_files/ccx/spine_thermomech.dat - test_files/ccx/spine_thermomech.frd - test_files/ccx/spine_thermomech_expected_values - test_files/ccx/spine_thermomech.fcstd + test_files/ccx/spine_thermomech.inp + test_files/ccx/spine_thermomech.dat + test_files/ccx/spine_thermomech.frd + test_files/ccx/spine_thermomech_expected_values + test_files/ccx/spine_thermomech.fcstd ) SET(FemBase_SRCS diff --git a/src/Mod/Fem/CMakeLists.txt b/src/Mod/Fem/CMakeLists.txt index 4a3e876aaafa..e7e2f3e5c729 100755 --- a/src/Mod/Fem/CMakeLists.txt +++ b/src/Mod/Fem/CMakeLists.txt @@ -104,14 +104,13 @@ INSTALL( test_files/ccx/cube_static.frd test_files/ccx/cube_static_expected_values test_files/ccx/cube.fcstd - test_files/ccx/spine_points.csv + test_files/ccx/spine_points.csv test_files/ccx/spine_volumes.csv - test_files/ccx/spine_thermomech.inp - test_files/ccx/spine_thermomech.dat - test_files/ccx/spine_thermomech.frd - test_files/ccx/spine_thermomech_expected_values - test_files/ccx/spine_thermomech.fcstd - + test_files/ccx/spine_thermomech.inp + test_files/ccx/spine_thermomech.dat + test_files/ccx/spine_thermomech.frd + test_files/ccx/spine_thermomech_expected_values + test_files/ccx/spine_thermomech.fcstd DESTINATION Mod/Fem/test_files/ccx ) diff --git a/src/Mod/Fem/TestFem.py b/src/Mod/Fem/TestFem.py index 31575b8f0bba..afda108a6d12 100644 --- a/src/Mod/Fem/TestFem.py +++ b/src/Mod/Fem/TestFem.py @@ -339,7 +339,7 @@ def create_new_analysis(self): def create_new_solver(self): self.solver_object = FemSolverCalculix.makeFemSolverCalculix('CalculiX') self.active_doc.recompute() - + def create_new_mesh(self): self.mesh_object = self.active_doc.addObject('Fem::FemMeshObject', mesh_name) self.mesh = Fem.FemMesh() @@ -357,7 +357,7 @@ def create_new_mesh(self): self.mesh_object.FemMesh = self.mesh self.active_doc.recompute() - + def create_new_material(self): self.new_material_object = MechanicalMaterial.makeMechanicalMaterial('MechanicalMaterial') mat = self.new_material_object.Material @@ -365,9 +365,9 @@ def create_new_material(self): mat['YoungsModulus'] = "200000 MPa" mat['PoissonRatio'] = "0.30" mat['Density'] = "7900 kg/m^3" - mat['ThermalConductivity'] = "43.27 W/m/K" #SvdW: Change to Ansys model values + mat['ThermalConductivity'] = "43.27 W/m/K" # SvdW: Change to Ansys model values mat['ThermalExpansionCoefficient'] = "12 um/m/K" - mat['SpecificHeat'] = "500 J/kg/K" #SvdW: Change to Ansys model values + mat['SpecificHeat'] = "500 J/kg/K" # SvdW: Change to Ansys model values self.new_material_object.Material = mat def create_fixed_constraint(self): @@ -382,10 +382,10 @@ def create_temperature_constraint(self): self.temperature_constraint = self.active_doc.addObject("Fem::ConstraintTemperature", "FemConstraintTemperature") self.temperature_constraint.References = [(self.box, "Face1")] self.temperature_constraint.Temperature = 310.93 - + def create_heatflux_constraint(self): self.heatflux_constraint = self.active_doc.addObject("Fem::ConstraintHeatflux", "FemConstraintHeatflux") - self.heatflux_constraint.References = [(self.box, "Face3"),(self.box, "Face4"),(self.box, "Face5"),(self.box, "Face6")] + self.heatflux_constraint.References = [(self.box, "Face3"), (self.box, "Face4"), (self.box, "Face5"), (self.box, "Face6")] self.heatflux_constraint.AmbientTemp = 255.3722 self.heatflux_constraint.FilmCoef = 5.678 @@ -440,42 +440,42 @@ def test_new_analysis(self): fcc_print('Checking FEM new analysis...') self.create_new_analysis() self.assertTrue(self.analysis, "FemTest of new analysis failed") - + fcc_print('Checking FEM new solver...') self.create_new_solver() self.assertTrue(self.solver_object, "FemTest of new solver failed") self.analysis.Member = self.analysis.Member + [self.solver_object] - + fcc_print('Checking FEM new mesh...') self.create_new_mesh() self.assertTrue(self.mesh, "FemTest of new mesh failed") self.analysis.Member = self.analysis.Member + [self.mesh_object] - + fcc_print('Checking FEM new material...') self.create_new_material() self.assertTrue(self.new_material_object, "FemTest of new material failed") self.analysis.Member = self.analysis.Member + [self.new_material_object] - + fcc_print('Checking FEM new fixed constraint...') self.create_fixed_constraint() self.assertTrue(self.fixed_constraint, "FemTest of new fixed constraint failed") self.analysis.Member = self.analysis.Member + [self.fixed_constraint] - + fcc_print('Checking FEM new initial temperature constraint...') self.create_initialtemperature_constraint() self.assertTrue(self.initialtemperature_constraint, "FemTest of new initial temperature constraint failed") self.analysis.Member = self.analysis.Member + [self.initialtemperature_constraint] - + fcc_print('Checking FEM new temperature constraint...') self.create_temperature_constraint() self.assertTrue(self.temperature_constraint, "FemTest of new temperature constraint failed") self.analysis.Member = self.analysis.Member + [self.temperature_constraint] - + fcc_print('Checking FEM new heatflux constraint...') self.create_heatflux_constraint() self.assertTrue(self.heatflux_constraint, "FemTest of new heatflux constraint failed") self.analysis.Member = self.analysis.Member + [self.heatflux_constraint] - + fea = FemToolsCcx.FemToolsCcx(self.analysis, test_mode=True) fcc_print('Setting up working directory {}'.format(thermomech_analysis_dir)) fea.setup_working_dir(thermomech_analysis_dir) @@ -519,6 +519,7 @@ def tearDown(self): FreeCAD.closeDocument("TherMechFemTest") pass + # helpers def open_cube_test(): cube_file = test_file_dir + '/cube.fcstd'