Skip to content

Commit 45024fa

Browse files
committed
Upload case files
1 parent 52a60c3 commit 45024fa

7 files changed

Lines changed: 435437 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Mixer with flexible blades
2+
3+
**Author:** [Rubén Zorrilla](https://github.com/rubenzorrilla)
4+
5+
**Kratos version:** 9.1
6+
7+
**Source files:** [Mixer with flexible blades](https://github.com/KratosMultiphysics/Examples/tree/master/fluid_structure_interaction/validation/embedded_fsi_mixer_Y/source)
8+
9+
## Case Specification
10+
This example is specifically conceived to prove the extended scope of applicatoin of embedded mesh methods. Hence, it involves extremely large rotations, which would be impossible to solve by using a body fitted ALE based approach.
11+
12+
The problem is set up as a 2D idealization of a turbine mixer with clockwise-anticlockwise alternate rotation. The problem geometry is a unit diameter circle with three embedded flexible blades. An imposed rotation is enforced in the blades axis to emulate the spin of the rotor. Such rotation changes the direction (anticlockwise to clockwise and viceversa) after More details on the dimensions, material settings and boundary conditions can be found in [here](https://doi.org/10.1016/j.cma.2020.113179).
13+
14+
## Results
15+
The fluid domain is meshed with a 45 and 540 radial and perimeter subdivisions Q1P1 elements centered structured mesh. Each one of the flexible blades is meshed with an 8x39 subdivisions structured mesh made with Total Lagrangian quadrilateral elements. The problem is run for 20s so three complete rotations (anticlockwise - clockwise - anticlockwise) are simulated.
16+
17+
The obtained velocity and pressure fields, together with the level set zero isosurface representing the deformed geometry, are shown below.
18+
19+
<p align="center">
20+
<figure>
21+
<img src="data/embedded_fsi_mixer_Y_v.gif" alt="Velocity field and level set isosurface." style="width: 600px;"/>
22+
<figcaption>Velocity field and level set isosurface.</figcaption>
23+
</figure>
24+
</p>
25+
26+
<p align="center">
27+
<figure>
28+
<img src="data/embedded_fsi_mixer_Y_p.gif" alt="Pressure field and level set isosurface." style="width: 600px;"/>
29+
<figcaption>Pressure field and level set isosurface.</figcaption>
30+
</figure>
31+
</p>
32+
33+
## References
34+
R. Zorrilla, R. Rossi, R. Wüchner and E. Oñate, An embedded Finite Element framework for the resolution of strongly coupled Fluid–Structure Interaction problems. Application to volumetric and membrane-like structures, Computer Methods in Applied Mechanics and Engineering (368), [10.1016/j.cma.2020.113179](https://doi.org/10.1016/j.cma.2020.113179)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"properties" : [{
3+
"model_part_name" : "FluidModelPart",
4+
"properties_id" : 0,
5+
"Material" : null
6+
},{
7+
"model_part_name" : "FluidModelPart.FluidParts_Fluid",
8+
"properties_id" : 1,
9+
"Material" : {
10+
"constitutive_law" : {
11+
"name" : "Newtonian2DLaw"
12+
},
13+
"Variables" : {
14+
"DENSITY" : 1.0,
15+
"DYNAMIC_VISCOSITY" : 0.000155
16+
},
17+
"Tables" : null
18+
}
19+
}]
20+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import sys
2+
import math
3+
import time
4+
import importlib
5+
6+
import KratosMultiphysics
7+
8+
def CreateAnalysisStageWithFlushInstance(cls, global_model, parameters):
9+
class AnalysisStageWithFlush(cls):
10+
11+
def __init__(self, model,project_parameters, flush_frequency=10.0):
12+
super().__init__(model,project_parameters)
13+
self.flush_frequency = flush_frequency
14+
self.last_flush = time.time()
15+
sys.stdout.flush()
16+
17+
def Initialize(self):
18+
super().Initialize()
19+
sys.stdout.flush()
20+
21+
def FinalizeSolutionStep(self):
22+
super().FinalizeSolutionStep()
23+
24+
if self.parallel_type == "OpenMP":
25+
now = time.time()
26+
if now - self.last_flush > self.flush_frequency:
27+
sys.stdout.flush()
28+
self.last_flush = now
29+
30+
return AnalysisStageWithFlush(global_model, parameters)
31+
32+
if __name__ == "__main__":
33+
34+
with open("ProjectParameters.json", 'r') as parameter_file:
35+
parameters = KratosMultiphysics.Parameters(parameter_file.read())
36+
37+
analysis_stage_module_name = parameters["analysis_stage"].GetString()
38+
analysis_stage_class_name = analysis_stage_module_name.split('.')[-1]
39+
analysis_stage_class_name = ''.join(x.title() for x in analysis_stage_class_name.split('_'))
40+
41+
analysis_stage_module = importlib.import_module(analysis_stage_module_name)
42+
analysis_stage_class = getattr(analysis_stage_module, analysis_stage_class_name)
43+
44+
global_model = KratosMultiphysics.Model()
45+
simulation = CreateAnalysisStageWithFlushInstance(analysis_stage_class, global_model, parameters)
46+
simulation.Run()
Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
{
2+
"analysis_stage" : "KratosMultiphysics.FSIApplication.fsi_analysis",
3+
"problem_data": {
4+
"problem_name": "embedded_fsi_membrane_airfoil",
5+
"parallel_type": "OpenMP",
6+
"echo_level": 0,
7+
"start_time": 0.0,
8+
"end_time": 1.0e0
9+
},
10+
"solver_settings": {
11+
"solver_type": "partitioned_embedded",
12+
"coupling_scheme": "dirichlet_neumann",
13+
"echo_level": 1,
14+
"structure_solver_settings": {
15+
"solver_type" : "Dynamic",
16+
"model_part_name" : "Structure",
17+
"domain_size" : 2,
18+
"echo_level" : 0,
19+
"analysis_type" : "non_linear",
20+
"time_integration_method" : "implicit",
21+
"scheme_type" : "bossak",
22+
"model_import_settings" : {
23+
"input_type": "mdpa",
24+
"input_filename": "embedded_fsi_membrane_airfoil_structure"
25+
},
26+
"material_import_settings": {
27+
"materials_filename": "StructuralMaterials.json"
28+
},
29+
"time_stepping": {
30+
"time_step": 5e-3
31+
},
32+
"line_search" : false,
33+
"convergence_criterion" : "residual_criterion",
34+
"displacement_relative_tolerance" : 1e-5,
35+
"displacement_absolute_tolerance" : 1e-7,
36+
"residual_relative_tolerance" : 1e-5,
37+
"residual_absolute_tolerance" : 1e-7,
38+
"max_iteration" : 20
39+
},
40+
"fluid_solver_settings":{
41+
"model_part_name" : "FluidModelPart",
42+
"domain_size" : 2,
43+
"solver_type" : "Embedded",
44+
"model_import_settings" : {
45+
"input_type" : "mdpa",
46+
"input_filename" : "embedded_fsi_membrane_airfoil_fluid"
47+
},
48+
"material_import_settings": {
49+
"materials_filename": "FluidMaterials.json"
50+
},
51+
"distance_modification_settings": {
52+
"distance_threshold": 1.0e-3
53+
},
54+
"echo_level" : 0,
55+
"compute_reactions" : true,
56+
"maximum_iterations" : 10,
57+
"relative_velocity_tolerance" : 1e-5,
58+
"absolute_velocity_tolerance" : 1e-7,
59+
"relative_pressure_tolerance" : 1e-5,
60+
"absolute_pressure_tolerance" : 1e-7,
61+
"assign_neighbour_elements_to_conditions" : true,
62+
"volume_model_part_name" : "FluidModelPart.FluidParts_Fluid",
63+
"skin_parts" : ["FluidModelPart.AutomaticInlet2D_Inlet","FluidModelPart.Outlet2D_Outlet","FluidModelPart.VelocityConstraints2D_Walls"],
64+
"no_skin_parts" : [],
65+
"time_stepping" : {
66+
"automatic_time_step": false,
67+
"time_step": 5e-3
68+
},
69+
"formulation": {
70+
"element_type": "embedded_weakly_compressible_navier_stokes_discontinuous",
71+
"is_slip": true,
72+
"slip_length": 1.0e6,
73+
"penalty_coefficient": 1.0e3,
74+
"dynamic_tau": 1.0
75+
},
76+
"fm_ale_settings": {
77+
"fm_ale_step_frequency": 1,
78+
"mesh_movement": "implicit",
79+
"fm_ale_solver_settings": {
80+
"structure_model_part_name": "FSICouplingInterfaceFluid",
81+
"virtual_model_part_name": "VirtualModelPart",
82+
"linear_solver_settings": {
83+
"preconditioner_type": "amg",
84+
"solver_type": "amgcl",
85+
"smoother_type": "ilu0",
86+
"krylov_type": "cg",
87+
"max_iteration": 2000,
88+
"verbosity": 0,
89+
"tolerance": 1e-8,
90+
"scaling": false,
91+
"use_block_matrices_if_possible": true
92+
},
93+
"embedded_nodal_variable_settings": {
94+
"gradient_penalty_coefficient": 5.0e-2,
95+
"linear_solver_settings": {
96+
"preconditioner_type": "amg",
97+
"solver_type": "amgcl",
98+
"smoother_type": "ilu0",
99+
"krylov_type": "cg",
100+
"max_iteration": 2000,
101+
"verbosity": 0,
102+
"tolerance": 1e-8,
103+
"scaling": false,
104+
"block_size": 1,
105+
"use_block_matrices_if_possible": true
106+
}
107+
}
108+
}
109+
}
110+
},
111+
"coupling_settings":{
112+
"nl_tol": 1e-4,
113+
"nl_max_it": 10,
114+
"coupling_strategy_settings": {
115+
"solver_type": "MVQN",
116+
"w_0": 0.5,
117+
"abs_cut_off_tol" : 1e-6
118+
},
119+
"structure_interfaces_list": ["Structure.LinePressure2D_Load"]
120+
}
121+
},
122+
"processes":{
123+
"structure_constraints_process_list" : [{
124+
"python_module" : "assign_vector_variable_process",
125+
"kratos_module" : "KratosMultiphysics",
126+
"process_name" : "AssignVectorVariableProcess",
127+
"Parameters" : {
128+
"model_part_name" : "Structure.DISPLACEMENT_EndPoints",
129+
"variable_name" : "DISPLACEMENT",
130+
"interval" : [0.0,"End"],
131+
"constrained" : [true,true,true],
132+
"value" : [0.0,0.0,0.0]
133+
}
134+
}],
135+
"structure_loads_process_list" : [],
136+
"fluid_initial_conditions_process_list" : [],
137+
"fluid_boundary_conditions_process_list" : [{
138+
"python_module" : "apply_inlet_process",
139+
"kratos_module" : "KratosMultiphysics.FluidDynamicsApplication",
140+
"process_name" : "ApplyInletProcess",
141+
"Parameters" : {
142+
"model_part_name" : "FluidModelPart.AutomaticInlet2D_Inlet",
143+
"variable_name" : "VELOCITY",
144+
"interval" : [0.0,"End"],
145+
"modulus" : 2.5833,
146+
"direction" : "automatic_inwards_normal"
147+
}
148+
},{
149+
"python_module" : "apply_outlet_process",
150+
"kratos_module" : "KratosMultiphysics.FluidDynamicsApplication",
151+
"process_name" : "ApplyOutletProcess",
152+
"Parameters" : {
153+
"model_part_name" : "FluidModelPart.Outlet2D_Outlet",
154+
"variable_name" : "PRESSURE",
155+
"constrained" : true,
156+
"value" : 0.0,
157+
"hydrostatic_outlet" : false,
158+
"h_top" : 0.0
159+
}
160+
},{
161+
"python_module" : "assign_vector_variable_process",
162+
"kratos_module" : "KratosMultiphysics",
163+
"process_name" : "AssignVectorVariableProcess",
164+
"Parameters" : {
165+
"model_part_name" : "FluidModelPart.VelocityConstraints2D_Walls",
166+
"variable_name" : "VELOCITY",
167+
"interval" : [0.0,"End"],
168+
"constrained" : [false,true,false],
169+
"value" : [null,0.0,null]
170+
}
171+
},{
172+
"python_module" : "assign_vector_variable_process",
173+
"kratos_module" : "KratosMultiphysics",
174+
"process_name" : "AssignVectorVariableProcess",
175+
"Parameters" : {
176+
"model_part_name" : "FluidModelPart.AutomaticInlet2D_Inlet",
177+
"variable_name" : "MESH_DISPLACEMENT",
178+
"interval" : [0.0,"End"],
179+
"constrained" : [true,true,false],
180+
"value" : [0.0,0.0,null]
181+
}
182+
},{
183+
"python_module" : "assign_vector_variable_process",
184+
"kratos_module" : "KratosMultiphysics",
185+
"process_name" : "AssignVectorVariableProcess",
186+
"Parameters" : {
187+
"model_part_name" : "FluidModelPart.Outlet2D_Outlet",
188+
"variable_name" : "MESH_DISPLACEMENT",
189+
"interval" : [0.0,"End"],
190+
"constrained" : [true,true,false],
191+
"value" : [0.0,0.0,null]
192+
}
193+
},{
194+
"python_module" : "assign_vector_variable_process",
195+
"kratos_module" : "KratosMultiphysics",
196+
"process_name" : "AssignVectorVariableProcess",
197+
"Parameters" : {
198+
"model_part_name" : "FluidModelPart.VelocityConstraints2D_Walls",
199+
"variable_name" : "MESH_DISPLACEMENT",
200+
"interval" : [0.0,"End"],
201+
"constrained" : [true,true,false],
202+
"value" : [0.0,0.0,null]
203+
}
204+
}],
205+
"fluid_gravity" : [],
206+
"fluid_auxiliar_process_list" : [{
207+
"python_module": "apply_embedded_postprocess_process",
208+
"kratos_module": "KratosMultiphysics.FluidDynamicsApplication",
209+
"process_name": "ApplyEmbeddedPostprocessrocess",
210+
"Parameters": {
211+
"model_part_name": "FluidModelPart.FluidParts_Fluid"
212+
}
213+
}]
214+
},
215+
"output_processes":{
216+
"gid_output" : [{
217+
"python_module" : "gid_output_process",
218+
"kratos_module" : "KratosMultiphysics",
219+
"process_name" : "GiDOutputProcess",
220+
"Parameters" : {
221+
"model_part_name" : "Structure",
222+
"output_name" : "gordnier_membrane_structure",
223+
"postprocess_parameters" : {
224+
"result_file_configuration" : {
225+
"gidpost_flags" : {
226+
"GiDPostMode" : "GiD_PostBinary",
227+
"WriteDeformedMeshFlag" : "WriteDeformed",
228+
"WriteConditionsFlag" : "WriteConditions",
229+
"MultiFileFlag" : "SingleFile"
230+
},
231+
"file_label" : "time",
232+
"output_control_type" : "step",
233+
"output_interval" : 1,
234+
"body_output" : true,
235+
"node_output" : false,
236+
"skin_output" : false,
237+
"plane_output" : [],
238+
"nodal_results" : ["DISPLACEMENT","VELOCITY","ACCELERATION","REACTION","LINE_LOAD"],
239+
"gauss_point_results" : []
240+
},
241+
"point_data_configuration" : []
242+
}
243+
}
244+
},{
245+
"python_module": "gid_output_process",
246+
"kratos_module": "KratosMultiphysics",
247+
"process_name": "GiDOutputProcess",
248+
"Parameters": {
249+
"model_part_name": "FluidModelPart.FluidParts_Fluid",
250+
"output_name": "gordnier_membrane_fluid",
251+
"postprocess_parameters": {
252+
"result_file_configuration": {
253+
"gidpost_flags": {
254+
"GiDPostMode": "GiD_PostBinary",
255+
"WriteDeformedMeshFlag": "WriteDeformed",
256+
"WriteConditionsFlag": "WriteConditions",
257+
"MultiFileFlag": "SingleFile"
258+
},
259+
"file_label": "time",
260+
"output_control_type": "step",
261+
"output_interval" : 1,
262+
"body_output": true,
263+
"node_output": false,
264+
"skin_output": false,
265+
"plane_output": [],
266+
"nodal_results": ["VELOCITY","PRESSURE","MESH_VELOCITY"],
267+
"nodal_nonhistorical_results": [],
268+
"elemental_conditional_flags_results": [],
269+
"gauss_point_results": []
270+
},
271+
"point_data_configuration": []
272+
}
273+
}
274+
}]
275+
}
276+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"properties" : [{
3+
"model_part_name" : "Structure.Parts_Cable_Membrane",
4+
"properties_id" : 1,
5+
"Material" : {
6+
"Variables" : {
7+
"DENSITY" : 441.75,
8+
"YOUNG_MODULUS" : 250000.0,
9+
"THICKNESS" : 0.0002,
10+
"PRESTRESS_VECTOR" : [0.0]
11+
},
12+
"Tables" : null
13+
}
14+
}]
15+
}

0 commit comments

Comments
 (0)