How the GiD Graphical User Interface communicates with Kratos

From KratosWiki
(Difference between revisions)
Jump to: navigation, search
Line 14: Line 14:
 
==Input files generation (Tcl/Tk)==
 
==Input files generation (Tcl/Tk)==
 
==Launching the calculation==
 
==Launching the calculation==
 +
When the user starts a calculation, GiD runs a .bat file located in the ProblemType folder. In Windows it will run '''Kratos.win.bat''', in linux it will run '''Kratos.unix.bat'''
 +
 +
What these files do, essentially, is to set some OS environment variables to certain values, and when all these variables have been set, call python to start the calculation. Windows and linux are so different that they deserve different explanations:
 +
===In Windows===
 +
This is the usual content of Kratos.win.bat:
 +
 +
===In linux===
 +
This is the usual content of Kratos.unix.bat:

Revision as of 22:42, 28 June 2014

Contents

General Concepts

Any Graphical User Interface (GUI) for Kratos must be able to:

1- Generate the files which are necessary for Kratos to run. These files are usually .mdpa input files that contain the geometrical data, and other .py input files that contain parameters/options important for the run.

It is common to use the naming Case_nameFluid.mdpa, Case_nameStructural.mdpa for the .mdpa files, and ProjectParameters.py for the .py file.


2- Start the run by calling Python plus a main script.

It is common to have a KratosOpenMP.py as a main Python script when OpenMP parallelism has been chosen in the options, or KratosMPI.py when MPI parallelism has been chosen. Other similar options are possible.

Input files generation (GiD ProblemType language)

Input files generation (Tcl/Tk)

Launching the calculation

When the user starts a calculation, GiD runs a .bat file located in the ProblemType folder. In Windows it will run Kratos.win.bat, in linux it will run Kratos.unix.bat

What these files do, essentially, is to set some OS environment variables to certain values, and when all these variables have been set, call python to start the calculation. Windows and linux are so different that they deserve different explanations:

In Windows

This is the usual content of Kratos.win.bat:

In linux

This is the usual content of Kratos.unix.bat:

Personal tools
Categories