Skip to content

Commit

Permalink
Adding the source files and gifs for FSI_Turek CoSim
Browse files Browse the repository at this point in the history
  • Loading branch information
juancamarotti committed Feb 21, 2024
1 parent e8a20a0 commit 5559bc3
Show file tree
Hide file tree
Showing 11 changed files with 108,105 additions and 0 deletions.
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.
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,177 @@
{
"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"
},
"echo_level" : 0,
"compute_reactions" : true,
"formulation": {
"element_type": "vms",
"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,125 @@
{
"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,
"linear_solver_settings" : {
"solver_type" : "LinearSolversApplication.sparse_qr"
},
"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" : [
// {
// "python_module" : "assign_vector_by_direction_to_condition_process",
// "kratos_module" : "KratosMultiphysics",
// "process_name" : "AssignVectorByDirectionToConditionProcess",
// "Parameters" : {
// "mesh_id" : 0,
// "model_part_name" : "Structure.StructureInterface2D_StructureInterface",
// "variable_name" : "POINT_LOAD",
// "modulus" : 1,
// "direction" : [0.0,-1.0,0.0]
// }
// }
]
},
"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"
}
}}],
"hdf5_output": [
// {
// "kratos_module" : "KratosMultiphysics.HDF5Application",
// "python_module" : "single_mesh_temporal_output_process",
// "process_name" : "SingleMeshTemporalOutputProcess",
// "Parameters" : {
// "model_part_name" : "Structure",
// "file_settings" : {
// "file_name" : "structure_<time>.h5",
// "file_access_mode" : "truncate"
// },
// "nodal_solution_step_data_settings" : {
// "list_of_variables" : ["DISPLACEMENT", "REACTION"]
// },
// "condition_data_value_settings" : {
// "list_of_variables" : ["POINT_LOAD"]
// }
// }
// }
]
}
}
Loading

0 comments on commit 5559bc3

Please sign in to comment.