Skip to content

Commit 0840d8f

Browse files
committed
adding CoSim examples
1 parent 01ef70f commit 0840d8f

16 files changed

+22901
-0
lines changed

co_simulation/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# CoSimulation Examples
2+
3+
This folder contains examples related to CoSimulation in and with Kratos.
4+
5+
They are realized using the __CoSimulationApplication__
6+
7+
The Examples are continously updated and extended
8+
9+
## Use Cases
10+
See [here](https://github.com/KratosMultiphysics/Examples/blob/master/co_simulation/use_cases/README.md)
11+
12+
## Validation Cases
13+
See [here](https://github.com/KratosMultiphysics/Examples/blob/master/co_simulation/validation/README.md)

co_simulation/use_cases/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Use Cases
2+
3+
Coming soon...

co_simulation/validation/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Validation Cases
2+
3+
This folder contains the validation cases:
4+
5+
- [Mok FSI benchmark](https://github.com/KratosMultiphysics/Examples/blob/master/co_simulation/validation/fsi_mok/README.md)
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Mok FSI benchmark
2+
3+
**Author:** [Philipp Bucher](https://github.com/philbucher)
4+
5+
**Kratos version:** 8.1
6+
7+
**Source files:** [FSI-Mok](https://github.com/KratosMultiphysics/Examples/tree/master/co_simulation/validation/fsi_mok/source)
8+
9+
## Case Specification
10+
11+
This is a 2D FSI simulation of the Mok benchmark test. It consists in a 2D convergent fluid channel that contains a flexible wall structure attached to its bottom wall. The main challenge of the test is that the densities of the fluid and the structure have a similar order of magnitude, leading to a strongly coupled problem in where large interaction between the two fields appears. The reference solutions have been taken from Mok (2001) and Valdés (2007). The following applications of Kratos are used:
12+
* CoSimulationApplication
13+
* MappingApplication
14+
* MeshMovingApplication
15+
* FluidDynamicsApplication
16+
* StructuralMechanicsApplication
17+
* LinearSolversApplication
18+
19+
The problem geometry as well as the boundary conditions are sketched below.
20+
<p align="center">
21+
<img src="data/Mok_benchmark_geometry.png" alt="Mok benchmark geometry." style="width: 600px;"/>
22+
</p>
23+
24+
Regarding the inlet velocity, the next parabolic profile is imposed
25+
26+
<p align="center">
27+
<img src="data/Mok_inlet_formula_1.png" alt="Mok inlet profile." style="width: 200px;"/>
28+
</p>
29+
30+
where the time dependent reference velocity is defined as
31+
32+
<p align="center">
33+
<img src="data/Mok_inlet_formula_2.png" alt="Mok velocity formula." style="width: 200px;"/>
34+
</p>
35+
36+
A Newtonian constitutive law is considered in the fluid domain. The fluid characteristic parameters are:
37+
* Density (&rho;): 956 _Kg/m<sup>3</sup>_
38+
* Kinematic viscosity (&nu;): 0.145 _m<sup>2</sup>/s_
39+
40+
On the other hand, a linear elastic plane stress constitutive law with unit thickness is considered in the structure domain. The structure characteristic parameters are
41+
* Density (&rho;): 1500 _Kg/m<sup>3</sup>_
42+
* Elastic modulus (E): 2.30000E+06 _Pa_
43+
* Poisson ratio (&nu;): 0.45
44+
45+
The time step is 0.1 seconds, while the total simulation time is 25.0 seconds.
46+
47+
The mesh was created with the [KratosSalomePlugin](https://github.com/KratosMultiphysics/KratosSalomePlugin/tree/master/tui_examples/mok_fsi). Check this example which can be easily adapted to different mesh sizes.
48+
49+
## Results
50+
The problem stated above has been solved with a structured mesh with 2x100 divisions composed by linear quadrilateral total Lagrangian elements in the structural domain. In the fluid domain, a mesh composed by around 6000 linear triangular elements has been used. The obtained velocity field, together with the deformed geometry, is shown below. Besides, some comparisons with the reference solutions are depicted as well.
51+
52+
<p align="center">
53+
<img src="data/flow_field_vel_t25.png" alt="Obtained velocity field (t = 25.0)." style="width: 600px;"/>
54+
</p>
55+
56+
<p align="center">
57+
<img src="data/Mok_ux.png" alt="Point A horizontal displacement comparison." style="width: 600px;"/>
58+
</p>
59+
60+
## References
61+
D.P. Mok. Partitionierte Lösungsansätze in der Strukturdynamik und der Fluid−Struktur−Interaktion. PhD thesis: Institut für Baustatik, Universität Stuttgart, 2001. [http://dx.doi.org/10.18419/opus-147](http://dx.doi.org/10.18419/opus-147)
62+
63+
G. Valdés. Nonlinear Analysis of Orthotropic Membrane and Shell Structures Including Fluid-Structure Interaction. PhD thesis: Universitat Politècnica de Catalunya, 2007. [http://www.tdx.cat/handle/10803/6866](http://www.tdx.cat/handle/10803/6866)
157 KB
Loading
2.18 KB
Loading
8.17 KB
Loading
75.4 KB
Loading
34.2 KB
Loading
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import KratosMultiphysics as KM
2+
from KratosMultiphysics.CoSimulationApplication.co_simulation_analysis import CoSimulationAnalysis
3+
4+
"""
5+
For user-scripting it is intended that a new class is derived
6+
from CoSimulationAnalysis to do modifications
7+
Check also "kratos/python_scripts/analysis_stage.py" for available methods that can be overridden
8+
"""
9+
10+
parameter_file_name = "ProjectParametersCoSim.json"
11+
with open(parameter_file_name,'r') as parameter_file:
12+
parameters = KM.Parameters(parameter_file.read())
13+
14+
simulation = CoSimulationAnalysis(parameters)
15+
simulation.Run()

0 commit comments

Comments
 (0)