Personal tools
You are here: Home Tutorials Tutorial 4

Tutorial 4


Note: these tutorials have been tested with version 18.10. They will not work with previous versions.

 

The Tutorial 4 is about coupling two different problems: a 2D St. Venant simulation with a 2D Advection-Diffusion simulation. The simulation process keeps a structure similar to the other tutorials but has some differences: it introduces functions and the keyword import to help structure and organize the command file; the keyword import is used to add the required data and the functions are used to build the objects in external files. There is also a possibility to reuse functions with the data, without having to build it for each use. This example helps introducing concepts that should lead to more complex situations. As in the third tutorial, the domain is a segment of a small river. Starting from an initial solution, the solution is solved through time integration.

The input files to be used for this tutorial can be found in the Files section.

What is new:

  • Use of the keyword import,
  • Use of functions,
  • Use of tracer to monitor the execution of H2D2, logging to file iterations, progression and execution time (See Tools).
  • Introduction of partitioning (See Advanced Chapters).
  • Input data split into different directories,
  • Command files are split in different directories.

Data directory structure

TUTORIAL 4
+---Mesh
| +---cd2d
| \---sv2d
+---MNH
| +---cd2d
| \---sv2d
| \---high_flow
| \---low_flow
+---MNT
| +---cd2d
| \---sv2d
+---Post_treatment
| +---After-resolution
| | +---cd2d
| | \---sv2d
| \---During_resolution
| +---cd2d
| \---sv2d
+---Scripts
+---Simulation
+---Strategy
| +---cd2d
| \---sv2d

Main command file structure

The command file is structured as follows:

  1. Define the path,
  2. Import all required files,
  3. Build global property objects,
  4. Call the functions to build the objects, and with these, the sequence items for each problem,
  5. Construct the global sequence,
  6. Solve the sequence,
  7. Save the files and end the simulation.

The present tutorial will have no step by step description; files can be explored with the information above and with the description and comments within each file.

Recommended starting points are:





Chapitre: tutorial 4 ( 1 / 1 )


Document Actions