Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding FSI Turek Benchmark to CoSim Examples #133

Merged
merged 12 commits into from
Feb 26, 2024
49 changes: 49 additions & 0 deletions co_simulation/validation/fsi_turek_FSI2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# [Turek benchmark - FSI2](https://github.com/KratosMultiphysics/Examples/tree/master/fluid_structure_interaction/validation/fsi_turek_FSI2)

**Author:** [Juan Ignacio Camarotti](https://github.com/juancamarotti)

**Kratos version:** 9.4

**Source files:** [Turek benchmark - FSI2](https://github.com/KratosMultiphysics/Examples/tree/master/co_simulation/validation/fsi_turek_FSI2/source)

## Case Specification

This is a 2D simulation of the well-known Turek FSI benchmark. It consists in a 2D fluid channel that contains a cylinder to which flexible flag is attached. In this case, the FSI2 set-up is taken into account. The main challenge of such FSI2 test is the large oscillations of the flexible flag associated to the fluid-structure interaction mechanisms. It is therefore considered as a challenging test for the coupling algorithms. The main reference of the test can be found in [Turek et. al. (2006)](https://doi.org/10.1007/3-540-34596-5_15). The following applications of Kratos are used:
* CoSimulationApplication
* MappingApplication
* MeshMovingApplication
* FluidDynamicsApplication
* StructuralMechanicsApplication
* ConstitutiveLawsApplication
* LinearSolversApplication

The problem geometry as well as the boundary conditions are sketched below (image from Turek et. al. (2006).
<p align="center">
<img src="data/turek_benchmark_geometry.png" alt="Turek benchmark geometry." style="width: 800px;"/>
</p>

A Newtonian constitutive law is considered in the fluid domain. The fluid characteristic parameters are:
* Density (&rho;): 1.0E+03 _Kg/m<sup>3</sup>_
* Kinematic viscosity (&nu;): 1.0 _m<sup>2</sup>/s_

On the other hand, a Kirchhoff - Saint Venant plane strain constitutive law with is used in the structure domain. The structure mechanical parameters are
* Density (&rho;): 1.0E+04 _Kg/m<sup>3</sup>_
* Elastic modulus (E): 1.4E+06 _Pa_
* Poisson ratio (&nu;): 0.4

The time step is 0.002 seconds, which is small enough to capture the oscillation peak values. The total simulation time is 20.0 seconds.

## Results

The structural mechanics problem is solved using a FE structured mesh conformed by around 3.3k linear quadrilateral elements implementing a Total Lagrangian formulation. On the other hand, the fluid dynamics problem is solved using a FE unstructured mesh of around 30k linear triangular elements implementing an ALE ASGS Navier-Stokes formulation. The obtained fluid velocity and structure displacement fields, together with the deformed geometry, are shown below. The obtained results are in agreement to the ones in the reference publication.

<p align="center">
<img src="data/turek_benchmark_FSI2_v.gif" alt="Fluid velocity field [m/s]." style="width: 800px;"/>
</p>

<p align="center">
<img src="data/turek_benchmark_FSI2_d.gif" alt="Structure displacement field [m]." style="width: 800px;"/>
</p>

## References
Turek S., Hron J. (2006) Proposal for Numerical Benchmarking of Fluid-Structure Interaction between an Elastic Object and Laminar Incompressible Flow. In: Bungartz HJ., Schäfer M. (eds) Fluid-Structure Interaction. Lecture Notes in Computational Science and Engineering, vol 53. Springer, Berlin, Heidelberg [https://doi.org/10.1007/3-540-34596-5_15](https://doi.org/10.1007/3-540-34596-5_15)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions co_simulation/validation/fsi_turek_FSI2/source/FluidMaterials.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"properties" : [{
"model_part_name" : "FluidModelPart.Parts_Fluid",
"properties_id" : 1,
"Material" : {
"constitutive_law" : {
"name" : "Newtonian2DLaw"
},
"Variables" : {
"DENSITY": 1000.0,
"DYNAMIC_VISCOSITY" : 1.0
},
"Tables" : {}
}
}]
}
15 changes: 15 additions & 0 deletions co_simulation/validation/fsi_turek_FSI2/source/MainKratos.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import KratosMultiphysics as KM
from KratosMultiphysics.CoSimulationApplication.co_simulation_analysis import CoSimulationAnalysis

"""
For user-scripting it is intended that a new class is derived
from CoSimulationAnalysis to do modifications
Check also "kratos/python_scripts/analysis_stage.py" for available methods that can be overridden
"""

parameter_file_name = "ProjectParametersCoSim.json"
with open(parameter_file_name,'r') as parameter_file:
parameters = KM.Parameters(parameter_file.read())

simulation = CoSimulationAnalysis(parameters)
simulation.Run()
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
{
"problem_data" : {
"problem_name" : "fsi_turek_FSI2",
"parallel_type" : "OpenMP",
"echo_level" : 0,
"start_time" : 0.0,
"end_time" : 20.0
},
"solver_settings" : {
"solver_type" : "ale_fluid",
"ale_boundary_parts" : ["FluidNoSlipInterface2D_FluidInterface"],
"mesh_motion_solver_settings" : {
"echo_level" : 0,
"domain_size" : 2,
"model_part_name" : "FluidModelPart",
"solver_type" : "structural_similarity"
},
"fluid_solver_settings": {
"solver_type" : "Monolithic",
"domain_size" : 2,
"model_part_name" : "FluidModelPart",
"model_import_settings" : {
"input_type" : "mdpa",
"input_filename" : "fsi_turek_FSI2_Fluid"
},
"material_import_settings" : {
"materials_filename" : "FluidMaterials.json"
},
"echo_level" : 0,
"compute_reactions" : true,
"formulation": {
"element_type": "qsvms",
"use_orthogonal_subscales": false,
"dynamic_tau": 1.0
},
"maximum_iterations" : 10,
"relative_velocity_tolerance" : 1e-6,
"absolute_velocity_tolerance" : 1e-6,
"relative_pressure_tolerance" : 1e-6,
"absolute_pressure_tolerance" : 1e-6,
"volume_model_part_name" : "Parts_Fluid",
"skin_parts" : ["AutomaticInlet2D_Inlet","Outlet2D_Outlet","NoSlip2D_NoSlip","NoSlip2D_Cylinder","FluidNoSlipInterface2D_FluidInterface"],
"no_skin_parts" : ["ALEMeshDisplacementBC2D_FluidALEMeshFreeX","ALEMeshDisplacementBC2D_FluidALEMeshFixXY","ALEMeshDisplacementBC2D_Cylinder"],
"time_stepping" : {
"automatic_time_step" : false,
"time_step" : 0.002
}
}
},
"processes" : {
"initial_conditions_process_list" : [],
"boundary_conditions_process_list" : [{
"python_module" : "apply_inlet_process",
"kratos_module" : "KratosMultiphysics.FluidDynamicsApplication",
"Parameters" : {
"model_part_name" : "FluidModelPart.AutomaticInlet2D_Inlet",
"variable_name" : "VELOCITY",
"modulus" : "1.5*(0.5*(1-cos(0.5*pi*t))*1.0)*(4.0/0.1681)*y*(0.41-y)",
"direction" : "automatic_inwards_normal",
"interval" : [0.0,2.0]
}
},{
"python_module" : "apply_inlet_process",
"kratos_module" : "KratosMultiphysics.FluidDynamicsApplication",
"Parameters" : {
"model_part_name" : "FluidModelPart.AutomaticInlet2D_Inlet",
"variable_name" : "VELOCITY",
"modulus" : "1.5*(1.0)*(4.0/0.1681)*y*(0.41-y)",
"direction" : "automatic_inwards_normal",
"interval" : [2.0,"End"]
}
},{
"python_module" : "apply_outlet_process",
"kratos_module" : "KratosMultiphysics.FluidDynamicsApplication",
"Parameters" : {
"model_part_name" : "FluidModelPart.Outlet2D_Outlet",
"variable_name" : "PRESSURE",
"constrained" : true,
"value" : 0.0,
"hydrostatic_outlet" : false,
"h_top" : 0.0
}
},{
"python_module" : "apply_noslip_process",
"kratos_module" : "KratosMultiphysics.FluidDynamicsApplication",
"Parameters" : {
"model_part_name" : "FluidModelPart.NoSlip2D_NoSlip"
}
},{
"python_module" : "apply_noslip_process",
"kratos_module" : "KratosMultiphysics.FluidDynamicsApplication",
"Parameters" : {
"model_part_name" : "FluidModelPart.NoSlip2D_Cylinder"
}
},
{
"python_module" : "apply_noslip_process",
"kratos_module" : "KratosMultiphysics.FluidDynamicsApplication",
"Parameters" : {
"model_part_name" : "FluidModelPart.FluidNoSlipInterface2D_FluidInterface"
}
}],
"gravity" : [],
"ale_boundary_conditions" : [{
"python_module" : "fix_vector_variable_process",
"kratos_module" : "KratosMultiphysics",
"help" : "This process fixes the selected components of a given vector variable",
"process_name" : "AssignVectorVariableProcess",
"Parameters" : {
"model_part_name" : "FluidModelPart.FluidNoSlipInterface2D_FluidInterface",
"variable_name" : "MESH_DISPLACEMENT",
"constrained" : [true, true, true]
}

},{
"python_module" : "fix_vector_variable_process",
"kratos_module" : "KratosMultiphysics",
"help" : "This process fixes the selected components of a given vector variable",
"process_name" : "AssignVectorVariableProcess",
"Parameters" : {
"model_part_name" : "FluidModelPart.AutomaticInlet2D_Inlet",
"variable_name" : "MESH_DISPLACEMENT",
"constrained" : [true, true, true]
}

},{
"python_module" : "fix_vector_variable_process",
"kratos_module" : "KratosMultiphysics",
"help" : "This process fixes the selected components of a given vector variable",
"process_name" : "AssignVectorVariableProcess",
"Parameters" : {
"model_part_name" : "FluidModelPart.NoSlip2D_NoSlip",
"variable_name" : "MESH_DISPLACEMENT",
"constrained" : [true, true, true]
}

},{
"python_module" : "fix_vector_variable_process",
"kratos_module" : "KratosMultiphysics",
"help" : "This process fixes the selected components of a given vector variable",
"process_name" : "AssignVectorVariableProcess",
"Parameters" : {
"model_part_name" : "FluidModelPart.Outlet2D_Outlet",
"variable_name" : "MESH_DISPLACEMENT",
"constrained" : [true, true, true]
}

},{
"python_module" : "fix_vector_variable_process",
"kratos_module" : "KratosMultiphysics",
"help" : "This process fixes the selected components of a given vector variable",
"process_name" : "AssignVectorVariableProcess",
"Parameters" : {
"model_part_name" : "FluidModelPart.NoSlip2D_Cylinder",
"variable_name" : "MESH_DISPLACEMENT",
"constrained" : [true, true, true]
}}
]
},
"output_processes" : {
"vtk_output" : [{
"python_module" : "vtk_output_process",
"kratos_module" : "KratosMultiphysics",
"process_name" : "VtkOutputProcess",
"help" : "This process writes postprocessing files for Paraview",
"Parameters" : {
"model_part_name" : "FluidModelPart.Parts_Fluid",
"output_control_type" : "step",
"output_interval" : 1,
"file_format" : "binary",
"output_precision" : 7,
"output_sub_model_parts" : false,
"output_path" : "vtk_output_fsi_turek2_cfd",
"save_output_files_in_folder" : true,
"nodal_solution_step_data_variables" : ["VELOCITY","PRESSURE","MESH_DISPLACEMENT","MESH_VELOCITY", "REACTION"]
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"problem_data" : {
"problem_name" : "fsi_turek_FSI2",
"parallel_type" : "OpenMP",
"start_time" : 0.0,
"end_time" : 20.0,
"echo_level" : 0
},
"solver_settings" : {
"solver_type" : "dynamic",
"echo_level" : 1,
"analysis_type" : "non_linear",
"time_integration_method" : "implicit",
"scheme_type" : "bossak",
"model_part_name" : "Structure",
"domain_size" : 2,
"model_import_settings" : {
"input_type" : "mdpa",
"input_filename" : "fsi_turek_FSI2_Structural"
},
"material_import_settings" : {
"materials_filename" : "StructuralMaterials.json"
},
"time_stepping" : {
"time_step" : 0.002
},
"convergence_criterion" : "residual_criterion",
"displacement_relative_tolerance" : 0.0001,
"displacement_absolute_tolerance" : 1e-9,
"residual_relative_tolerance" : 1e-6,
"residual_absolute_tolerance" : 1e-8,
"max_iteration" : 10,
"rotation_dofs" : false
},
"processes" : {
"constraints_process_list" : [{
"python_module" : "assign_vector_variable_process",
"kratos_module" : "KratosMultiphysics",
"Parameters" : {
"model_part_name" : "Structure.DISPLACEMENT_FixedDisplacement",
"variable_name" : "DISPLACEMENT",
"constrained" : [true,true,true],
"value" : [0.0,0.0,0.0],
"interval" : [0.0,"End"]
}
}],
"loads_process_list" : []
},
"output_processes" : {
"vtk_output" : [{
"python_module" : "vtk_output_process",
"kratos_module" : "KratosMultiphysics",
"process_name" : "VtkOutputProcess",
"help" : "This process writes postprocessing files for Paraview",
"Parameters" : {
"model_part_name" : "Structure",
"output_control_type" : "step",
"output_interval" : 1,
"file_format" : "binary",
"output_precision" : 7,
"output_sub_model_parts" : false,
"output_path" : "vtk_output_fsi_turek2_csd",
"save_output_files_in_folder" : true,
"nodal_solution_step_data_variables" : ["DISPLACEMENT", "POINT_LOAD"]
}
},{
"python_module" : "point_output_process",
"kratos_module" : "KratosMultiphysics",
"process_name" : "PointOutputProcess",
"help" : "This process writes postprocessing files for Paraview",
"Parameters" : {
"model_part_name" : "Structure",
"entity_type" : "node",
"interval" : [0.0, "End"],
"position" : [0.60000 ,0.20067 ,0.00000],
"output_variables" : ["DISPLACEMENT_X"],
"historical_value" : true,
"search_configuration" : "initial",
"search_tolerance" : 1e-6,
"print_format" : "",
"output_file_settings" : {
"file_name" : "Point_A_Displacement_X",
"output_path": "",
"write_buffer_size" : 1,
"file_extension" : "dat"
}
}}]
}
}
Loading
Loading