コード例 #1
0
 def test_KratosFluidDynamicsSolver(self):
     with co_simulation_test_case.ControlledExecutionScope(
             os.path.dirname(os.path.realpath(__file__))):
         # self.createTest('test_structural_mesh_motion_2d/rectangle_2D3N_test')
         # self.runTest()
         kratos_utils.DeleteFileIfExisting(
             "./test_mdpa_files/rectangle_2D3N_test.time")
コード例 #2
0
 def test_PotentialCase(self):
     if not numpy_available:
         self.skipTest("Numpy not available")
     with co_simulation_test_case.ControlledExecutionScope(os.path.dirname(os.path.realpath(__file__))):
         self.createTest("fsi_potential_flow_sdof", "project_cosim_naca0012_small_fsi")
         self.runTestSteady()
         self._check_results(self.fluid_solver.lift_process.fluid_model_part.ProcessInfo.GetValue(CPFApp.LIFT_COEFFICIENT), 0.32782398801832946, 0.0, 1e-9)
コード例 #3
0
 def test_EmpireSolverWrapper(self):
     if "EMPIRE_API_LIBSO_ON_MACHINE" not in os.environ:
         self.skipTest("EMPIRE is not available")
     with co_simulation_test_case.ControlledExecutionScope(
             os.path.dirname(os.path.realpath(__file__))):
         # self.createTest('test_structural_mesh_motion_2d/rectangle_2D3N_test')
         # self.runTest()
         kratos_utils.DeleteFileIfExisting(
             "./test_mdpa_files/rectangle_2D3N_test.time")
コード例 #4
0
 def test_SDoFSolver(self):
     if not numpy_available:
         self.skipTest("Numpy not available")
     with co_simulation_test_case.ControlledExecutionScope(
             os.path.dirname(os.path.realpath(__file__))):
         folder_name = "sdof_solver"
         self.createTest("sdof_solver", "cosim_sdof")
         self.runTest()
         reference_file = os.path.join(folder_name, "results_sdof_ref.dat")
         result_file = os.path.join(folder_name, "results_sdof.dat")
         compareResults(reference_file, result_file)
コード例 #5
0
 def test_MDoFBridge2DoFModel(self):
     if not numpy_available:
         self.skipTest("Numpy not available")
     if not scipy_and_sympy_available:
         self.skipTest("Scipy/Sympy not available")
     with co_simulation_test_case.ControlledExecutionScope(
             os.path.dirname(os.path.realpath(__file__))):
         folder_name = "mdof_solver"
         self.createTest(folder_name, "cosim_mdof_bridge_2dof")
         self.runTest()
         reference_file = os.path.join(folder_name,
                                       "results_mdof_bridge_2dof_ref.dat")
         result_file = os.path.join(folder_name,
                                    "results_mdof_bridge_2dof.dat")
         compareResults(reference_file, result_file)
コード例 #6
0
 def test_SDoFDragRectangleFSI(self):
     if not numpy_available:
         self.skipTest("Numpy not available")
     with co_simulation_test_case.ControlledExecutionScope(os.path.dirname(os.path.realpath(__file__))):
         self.createTest("fsi_sdof_drag_rectangle", "cosim_sdof_drag_rectangle_fsi")
         self.runTest()
コード例 #7
0
 def test_WallFSI(self):
     if not numpy_available:
         self.skipTest("Numpy not available")
     with co_simulation_test_case.ControlledExecutionScope(os.path.dirname(os.path.realpath(__file__))):
         self.createTest("fsi_wall", "cosim_wall_weak_coupling_fsi")
         self.runTest()