Edit me

Running an example from GiD

1. Introduction

This first tutorial is intended to serve as a base for the rest of practical exercises of the course. Based on a simplified high-rise building design, a Computational Fluid Dynamics (CFD) case solving the flow around the building, a Computational Structural Mechanics (CSM) case solving the mechanics of an ideal representation of the building and a Fluid-Structure Interaction (FSI) coupling are presented.

To do that, the GiD pre and post-processor together with its Kratos Multiphysics Graphical User Interface (GUI) are used.

Since the aim of this Workshop course is to learn the basics Kratos Multiphysics usage all the examples required to follow this tutorial have been already included as a part of the interface so they can be automatically generated by just clicking on its corresponding button.

2. Get Kratos GiD GUI

First of all it is needed to have GiD installed in your machine. If you have not installed it yet, the installer of Windows and Linux official versions can be downloaded from this link.

After this, you need to ask for a license in this link. You can ask for a maximum of three one month free licenses. To do that, you need to fill the first three tabs with the next options:

  • GiD Version: GiD 14
  • Type of version: Local
  • Period of time: One Month (Free)

After doing this, you can follow the steps that appear below to introduce your machine specific data.

Once GiD has been already installed, Kratos Multiphysics can be obtained using GiD internet retrieve tool. To do that, search for Data tab in the top toolbar and click on Data → Problem type → Internet retrieve.... In the pop-up window select Kratos 7.0.1 and click on Retrieve module to start the download.

Internet retrieve

Once it is finished, you will have the Kratos Multiphysics GiD GUI together with a pre-compiled version of the current release, which allows to run the cases directly from the GUI.

3. Set a Fluid Dynamics problem

3.1. Load the CFD GUI

To set a CFD problem we firstly need to load the Kratos GiD GUI. This is done by doing the previous sequence of commands Data → Problem type → Kratos in the top toolbar. Then the Kratos application market will appear in where the Fluid application must be selected.

Application market

After this, the fluid dynamics application market will appear. Among all the fluid related applications in Kratos, we will select the standard body-fitted Navier-Stokes CFD application by clicking on the Fluid button again.

Fluid application market

Finally we select the domain size by clicking on the 2D icon.

3.2. Load the high-rise building example

Now that we are in the 2D CFD interface we can load the predefined high-rise building example. To do that, it is only needed to **click on the button highlighted in image below ** to automatically generate the case.

High-rise building example button

The problem consists in a channel emulating the surroundings of the building placement. A constant inlet velocity of 25 m/s is applied along the left edge. The top and bottom walls are considered to be slip while the building walls are considered to be stick. The pressure is fixed to zero along the right edge.

(this case can be also retrieved from this link)

3.3. Main features of the GUI

After loading the case, the interface will look as the image below.

High-rise building example

The most important features in the previous image are:

LEFT SIDE:

  • Strategy selection: Monolithic or Fractional Step (in CSM problems dynamic, quasi-static, static)
  • Material settings: Selection of the fluid domain surface and its physical properties
  • Boundary Conditions time intervals: Default and custom time intervals for the BCs application
  • Boundary Conditions: List of BCs (varies depending on the problem to solve)
  • Solver settings: Problem settings according to the selected strategy (e.g. convergence criteria, maximum iterations, linear solver type, time step, …)

RIGHT SIDE:

  • Groups list: Can be brought up by clicking the groups tab. It lists the groups, which contain the geometrical entities that define the problem domain and BCs (be careful are not the same as layers!)
  • Group check: By clicking this button the contained entities in the selected group are highlighted.

3.4 Mesh and run

Before meshing the problem, GiD will ask to save it, so save the case as usual by doing Files → Save.

Once the case has been saved, it is time to mesh it. To simplify things, this predefined example already contains suitable mesh settings, which can be of course customized. The default mesh settings can be checked by doing Mesh → Draw → Sizes → All types.

For the sake of simplicity, we will assume this predefined mesh settings to be good enough. Thus, the problem can be meshed by doing Mesh → Generate mesh (Ctrl + G). A pop-up window asking for the mesh size will appear. Since we have the predefined mesh sizes, any number can be put in this window as such predefined settings prevail over it.

Finally, the problem is run by clicking on the rocket button (or Calculate → Calculate (F5)). In the folder in where we have saved the case, the next Kratos source files will appear:

  • *.mdpa: File containing the mesh geometry
  • ProjectParameters.json: File containing the problem settings and BCs
  • MainKratos.py: Main script to run the simulation
  • (eventually *Materials.json: File containing the material properties. Only used in some applications (e.g. StructuralMechanicsAplication)

(in the next exercises of the course we will play around with these source files)

The terminal output can be check by clicking the i button below the rocket (or Calculate → View process info..). In case it is needed, the simulation can be interrupted by clicking the red cross button (or Calculate → Cancel process).

3.5 Results post-processing

Once the simulation is finished, a new pop-up window reporting it will appear. We can directly access to the post-process by clicking on either the Postprocess button of such pop-up window or the rainbow button in the top right part of the screen (see the image below).

Go to postprocess

The image below highlights the basic tools of the postprocess environment:

  • Time step selection
  • Contour field visualization
  • Vector field visualization
  • Animation

postprocess

4. Set a Structural Mechanics problem

Similarly to the previous section, we can load the Structural application in the application market and then select the 2D problem size option.

Among the all the structural mechanics predefined examples, we can select the high-rise building one. Note that if the mouse pointer is placed on any example icon a brief description to identify it appears.

The image below depicts the appearance of the Structural GUI after loading the high-rise building example. It can be noted that the structure of the GUI is the same as the Fluid one (strategy settings, parts settings, interval settings ,…) but with the particularities associated to the resolution of a CSM problem.

High-rise building example 2

As it can be observed the problem to solve consists in a steel cantilever beam, which intends to simulate the building. The beam its clamped along its inferior edge and an horizontal load of 50 N is applied in the rest of the edges to emulate the wind effect.

The simulation can be meshed, launched and postprocessed by following the same steps explained in the previous section.

(this case can be also retrieved from this link)

5. Set a Fluid-Structure Interaction problem

Finally, we can couple the physics of both problems by using the Kratos FSI GUI. Therefore, by following the previously explained steps the prepared example can be loaded, meshed and run. Once the it is loaded, the GiD window will look as the image below.

High-rise building example 3

Due to the coupled nature of the posed problem, it is important to point out some minor aspects:

  • The interface is thought as the union of the CFD and the CSM interfaces plus a coupling section. This is always the case for all the Kratos coupled problems GUIs.
  • Since the structure and the fluid meshes will be written in different geometry input files, one needs to duplicate the interface lines since the fluid and the structure need to be independent geometrical entities. Besides it is also needed to assign them to the interface condition in the BCs section of fluid and structure.

(this case can be also retrieved from this link)

6. Conclusion

In this tutorial it is explained how to generate some simple simulation cases by using the Kratos GUI. For the sake of simplicity and to serve as a base for the upcoming exercises, only the automatically generated examples have been used. To create specific geometries and to customize the mesh settings we refer to the GiD user manuals. Furthermore, it is important to mention that there are more predefined examples besides these ones, both in the presented applications as well as in the rest of available ones.

Finally, we strongly encourage you to open an issue in either the Kratos repository or the GiD interface to discuss any arising doubt or suggestion.