From 0035151089ffee763b2e3f32310eef3895b37367 Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Thu, 9 Nov 2023 00:01:48 +0100 Subject: [PATCH 01/27] Adding a strong block solver and block MVQN acceleration --- .gitignore | 3 + .../convergence_accelerators/blockMvqn.py | 126 +++++++++++++++++ .../convergence_accelerator_wrapper.py | 133 +++++++++++++++--- .../coupled_solvers/block_solver.py | 87 ++++++++++++ .../python_scripts/factories/helpers.py | 11 +- 5 files changed, 340 insertions(+), 20 deletions(-) create mode 100644 applications/CoSimulationApplication/python_scripts/convergence_accelerators/blockMvqn.py create mode 100644 applications/CoSimulationApplication/python_scripts/coupled_solvers/block_solver.py diff --git a/.gitignore b/.gitignore index b1c67bd419a0..d3d88f17ac08 100644 --- a/.gitignore +++ b/.gitignore @@ -86,3 +86,6 @@ remote_*.md # External downloaded libs (TPL downloaded libs, etc...) external_libraries/tetgen/* + +# Mac folder info files +*.DS_Store diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/blockMvqn.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/blockMvqn.py new file mode 100644 index 000000000000..442ef92e8ed9 --- /dev/null +++ b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/blockMvqn.py @@ -0,0 +1,126 @@ +## @module blockMvqn +# This module contains the class MVQNConvergenceAccelerator +# Author: Tiba Azzeddine +# Date: Nov. 06, 2023 + +# Importing the Kratos Library +import KratosMultiphysics as KM + +# Importing the base class +from KratosMultiphysics.CoSimulationApplication.base_classes.co_simulation_convergence_accelerator import CoSimulationConvergenceAccelerator + +# CoSimulation imports +import KratosMultiphysics.CoSimulationApplication.co_simulation_tools as cs_tools + +# Other imports +import numpy as np +from copy import deepcopy +from collections import deque + + +def Create(settings): + cs_tools.SettingsTypeCheck(settings) + return BLOCKMVQNConvergenceAccelerator(settings) + +## Class BLOCKMVQNConvergenceAccelerator. +# This class contains the implementation of the Block MVQN method and helper functions. +# Reference: A.E.J. Bogaers et al. "Quasi-Newton methods for implicit black-box FSI coupling", Computational methods in applied mechanics and engineering. 279(2014) 113-132. +class BLOCKMVQNConvergenceAccelerator(CoSimulationConvergenceAccelerator): + ## The constructor. + # @param horizon Maximum number of vectors to be stored in each time step. + # @param alpha Relaxation factor for computing the update, when no vectors available. + def __init__( self, settings): + super().__init__(settings) + + horizon = self.settings["horizon"].GetInt() + self.alpha = self.settings["alpha"].GetDouble() + + self.X_tilde = {} + self.X = {} + self.J = {} + self.J_hat = {} + self.coupl_data_names = {} + + for solverData in settings["solver_sequence"].values(): + self.X_tilde[solverData["data_name"].GetString()] = deque( maxlen = horizon ) + self.X[solverData["data_name"].GetString()] = deque( maxlen = horizon ) + self.J[solverData["data_name"].GetString()] = None # size will be determined when first time get the input vector + self.J_hat[solverData["data_name"].GetString()] = None + self.coupl_data_names[solverData["data_name"].GetString()] = solverData["coupled_data_name"].GetString() + + ## UpdateSolution(r, x, y, data_name, yResidual) + # @param r residual r_k + # @param x solution x_k + # @param y (coupled solver) solution y_k + # @param data_name coupling variable + # @param yResidual (coupled solver) residual yResidual + # Computes the approximated update in each iteration. + def UpdateSolution( self, r, x, y, data_name, yResidual,): + + coupled_data_name = self.coupl_data_names[data_name] + self.X_tilde[data_name].appendleft( deepcopy(r + x) ) + self.X[coupled_data_name].appendleft( deepcopy(y) ) + + col = len(self.X[coupled_data_name]) - 1 + row = len(r) + rowY = len(y) + k = col + if self.echo_level > 3: + cs_tools.cs_print_info(self._ClassName(), "Number of new modes: ", col ) + + ## For the first iteration + if k == 0: + if self.J[data_name] is None or self.J[coupled_data_name] is None: + ## Zero initial Jacobians + self.J_hat[data_name] = np.zeros( (row, rowY) ) + self.J_hat[coupled_data_name] = np.zeros( (rowY, row) ) + self.J[coupled_data_name] = np.zeros( (rowY, row) ) + self.J[data_name] = np.zeros( (row, rowY) ) + return self.alpha * r # Initial acceleration to be a constant relaxation + else: + + blockJacobian = (np.eye(row) - self.J[data_name] @ self.J[coupled_data_name]) + b = r - self.J[data_name] @ yResidual + return np.linalg.solve( blockJacobian, b ) + + ## Construct matrix W(differences of intermediate solutions x) + W = np.empty( shape = (col, rowY) ) # will be transposed later + for i in range(0, col): + W[i] = self.X[coupled_data_name][i] - self.X[coupled_data_name][i + 1] + W = W.T + + ## Construct matrix W(differences of intermediate solutions y~) + V = np.empty( shape = (col, row) ) # will be transposed later + for i in range(0, col): + V[i] = self.X_tilde[data_name][i] - self.X_tilde[data_name][i + 1] + V = V.T + + self.J_hat[data_name] = self.J[data_name] + (V - self.J[data_name] @ W) @ (np.linalg.pinv(W)) + + blockJacobian = (np.eye(row) - self.J_hat[data_name] @ self.J_hat[coupled_data_name]) + b = r - self.J_hat[data_name] @ yResidual + + return np.linalg.solve( blockJacobian, b ) + + def FinalizeSolutionStep( self ): + + ## Assign J=J_hat + for _, data_name in enumerate(self.J.keys()): + self.J[data_name] = self.J_hat[data_name].copy() + + ## Clear the buffer + self.X_tilde[data_name].clear() + self.X[data_name].clear() + + if self.echo_level > 3: + cs_tools.cs_print_info(self._ClassName(), "Jacobian matrix updated!") + + @classmethod + def _GetDefaultParameters(cls): + this_defaults = KM.Parameters("""{ + "horizon" : 15, + "alpha" : 1.0, + "solver_sequence" : [] + }""") + this_defaults.AddMissingParameters(super()._GetDefaultParameters()) + return this_defaults diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py index f442ba891455..16e28171368b 100644 --- a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py +++ b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py @@ -20,7 +20,20 @@ def __init__(self, settings: KratosMultiphysics.Parameters, interface_data_dict: "dict[str,CouplingInterfaceData]", parent_coupled_solver_data_communicator: KratosMultiphysics.DataCommunicator): - self.interface_data = interface_data_dict[settings["data_name"].GetString()] + if settings.Has("solver_sequence"): + self.interface_data_dict = interface_data_dict + self.solver_names_sequence = [] + self.coupl_data_names = {} + self.input_data = {} + for _, data_name in enumerate(self.interface_data_dict.keys()): + self.solver_names_sequence.append(self.interface_data_dict[data_name].solver_name) + self.isBlockAccelerator = True + for solverData in settings["solver_sequence"].values(): + self.coupl_data_names[solverData["data_name"].GetString()] = solverData["coupled_data_name"].GetString() + self.yResidual_computation = CreateResidualComputation(settings, interface_data_dict) + else: + self.isBlockAccelerator = False + self.interface_data = interface_data_dict[settings["data_name"].GetString()] self.residual_computation = CreateResidualComputation(settings, interface_data_dict) # Remove extra entries from accelerator parameters @@ -31,16 +44,36 @@ def __init__(self, self.conv_acc = CreateConvergenceAccelerator(settings) self.data_communicator = parent_coupled_solver_data_communicator - if self.interface_data.IsDefinedOnThisRank(): - conv_acc_supports_dist_data = self.conv_acc.SupportsDistributedData() - self.executing_rank = conv_acc_supports_dist_data or (self.interface_data.GetModelPart().GetCommunicator().MyPID() == 0) - self.gather_scatter_required = self.interface_data.IsDistributed() and not conv_acc_supports_dist_data - if self.gather_scatter_required: - self.data_comm = self.interface_data.GetModelPart().GetCommunicator().GetDataCommunicator() - self.sizes_from_ranks = np.cumsum(self.data_comm.GatherInts([self.interface_data.Size()], 0)) + if not self.isBlockAccelerator: + if self.interface_data.IsDefinedOnThisRank(): + conv_acc_supports_dist_data = self.conv_acc.SupportsDistributedData() + self.executing_rank = conv_acc_supports_dist_data or (self.interface_data.GetModelPart().GetCommunicator().MyPID() == 0) + self.gather_scatter_required = self.interface_data.IsDistributed() and not conv_acc_supports_dist_data + if self.gather_scatter_required: + self.data_comm = self.interface_data.GetModelPart().GetCommunicator().GetDataCommunicator() + self.sizes_from_ranks = np.cumsum(self.data_comm.GatherInts([self.interface_data.Size()], 0)) + else: + self.executing_rank = {} + self.gather_scatter_required = {} + self.data_comm = {} + self.sizes_from_ranks = {} + for _, data_name in enumerate(interface_data_dict.keys()): + if self.interface_data_dict[data_name].IsDefinedOnThisRank(): + conv_acc_supports_dist_data = self.conv_acc.SupportsDistributedData() + self.executing_rank[data_name] = conv_acc_supports_dist_data or (self.interface_data_dict[data_name].GetModelPart().GetCommunicator().MyPID() == 0) + self.gather_scatter_required[data_name] = self.interface_data_dict[data_name].IsDistributed() and not conv_acc_supports_dist_data + if self.gather_scatter_required[data_name]: + self.data_comm[data_name] = self.interface_data_dict[data_name].GetModelPart().GetCommunicator().GetDataCommunicator() + self.sizes_from_ranks[data_name] = np.cumsum(self.data_comm[data_name].GatherInts([self.interface_data_dict[data_name].Size()], 0)) def Initialize(self): self.conv_acc.Initialize() + if self.isBlockAccelerator: + self.prev_input_data = {} + self.output_data = {} + for _, data_name in enumerate(self.interface_data_dict.keys()): + self.prev_input_data[data_name] = self.interface_data_dict[data_name].GetData() + self.output_data[data_name] = self.interface_data_dict[data_name].GetData() def Finalize(self): self.conv_acc.Finalize() @@ -52,17 +85,23 @@ def FinalizeSolutionStep(self): self.conv_acc.FinalizeSolutionStep() def InitializeNonLinearIteration(self): - if self.interface_data.IsDefinedOnThisRank(): - # Saving the previous data for the computation of the residual - # and the computation of the solution update - self.input_data = self.interface_data.GetData() + # Saving the previous data for the computation of the residual + # and the computation of the solution update + if self.isBlockAccelerator: + for _, data_name in enumerate(self.interface_data_dict.keys()): + interface_data = self.interface_data_dict[data_name] + if interface_data.IsDefinedOnThisRank(): + self.input_data[data_name] = interface_data.GetData() + else: + if self.interface_data.IsDefinedOnThisRank(): + self.input_data = self.interface_data.GetData() self.conv_acc.InitializeNonLinearIteration() def FinalizeNonLinearIteration(self): self.conv_acc.FinalizeNonLinearIteration() - def ComputeAndApplyUpdate(self): + def _ComputeAndApplyUpdate(self,): if not self.interface_data.IsDefinedOnThisRank(): return residual = self.residual_computation.ComputeResidual(self.input_data) @@ -85,6 +124,56 @@ def ComputeAndApplyUpdate(self): self.interface_data.SetData(updated_data) + def _ComputeAndApplyBlockUpdate(self, solver_name = None): + # Retrieving solver and data names + solver_id = self.solver_names_sequence.index(solver_name) + data_name, interface_data = list(self.interface_data_dict.items())[solver_id] + interface_data = self.interface_data_dict[data_name] + coupled_data_name = self.coupl_data_names[data_name] + + # Data Comm + executing_rank = self.executing_rank[data_name] + gather_scatter_required = self.gather_scatter_required[data_name] + + # Retrieving data + input_data = self.input_data[data_name] + self.prev_input_data[data_name] = interface_data.GetData() + prev_input_data = self.prev_input_data[coupled_data_name] + + if not interface_data.IsDefinedOnThisRank(): return + + residual = self.residual_computation.ComputeResidual(input_data, data_name) + yResidual = self.yResidual_computation.ComputeResidual(prev_input_data, coupled_data_name) + + input_data_for_acc = input_data + input_other_solver = self.output_data[coupled_data_name] + + if gather_scatter_required: + residual = np.array(np.concatenate(self.data_comm[data_name].GathervDoubles(residual, 0))) + yResidual = np.array(np.concatenate(self.data_comm[coupled_data_name].GathervDoubles(yResidual, 0))) + input_data_for_acc = np.array(np.concatenate(self.data_comm[data_name].GathervDoubles(input_data_for_acc, 0))) + input_other_solver = np.array(np.concatenate(self.data_comm[coupled_data_name].GathervDoubles(input_other_solver, 0))) + + if executing_rank: + updated_data = input_data_for_acc + self.conv_acc.UpdateSolution(residual, input_data_for_acc, input_other_solver, data_name, yResidual) + + if gather_scatter_required: + if executing_rank: + data_to_scatter = np.split(updated_data, self.sizes_from_ranks[data_name][:-1]) + else: + data_to_scatter = [] + + updated_data = self.data_comm[data_name].ScattervDoubles(data_to_scatter, 0) + + interface_data.SetData(updated_data) + self.output_data[data_name] = updated_data + + def ComputeAndApplyUpdate(self, solver_name = None): + if self.isBlockAccelerator: + self._ComputeAndApplyBlockUpdate(solver_name) + else: + self._ComputeAndApplyUpdate() + def PrintInfo(self): self.conv_acc.PrintInfo() @@ -93,16 +182,24 @@ def Check(self): class ConvergenceAcceleratorResidual(metaclass=ABCMeta): @abstractmethod - def ComputeResidual(self, input_data): pass + def ComputeResidual(self, input_data, data_name=None): pass class DataDifferenceResidual(ConvergenceAcceleratorResidual): def __init__(self, settings: KratosMultiphysics.Parameters, interface_data_dict: "dict[str,CouplingInterfaceData]"): - self.interface_data = interface_data_dict[settings["data_name"].GetString()] - - def ComputeResidual(self, input_data): - return self.interface_data.GetData() - input_data + if settings.Has("solver_sequence"): + self.interface_data_dict = interface_data_dict + self.isBlockResidualComputer = True + else: + self.isBlockResidualComputer = False + self.interface_data = interface_data_dict[settings["data_name"].GetString()] + + def ComputeResidual(self, input_data, data_name=None): + if self.isBlockResidualComputer: + return self.interface_data_dict[data_name].GetData() - input_data + else: + return self.interface_data.GetData() - input_data class DifferentDataDifferenceResidual(ConvergenceAcceleratorResidual): def __init__(self, diff --git a/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_solver.py b/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_solver.py new file mode 100644 index 000000000000..d9696f4e6e3e --- /dev/null +++ b/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_solver.py @@ -0,0 +1,87 @@ +# Importing the Kratos Library +import KratosMultiphysics as KM +import KratosMultiphysics.CoSimulationApplication as KratosCoSim + +# Importing the base class +from KratosMultiphysics.CoSimulationApplication.coupled_solvers.gauss_seidel_strong import GaussSeidelStrongCoupledSolver + +# CoSimulation imports +import KratosMultiphysics.CoSimulationApplication.co_simulation_tools as cs_tools +import KratosMultiphysics.CoSimulationApplication.factories.helpers as factories_helper +import KratosMultiphysics.CoSimulationApplication.colors as colors + +def Create(settings, models, solver_name): + return BlockSolver(settings, models, solver_name) + +class BlockSolver(GaussSeidelStrongCoupledSolver): + def SolveSolutionStep(self): + for k in range(self.num_coupling_iterations): + self.process_info[KratosCoSim.COUPLING_ITERATION_NUMBER] += 1 + + if self.echo_level > 0: + cs_tools.cs_print_info(self._ClassName(), colors.cyan("Coupling iteration:"), colors.bold(str(k+1)+" / " + str(self.num_coupling_iterations))) + + for coupling_op in self.coupling_operations_dict.values(): + coupling_op.InitializeCouplingIteration() + + for conv_acc in self.convergence_accelerators_list: + conv_acc.InitializeNonLinearIteration() + + for conv_crit in self.convergence_criteria_list: + conv_crit.InitializeNonLinearIteration() + + for solver_name, solver in self.solver_wrappers.items(): + self._SynchronizeInputData(solver_name) + solver.SolveSolutionStep() + self._SynchronizeOutputData(solver_name) + + # Apply relaxation for each solver output + for conv_acc in self.convergence_accelerators_list: + conv_acc.ComputeAndApplyUpdate(solver_name) + + for coupling_op in self.coupling_operations_dict.values(): + coupling_op.FinalizeCouplingIteration() + + for conv_acc in self.convergence_accelerators_list: + conv_acc.FinalizeNonLinearIteration() + + for conv_crit in self.convergence_criteria_list: + conv_crit.FinalizeNonLinearIteration() + + is_converged = all([conv_crit.IsConverged() for conv_crit in self.convergence_criteria_list]) + + if is_converged: + if self.echo_level > 0: + cs_tools.cs_print_info(self._ClassName(), colors.green("### CONVERGENCE WAS ACHIEVED ###")) + self.__CommunicateIfTimeStepNeedsToBeRepeated(False) + return True + + if k+1 >= self.num_coupling_iterations: + if self.echo_level > 0: + cs_tools.cs_print_info(self._ClassName(), colors.red("XXX CONVERGENCE WAS NOT ACHIEVED XXX")) + self.__CommunicateIfTimeStepNeedsToBeRepeated(False) + return False + + # if it reaches here it means that the coupling has not converged and this was not the last coupling iteration + self.__CommunicateIfTimeStepNeedsToBeRepeated(True) + + @classmethod + def _GetDefaultParameters(cls): + this_defaults = KM.Parameters("""{ + "convergence_accelerators" : [], + "convergence_criteria" : [], + "num_coupling_iterations" : 10 + }""") + this_defaults.AddMissingParameters(super()._GetDefaultParameters()) + + return this_defaults + + def __CommunicateIfTimeStepNeedsToBeRepeated(self, repeat_time_step): + # Communicate if the time step needs to be repeated with external solvers through IO + export_config = { + "type" : "repeat_time_step", + "repeat_time_step" : repeat_time_step + } + + for solver in self.solver_wrappers.values(): + solver.ExportData(export_config) diff --git a/applications/CoSimulationApplication/python_scripts/factories/helpers.py b/applications/CoSimulationApplication/python_scripts/factories/helpers.py index d9c62857a6aa..a53f3e7fc2ca 100644 --- a/applications/CoSimulationApplication/python_scripts/factories/helpers.py +++ b/applications/CoSimulationApplication/python_scripts/factories/helpers.py @@ -34,8 +34,15 @@ def CreateConvergenceAccelerators(convergence_accelerator_settings_list: KM.Para parent_echo_level: int): convergence_accelerators = [] for conv_acc_settings in convergence_accelerator_settings_list.values(): - solver = solvers[conv_acc_settings["solver"].GetString()] - interface_data_dict = solver.data_dict + if conv_acc_settings.Has("solver"): + solver = solvers[conv_acc_settings["solver"].GetString()] + interface_data_dict = solver.data_dict + else: + interface_data_dict = {} + for sequenceData in conv_acc_settings["solver_sequence"].values(): + solver = solvers[sequenceData["solver"].GetString()] + data_name = sequenceData["data_name"].GetString() + interface_data_dict[data_name] = solver.data_dict[data_name] AddEchoLevelToSettings(conv_acc_settings, parent_echo_level) convergence_accelerators.append(ConvergenceAcceleratorWrapper(conv_acc_settings, interface_data_dict, From 56661fd69af3bd718fd3923827ea8455a60d7e8c Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Thu, 9 Nov 2023 01:30:43 +0100 Subject: [PATCH 02/27] Block Accelerator - Defaulting to the first solver in the sequence --- .../convergence_accelerator_wrapper.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py index 16e28171368b..3c9462df602a 100644 --- a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py +++ b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py @@ -125,6 +125,10 @@ def _ComputeAndApplyUpdate(self,): self.interface_data.SetData(updated_data) def _ComputeAndApplyBlockUpdate(self, solver_name = None): + # Defaulting to the first solver in the sequence + if solver_name is None: + solver_name = self.solver_names_sequence[0] + # Retrieving solver and data names solver_id = self.solver_names_sequence.index(solver_name) data_name, interface_data = list(self.interface_data_dict.items())[solver_id] From 3bd46ece15daf7fdf6d546e7bac1162adbd07e40 Mon Sep 17 00:00:00 2001 From: azzeddinetiba Date: Sat, 11 Nov 2023 14:00:10 +0100 Subject: [PATCH 03/27] Remove unnecessary import --- .../python_scripts/coupled_solvers/block_solver.py | 1 - 1 file changed, 1 deletion(-) diff --git a/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_solver.py b/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_solver.py index d9696f4e6e3e..895cdd34c263 100644 --- a/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_solver.py +++ b/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_solver.py @@ -7,7 +7,6 @@ # CoSimulation imports import KratosMultiphysics.CoSimulationApplication.co_simulation_tools as cs_tools -import KratosMultiphysics.CoSimulationApplication.factories.helpers as factories_helper import KratosMultiphysics.CoSimulationApplication.colors as colors def Create(settings, models, solver_name): From 683b5b5943d412e93ac3186365f6a8f51828200a Mon Sep 17 00:00:00 2001 From: azzeddinetiba Date: Sat, 11 Nov 2023 14:02:30 +0100 Subject: [PATCH 04/27] Conditioning parameter in the pseudoinverse - blockMvqn --- .../python_scripts/convergence_accelerators/blockMvqn.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/blockMvqn.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/blockMvqn.py index 442ef92e8ed9..69559d4e0cb5 100644 --- a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/blockMvqn.py +++ b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/blockMvqn.py @@ -34,6 +34,7 @@ def __init__( self, settings): horizon = self.settings["horizon"].GetInt() self.alpha = self.settings["alpha"].GetDouble() + self.epsilon = self.settings["epsilon"].GetDouble() self.X_tilde = {} self.X = {} @@ -95,7 +96,7 @@ def UpdateSolution( self, r, x, y, data_name, yResidual,): V[i] = self.X_tilde[data_name][i] - self.X_tilde[data_name][i + 1] V = V.T - self.J_hat[data_name] = self.J[data_name] + (V - self.J[data_name] @ W) @ (np.linalg.pinv(W)) + self.J_hat[data_name] = self.J[data_name] + (V - self.J[data_name] @ W) @ (np.linalg.pinv(W, rcond=self.epsilon)) blockJacobian = (np.eye(row) - self.J_hat[data_name] @ self.J_hat[coupled_data_name]) b = r - self.J_hat[data_name] @ yResidual @@ -120,6 +121,7 @@ def _GetDefaultParameters(cls): this_defaults = KM.Parameters("""{ "horizon" : 15, "alpha" : 1.0, + "epsilon" : 1e-7, "solver_sequence" : [] }""") this_defaults.AddMissingParameters(super()._GetDefaultParameters()) From 86d56ca418c249ac2bcb0ab9beba5f42670e13a8 Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Tue, 14 Nov 2023 16:01:28 +0100 Subject: [PATCH 05/27] simpler python dict indexing --- .gitignore | 3 --- .../python_scripts/convergence_accelerators/blockMvqn.py | 2 +- .../convergence_accelerator_wrapper.py | 8 ++++---- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index d3d88f17ac08..b1c67bd419a0 100644 --- a/.gitignore +++ b/.gitignore @@ -86,6 +86,3 @@ remote_*.md # External downloaded libs (TPL downloaded libs, etc...) external_libraries/tetgen/* - -# Mac folder info files -*.DS_Store diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/blockMvqn.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/blockMvqn.py index 69559d4e0cb5..bcbebfd5e647 100644 --- a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/blockMvqn.py +++ b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/blockMvqn.py @@ -106,7 +106,7 @@ def UpdateSolution( self, r, x, y, data_name, yResidual,): def FinalizeSolutionStep( self ): ## Assign J=J_hat - for _, data_name in enumerate(self.J.keys()): + for data_name in self.J: self.J[data_name] = self.J_hat[data_name].copy() ## Clear the buffer diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py index 3c9462df602a..efa165c0bccc 100644 --- a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py +++ b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py @@ -25,7 +25,7 @@ def __init__(self, self.solver_names_sequence = [] self.coupl_data_names = {} self.input_data = {} - for _, data_name in enumerate(self.interface_data_dict.keys()): + for data_name in self.interface_data_dict: self.solver_names_sequence.append(self.interface_data_dict[data_name].solver_name) self.isBlockAccelerator = True for solverData in settings["solver_sequence"].values(): @@ -57,7 +57,7 @@ def __init__(self, self.gather_scatter_required = {} self.data_comm = {} self.sizes_from_ranks = {} - for _, data_name in enumerate(interface_data_dict.keys()): + for data_name in interface_data_dict: if self.interface_data_dict[data_name].IsDefinedOnThisRank(): conv_acc_supports_dist_data = self.conv_acc.SupportsDistributedData() self.executing_rank[data_name] = conv_acc_supports_dist_data or (self.interface_data_dict[data_name].GetModelPart().GetCommunicator().MyPID() == 0) @@ -71,7 +71,7 @@ def Initialize(self): if self.isBlockAccelerator: self.prev_input_data = {} self.output_data = {} - for _, data_name in enumerate(self.interface_data_dict.keys()): + for data_name in self.interface_data_dict: self.prev_input_data[data_name] = self.interface_data_dict[data_name].GetData() self.output_data[data_name] = self.interface_data_dict[data_name].GetData() @@ -88,7 +88,7 @@ def InitializeNonLinearIteration(self): # Saving the previous data for the computation of the residual # and the computation of the solution update if self.isBlockAccelerator: - for _, data_name in enumerate(self.interface_data_dict.keys()): + for data_name in self.interface_data_dict: interface_data = self.interface_data_dict[data_name] if interface_data.IsDefinedOnThisRank(): self.input_data[data_name] = interface_data.GetData() From a03f19521cf6f858671a76906f18b276693e21e4 Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Tue, 14 Nov 2023 16:08:19 +0100 Subject: [PATCH 06/27] Renaming blockMvqn to block_mvqn --- .../convergence_accelerators/{blockMvqn.py => block_mvqn.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename applications/CoSimulationApplication/python_scripts/convergence_accelerators/{blockMvqn.py => block_mvqn.py} (100%) diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/blockMvqn.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_mvqn.py similarity index 100% rename from applications/CoSimulationApplication/python_scripts/convergence_accelerators/blockMvqn.py rename to applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_mvqn.py From d6ff62eb7755f337faef801b5ba53e12b9e7543f Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Tue, 14 Nov 2023 16:14:39 +0100 Subject: [PATCH 07/27] Adding the IBQNLS convergence accelerator --- .../convergence_accelerators/ibqnls.py | 196 ++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py new file mode 100644 index 000000000000..78d230c35272 --- /dev/null +++ b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py @@ -0,0 +1,196 @@ +## @module blockMvqn +# This module contains the class IBQNLSConvergenceAccelerator +# Author: Tiba Azzeddine +# Date: Nov. 13, 2023 + +# Importing the Kratos Library +import KratosMultiphysics as KM + +# Importing the base class +from KratosMultiphysics.CoSimulationApplication.base_classes.co_simulation_convergence_accelerator import CoSimulationConvergenceAccelerator + +# CoSimulation imports +import KratosMultiphysics.CoSimulationApplication.co_simulation_tools as cs_tools + +# Other imports +import numpy as np +from copy import deepcopy +from collections import deque +import scipy as sp + + +def Create(settings): + cs_tools.SettingsTypeCheck(settings) + return IBQNLSConvergenceAccelerator(settings) + +## Class IBQNLSConvergenceAccelerator. +# This class contains the implementation of the IBQNLS method and helper functions. +# Reference: Vierendeels J, Lanoye L, Degroote J, Verdonck PR - Implicit coupling of partitioned fluid–structure interaction +# problems with reduced order models. Comput Struct (2007) +class IBQNLSConvergenceAccelerator(CoSimulationConvergenceAccelerator): + def __init__( self, settings): + super().__init__(settings) + + horizon = self.settings["iteration_horizon"].GetInt() + timestep_horizon = self.settings["timestep_horizon"].GetInt() + self.alpha = self.settings["alpha"].GetDouble() + self.gmres_rel_tol = self.settings["gmres_rel_tol"].GetDouble() + self.gmres_abs_tol = self.settings["gmres_abs_tol"].GetDouble() + self.q = timestep_horizon - 1 + + self.X_tilde = {} + self.prevX_tilde = None + self.X = {} + self.v_old_matrices = {} + self.w_old_matrices = {} + self.coupl_data_names = {} + self.V_old = {} + self.W_old = {} + self.W_new = {} + self.V_new = {} + self.previousV = None + self.previousQ = None + self.previousR = None + + for solverData in settings["solver_sequence"].values(): + self.X_tilde[solverData["data_name"].GetString()] = deque( maxlen = horizon ) + self.X[solverData["data_name"].GetString()] = deque( maxlen = horizon ) + self.v_old_matrices[solverData["data_name"].GetString()] = deque( maxlen = self.q ) + self.w_old_matrices[solverData["data_name"].GetString()] = deque( maxlen = self.q ) + self.V_old[solverData["data_name"].GetString()] = [] + self.W_old[solverData["data_name"].GetString()] = [] + self.V_new[solverData["data_name"].GetString()] = [] + self.W_new[solverData["data_name"].GetString()] = [] + self.coupl_data_names[solverData["data_name"].GetString()] = solverData["coupled_data_name"].GetString() + + ## UpdateSolution(r, x, y, data_name, yResidual) + # @param r residual r_k + # @param x solution x_k + # @param y (coupled solver) solution y_k + # @param data_name coupling variable + # @param yResidual (coupled solver) residual yResidual + # Computes the approximated update in each iteration. + def UpdateSolution( self, r, x, y, data_name, yResidual,): + + coupled_data_name = self.coupl_data_names[data_name] + self.X_tilde[data_name].appendleft( deepcopy(r + x) ) + self.X[coupled_data_name].appendleft( deepcopy(y) ) + + col = len(self.X[coupled_data_name]) - 1 + row = len(r) + rowY = len(y) + k = col + if self.echo_level > 3: + cs_tools.cs_print_info(self._ClassName(), "Number of new modes: ", col ) + + isFirstDt = (self.V_old[data_name] == [] and self.W_old [data_name] == []) + isFirstiter = (k == 0) + # ================== First time step ================================================== + if isFirstDt: + # ------------------ First iteration (First time step) --------------------- + if isFirstiter: + return self.alpha * r # Initial acceleration to be a constant relaxation + + # ------------------ First iteration (Other time steps) ------------------------ + if isFirstiter: + V = self.V_old[data_name] + W = self.W_old[data_name] + + else: + ## Construct matrix W(differences of intermediate solutions x) + self.W_new[data_name] = np.empty( shape = (col, rowY) ) # will be transposed later + for i in range(0, col): + self.W_new[data_name][i] = self.X[coupled_data_name][i] - self.X[coupled_data_name][i + 1] + self.W_new[data_name] = self.W_new[data_name].T + W = self._augmentedMatrix(self.W_new[data_name], self.W_old[data_name], isFirstDt) + + ## Construct matrix W(differences of intermediate solutions y~) + self.V_new[data_name] = np.empty( shape = (col, row) ) # will be transposed later + for i in range(0, col): + self.V_new[data_name][i] = self.X_tilde[data_name][i] - self.X_tilde[data_name][i + 1] + self.V_new[data_name] = self.V_new[data_name].T + V = self._augmentedMatrix(self.V_new[data_name], self.V_old[data_name], isFirstDt) + + Q, R = np.linalg.qr(W) + ##TODO QR Filtering + b = r - self.pinvProduct(V, Q, R, yResidual) + + if self.previousQ is not None: + ## Retrieving previous data for the coupled data jacobian approximation ---------------------------------------- + previousQ = self.previousQ + previousR = self.previousR + if self.previousV is not None: + previousV = self.previousV + else: + if isFirstDt: + previousV = self.V_new[coupled_data_name].copy() + else: + previousV = np.hstack((self.V_new[coupled_data_name].copy(), self.V_old[coupled_data_name].copy())) + + ## Matrix-free implementation of the linear solver (and the pseudoinverse) ------------------------------------- + block_oper = lambda vec: vec - self.pinvProduct(V, Q, R, self.pinvProduct(previousV, previousQ, previousR, vec)) + block_x = sp.sparse.linalg.LinearOperator((row, row), block_oper) + delta_x, _ = sp.sparse.linalg.gmres( block_x, b, atol=self.gmres_abs_tol, tol=self.gmres_rel_tol ) + else: + ## Using J = 0 if a previous approximate Jacobian is not available + delta_x = b + + ## Saving data for the approximate jacobian for the next iteration + self.previousQ = Q.copy() + self.previousR = R.copy() + if isFirstiter: # V only needs to be saved completely on the first iteration + self.previousV = V.copy() + else: # Otherwise it can be retrieved from V_new and V_old and memory is freed + self.previousV = None + + return delta_x + + def _augmentedMatrix(self, mat, oldMat, isFirstDt): + if isFirstDt: + return mat.copy() + else: + return np.hstack( (mat, oldMat) ) + + def pinvProduct(self, LHS, Q, R, x): + rhs = Q.T @ x + return LHS @ sp.linalg.solve_triangular(R, rhs) + + def FinalizeSolutionStep( self ): + + for data_name in self.W_new: + + if data_name == list(self.W_new.keys())[-1]: ## Check if last solver in the sequence + # Saving the V matrix for the next (first) iteration to recover the approximate jacobian + if self.V_old[data_name] != []: + self.previousV = np.hstack((self.V_new[data_name].copy(), self.V_old[data_name].copy())) + else: + self.previousV = self.V_new[data_name].copy() + + if self.V_new[data_name] != [] and self.W_new[data_name] != []: + self.v_old_matrices[data_name].appendleft( self.V_new[data_name] ) + self.w_old_matrices[data_name].appendleft( self.W_new[data_name] ) + + if self.w_old_matrices[data_name] and self.v_old_matrices[data_name]: + self.V_old[data_name] = np.concatenate( self.v_old_matrices[data_name], 1 ) + self.W_old[data_name] = np.concatenate( self.w_old_matrices[data_name], 1 ) + + ## Clear the buffer + self.X_tilde[data_name].clear() + self.X[data_name].clear() + + for data_name in self.W_new: + self.W_new[data_name] = [] + self.V_new[data_name] = [] + + @classmethod + def _GetDefaultParameters(cls): + this_defaults = KM.Parameters("""{ + "iteration_horizon" : 15, + "timestep_horizon" : 3, + "alpha" : 1.0, + "gmres_rel_tol" : 1e-5, + "gmres_abs_tol" : 1e-14, + "solver_sequence" : [] + }""") + this_defaults.AddMissingParameters(super()._GetDefaultParameters()) + return this_defaults From 530faf5dd9d39d5b44d424b2fe059802c94f526f Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Tue, 14 Nov 2023 16:17:16 +0100 Subject: [PATCH 08/27] Minor comments --- .../python_scripts/convergence_accelerators/block_mvqn.py | 2 +- .../python_scripts/convergence_accelerators/ibqnls.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_mvqn.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_mvqn.py index bcbebfd5e647..a31f0c477780 100644 --- a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_mvqn.py +++ b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_mvqn.py @@ -1,4 +1,4 @@ -## @module blockMvqn +## @module block_mvqn # This module contains the class MVQNConvergenceAccelerator # Author: Tiba Azzeddine # Date: Nov. 06, 2023 diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py index 78d230c35272..b52b6020b9a7 100644 --- a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py +++ b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py @@ -1,4 +1,4 @@ -## @module blockMvqn +## @module ibqnls # This module contains the class IBQNLSConvergenceAccelerator # Author: Tiba Azzeddine # Date: Nov. 13, 2023 From 4dcc59bacfc25a3aa2b32ae5860dfa1031cc7606 Mon Sep 17 00:00:00 2001 From: azzeddinetiba Date: Wed, 15 Nov 2023 10:20:59 +0100 Subject: [PATCH 09/27] Considering case where only 1 subiteration is performed --- .../python_scripts/convergence_accelerators/ibqnls.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py index b52b6020b9a7..05456f123665 100644 --- a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py +++ b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py @@ -161,8 +161,10 @@ def FinalizeSolutionStep( self ): if data_name == list(self.W_new.keys())[-1]: ## Check if last solver in the sequence # Saving the V matrix for the next (first) iteration to recover the approximate jacobian - if self.V_old[data_name] != []: + if len(self.V_old[data_name]) > 0 and len(self.V_new[data_name]) > 0: self.previousV = np.hstack((self.V_new[data_name].copy(), self.V_old[data_name].copy())) + elif len(self.V_new[data_name]) == 0: + self.previousV = self.V_old[data_name].copy() else: self.previousV = self.V_new[data_name].copy() From f4bb27f8e56504b9c54ea14fdde22bd003cf7506 Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Tue, 19 Dec 2023 01:31:23 +0100 Subject: [PATCH 10/27] Pythonize variable names and simplify distinction btwn ConvergenceAccelerators and BlockConvergenceAccelerators --- .../convergence_accelerators/block_mvqn.py | 18 +- .../convergence_accelerator_wrapper.py | 187 +++++++++++------- .../convergence_accelerators/ibqnls.py | 88 ++++----- .../python_scripts/factories/helpers.py | 27 +-- 4 files changed, 183 insertions(+), 137 deletions(-) diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_mvqn.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_mvqn.py index a31f0c477780..1931e8b7dc12 100644 --- a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_mvqn.py +++ b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_mvqn.py @@ -42,12 +42,12 @@ def __init__( self, settings): self.J_hat = {} self.coupl_data_names = {} - for solverData in settings["solver_sequence"].values(): - self.X_tilde[solverData["data_name"].GetString()] = deque( maxlen = horizon ) - self.X[solverData["data_name"].GetString()] = deque( maxlen = horizon ) - self.J[solverData["data_name"].GetString()] = None # size will be determined when first time get the input vector - self.J_hat[solverData["data_name"].GetString()] = None - self.coupl_data_names[solverData["data_name"].GetString()] = solverData["coupled_data_name"].GetString() + for solver_data in settings["solver_sequence"].values(): + self.X_tilde[solver_data["data_name"].GetString()] = deque( maxlen = horizon ) + self.X[solver_data["data_name"].GetString()] = deque( maxlen = horizon ) + self.J[solver_data["data_name"].GetString()] = None # size will be determined when first time get the input vector + self.J_hat[solver_data["data_name"].GetString()] = None + self.coupl_data_names[solver_data["data_name"].GetString()] = solver_data["coupled_data_name"].GetString() ## UpdateSolution(r, x, y, data_name, yResidual) # @param r residual r_k @@ -84,13 +84,13 @@ def UpdateSolution( self, r, x, y, data_name, yResidual,): b = r - self.J[data_name] @ yResidual return np.linalg.solve( blockJacobian, b ) - ## Construct matrix W(differences of intermediate solutions x) + ## Construct matrix W(differences of intermediate solutions y) W = np.empty( shape = (col, rowY) ) # will be transposed later for i in range(0, col): W[i] = self.X[coupled_data_name][i] - self.X[coupled_data_name][i + 1] W = W.T - ## Construct matrix W(differences of intermediate solutions y~) + ## Construct matrix W(differences of intermediate solutions x~) V = np.empty( shape = (col, row) ) # will be transposed later for i in range(0, col): V[i] = self.X_tilde[data_name][i] - self.X_tilde[data_name][i + 1] @@ -121,7 +121,7 @@ def _GetDefaultParameters(cls): this_defaults = KM.Parameters("""{ "horizon" : 15, "alpha" : 1.0, - "epsilon" : 1e-7, + "epsilon" : 1e-9, "solver_sequence" : [] }""") this_defaults.AddMissingParameters(super()._GetDefaultParameters()) diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py index efa165c0bccc..07e78482d95b 100644 --- a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py +++ b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py @@ -20,20 +20,7 @@ def __init__(self, settings: KratosMultiphysics.Parameters, interface_data_dict: "dict[str,CouplingInterfaceData]", parent_coupled_solver_data_communicator: KratosMultiphysics.DataCommunicator): - if settings.Has("solver_sequence"): - self.interface_data_dict = interface_data_dict - self.solver_names_sequence = [] - self.coupl_data_names = {} - self.input_data = {} - for data_name in self.interface_data_dict: - self.solver_names_sequence.append(self.interface_data_dict[data_name].solver_name) - self.isBlockAccelerator = True - for solverData in settings["solver_sequence"].values(): - self.coupl_data_names[solverData["data_name"].GetString()] = solverData["coupled_data_name"].GetString() - self.yResidual_computation = CreateResidualComputation(settings, interface_data_dict) - else: - self.isBlockAccelerator = False - self.interface_data = interface_data_dict[settings["data_name"].GetString()] + self.interface_data = interface_data_dict[settings["data_name"].GetString()] self.residual_computation = CreateResidualComputation(settings, interface_data_dict) # Remove extra entries from accelerator parameters @@ -44,36 +31,16 @@ def __init__(self, self.conv_acc = CreateConvergenceAccelerator(settings) self.data_communicator = parent_coupled_solver_data_communicator - if not self.isBlockAccelerator: - if self.interface_data.IsDefinedOnThisRank(): - conv_acc_supports_dist_data = self.conv_acc.SupportsDistributedData() - self.executing_rank = conv_acc_supports_dist_data or (self.interface_data.GetModelPart().GetCommunicator().MyPID() == 0) - self.gather_scatter_required = self.interface_data.IsDistributed() and not conv_acc_supports_dist_data - if self.gather_scatter_required: - self.data_comm = self.interface_data.GetModelPart().GetCommunicator().GetDataCommunicator() - self.sizes_from_ranks = np.cumsum(self.data_comm.GatherInts([self.interface_data.Size()], 0)) - else: - self.executing_rank = {} - self.gather_scatter_required = {} - self.data_comm = {} - self.sizes_from_ranks = {} - for data_name in interface_data_dict: - if self.interface_data_dict[data_name].IsDefinedOnThisRank(): - conv_acc_supports_dist_data = self.conv_acc.SupportsDistributedData() - self.executing_rank[data_name] = conv_acc_supports_dist_data or (self.interface_data_dict[data_name].GetModelPart().GetCommunicator().MyPID() == 0) - self.gather_scatter_required[data_name] = self.interface_data_dict[data_name].IsDistributed() and not conv_acc_supports_dist_data - if self.gather_scatter_required[data_name]: - self.data_comm[data_name] = self.interface_data_dict[data_name].GetModelPart().GetCommunicator().GetDataCommunicator() - self.sizes_from_ranks[data_name] = np.cumsum(self.data_comm[data_name].GatherInts([self.interface_data_dict[data_name].Size()], 0)) + if self.interface_data.IsDefinedOnThisRank(): + conv_acc_supports_dist_data = self.conv_acc.SupportsDistributedData() + self.executing_rank = conv_acc_supports_dist_data or (self.interface_data.GetModelPart().GetCommunicator().MyPID() == 0) + self.gather_scatter_required = self.interface_data.IsDistributed() and not conv_acc_supports_dist_data + if self.gather_scatter_required: + self.data_comm = self.interface_data.GetModelPart().GetCommunicator().GetDataCommunicator() + self.sizes_from_ranks = np.cumsum(self.data_comm.GatherInts([self.interface_data.Size()], 0)) def Initialize(self): self.conv_acc.Initialize() - if self.isBlockAccelerator: - self.prev_input_data = {} - self.output_data = {} - for data_name in self.interface_data_dict: - self.prev_input_data[data_name] = self.interface_data_dict[data_name].GetData() - self.output_data[data_name] = self.interface_data_dict[data_name].GetData() def Finalize(self): self.conv_acc.Finalize() @@ -85,23 +52,17 @@ def FinalizeSolutionStep(self): self.conv_acc.FinalizeSolutionStep() def InitializeNonLinearIteration(self): - # Saving the previous data for the computation of the residual - # and the computation of the solution update - if self.isBlockAccelerator: - for data_name in self.interface_data_dict: - interface_data = self.interface_data_dict[data_name] - if interface_data.IsDefinedOnThisRank(): - self.input_data[data_name] = interface_data.GetData() - else: - if self.interface_data.IsDefinedOnThisRank(): - self.input_data = self.interface_data.GetData() + if self.interface_data.IsDefinedOnThisRank(): + # Saving the previous data for the computation of the residual + # and the computation of the solution update + self.input_data = self.interface_data.GetData() self.conv_acc.InitializeNonLinearIteration() def FinalizeNonLinearIteration(self): self.conv_acc.FinalizeNonLinearIteration() - def _ComputeAndApplyUpdate(self,): + def ComputeAndApplyUpdate(self): if not self.interface_data.IsDefinedOnThisRank(): return residual = self.residual_computation.ComputeResidual(self.input_data) @@ -124,7 +85,82 @@ def _ComputeAndApplyUpdate(self,): self.interface_data.SetData(updated_data) - def _ComputeAndApplyBlockUpdate(self, solver_name = None): + def PrintInfo(self): + self.conv_acc.PrintInfo() + + def Check(self): + self.conv_acc.Check() + +class BlockConvergenceAcceleratorWrapper: + """Similar class for wrapping convergence accelerators for block coupling solvers + """ + def __init__(self, + settings: KratosMultiphysics.Parameters, + interface_data_dict: "dict[str,CouplingInterfaceData]", + parent_coupled_solver_data_communicator: KratosMultiphysics.DataCommunicator): + self.interface_data_dict = interface_data_dict + self.solver_names_sequence = [] + self.coupl_data_names = {} + self.input_data = {} + for data_name in self.interface_data_dict: + self.solver_names_sequence.append(self.interface_data_dict[data_name].solver_name) + self.is_block_accelerator = True + for solverData in settings["solver_sequence"].values(): + self.coupl_data_names[solverData["data_name"].GetString()] = solverData["coupled_data_name"].GetString() + self.residual_computation = CreateBlockResidualComputation(settings, interface_data_dict) + + # Remove extra entries from accelerator parameters + for key in ("data_name", "solver", "residual_computation"): + if settings.Has(key): + settings.RemoveValue(key) + + self.conv_acc = CreateConvergenceAccelerator(settings) + self.data_communicator = parent_coupled_solver_data_communicator + + self.executing_rank = {} + self.gather_scatter_required = {} + self.data_comm = {} + self.sizes_from_ranks = {} + for data_name in interface_data_dict: + if self.interface_data_dict[data_name].IsDefinedOnThisRank(): + conv_acc_supports_dist_data = self.conv_acc.SupportsDistributedData() + self.executing_rank[data_name] = conv_acc_supports_dist_data or (self.interface_data_dict[data_name].GetModelPart().GetCommunicator().MyPID() == 0) + self.gather_scatter_required[data_name] = self.interface_data_dict[data_name].IsDistributed() and not conv_acc_supports_dist_data + if self.gather_scatter_required[data_name]: + self.data_comm[data_name] = self.interface_data_dict[data_name].GetModelPart().GetCommunicator().GetDataCommunicator() + self.sizes_from_ranks[data_name] = np.cumsum(self.data_comm[data_name].GatherInts([self.interface_data_dict[data_name].Size()], 0)) + + def Initialize(self): + self.conv_acc.Initialize() + self.prev_input_data = {} + self.output_data = {} + for data_name in self.interface_data_dict: + self.prev_input_data[data_name] = self.interface_data_dict[data_name].GetData() + self.output_data[data_name] = self.interface_data_dict[data_name].GetData() + + def Finalize(self): + self.conv_acc.Finalize() + + def InitializeSolutionStep(self): + self.conv_acc.InitializeSolutionStep() + + def FinalizeSolutionStep(self): + self.conv_acc.FinalizeSolutionStep() + + def InitializeNonLinearIteration(self): + # Saving the previous data for the computation of the residual + # and the computation of the solution update + for data_name in self.interface_data_dict: + interface_data = self.interface_data_dict[data_name] + if interface_data.IsDefinedOnThisRank(): + self.input_data[data_name] = interface_data.GetData() + + self.conv_acc.InitializeNonLinearIteration() + + def FinalizeNonLinearIteration(self): + self.conv_acc.FinalizeNonLinearIteration() + + def ComputeAndApplyUpdate(self, solver_name = None): # Defaulting to the first solver in the sequence if solver_name is None: solver_name = self.solver_names_sequence[0] @@ -146,8 +182,8 @@ def _ComputeAndApplyBlockUpdate(self, solver_name = None): if not interface_data.IsDefinedOnThisRank(): return - residual = self.residual_computation.ComputeResidual(input_data, data_name) - yResidual = self.yResidual_computation.ComputeResidual(prev_input_data, coupled_data_name) + residual = self.residual_computation.ComputeResidual(input_data, data_name) # = x~ - x + yResidual = self.residual_computation.ComputeResidual(prev_input_data, coupled_data_name) # = y - y~ input_data_for_acc = input_data input_other_solver = self.output_data[coupled_data_name] @@ -172,12 +208,6 @@ def _ComputeAndApplyBlockUpdate(self, solver_name = None): interface_data.SetData(updated_data) self.output_data[data_name] = updated_data - def ComputeAndApplyUpdate(self, solver_name = None): - if self.isBlockAccelerator: - self._ComputeAndApplyBlockUpdate(solver_name) - else: - self._ComputeAndApplyUpdate() - def PrintInfo(self): self.conv_acc.PrintInfo() @@ -188,22 +218,26 @@ class ConvergenceAcceleratorResidual(metaclass=ABCMeta): @abstractmethod def ComputeResidual(self, input_data, data_name=None): pass +class DataDifferenceBlockResidual(ConvergenceAcceleratorResidual): + def __init__(self, + settings: KratosMultiphysics.Parameters, + interface_data_dict: "dict[str,CouplingInterfaceData]"): + + self.interface_data_dict = interface_data_dict + self.is_block_residual_computer = True + + def ComputeResidual(self, input_data, data_name=None): + return self.interface_data_dict[data_name].GetData() - input_data + class DataDifferenceResidual(ConvergenceAcceleratorResidual): def __init__(self, settings: KratosMultiphysics.Parameters, interface_data_dict: "dict[str,CouplingInterfaceData]"): - if settings.Has("solver_sequence"): - self.interface_data_dict = interface_data_dict - self.isBlockResidualComputer = True - else: - self.isBlockResidualComputer = False - self.interface_data = interface_data_dict[settings["data_name"].GetString()] + self.is_block_residual_computer = False + self.interface_data = interface_data_dict[settings["data_name"].GetString()] def ComputeResidual(self, input_data, data_name=None): - if self.isBlockResidualComputer: - return self.interface_data_dict[data_name].GetData() - input_data - else: - return self.interface_data.GetData() - input_data + return self.interface_data.GetData() - input_data class DifferentDataDifferenceResidual(ConvergenceAcceleratorResidual): def __init__(self, @@ -216,6 +250,17 @@ def __init__(self, def ComputeResidual(self, input_data): return self.interface_data1.GetData() - self.interface_data2.GetData() +def CreateBlockResidualComputation(settings: KratosMultiphysics.Parameters, + interface_data_dict: "dict[str,CouplingInterfaceData]"): + residual_computation_type = "data_difference" + if settings.Has("residual_computation"): + residual_computation_type = settings["residual_computation"]["type"].GetString() + + if residual_computation_type == "data_difference": + return DataDifferenceBlockResidual(settings, interface_data_dict) + else: + raise Exception('The specified residual computation "{}" is not available!'.format(residual_computation_type)) + def CreateResidualComputation(settings: KratosMultiphysics.Parameters, interface_data_dict: "dict[str,CouplingInterfaceData]"): residual_computation_type = "data_difference" diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py index 05456f123665..55a755f3b13a 100644 --- a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py +++ b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py @@ -48,20 +48,20 @@ def __init__( self, settings): self.W_old = {} self.W_new = {} self.V_new = {} - self.previousV = None - self.previousQ = None - self.previousR = None - - for solverData in settings["solver_sequence"].values(): - self.X_tilde[solverData["data_name"].GetString()] = deque( maxlen = horizon ) - self.X[solverData["data_name"].GetString()] = deque( maxlen = horizon ) - self.v_old_matrices[solverData["data_name"].GetString()] = deque( maxlen = self.q ) - self.w_old_matrices[solverData["data_name"].GetString()] = deque( maxlen = self.q ) - self.V_old[solverData["data_name"].GetString()] = [] - self.W_old[solverData["data_name"].GetString()] = [] - self.V_new[solverData["data_name"].GetString()] = [] - self.W_new[solverData["data_name"].GetString()] = [] - self.coupl_data_names[solverData["data_name"].GetString()] = solverData["coupled_data_name"].GetString() + self.previous_V = None + self.previous_Q = None + self.previous_R = None + + for solver_data in settings["solver_sequence"].values(): + self.X_tilde[solver_data["data_name"].GetString()] = deque( maxlen = horizon ) + self.X[solver_data["data_name"].GetString()] = deque( maxlen = horizon ) + self.v_old_matrices[solver_data["data_name"].GetString()] = deque( maxlen = self.q ) + self.w_old_matrices[solver_data["data_name"].GetString()] = deque( maxlen = self.q ) + self.V_old[solver_data["data_name"].GetString()] = [] + self.W_old[solver_data["data_name"].GetString()] = [] + self.V_new[solver_data["data_name"].GetString()] = [] + self.W_new[solver_data["data_name"].GetString()] = [] + self.coupl_data_names[solver_data["data_name"].GetString()] = solver_data["coupled_data_name"].GetString() ## UpdateSolution(r, x, y, data_name, yResidual) # @param r residual r_k @@ -83,16 +83,16 @@ def UpdateSolution( self, r, x, y, data_name, yResidual,): if self.echo_level > 3: cs_tools.cs_print_info(self._ClassName(), "Number of new modes: ", col ) - isFirstDt = (self.V_old[data_name] == [] and self.W_old [data_name] == []) - isFirstiter = (k == 0) + is_first_dt = (self.V_old[data_name] == [] and self.W_old [data_name] == []) + is_first_iter = (k == 0) # ================== First time step ================================================== - if isFirstDt: + if is_first_dt: # ------------------ First iteration (First time step) --------------------- - if isFirstiter: + if is_first_iter: return self.alpha * r # Initial acceleration to be a constant relaxation # ------------------ First iteration (Other time steps) ------------------------ - if isFirstiter: + if is_first_iter: V = self.V_old[data_name] W = self.W_old[data_name] @@ -102,33 +102,33 @@ def UpdateSolution( self, r, x, y, data_name, yResidual,): for i in range(0, col): self.W_new[data_name][i] = self.X[coupled_data_name][i] - self.X[coupled_data_name][i + 1] self.W_new[data_name] = self.W_new[data_name].T - W = self._augmentedMatrix(self.W_new[data_name], self.W_old[data_name], isFirstDt) + W = self._augmented_matrix(self.W_new[data_name], self.W_old[data_name], is_first_dt) ## Construct matrix W(differences of intermediate solutions y~) self.V_new[data_name] = np.empty( shape = (col, row) ) # will be transposed later for i in range(0, col): self.V_new[data_name][i] = self.X_tilde[data_name][i] - self.X_tilde[data_name][i + 1] self.V_new[data_name] = self.V_new[data_name].T - V = self._augmentedMatrix(self.V_new[data_name], self.V_old[data_name], isFirstDt) + V = self._augmented_matrix(self.V_new[data_name], self.V_old[data_name], is_first_dt) Q, R = np.linalg.qr(W) ##TODO QR Filtering - b = r - self.pinvProduct(V, Q, R, yResidual) + b = r - self.pinv_product(V, Q, R, yResidual) - if self.previousQ is not None: + if self.previous_Q is not None: ## Retrieving previous data for the coupled data jacobian approximation ---------------------------------------- - previousQ = self.previousQ - previousR = self.previousR - if self.previousV is not None: - previousV = self.previousV + previous_Q = self.previous_Q + previous_R = self.previous_R + if self.previous_V is not None: + previous_V = self.previous_V else: - if isFirstDt: - previousV = self.V_new[coupled_data_name].copy() + if is_first_dt: + previous_V = self.V_new[coupled_data_name].copy() else: - previousV = np.hstack((self.V_new[coupled_data_name].copy(), self.V_old[coupled_data_name].copy())) + previous_V = np.hstack((self.V_new[coupled_data_name].copy(), self.V_old[coupled_data_name].copy())) ## Matrix-free implementation of the linear solver (and the pseudoinverse) ------------------------------------- - block_oper = lambda vec: vec - self.pinvProduct(V, Q, R, self.pinvProduct(previousV, previousQ, previousR, vec)) + block_oper = lambda vec: vec - self.pinv_product(V, Q, R, self.pinv_product(previous_V, previous_Q, previous_R, vec)) block_x = sp.sparse.linalg.LinearOperator((row, row), block_oper) delta_x, _ = sp.sparse.linalg.gmres( block_x, b, atol=self.gmres_abs_tol, tol=self.gmres_rel_tol ) else: @@ -136,22 +136,22 @@ def UpdateSolution( self, r, x, y, data_name, yResidual,): delta_x = b ## Saving data for the approximate jacobian for the next iteration - self.previousQ = Q.copy() - self.previousR = R.copy() - if isFirstiter: # V only needs to be saved completely on the first iteration - self.previousV = V.copy() + self.previous_Q = Q.copy() + self.previous_R = R.copy() + if is_first_iter: # V only needs to be saved completely on the first iteration + self.previous_V = V.copy() else: # Otherwise it can be retrieved from V_new and V_old and memory is freed - self.previousV = None + self.previous_V = None return delta_x - def _augmentedMatrix(self, mat, oldMat, isFirstDt): - if isFirstDt: + def _augmented_matrix(self, mat, old_mat, is_first_dt): + if is_first_dt: return mat.copy() else: - return np.hstack( (mat, oldMat) ) + return np.hstack( (mat, old_mat) ) - def pinvProduct(self, LHS, Q, R, x): + def pinv_product(self, LHS, Q, R, x): rhs = Q.T @ x return LHS @ sp.linalg.solve_triangular(R, rhs) @@ -161,12 +161,10 @@ def FinalizeSolutionStep( self ): if data_name == list(self.W_new.keys())[-1]: ## Check if last solver in the sequence # Saving the V matrix for the next (first) iteration to recover the approximate jacobian - if len(self.V_old[data_name]) > 0 and len(self.V_new[data_name]) > 0: - self.previousV = np.hstack((self.V_new[data_name].copy(), self.V_old[data_name].copy())) - elif len(self.V_new[data_name]) == 0: - self.previousV = self.V_old[data_name].copy() + if self.V_old[data_name] != []: + self.previous_V = np.hstack((self.V_new[data_name].copy(), self.V_old[data_name].copy())) else: - self.previousV = self.V_new[data_name].copy() + self.previous_V = self.V_new[data_name].copy() if self.V_new[data_name] != [] and self.W_new[data_name] != []: self.v_old_matrices[data_name].appendleft( self.V_new[data_name] ) diff --git a/applications/CoSimulationApplication/python_scripts/factories/helpers.py b/applications/CoSimulationApplication/python_scripts/factories/helpers.py index a53f3e7fc2ca..4ee511fd8417 100644 --- a/applications/CoSimulationApplication/python_scripts/factories/helpers.py +++ b/applications/CoSimulationApplication/python_scripts/factories/helpers.py @@ -4,7 +4,7 @@ # CoSimulation imports from KratosMultiphysics.CoSimulationApplication.factories.coupling_operation_factory import CreateCouplingOperation from KratosMultiphysics.CoSimulationApplication.factories.data_transfer_operator_factory import CreateDataTransferOperator -from KratosMultiphysics.CoSimulationApplication.convergence_accelerators.convergence_accelerator_wrapper import ConvergenceAcceleratorWrapper +from KratosMultiphysics.CoSimulationApplication.convergence_accelerators.convergence_accelerator_wrapper import ConvergenceAcceleratorWrapper, BlockConvergenceAcceleratorWrapper from KratosMultiphysics.CoSimulationApplication.convergence_criteria.convergence_criteria_wrapper import ConvergenceCriteriaWrapper from KratosMultiphysics.CoSimulationApplication.factories.convergence_criterion_factory import CreateConvergenceCriterion from KratosMultiphysics.CoSimulationApplication.factories.predictor_factory import CreatePredictor @@ -34,19 +34,22 @@ def CreateConvergenceAccelerators(convergence_accelerator_settings_list: KM.Para parent_echo_level: int): convergence_accelerators = [] for conv_acc_settings in convergence_accelerator_settings_list.values(): - if conv_acc_settings.Has("solver"): - solver = solvers[conv_acc_settings["solver"].GetString()] - interface_data_dict = solver.data_dict - else: + AddEchoLevelToSettings(conv_acc_settings, parent_echo_level) + if conv_acc_settings["type"].GetString().startswith('block_'): interface_data_dict = {} - for sequenceData in conv_acc_settings["solver_sequence"].values(): - solver = solvers[sequenceData["solver"].GetString()] - data_name = sequenceData["data_name"].GetString() + for sequence_data in conv_acc_settings["solver_sequence"].values(): + solver = solvers[sequence_data["solver"].GetString()] + data_name = sequence_data["data_name"].GetString() interface_data_dict[data_name] = solver.data_dict[data_name] - AddEchoLevelToSettings(conv_acc_settings, parent_echo_level) - convergence_accelerators.append(ConvergenceAcceleratorWrapper(conv_acc_settings, - interface_data_dict, - parent_data_communicator)) + convergence_accelerators.append(BlockConvergenceAcceleratorWrapper(conv_acc_settings, + interface_data_dict, + parent_data_communicator)) + else: + solver = solvers[conv_acc_settings["solver"].GetString()] + interface_data_dict = solver.data_dict + convergence_accelerators.append(ConvergenceAcceleratorWrapper(conv_acc_settings, + interface_data_dict, + parent_data_communicator)) return convergence_accelerators From 8d6fbfe95f7924c016cc549d779936600cead73e Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Tue, 19 Dec 2023 01:55:20 +0100 Subject: [PATCH 11/27] Allow block accelerators of acting on fields not necessarily those most recently updated (e.g fluid mesh displ.) --- .../convergence_accelerator_wrapper.py | 15 ++++++--------- .../coupled_solvers/block_solver.py | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py index 07e78482d95b..c98168ceab0e 100644 --- a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py +++ b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py @@ -99,11 +99,9 @@ def __init__(self, interface_data_dict: "dict[str,CouplingInterfaceData]", parent_coupled_solver_data_communicator: KratosMultiphysics.DataCommunicator): self.interface_data_dict = interface_data_dict - self.solver_names_sequence = [] + self.current_solver_id = None self.coupl_data_names = {} self.input_data = {} - for data_name in self.interface_data_dict: - self.solver_names_sequence.append(self.interface_data_dict[data_name].solver_name) self.is_block_accelerator = True for solverData in settings["solver_sequence"].values(): self.coupl_data_names[solverData["data_name"].GetString()] = solverData["coupled_data_name"].GetString() @@ -132,6 +130,7 @@ def __init__(self, def Initialize(self): self.conv_acc.Initialize() + self.current_solver_id = 0 self.prev_input_data = {} self.output_data = {} for data_name in self.interface_data_dict: @@ -159,14 +158,11 @@ def InitializeNonLinearIteration(self): def FinalizeNonLinearIteration(self): self.conv_acc.FinalizeNonLinearIteration() + self.current_solver_id = 0 - def ComputeAndApplyUpdate(self, solver_name = None): - # Defaulting to the first solver in the sequence - if solver_name is None: - solver_name = self.solver_names_sequence[0] - + def ComputeAndApplyUpdate(self): # Retrieving solver and data names - solver_id = self.solver_names_sequence.index(solver_name) + solver_id = self.current_solver_id data_name, interface_data = list(self.interface_data_dict.items())[solver_id] interface_data = self.interface_data_dict[data_name] coupled_data_name = self.coupl_data_names[data_name] @@ -207,6 +203,7 @@ def ComputeAndApplyUpdate(self, solver_name = None): interface_data.SetData(updated_data) self.output_data[data_name] = updated_data + self.current_solver_id += 1 def PrintInfo(self): self.conv_acc.PrintInfo() diff --git a/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_solver.py b/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_solver.py index 895cdd34c263..fc68b331a250 100644 --- a/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_solver.py +++ b/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_solver.py @@ -36,7 +36,7 @@ def SolveSolutionStep(self): # Apply relaxation for each solver output for conv_acc in self.convergence_accelerators_list: - conv_acc.ComputeAndApplyUpdate(solver_name) + conv_acc.ComputeAndApplyUpdate() for coupling_op in self.coupling_operations_dict.values(): coupling_op.FinalizeCouplingIteration() From 4f3576d642beee7cbadca3216f4e0790455c0c57 Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Tue, 19 Dec 2023 02:08:16 +0100 Subject: [PATCH 12/27] Rename IBQNLS Accelerator class --- .../python_scripts/convergence_accelerators/ibqnls.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py index 55a755f3b13a..3be562320411 100644 --- a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py +++ b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py @@ -21,13 +21,13 @@ def Create(settings): cs_tools.SettingsTypeCheck(settings) - return IBQNLSConvergenceAccelerator(settings) + return BLOCKIBQNLSConvergenceAccelerator(settings) -## Class IBQNLSConvergenceAccelerator. +## Class BLOCKIBQNLSConvergenceAccelerator. # This class contains the implementation of the IBQNLS method and helper functions. # Reference: Vierendeels J, Lanoye L, Degroote J, Verdonck PR - Implicit coupling of partitioned fluid–structure interaction # problems with reduced order models. Comput Struct (2007) -class IBQNLSConvergenceAccelerator(CoSimulationConvergenceAccelerator): +class BLOCKIBQNLSConvergenceAccelerator(CoSimulationConvergenceAccelerator): def __init__( self, settings): super().__init__(settings) From 737c4ef602b30cb78524afdcca64b801387f2b78 Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Tue, 19 Dec 2023 02:09:28 +0100 Subject: [PATCH 13/27] Rename IBQNLS accelerator file --- .../convergence_accelerators/{ibqnls.py => block_ibqnls.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename applications/CoSimulationApplication/python_scripts/convergence_accelerators/{ibqnls.py => block_ibqnls.py} (100%) diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_ibqnls.py similarity index 100% rename from applications/CoSimulationApplication/python_scripts/convergence_accelerators/ibqnls.py rename to applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_ibqnls.py From 80391b5fd2e56f4ea5d8cf7edc1d8513c0402027 Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Tue, 19 Dec 2023 02:27:35 +0100 Subject: [PATCH 14/27] Rename block solver class --- .../python_scripts/coupled_solvers/block_solver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_solver.py b/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_solver.py index fc68b331a250..cba338f4808d 100644 --- a/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_solver.py +++ b/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_solver.py @@ -10,9 +10,9 @@ import KratosMultiphysics.CoSimulationApplication.colors as colors def Create(settings, models, solver_name): - return BlockSolver(settings, models, solver_name) + return BlockGaussSeidelStrongCoupledSolver(settings, models, solver_name) -class BlockSolver(GaussSeidelStrongCoupledSolver): +class BlockGaussSeidelStrongCoupledSolver(GaussSeidelStrongCoupledSolver): def SolveSolutionStep(self): for k in range(self.num_coupling_iterations): self.process_info[KratosCoSim.COUPLING_ITERATION_NUMBER] += 1 From 29bcf5f6e5f582f6326ad9bc3f7cbdfb077fc04f Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Tue, 19 Dec 2023 02:28:44 +0100 Subject: [PATCH 15/27] Rename block solver file --- .../{block_solver.py => block_gauss_seidel_strong.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename applications/CoSimulationApplication/python_scripts/coupled_solvers/{block_solver.py => block_gauss_seidel_strong.py} (100%) diff --git a/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_solver.py b/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_gauss_seidel_strong.py similarity index 100% rename from applications/CoSimulationApplication/python_scripts/coupled_solvers/block_solver.py rename to applications/CoSimulationApplication/python_scripts/coupled_solvers/block_gauss_seidel_strong.py From 4b247e6cd56a2805ab7ae6c994f3946a3e185163 Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Thu, 21 Dec 2023 15:54:42 +0100 Subject: [PATCH 16/27] Rename the block coupled solver --- .../coupled_solvers/block_gauss_seidel_strong.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_gauss_seidel_strong.py b/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_gauss_seidel_strong.py index cba338f4808d..4c27af785bc1 100644 --- a/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_gauss_seidel_strong.py +++ b/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_gauss_seidel_strong.py @@ -10,9 +10,9 @@ import KratosMultiphysics.CoSimulationApplication.colors as colors def Create(settings, models, solver_name): - return BlockGaussSeidelStrongCoupledSolver(settings, models, solver_name) + return BlockIterativeStrongCoupledSolver(settings, models, solver_name) -class BlockGaussSeidelStrongCoupledSolver(GaussSeidelStrongCoupledSolver): +class BlockIterativeStrongCoupledSolver(GaussSeidelStrongCoupledSolver): def SolveSolutionStep(self): for k in range(self.num_coupling_iterations): self.process_info[KratosCoSim.COUPLING_ITERATION_NUMBER] += 1 From 16bb51c40e3ac6dfc9dc233dcba874d6d62f9ecc Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Thu, 21 Dec 2023 15:55:25 +0100 Subject: [PATCH 17/27] Rename the block coupled solver file --- .../{block_gauss_seidel_strong.py => block_iterative_strong.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename applications/CoSimulationApplication/python_scripts/coupled_solvers/{block_gauss_seidel_strong.py => block_iterative_strong.py} (100%) diff --git a/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_gauss_seidel_strong.py b/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_iterative_strong.py similarity index 100% rename from applications/CoSimulationApplication/python_scripts/coupled_solvers/block_gauss_seidel_strong.py rename to applications/CoSimulationApplication/python_scripts/coupled_solvers/block_iterative_strong.py From cd248bf2626bb07770ffec133fe4c753712908e3 Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Thu, 21 Dec 2023 16:08:49 +0100 Subject: [PATCH 18/27] f-strings for the Exception --- .../convergence_accelerator_wrapper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py index c98168ceab0e..d35392f575c0 100644 --- a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py +++ b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py @@ -256,7 +256,7 @@ def CreateBlockResidualComputation(settings: KratosMultiphysics.Parameters, if residual_computation_type == "data_difference": return DataDifferenceBlockResidual(settings, interface_data_dict) else: - raise Exception('The specified residual computation "{}" is not available!'.format(residual_computation_type)) + raise Exception(f'The specified residual computation "{residual_computation_type}" is not available!') def CreateResidualComputation(settings: KratosMultiphysics.Parameters, interface_data_dict: "dict[str,CouplingInterfaceData]"): @@ -269,4 +269,4 @@ def CreateResidualComputation(settings: KratosMultiphysics.Parameters, elif residual_computation_type == "different_data_difference": return DifferentDataDifferenceResidual(settings, interface_data_dict) else: - raise Exception('The specified residual computation "{}" is not available!'.format(residual_computation_type)) + raise Exception(f'The specified residual computation "{residual_computation_type}" is not available!') From 9c29bf830d5369a22880076c8edfe2e3dfa95401 Mon Sep 17 00:00:00 2001 From: azzeddinetiba Date: Thu, 21 Dec 2023 16:50:39 +0000 Subject: [PATCH 19/27] Fix initialization if distributed --- .../convergence_accelerator_wrapper.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py index d35392f575c0..70242cc1ee84 100644 --- a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py +++ b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/convergence_accelerator_wrapper.py @@ -134,8 +134,9 @@ def Initialize(self): self.prev_input_data = {} self.output_data = {} for data_name in self.interface_data_dict: - self.prev_input_data[data_name] = self.interface_data_dict[data_name].GetData() - self.output_data[data_name] = self.interface_data_dict[data_name].GetData() + if self.interface_data_dict[data_name].IsDefinedOnThisRank(): + self.prev_input_data[data_name] = self.interface_data_dict[data_name].GetData() + self.output_data[data_name] = self.interface_data_dict[data_name].GetData() def Finalize(self): self.conv_acc.Finalize() @@ -167,6 +168,8 @@ def ComputeAndApplyUpdate(self): interface_data = self.interface_data_dict[data_name] coupled_data_name = self.coupl_data_names[data_name] + if not interface_data.IsDefinedOnThisRank(): return + # Data Comm executing_rank = self.executing_rank[data_name] gather_scatter_required = self.gather_scatter_required[data_name] @@ -176,8 +179,6 @@ def ComputeAndApplyUpdate(self): self.prev_input_data[data_name] = interface_data.GetData() prev_input_data = self.prev_input_data[coupled_data_name] - if not interface_data.IsDefinedOnThisRank(): return - residual = self.residual_computation.ComputeResidual(input_data, data_name) # = x~ - x yResidual = self.residual_computation.ComputeResidual(prev_input_data, coupled_data_name) # = y - y~ From 4107083c226c1ade00aa5962ef52e3f71134ca82 Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Fri, 22 Dec 2023 17:49:30 +0100 Subject: [PATCH 20/27] Add tests for block convergence accelerators --- .../cosim_mok_fsi_block_parameters.json | 132 +++++++++ ..._mok_cfd_results_disp_ref_block_ibqnls.dat | 153 +++++++++++ ...si_mok_cfd_results_disp_ref_block_mvqn.dat | 153 +++++++++++ ...mok_cfd_results_fluid_ref_block_ibqnls.dat | 153 +++++++++++ ...i_mok_cfd_results_fluid_ref_block_mvqn.dat | 153 +++++++++++ .../test_block_convergence_accelerators.py | 252 ++++++++++++++++++ .../tests/test_mok_fsi.py | 25 ++ 7 files changed, 1021 insertions(+) create mode 100644 applications/CoSimulationApplication/tests/fsi_mok/cosim_mok_fsi_block_parameters.json create mode 100644 applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_disp_ref_block_ibqnls.dat create mode 100644 applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_disp_ref_block_mvqn.dat create mode 100644 applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_fluid_ref_block_ibqnls.dat create mode 100644 applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_fluid_ref_block_mvqn.dat create mode 100644 applications/CoSimulationApplication/tests/test_block_convergence_accelerators.py diff --git a/applications/CoSimulationApplication/tests/fsi_mok/cosim_mok_fsi_block_parameters.json b/applications/CoSimulationApplication/tests/fsi_mok/cosim_mok_fsi_block_parameters.json new file mode 100644 index 000000000000..373f9e65795d --- /dev/null +++ b/applications/CoSimulationApplication/tests/fsi_mok/cosim_mok_fsi_block_parameters.json @@ -0,0 +1,132 @@ +{ + "problem_data" : + { + "start_time" : 0.0, + "end_time" : 15.0, + "echo_level" : 0, + "print_colors" : true, + "parallel_type" : "OpenMP" + }, + "solver_settings" : + { + "type" : "coupled_solvers.block_iterative_strong", + "echo_level" : 1, + "num_coupling_iterations" : 12, + "predictors" : [ + { + "type" : "linear", + "solver" : "structure", + "data_name" : "load" + } + ], + "convergence_accelerators" : [ + { + "type" : "block_mvqn", + "solver_sequence" : + [ + { + "solver": "fluid", + "data_name" : "disp", + "coupled_data_name" : "load" + }, + { + "solver": "structure", + "data_name" : "load", + "coupled_data_name" : "disp" + } + ] + } + ], + "convergence_criteria" : [ + { + "type" : "relative_norm_previous_residual", + "solver" : "structure", + "data_name" : "load", + "abs_tolerance" : 1e-5, + "rel_tolerance" : 1e-5 + } + ], + "data_transfer_operators" : { + "mapper" : { + "type" : "kratos_mapping", + "mapper_settings" : { + "mapper_type" : "nearest_neighbor" + } + } + }, + "coupling_sequence": + [ + { + "name": "structure", + "input_data_list": [], + "output_data_list": [ + { + "data" : "disp", + "to_solver" : "fluid", + "to_solver_data" : "disp", + "data_transfer_operator" : "mapper" + } + ] + }, + { + "name": "fluid", + "input_data_list" : [], + "output_data_list" : [ + { + "data" : "load", + "to_solver" : "structure", + "to_solver_data" : "load", + "data_transfer_operator" : "mapper", + "data_transfer_operator_options" : ["swap_sign"] + } + ] + } + ], + "solvers" : + { + "fluid": + { + "type" : "solver_wrappers.kratos.fluid_dynamics_wrapper", + "solver_wrapper_settings" : { + "input_file" : "fsi_mok/ProjectParametersCFD" + }, + "data" : { + "disp" : { + "model_part_name" : "FluidModelPart.NoSlip2D_FSI", + "dimension" : 2, + "variable_name" : "MESH_DISPLACEMENT" + }, + "load" : { + "model_part_name" : "FluidModelPart.NoSlip2D_FSI", + "dimension" : 2, + "variable_name" : "REACTION" + }, + "velocity" : { + "model_part_name" : "FluidModelPart.NoSlip2D_FSI", + "dimension" : 2, + "variable_name" : "VELOCITY" + } + } + }, + "structure" : + { + "type" : "solver_wrappers.kratos.structural_mechanics_wrapper", + "solver_wrapper_settings" : { + "input_file" : "fsi_mok/ProjectParametersCSM" + }, + "data" : { + "disp" : { + "model_part_name" : "Structure.GENERIC_FSI", + "dimension" : 2, + "variable_name" : "DISPLACEMENT" + }, + "load" : { + "model_part_name" : "Structure.GENERIC_FSI", + "dimension" : 2, + "variable_name" : "POINT_LOAD" + } + } + } + } + } +} diff --git a/applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_disp_ref_block_ibqnls.dat b/applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_disp_ref_block_ibqnls.dat new file mode 100644 index 000000000000..998b7a9d2733 --- /dev/null +++ b/applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_disp_ref_block_ibqnls.dat @@ -0,0 +1,153 @@ +# Results for "node" with Id # 111 for search config "initial" at position: x0: 0.5; y0: 0.25; z0: 0 +# time MESH_DISPLACEMENT_X MESH_DISPLACEMENT_Y MESH_VELOCITY_X MESH_VELOCITY_Y +0.1 5.835438530470173e-07 -9.53462188678036e-09 1.104935106361216e-05 -1.8053721915797127e-07 +0.2 3.848086275244397e-06 -3.144967113902097e-08 5.2676857632495934e-05 -2.656691197032157e-07 +0.30000000000000004 1.364895413109497e-05 -1.1091593172945027e-07 0.00014109943659910339 -1.269976152464144e-06 +0.4 3.4619312160944814e-05 -3.364648514223643e-07 0.00027624009760456134 -3.2022254726374953e-06 +0.5 7.111712952629333e-05 -7.861726602038276e-07 0.00045195107595034874 -5.76609619150442e-06 +0.6 0.00012646560983440458 -1.5185490031586013e-06 0.0006539794690689225 -8.858177452469857e-06 +0.7 0.0002029014952374357 -2.5698756890913868e-06 0.0008739866949353711 -1.2162245323168655e-05 +0.7999999999999999 0.00030225530222719246 -3.978122150866615e-06 0.001112250403710248 -1.5975566168279535e-05 +0.8999999999999999 0.0004262790911296609 -5.794983466962347e-06 0.001367480760666309 -2.0337575842984538e-05 +0.9999999999999999 0.0005767079274926518 -8.091697555331977e-06 0.0016402931317187892 -2.555463071000309e-05 +1.0999999999999999 0.0007552915666187441 -1.0956458570538751e-05 0.0019305964914107657 -3.1698949785979764e-05 +1.2 0.0009632884906700334 -1.4491186061692858e-05 0.0022290777714439004 -3.894408886402414e-05 +1.3 0.001201084276365671 -1.878663820054887e-05 0.0025269388815689557 -4.693583505619585e-05 +1.4000000000000001 0.0014687826396786972 -2.3941113697722942e-05 0.0028268858219638563 -5.6095271996905295e-05 +1.5000000000000002 0.0017650965835556305 -3.0027981373886857e-05 0.0031008880843923408 -6.563527538623315e-05 +1.6000000000000003 0.0020902638454254364 -3.7179927590853796e-05 0.0034006352452620667 -7.728658927267757e-05 +1.7000000000000004 0.0024419251798333875 -4.5446042614236126e-05 0.00363663283330394 -8.811146335410789e-05 +1.8000000000000005 0.002819990719573229 -5.4978630146337604e-05 0.0039209496568916825 -0.00010233043145930012 +1.9000000000000006 0.0032213820746399284 -6.581019444275519e-05 0.00411299953620787 -0.00011447026949274255 +2.0000000000000004 0.0036453509202478713 -7.806565781246057e-05 0.004361662374090256 -0.0001303843433787366 +2.1000000000000005 0.004088015277870279 -9.173827671188514e-05 0.004499062079996725 -0.0001433003400819436 +2.2000000000000006 0.004548159145188296 -0.0001069093447601556 0.004698468086542906 -0.00015985809558303674 +2.3000000000000007 0.005021392350336352 -0.00012352112012109932 0.004774474063062391 -0.00017265470729886559 +2.400000000000001 0.005506266092955636 -0.0001416110351563108 0.004917179436581033 -0.00018888133129863475 +2.500000000000001 0.005998370686653726 -0.0001610764712548643 0.004933478150186438 -0.00020073872538191954 +2.600000000000001 0.006495666523622327 -0.00018187256812654976 0.005007074186577448 -0.0002149717492017381 +2.700000000000001 0.006994078109651525 -0.00020386860041673047 0.00496879179616616 -0.00022522559128695954 +2.800000000000001 0.007491071324114143 -0.00022692410091953115 0.004967105402717148 -0.0002357973616331056 +2.9000000000000012 0.00798318517146741 -0.0002508910025654911 0.004880916578662039 -0.0002437119046096217 +3.0000000000000013 0.008467613921342727 -0.00027554925911523555 0.004805610032153808 -0.0002495284314614009 +3.1000000000000014 0.00894153058868991 -0.0003007491271577164 0.004676274539673416 -0.000254497781798152 +3.2000000000000015 0.009402159653661823 -0.00032620006810952314 0.0045360324496554185 -0.0002547776097686028 +3.3000000000000016 0.009847229907387125 -0.0003517551829654143 0.004367057429687633 -0.00025619647345740727 +3.4000000000000017 0.01027447021785532 -0.00037710896601915526 0.004178432865338458 -0.00025126826395724427 +3.5000000000000018 0.010681970391816857 -0.0004021170110101773 0.0039723799379004845 -0.0002486646105007802 +3.600000000000002 0.011068230815078716 -0.0004264816643372101 0.0037533558254893764 -0.00023907824020281385 +3.700000000000002 0.011431545008020488 -0.00045005665442832794 0.0035139430699820447 -0.00023215908474409944 +3.800000000000002 0.011771703987028462 -0.00047267241947909864 0.0032882130946344412 -0.00022048907125441668 +3.900000000000002 0.01208729917551684 -0.0004941364746858947 0.003025998773470995 -0.00020871468983194778 +4.000000000000002 0.012379030627838088 -0.0005143888186103652 0.002805695738520062 -0.00019638287978024718 +4.100000000000001 0.01264592304775993 -0.0005332528181393522 0.002535682492876717 -0.00018105307521044093 +4.200000000000001 0.01288933309964299 -0.0005507420054709102 0.00232812305959895 -0.00016853359932924916 +4.300000000000001 0.013109101412362021 -0.0005667600947138902 0.002071123095913515 -0.00015209774958312237 +4.4 0.01330742967724664 -0.0005814063097773051 0.0018901932806473368 -0.0001404877089115405 +4.5 0.013484865797539665 -0.0005946611114224035 0.0016624733021763333 -0.00012491588499156128 +4.6 0.013643562465881243 -0.0006066350550586636 0.0015064415572760954 -0.00011421226122474218 +4.699999999999999 0.013784845564396775 -0.0006173809681546769 0.0013220691993613945 -0.00010093826573231537 +4.799999999999999 0.013911259229973164 -0.0006270652430833496 0.001201881527021134 -9.242156855189049e-05 +4.899999999999999 0.01402480912616368 -0.0006358216360037604 0.001070809299314835 -8.284719994630318e-05 +4.999999999999998 0.014127802329362296 -0.0006438004634315213 0.0009860276916488272 -7.651192222422414e-05 +5.099999999999998 0.014222817927112429 -0.0006512009092438539 0.0009143063894248884 -7.147814141713418e-05 +5.1999999999999975 0.014312029613753647 -0.0006581712226287955 0.0008684660099756445 -6.785357133002347e-05 +5.299999999999997 0.014398060288606792 -0.0006649212987987858 0.0008509211949446865 -6.701015112673601e-05 +5.399999999999997 0.01448294412571973 -0.0006716046675533992 0.0008463332939359869 -6.666371864211849e-05 +5.4999999999999964 0.014569389785021298 -0.0006784437601786978 0.000880505215424431 -6.991418465426479e-05 +5.599999999999996 0.014658755889177463 -0.0006855397668190097 0.0009077265096501391 -7.2115926205309e-05 +5.699999999999996 0.014753769803167846 -0.0006931278822887483 0.0009892688034440044 -7.933657513602318e-05 +5.799999999999995 0.014855068027496957 -0.0007012548344622019 0.001039289513880449 -8.345445131376395e-05 +5.899999999999995 0.0149654210492612 -0.0007101731208088425 0.0011629786166501295 -9.44608031197782e-05 +5.999999999999995 0.015084471335155704 -0.000719848585206812 0.0012228167920907784 -9.949692821681038e-05 +6.099999999999994 0.0152145819472994 -0.0007305056756266471 0.0013731099360890764 -0.00011305349451786665 +6.199999999999994 0.015355400788944677 -0.0007421391315553878 0.001449022199995177 -0.000120128081792682 +6.299999999999994 0.015508256288459999 -0.0007548709704136523 0.0016022973047205118 -0.00013399832527689534 +6.399999999999993 0.015672345754988395 -0.000768673930624871 0.0016849141730427954 -0.00014249096185961726 +6.499999999999993 0.01584827297060349 -0.0007835971360734663 0.0018288267205084526 -0.0001556056367305446 +6.5999999999999925 0.016035086854640574 -0.0007996268475100155 0.0019120647562077624 -0.00016527430733581972 +6.699999999999992 0.016232866859948167 -0.0008167562044402986 0.002039874729462957 -0.00017711900113153686 +6.799999999999992 0.016439939322824376 -0.0008349076459198969 0.002105961607298854 -0.0001861183373582612 +6.8999999999999915 0.016656091277441696 -0.0008540473654123664 0.0022136411290196397 -0.00019654371068007437 +6.999999999999991 0.016879560650085584 -0.0008740945127086914 0.002260051786479788 -0.0002045674146028855 +7.099999999999991 0.017109574771366685 -0.0008949469071602057 0.002337413288481369 -0.00021244656095181671 +7.19999999999999 0.017344123898788588 -0.0009164957877422841 0.0023574955546382 -0.00021863465097686748 +7.29999999999999 0.017582110857853477 -0.0009385919507808523 0.0024000007625173464 -0.0002233457883115526 +7.39999999999999 0.017821638001134486 -0.0009611296221754625 0.002393840265063388 -0.00022742868356827577 +7.499999999999989 0.018061287097782545 -0.000983913900030697 0.0023977506407911993 -0.00022842522021151784 +7.599999999999989 0.01829923741962289 -0.001006835305233427 0.002363736790505655 -0.00022993209088510244 +7.699999999999989 0.018534192476769303 -0.0010296979857929683 0.0023344767045562023 -0.00022755754805481255 +7.799999999999988 0.01876422593372605 -0.0010523641528887863 0.0022684807397320653 -0.00022567889322429085 +7.899999999999988 0.018987871384453705 -0.0010746011612934993 0.0022037831641384983 -0.00021933421390668299 +7.999999999999988 0.019203690642412126 -0.0010963166581149997 0.002114165052834296 -0.00021480534824594994 +8.099999999999987 0.01941031555086676 -0.001117280713474046 0.0020182940755203464 -0.0002048249984849589 +8.199999999999987 0.01960645909980725 -0.0011374021458922733 0.001905536532779247 -0.00019737406057544917 +8.299999999999986 0.01979071301221679 -0.001156434263769894 0.0017800195277905952 -0.00018367703664185498 +8.399999999999986 0.019962160685022365 -0.001174317192084297 0.0016491173890023653 -0.0001736716879951008 +8.499999999999986 0.02011971533073217 -0.001190852041309156 0.0015027969399743772 -0.00015745229680776414 +8.599999999999985 0.020262280606822832 -0.0012059287494368927 0.0013487384906598276 -0.0001438290808158099 +8.699999999999985 0.020389335157606322 -0.0012194361231070397 0.0011924220592950587 -0.00012658524848876932 +8.799999999999985 0.020499860137930564 -0.001231259212038288 0.0010190211646765538 -0.00010978487178213803 +8.899999999999984 0.02059365894597487 -0.0012413425544059663 0.0008561280303229478 -9.196238391284489e-05 +8.999999999999984 0.020669750595771086 -0.0012495585145796853 0.0006673667881385314 -7.243274473716564e-05 +9.099999999999984 0.020728111507084323 -0.0012558913682357952 0.0004983266693035264 -5.4135996950494336e-05 +9.199999999999983 0.020767892405047183 -0.0012602182397982286 0.00029935607159593114 -3.260542004475559e-05 +9.299999999999983 0.020789372921946866 -0.0012625866320816435 0.00012817491492866 -1.4517764841152665e-05 +9.399999999999983 0.0207915602211711 -0.0012628390843803907 -8.173083424807381e-05 9.096672192662876e-06 +9.499999999999982 0.020775066895453387 -0.001261096849999988 -0.0002510908989091659 2.6206889446408547e-05 +9.599999999999982 0.020739193387370056 -0.0012572348606012368 -0.00046323391693021466 5.051338913395731e-05 +9.699999999999982 0.020684366002819445 -0.0012513674941774947 -0.0006362982846199459 6.738218739480214e-05 +9.799999999999981 0.020610097988745333 -0.0012433932781109173 -0.0008462414375576207 9.155426259540583e-05 +9.89999999999998 0.020516604371681107 -0.001233414878409524 -0.0010260321200174583 0.00010855413563911888 +9.99999999999998 0.020403674200553456 -0.0012213704931597837 -0.0012305784909844057 0.00013184462134195008 +10.09999999999998 0.020272109658984253 -0.001207426356714322 -0.0014030166312636446 0.00014758503606341944 +10.19999999999998 0.02012388654101062 -0.0011917068291294334 -0.0015616463776495471 0.0001664907362054173 +10.29999999999998 0.01996273941854691 -0.0011747029145369502 -0.0016643895301694913 0.00017429093495481546 +10.399999999999979 0.01979301242959426 -0.0011568738725375905 -0.0017313875480696255 0.0001821128392668407 +10.499999999999979 0.019618729981140507 -0.0011387724650392065 -0.0017563183756636577 0.00018049079902346602 +10.599999999999978 0.01944312368211275 -0.0011206902005055756 -0.0017566756297374376 0.0001808965559762145 +10.699999999999978 0.019268374511103727 -0.0011028981691337844 -0.0017390995350967647 0.00017534372589831935 +10.799999999999978 0.019095703118528515 -0.0010854062452221227 -0.0017145240935097772 0.00017414965833385828 +10.899999999999977 0.018927171376489225 -0.0010684740693921787 -0.001657866428091009 0.00016502616212645338 +10.999999999999977 0.018764170537824434 -0.0010521666778616748 -0.0016016846560013087 0.00016071774435617945 +11.099999999999977 0.01860909313223319 -0.0010367961161973983 -0.001502404180207808 0.00014730650374596035 +11.199999999999976 0.01846258907224665 -0.0010223582433558788 -0.0014257680916451864 0.00014090348679920858 +11.299999999999976 0.018326377316260547 -0.0010090715703223142 -0.0013016169800897039 0.00012547454851842866 +11.399999999999975 0.018199853462955665 -0.000996790621530956 -0.001225377565074354 0.00011945405843599178 +11.499999999999975 0.01808398377436597 -0.000985624497128165 -0.0010958824690118852 0.00010454121662286549 +11.599999999999975 0.0179777325518286 -0.0009754120339336033 -0.0010248849286540363 9.9012020450329e-05 +11.699999999999974 0.017882004308622974 -0.0009662593117336368 -0.0008941068537945628 8.47099068583557e-05 +11.799999999999974 0.01779597775572914 -0.0009580681361711073 -0.0008220163013616177 7.849199709929346e-05 +11.899999999999974 0.01771988908871084 -0.0009508566899886392 -0.0007034720360347995 6.623218535970961e-05 +11.999999999999973 0.017652718168127367 -0.0009445253020135671 -0.0006361371015189345 5.993628918859533e-05 +12.099999999999973 0.017594150648266776 -0.0009390200051740017 -0.000537903655494194 5.0463186696550575e-05 +12.199999999999973 0.01754310987866912 -0.0009342490449498234 -0.00047997216169585186 4.4675337514848726e-05 +12.299999999999972 0.017498891243122178 -0.0009301102459201697 -0.00040603572118629385 3.820897928048036e-05 +12.399999999999972 0.017460660166071604 -0.0009265535367976241 -0.00035678827112656675 3.283658371949007e-05 +12.499999999999972 0.017427552729109518 -0.0009234629430076033 -0.00030590203689922964 2.891579410894892e-05 +12.599999999999971 0.01739908978769836 -0.0009208363319906013 -0.0002627844147012462 2.3703924002008262e-05 +12.69999999999997 0.01737394564915959 -0.0009185011176884758 -0.00023914575839826903 2.2739565092895566e-05 +12.79999999999997 0.017351904904951546 -0.0009164844333049034 -0.0002026315263189978 1.7878510923826065e-05 +12.89999999999997 0.017331556640549473 -0.0009146060136351541 -0.00020207077811536063 1.926723533945301e-05 +12.99999999999997 0.017312691355147514 -0.0009128847872684954 -0.00017716981302544699 1.555015527845803e-05 +13.09999999999997 0.017294034639080504 -0.0009111670007387671 -0.00019317955998648275 1.834127334997072e-05 +13.199999999999969 0.017275919649404975 -0.0009095242703140592 -0.00017191324887285954 1.4975723221944981e-05 +13.299999999999969 0.017256897205603704 -0.0009077883283755256 -0.00020479172881828853 1.9200559304918222e-05 +13.399999999999968 0.01723734940302194 -0.0009060182884018402 -0.00018979336960331478 1.6713427427513082e-05 +13.499999999999968 0.017215741574415636 -0.0009040446881102318 -0.00023790595044785394 2.2182732037556636e-05 +13.599999999999968 0.017193081907724707 -0.0009019887687179186 -0.00022010910179850053 1.95361367686721e-05 +13.699999999999967 0.01716772762224524 -0.0008996769891210125 -0.0002813266200459772 2.6034908060422884e-05 +13.799999999999967 0.017141114778728817 -0.0008972686436940818 -0.00025714637159545225 2.2843225296102668e-05 +13.899999999999967 0.01711153570572049 -0.0008945853590536196 -0.00032756014453940205 3.0059228947764875e-05 +13.999999999999966 0.017080222030034457 -0.0008917483110465349 -0.0003056266395717111 2.7426530337505314e-05 +14.099999999999966 0.017045931549625696 -0.0008886413066737117 -0.00037340817971821886 3.4009003898435156e-05 +14.199999999999966 0.017009797838962778 -0.0008853659662407434 -0.00035576487811016147 3.214884134736291e-05 +14.299999999999965 0.016971064104943433 -0.0008818682023415413 -0.00041306928266269285 3.725199116910144e-05 +14.399999999999965 0.016930578849380807 -0.0008782103448177608 -0.00040194506830693917 3.637987915184695e-05 +14.499999999999964 0.016887944528879078 -0.0008743773116040285 -0.00044629368504911135 3.9914241006187424e-05 +14.599999999999964 0.016843739984603735 -0.000870399331562025 -0.00044166413642900566 3.9934655407279956e-05 +14.699999999999964 0.016797819783250137 -0.0008662826193368678 -0.0004737101559426273 4.2200935270282115e-05 +14.799999999999963 0.016750632501336682 -0.0008620528847015883 -0.00047265486472991666 4.2551196916403064e-05 +14.899999999999963 0.01670233224425484 -0.0008577367727812344 -0.0004915719832581588 4.3687468558148204e-05 +14.999999999999963 0.016653234668998745 -0.0008533604168682 -0.0004918713441433471 4.391183746453681e-05 +15.099999999999962 0.01660352671793531 -0.0008489344318846435 -0.0005013958094327328 4.456565857936923e-05 diff --git a/applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_disp_ref_block_mvqn.dat b/applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_disp_ref_block_mvqn.dat new file mode 100644 index 000000000000..1af855f23170 --- /dev/null +++ b/applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_disp_ref_block_mvqn.dat @@ -0,0 +1,153 @@ +# Results for "node" with Id # 111 for search config "initial" at position: x0: 0.5; y0: 0.25; z0: 0 +# time MESH_DISPLACEMENT_X MESH_DISPLACEMENT_Y MESH_VELOCITY_X MESH_VELOCITY_Y +0.1 5.835428735823507e-07 -9.520201619303315e-09 1.1049332517535633e-05 -1.8026417267319883e-07 +0.2 3.848163396677013e-06 -3.149374756564917e-08 5.267835180223261e-05 -2.6700253785341533e-07 +0.30000000000000004 1.3655325591053932e-05 -1.1324217855728596e-07 0.0001412173853202147 -1.312108932426071e-06 +0.4 3.4604301199663324e-05 -3.3776520730197573e-07 0.0002757375641210837 -3.1478431166861215e-06 +0.5 7.10875866408781e-05 -7.846449620629338e-07 0.00045208168844998285 -5.754040552100986e-06 +0.6 0.0001264128401172988 -1.5173936713774145e-06 0.0006534759262585093 -8.880591600089383e-06 +0.7 0.00020289447538211343 -2.572027917777155e-06 0.0008752474219848854 -1.2205993477287212e-05 +0.7999999999999999 0.00030223522416214374 -3.9801980685951675e-06 0.0011110080066274125 -1.5936166144773854e-05 +0.8999999999999999 0.0004260600925264305 -5.792122602908206e-06 0.0013646248337650505 -2.0273483501303082e-05 +0.9999999999999999 0.0005763130382442425 -8.083030635411251e-06 0.0016394568575055944 -2.5501770373544957e-05 +1.0999999999999999 0.0007547315311391376 -1.0945199435042085e-05 0.0019283654965527124 -3.1697891628828846e-05 +1.2 0.0009625986553531199 -1.4478439372593146e-05 0.002228483345623024 -3.892011724921596e-05 +1.3 0.0012003704894219904 -1.877548799460841e-05 0.0025271579299236523 -4.6985145037395e-05 +1.4000000000000001 0.001467873312508742 -2.392699499998436e-05 0.0028230063547400428 -5.6000468478093266e-05 +1.5000000000000002 0.0017644259411982153 -3.0020910284704626e-05 0.003108596302643597 -6.584246831692461e-05 +1.6000000000000003 0.002089169313456959 -3.715366543916289e-05 0.003386562459858934 -7.676092623038916e-05 +1.7000000000000004 0.0024410426128780695 -4.542655235806543e-05 0.0036515601741460664 -8.86548682993762e-05 +1.8000000000000005 0.002818732838892396 -5.4940862313162315e-05 0.003902851186716332 -0.00010158360932341119 +1.9000000000000006 0.0032205388928761578 -6.578657539645434e-05 0.00413423780499389 -0.0001152983691543295 +2.0000000000000004 0.0036442864419414297 -7.803201781101754e-05 0.00434181071915913 -0.00012958630858166147 +2.1000000000000005 0.0040874839290435255 -9.172381117719685e-05 0.004523330145841782 -0.00014423529262130058 +2.2000000000000006 0.004547334766581086 -0.00010688189445562927 0.004675064248638265 -0.00015892750772987575 +2.3000000000000007 0.0050210134571256095 -0.00012350944049240435 0.004799689996296507 -0.00017362294790026638 +2.400000000000001 0.005505535414423233 -0.00014158173585070605 0.004892257327093336 -0.00018784945313238483 +2.500000000000001 0.005997928916354019 -0.00016105443288583354 0.004956811412231335 -0.0002016233247446281 +2.600000000000001 0.006495052308251845 -0.00018184561632943348 0.0049872743761183065 -0.00021425962331723413 +2.700000000000001 0.006993737674777509 -0.00020384695507805827 0.004987717105014882 -0.00022581323310210522 +2.800000000000001 0.007490784735730824 -0.00022691373230799162 0.004954780655198999 -0.0002356096341275671 +2.9000000000000012 0.007983042655501923 -0.00025087868505979205 0.004891685057030883 -0.00024376017015673135 +3.0000000000000013 0.008467557925515156 -0.0002755543311587913 0.004799906907543508 -0.0002498509270855741 +3.1000000000000014 0.008941465600991533 -0.00030073439680789154 0.004679533447145325 -0.0002538438454974302 +3.2000000000000015 0.009402205842618312 -0.00032620831470245667 0.004536238980690597 -0.0002557296714447518 +3.3000000000000016 0.009847303659049522 -0.0003517453268284037 0.00436693829873066 -0.00025512677210866 +3.4000000000000017 0.010274618217904626 -0.00037712485793870673 0.004180037639399292 -0.0002525460522435403 +3.5000000000000018 0.010682190994149599 -0.00040211372070316127 0.003972412450056342 -0.00024735735143697145 +3.600000000000002 0.011068409125300487 -0.00042650243734378656 0.0037523984049585672 -0.00024048040792959855 +3.700000000000002 0.011432000486140938 -0.0004500884324260199 0.0035200126618635053 -0.00023135037344407318 +3.800000000000002 0.011771988977807181 -0.00047269529747490124 0.0032800380810781727 -0.0002208370193303856 +3.900000000000002 0.012087842099858198 -0.0004941752351139829 0.0030371197201698643 -0.00020883305720281926 +4.000000000000002 0.01237924796811482 -0.0005143984718229517 0.002791145686498597 -0.00019567856344298066 +4.100000000000001 0.012646373785595796 -0.0005332828059474909 0.0025510054988955905 -0.00018202449832035528 +4.200000000000001 0.012889590339269452 -0.0005507569189710424 0.0023132809840417505 -0.00016750248918334762 +4.300000000000001 0.013109715950710909 -0.0005668093425748812 0.0020885135562728166 -0.00015350528107727107 +4.4 0.013307816684939022 -0.0005814367176286329 0.0018731514983635112 -0.0001390766623019494 +4.5 0.013485267489218012 -0.0005946942856950251 0.0016749847580812642 -0.0001259905712645898 +4.6 0.013643769819553106 -0.0006066474236618877 0.001494298527247885 -0.000113083168781794 +4.699999999999999 0.013785105263686584 -0.0006174007501236092 0.001331589943136737 -0.00010188449905767876 +4.799999999999999 0.013911470847087173 -0.0006270837585519331 0.0011944865367020045 -9.174102982963605e-05 +4.899999999999999 0.014024925171918706 -0.0006358286268522815 0.0010739754395734404 -8.30815232009116e-05 +4.999999999999998 0.01412796331904845 -0.0006438183838138412 0.0009851607123055814 -7.66092854026722e-05 +5.099999999999998 0.014222824291499276 -0.0006511976523988249 0.0009116070021759059 -7.095609740275031e-05 +5.1999999999999975 0.01431205382742111 -0.0006581763050586786 0.0008712304355712689 -6.844519921590237e-05 +5.299999999999997 0.014397950801879349 -0.000664913077304359 0.0008462796723268693 -6.631194250906134e-05 +5.399999999999997 0.01448290082854277 -0.0006716034583988189 0.0008511507288938407 -6.731389941176105e-05 +5.4999999999999964 0.01456907521028997 -0.0006784179897012687 0.0008718396823614274 -6.898455720427705e-05 +5.599999999999996 0.014658562995458256 -0.0006855235283540235 0.0009166817161579668 -7.299277070071272e-05 +5.699999999999996 0.014753243011635457 -0.0006930826687770243 0.0009763909060663624 -7.81583000311685e-05 +5.799999999999995 0.014854798013562577 -0.0007012320065836429 0.0010538430184185044 -8.475583993829945e-05 +5.899999999999995 0.014964660447827582 -0.0007101066380649682 0.0011429657244987727 -9.268030423217881e-05 +5.999999999999995 0.015084082644164212 -0.000719816547633407 0.0012448692658457914 -0.00010148262885699 +6.099999999999994 0.015213922859627005 -0.0007304541046880196 0.0013518042583779185 -0.00011122447852167171 +6.199999999999994 0.015354904761015182 -0.0007420967015249041 0.0014673804009537263 -0.0001216026722886612 +6.299999999999994 0.015507450386600244 -0.000754805230082481 0.0015836087653765996 -0.00013254250325239956 +6.399999999999993 0.015671677268758982 -0.0007686107624199979 0.0017008525942647373 -0.00014356958456825298 +6.499999999999993 0.015847484172701883 -0.0007835334193994526 0.0018154532348203455 -0.00015486793581940287 +6.5999999999999925 0.01603439947580408 -0.0007995580182015368 0.0019231966107993148 -0.0001656566141257852 +6.699999999999992 0.01623192867597574 -0.0008166766329651404 0.002027495215144367 -0.000176693571947666 +6.799999999999992 0.016439139257533347 -0.0008348277866797801 0.0021174938345339114 -0.00018640934621947736 +6.8999999999999915 0.01665518053585767 -0.0008539727415390275 0.0022033693044773562 -0.00019645143481611296 +6.999999999999991 0.01687869217111987 -0.000874008882169447 0.002268046415334077 -0.00020439878581925204 +7.099999999999991 0.017108578359604425 -0.0008948633691951559 0.0023295595730778162 -0.00021264243586692835 +7.19999999999999 0.017343116062186668 -0.0009163943210461542 0.0023628135053212515 -0.00021814302787478043 +7.29999999999999 0.017581119746206995 -0.0009385066331037363 0.00239681345492049 -0.00022403934694894704 +7.39999999999999 0.017820597825619584 -0.0009610234689065019 0.0023948810105341952 -0.00022650624085410282 +7.499999999999989 0.018060388957644724 -0.0009838384022974019 0.002400011140841398 -0.000229699358918033 +7.599999999999989 0.01829836181984548 -0.001006742305405916 0.002362099807770537 -0.00022864110967474744 +7.699999999999989 0.018533390766932875 -0.0010296311510066636 0.002337089997188219 -0.00022899099326281834 +7.799999999999988 0.018763423704159066 -0.001052269432383522 0.0022664809865367923 -0.00022410533573165517 +7.899999999999988 0.018987247751823387 -0.0010745488828367868 0.002208558301153047 -0.00022128483301121326 +7.999999999999988 0.01920316648378895 -0.0010962599084164146 0.0021123313684680823 -0.0002132771666185163 +8.099999999999987 0.019409900985477853 -0.0011172485499619043 0.002021430326386099 -0.00020634954004230852 +8.199999999999987 0.019606092063712475 -0.0011373554845732804 0.0019041094393178037 -0.00019601719846620228 +8.299999999999986 0.0197904123406442 -0.0011564068403756653 0.0017821286675767077 -0.0001849918856438518 +8.399999999999986 0.019961961696426625 -0.001174290129875494 0.00164949929008052 -0.0001727470125996145 +8.499999999999986 0.020119408301168006 -0.0011908166074123796 0.0015002097295411018 -0.00015791006525573223 +8.599999999999985 0.02026224869771944 -0.0012059209516616276 0.0013561119335341713 -0.00014408785877620061 +8.699999999999985 0.020389141784260316 -0.001219414418967498 0.0011834766007172543 -0.00012604134487209493 +8.799999999999985 0.0204999937647291 -0.0012312807410364902 0.0010319442642550145 -0.00011104837052494991 +8.899999999999984 0.02059351367004531 -0.001241324655379085 0.0008410714311085595 -9.02174805752897e-05 +8.999999999999984 0.020669883886228722 -0.0012495796884182144 0.0006837890333114237 -7.449873123588565e-05 +9.099999999999984 0.02072793635184244 -0.001255865394291449 0.0004804849628616904 -5.170922835818917e-05 +9.199999999999983 0.020768014399061143 -0.001260236369037437 0.0003179751344244875 -3.5231754402369765e-05 +9.299999999999983 0.02078916591176816 -0.001262555065012243 0.00010847361415346517 -1.1660801333652505e-05 +9.399999999999983 0.02079177113963535 -0.0012628712828714017 -5.955644983497358e-05 5.809277392238593e-06 +9.499999999999982 0.02077513185243372 -0.0012611026789280467 -0.00027004420103560395 2.911626693118808e-05 +9.599999999999982 0.02073946830284366 -0.0012572741523916868 -0.00044596732437337215 4.782457335703971e-05 +9.699999999999982 0.02068444242982791 -0.00125137042355326 -0.000652162215596156 6.996440284878093e-05 +9.799999999999981 0.020610223243662944 -0.0012434049619271252 -0.0008341785325899167 8.955937787810613e-05 +9.89999999999998 0.020516663270008267 -0.0012334130603098346 -0.0010354486575820476 0.00011016799978007286 +9.99999999999998 0.020403822996284637 -0.0012213855666236657 -0.001222547047707226 0.00013042908647084488 +10.09999999999998 0.020272242272220388 -0.0012074383808102587 -0.0014088165034335282 0.000148619312573494 +10.19999999999998 0.02012401173466268 -0.001191724230621522 -0.0015579460974764182 0.00016569993567595187 +10.29999999999998 0.019962727961774444 -0.0011746957254664854 -0.0016693154134885695 0.00017528285229575298 +10.399999999999979 0.019793009763477074 -0.001156876005993818 -0.0017276360285852796 0.00018121378976696366 +10.499999999999979 0.019618697727950208 -0.0011387669466047818 -0.001759448874913657 0.00018127216640810944 +10.599999999999978 0.01944311762881074 -0.0011206945506016626 -0.0017540360061114291 0.00018016511678315713 +10.699999999999978 0.019268047070832083 -0.0011028561227978027 -0.0017469959577528207 0.0001767366767237592 +10.799999999999978 0.019095512295384073 -0.0010853894280039645 -0.0017057201136454739 0.00017260354850456492 +10.899999999999977 0.018926734555622823 -0.0010684230541264965 -0.0016690693785860826 0.0001668154393826833 +10.999999999999977 0.018763982519682604 -0.0010521533660656167 -0.0015886260020497383 0.00015868708315040068 +11.099999999999977 0.018608588375883493 -0.0010367412653208357 -0.0015180387987311366 0.00014958264596969748 +11.199999999999976 0.018462383592598827 -0.001022346276812849 -0.0014085496217794119 0.00013842565195578554 +11.299999999999976 0.01832579460409505 -0.00100901073375706 -0.0013213530031842475 0.0001282053862511625 +11.399999999999975 0.018199524034993943 -0.0009967613302088838 -0.001206105525916229 0.00011686561275295981 +11.499999999999975 0.0180832994673349 -0.0009855526098593286 -0.0011164353190357588 0.0001071942160341534 +11.599999999999975 0.017977373727902094 -0.0009753796783265232 -0.0010038557483894263 9.635854935805182e-05 +11.699999999999974 0.017881496201039168 -0.0009662116137583469 -0.0009120804773253364 8.690165251816323e-05 +11.799999999999974 0.017795704106282548 -0.0009580442504073834 -0.0008050245335339302 7.65227497087218e-05 +11.899999999999974 0.017719587473743113 -0.0009508318495371462 -0.0007159792392862305 6.762279316658348e-05 +11.999999999999973 0.01765263264672529 -0.000944518445256392 -0.0006236350816291539 5.867367634649648e-05 +12.099999999999973 0.017594284279350666 -0.000939040149499115 -0.0005425684593581265 5.082333661340023e-05 +12.199999999999973 0.01754336109885495 -0.0009342687141031124 -0.00047530942534311315 4.453474833380431e-05 +12.299999999999972 0.01749946141523981 -0.0009301655254115861 -0.000403108651148095 3.758393159098938e-05 +12.399999999999972 0.017461304906626576 -0.0009266054393976856 -0.00035837063966680786 3.3445846034238444e-05 +12.499999999999972 0.01742867121061109 -0.0009235691811117207 -0.0002957233953522146 2.7428039645078008e-05 +12.599999999999971 0.01740018323237974 -0.0009209307530919405 -0.0002715187447037546 2.509601550879738e-05 +12.69999999999997 0.017375567427090104 -0.0009186562402283714 -0.00022280533493238702 2.0578312509085685e-05 +12.79999999999997 0.01735342903434428 -0.0009166232484249011 -0.00021704444716074144 1.9823825002222797e-05 +12.89999999999997 0.01733346524869201 -0.0009147864154749844 -0.00018446909756794015 1.7088671119289407e-05 +12.99999999999997 0.017314506324224373 -0.0009130547426470993 -0.0001918996044379556 1.7333217990214308e-05 +13.09999999999997 0.017296282037601803 -0.0009113812886386935 -0.00017467540223548868 1.6262725030427827e-05 +13.199999999999969 0.017277931098156684 -0.000909713279497466 -0.00018999072010721384 1.6965969358546097e-05 +13.299999999999969 0.017259137552883642 -0.0009079932061153624 -0.00018747154237146063 1.7479066189155932e-05 +13.399999999999968 0.01723932041505742 -0.00090619871470264 -0.0002072207767188254 1.83781578781018e-05 +13.499999999999968 0.017218089487364523 -0.0009042598497495845 -0.00021829817715517938 2.0347112443031726e-05 +13.599999999999968 0.017195172779473765 -0.0009021856711615789 -0.00023925515445727188 2.1211593156234776e-05 +13.699999999999967 0.017170162839328682 -0.0008999038885902264 -0.00026108950287008335 2.4281234524196243e-05 +13.799999999999967 0.01714310638281601 -0.0008974545389089669 -0.0002801587033482651 2.488042774587682e-05 +13.899999999999967 0.017113593616966506 -0.0008947670600108669 -0.00030948962294990274 2.8647301050251465e-05 +13.999999999999966 0.017081926712039047 -0.0008919031648574141 -0.00032478947104452855 2.888460271500276e-05 +14.099999999999966 0.01704767699173093 -0.0008887929894422305 -0.00035891096848098973 3.3035278140572855e-05 +14.199999999999966 0.017011352033858614 -0.0008855134297713648 -0.0003692494739241716 3.2869616120106173e-05 +14.299999999999965 0.016972509716244397 -0.000881996349446556 -0.00040571207664840525 3.7143822564101915e-05 +14.399999999999965 0.016931855806516558 -0.0008783347659949731 -0.0004096659351962562 3.644937519739999e-05 +14.499999999999964 0.016888919515488456 -0.0008744597192037269 -0.00044662820775565715 4.068392249518592e-05 +14.599999999999964 0.016844595241399498 -0.0008704805379941017 -0.0004427618063372888 3.930724275148641e-05 +14.699999999999964 0.016798334214473354 -0.0008663225831920775 -0.0004794513284107385 4.3440058882502977e-05 +14.799999999999963 0.01675118795768893 -0.00086210549878008 -0.0004669903726023333 4.135436892646787e-05 +14.899999999999963 0.016702532113621823 -0.0008577532983143871 -0.0005025464114587519 4.524053840210338e-05 +14.999999999999963 0.016653488293552777 -0.0008533830705864665 -0.00048236049900370146 4.264110671787457e-05 +15.099999999999962 0.016603458953452596 -0.0008489307321478783 -0.0005142873337021493 4.595383065954195e-05 diff --git a/applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_fluid_ref_block_ibqnls.dat b/applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_fluid_ref_block_ibqnls.dat new file mode 100644 index 000000000000..b8a6060e6007 --- /dev/null +++ b/applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_fluid_ref_block_ibqnls.dat @@ -0,0 +1,153 @@ +# Results for "element" with Id # 221 for search config "initial" at position: x0: 0.57; y0: 0.27; z0: 0 +# time VELOCITY_X VELOCITY_Y MESH_DISPLACEMENT_X MESH_DISPLACEMENT_Y MESH_VELOCITY_X MESH_VELOCITY_Y +0.1 1.1546093839756211e-05 2.0457955409701796e-06 5.541613540237803e-07 4.3301877915636095e-08 1.0492996052521283e-05 8.199172149706241e-07 +0.2 4.748001884210259e-05 9.260836857944463e-06 3.7051075764915077e-06 5.535077143254578e-08 5.098598647075076e-05 -4.4986373691144216e-07 +0.30000000000000004 0.00010926855709491923 2.2282168976136842e-05 1.331679248120207e-05 -6.923447402729299e-07 0.00013896178892779757 -1.3853770805086813e-05 +0.4 0.00019718787710427382 4.0077508834973616e-05 3.4102865808337134e-05 -3.4614967260668356e-06 0.00027464747721109306 -4.092315475899657e-05 +0.5 0.00031122122244531844 6.21179961075014e-05 7.04991450785169e-05 -9.44392535376386e-06 0.00045149102849942194 -7.829730332354427e-05 +0.6 0.0004509126919166243 8.764841945441754e-05 0.00012585072741478395 -1.9357325445182082e-05 0.0006545147533843789 -0.00011984307341195293 +0.7 0.0006160706357011286 0.00011538752675796086 0.00020236960903702794 -3.3480061341065756e-05 0.0008751298316435851 -0.00016257673204812573 +0.7999999999999999 0.0008066692631665496 0.00014455556594193577 0.0003018537631151547 -5.198373787662136e-05 0.0011137251246913242 -0.00020738862603870016 +0.8999999999999999 0.0010231131974458422 0.00017369782960969277 0.0004260320211218982 -7.508719270799845e-05 0.0013691030440220367 -0.0002545740052038439 +0.9999999999999999 0.0012658580911296849 0.0002009147323379538 0.0005766487629965695 -0.00010318634809317082 0.001642407664393239 -0.0003071334288441267 +1.0999999999999999 0.0015350148094928644 0.0002251224493186727 0.0007554889488428771 -0.0001368238743595745 0.0019335961191199553 -0.00036536685240242707 +1.2 0.0018306623754741724 0.00024442240126412615 0.0009638394422465638 -0.00017643733608822216 0.0022331435404363427 -0.00042678575972894333 +1.3 0.0021523580280987382 0.0002574488977789655 0.0012020846281153186 -0.00022215682966492996 0.0025318737000394782 -0.00048766369698222643 +1.4000000000000001 0.002500181970962562 0.0002626930216477233 0.001470335068377941 -0.00027411102121841294 0.0028329734357800517 -0.0005512527381954327 +1.5000000000000002 0.0028735647947016768 0.00025771088231893555 0.001767247697153924 -0.0003318574508131257 0.003106850814670642 -0.0006043101091252618 +1.6000000000000003 0.0032730041612301112 0.00024323047947625296 0.0020931145946655864 -0.0003958136155986603 0.0034085303457682004 -0.0006737340056633528 +1.7000000000000004 0.0036976648335247542 0.0002139304664630613 0.0024455001775705587 -0.00046523773114552896 0.003643427044121696 -0.000716516669825676 +1.8000000000000005 0.004147894134894557 0.00017317193575584137 0.002824394215419129 -0.0005406317708097617 0.003930459635897101 -0.0007892379832974087 +1.9000000000000006 0.004622886891865203 0.0001134614057381632 0.003226644604996427 -0.0006211369853726911 0.0041209757279939115 -0.000823557920421144 +2.0000000000000004 0.005122438088590495 4.0458908519536286e-05 0.003651572179181965 -0.0007070656343370228 0.00437253517397464 -0.0008924002700472443 +2.1000000000000005 0.005645988299813054 -5.5254156537260174e-05 0.004095212708385759 -0.0007973523142998964 0.0045080623696182424 -0.0009165035964699771 +2.2000000000000006 0.006192878362505771 -0.00016577673022560125 0.004556412474343874 -0.0008921586672075531 0.004710237275939193 -0.0009767952987275081 +2.3000000000000007 0.00676294486576987 -0.0003024959356284776 0.005030701486880151 -0.0009903081488070653 0.0047841799559192304 -0.0009895739813557882 +2.400000000000001 0.007354901888706939 -0.0004550358866901842 0.0055166880183179934 -0.0010918615166469231 0.00492938303036564 -0.001038609042146473 +2.500000000000001 0.0079692149429974 -0.0006367493539144974 0.006009907040062917 -0.0011957264716208253 0.00494389091933395 -0.0010419797599484058 +2.600000000000001 0.008603593596115237 -0.0008354554209997708 0.006508340313505617 -0.0013016214165861737 0.005019134772815881 -0.001073512594629878 +2.700000000000001 0.009259490980273226 -0.0010655216628185477 0.007007895727497982 -0.001408680333743048 0.004979826981241841 -0.0010702259787820502 +2.800000000000001 0.009933499155935038 -0.0013137685214636736 0.007506019709873912 -0.0015162619873155536 0.004978550061200428 -0.001080030650191239 +2.9000000000000012 0.01062811218643215 -0.0015946858896334318 0.007999275710195729 -0.0016237913114633294 0.0048923713237351025 -0.0010719083363062783 +3.0000000000000013 0.011338822149647095 -0.0018948350911375139 0.008484802857284639 -0.0017303460961685707 0.004816160574102673 -0.001059112137916441 +3.1000000000000014 0.012069186167012195 -0.0022285792476908787 0.008959828768393794 -0.001835602061084875 0.00468779416491548 -0.0010460414077903385 +3.2000000000000015 0.012813747341116594 -0.002582422944390905 0.009421501476919806 -0.0019384862786200377 0.0045455798226326175 -0.0010127706335492112 +3.3000000000000016 0.013576953406397415 -0.0029705531841330997 0.009867616107332038 -0.0020388239413293586 0.0043781511381062385 -0.0009929444402974785 +3.4000000000000017 0.014352722189893932 -0.003379261625558303 0.010295830848916235 -0.0021356473698610646 0.004187112183164955 -0.0009453458715435708 +3.5000000000000018 0.015146075902929238 -0.0038230406158686063 0.010704291387829315 -0.0022287915464017207 0.003982613578023563 -0.0009160525536092071 +3.600000000000002 0.015950492184518116 -0.004287089226568086 0.011091444190025508 -0.002317509523494045 0.003761261715875243 -0.0008601737009790038 +3.700000000000002 0.016771519777697298 -0.004787189172433811 0.011455612438553435 -0.002401538759527955 0.0035228576297862083 -0.0008191109365523117 +3.800000000000002 0.017602274776212196 -0.005305881095684583 0.011796574346740616 -0.0024806546019466484 0.0032955668184753775 -0.0007643040400381947 +3.900000000000002 0.01844879412699823 -0.005861288039174427 0.012112919686106668 -0.0025544549179223803 0.003033499572183817 -0.0007113249341969383 +4.000000000000002 0.019303713841987848 -0.006433239751783636 0.012405359263770448 -0.002623067924351719 0.0028124451110899014 -0.0006608866116494388 +4.100000000000001 0.020173753690184947 -0.0070416326124075335 0.01267289262312897 -0.0026860641695306033 0.002541727353981842 -0.0005996574237872956 +4.200000000000001 0.021051064084939588 -0.007664239480704561 0.01291689402894939 -0.0027437732673024065 0.0023338875576571928 -0.0005535207923832475 +4.300000000000001 0.021943039036856335 -0.008321483935228722 0.013137190661782226 -0.002796024092016368 0.002075965525933115 -0.0004925794042768762 +4.4 0.022841051828771934 -0.008988780962520695 0.013336010084301018 -0.002843396649896574 0.0018951079424933534 -0.0004533779561103938 +4.5 0.023753072700460186 -0.009687115616668941 0.01351389133716176 -0.002885921588454075 0.0016665301234609538 -0.000398382667849181 +4.6 0.02466971831525411 -0.01039088236408818 0.013672981204017335 -0.0029240257229608763 0.0015102000270672197 -0.000362319620531396 +4.699999999999999 0.02559967625363477 -0.01111982125912841 0.01381461902058987 -0.0029580334464523296 0.0013254232280518218 -0.0003186100657796852 +4.799999999999999 0.026532711508868156 -0.011847311641824182 0.013941333710910598 -0.0029884401871353105 0.0012045587778262295 -0.00028856245917610655 +4.899999999999999 0.027477790413911015 -0.01259199465934752 0.014055167373422339 -0.003015856834775483 0.001073751695593131 -0.0002599313858087629 +4.999999999999998 0.028424018518349758 -0.013327471587281668 0.014158385317049285 -0.0030406005525769214 0.0009876814254685864 -0.00023471090153796863 +5.099999999999998 0.029380295860323827 -0.014069641739117032 0.014253626196700349 -0.003063538689545564 0.0009170018773113167 -0.00022333130506668018 +5.1999999999999975 0.030335253548724246 -0.01479324754943815 0.014343007406756156 -0.003084897452321995 0.0008693600259219954 -0.0002044462648638831 +5.299999999999997 0.03129746165634183 -0.015512235839074063 0.01442921689720457 -0.003105583108116267 0.0008533652116775903 -0.00020786186159361833 +5.399999999999997 0.03225516769440887 -0.01620195707790473 0.014514231171441662 -0.0031257985121297726 0.0008467583439167489 -0.00019756858988323543 +5.4999999999999964 0.033216345773066605 -0.016874677708361135 0.014600834327567622 -0.0031465225589278906 0.0008829384912881638 -0.00021506839282809282 +5.599999999999996 0.03416914937492725 -0.017507968307634365 0.014690307346152853 -0.0031677076283495907 0.0009077527816990485 -0.0002103440898754028 +5.699999999999996 0.035120807921443564 -0.01811147532467424 0.014785467491114208 -0.0031904144516344546 0.0009918099787111147 -0.0002413545233315011 +5.799999999999995 0.03605968448719163 -0.018666320484818796 0.01488686032851883 -0.003214367863303205 0.0010390289540544197 -0.00024013604921695463 +5.899999999999995 0.036992016091308325 -0.019178999114246965 0.014997365976281037 -0.0032407428521663405 0.001165860261349145 -0.0002842104206881937 +5.999999999999995 0.03790677471134686 -0.019635709907712597 0.015116514732976552 -0.003268932442914643 0.001222376055155056 -0.0002829214112910956 +6.099999999999994 0.03880913351290586 -0.020039542937011958 0.015246779810271213 -0.0033000216517416773 0.0013761399873077275 -0.0003350244578488214 +6.199999999999994 0.03968896400727022 -0.02038048757661663 0.015387732731581779 -0.0033335991369652044 0.0014491568380883765 -0.00034012851653944347 +6.299999999999994 0.04055006070626077 -0.020660547801727946 0.015540764639662707 -0.003370270185853216 0.0016052487514630522 -0.00038988021405732823 +6.399999999999993 0.041383813191832555 -0.020873123107987113 0.01570502258458846 -0.003409649153649171 0.0016857218484884573 -0.00040073988040591023 +6.499999999999993 0.042192736952209056 -0.021018499201096944 0.015881139791281328 -0.0034520080014771044 0.0018314961663384588 -0.00044386212167731303 +6.5999999999999925 0.04296992932160705 -0.021094074319204924 0.016068153398341563 -0.003497126012760088 0.0019136368940681275 -0.0004606245803712033 +6.699999999999992 0.04371631952318324 -0.021097865112767702 0.016266148764123 -0.0035450352881666748 0.0020424309424722036 -0.0004959832706373903 +6.799999999999992 0.04442720017168274 -0.021032608348521345 0.016473445801367587 -0.003595362546081224 0.0021080246891630496 -0.0005120419287433929 +6.8999999999999915 0.04510191554077342 -0.02089230659133568 0.016689827937923313 -0.003648029285337682 0.0022160997465395806 -0.0005402400039040092 +6.999999999999991 0.04573799579645377 -0.02068510702606517 0.01691355249144644 -0.003702763502871225 0.002262727318812999 -0.0005554387709677542 +7.099999999999991 0.04633308633937969 -0.02040198852102981 0.017143818181308872 -0.003759222998203857 0.002339790477951938 -0.0005733499561173127 +7.19999999999999 0.04688704889672839 -0.02005533347405586 0.01737864388993209 -0.003817111724116539 0.0023605876560659758 -0.0005848835940587037 +7.29999999999999 0.04739616072921193 -0.019633560153364933 0.017616888295947482 -0.00387592653288555 0.0024021655581312603 -0.0005915704545713009 +7.39999999999999 0.047862505968164826 -0.019152845240072495 0.017856704790356268 -0.0039354931227082515 0.002397309941972256 -0.0005996438793313665 +7.499999999999989 0.04828081494524165 -0.01859950696536026 0.01809661005088545 -0.00399512570711075 0.0023996065528582413 -0.000593818956413338 +7.599999999999989 0.04865532258283431 -0.017993025246073657 0.018334849578836465 -0.004054726251655869 0.002367420817099139 -0.0005974568633841089 +7.699999999999989 0.048979232411950666 -0.017317382547992706 0.018570062952179417 -0.004113638449752604 0.002336231403882574 -0.000582042553523598 +7.799999999999988 0.04925887271165008 -0.016595672324094757 0.018800383311259813 -0.004171689189162516 0.0022721781786221415 -0.000578017713266214 +7.899999999999988 0.04948625520311402 -0.015809541561243468 0.01902426640607725 -0.00422810114100643 0.0022051504342049943 -0.0005517131863393387 +7.999999999999988 0.04966982321253838 -0.014984867180064537 0.019240360244984777 -0.004282942406676773 0.0021179446779896445 -0.0005437097263693797 +8.099999999999987 0.049800085274044725 -0.01410120927340162 0.01944720829978541 -0.004335409418004534 0.002019352330283329 -0.0005075640973683767 +8.199999999999987 0.04988752437357178 -0.013187344654017214 0.01964361350991488 -0.004385610641840375 0.0019093118516079885 -0.0004946691303180888 +8.299999999999986 0.049921487468859486 -0.01222078211211641 0.019828067364463756 -0.004432668444196564 0.0017806714880677296 -0.0004487900835475577 +8.399999999999986 0.04991424224283792 -0.01123225549045498 0.019999750667481837 -0.00447681213143912 0.0016527287676914634 -0.0004318784524845439 +8.499999999999986 0.04985403125265474 -0.01019776526108924 0.020157482573529117 -0.004517287254005901 0.0015031905510686202 -0.0003801346127912859 +8.599999999999985 0.04975490720425975 -0.009150526337441449 0.02030024464311824 -0.004554159839231689 0.0013518328852760333 -0.0003551824087348423 +8.699999999999985 0.04960413336495155 -0.008063885275685587 0.020427447553222088 -0.004586962156894817 0.0011927162478166374 -0.00030293307861613305 +8.799999999999985 0.04941717036594492 -0.006973403233060174 0.020538135747815194 -0.004615704107953749 0.0010215998952654804 -0.00027028603066830373 +8.899999999999984 0.049180451386323334 -0.005850290531983601 0.02063205941403272 -0.004640082142604397 0.0008564024289303387 -0.0002187425638781026 +8.999999999999984 0.04891068821142479 -0.004731666204819694 0.020708285381628673 -0.004660033160786879 0.0006694579428861052 -0.00017923386849643302 +9.099999999999984 0.04859377418349865 -0.0035872108013024384 0.020766741986357546 -0.004675334642208493 0.0004984428673745045 -0.0001277313928921306 +9.199999999999983 0.04824732832550235 -0.002454871285836406 0.02080662037840024 -0.004685918415553247 0.00030092365240315757 -8.331175608174511e-05 +9.299999999999983 0.04785685704225378 -0.0013034731609652536 0.020828167058521606 -0.004691729558215981 0.00012816736558462274 -3.337927418911295e-05 +9.399999999999983 0.04744051251011923 -0.00017147465082444557 0.020830406425621395 -0.004692543750559601 -8.087811057829125e-05 1.7177362844094792e-05 +9.499999999999982 0.046983772745391075 0.0009727367854245128 0.020813942260480306 -0.004688529206540641 -0.00025120839976358925 6.334018570071351e-05 +9.599999999999982 0.0465047477379453 0.002091099993716632 0.020778092116377593 -0.004679542203118199 -0.0004627741838239555 0.00011597894432005494 +9.699999999999982 0.04598911695424847 0.003214636001369982 0.020723263417310553 -0.004665661665803842 -0.0006366736050433571 0.00016210346259355502 +9.799999999999981 0.045454837653183575 0.004306834423036124 0.020648990167678946 -0.004646819243782604 -0.0008460758991094904 0.0002142862831700435 +9.89999999999998 0.04488811940049395 0.0053974496301911305 0.0205554560642783 -0.004622986362691826 -0.001026892960368622 0.00026269812960620734 +9.99999999999998 0.04430639112569817 0.0064522323288188875 0.020442478762049184 -0.004594213991045362 -0.0012307835030191568 0.00031258465489731517 +10.09999999999998 0.04370795165633537 0.007501747052950638 0.020310803749718435 -0.004560497159605758 -0.0014048611161783819 0.0003618292448632531 +10.19999999999998 0.0431216077295901 0.008517703732477688 0.020162377055850618 -0.004522130776352618 -0.0015639781979243264 0.0004057770467849214 +10.29999999999998 0.04253476196744464 0.00952655050071616 0.020000905078502204 -0.004479990867588822 -0.0016684583189006596 0.0004376317108491511 +10.399999999999979 0.04196137459633059 0.010497746236355864 0.019830825893036703 -0.004435629316159822 -0.0017345362700007315 0.00045051387524751513 +10.499999999999979 0.04138820632192749 0.01145439933967639 0.01965621251624235 -0.00439037466321495 -0.0017596810375624843 0.0004548322570422165 +10.599999999999978 0.04082815675600705 0.012370393130958252 0.019480335085513768 -0.004345206832259405 -0.0017588417378730523 0.000449030359436854 +10.699999999999978 0.040269857289974384 0.013266500036572195 0.0193053466070177 -0.004300549493334818 -0.001741606559981255 0.00044394936870140135 +10.799999999999978 0.03972642984965684 0.014119026384164636 0.019132410547788744 -0.00425637379541347 -0.0017173404334742087 0.00043956705190488396 +10.899999999999977 0.03918820042899401 0.014947722388188213 0.018963593203562744 -0.0042132185822373585 -0.0016607672696744575 0.0004241569111691068 +10.999999999999977 0.038667276654536176 0.015729987364702817 0.018800262155270087 -0.004171298054738148 -0.0016053485538243184 0.00041381369918489327 +11.099999999999977 0.03815457963266273 0.01648380332703369 0.018644890574651143 -0.004131599088913001 -0.0015047506722170154 0.00038151083278639686 +11.199999999999976 0.0376608135586336 0.017188405709975596 0.018498088242740615 -0.0040940889577221334 -0.0014292190835974556 0.0003673357967083463 +11.299999999999976 0.03717789496540738 0.017860802349969607 0.018361659076920337 -0.004059578994261105 -0.0013027487573960858 0.0003247978829617207 +11.399999999999975 0.03671562096217569 0.01848207576027671 0.018234898740724037 -0.0040274367326773855 -0.0012286650860474351 0.0003156836633076026 +11.499999999999975 0.036267286851687904 0.019067675497283144 0.018118849379261035 -0.00399820879023722 -0.0010965354489089788 0.0002714420241917159 +11.599999999999975 0.03584156242738014 0.019600674997503526 0.018012367987121046 -0.003971147978164828 -0.00102843729645332 0.0002668994359693582 +11.699999999999974 0.03543262644246546 0.020094549176133233 0.01791646492387744 -0.003946928160215684 -0.0008944916635531589 0.00022056633469441671 +11.799999999999974 0.03504718849997425 0.020535617037954777 0.01783023932278565 -0.003925021192719087 -0.0008251684248267806 0.000214538491547594 +11.899999999999974 0.034680341345259894 0.020934177470204245 0.017754019531888376 -0.0039058553001992875 -0.0007033909284740878 0.0001716134567985087 +11.999999999999973 0.0343369595288187 0.021281199204231466 0.01768670351099204 -0.0038888520325461133 -0.0006386786851319916 0.00016566352238364364 +12.099999999999973 0.034013483646281206 0.021583146865841132 0.017628052132693327 -0.0038742155545639203 -0.0005374647993118061 0.00012946463437046803 +12.199999999999973 0.03371269673989249 0.021836288644008783 0.01757690501084819 -0.0038613468799582754 -0.0004821186005751246 0.00012549624302719064 +12.299999999999972 0.03343271578549198 0.02204232405031211 0.017532622757177763 -0.003850308439675381 -0.0004055594600622437 9.7241806359029e-05 +12.399999999999972 0.03317399176376862 0.022203465833273015 0.017494303709872858 -0.0038406426173601465 -0.00035864568729309764 9.416602940467422e-05 +12.499999999999972 0.03293630908057529 0.02231643907389647 0.017461145851178046 -0.0038323723762909785 -0.00030541098838423805 7.274771248687518e-05 +12.599999999999971 0.032717658500602854 0.022389538844804692 0.017432628149943404 -0.0038252423372148745 -0.00026405025055272136 6.850946026879753e-05 +12.69999999999997 0.03251953611274351 0.02241456585625832 0.017407453207290792 -0.0038190098232182097 -0.00023876741683219796 5.6891812836875046e-05 +12.79999999999997 0.03233780787155774 0.022405648932377332 0.017385384098281456 -0.0038135655394191587 -0.00020335485687235784 5.145825955510691e-05 +12.89999999999997 0.032175732266254 0.02235011150608704 0.01736501990072892 -0.0038085782230727156 -0.00020183746745578864 4.829430343090726e-05 +12.99999999999997 0.03202712248249456 0.022266726446409153 0.017346134316089928 -0.0038039362961325737 -0.00017767113504799006 4.457397244368756e-05 +13.09999999999997 0.031897166589559885 0.022139083139527848 0.017327462147093516 -0.0037993675731268564 -0.00019309601192689697 4.647675335824343e-05 +13.199999999999969 0.03177736127737277 0.0219910488378011 0.0173093447561593 -0.0037949945490656153 -0.00017197648756553624 4.1454210885226755e-05 +13.299999999999969 0.03167478891996974 0.02180157271631197 0.017290317325099818 -0.003790405288732166 -0.00020485364980101861 4.947943799033323e-05 +13.399999999999968 0.03157903907156457 0.02159913775509859 0.01727077723918699 -0.0037857329262091085 -0.00018958584387062164 4.489026208832938e-05 +13.499999999999968 0.031499380774507986 0.021358511983117726 0.017249150566773654 -0.00378045851051648 -0.0002384317634806808 5.929881700150868e-05 +13.599999999999968 0.031423327537349416 0.02111296952625099 0.017226497776222555 -0.003775026803643159 -0.00021956201414813343 5.0940751551041686e-05 +13.699999999999967 0.03136210007064375 0.020832583043597912 0.017201115080695502 -0.003768812310562312 -0.0002822687286505146 7.133067776334269e-05 +13.799999999999967 0.03130138436863136 0.02055517214068392 0.017174519584436738 -0.0037624809736576618 -0.0002560964327931269 5.771356438241689e-05 +13.899999999999967 0.03125420063837761 0.020246932833691857 0.01714491354633522 -0.0037552717653031647 -0.0003288461565659318 8.36418007698623e-05 +13.999999999999966 0.03120487997502716 0.019948108098323373 0.017113607922577337 -0.003747761560125299 -0.000304521306536005 6.952219442553099e-05 +14.099999999999966 0.03116811264519384 0.019623294913549416 0.017079278871676824 -0.003739369604005398 -0.0003749178841814597 9.533098285684077e-05 +14.199999999999966 0.031127004057485592 0.01931319339417443 0.017043136914222972 -0.003730620861617325 -0.0003547982581742192 8.256043864472283e-05 +14.299999999999965 0.031097457646681953 0.018982106142543323 0.017004360549301895 -0.003721152568031589 -0.00041451878341965055 0.00010414387805615568 +14.399999999999965 0.031061694515307034 0.018670039922219297 0.01696386081562952 -0.0037113377825806005 -0.0004011402748849344 9.456982847300939e-05 +14.499999999999964 0.031036617881792225 0.01834189398867583 0.016921184137625115 -0.003700948229322318 -0.0004476106871915491 0.00011114579870092868 +14.599999999999964 0.03100393794894534 0.0180360461738877 0.016876959208351184 -0.003690225789210467 -0.0004410656659282683 0.00010509463908759999 +14.699999999999964 0.030981245795957454 0.01771853683521463 0.016830988798312678 -0.0036790194122340225 -0.00047502000397068266 0.00011754431931251217 +14.799999999999963 0.03095008997621381 0.01742555404431564 0.01678376978226659 -0.003667542300782381 -0.00047225633742685295 0.00011330860826176133 +14.899999999999963 0.03092828400231989 0.017124909331082277 0.016735412610159532 -0.0036557430297146174 -0.0004928492897822876 0.0001216421196935176 +14.999999999999963 0.030897508341677166 0.01684999866309872 0.016686279746551777 -0.0036438133810640077 -0.0004915489346518854 0.00011788937838528354 +15.099999999999962 0.03087545949524801 0.016570748674867516 0.016636509162171124 -0.003631660016766852 -0.0005027256780965381 0.00012436777479457906 diff --git a/applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_fluid_ref_block_mvqn.dat b/applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_fluid_ref_block_mvqn.dat new file mode 100644 index 000000000000..21d33207affb --- /dev/null +++ b/applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_fluid_ref_block_mvqn.dat @@ -0,0 +1,153 @@ +# Results for "element" with Id # 221 for search config "initial" at position: x0: 0.57; y0: 0.27; z0: 0 +# time VELOCITY_X VELOCITY_Y MESH_DISPLACEMENT_X MESH_DISPLACEMENT_Y MESH_VELOCITY_X MESH_VELOCITY_Y +0.1 1.1546095859641245e-05 2.0458041926699488e-06 5.541606138287685e-07 4.3313726328011456e-08 1.049298203699443e-05 8.201415636073174e-07 +0.2 4.747993987404075e-05 9.26098084176773e-06 3.7051918193237315e-06 5.5263078801900876e-08 5.098760720659118e-05 -4.519340567909848e-07 +0.30000000000000004 0.00010926056097134386 2.2307470941088598e-05 1.3323252905349265e-05 -6.95949372399426e-07 0.00013908118229742807 -1.3918670415064693e-05 +0.4 0.0001971861880200253 4.004092079893103e-05 3.4086893586526766e-05 -3.45532692785064e-06 0.00027412385276528745 -4.068423286438116e-05 +0.5 0.00031123021968457756 6.208966783479922e-05 7.046836502377114e-05 -9.431368756228974e-06 0.00045163373969389186 -7.836858380778759e-05 +0.6 0.00045095908778593414 8.75011794994241e-05 0.00012579684800479766 -1.9341934680814073e-05 0.0006540054040194853 -0.00011975168495859754 +0.7 0.0006160542468835972 0.00011548312234531364 0.00020236464975141035 -3.3491374844484725e-05 0.0008764539360794964 -0.00016314671002584525 +0.7999999999999999 0.000806676883688043 0.0001445142184203687 0.00030183341641509885 -5.198135101517228e-05 0.0011123870624714226 -0.00020666829638734676 +0.8999999999999999 0.0010231713407826812 0.00017322247452474757 0.0004258058142943371 -7.501194917108916e-05 0.0013661893390936042 -0.00025374009645988497 +0.9999999999999999 0.0012659612329485245 0.00020039803163617132 0.0005762453457165555 -0.00010306940859981768 0.001641603509339372 -0.0003071059444851226 +1.0999999999999999 0.0015352260518097496 0.00022432677930599715 0.0007549209723213532 -0.00013668030258871374 0.001931352153596302 -0.0003649365780155245 +1.2 0.0018308407396845409 0.00024371062105305958 0.0009631452060890582 -0.00017628869626282488 0.0022326235824161995 -0.00042703506786790496 +1.3 0.0021525964569798603 0.0002567302836644283 0.001201376721141058 -0.0002220576347360686 0.002532227737601157 -0.0004884322093428948 +1.4000000000000001 0.0025002235930414556 0.0002620811669983738 0.0014694277442931628 -0.00027395710470618986 0.0028289022624055 -0.0005495507352488086 +1.5000000000000002 0.002873672940938433 0.0002578088351315929 0.001766596324048333 -0.0003318362534512595 0.0031150349280353227 -0.000608174200516181 +1.6000000000000003 0.0032728154746445963 0.00024261284709033024 0.0020920139442055707 -0.00039557800092612777 0.0033936016600414056 -0.0006666344402041262 +1.7000000000000004 0.0036976314863597878 0.00021455311393843213 0.002444622730272685 -0.0004650986506577894 0.003659230757037198 -0.0007238548708802821 +1.8000000000000005 0.004147755353287595 0.0001724241193201215 0.0028231174301083604 -0.0005402955128096603 0.003911263841450012 -0.0007801171869887708 +1.9000000000000006 0.004622896224271353 0.00011445255488631186 0.0032258024671125993 -0.0006209804008668452 0.004143405633392783 -0.0008337213893455505 +2.0000000000000004 0.005122422574992833 3.9530239224688774e-05 0.0036504954075008648 -0.0007067989769048097 0.0043515602682680735 -0.000882865791383991 +2.1000000000000005 0.005645959121400592 -5.389799428256729e-05 0.004094694174413398 -0.0007973142937623645 0.0045336068731933795 -0.0009276328560043101 +2.2000000000000006 0.0061928552039501525 -0.0001668828654225219 0.004555584372896832 -0.000891980615992279 0.004685590204796938 -0.0009660052133205311 +2.3000000000000007 0.006762749621726643 -0.0003007218183145226 0.005030334107647114 -0.0009902913262809366 0.004810574887148714 -0.001000357230408806 +2.400000000000001 0.00735493177308566 -0.00045637211491978796 0.005515950342082056 -0.0010916813916660854 0.004903273304709584 -0.001027795893942563 +2.500000000000001 0.007968908980831971 -0.0006348576691365412 0.006009461893463019 -0.0011956165898308428 0.004968142254672194 -0.0010510552038329258 +2.600000000000001 0.008603839509566582 -0.0008369735585890387 0.006507719879947436 -0.0013014665378450361 0.004998653938306473 -0.0010663547116949474 +2.700000000000001 0.009259115938401462 -0.0010635536815757508 0.007007549737842072 -0.0014085774278321036 0.004999218622483151 -0.0010760742239862482 +2.800000000000001 0.009933884998091518 -0.0013151726824155428 0.007505740196875837 -0.0015162409539088157 0.004966162857720747 -0.0010776041763111398 +2.9000000000000012 0.010627539298318896 -0.0015925976344882986 0.007999129292112214 -0.001623737998146578 0.0049029237832932835 -0.001072602161883163 +3.0000000000000013 0.011339270492841759 -0.0018961220837515817 0.008484757986556301 -0.0017303955104869162 0.004810940768180375 -0.0010608608093331967 +3.1000000000000014 0.01206847028231756 -0.0022265067183567227 0.008959753128520384 -0.00183552711255242 0.004690253992012619 -0.001042088539946545 +3.2000000000000015 0.01281432986861307 -0.002583754471420211 0.009421554849686741 -0.0019385349783947975 0.00454674140305608 -0.0010182731267480032 +3.3000000000000016 0.013576241333889731 -0.0029685883428660826 0.009867680289052522 -0.002038781522807425 0.004377002378335852 -0.0009870247767384173 +3.4000000000000017 0.014353414479793374 -0.0033808111931380768 0.010295986907339736 -0.002135723250888415 0.004189803363342205 -0.0009519341586522166 +3.5000000000000018 0.015145310317174122 -0.0038209817412798003 0.010704508616447615 -0.0022288098117138506 0.003981641627859427 -0.0009101428767532593 +3.600000000000002 0.015951205160236785 -0.004288826309416933 0.011091628891258306 -0.002317586152096268 0.0037612018083214454 -0.000865460121544568 +3.700000000000002 0.01677064838711209 -0.004784546269513348 0.011456073369188559 -0.0024016680781105714 0.003528280357075456 -0.0008164052808856999 +3.800000000000002 0.017602983133797795 -0.005307834608772945 0.011796862265450249 -0.0024807344541247387 0.003287775957314336 -0.0007649978519520506 +3.900000000000002 0.018447809867974774 -0.0058583571112231685 0.012113466012479045 -0.0025545939085249835 0.0030443913951099834 -0.0007122478525055925 +4.000000000000002 0.019304540698083753 -0.006435675409593019 0.012405568024398671 -0.002623069773823041 0.0027978057985054896 -0.0006573747252799519 +4.100000000000001 0.020172800434660458 -0.0070388093309923065 0.012673339728790662 -0.0026861461319818186 0.0025572498810750967 -0.0006040396069397005 +4.200000000000001 0.021052082794882136 -0.007666945563142222 0.012917147359387465 -0.002743808768318459 0.0023188746682895134 -0.0005493192473522417 +4.300000000000001 0.02194200071242336 -0.008318407569902965 0.013137813124103302 -0.002796205298700967 0.0020937048388565034 -0.000498372559379799 +4.4 0.022842093920418166 -0.008991653654690918 0.01333640248047668 -0.0028435116882872674 0.0018777480044343917 -0.0004477942133419248 +4.5 0.02375189242385632 -0.009684330468706433 0.013514292424952777 -0.002886013015042945 0.001679157594740754 -0.0004019559470376734 +4.6 0.024670893961690366 -0.010393781476661226 0.013673189639041353 -0.002924074549559616 0.0014980278473622414 -0.0003591720298418977 +4.699999999999999 0.025598476621652905 -0.011117073285376502 0.013814873482746643 -0.0029580684704076403 0.0013348300637016054 -0.00032050073071563826 +4.799999999999999 0.02653397920034945 -0.011850167309023586 0.01394155130878878 -0.002988518050383398 0.0011974774093764862 -0.0002881847937771829 +4.899999999999999 0.02747657862268947 -0.012589633558738218 0.01405527607677867 -0.003015848083579763 0.001076413945405095 -0.000258352674180252 +4.999999999999998 0.028425313354042178 -0.013330088752077484 0.014158555824278187 -0.0030406859609007244 0.0009875223388591259 -0.00023789344608450303 +5.099999999999998 0.02937910680016455 -0.014067597310945763 0.014253624917296428 -0.0030635024111899663 0.0009134411045016312 -0.00021850328142090008 +5.1999999999999975 0.03033657132485315 -0.014795836759258236 0.014343040074016471 -0.003084944007160159 0.0008730704159487478 -0.0002097153328950525 +5.299999999999997 0.03129631505095513 -0.015510332198103036 0.014429100453284686 -0.003105526865148594 0.0008477391077578156 -0.0002020329642758884 +5.399999999999997 0.03225646387084458 -0.01620436529509853 0.014514197808857933 -0.0031258356671467463 0.0008526087174884778 -0.00020360001168500476 +5.4999999999999964 0.03321528435847401 -0.016873202725273574 0.014600507799769485 -0.003146393801490728 0.0008731115533285674 -0.0002075636338643484 +5.599999999999996 0.03417045411421504 -0.017510126507820613 0.014690121604705205 -0.003167694214652095 0.0009179173885255308 -0.00021807602163126545 +5.699999999999996 0.03511992899546307 -0.018110550262966235 0.014784925259431795 -0.003190217870843408 0.0009776290428930097 -0.00023228151683462917 +5.799999999999995 0.036060971871977654 -0.018668090909395845 0.01488660096887796 -0.003214352759716607 0.0010550222258267836 -0.00025023436818610574 +5.899999999999995 0.03699134371815278 -0.019178855958496915 0.01499658844271166 -0.003240483243265137 0.0011442758320860133 -0.00027219532023127794 +5.999999999999995 0.03790796710969575 -0.01963685346321992 0.01511614021675589 -0.0032689070412578155 0.0012461619260551982 -0.00029621010705434974 +6.099999999999994 0.038808579985986066 -0.020039485275198034 0.01524611806552055 -0.0032998599184937876 0.0013532517690416652 -0.00032272446966880887 +6.199999999999994 0.039689891826114994 -0.020381288438173037 0.015387246031330569 -0.003333525064522053 0.0014688639837958741 -0.0003505362151114873 +6.299999999999994 0.04054969663956361 -0.020660733279798008 0.015539953212843322 -0.0033700574001568505 0.001585341844703765 -0.0003800266313011925 +6.399999999999993 0.041384613101092434 -0.020873452561443958 0.015704352506412306 -0.0034094775480409674 0.0017025854064429764 -0.00040845692485049433 +6.499999999999993 0.042192635980624775 -0.02101891511503819 0.01588034902986104 -0.003451816036195847 0.001817491216142198 -0.00043821784110272775 +6.5999999999999925 0.04297051928809213 -0.021094017574795114 0.016067461668575533 -0.0034969344693176726 0.0019251335881171078 -0.00046437716044601615 +6.699999999999992 0.04371651783212496 -0.02109896548833288 0.016265205921393886 -0.0035447917017315963 0.0020298244814321914 -0.0004925951053657269 +6.799999999999992 0.044427626523271355 -0.021031958635129425 0.01647263885142196 -0.0035951318372791823 0.0021196519343557206 -0.0005146001754141816 +6.8999999999999915 0.04510238944739373 -0.020893815745639532 0.016688920869778565 -0.00364783354812309 0.0022059807758620757 -0.0005391904795874128 +6.999999999999991 0.04573815677812623 -0.02068403697851827 0.016912678001943925 -0.0037025215657006767 0.0022703964001426686 -0.0005551180416757407 +7.099999999999991 0.04633375735354689 -0.020403709165894904 0.017142826548568416 -0.003759010447053482 0.0023324014916417516 -0.0005743373805105242 +7.19999999999999 0.046887013430420635 -0.020053811730956383 0.01737762543090274 -0.0038168125611137364 0.0023652589685422545 -0.0005824123241422012 +7.29999999999999 0.0473970276454717 -0.019635291863776983 0.01761590499293486 -0.0038757267257932015 0.0023998159704444575 -0.000595416825938449 +7.39999999999999 0.047862221789762384 -0.01915093027257147 0.01785565136369838 -0.0039351735669923265 0.0023973244969792856 -0.0005944210495680982 +7.499999999999989 0.048281783167259326 -0.018601144739732386 0.01809572337952487 -0.003994965964683195 0.002403097670139581 -0.0006007875152526699 +7.599999999999989 0.04865473359731139 -0.017990648017579693 0.018333965219387606 -0.004054466983148994 0.0023644900822754897 -0.0005903385682747326 +7.699999999999989 0.04898022685033891 -0.017319101885390403 0.01856927105234256 -0.0041134933083863505 0.002340137020917529 -0.0005893777979810535 +7.799999999999988 0.04925803412328028 -0.016592899420371333 0.018799569167389202 -0.004171426642476931 0.0022688383590220617 -0.0005704992911344993 +7.899999999999988 0.04948732726063293 -0.01581131426734575 0.019023654896366104 -0.0042280079184023505 0.0022113463277895293 -0.0005603335334098008 +7.999999999999988 0.049668622989639324 -0.014981608323371719 0.019239829502255126 -0.004282782306145719 0.002114729057849785 -0.0005361413797215385 +8.099999999999987 0.04980113801846873 -0.014103150359116112 0.019446806060603006 -0.0043353681837159696 0.0020238343954680094 -0.0005151493738053179 +8.199999999999987 0.049886022445161333 -0.013183679093253187 0.019643237343777244 -0.004385473060750393 0.0019065193433494632 -0.0004874331060795038 +8.299999999999986 0.04992259360240463 -0.012222827105198265 0.019827772536596847 -0.004432619472421682 0.0017840428265951743 -0.0004556051736848138 +8.399999999999986 0.049912552098499235 -0.011228321547366688 0.019999540581875287 -0.004476708853928375 0.0016518973780014208 -0.00042602832159712925 +8.499999999999986 0.04985532499542478 -0.010200370571240609 0.020157173329271864 -0.004517192861878597 0.0015016319916708533 -0.00038436995624159824 +8.599999999999985 0.049753098192913923 -0.009146267435329659 0.02030020766289748 -0.004554127969166757 0.001358438292976763 -0.00035354337211871936 +8.699999999999985 0.04960552094265816 -0.008066973271367042 0.020427255562420706 -0.004586916005976615 0.001184408334089827 -0.00030349575171969564 +8.799999999999985 0.04941514466856286 -0.006968804383215898 0.020538272764647893 -0.004615762241129685 0.001034127654351325 -0.0002720623070467944 +8.899999999999984 0.04918190965347455 -0.005853749446379538 0.020631916578840302 -0.004640052919087194 0.0008415782587876423 -0.00021550607023492423 +8.999999999999984 0.0489085596575259 -0.004726794319424444 0.0207084196562221 -0.004660078674277647 0.0006857124308468645 -0.00018320592394916629 +9.099999999999984 0.048595388711616457 -0.003590995945515548 0.02076656514207002 -0.0046752753092781565 0.00048065692026067917 -0.00012276071333569883 +9.199999999999983 0.048245198972279205 -0.0024498856464546873 0.020806739984181193 -0.004685942968284387 0.00031950541322575807 -8.860518769075803e-05 +9.299999999999983 0.047858614304191124 -0.0013076253281805571 0.0208279546553517 -0.00469164373324949 0.00010842986470232396 -2.742695846241182e-05 +9.399999999999983 0.0474383891953261 -0.00016645183286146412 0.020830619534485034 -0.004692615072088326 -5.852455893969124e-05 9.848901660646989e-06 +9.499999999999982 0.04698547053509343 0.0009684652798901683 0.020814014618031645 -0.00468858003489552 -0.00027020960347668365 6.915070300787313e-05 +9.599999999999982 0.04650252620449094 0.002095910589187725 0.020778368374816517 -0.004679625635767112 -0.00044559798952853403 0.00011132593394287973 +9.699999999999982 0.04599082922150502 0.003210278924249457 0.020723344634732577 -0.004665700002477922 -0.0006523896933500707 0.00016612923907187237 +9.799999999999981 0.04545277408029796 0.004311295274613896 0.020649105171326593 -0.004646800316627151 -0.0008344144928384045 0.00021259768686116568 +9.89999999999998 0.04488994866419566 0.005393037765361039 0.02055551737364599 -0.0046230073150129725 -0.0010357514238577823 0.0002628653380043281 +9.99999999999998 0.04430443845881697 0.006456316136638913 0.020442619829737732 -0.004594213139163737 -0.0012233686944361844 0.00031311825938410136 +10.09999999999998 0.043709754886003906 0.007497309132602412 0.020310943973997443 -0.004560566902465539 -0.0014099162801131531 0.00035997262333433073 +10.19999999999998 0.04311971500579767 0.008521402258787622 0.020162496824952962 -0.004522138482004083 -0.001561075340394087 0.0004084622643701271 +10.29999999999998 0.04253662307175904 0.009522033140056726 0.02000089617856576 -0.004479998012263494 -0.0016726519408128034 0.00043558253775328245 +10.399999999999979 0.041959647983626544 0.010501153466376069 0.01983081804803255 -0.004435602667120791 -0.0017314508278627023 0.0004525846593129353 +10.499999999999979 0.041390059080603926 0.011450097547500978 0.019656184221632147 -0.004390387188875964 -0.001762170136905489 0.00045261452161387194 +10.599999999999978 0.040826515671500224 0.012373410499568345 0.019480330164076853 -0.004345210211836259 -0.0017567099989064478 0.00045080602297550214 +10.699999999999978 0.04027178055512134 0.013261972366705189 0.019305012148960146 -0.004300432399198437 -0.001749309691765459 0.0004450045818471754 +10.799999999999978 0.03972494317090117 0.014122054439258038 0.019132219682645866 -0.004256322536096485 -0.0017085038488244806 0.00043723954446462125 +10.899999999999977 0.039190157782785104 0.014943252754851918 0.018963147336353084 -0.004213067833248774 -0.0016721988509216835 0.00042792969225541636 +10.999999999999977 0.03866585168223559 0.01573286289258131 0.01880008249705198 -0.0041712886486396815 -0.001591766173595354 0.00040822018555036846 +11.099999999999977 0.03815645493490323 0.01647938366654715 0.018644377581611866 -0.004131438423031213 -0.0015211148731344999 0.00038863574522894726 +11.199999999999976 0.037659394140133154 0.01719127111802879 0.018497896623028812 -0.0040941033653198 -0.0014110269254509595 0.00035868562390330627 +11.299999999999976 0.03717964210050495 0.017856607079412057 0.0183610652302933 -0.004059387351138059 -0.001323690499434448 0.00033512045256853354 +11.399999999999975 0.03671426519469398 0.01848483796910709 0.01823457886379959 -0.004027395639928202 -0.0012081035309118907 0.0003051998182142079 +11.499999999999975 0.03626895987100302 0.01906375675175118 0.01811814924727358 -0.0039979687683346955 -0.0011185099939641924 0.0002827934258950538 +11.599999999999975 0.03584029171738001 0.019603333142990273 0.01801201873354682 -0.003971100039074075 -0.0010058902084631813 0.000255019149724224 +11.699999999999974 0.035434035539941025 0.020091307963109553 0.017915949503329098 -0.003946776917942298 -0.0009138872191335895 0.00023111602314506823 +11.799999999999974 0.03504588416999472 0.02053808789704261 0.017829976252003055 -0.003925000195960544 -0.0008068265936125368 0.00020464469052157617 +11.899999999999974 0.03468140411482207 0.02093187462625514 0.017753714789792603 -0.003905775590658156 -0.000717114593841746 0.0001797047085444378 +11.999999999999973 0.03433562296966075 0.02128361507783931 0.01768662652965384 -0.0038888687277776677 -0.0006251020298590798 0.0001582709980403961 +12.099999999999973 0.03401400927586929 0.021582361337839473 0.017628186509922678 -0.003874261829998113 -0.0005430265486279452 0.00013406337773334853 +12.199999999999973 0.03371134792439963 0.02183844291148729 0.017577157826452944 -0.003861409970533301 -0.0004768223170100788 0.0001222287269798505 +12.299999999999972 0.03343278190643814 0.022042833170267635 0.017533189789253344 -0.0038504348904383925 -0.00040314025583379205 9.81479884987606e-05 +12.399999999999972 0.03317280374928747 0.02220510343558453 0.017494943029779046 -0.0038407661567833344 -0.0003599304140957329 9.38927233332931e-05 +12.499999999999972 0.03293597257859482 0.02231803950068858 0.017462265186465764 -0.0038326481189533373 -0.00029529762296249894 6.991112956768539e-05 +12.599999999999971 0.03271664201777432 0.02239053025022414 0.01743371564702231 -0.0038254750339380694 -0.000272899663904258 7.173806679411067e-05 +12.69999999999997 0.03251883234969367 0.02241708122086574 0.017409082962643325 -0.003819440683270984 -0.0002220526580578569 5.068885586711771e-05 +12.79999999999997 0.03233703245794583 0.022405969698724146 0.017386907306230524 -0.003813932165504714 -0.00021824012264091877 5.748047541422994e-05 +12.89999999999997 0.03217474882032165 0.022353162612858725 0.01736693795437147 -0.0038090823055957554 -0.00018368147049547143 4.130867135386752e-05 +12.99999999999997 0.032026729826590404 0.022266415272396155 0.017347953124468473 -0.0038044010599440543 -0.0001929180090961501 5.0444689532012915e-05 +13.09999999999997 0.03189589239920363 0.022142894652834005 0.01732972510429941 -0.003799983237350692 -0.00017400034765452973 3.950870076305387e-05 +13.199999999999969 0.03177733134621928 0.021989935869363167 0.017311358939996697 -0.0037955042377714418 -0.00019072837979349356 4.8548422499082313e-05 +13.299999999999969 0.03167338140179486 0.0218056611067549 0.01729256410897468 -0.003790966791012068 -0.0001869692813913122 4.338041456314624e-05 +13.399999999999968 0.031579638450596643 0.02159702999314437 0.017272742100870753 -0.0037861881692519755 -0.00020764610016030168 5.116827743697389e-05 +13.499999999999968 0.03149791800319962 0.02136287932984358 0.01725150774056275 -0.0037810584948138604 -0.00021807381332188515 5.2068572798328426e-05 +13.599999999999968 0.03142442935298236 0.021109772871116882 0.017228589253012516 -0.003775548821728221 -0.00023942340517585657 5.769803302267601e-05 +13.699999999999967 0.031360483045895116 0.020837072361436962 0.017203567519028854 -0.003769473123854735 -0.0002612051017344771 6.389094429836288e-05 +13.799999999999967 0.03130294066704422 0.020550888226060937 0.017176508000134736 -0.0037629606216580047 -0.00028009924425334803 6.653970324208062e-05 +13.899999999999967 0.031252617514342745 0.020250970672713548 0.017146974724822107 -0.0037557656244741867 -0.0003099229803349546 7.688231056167348e-05 +13.999999999999966 0.03120706356530703 0.019942888567181793 0.017115303183853188 -0.003748138583149825 -0.0003245248873447378 7.638759765636826e-05 +14.099999999999966 0.03116664201272899 0.019626672605119314 0.017081024662790965 -0.0037397732930072197 -0.0003596375422550155 8.99454764783829e-05 +14.199999999999966 0.031129623385218994 0.019307244483607922 0.01704469159071345 -0.0037310139639160364 -0.000368833700162853 8.644388284995426e-05 +14.299999999999965 0.03109594487352814 0.018984837865367227 0.017005810286340788 -0.00372150581928444 -0.0004067257908544082 0.00010232787614154737 +14.399999999999965 0.031064600718918332 0.018663626855883842 0.016965143117414167 -0.003711688610013958 -0.0004091304072179543 9.563409262373327e-05 +14.499999999999964 0.031035085219302556 0.018344010919223858 0.016922157072119776 -0.0037011572712972616 -0.00044791587111138714 0.0001132223699488663 +14.599999999999964 0.03100713298917668 0.018029308865624163 0.01687781571373349 -0.0036904505648549723 -0.00044208937618740957 0.00010292301609127514 +14.699999999999964 0.030979747961290303 0.0177201114893263 0.016831495394934698 -0.0036790908938752935 -0.00048100569653604776 0.00012210903687986268 +14.799999999999963 0.030953457217832922 0.017418742023245327 0.016784329030369652 -0.0036677046072939056 -0.000466172813280742 0.00010802829197383612 +14.899999999999963 0.030926721242414756 0.01712608805746583 0.016735606319480806 -0.0036557526015951855 -0.0005043374872720266 0.0001284671926311442 +14.999999999999963 0.03090086929834275 0.016843306280414503 0.01668653714446696 -0.0036438995530066257 -0.0004814653149178704 0.00011134286790995208 +15.099999999999962 0.030873830540385498 0.016571745445948402 0.0166364371231215 -0.0036316188460480733 -0.000516190438610499 0.00013148761384425948 diff --git a/applications/CoSimulationApplication/tests/test_block_convergence_accelerators.py b/applications/CoSimulationApplication/tests/test_block_convergence_accelerators.py new file mode 100644 index 000000000000..3746f7e7d49d --- /dev/null +++ b/applications/CoSimulationApplication/tests/test_block_convergence_accelerators.py @@ -0,0 +1,252 @@ +import KratosMultiphysics as KM +import KratosMultiphysics.KratosUnittest as KratosUnittest + +from KratosMultiphysics.CoSimulationApplication.coupling_interface_data import CouplingInterfaceData +from KratosMultiphysics.CoSimulationApplication.convergence_accelerators.convergence_accelerator_wrapper import BlockConvergenceAcceleratorWrapper +from testing_utilities import DummySolverWrapper + +from unittest.mock import Mock, patch +import numpy as np +from random import uniform + +if KM.IsDistributedRun(): + import KratosMultiphysics.mpi as KratosMPI + +class TestBlockConvergenceAcceleratorWrapper(KratosUnittest.TestCase): + + def setUp(self): + self.dimension = 3 + + self.model = KM.Model() + self.model_part = self.model.CreateModelPart("default") + self.model_part.AddNodalSolutionStepVariable(KM.PRESSURE) + self.model_part.AddNodalSolutionStepVariable(KM.PARTITION_INDEX) + self.model_part.ProcessInfo[KM.DOMAIN_SIZE] = self.dimension + + self.model2 = KM.Model() + self.model_part2 = self.model2.CreateModelPart("default2") + self.model_part2.AddNodalSolutionStepVariable(KM.MESH_DISPLACEMENT_X) + self.model_part2.AddNodalSolutionStepVariable(KM.PARTITION_INDEX) + self.model_part2.ProcessInfo[KM.DOMAIN_SIZE] = self.dimension + + self.my_pid = KM.Testing.GetDefaultDataCommunicator().Rank() + self.num_nodes = self.my_pid % 5 + 3 # num_nodes in range (3 ... 7) + self.num_nodes2 = self.my_pid % 5 + 3 # num_nodes in range (3 ... 7) + + # in order to emulate one partition not having local nodes + if self.my_pid == 4: + self.num_nodes = 0 + if self.my_pid == 3: + self.num_nodes2 = 0 + + for i in range(self.num_nodes): + node = self.model_part.CreateNewNode(i, 0.1*i, 0.0, 0.0) # this creates the same coords in different ranks, which does not matter for this test + node.SetSolutionStepValue(KM.PARTITION_INDEX, self.my_pid) + node.SetSolutionStepValue(KM.PRESSURE, uniform(-10, 50)) + + for i in range(self.num_nodes2): + node = self.model_part2.CreateNewNode(i, 0.1*i, 0.0, 0.0) # this creates the same coords in different ranks, which does not matter for this test + node.SetSolutionStepValue(KM.PARTITION_INDEX, self.my_pid) + node.SetSolutionStepValue(KM.MESH_DISPLACEMENT_X, uniform(-10, 50)) + + if KM.IsDistributedRun(): + KratosMPI.ParallelFillCommunicator(self.model_part, KM.Testing.GetDefaultDataCommunicator()).Execute() + KratosMPI.ParallelFillCommunicator(self.model_part2, KM.Testing.GetDefaultDataCommunicator()).Execute() + + data_settings = KM.Parameters("""{ + "model_part_name" : "default", + "variable_name" : "PRESSURE" + }""") + self.interface_data = CouplingInterfaceData(data_settings, self.model) + self.dummy_solver_wrapper = DummySolverWrapper({"data_4_testing" : self.interface_data}) + + data_settings2 = KM.Parameters("""{ + "model_part_name" : "default2", + "variable_name" : "MESH_DISPLACEMENT_X" + }""") + self.interface_data2 = CouplingInterfaceData(data_settings2, self.model2) + self.dummy_solver_wrapper2 = DummySolverWrapper({"data_4_testing2" : self.interface_data2}) + + self.interface_data_dict = {} + self.interface_data_dict["data_4_testing"] = self.dummy_solver_wrapper.interface_data_dict["data_4_testing"] + self.interface_data_dict["data_4_testing2"] = self.dummy_solver_wrapper2.interface_data_dict["data_4_testing2"] + + def test_accelerator_without_support_for_distributed_data(self): + conv_acc_settings = KM.Parameters("""{ + "type" : "patched_mock_testing", + "solver_sequence" : + [ + { + "solver": "fluid", + "data_name" : "data_4_testing", + "coupled_data_name" : "data_4_testing2" + }, + { + "solver": "structure", + "data_name" : "data_4_testing2", + "coupled_data_name" : "data_4_testing" + } + ] + }""") + + exp_inp = {} + exp_res = {} + + exp_inp["data_4_testing"] = self.interface_data.GetData() + exp_inp["data_4_testing2"] = self.interface_data2.GetData() + + update_solution_return_value = [uniform(-10, 50) for _ in range(self.num_nodes)] + global_update_solution_return_value = np.array(np.concatenate(KM.Testing.GetDefaultDataCommunicator().GathervDoubles(update_solution_return_value, 0))) + conv_acc_mock = Mock() + attrs = { + 'SupportsDistributedData.return_value': False, + 'UpdateSolution.return_value' : global_update_solution_return_value + } + conv_acc_mock.configure_mock(**attrs) + + with patch('KratosMultiphysics.CoSimulationApplication.convergence_accelerators.convergence_accelerator_wrapper.CreateConvergenceAccelerator') as p: + p.return_value = conv_acc_mock + conv_acc_wrapper = BlockConvergenceAcceleratorWrapper(conv_acc_settings, self.interface_data_dict, KM.Testing.GetDefaultDataCommunicator()) + + conv_acc_wrapper.Initialize() + conv_acc_wrapper.InitializeSolutionStep() + + self.assertEqual(conv_acc_mock.SupportsDistributedData.call_count, 2) + self.assertEqual(conv_acc_wrapper.gather_scatter_required["data_4_testing"], self.interface_data_dict["data_4_testing"].IsDistributed()) # gather-scatter is only required in case of distributed data + self.assertEqual(conv_acc_wrapper.gather_scatter_required["data_4_testing2"], self.interface_data_dict["data_4_testing2"].IsDistributed()) # gather-scatter is only required in case of distributed data + self.assertEqual(conv_acc_wrapper.executing_rank["data_4_testing"], self.my_pid == 0) + self.assertEqual(conv_acc_wrapper.executing_rank["data_4_testing2"], self.my_pid == 0) + + conv_acc_wrapper.InitializeNonLinearIteration() + + # setting new solution for computing the residual + rand_data1 = [uniform(-10, 50) for _ in range(self.num_nodes)] + self.interface_data_dict["data_4_testing"].SetData(rand_data1) + exp_res["data_4_testing"] = rand_data1 - exp_inp["data_4_testing"] + exp_res_y = self.num_nodes2 * [0.] + conv_acc_wrapper.ComputeAndApplyUpdate() + + + global_exp_res = np.array(np.concatenate(KM.Testing.GetDefaultDataCommunicator().GathervDoubles(exp_res["data_4_testing"], 0))) + global_exp_inp = np.array(np.concatenate(KM.Testing.GetDefaultDataCommunicator().GathervDoubles(exp_inp["data_4_testing"], 0))) + global_exp_inp_y = np.array(np.concatenate(KM.Testing.GetDefaultDataCommunicator().GathervDoubles(exp_inp["data_4_testing2"], 0))) + global_exp_res_y = np.array(np.concatenate(KM.Testing.GetDefaultDataCommunicator().GathervDoubles(exp_res_y, 0))) + if self.my_pid == 0: + np.testing.assert_array_equal(global_exp_res, conv_acc_mock.UpdateSolution.call_args[0][0]) + np.testing.assert_array_equal(global_exp_inp, conv_acc_mock.UpdateSolution.call_args[0][1]) + np.testing.assert_array_equal(global_exp_inp_y, conv_acc_mock.UpdateSolution.call_args[0][2]) + np.testing.assert_array_equal(global_exp_res_y, conv_acc_mock.UpdateSolution.call_args[0][4]) + + solver_1_output = exp_inp["data_4_testing"] + update_solution_return_value + np.testing.assert_array_equal(solver_1_output, self.interface_data_dict["data_4_testing"].GetData()) + + + update_solution_return_value2 = [uniform(-10, 50) for _ in range(self.num_nodes2)] + global_update_solution_return_value2 = np.array(np.concatenate(KM.Testing.GetDefaultDataCommunicator().GathervDoubles(update_solution_return_value2, 0))) + conv_acc_mock.UpdateSolution.return_value = global_update_solution_return_value2.copy() + + # setting new solution (other solver) for computing the residual + rand_data2 = [uniform(-10, 50) for _ in range(self.num_nodes2)] + self.interface_data_dict["data_4_testing2"].SetData(rand_data2) + exp_res["data_4_testing2"] = rand_data2 - exp_inp["data_4_testing2"] + exp_res_y = solver_1_output - rand_data1 + conv_acc_wrapper.ComputeAndApplyUpdate() + + self.assertEqual(conv_acc_mock.UpdateSolution.call_count, 2*int(self.my_pid == 0)) # only one rank calls "UpdateSolution" + global_exp_res2 = np.array(np.concatenate(KM.Testing.GetDefaultDataCommunicator().GathervDoubles(exp_res["data_4_testing2"], 0))) + global_exp_inp2 = np.array(np.concatenate(KM.Testing.GetDefaultDataCommunicator().GathervDoubles(exp_inp["data_4_testing2"], 0))) + global_exp_inp2_y = np.array(np.concatenate(KM.Testing.GetDefaultDataCommunicator().GathervDoubles(solver_1_output, 0))) + global_exp_res2_y = np.array(np.concatenate(KM.Testing.GetDefaultDataCommunicator().GathervDoubles(exp_res_y, 0))) + if self.my_pid == 0: + np.testing.assert_array_equal(global_exp_res2, conv_acc_mock.UpdateSolution.call_args[0][0]) + np.testing.assert_array_equal(global_exp_inp2, conv_acc_mock.UpdateSolution.call_args[0][1]) + np.testing.assert_array_equal(global_exp_inp2_y, conv_acc_mock.UpdateSolution.call_args[0][2]) + np.testing.assert_array_equal(global_exp_res2_y, conv_acc_mock.UpdateSolution.call_args[0][4]) + + np.testing.assert_array_equal(exp_inp["data_4_testing2"] + update_solution_return_value2, self.interface_data_dict["data_4_testing2"].GetData()) + + def test_accelerator_with_support_for_distributed_data(self): + conv_acc_settings = KM.Parameters("""{ + "type" : "patched_mock_testing", + "solver_sequence" : + [ + { + "solver": "fluid", + "data_name" : "data_4_testing", + "coupled_data_name" : "data_4_testing2" + }, + { + "solver": "structure", + "data_name" : "data_4_testing2", + "coupled_data_name" : "data_4_testing" + } + ] + }""") + + exp_inp = {} + exp_res = {} + + exp_inp["data_4_testing"] = self.interface_data.GetData() + exp_inp["data_4_testing2"] = self.interface_data2.GetData() + + update_solution_return_value = [uniform(-10, 50) for _ in range(self.num_nodes)] + conv_acc_mock = Mock() + attrs = { + 'SupportsDistributedData.return_value': True, + 'UpdateSolution.return_value' : update_solution_return_value + } + conv_acc_mock.configure_mock(**attrs) + + with patch('KratosMultiphysics.CoSimulationApplication.convergence_accelerators.convergence_accelerator_wrapper.CreateConvergenceAccelerator') as p: + p.return_value = conv_acc_mock + conv_acc_wrapper = BlockConvergenceAcceleratorWrapper(conv_acc_settings, self.interface_data_dict, KM.Testing.GetDefaultDataCommunicator()) + + conv_acc_wrapper.Initialize() + conv_acc_wrapper.InitializeSolutionStep() + + self.assertEqual(conv_acc_mock.SupportsDistributedData.call_count, 2) + self.assertFalse(conv_acc_wrapper.gather_scatter_required["data_4_testing"]) + self.assertFalse(conv_acc_wrapper.gather_scatter_required["data_4_testing2"]) + self.assertTrue(conv_acc_wrapper.executing_rank["data_4_testing"]) + self.assertTrue(conv_acc_wrapper.executing_rank["data_4_testing2"]) + + conv_acc_wrapper.InitializeNonLinearIteration() + + # setting new solution for computing the residual + rand_data1 = [uniform(-10, 50) for _ in range(self.num_nodes)] + self.interface_data_dict["data_4_testing"].SetData(rand_data1) + exp_res["data_4_testing"] = rand_data1 - exp_inp["data_4_testing"] + exp_res_y = self.num_nodes2 * [0.] + conv_acc_wrapper.ComputeAndApplyUpdate() + + + np.testing.assert_array_equal(exp_res["data_4_testing"], conv_acc_mock.UpdateSolution.call_args[0][0]) + np.testing.assert_array_equal(exp_inp["data_4_testing"], conv_acc_mock.UpdateSolution.call_args[0][1]) + np.testing.assert_array_equal(exp_inp["data_4_testing2"], conv_acc_mock.UpdateSolution.call_args[0][2]) + np.testing.assert_array_equal(exp_res_y, conv_acc_mock.UpdateSolution.call_args[0][4]) + + solver_1_output = exp_inp["data_4_testing"] + update_solution_return_value + np.testing.assert_array_equal(solver_1_output, self.interface_data_dict["data_4_testing"].GetData()) + + + update_solution_return_value2 = [uniform(-10, 50) for _ in range(self.num_nodes2)] + conv_acc_mock.UpdateSolution.return_value = update_solution_return_value2.copy() + + # setting new solution (other solver) for computing the residual + rand_data2 = [uniform(-10, 50) for _ in range(self.num_nodes2)] + self.interface_data_dict["data_4_testing2"].SetData(rand_data2) + exp_res["data_4_testing2"] = rand_data2 - exp_inp["data_4_testing2"] + exp_res_y = solver_1_output - rand_data1 + conv_acc_wrapper.ComputeAndApplyUpdate() + + self.assertEqual(conv_acc_mock.UpdateSolution.call_count, 2) # only one rank calls "UpdateSolution" + np.testing.assert_array_equal(exp_res["data_4_testing2"], conv_acc_mock.UpdateSolution.call_args[0][0]) + np.testing.assert_array_equal(exp_inp["data_4_testing2"], conv_acc_mock.UpdateSolution.call_args[0][1]) + np.testing.assert_array_equal(solver_1_output, conv_acc_mock.UpdateSolution.call_args[0][2]) + np.testing.assert_array_equal(exp_res_y, conv_acc_mock.UpdateSolution.call_args[0][4]) + + np.testing.assert_array_equal(exp_inp["data_4_testing2"] + update_solution_return_value2, self.interface_data_dict["data_4_testing2"].GetData()) + + +if __name__ == '__main__': + KratosUnittest.main() diff --git a/applications/CoSimulationApplication/tests/test_mok_fsi.py b/applications/CoSimulationApplication/tests/test_mok_fsi.py index 6d0797012d6c..efb32f2385c0 100644 --- a/applications/CoSimulationApplication/tests/test_mok_fsi.py +++ b/applications/CoSimulationApplication/tests/test_mok_fsi.py @@ -42,6 +42,31 @@ def test_mok_fsi_aitken(self): self.__DumpUpdatedCFDSettings() self._runTest() + def test_mok_fsi_block_mvqn(self): + self.accelerator_type = "block_mvqn" + + with KratosUnittest.WorkFolderScope(".", __file__): + self._createTest("fsi_mok", "cosim_mok_fsi_block") + self.__ManipulateCFDSettings() + self.__RemoveOutputFromCFD() # comment to get output + self.__AddTestingToCFD() + self.__DumpUpdatedCFDSettings() + self._runTest() + + + def test_mok_fsi_block_ibqnls(self): + self.accelerator_type = "block_ibqnls" + + with KratosUnittest.WorkFolderScope(".", __file__): + self._createTest("fsi_mok", "cosim_mok_fsi_block") + self.__ManipulateCFDSettings() + additional_accel_settings = KM.Parameters("""2""") + self.cosim_parameters["solver_settings"]["convergence_accelerators"][0].AddValue("timestep_horizon", additional_accel_settings) + self.__RemoveOutputFromCFD() # comment to get output + self.__AddTestingToCFD() + self.__DumpUpdatedCFDSettings() + self._runTest() + def test_mok_fsi_mvqn_external_structure(self): self.accelerator_type = "mvqn" From d29974223195a7b0053cfc3ebdf68dd84d0946a3 Mon Sep 17 00:00:00 2001 From: azzeddinetiba Date: Wed, 3 Jan 2024 17:45:50 +0000 Subject: [PATCH 21/27] More appropriate handling of data matrices in IBQNLS --- .../convergence_accelerators/block_ibqnls.py | 35 +- .../cosim_mok_fsi_block_parameters.json | 2 +- ..._mok_cfd_results_disp_ref_block_ibqnls.dat | 302 +++++++++--------- ...mok_cfd_results_fluid_ref_block_ibqnls.dat | 302 +++++++++--------- .../tests/test_mok_fsi.py | 32 +- 5 files changed, 326 insertions(+), 347 deletions(-) diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_ibqnls.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_ibqnls.py index 3be562320411..ec4731efcf61 100644 --- a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_ibqnls.py +++ b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_ibqnls.py @@ -51,16 +51,17 @@ def __init__( self, settings): self.previous_V = None self.previous_Q = None self.previous_R = None + self.previous_V_is_V_old = False for solver_data in settings["solver_sequence"].values(): self.X_tilde[solver_data["data_name"].GetString()] = deque( maxlen = horizon ) self.X[solver_data["data_name"].GetString()] = deque( maxlen = horizon ) self.v_old_matrices[solver_data["data_name"].GetString()] = deque( maxlen = self.q ) self.w_old_matrices[solver_data["data_name"].GetString()] = deque( maxlen = self.q ) - self.V_old[solver_data["data_name"].GetString()] = [] - self.W_old[solver_data["data_name"].GetString()] = [] - self.V_new[solver_data["data_name"].GetString()] = [] - self.W_new[solver_data["data_name"].GetString()] = [] + self.V_old[solver_data["data_name"].GetString()] = None + self.W_old[solver_data["data_name"].GetString()] = None + self.V_new[solver_data["data_name"].GetString()] = None + self.W_new[solver_data["data_name"].GetString()] = None self.coupl_data_names[solver_data["data_name"].GetString()] = solver_data["coupled_data_name"].GetString() ## UpdateSolution(r, x, y, data_name, yResidual) @@ -83,7 +84,7 @@ def UpdateSolution( self, r, x, y, data_name, yResidual,): if self.echo_level > 3: cs_tools.cs_print_info(self._ClassName(), "Number of new modes: ", col ) - is_first_dt = (self.V_old[data_name] == [] and self.W_old [data_name] == []) + is_first_dt = (self.V_old[data_name] is None and self.W_old [data_name] is None) is_first_iter = (k == 0) # ================== First time step ================================================== if is_first_dt: @@ -122,15 +123,17 @@ def UpdateSolution( self, r, x, y, data_name, yResidual,): if self.previous_V is not None: previous_V = self.previous_V else: - if is_first_dt: - previous_V = self.V_new[coupled_data_name].copy() + if self.previous_V_is_V_old: + previous_V = self.V_old[coupled_data_name].copy() + self.previous_V_is_V_old = False else: - previous_V = np.hstack((self.V_new[coupled_data_name].copy(), self.V_old[coupled_data_name].copy())) + previous_V = self._augmented_matrix(self.V_new[coupled_data_name], self.V_old[coupled_data_name], is_first_dt) ## Matrix-free implementation of the linear solver (and the pseudoinverse) ------------------------------------- block_oper = lambda vec: vec - self.pinv_product(V, Q, R, self.pinv_product(previous_V, previous_Q, previous_R, vec)) block_x = sp.sparse.linalg.LinearOperator((row, row), block_oper) delta_x, _ = sp.sparse.linalg.gmres( block_x, b, atol=self.gmres_abs_tol, tol=self.gmres_rel_tol ) + # delta_x = np.linalg.solve(np.eye(row, row) - V @ np.linalg.inv(R) @ Q.T @ previous_V @ np.linalg.inv(previous_R) @ previous_Q.T, b) else: ## Using J = 0 if a previous approximate Jacobian is not available delta_x = b @@ -138,10 +141,10 @@ def UpdateSolution( self, r, x, y, data_name, yResidual,): ## Saving data for the approximate jacobian for the next iteration self.previous_Q = Q.copy() self.previous_R = R.copy() - if is_first_iter: # V only needs to be saved completely on the first iteration - self.previous_V = V.copy() - else: # Otherwise it can be retrieved from V_new and V_old and memory is freed - self.previous_V = None + if is_first_iter: # Indicate that the next iteration V_old is to be used + self.previous_V_is_V_old = True + # Memory is freed + self.previous_V = None return delta_x @@ -153,7 +156,7 @@ def _augmented_matrix(self, mat, old_mat, is_first_dt): def pinv_product(self, LHS, Q, R, x): rhs = Q.T @ x - return LHS @ sp.linalg.solve_triangular(R, rhs) + return LHS @ sp.linalg.solve_triangular(R, rhs, check_finite = False) def FinalizeSolutionStep( self ): @@ -161,12 +164,12 @@ def FinalizeSolutionStep( self ): if data_name == list(self.W_new.keys())[-1]: ## Check if last solver in the sequence # Saving the V matrix for the next (first) iteration to recover the approximate jacobian - if self.V_old[data_name] != []: - self.previous_V = np.hstack((self.V_new[data_name].copy(), self.V_old[data_name].copy())) + if self.V_old[data_name] is not None: + self.previous_V = np.hstack((self.V_new[data_name], self.V_old[data_name])) else: self.previous_V = self.V_new[data_name].copy() - if self.V_new[data_name] != [] and self.W_new[data_name] != []: + if self.V_new[data_name] is not None and self.W_new[data_name] is not None: self.v_old_matrices[data_name].appendleft( self.V_new[data_name] ) self.w_old_matrices[data_name].appendleft( self.W_new[data_name] ) diff --git a/applications/CoSimulationApplication/tests/fsi_mok/cosim_mok_fsi_block_parameters.json b/applications/CoSimulationApplication/tests/fsi_mok/cosim_mok_fsi_block_parameters.json index 373f9e65795d..6d7b417ea3ae 100644 --- a/applications/CoSimulationApplication/tests/fsi_mok/cosim_mok_fsi_block_parameters.json +++ b/applications/CoSimulationApplication/tests/fsi_mok/cosim_mok_fsi_block_parameters.json @@ -10,7 +10,7 @@ "solver_settings" : { "type" : "coupled_solvers.block_iterative_strong", - "echo_level" : 1, + "echo_level" : 0, "num_coupling_iterations" : 12, "predictors" : [ { diff --git a/applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_disp_ref_block_ibqnls.dat b/applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_disp_ref_block_ibqnls.dat index 998b7a9d2733..abbd11a070d3 100644 --- a/applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_disp_ref_block_ibqnls.dat +++ b/applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_disp_ref_block_ibqnls.dat @@ -1,153 +1,153 @@ # Results for "node" with Id # 111 for search config "initial" at position: x0: 0.5; y0: 0.25; z0: 0 # time MESH_DISPLACEMENT_X MESH_DISPLACEMENT_Y MESH_VELOCITY_X MESH_VELOCITY_Y -0.1 5.835438530470173e-07 -9.53462188678036e-09 1.104935106361216e-05 -1.8053721915797127e-07 -0.2 3.848086275244397e-06 -3.144967113902097e-08 5.2676857632495934e-05 -2.656691197032157e-07 -0.30000000000000004 1.364895413109497e-05 -1.1091593172945027e-07 0.00014109943659910339 -1.269976152464144e-06 -0.4 3.4619312160944814e-05 -3.364648514223643e-07 0.00027624009760456134 -3.2022254726374953e-06 -0.5 7.111712952629333e-05 -7.861726602038276e-07 0.00045195107595034874 -5.76609619150442e-06 -0.6 0.00012646560983440458 -1.5185490031586013e-06 0.0006539794690689225 -8.858177452469857e-06 -0.7 0.0002029014952374357 -2.5698756890913868e-06 0.0008739866949353711 -1.2162245323168655e-05 -0.7999999999999999 0.00030225530222719246 -3.978122150866615e-06 0.001112250403710248 -1.5975566168279535e-05 -0.8999999999999999 0.0004262790911296609 -5.794983466962347e-06 0.001367480760666309 -2.0337575842984538e-05 -0.9999999999999999 0.0005767079274926518 -8.091697555331977e-06 0.0016402931317187892 -2.555463071000309e-05 -1.0999999999999999 0.0007552915666187441 -1.0956458570538751e-05 0.0019305964914107657 -3.1698949785979764e-05 -1.2 0.0009632884906700334 -1.4491186061692858e-05 0.0022290777714439004 -3.894408886402414e-05 -1.3 0.001201084276365671 -1.878663820054887e-05 0.0025269388815689557 -4.693583505619585e-05 -1.4000000000000001 0.0014687826396786972 -2.3941113697722942e-05 0.0028268858219638563 -5.6095271996905295e-05 -1.5000000000000002 0.0017650965835556305 -3.0027981373886857e-05 0.0031008880843923408 -6.563527538623315e-05 -1.6000000000000003 0.0020902638454254364 -3.7179927590853796e-05 0.0034006352452620667 -7.728658927267757e-05 -1.7000000000000004 0.0024419251798333875 -4.5446042614236126e-05 0.00363663283330394 -8.811146335410789e-05 -1.8000000000000005 0.002819990719573229 -5.4978630146337604e-05 0.0039209496568916825 -0.00010233043145930012 -1.9000000000000006 0.0032213820746399284 -6.581019444275519e-05 0.00411299953620787 -0.00011447026949274255 -2.0000000000000004 0.0036453509202478713 -7.806565781246057e-05 0.004361662374090256 -0.0001303843433787366 -2.1000000000000005 0.004088015277870279 -9.173827671188514e-05 0.004499062079996725 -0.0001433003400819436 -2.2000000000000006 0.004548159145188296 -0.0001069093447601556 0.004698468086542906 -0.00015985809558303674 -2.3000000000000007 0.005021392350336352 -0.00012352112012109932 0.004774474063062391 -0.00017265470729886559 -2.400000000000001 0.005506266092955636 -0.0001416110351563108 0.004917179436581033 -0.00018888133129863475 -2.500000000000001 0.005998370686653726 -0.0001610764712548643 0.004933478150186438 -0.00020073872538191954 -2.600000000000001 0.006495666523622327 -0.00018187256812654976 0.005007074186577448 -0.0002149717492017381 -2.700000000000001 0.006994078109651525 -0.00020386860041673047 0.00496879179616616 -0.00022522559128695954 -2.800000000000001 0.007491071324114143 -0.00022692410091953115 0.004967105402717148 -0.0002357973616331056 -2.9000000000000012 0.00798318517146741 -0.0002508910025654911 0.004880916578662039 -0.0002437119046096217 -3.0000000000000013 0.008467613921342727 -0.00027554925911523555 0.004805610032153808 -0.0002495284314614009 -3.1000000000000014 0.00894153058868991 -0.0003007491271577164 0.004676274539673416 -0.000254497781798152 -3.2000000000000015 0.009402159653661823 -0.00032620006810952314 0.0045360324496554185 -0.0002547776097686028 -3.3000000000000016 0.009847229907387125 -0.0003517551829654143 0.004367057429687633 -0.00025619647345740727 -3.4000000000000017 0.01027447021785532 -0.00037710896601915526 0.004178432865338458 -0.00025126826395724427 -3.5000000000000018 0.010681970391816857 -0.0004021170110101773 0.0039723799379004845 -0.0002486646105007802 -3.600000000000002 0.011068230815078716 -0.0004264816643372101 0.0037533558254893764 -0.00023907824020281385 -3.700000000000002 0.011431545008020488 -0.00045005665442832794 0.0035139430699820447 -0.00023215908474409944 -3.800000000000002 0.011771703987028462 -0.00047267241947909864 0.0032882130946344412 -0.00022048907125441668 -3.900000000000002 0.01208729917551684 -0.0004941364746858947 0.003025998773470995 -0.00020871468983194778 -4.000000000000002 0.012379030627838088 -0.0005143888186103652 0.002805695738520062 -0.00019638287978024718 -4.100000000000001 0.01264592304775993 -0.0005332528181393522 0.002535682492876717 -0.00018105307521044093 -4.200000000000001 0.01288933309964299 -0.0005507420054709102 0.00232812305959895 -0.00016853359932924916 -4.300000000000001 0.013109101412362021 -0.0005667600947138902 0.002071123095913515 -0.00015209774958312237 -4.4 0.01330742967724664 -0.0005814063097773051 0.0018901932806473368 -0.0001404877089115405 -4.5 0.013484865797539665 -0.0005946611114224035 0.0016624733021763333 -0.00012491588499156128 -4.6 0.013643562465881243 -0.0006066350550586636 0.0015064415572760954 -0.00011421226122474218 -4.699999999999999 0.013784845564396775 -0.0006173809681546769 0.0013220691993613945 -0.00010093826573231537 -4.799999999999999 0.013911259229973164 -0.0006270652430833496 0.001201881527021134 -9.242156855189049e-05 -4.899999999999999 0.01402480912616368 -0.0006358216360037604 0.001070809299314835 -8.284719994630318e-05 -4.999999999999998 0.014127802329362296 -0.0006438004634315213 0.0009860276916488272 -7.651192222422414e-05 -5.099999999999998 0.014222817927112429 -0.0006512009092438539 0.0009143063894248884 -7.147814141713418e-05 -5.1999999999999975 0.014312029613753647 -0.0006581712226287955 0.0008684660099756445 -6.785357133002347e-05 -5.299999999999997 0.014398060288606792 -0.0006649212987987858 0.0008509211949446865 -6.701015112673601e-05 -5.399999999999997 0.01448294412571973 -0.0006716046675533992 0.0008463332939359869 -6.666371864211849e-05 -5.4999999999999964 0.014569389785021298 -0.0006784437601786978 0.000880505215424431 -6.991418465426479e-05 -5.599999999999996 0.014658755889177463 -0.0006855397668190097 0.0009077265096501391 -7.2115926205309e-05 -5.699999999999996 0.014753769803167846 -0.0006931278822887483 0.0009892688034440044 -7.933657513602318e-05 -5.799999999999995 0.014855068027496957 -0.0007012548344622019 0.001039289513880449 -8.345445131376395e-05 -5.899999999999995 0.0149654210492612 -0.0007101731208088425 0.0011629786166501295 -9.44608031197782e-05 -5.999999999999995 0.015084471335155704 -0.000719848585206812 0.0012228167920907784 -9.949692821681038e-05 -6.099999999999994 0.0152145819472994 -0.0007305056756266471 0.0013731099360890764 -0.00011305349451786665 -6.199999999999994 0.015355400788944677 -0.0007421391315553878 0.001449022199995177 -0.000120128081792682 -6.299999999999994 0.015508256288459999 -0.0007548709704136523 0.0016022973047205118 -0.00013399832527689534 -6.399999999999993 0.015672345754988395 -0.000768673930624871 0.0016849141730427954 -0.00014249096185961726 -6.499999999999993 0.01584827297060349 -0.0007835971360734663 0.0018288267205084526 -0.0001556056367305446 -6.5999999999999925 0.016035086854640574 -0.0007996268475100155 0.0019120647562077624 -0.00016527430733581972 -6.699999999999992 0.016232866859948167 -0.0008167562044402986 0.002039874729462957 -0.00017711900113153686 -6.799999999999992 0.016439939322824376 -0.0008349076459198969 0.002105961607298854 -0.0001861183373582612 -6.8999999999999915 0.016656091277441696 -0.0008540473654123664 0.0022136411290196397 -0.00019654371068007437 -6.999999999999991 0.016879560650085584 -0.0008740945127086914 0.002260051786479788 -0.0002045674146028855 -7.099999999999991 0.017109574771366685 -0.0008949469071602057 0.002337413288481369 -0.00021244656095181671 -7.19999999999999 0.017344123898788588 -0.0009164957877422841 0.0023574955546382 -0.00021863465097686748 -7.29999999999999 0.017582110857853477 -0.0009385919507808523 0.0024000007625173464 -0.0002233457883115526 -7.39999999999999 0.017821638001134486 -0.0009611296221754625 0.002393840265063388 -0.00022742868356827577 -7.499999999999989 0.018061287097782545 -0.000983913900030697 0.0023977506407911993 -0.00022842522021151784 -7.599999999999989 0.01829923741962289 -0.001006835305233427 0.002363736790505655 -0.00022993209088510244 -7.699999999999989 0.018534192476769303 -0.0010296979857929683 0.0023344767045562023 -0.00022755754805481255 -7.799999999999988 0.01876422593372605 -0.0010523641528887863 0.0022684807397320653 -0.00022567889322429085 -7.899999999999988 0.018987871384453705 -0.0010746011612934993 0.0022037831641384983 -0.00021933421390668299 -7.999999999999988 0.019203690642412126 -0.0010963166581149997 0.002114165052834296 -0.00021480534824594994 -8.099999999999987 0.01941031555086676 -0.001117280713474046 0.0020182940755203464 -0.0002048249984849589 -8.199999999999987 0.01960645909980725 -0.0011374021458922733 0.001905536532779247 -0.00019737406057544917 -8.299999999999986 0.01979071301221679 -0.001156434263769894 0.0017800195277905952 -0.00018367703664185498 -8.399999999999986 0.019962160685022365 -0.001174317192084297 0.0016491173890023653 -0.0001736716879951008 -8.499999999999986 0.02011971533073217 -0.001190852041309156 0.0015027969399743772 -0.00015745229680776414 -8.599999999999985 0.020262280606822832 -0.0012059287494368927 0.0013487384906598276 -0.0001438290808158099 -8.699999999999985 0.020389335157606322 -0.0012194361231070397 0.0011924220592950587 -0.00012658524848876932 -8.799999999999985 0.020499860137930564 -0.001231259212038288 0.0010190211646765538 -0.00010978487178213803 -8.899999999999984 0.02059365894597487 -0.0012413425544059663 0.0008561280303229478 -9.196238391284489e-05 -8.999999999999984 0.020669750595771086 -0.0012495585145796853 0.0006673667881385314 -7.243274473716564e-05 -9.099999999999984 0.020728111507084323 -0.0012558913682357952 0.0004983266693035264 -5.4135996950494336e-05 -9.199999999999983 0.020767892405047183 -0.0012602182397982286 0.00029935607159593114 -3.260542004475559e-05 -9.299999999999983 0.020789372921946866 -0.0012625866320816435 0.00012817491492866 -1.4517764841152665e-05 -9.399999999999983 0.0207915602211711 -0.0012628390843803907 -8.173083424807381e-05 9.096672192662876e-06 -9.499999999999982 0.020775066895453387 -0.001261096849999988 -0.0002510908989091659 2.6206889446408547e-05 -9.599999999999982 0.020739193387370056 -0.0012572348606012368 -0.00046323391693021466 5.051338913395731e-05 -9.699999999999982 0.020684366002819445 -0.0012513674941774947 -0.0006362982846199459 6.738218739480214e-05 -9.799999999999981 0.020610097988745333 -0.0012433932781109173 -0.0008462414375576207 9.155426259540583e-05 -9.89999999999998 0.020516604371681107 -0.001233414878409524 -0.0010260321200174583 0.00010855413563911888 -9.99999999999998 0.020403674200553456 -0.0012213704931597837 -0.0012305784909844057 0.00013184462134195008 -10.09999999999998 0.020272109658984253 -0.001207426356714322 -0.0014030166312636446 0.00014758503606341944 -10.19999999999998 0.02012388654101062 -0.0011917068291294334 -0.0015616463776495471 0.0001664907362054173 -10.29999999999998 0.01996273941854691 -0.0011747029145369502 -0.0016643895301694913 0.00017429093495481546 -10.399999999999979 0.01979301242959426 -0.0011568738725375905 -0.0017313875480696255 0.0001821128392668407 -10.499999999999979 0.019618729981140507 -0.0011387724650392065 -0.0017563183756636577 0.00018049079902346602 -10.599999999999978 0.01944312368211275 -0.0011206902005055756 -0.0017566756297374376 0.0001808965559762145 -10.699999999999978 0.019268374511103727 -0.0011028981691337844 -0.0017390995350967647 0.00017534372589831935 -10.799999999999978 0.019095703118528515 -0.0010854062452221227 -0.0017145240935097772 0.00017414965833385828 -10.899999999999977 0.018927171376489225 -0.0010684740693921787 -0.001657866428091009 0.00016502616212645338 -10.999999999999977 0.018764170537824434 -0.0010521666778616748 -0.0016016846560013087 0.00016071774435617945 -11.099999999999977 0.01860909313223319 -0.0010367961161973983 -0.001502404180207808 0.00014730650374596035 -11.199999999999976 0.01846258907224665 -0.0010223582433558788 -0.0014257680916451864 0.00014090348679920858 -11.299999999999976 0.018326377316260547 -0.0010090715703223142 -0.0013016169800897039 0.00012547454851842866 -11.399999999999975 0.018199853462955665 -0.000996790621530956 -0.001225377565074354 0.00011945405843599178 -11.499999999999975 0.01808398377436597 -0.000985624497128165 -0.0010958824690118852 0.00010454121662286549 -11.599999999999975 0.0179777325518286 -0.0009754120339336033 -0.0010248849286540363 9.9012020450329e-05 -11.699999999999974 0.017882004308622974 -0.0009662593117336368 -0.0008941068537945628 8.47099068583557e-05 -11.799999999999974 0.01779597775572914 -0.0009580681361711073 -0.0008220163013616177 7.849199709929346e-05 -11.899999999999974 0.01771988908871084 -0.0009508566899886392 -0.0007034720360347995 6.623218535970961e-05 -11.999999999999973 0.017652718168127367 -0.0009445253020135671 -0.0006361371015189345 5.993628918859533e-05 -12.099999999999973 0.017594150648266776 -0.0009390200051740017 -0.000537903655494194 5.0463186696550575e-05 -12.199999999999973 0.01754310987866912 -0.0009342490449498234 -0.00047997216169585186 4.4675337514848726e-05 -12.299999999999972 0.017498891243122178 -0.0009301102459201697 -0.00040603572118629385 3.820897928048036e-05 -12.399999999999972 0.017460660166071604 -0.0009265535367976241 -0.00035678827112656675 3.283658371949007e-05 -12.499999999999972 0.017427552729109518 -0.0009234629430076033 -0.00030590203689922964 2.891579410894892e-05 -12.599999999999971 0.01739908978769836 -0.0009208363319906013 -0.0002627844147012462 2.3703924002008262e-05 -12.69999999999997 0.01737394564915959 -0.0009185011176884758 -0.00023914575839826903 2.2739565092895566e-05 -12.79999999999997 0.017351904904951546 -0.0009164844333049034 -0.0002026315263189978 1.7878510923826065e-05 -12.89999999999997 0.017331556640549473 -0.0009146060136351541 -0.00020207077811536063 1.926723533945301e-05 -12.99999999999997 0.017312691355147514 -0.0009128847872684954 -0.00017716981302544699 1.555015527845803e-05 -13.09999999999997 0.017294034639080504 -0.0009111670007387671 -0.00019317955998648275 1.834127334997072e-05 -13.199999999999969 0.017275919649404975 -0.0009095242703140592 -0.00017191324887285954 1.4975723221944981e-05 -13.299999999999969 0.017256897205603704 -0.0009077883283755256 -0.00020479172881828853 1.9200559304918222e-05 -13.399999999999968 0.01723734940302194 -0.0009060182884018402 -0.00018979336960331478 1.6713427427513082e-05 -13.499999999999968 0.017215741574415636 -0.0009040446881102318 -0.00023790595044785394 2.2182732037556636e-05 -13.599999999999968 0.017193081907724707 -0.0009019887687179186 -0.00022010910179850053 1.95361367686721e-05 -13.699999999999967 0.01716772762224524 -0.0008996769891210125 -0.0002813266200459772 2.6034908060422884e-05 -13.799999999999967 0.017141114778728817 -0.0008972686436940818 -0.00025714637159545225 2.2843225296102668e-05 -13.899999999999967 0.01711153570572049 -0.0008945853590536196 -0.00032756014453940205 3.0059228947764875e-05 -13.999999999999966 0.017080222030034457 -0.0008917483110465349 -0.0003056266395717111 2.7426530337505314e-05 -14.099999999999966 0.017045931549625696 -0.0008886413066737117 -0.00037340817971821886 3.4009003898435156e-05 -14.199999999999966 0.017009797838962778 -0.0008853659662407434 -0.00035576487811016147 3.214884134736291e-05 -14.299999999999965 0.016971064104943433 -0.0008818682023415413 -0.00041306928266269285 3.725199116910144e-05 -14.399999999999965 0.016930578849380807 -0.0008782103448177608 -0.00040194506830693917 3.637987915184695e-05 -14.499999999999964 0.016887944528879078 -0.0008743773116040285 -0.00044629368504911135 3.9914241006187424e-05 -14.599999999999964 0.016843739984603735 -0.000870399331562025 -0.00044166413642900566 3.9934655407279956e-05 -14.699999999999964 0.016797819783250137 -0.0008662826193368678 -0.0004737101559426273 4.2200935270282115e-05 -14.799999999999963 0.016750632501336682 -0.0008620528847015883 -0.00047265486472991666 4.2551196916403064e-05 -14.899999999999963 0.01670233224425484 -0.0008577367727812344 -0.0004915719832581588 4.3687468558148204e-05 -14.999999999999963 0.016653234668998745 -0.0008533604168682 -0.0004918713441433471 4.391183746453681e-05 -15.099999999999962 0.01660352671793531 -0.0008489344318846435 -0.0005013958094327328 4.456565857936923e-05 +0.1 5.835438530441426e-07 -9.534621861356258e-09 1.104935106355773e-05 -1.8053721867656817e-07 +0.2 3.848086274752641e-06 -3.144967112624091e-08 5.2676857623284023e-05 -2.656691203407128e-07 +0.30000000000000004 1.3653157606263867e-05 -1.1361002032783369e-07 0.00014117902904527035 -1.32098848070913e-06 +0.4 3.460844025744067e-05 -3.3558335915665154e-07 0.00027588882981771976 -3.092338894838668e-06 +0.5 7.108285060058229e-05 -7.844780090559476e-07 0.00045179171460918 -5.83732210843442e-06 +0.6 0.00012630008879806082 -1.5138074916016102e-06 0.0006516570756597966 -8.751791920020111e-06 +0.7 0.000202650582660208 -2.5658176091212078e-06 0.0008742957936740892 -1.225468076533903e-05 +0.7999999999999999 0.0003018285604866585 -3.972577338296749e-06 0.001108857354901451 -1.5881949846181796e-05 +0.8999999999999999 0.00042561886855409215 -5.786452761555774e-06 0.0013657919265967673 -2.0348017208654534e-05 +0.9999999999999999 0.0005757224275679752 -8.074794729188334e-06 0.0016358313270271611 -2.539786958930995e-05 +1.0999999999999999 0.0007540375026760552 -1.0935395993859173e-05 0.0019292661635193944 -3.174634622825001e-05 +1.2 0.0009617824438701244 -1.4465193634351525e-05 0.0022257615096013253 -3.882546057925738e-05 +1.3 0.001199466566149829 -1.87595880460383e-05 0.0025275888017184476 -4.700648188865356e-05 +1.4000000000000001 0.0014671074594170914 -2.391443458159513e-05 0.0028255306532294676 -5.605560456220533e-05 +1.5000000000000002 0.001763575925353348 -3.000289743837498e-05 0.00310481287241339 -6.568947175902696e-05 +1.6000000000000003 0.002088413376481558 -3.713741698722648e-05 0.003391287997466243 -7.691730389383246e-05 +1.7000000000000004 0.002440260405944627 -4.54064084537047e-05 0.003647516028977957 -8.846541365054231e-05 +1.8000000000000005 0.0028181659046152283 -5.492519088039041e-05 0.0039097881074943415 -0.0001018085429785818 +1.9000000000000006 0.0032200465274615404 -6.577277344096775e-05 0.00413037083467922 -0.00011516763339773688 +2.0000000000000004 0.0036439987343788696 -7.802211616511528e-05 0.0043481920191341065 -0.0001297445850970142 +2.1000000000000005 0.004087241828630625 -9.172086693163619e-05 0.004519411531111189 -0.00014425294738484743 +2.2000000000000006 0.004547395653995424 -0.00010688477721916793 0.004683387035319234 -0.00015900587242320902 +2.3000000000000007 0.005020693969152005 -0.00012349627431544518 0.004786095049351167 -0.00017325713452799382 +2.400000000000001 0.005505820358335568 -0.00014159768543626328 0.004914129194083483 -0.00018869601793377238 +2.500000000000001 0.005997766763527854 -0.00016104707890617426 0.004931594303081433 -0.0002005142789618417 +2.600000000000001 0.0064954664620252185 -0.00018186683433479104 0.005016885595706999 -0.00021563922187983655 +2.700000000000001 0.006993860444092298 -0.00020385201737170664 0.004960350308537749 -0.00022447841425895116 +2.800000000000001 0.007491546792108098 -0.00022695254216378554 0.00498639259740064 -0.0002372096597452293 +2.9000000000000012 0.00798354540976535 -0.0002509063364532366 0.004863692527044845 -0.00024237255140583468 +3.0000000000000013 0.008468572877617138 -0.0002756051282163978 0.004829358071341578 -0.0002512668129603456 +3.1000000000000014 0.00894231823960879 -0.0003007847524000711 0.004655284200268363 -0.00025282257882020464 +3.2000000000000015 0.009403467012129216 -0.0003262738151972907 0.004560781607775764 -0.0002567036515840662 +3.3000000000000016 0.009848339149532445 -0.00035181062523409733 0.004345199285670597 -0.00025444184263353077 +3.4000000000000017 0.010275998013396645 -0.00037719942784023925 0.004201784056301535 -0.00025317587030874246 +3.5000000000000018 0.010683611897353605 -0.0004022137256053271 0.003957704476383989 -0.00024740317306485416 +3.600000000000002 0.01107004107990515 -0.00042659876858387237 0.0037661234193482043 -0.0002402992934939837 +3.700000000000002 0.011433530972155916 -0.00045020769426307194 0.003508574080352052 -0.0002319489329005437 +3.800000000000002 0.011773583931624455 -0.000472790497395517 0.003289117478862742 -0.00021989786626082562 +3.900000000000002 0.012089439509095485 -0.0004942877122504064 0.0030310100851589097 -0.0002098841459763617 +4.000000000000002 0.012380905339543844 -0.000514501896467188 0.0027962398073868577 -0.0001947292980067143 +4.100000000000001 0.01264813386854728 -0.0005334132208947525 0.0025495196334466962 -0.00018321023758324404 +4.200000000000001 0.012891356712051829 -0.0005508783860685574 0.002314009458982565 -0.00016645910802217816 +4.300000000000001 0.013111466103362576 -0.0005669456424848622 0.00208788250546934 -0.0001545236294059412 +4.4 0.013309434991707446 -0.0005815500315065249 0.0018710466051279166 -0.00013791747430412293 +4.5 0.01348681572884238 -0.0005948121622211367 0.0016754836958959131 -0.0001269212505316363 +4.6 0.013645196428380286 -0.0006067497147237113 0.001491736756952225 -0.00011214348368206131 +4.699999999999999 0.013786510006717158 -0.0006174906123445872 0.0013332143162373541 -0.00010231750936495519 +4.799999999999999 0.01391263818594907 -0.0006271718267509415 0.0011888812400340837 -9.145435971711147e-05 +4.899999999999999 0.014026031056097305 -0.0006359178867836745 0.0010772534951363896 -8.327877042859279e-05 +4.999999999999998 0.014128573839239206 -0.0006438599100079569 0.0009735851200957358 -7.558178993933547e-05 +5.099999999999998 0.014223456173193866 -0.0006512469648989938 0.0009211821423037116 -7.19269154484257e-05 +5.1999999999999975 0.014312200469915869 -0.0006581846564955021 0.0008551881413619637 -6.695887989949852e-05 +5.299999999999997 0.01439837600923542 -0.0006649494902144035 0.000863757375736151 -6.796855727224737e-05 +5.399999999999997 0.014482856474272028 -0.0006716064236409593 0.0008294074453377028 -6.546030415074059e-05 +5.4999999999999964 0.014569173472901643 -0.000678422608262752 0.0008906656874646137 -7.03733897586192e-05 +5.599999999999996 0.01465812116379884 -0.0006854918945479708 0.0008931602948793986 -7.135592882058861e-05 +5.699999999999996 0.014753055138565795 -0.0006930581591891874 0.0009985152640130076 -7.948166116301014e-05 +5.799999999999995 0.014854430487627045 -0.0007012148633796086 0.001034637066923701 -8.397847502038167e-05 +5.899999999999995 0.014964504608441143 -0.0007100864997899035 0.001160392140457778 -9.311192908037817e-05 +5.999999999999995 0.015083659643684851 -0.0007197954003026959 0.0012276143407607678 -0.00010120990769552715 +6.099999999999994 0.015213521967601413 -0.0007304072501015618 0.001364487809627662 -0.00011090149136734044 +6.199999999999994 0.015354712063064145 -0.0007420999612184473 0.0014627708909141026 -0.00012285679590052942 +6.299999999999994 0.015507081435305544 -0.000754756937028848 0.0015825435664174054 -0.00013054663642541432 +6.399999999999993 0.015671645901813937 -0.0007686271447629952 0.0017088940111078179 -0.00014633594419550576 +6.499999999999993 0.015847135853192446 -0.0007834854617115362 0.0018026986558690376 -0.00015155534552793875 +6.5999999999999925 0.016034496174097326 -0.0007995836403617717 0.00194152678157383 -0.00016951059815338497 +6.699999999999992 0.016231643425362364 -0.0008166342537975286 0.002006327528923131 -0.00017256429064985504 +6.799999999999992 0.016439301451700215 -0.0008348569107809414 0.0021416394244498853 -0.00019077084548956922 +6.8999999999999915 0.016654861582799545 -0.0008539279275565549 0.0021765113397693822 -0.00019189014880324998 +6.999999999999991 0.016878844763595552 -0.0008740298655739395 0.0022966206378143045 -0.00020894222819491952 +7.099999999999991 0.017108342668050062 -0.0008948325300266458 0.0023014545985818786 -0.0002084022120694288 +7.19999999999999 0.017343362616500147 -0.0009164221781154874 0.0023920888189886474 -0.00022225818738622147 +7.29999999999999 0.017580981974905815 -0.0009384936765373827 0.002368440622909836 -0.00022034210015055885 +7.39999999999999 0.017820848589482997 -0.0009610469471339926 0.002422485845393419 -0.0002297914274398902 +7.499999999999989 0.018060284204672105 -0.000983831857604517 0.0023736168395426605 -0.000226837439535675 +7.599999999999989 0.018298565176121967 -0.0010067571047083503 0.0023866717726024026 -0.00023103269330555616 +7.699999999999989 0.018533250046908974 -0.0010296193866352042 0.0023132241179117685 -0.00022684328479372746 +7.799999999999988 0.01876360024332009 -0.0010522829195014785 0.002289436797797188 -0.0002260772243143826 +7.899999999999988 0.018987259957351073 -0.0010745620154254095 0.002189146526930604 -0.00021989678976028738 +7.999999999999988 0.019203443135194342 -0.001096279227386088 0.0021308098776912352 -0.00021431571174875243 +8.099999999999987 0.019409998425413334 -0.0011172730476011316 0.0020050171208046627 -0.00020576089952754849 +8.199999999999987 0.019606175211945596 -0.0011373479659742408 0.001915308574468143 -0.00019576829216734964 +8.299999999999986 0.019790554894367256 -0.001156438422216452 0.001775884103565038 -0.00018601941669973862 +8.399999999999986 0.019962042511955453 -0.001174284419855873 0.0016520893208389657 -0.0001711915815642829 +8.499999999999986 0.020119518692742203 -0.0011908381288815613 0.0014994987876969373 -0.00015962631793344924 +8.599999999999985 0.020262282237376708 -0.0012059086915967802 0.0013548114282713943 -0.0001421798257320334 +8.699999999999985 0.020389308899904958 -0.001219447292112046 0.0011872487293222572 -0.0001282932186926431 +8.799999999999985 0.02050001234732325 -0.0012312668878076232 0.0010260788937230282 -0.00010850538091792432 +8.899999999999984 0.02059360738910178 -0.0012413424538049124 0.0008470138771097083 -9.268130594547703e-05 +8.999999999999984 0.020669821167556692 -0.0012495599082095225 0.0006764836275275219 -7.202097955934154e-05 +9.099999999999984 0.020727942286904145 -0.0012558688859240887 0.0004871887839490989 -5.3925975971429246e-05 +9.199999999999983 0.020767982601020196 -0.0012602305931110301 0.00031248428533574594 -3.349757127016406e-05 +9.299999999999983 0.02078919556753795 -0.0012625601275260277 0.00011342812902392437 -1.3047012330033735e-05 +9.399999999999983 0.020791723065806893 -0.0012628711019497753 -6.448095733128582e-05 6.84728726812998e-06 +9.499999999999982 0.02077505912997161 -0.0012610906004588143 -0.00026701207186766076 2.86504293103504e-05 +9.599999999999982 0.020739475100666288 -0.0012572866000545005 -0.0004464158488526957 4.7617202816277006e-05 +9.699999999999982 0.02068441635802303 -0.0012513558463175727 -0.0006528042833726721 7.07184043363937e-05 +9.799999999999981 0.020610316243659586 -0.0012434293254375423 -0.0008312580113018782 8.819809040484287e-05 +9.89999999999998 0.02051684482261404 -0.0012334230730289778 -0.0010361672833982412 0.00011150278192465074 +9.99999999999998 0.020404071709208684 -0.0012214277392330385 -0.0012209290627295964 0.0001288453096670644 +10.09999999999998 0.020272481281045144 -0.001207447084274057 -0.0014102164174219752 0.0001504194096554941 +10.19999999999998 0.020124377284187114 -0.0011917774624281162 -0.0015545575173490024 0.00016353586475272263 +10.29999999999998 0.019963128508600943 -0.001174724609470543 -0.0016712970813667347 0.0001773417069992435 +10.399999999999979 0.01979346418132679 -0.0011569351276724768 -0.0017252987017004682 0.00017916672232618498 +10.499999999999979 0.01961921207689793 -0.0011388095837446504 -0.0017600016289658258 0.00018304875089449047 +10.599999999999978 0.019443624539319405 -0.0011207573029418105 -0.0017539755676879716 0.00017854255416904563 +10.699999999999978 0.019268404555976424 -0.0011028803261926888 -0.0017497653468746999 0.00017860364844298973 +10.799999999999978 0.019095825428446647 -0.0010854245673571255 -0.0017043023598921243 0.00017103881953960392 +10.899999999999977 0.018927029743336814 -0.0010684466019034986 -0.0016703429756098368 0.0001681269384032092 +10.999999999999977 0.018764542532241683 -0.0010522236236879376 -0.0015827360141809532 0.00015689880299332772 +11.099999999999977 0.018608949432903 -0.0010367798568558292 -0.0015265261915625664 0.00015150671188552122 +11.199999999999976 0.018462731134455568 -0.0010223821741646721 -0.001402314810316456 0.00013707298915711003 +11.299999999999976 0.018325914537340317 -0.0010090212889408024 -0.001329980299778646 0.00012959684000191907 +11.399999999999975 0.018199655407636534 -0.0009967638577662306 -0.001199483150763827 0.00011603128158981183 +11.499999999999975 0.018083582970301493 -0.0009855883509099403 -0.0011181309769644392 0.00010709839331566001 +11.599999999999975 0.01797755642956446 -0.0009753843744647461 -0.0010051382723762538 9.713425874735421e-05 +11.699999999999974 0.0178819139668624 -0.000966269792996631 -0.0009062339040975541 8.522831650673463e-05 +11.799999999999974 0.01779585143898324 -0.0009580410406582428 -0.0008149568845134042 7.900911464194313e-05 +11.899999999999974 0.01771995359006103 -0.0009508853746268549 -0.0007041155300128752 6.464666744075963e-05 +11.999999999999973 0.01765269304046935 -0.0009445035678853304 -0.0006382847575600365 6.218446335097774e-05 +12.099999999999973 0.017594385859302935 -0.0009390648281528339 -0.0005308990092267347 4.748019824102479e-05 +12.199999999999973 0.0175429894424598 -0.0009342080697148595 -0.0004923947102453141 4.854546747604177e-05 +12.299999999999972 0.01749920313699618 -0.000930158494020778 -0.00038818593042210745 3.362274660941168e-05 +12.399999999999972 0.01746080652206361 -0.0009265456272976242 -0.0003734972308655375 3.729447503028678e-05 +12.499999999999972 0.017428131149962132 -0.0009235394430661124 -0.00028568565717498857 2.4112271479216513e-05 +12.599999999999971 0.017399349320252777 -0.000920843322745554 -0.00028370413510568165 2.8501004291685382e-05 +12.69999999999997 0.01737449113730867 -0.0009185650460847292 -0.00021857336921785937 1.8217144896553992e-05 +12.79999999999997 0.01735222373779923 -0.0009165014753406115 -0.00022165898797432747 2.19762019430245e-05 +12.89999999999997 0.01733207896399526 -0.0009146604583959194 -0.00018476428921455069 1.5679301566552332e-05 +12.99999999999997 0.017313191906626148 -0.0009129323872501448 -0.0001897397134706791 1.8178546993560304e-05 +13.09999999999997 0.017294940160413694 -0.0009112628079479213 -0.000177095596165465 1.5670587894354736e-05 +13.199999999999969 0.017276615753742938 -0.0009095993474000655 -0.0001876381884864195 1.7254091097398113e-05 +13.299999999999969 0.01725767626748867 -0.0009078539372767209 -0.00019194110552442887 1.7798683115015256e-05 +13.399999999999968 0.01723787842507408 -0.0009060703844843661 -0.00020341498395749094 1.7863232210092404e-05 +13.499999999999968 0.017216725860659216 -0.000904120330136493 -0.00021952567342177476 2.096906752784164e-05 +13.599999999999968 0.017193704995165728 -0.0009020515244896207 -0.00024063795464126733 2.0642324733302358e-05 +13.699999999999967 0.017169038114555113 -0.000899784188927746 -0.0002532416840614314 2.441497577024727e-05 +13.799999999999967 0.017142110869384296 -0.0008973808273323895 -0.00028413871454736645 2.3962284334460807e-05 +13.899999999999967 0.01711292036376755 -0.0008946953410037458 -0.00030076523990299757 2.9341869623260798e-05 +13.999999999999966 0.017081181352295926 -0.0008918584930731284 -0.000332870831523255 2.7881244006323508e-05 +14.099999999999966 0.017046888620034336 -0.0008886958498670621 -0.00035389328001129576 3.477987327346303e-05 +14.199999999999966 0.017010568930363797 -0.0008854601378617297 -0.00037241387602546196 3.0699852602585096e-05 +14.299999999999965 0.01697151450208114 -0.0008818690907983877 -0.0004077504501996674 4.016765232479435e-05 +14.399999999999965 0.016931142703305316 -0.0008782928105098639 -0.00040221560264600865 3.255697676515055e-05 +14.499999999999964 0.016888211271039878 -0.0008743736134421181 -0.0004526331983947041 4.443118409723878e-05 +14.599999999999964 0.01684407394978994 -0.000870465358557615 -0.00043489211345956817 3.52663072036497e-05 +14.699999999999964 0.016797600740501767 -0.0008662365496802958 -0.0004893179606575165 4.7711221202337166e-05 +14.799999999999963 0.016750440331002717 -0.0008620590897376781 -0.0004599189078598341 3.751140595519424e-05 +14.899999999999963 0.01670162308518401 -0.000857646542465405 -0.0005104242184401752 4.909581954206169e-05 +14.999999999999963 0.0166526660057703 -0.0008533233339283155 -0.00047504861856564927 3.899885850914312e-05 +15.099999999999962 0.016602709144963142 -0.0008488488018224148 -0.0005180945729666245 4.895610746940042e-05 diff --git a/applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_fluid_ref_block_ibqnls.dat b/applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_fluid_ref_block_ibqnls.dat index b8a6060e6007..fdc7d7637176 100644 --- a/applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_fluid_ref_block_ibqnls.dat +++ b/applications/CoSimulationApplication/tests/fsi_mok/fsi_mok_cfd_results_fluid_ref_block_ibqnls.dat @@ -1,153 +1,153 @@ # Results for "element" with Id # 221 for search config "initial" at position: x0: 0.57; y0: 0.27; z0: 0 # time VELOCITY_X VELOCITY_Y MESH_DISPLACEMENT_X MESH_DISPLACEMENT_Y MESH_VELOCITY_X MESH_VELOCITY_Y -0.1 1.1546093839756211e-05 2.0457955409701796e-06 5.541613540237803e-07 4.3301877915636095e-08 1.0492996052521283e-05 8.199172149706241e-07 -0.2 4.748001884210259e-05 9.260836857944463e-06 3.7051075764915077e-06 5.535077143254578e-08 5.098598647075076e-05 -4.4986373691144216e-07 -0.30000000000000004 0.00010926855709491923 2.2282168976136842e-05 1.331679248120207e-05 -6.923447402729299e-07 0.00013896178892779757 -1.3853770805086813e-05 -0.4 0.00019718787710427382 4.0077508834973616e-05 3.4102865808337134e-05 -3.4614967260668356e-06 0.00027464747721109306 -4.092315475899657e-05 -0.5 0.00031122122244531844 6.21179961075014e-05 7.04991450785169e-05 -9.44392535376386e-06 0.00045149102849942194 -7.829730332354427e-05 -0.6 0.0004509126919166243 8.764841945441754e-05 0.00012585072741478395 -1.9357325445182082e-05 0.0006545147533843789 -0.00011984307341195293 -0.7 0.0006160706357011286 0.00011538752675796086 0.00020236960903702794 -3.3480061341065756e-05 0.0008751298316435851 -0.00016257673204812573 -0.7999999999999999 0.0008066692631665496 0.00014455556594193577 0.0003018537631151547 -5.198373787662136e-05 0.0011137251246913242 -0.00020738862603870016 -0.8999999999999999 0.0010231131974458422 0.00017369782960969277 0.0004260320211218982 -7.508719270799845e-05 0.0013691030440220367 -0.0002545740052038439 -0.9999999999999999 0.0012658580911296849 0.0002009147323379538 0.0005766487629965695 -0.00010318634809317082 0.001642407664393239 -0.0003071334288441267 -1.0999999999999999 0.0015350148094928644 0.0002251224493186727 0.0007554889488428771 -0.0001368238743595745 0.0019335961191199553 -0.00036536685240242707 -1.2 0.0018306623754741724 0.00024442240126412615 0.0009638394422465638 -0.00017643733608822216 0.0022331435404363427 -0.00042678575972894333 -1.3 0.0021523580280987382 0.0002574488977789655 0.0012020846281153186 -0.00022215682966492996 0.0025318737000394782 -0.00048766369698222643 -1.4000000000000001 0.002500181970962562 0.0002626930216477233 0.001470335068377941 -0.00027411102121841294 0.0028329734357800517 -0.0005512527381954327 -1.5000000000000002 0.0028735647947016768 0.00025771088231893555 0.001767247697153924 -0.0003318574508131257 0.003106850814670642 -0.0006043101091252618 -1.6000000000000003 0.0032730041612301112 0.00024323047947625296 0.0020931145946655864 -0.0003958136155986603 0.0034085303457682004 -0.0006737340056633528 -1.7000000000000004 0.0036976648335247542 0.0002139304664630613 0.0024455001775705587 -0.00046523773114552896 0.003643427044121696 -0.000716516669825676 -1.8000000000000005 0.004147894134894557 0.00017317193575584137 0.002824394215419129 -0.0005406317708097617 0.003930459635897101 -0.0007892379832974087 -1.9000000000000006 0.004622886891865203 0.0001134614057381632 0.003226644604996427 -0.0006211369853726911 0.0041209757279939115 -0.000823557920421144 -2.0000000000000004 0.005122438088590495 4.0458908519536286e-05 0.003651572179181965 -0.0007070656343370228 0.00437253517397464 -0.0008924002700472443 -2.1000000000000005 0.005645988299813054 -5.5254156537260174e-05 0.004095212708385759 -0.0007973523142998964 0.0045080623696182424 -0.0009165035964699771 -2.2000000000000006 0.006192878362505771 -0.00016577673022560125 0.004556412474343874 -0.0008921586672075531 0.004710237275939193 -0.0009767952987275081 -2.3000000000000007 0.00676294486576987 -0.0003024959356284776 0.005030701486880151 -0.0009903081488070653 0.0047841799559192304 -0.0009895739813557882 -2.400000000000001 0.007354901888706939 -0.0004550358866901842 0.0055166880183179934 -0.0010918615166469231 0.00492938303036564 -0.001038609042146473 -2.500000000000001 0.0079692149429974 -0.0006367493539144974 0.006009907040062917 -0.0011957264716208253 0.00494389091933395 -0.0010419797599484058 -2.600000000000001 0.008603593596115237 -0.0008354554209997708 0.006508340313505617 -0.0013016214165861737 0.005019134772815881 -0.001073512594629878 -2.700000000000001 0.009259490980273226 -0.0010655216628185477 0.007007895727497982 -0.001408680333743048 0.004979826981241841 -0.0010702259787820502 -2.800000000000001 0.009933499155935038 -0.0013137685214636736 0.007506019709873912 -0.0015162619873155536 0.004978550061200428 -0.001080030650191239 -2.9000000000000012 0.01062811218643215 -0.0015946858896334318 0.007999275710195729 -0.0016237913114633294 0.0048923713237351025 -0.0010719083363062783 -3.0000000000000013 0.011338822149647095 -0.0018948350911375139 0.008484802857284639 -0.0017303460961685707 0.004816160574102673 -0.001059112137916441 -3.1000000000000014 0.012069186167012195 -0.0022285792476908787 0.008959828768393794 -0.001835602061084875 0.00468779416491548 -0.0010460414077903385 -3.2000000000000015 0.012813747341116594 -0.002582422944390905 0.009421501476919806 -0.0019384862786200377 0.0045455798226326175 -0.0010127706335492112 -3.3000000000000016 0.013576953406397415 -0.0029705531841330997 0.009867616107332038 -0.0020388239413293586 0.0043781511381062385 -0.0009929444402974785 -3.4000000000000017 0.014352722189893932 -0.003379261625558303 0.010295830848916235 -0.0021356473698610646 0.004187112183164955 -0.0009453458715435708 -3.5000000000000018 0.015146075902929238 -0.0038230406158686063 0.010704291387829315 -0.0022287915464017207 0.003982613578023563 -0.0009160525536092071 -3.600000000000002 0.015950492184518116 -0.004287089226568086 0.011091444190025508 -0.002317509523494045 0.003761261715875243 -0.0008601737009790038 -3.700000000000002 0.016771519777697298 -0.004787189172433811 0.011455612438553435 -0.002401538759527955 0.0035228576297862083 -0.0008191109365523117 -3.800000000000002 0.017602274776212196 -0.005305881095684583 0.011796574346740616 -0.0024806546019466484 0.0032955668184753775 -0.0007643040400381947 -3.900000000000002 0.01844879412699823 -0.005861288039174427 0.012112919686106668 -0.0025544549179223803 0.003033499572183817 -0.0007113249341969383 -4.000000000000002 0.019303713841987848 -0.006433239751783636 0.012405359263770448 -0.002623067924351719 0.0028124451110899014 -0.0006608866116494388 -4.100000000000001 0.020173753690184947 -0.0070416326124075335 0.01267289262312897 -0.0026860641695306033 0.002541727353981842 -0.0005996574237872956 -4.200000000000001 0.021051064084939588 -0.007664239480704561 0.01291689402894939 -0.0027437732673024065 0.0023338875576571928 -0.0005535207923832475 -4.300000000000001 0.021943039036856335 -0.008321483935228722 0.013137190661782226 -0.002796024092016368 0.002075965525933115 -0.0004925794042768762 -4.4 0.022841051828771934 -0.008988780962520695 0.013336010084301018 -0.002843396649896574 0.0018951079424933534 -0.0004533779561103938 -4.5 0.023753072700460186 -0.009687115616668941 0.01351389133716176 -0.002885921588454075 0.0016665301234609538 -0.000398382667849181 -4.6 0.02466971831525411 -0.01039088236408818 0.013672981204017335 -0.0029240257229608763 0.0015102000270672197 -0.000362319620531396 -4.699999999999999 0.02559967625363477 -0.01111982125912841 0.01381461902058987 -0.0029580334464523296 0.0013254232280518218 -0.0003186100657796852 -4.799999999999999 0.026532711508868156 -0.011847311641824182 0.013941333710910598 -0.0029884401871353105 0.0012045587778262295 -0.00028856245917610655 -4.899999999999999 0.027477790413911015 -0.01259199465934752 0.014055167373422339 -0.003015856834775483 0.001073751695593131 -0.0002599313858087629 -4.999999999999998 0.028424018518349758 -0.013327471587281668 0.014158385317049285 -0.0030406005525769214 0.0009876814254685864 -0.00023471090153796863 -5.099999999999998 0.029380295860323827 -0.014069641739117032 0.014253626196700349 -0.003063538689545564 0.0009170018773113167 -0.00022333130506668018 -5.1999999999999975 0.030335253548724246 -0.01479324754943815 0.014343007406756156 -0.003084897452321995 0.0008693600259219954 -0.0002044462648638831 -5.299999999999997 0.03129746165634183 -0.015512235839074063 0.01442921689720457 -0.003105583108116267 0.0008533652116775903 -0.00020786186159361833 -5.399999999999997 0.03225516769440887 -0.01620195707790473 0.014514231171441662 -0.0031257985121297726 0.0008467583439167489 -0.00019756858988323543 -5.4999999999999964 0.033216345773066605 -0.016874677708361135 0.014600834327567622 -0.0031465225589278906 0.0008829384912881638 -0.00021506839282809282 -5.599999999999996 0.03416914937492725 -0.017507968307634365 0.014690307346152853 -0.0031677076283495907 0.0009077527816990485 -0.0002103440898754028 -5.699999999999996 0.035120807921443564 -0.01811147532467424 0.014785467491114208 -0.0031904144516344546 0.0009918099787111147 -0.0002413545233315011 -5.799999999999995 0.03605968448719163 -0.018666320484818796 0.01488686032851883 -0.003214367863303205 0.0010390289540544197 -0.00024013604921695463 -5.899999999999995 0.036992016091308325 -0.019178999114246965 0.014997365976281037 -0.0032407428521663405 0.001165860261349145 -0.0002842104206881937 -5.999999999999995 0.03790677471134686 -0.019635709907712597 0.015116514732976552 -0.003268932442914643 0.001222376055155056 -0.0002829214112910956 -6.099999999999994 0.03880913351290586 -0.020039542937011958 0.015246779810271213 -0.0033000216517416773 0.0013761399873077275 -0.0003350244578488214 -6.199999999999994 0.03968896400727022 -0.02038048757661663 0.015387732731581779 -0.0033335991369652044 0.0014491568380883765 -0.00034012851653944347 -6.299999999999994 0.04055006070626077 -0.020660547801727946 0.015540764639662707 -0.003370270185853216 0.0016052487514630522 -0.00038988021405732823 -6.399999999999993 0.041383813191832555 -0.020873123107987113 0.01570502258458846 -0.003409649153649171 0.0016857218484884573 -0.00040073988040591023 -6.499999999999993 0.042192736952209056 -0.021018499201096944 0.015881139791281328 -0.0034520080014771044 0.0018314961663384588 -0.00044386212167731303 -6.5999999999999925 0.04296992932160705 -0.021094074319204924 0.016068153398341563 -0.003497126012760088 0.0019136368940681275 -0.0004606245803712033 -6.699999999999992 0.04371631952318324 -0.021097865112767702 0.016266148764123 -0.0035450352881666748 0.0020424309424722036 -0.0004959832706373903 -6.799999999999992 0.04442720017168274 -0.021032608348521345 0.016473445801367587 -0.003595362546081224 0.0021080246891630496 -0.0005120419287433929 -6.8999999999999915 0.04510191554077342 -0.02089230659133568 0.016689827937923313 -0.003648029285337682 0.0022160997465395806 -0.0005402400039040092 -6.999999999999991 0.04573799579645377 -0.02068510702606517 0.01691355249144644 -0.003702763502871225 0.002262727318812999 -0.0005554387709677542 -7.099999999999991 0.04633308633937969 -0.02040198852102981 0.017143818181308872 -0.003759222998203857 0.002339790477951938 -0.0005733499561173127 -7.19999999999999 0.04688704889672839 -0.02005533347405586 0.01737864388993209 -0.003817111724116539 0.0023605876560659758 -0.0005848835940587037 -7.29999999999999 0.04739616072921193 -0.019633560153364933 0.017616888295947482 -0.00387592653288555 0.0024021655581312603 -0.0005915704545713009 -7.39999999999999 0.047862505968164826 -0.019152845240072495 0.017856704790356268 -0.0039354931227082515 0.002397309941972256 -0.0005996438793313665 -7.499999999999989 0.04828081494524165 -0.01859950696536026 0.01809661005088545 -0.00399512570711075 0.0023996065528582413 -0.000593818956413338 -7.599999999999989 0.04865532258283431 -0.017993025246073657 0.018334849578836465 -0.004054726251655869 0.002367420817099139 -0.0005974568633841089 -7.699999999999989 0.048979232411950666 -0.017317382547992706 0.018570062952179417 -0.004113638449752604 0.002336231403882574 -0.000582042553523598 -7.799999999999988 0.04925887271165008 -0.016595672324094757 0.018800383311259813 -0.004171689189162516 0.0022721781786221415 -0.000578017713266214 -7.899999999999988 0.04948625520311402 -0.015809541561243468 0.01902426640607725 -0.00422810114100643 0.0022051504342049943 -0.0005517131863393387 -7.999999999999988 0.04966982321253838 -0.014984867180064537 0.019240360244984777 -0.004282942406676773 0.0021179446779896445 -0.0005437097263693797 -8.099999999999987 0.049800085274044725 -0.01410120927340162 0.01944720829978541 -0.004335409418004534 0.002019352330283329 -0.0005075640973683767 -8.199999999999987 0.04988752437357178 -0.013187344654017214 0.01964361350991488 -0.004385610641840375 0.0019093118516079885 -0.0004946691303180888 -8.299999999999986 0.049921487468859486 -0.01222078211211641 0.019828067364463756 -0.004432668444196564 0.0017806714880677296 -0.0004487900835475577 -8.399999999999986 0.04991424224283792 -0.01123225549045498 0.019999750667481837 -0.00447681213143912 0.0016527287676914634 -0.0004318784524845439 -8.499999999999986 0.04985403125265474 -0.01019776526108924 0.020157482573529117 -0.004517287254005901 0.0015031905510686202 -0.0003801346127912859 -8.599999999999985 0.04975490720425975 -0.009150526337441449 0.02030024464311824 -0.004554159839231689 0.0013518328852760333 -0.0003551824087348423 -8.699999999999985 0.04960413336495155 -0.008063885275685587 0.020427447553222088 -0.004586962156894817 0.0011927162478166374 -0.00030293307861613305 -8.799999999999985 0.04941717036594492 -0.006973403233060174 0.020538135747815194 -0.004615704107953749 0.0010215998952654804 -0.00027028603066830373 -8.899999999999984 0.049180451386323334 -0.005850290531983601 0.02063205941403272 -0.004640082142604397 0.0008564024289303387 -0.0002187425638781026 -8.999999999999984 0.04891068821142479 -0.004731666204819694 0.020708285381628673 -0.004660033160786879 0.0006694579428861052 -0.00017923386849643302 -9.099999999999984 0.04859377418349865 -0.0035872108013024384 0.020766741986357546 -0.004675334642208493 0.0004984428673745045 -0.0001277313928921306 -9.199999999999983 0.04824732832550235 -0.002454871285836406 0.02080662037840024 -0.004685918415553247 0.00030092365240315757 -8.331175608174511e-05 -9.299999999999983 0.04785685704225378 -0.0013034731609652536 0.020828167058521606 -0.004691729558215981 0.00012816736558462274 -3.337927418911295e-05 -9.399999999999983 0.04744051251011923 -0.00017147465082444557 0.020830406425621395 -0.004692543750559601 -8.087811057829125e-05 1.7177362844094792e-05 -9.499999999999982 0.046983772745391075 0.0009727367854245128 0.020813942260480306 -0.004688529206540641 -0.00025120839976358925 6.334018570071351e-05 -9.599999999999982 0.0465047477379453 0.002091099993716632 0.020778092116377593 -0.004679542203118199 -0.0004627741838239555 0.00011597894432005494 -9.699999999999982 0.04598911695424847 0.003214636001369982 0.020723263417310553 -0.004665661665803842 -0.0006366736050433571 0.00016210346259355502 -9.799999999999981 0.045454837653183575 0.004306834423036124 0.020648990167678946 -0.004646819243782604 -0.0008460758991094904 0.0002142862831700435 -9.89999999999998 0.04488811940049395 0.0053974496301911305 0.0205554560642783 -0.004622986362691826 -0.001026892960368622 0.00026269812960620734 -9.99999999999998 0.04430639112569817 0.0064522323288188875 0.020442478762049184 -0.004594213991045362 -0.0012307835030191568 0.00031258465489731517 -10.09999999999998 0.04370795165633537 0.007501747052950638 0.020310803749718435 -0.004560497159605758 -0.0014048611161783819 0.0003618292448632531 -10.19999999999998 0.0431216077295901 0.008517703732477688 0.020162377055850618 -0.004522130776352618 -0.0015639781979243264 0.0004057770467849214 -10.29999999999998 0.04253476196744464 0.00952655050071616 0.020000905078502204 -0.004479990867588822 -0.0016684583189006596 0.0004376317108491511 -10.399999999999979 0.04196137459633059 0.010497746236355864 0.019830825893036703 -0.004435629316159822 -0.0017345362700007315 0.00045051387524751513 -10.499999999999979 0.04138820632192749 0.01145439933967639 0.01965621251624235 -0.00439037466321495 -0.0017596810375624843 0.0004548322570422165 -10.599999999999978 0.04082815675600705 0.012370393130958252 0.019480335085513768 -0.004345206832259405 -0.0017588417378730523 0.000449030359436854 -10.699999999999978 0.040269857289974384 0.013266500036572195 0.0193053466070177 -0.004300549493334818 -0.001741606559981255 0.00044394936870140135 -10.799999999999978 0.03972642984965684 0.014119026384164636 0.019132410547788744 -0.00425637379541347 -0.0017173404334742087 0.00043956705190488396 -10.899999999999977 0.03918820042899401 0.014947722388188213 0.018963593203562744 -0.0042132185822373585 -0.0016607672696744575 0.0004241569111691068 -10.999999999999977 0.038667276654536176 0.015729987364702817 0.018800262155270087 -0.004171298054738148 -0.0016053485538243184 0.00041381369918489327 -11.099999999999977 0.03815457963266273 0.01648380332703369 0.018644890574651143 -0.004131599088913001 -0.0015047506722170154 0.00038151083278639686 -11.199999999999976 0.0376608135586336 0.017188405709975596 0.018498088242740615 -0.0040940889577221334 -0.0014292190835974556 0.0003673357967083463 -11.299999999999976 0.03717789496540738 0.017860802349969607 0.018361659076920337 -0.004059578994261105 -0.0013027487573960858 0.0003247978829617207 -11.399999999999975 0.03671562096217569 0.01848207576027671 0.018234898740724037 -0.0040274367326773855 -0.0012286650860474351 0.0003156836633076026 -11.499999999999975 0.036267286851687904 0.019067675497283144 0.018118849379261035 -0.00399820879023722 -0.0010965354489089788 0.0002714420241917159 -11.599999999999975 0.03584156242738014 0.019600674997503526 0.018012367987121046 -0.003971147978164828 -0.00102843729645332 0.0002668994359693582 -11.699999999999974 0.03543262644246546 0.020094549176133233 0.01791646492387744 -0.003946928160215684 -0.0008944916635531589 0.00022056633469441671 -11.799999999999974 0.03504718849997425 0.020535617037954777 0.01783023932278565 -0.003925021192719087 -0.0008251684248267806 0.000214538491547594 -11.899999999999974 0.034680341345259894 0.020934177470204245 0.017754019531888376 -0.0039058553001992875 -0.0007033909284740878 0.0001716134567985087 -11.999999999999973 0.0343369595288187 0.021281199204231466 0.01768670351099204 -0.0038888520325461133 -0.0006386786851319916 0.00016566352238364364 -12.099999999999973 0.034013483646281206 0.021583146865841132 0.017628052132693327 -0.0038742155545639203 -0.0005374647993118061 0.00012946463437046803 -12.199999999999973 0.03371269673989249 0.021836288644008783 0.01757690501084819 -0.0038613468799582754 -0.0004821186005751246 0.00012549624302719064 -12.299999999999972 0.03343271578549198 0.02204232405031211 0.017532622757177763 -0.003850308439675381 -0.0004055594600622437 9.7241806359029e-05 -12.399999999999972 0.03317399176376862 0.022203465833273015 0.017494303709872858 -0.0038406426173601465 -0.00035864568729309764 9.416602940467422e-05 -12.499999999999972 0.03293630908057529 0.02231643907389647 0.017461145851178046 -0.0038323723762909785 -0.00030541098838423805 7.274771248687518e-05 -12.599999999999971 0.032717658500602854 0.022389538844804692 0.017432628149943404 -0.0038252423372148745 -0.00026405025055272136 6.850946026879753e-05 -12.69999999999997 0.03251953611274351 0.02241456585625832 0.017407453207290792 -0.0038190098232182097 -0.00023876741683219796 5.6891812836875046e-05 -12.79999999999997 0.03233780787155774 0.022405648932377332 0.017385384098281456 -0.0038135655394191587 -0.00020335485687235784 5.145825955510691e-05 -12.89999999999997 0.032175732266254 0.02235011150608704 0.01736501990072892 -0.0038085782230727156 -0.00020183746745578864 4.829430343090726e-05 -12.99999999999997 0.03202712248249456 0.022266726446409153 0.017346134316089928 -0.0038039362961325737 -0.00017767113504799006 4.457397244368756e-05 -13.09999999999997 0.031897166589559885 0.022139083139527848 0.017327462147093516 -0.0037993675731268564 -0.00019309601192689697 4.647675335824343e-05 -13.199999999999969 0.03177736127737277 0.0219910488378011 0.0173093447561593 -0.0037949945490656153 -0.00017197648756553624 4.1454210885226755e-05 -13.299999999999969 0.03167478891996974 0.02180157271631197 0.017290317325099818 -0.003790405288732166 -0.00020485364980101861 4.947943799033323e-05 -13.399999999999968 0.03157903907156457 0.02159913775509859 0.01727077723918699 -0.0037857329262091085 -0.00018958584387062164 4.489026208832938e-05 -13.499999999999968 0.031499380774507986 0.021358511983117726 0.017249150566773654 -0.00378045851051648 -0.0002384317634806808 5.929881700150868e-05 -13.599999999999968 0.031423327537349416 0.02111296952625099 0.017226497776222555 -0.003775026803643159 -0.00021956201414813343 5.0940751551041686e-05 -13.699999999999967 0.03136210007064375 0.020832583043597912 0.017201115080695502 -0.003768812310562312 -0.0002822687286505146 7.133067776334269e-05 -13.799999999999967 0.03130138436863136 0.02055517214068392 0.017174519584436738 -0.0037624809736576618 -0.0002560964327931269 5.771356438241689e-05 -13.899999999999967 0.03125420063837761 0.020246932833691857 0.01714491354633522 -0.0037552717653031647 -0.0003288461565659318 8.36418007698623e-05 -13.999999999999966 0.03120487997502716 0.019948108098323373 0.017113607922577337 -0.003747761560125299 -0.000304521306536005 6.952219442553099e-05 -14.099999999999966 0.03116811264519384 0.019623294913549416 0.017079278871676824 -0.003739369604005398 -0.0003749178841814597 9.533098285684077e-05 -14.199999999999966 0.031127004057485592 0.01931319339417443 0.017043136914222972 -0.003730620861617325 -0.0003547982581742192 8.256043864472283e-05 -14.299999999999965 0.031097457646681953 0.018982106142543323 0.017004360549301895 -0.003721152568031589 -0.00041451878341965055 0.00010414387805615568 -14.399999999999965 0.031061694515307034 0.018670039922219297 0.01696386081562952 -0.0037113377825806005 -0.0004011402748849344 9.456982847300939e-05 -14.499999999999964 0.031036617881792225 0.01834189398867583 0.016921184137625115 -0.003700948229322318 -0.0004476106871915491 0.00011114579870092868 -14.599999999999964 0.03100393794894534 0.0180360461738877 0.016876959208351184 -0.003690225789210467 -0.0004410656659282683 0.00010509463908759999 -14.699999999999964 0.030981245795957454 0.01771853683521463 0.016830988798312678 -0.0036790194122340225 -0.00047502000397068266 0.00011754431931251217 -14.799999999999963 0.03095008997621381 0.01742555404431564 0.01678376978226659 -0.003667542300782381 -0.00047225633742685295 0.00011330860826176133 -14.899999999999963 0.03092828400231989 0.017124909331082277 0.016735412610159532 -0.0036557430297146174 -0.0004928492897822876 0.0001216421196935176 -14.999999999999963 0.030897508341677166 0.01684999866309872 0.016686279746551777 -0.0036438133810640077 -0.0004915489346518854 0.00011788937838528354 -15.099999999999962 0.03087545949524801 0.016570748674867516 0.016636509162171124 -0.003631660016766852 -0.0005027256780965381 0.00012436777479457906 +0.1 1.1546093839754041e-05 2.045795540974083e-06 5.541613540284633e-07 4.3301877897389734e-08 1.0492996052609953e-05 8.19917214625131e-07 +0.2 4.7480018841894495e-05 9.260836857866468e-06 3.705107575967778e-06 5.535077172377476e-08 5.098598646067198e-05 -4.498637307658579e-07 +0.30000000000000004 0.00010926617741538651 2.2293799989381104e-05 1.3320982255160938e-05 -6.953733498399398e-07 0.0001390411219440791 -1.3911117268994221e-05 +0.4 0.00019717354408177963 4.008174289479852e-05 3.409094575441664e-05 -3.4535396683766785e-06 0.0002742768367489792 -4.066772101067491e-05 +0.5 0.0003112523909661735 6.201651189062316e-05 7.046379633402561e-05 -9.431276360022532e-06 0.00045134729816910784 -7.841491418918685e-05 +0.6 0.00045098736967230397 8.726032142091687e-05 0.0001256802485711856 -1.9300364035426334e-05 0.0006521074222196543 -0.0001189292142168863 +0.7 0.0006161789204017853 0.00011499426391468545 0.00020211576294439315 -3.3419603065338274e-05 0.0008755457948504666 -0.00016325081214969115 +0.7999999999999999 0.0008068195640872169 0.00014387527704403367 0.0003014215170155416 -5.18801399971498e-05 0.0011102025217437472 -0.00020609426093405492 +0.8999999999999999 0.0010233541303942381 0.00017271167186780616 0.00042536639948676744 -7.494229467421864e-05 0.001367512569584655 -0.0002547862676138261 +0.9999999999999999 0.0012660786409007985 0.00019973849232845955 0.0005756559376623939 -0.00010296976154516067 0.0016378415201723957 -0.0003057272085040507 +1.0999999999999999 0.0015353242887769076 0.00022386951676938978 0.0007542300671214562 -0.00013657148044458168 0.0019323880013519317 -0.0003658023367697409 +1.2 0.0018308990400317925 0.00024322276939809593 0.0009623309488153628 -0.00017615080423508822 0.002229782687889059 -0.00042590859609684177 +1.3 0.002152613817935386 0.0002564610625502271 0.0012004730722105714 -0.00022189421849745964 0.002532710289690757 -0.0004887734063943849 +1.4000000000000001 0.002500180218856525 0.0002622838016427256 0.0014686683043529563 -0.0002738506794686874 0.0028315137108965425 -0.0005504681973094815 +1.5000000000000002 0.0028735896857812844 0.0002576705481324384 0.0017657455181154065 -0.00033167507494234836 0.0031110353264836126 -0.0006063202690476135 +1.6000000000000003 0.0032726610225138984 0.00024312518780353175 0.002091257370237031 -0.0003954343617292932 0.003398503529853312 -0.0006684378903095954 +1.7000000000000004 0.003697555473048286 0.00021452890075115773 0.002443833037251146 -0.00046491346297170943 0.0036549304302453587 -0.0007217465336426519 +1.8000000000000005 0.004147590298897098 0.000173214940814443 0.0028225474041037642 -0.0005401716239062083 0.0039184763093029675 -0.0007828288179656574 +1.9000000000000006 0.0046228960666828195 0.00011441503610907132 0.003225306285290638 -0.0006208678983120958 0.004139323277543942 -0.0008319182356698194 +2.0000000000000004 0.005122245667857149 4.036460711412308e-05 0.0036502078626489166 -0.0007067429905648899 0.004358165543355913 -0.0008851454660439448 +2.1000000000000005 0.005646064016130488 -5.4192215923760905e-05 0.0040944541192222 -0.0007972821839018023 0.004529563984797034 -0.0009264202610209203 +2.2000000000000006 0.006192614236786648 -0.00016565520547919728 0.00455565410954807 -0.0008920369964765127 0.004694119629845625 -0.0009684386956606046 +2.3000000000000007 0.0067628546151265335 -0.00030182383448210256 0.005030005019263062 -0.0009901802718722374 0.00479647630450717 -0.0009953366622830289 +2.400000000000001 0.007354657736168632 -0.00045427039112695217 0.0055162500986286785 -0.0010918147743128636 0.004926002558930292 -0.0010363328964716125 +2.500000000000001 0.007969097674153668 -0.0006365190804739815 0.006009288840153533 -0.0011955314476510294 0.0049417765190879455 -0.0010403365267747278 +2.600000000000001 0.008603384977226354 -0.0008342789869504875 0.006508144515094077 -0.0013016034822320934 0.005029536693301969 -0.0010785934291705761 +2.700000000000001 0.009259429884424361 -0.0010653465371409368 0.0070076674967092314 -0.0014085788555186205 0.004970623393518676 -0.0010644871494717807 +2.800000000000001 0.009933231594268137 -0.0013117670946394744 0.0075065129807964474 -0.001516451490824485 0.00499895372058592 -0.0010898520258861887 +2.9000000000000012 0.010627971498959696 -0.00159465684256015 0.00799963060133581 -0.0016238393965581353 0.0048738618317554884 -0.0010616950743015843 +3.0000000000000013 0.01133842684064739 -0.0018923940376580138 0.008485777838548383 -0.0017306292536505995 0.0048412643184823426 -0.0010710450561626896 +3.1000000000000014 0.012069122947185953 -0.002228829814772765 0.008960608306870687 -0.0018357247675352545 0.004665360666755151 -0.0010342264570560916 +3.2000000000000015 0.012813323296524782 -0.002579852088517341 0.009422816051411041 -0.0019387984492170644 0.004571666060543785 -0.0010248625417357078 +3.3000000000000016 0.013577078101253293 -0.0029713776082656374 0.009868716344312129 -0.0020390115923067387 0.004355036906661495 -0.000981887125684958 +3.4000000000000017 0.01435230192026377 -0.0033768039101417673 0.010297362813980828 -0.002135994927269559 0.004211601084506912 -0.000956186183035811 +3.5000000000000018 0.015146371698333104 -0.0038237602942802346 0.010705943416681386 -0.0022291970831766804 0.003967259754852521 -0.0009094391266388396 +3.600000000000002 0.015949871049925037 -0.004284771260528507 0.011093260294010338 -0.0023179347864501773 0.0037743713673910667 -0.0008648007762358709 +3.700000000000002 0.01677178906715011 -0.004787556718210038 0.011457616209356291 -0.002402081584260256 0.0035175213853092663 -0.0008183648350935963 +3.800000000000002 0.017601474863304902 -0.005303703645077387 0.01179844641724528 -0.002481026684749071 0.003295907150254889 -0.0007610894780454394 +3.900000000000002 0.01844916749195824 -0.0058614967683707705 0.012115072967555058 -0.0025549977791701536 0.003039381527076551 -0.0007174285243470956 +4.000000000000002 0.01930296844785479 -0.00643169449259893 0.01240721453689721 -0.0026233791432968513 0.002801700436995778 -0.0006516678395674687 +4.100000000000001 0.02017431447126412 -0.007042022645134832 0.012675116821822641 -0.002686627071041053 0.0025571680051782184 -0.0006114847076243543 +4.200000000000001 0.0210503900273197 -0.007663089679056969 0.012918909936705737 -0.00274418586329572 0.002318176906574138 -0.0005418019910287554 +4.300000000000001 0.021943561740719635 -0.008321777816983442 0.013139580647297967 -0.002796690611489773 0.002094504950008206 -0.0005058669525673121 +4.4 0.022840329807594442 -0.008988053210475652 0.013338013330831028 -0.002843839986843048 0.0018741454819879034 -0.0004394421109944588 +4.5 0.023753560420555417 -0.009687861322624995 0.013515850755762268 -0.0028864138456961993 0.0016810691499066313 -0.0004094077144137019 +4.6 0.024669167123478695 -0.010390495048770116 0.01367460702370095 -0.0029243536794060065 0.0014940963517654508 -0.00035160761829516565 +4.699999999999999 0.025600303093438068 -0.01112084232661108 0.013816292310426904 -0.0029584410976046856 0.0013378698669069045 -0.0003276807140096275 +4.799999999999999 0.026532366143863714 -0.01184765330295757 0.01394271482916586 -0.0029887687240259977 0.0011905162859873089 -0.00028077914710608067 +4.899999999999999 0.027478398293170544 -0.01259331080904956 0.014056395316089283 -0.0030161669144741373 0.0010809821634200798 -0.0002649594722563149 +4.999999999999998 0.028423801517005673 -0.01332843184320193 0.014159153114888988 -0.0030407612915591365 0.0009745283665204961 -0.00022863761462522584 +5.099999999999998 0.02938100391686902 -0.014071031261199674 0.01425426645590561 -0.003063690415955729 0.0009244771691044001 -0.00022753632979139566 +5.1999999999999975 0.030335324232982065 -0.014794973130222155 0.014343172684143198 -0.0030849117697583166 0.0008555258487401101 -0.0001990341807507959 +5.299999999999997 0.03129816859422185 -0.015513132583098267 0.014429545758804872 -0.003105719938054555 0.0008669451819562461 -0.00021414035818703372 +5.399999999999997 0.03225528764878146 -0.016203865705438025 0.014514148058454997 -0.0031258095094014904 0.0008291185142333844 -0.00019057362662932474 +5.4999999999999964 0.03321695026584577 -0.016875545639207377 0.01460062069527722 -0.0031464800686498828 0.0008935762961235401 -0.00021917259807516462 +5.599999999999996 0.034169536513998455 -0.017510153758652898 0.01468966673119018 -0.003167536394619128 0.0008927084691558181 -0.00020526136062592765 +5.699999999999996 0.035121494067761425 -0.018112226055064004 0.014784743804589023 -0.0031901932884895526 0.0010013330397056729 -0.00024408340959261278 +5.799999999999995 0.03606026070699331 -0.01866802949510761 0.014886230815742604 -0.003214268901422363 0.0010345252437601578 -0.0002407484571882154 +5.899999999999995 0.03699260587130805 -0.01918002469251615 0.014996439667960167 -0.0032404715592201064 0.0011627752823025908 -0.00028007508296292377 +5.999999999999995 0.03790747433005946 -0.019637196591685935 0.01511571452705624 -0.003268808955735035 0.0012279869382140112 -0.0002891802105591236 +6.099999999999994 0.038809659590680674 -0.02004034314934803 0.015245710001975284 -0.0032997180190414807 0.0013664839966273444 -0.00032677184855400186 +6.199999999999994 0.03968960202575915 -0.020381136674596047 0.015387062348830617 -0.0033335400997755883 0.001464215636175403 -0.0003509798949116934 +6.299999999999994 0.040550465000204344 -0.020661520291506617 0.015539572163629993 -0.003369898276670952 0.0015838362320924095 -0.0003758205278069545 +6.399999999999993 0.041384451631169036 -0.020873026250100776 0.015704336123534286 -0.003409556843403912 0.0017115252255610468 -0.0004165479535516217 +6.499999999999993 0.042193145654893016 -0.021019565245451302 0.015879983336691585 -0.0034516373530842316 0.0018034123290068256 -0.0004269677571269535 +6.5999999999999925 0.042970484658611974 -0.021093358062458212 0.01606757492524671 -0.0034970479260236532 0.0019451187808906191 -0.00047845715756966137 +6.699999999999992 0.04371682399389329 -0.02109956570019416 0.016264902709493573 -0.00354462699214838 0.0020067654330806935 -0.0004768097465903155 +6.799999999999992 0.04442767343959381 -0.021031128821049842 0.016472816376607864 -0.003595252037715081 0.0021458214975082724 -0.0005315954089519208 +6.8999999999999915 0.045102522632642875 -0.02089436543032514 0.016688579816324843 -0.003647643012343614 0.002176940366972201 -0.0005209296642159286 +6.999999999999991 0.04573832436565502 -0.0206830233648363 0.016912842120063717 -0.0037026138696699797 0.0023011936305984545 -0.00057374052793642 +7.099999999999991 0.04633377897851276 -0.020404210908690445 0.017142574368663916 -0.0037588731760139884 0.002302164022255529 -0.0005565688552124856 +7.19999999999999 0.04688717873075676 -0.02005261683584687 0.017377886783708753 -0.003816940789233483 0.0023966460773598296 -0.0006000886973966485 +7.29999999999999 0.04739688297381912 -0.01963577473991747 0.017615758146279352 -0.0038756566805022556 0.002369483249063792 -0.0005790350639294036 +7.39999999999999 0.04786232510705884 -0.01914947925664947 0.01785591453033809 -0.003935286731238531 0.0024267213604982304 -0.0006094683287781955 +7.499999999999989 0.04828154878595088 -0.01860156274711356 0.01809561075824285 -0.003994913035197473 0.002375059584185863 -0.0005870547886832038 +7.599999999999989 0.04865482482440723 -0.01798908627366512 0.018334174933182713 -0.004054535576737404 0.0023904861014505422 -0.000602279623931719 +7.699999999999989 0.048980020932131135 -0.01731961418183254 0.01856912031390639 -0.004113420493637755 0.0023149714093404807 -0.0005783975805444845 +7.799999999999988 0.04925812667976655 -0.016591279457350526 0.018799750190160364 -0.004171480098536698 0.002292978065802576 -0.0005805834790837139 +7.899999999999988 0.04948707177132295 -0.01581172646209124 0.019023665890403923 -0.004228022370936881 0.002190997247034426 -0.0005525164553835661 +7.999999999999988 0.04966857678556286 -0.014979993111486586 0.019240114526113745 -0.004282876563533042 0.002134028226518791 -0.0005429624193665807 +8.099999999999987 0.04980079554961028 -0.014103478808989916 0.019446904772419987 -0.004335417406512591 0.002006720085306103 -0.0005095951773548902 +8.199999999999987 0.04988597160489555 -0.013182320819193384 0.019643316006555223 -0.004385452930128402 0.0019180929446900663 -0.00048991046820522 +8.299999999999986 0.049922308064666375 -0.012222785874987353 0.019827916572332717 -0.004432681623505765 0.0017776840099561887 -0.0004557773301566308 +8.399999999999986 0.04991249921403932 -0.011227371587361522 0.019999614803155874 -0.004476681520837855 0.0016543772020962111 -0.0004238197581894604 +8.499999999999986 0.049855080821853054 -0.010200222890936583 0.02015728195053941 -0.004517224695411907 0.0015011259705117442 -0.0003873952149969208 +8.599999999999985 0.04975307724997113 -0.009145650841530668 0.02030023389647733 -0.004554085617368751 0.001356867073209009 -0.00034980113988414827 +8.699999999999985 0.04960528791841962 -0.008066624335355887 0.020427424544330965 -0.004586982017902553 0.0011885600591884343 -0.00030834938627146054 +8.799999999999985 0.0494151164456469 -0.006968628234550173 0.020538286405577734 -0.004615729769380846 0.001027846490609668 -0.0002665685266381785 +8.899999999999984 0.04918166755051323 -0.005853112270358807 0.020632008516268955 -0.004640074775466035 0.0008478860296930301 -0.00022057768567922375 +8.999999999999984 0.04890863550162502 -0.004727082997724997 0.020708351484726075 -0.004660027414395155 0.000678079598649474 -0.00017820978013282344 +9.099999999999984 0.04859521352690094 -0.0035902392653750564 0.020766567639380555 -0.00467526079081741 0.00048762820858501356 -0.00012702029060389147 +9.199999999999983 0.04824534678844042 -0.0024505786987376638 0.02080671118247604 -0.004685950132897768 0.0003139528244547153 -8.605102768360543e-05 +9.299999999999983 0.04785836736024311 -0.0013066953922294415 0.020827986700674678 -0.00469165995962536 0.00011339228663072228 -2.921679239394215e-05 +9.399999999999983 0.04743852298630369 -0.00016739971086364783 0.02083057760789768 -0.0046926411848206085 -6.337140173108733e-05 1.0805766658726008e-05 +9.499999999999982 0.04698516442137958 0.0009696245819653952 0.020813941598492543 -0.0046885502073377334 -0.00026736764051996326 6.965160404981283e-05 +9.599999999999982 0.04650265688709639 0.002095077831952185 0.020778382444828575 -0.0046796783616309895 -0.0004457514200553257 0.00010921073221620074 +9.699999999999982 0.045990426189852204 0.0032115311538230083 0.020723317319855238 -0.004665669705110424 -0.0006534198225462401 0.00016944316904979196 +9.799999999999981 0.0454528238908791 0.004310678294008503 0.020649200972645256 -0.004646857803851785 -0.0008311253477188325 0.00020837293845230953 +9.89999999999998 0.044889395065510505 0.005394443706104733 0.02055570129201114 -0.004623046704885098 -0.0010367436166127662 0.0002663813468553275 +9.99999999999998 0.04430442890088124 0.006455711419510521 0.020442866064443874 -0.004594287838804412 -0.0012216567601230702 0.00030997379597464574 +10.09999999999998 0.04370916522848076 0.007498454685434228 0.02031118270323224 -0.004560600786445168 -0.0014113193513290922 0.0003629452281114186 +10.19999999999998 0.04311971012719683 0.008521030285474407 0.020162856394500224 -0.004522226159606132 -0.0015578081285434278 0.00040534733877678323 +10.29999999999998 0.042535978573207456 0.009522924502896189 0.020001301941244744 -0.0044801006009594045 -0.001674316981024373 0.0004375382089108024 +10.399999999999979 0.041959627363832505 0.010500909079825467 0.019831265155613682 -0.004435704053837963 -0.0017296034779806526 0.0004513338703205071 +10.499999999999979 0.04138938596194007 0.011450793323388775 0.019656710213952516 -0.004390550199822532 -0.001761987436437352 0.0004522333367548661 +10.599999999999978 0.04082647488672303 0.01237342076029612 0.019480826681681176 -0.0043453089076780265 -0.0017576270576601018 0.0004525052730158023 +10.699999999999978 0.04027127658698894 0.013261976000313182 0.019305375775613906 -0.004300528887532266 -0.0017510308659927714 0.00044363139048623644 +10.799999999999978 0.03972509317169009 0.014122172942842348 0.019132516306129846 -0.004256336163901653 -0.0017082821524661532 0.00043980509046331927 +10.899999999999977 0.03918986099382147 0.014942808224392135 0.01896345474778893 -0.004213183508099542 -0.0016720514680218946 0.00042402492824316436 +10.999999999999977 0.038665876365615456 0.015733588372598827 0.018800644895660173 -0.004171460011211801 -0.0015871099457629317 0.00041014395449412173 +11.099999999999977 0.03815611495275716 0.016478398748190033 0.018644757811650575 -0.00413161244875129 -0.0015284143104839752 0.00038738210758568583 +11.199999999999976 0.03765933767966019 0.017192352409318275 0.018498235405874332 -0.004094156091121268 -0.0014061631588235986 0.0003617621126252826 +11.299999999999976 0.03717958033817154 0.01785520263787211 0.01836119111189699 -0.004059438178127166 -0.001331039462892751 0.00033278094624641013 +11.399999999999975 0.03671429111576526 0.018486095419024087 0.018234689257641698 -0.00402732499701451 -0.0012029005430176265 0.0003091362971615331 +11.499999999999975 0.0362690956118875 0.019062188464302618 0.01811844787786055 -0.003998112936328521 -0.0011184915159346373 0.0002757400392651824 +11.599999999999975 0.03584016729886959 0.01960445058465809 0.01801218418159553 -0.0039710550889792235 -0.0010090494045267063 0.0002640378364459377 +11.699999999999974 0.03543421911388657 0.020089716762819777 0.01791638940566882 -0.00394699753070576 -0.0009059240477682394 0.00021931548045778286 +11.799999999999974 0.0350456156138346 0.02053900867602828 0.01783010739645226 -0.00392494532815652 -0.000819033448039808 0.00021869717956906205 +11.899999999999974 0.03468171531061172 0.02093030853186811 0.017754097919360643 -0.003905962011084776 -0.0007029678590682765 0.00016472799671583317 +11.999999999999973 0.03433532242388817 0.02128421430494188 0.017686672486729595 -0.003888794867119278 -0.0006419892117649211 0.00017411158074452017 +12.099999999999973 0.03401459538528023 0.021580363101955484 0.0176282943442172 -0.0038743325259803533 -0.0005293665118872458 0.00011984158155252919 +12.199999999999973 0.03371122405336667 0.021838236429953372 0.01757676924022248 -0.0038612121166830293 -0.0004957436109648491 0.00013735235126352134 +12.299999999999972 0.03343366861531158 0.022040814056929738 0.017532934432778625 -0.0038504069672055143 -0.00038655130614223684 8.40381085199611e-05 +12.399999999999972 0.03317265653047488 0.022204683036309784 0.017494447790489073 -0.003840641157617476 -0.00037622086761231194 0.00010573674142715401 +12.499999999999972 0.032936910560633546 0.022316024362079058 0.017461728971190398 -0.003832562025014588 -0.0002844752880532319 6.096992747013422e-05 +12.599999999999971 0.032716439067458636 0.022389925610502757 0.01743289138138136 -0.0038253000773072546 -0.00028547939579395707 7.943142968214707e-05 +12.69999999999997 0.03251987209272857 0.02241522632863901 0.017407992034133277 -0.0038191295323228604 -0.0002180558810176636 4.799559448367107e-05 +12.79999999999997 0.03233693877115103 0.022405200549928454 0.017385710973810455 -0.003813662156641224 -0.00022215508930397722 5.801597584792201e-05 +12.89999999999997 0.03217585716341405 0.022351540838537506 0.017365529236719607 -0.003808655796169843 -0.00018514463033008526 4.428143384442023e-05 +12.99999999999997 0.032026631687776974 0.02226552703397452 0.017346657665554495 -0.0038041589364223765 -0.00018906801955662913 4.433748989800595e-05 +13.09999999999997 0.031896779178020154 0.022141954096459873 0.017328369374048424 -0.003799611875066812 -0.0001783273568404442 4.6798051573770104e-05 +13.199999999999969 0.03177706190231086 0.021988975914635556 0.01731006883271936 -0.0037952986128080104 -0.00018622753582615988 3.9942638586915035e-05 +13.299999999999969 0.03167399306405446 0.021805370452573726 0.017291081551353834 -0.0037905230087561994 -0.00019389515637507345 5.425963327162177e-05 +13.399999999999968 0.03157932833175227 0.021596207151581656 0.01727131440567336 -0.003785897876433386 -0.00020136463641539515 4.0168426794417115e-05 +13.499999999999968 0.03149822061337558 0.02136373954081681 0.017250115191632772 -0.0037805937937047318 -0.00022190517742179833 6.333606439675018e-05 +13.599999999999968 0.03142417043401871 0.02110853798916327 0.017227122540761464 -0.0037751877409663123 -0.00023835647660077074 4.761667640669239e-05 +13.699999999999967 0.031360552413603505 0.020838838304072887 0.017202421147491355 -0.003769096796961723 -0.00025552867885435574 7.127905765657964e-05 +13.799999999999967 0.03130264069162704 0.020549750398912606 0.017175529916014676 -0.00376280712370563 -0.0002818187481451628 5.7359195181918565e-05 +13.899999999999967 0.031252159199610594 0.020253539108515357 0.017146296005157248 -0.003755579431578792 -0.0003032519674487158 8.419116013298777e-05 +13.999999999999966 0.03120666400698864 0.019941826811185608 0.01711457781889599 -0.003748063870748821 -0.00033067661530875253 6.922222869383773e-05 +14.099999999999966 0.031165921843087613 0.0196295256949591 0.017080215676439733 -0.003739473469508165 -0.0003567509732417392 9.927763411409763e-05 +14.199999999999966 0.031129479253096795 0.019306370793355267 0.017043916595453835 -0.003730870024274237 -0.00036991089846011006 7.6585367611429e-05 +14.299999999999965 0.031095261965612388 0.018987328913369073 0.017004781360942085 -0.0037210836261701626 -0.0004110499054303477 0.0001147697582444362 +14.399999999999965 0.03106476153202809 0.018662995380291078 0.016964443591054555 -0.0037115923200019387 -0.0003991262392699492 8.023975862796886e-05 +14.499999999999964 0.031034255464883212 0.018346592429410898 0.016921438634492882 -0.0037009278028612 -0.0004562346508530789 0.00012717245893890787 +14.599999999999964 0.031007256384600133 0.01802894724945841 0.016877319140510293 -0.003690462670003083 -0.0004319198450540747 8.841954531902988e-05 +14.699999999999964 0.03097875907528444 0.017722605683641954 0.01683075627335945 -0.003678877448203095 -0.0004930879312256063 0.00013681070006144326 +14.799999999999963 0.030953729134391893 0.017418583465129322 0.016783589176589644 -0.0036675740805191103 -0.00045727176031562093 9.589851418299655e-05 +14.899999999999963 0.030925865262644577 0.017128386257008753 0.01673468332586259 -0.0036554518908455532 -0.0005138913061237759 0.000140097320818067 +14.999999999999963 0.03090138114734864 0.0168432217415019 0.01668571424681534 -0.0036437069348795557 -0.00047272899149614555 0.00010109391269931004 +15.099999999999962 0.030873045065775886 0.016573868190476803 0.016635684905985073 -0.003631418944878486 -0.0005210165884159332 0.00013877912393409273 diff --git a/applications/CoSimulationApplication/tests/test_mok_fsi.py b/applications/CoSimulationApplication/tests/test_mok_fsi.py index efb32f2385c0..1212131c2039 100644 --- a/applications/CoSimulationApplication/tests/test_mok_fsi.py +++ b/applications/CoSimulationApplication/tests/test_mok_fsi.py @@ -16,6 +16,7 @@ class TestMokFSI(co_simulation_test_case.CoSimulationTestCase): cfd_tes_file_name = "fsi_mok/ProjectParametersCFD_for_test.json" def setUp(self): + self.err_tol = "1e-6" if not have_fsi_dependencies: self.skipTest("FSI dependencies are not available!") @@ -56,6 +57,7 @@ def test_mok_fsi_block_mvqn(self): def test_mok_fsi_block_ibqnls(self): self.accelerator_type = "block_ibqnls" + self.err_tol = "6e-5" with KratosUnittest.WorkFolderScope(".", __file__): self._createTest("fsi_mok", "cosim_mok_fsi_block") @@ -67,32 +69,6 @@ def test_mok_fsi_block_ibqnls(self): self.__DumpUpdatedCFDSettings() self._runTest() - def test_mok_fsi_mvqn_external_structure(self): - self.accelerator_type = "mvqn" - - with KratosUnittest.WorkFolderScope(".", __file__): - self._createTest("fsi_mok", "cosim_mok_fsi") - ext_parameter_file_name = os.path.join(self.problem_dir_name, "ProjectParametersCSM.json") - self.__ManipulateCSMSettingsToRunExternally("solver_wrappers.external.external_solver_wrapper") - self.__ManipulateCFDSettings() - self.__RemoveOutputFromCFD() # comment to get output - self.__AddTestingToCFD() - self.__DumpUpdatedCFDSettings() - self._runTestWithExternal([GetPython3Command(), "testing_structural_mechanics_analysis_with_co_sim_io.py", ext_parameter_file_name]) - - def test_mok_fsi_mvqn_external_structure_remote_controlled(self): - self.accelerator_type = "mvqn" - - with KratosUnittest.WorkFolderScope(".", __file__): - self._createTest("fsi_mok", "cosim_mok_fsi") - ext_parameter_file_name = os.path.join(self.problem_dir_name, "ProjectParametersCSM.json") - self.__ManipulateCSMSettingsToRunExternally("solver_wrappers.external.remote_controlled_solver_wrapper") - self.__ManipulateCFDSettings() - self.__RemoveOutputFromCFD() # comment to get output - self.__AddTestingToCFD() - self.__DumpUpdatedCFDSettings() - self._runTestWithExternal([GetPython3Command(), "structural_mechanics_analysis_remote_controlled.py", ext_parameter_file_name]) - @KratosUnittest.skipUnless(KM.IsDistributedRun(), "this test requires MPI") def test_mok_fsi_mvqn_external_structure_mpi(self): self.accelerator_type = "mvqn" @@ -166,7 +142,7 @@ def __AddTestingToCFD(self): "output_file_name" : "fsi_mok/fsi_mok_cfd_results_disp.dat", "reference_file_name" : \""""+disp_ref_file_name.replace("\\", "\\\\")+"""\", "comparison_type" : "dat_file_variables_time_history", - "tolerance" : 1e-6 + "tolerance" : """+self.err_tol+""" } },{ "kratos_module" : "KratosMultiphysics", @@ -196,7 +172,7 @@ def __AddTestingToCFD(self): "output_file_name" : "fsi_mok/fsi_mok_cfd_results_fluid.dat", "reference_file_name" : \""""+fluid_ref_file_name.replace("\\", "\\\\")+"""\", "comparison_type" : "dat_file_variables_time_history", - "tolerance" : 1e-6 + "tolerance" : """+self.err_tol+""" } }]""")) From 1b0273dcc48697936b4e5c0d23b76c74c7147332 Mon Sep 17 00:00:00 2001 From: azzeddinetiba Date: Wed, 3 Jan 2024 17:56:03 +0000 Subject: [PATCH 22/27] Restore accidentally deleted tests --- .../tests/test_mok_fsi.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/applications/CoSimulationApplication/tests/test_mok_fsi.py b/applications/CoSimulationApplication/tests/test_mok_fsi.py index 1212131c2039..dc4cf97f4f80 100644 --- a/applications/CoSimulationApplication/tests/test_mok_fsi.py +++ b/applications/CoSimulationApplication/tests/test_mok_fsi.py @@ -69,6 +69,32 @@ def test_mok_fsi_block_ibqnls(self): self.__DumpUpdatedCFDSettings() self._runTest() + def test_mok_fsi_mvqn_external_structure(self): + self.accelerator_type = "mvqn" + + with KratosUnittest.WorkFolderScope(".", __file__): + self._createTest("fsi_mok", "cosim_mok_fsi") + ext_parameter_file_name = os.path.join(self.problem_dir_name, "ProjectParametersCSM.json") + self.__ManipulateCSMSettingsToRunExternally("solver_wrappers.external.external_solver_wrapper") + self.__ManipulateCFDSettings() + self.__RemoveOutputFromCFD() # comment to get output + self.__AddTestingToCFD() + self.__DumpUpdatedCFDSettings() + self._runTestWithExternal([GetPython3Command(), "testing_structural_mechanics_analysis_with_co_sim_io.py", ext_parameter_file_name]) + + def test_mok_fsi_mvqn_external_structure_remote_controlled(self): + self.accelerator_type = "mvqn" + + with KratosUnittest.WorkFolderScope(".", __file__): + self._createTest("fsi_mok", "cosim_mok_fsi") + ext_parameter_file_name = os.path.join(self.problem_dir_name, "ProjectParametersCSM.json") + self.__ManipulateCSMSettingsToRunExternally("solver_wrappers.external.remote_controlled_solver_wrapper") + self.__ManipulateCFDSettings() + self.__RemoveOutputFromCFD() # comment to get output + self.__AddTestingToCFD() + self.__DumpUpdatedCFDSettings() + self._runTestWithExternal([GetPython3Command(), "structural_mechanics_analysis_remote_controlled.py", ext_parameter_file_name]) + @KratosUnittest.skipUnless(KM.IsDistributedRun(), "this test requires MPI") def test_mok_fsi_mvqn_external_structure_mpi(self): self.accelerator_type = "mvqn" From 372b3e93b8ef854e906a0d7646c7c4dd489e5962 Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Thu, 4 Jan 2024 14:36:49 +0100 Subject: [PATCH 23/27] Consider case where only 1 iteration is performed in the first time step, IBQNLS --- .../convergence_accelerators/block_ibqnls.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_ibqnls.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_ibqnls.py index ec4731efcf61..f58dc15df3a3 100644 --- a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_ibqnls.py +++ b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_ibqnls.py @@ -163,11 +163,12 @@ def FinalizeSolutionStep( self ): for data_name in self.W_new: if data_name == list(self.W_new.keys())[-1]: ## Check if last solver in the sequence - # Saving the V matrix for the next (first) iteration to recover the approximate jacobian - if self.V_old[data_name] is not None: - self.previous_V = np.hstack((self.V_new[data_name], self.V_old[data_name])) - else: - self.previous_V = self.V_new[data_name].copy() + if self.V_new[data_name] is not None: + # Saving the V matrix for the next (first) iteration to recover the approximate jacobian + if self.V_old[data_name] is not None: + self.previous_V = np.hstack((self.V_new[data_name], self.V_old[data_name])) + else: + self.previous_V = self.V_new[data_name].copy() if self.V_new[data_name] is not None and self.W_new[data_name] is not None: self.v_old_matrices[data_name].appendleft( self.V_new[data_name] ) @@ -182,8 +183,8 @@ def FinalizeSolutionStep( self ): self.X[data_name].clear() for data_name in self.W_new: - self.W_new[data_name] = [] - self.V_new[data_name] = [] + self.W_new[data_name] = None + self.V_new[data_name] = None @classmethod def _GetDefaultParameters(cls): From b5c7671b938d3b7114e6b5ec1f1dafa1f4d77b5b Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Fri, 5 Jan 2024 11:49:43 +0100 Subject: [PATCH 24/27] Rename BlockIterative to Block --- .../python_scripts/coupled_solvers/block_iterative_strong.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_iterative_strong.py b/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_iterative_strong.py index 4c27af785bc1..0ce57bbc5937 100644 --- a/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_iterative_strong.py +++ b/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_iterative_strong.py @@ -10,9 +10,9 @@ import KratosMultiphysics.CoSimulationApplication.colors as colors def Create(settings, models, solver_name): - return BlockIterativeStrongCoupledSolver(settings, models, solver_name) + return BlockStrongCoupledSolver(settings, models, solver_name) -class BlockIterativeStrongCoupledSolver(GaussSeidelStrongCoupledSolver): +class BlockStrongCoupledSolver(GaussSeidelStrongCoupledSolver): def SolveSolutionStep(self): for k in range(self.num_coupling_iterations): self.process_info[KratosCoSim.COUPLING_ITERATION_NUMBER] += 1 From 6dd84865ea142dc582b93020e9abda3f317af417 Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Fri, 5 Jan 2024 11:50:55 +0100 Subject: [PATCH 25/27] Rename block coupled solver file name --- .../{block_iterative_strong.py => block_strong.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename applications/CoSimulationApplication/python_scripts/coupled_solvers/{block_iterative_strong.py => block_strong.py} (100%) diff --git a/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_iterative_strong.py b/applications/CoSimulationApplication/python_scripts/coupled_solvers/block_strong.py similarity index 100% rename from applications/CoSimulationApplication/python_scripts/coupled_solvers/block_iterative_strong.py rename to applications/CoSimulationApplication/python_scripts/coupled_solvers/block_strong.py From 823b4d7033c76b163745bcac4c7847c42a484576 Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Fri, 5 Jan 2024 11:52:52 +0100 Subject: [PATCH 26/27] Rename block solver in test --- .../tests/fsi_mok/cosim_mok_fsi_block_parameters.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/CoSimulationApplication/tests/fsi_mok/cosim_mok_fsi_block_parameters.json b/applications/CoSimulationApplication/tests/fsi_mok/cosim_mok_fsi_block_parameters.json index 6d7b417ea3ae..ed930d057973 100644 --- a/applications/CoSimulationApplication/tests/fsi_mok/cosim_mok_fsi_block_parameters.json +++ b/applications/CoSimulationApplication/tests/fsi_mok/cosim_mok_fsi_block_parameters.json @@ -9,7 +9,7 @@ }, "solver_settings" : { - "type" : "coupled_solvers.block_iterative_strong", + "type" : "coupled_solvers.block_strong", "echo_level" : 0, "num_coupling_iterations" : 12, "predictors" : [ From 9be7dc6611245a5e5a4026b96f7b52a77ea5696d Mon Sep 17 00:00:00 2001 From: Azzeddine TIBA Date: Fri, 5 Jan 2024 12:05:45 +0100 Subject: [PATCH 27/27] Remove comment --- .../python_scripts/convergence_accelerators/block_ibqnls.py | 1 - 1 file changed, 1 deletion(-) diff --git a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_ibqnls.py b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_ibqnls.py index f58dc15df3a3..eab85e1a57cc 100644 --- a/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_ibqnls.py +++ b/applications/CoSimulationApplication/python_scripts/convergence_accelerators/block_ibqnls.py @@ -133,7 +133,6 @@ def UpdateSolution( self, r, x, y, data_name, yResidual,): block_oper = lambda vec: vec - self.pinv_product(V, Q, R, self.pinv_product(previous_V, previous_Q, previous_R, vec)) block_x = sp.sparse.linalg.LinearOperator((row, row), block_oper) delta_x, _ = sp.sparse.linalg.gmres( block_x, b, atol=self.gmres_abs_tol, tol=self.gmres_rel_tol ) - # delta_x = np.linalg.solve(np.eye(row, row) - V @ np.linalg.inv(R) @ Q.T @ previous_V @ np.linalg.inv(previous_R) @ previous_Q.T, b) else: ## Using J = 0 if a previous approximate Jacobian is not available delta_x = b