doc:user:tutorials:tuto1
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| doc:user:tutorials:tuto1 [2015/01/07 12:02] – [First Test Case] boman | doc:user:tutorials:tuto1 [2016/07/11 16:45] (current) – [Temporal Integration] boemer | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| | | ||
| - | ====== How to write an input file ====== | + | ====== How to build my own FE model? |
| Line 8: | Line 8: | ||
| - | Before reading this page, the document [[doc: | + | Before reading this page, the document [[doc: |
| - | In the following document are described, line after line, the steps leading to the development of a test case where a cylindrical die will crush a block of material in plane stress. Here is a preview of the final deformation. | + | In the following document are described, line after line, the steps leading to the development of a input file where a cylindrical die will crush a block of material in plane strain. Here is a preview of the final deformation. |
| < | < | ||
| Line 22: | Line 22: | ||
| \\ | \\ | ||
| - | Since Metafor is improved | + | Since Metafor is continuously |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | ===== Data set Description ===== | + | |
| - | + | ||
| - | + | ||
| - | A Metafor data set is a Python module which defines an " | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | {{ doc: | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | To sum up, one data set = one (or several) Python files = one Metafor object. | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| + | ===== Input-file Description ===== | ||
| + | A Metafor input file is a Python module which defines an object called '' | ||
| + | {{ doc: | ||
| + | To sum up, one input file = one (or several) Python files = one Metafor object. | ||
| ==== Heading ==== | ==== Heading ==== | ||
| - | + | The module | |
| - | + | ||
| - | The module begins with some comments (preceded by " '' | + | |
| - | + | ||
| # -*- coding: latin-1; -*- | # -*- coding: latin-1; -*- | ||
| Line 67: | Line 42: | ||
| # Tutorial | # Tutorial | ||
| - | + | The line " | |
| - | + | ||
| - | The line " | + | |
| - | + | ||
| from wrap import * | from wrap import * | ||
| import math | import math | ||
| - | + | The first line imports | |
| - | + | ||
| - | Like all Metafor [[doc: | + | The '' |
| - | The '' | + | |
| - | + | ||
| metafor = Metafor() | metafor = Metafor() | ||
| domain = metafor.getDomain() | domain = metafor.getDomain() | ||
| - | + | The main object of the module is now created | |
| - | + | ||
| - | The main object of this module is now created, which is the object | + | |
| The analysis will then handle data from this domain to, for example, integrate temporally over its evolution equations. | The analysis will then handle data from this domain to, for example, integrate temporally over its evolution equations. | ||
| Line 137: | Line 103: | ||
| geometry = domain.getGeometry() | geometry = domain.getGeometry() | ||
| - | geometry.setDimPlaneStrain() | + | geometry.setDimPlaneStrain(1.0) |
| Line 166: | Line 132: | ||
| * Small objects which require few parameters to be defined, like '' | * Small objects which require few parameters to be defined, like '' | ||
| - | * Bigger objects which require more arguments, like curves, are defined using a temporary object, which is filled and copied. For example, | + | * Bigger objects which require more arguments, like curves, are defined using a temporary object, which is filled and copied. For example, a curve is created by first defining a line (see below). |
| - | In this example, '' | + | In this example, '' |
| Line 263: | Line 229: | ||
| The meshers ([[doc: | The meshers ([[doc: | ||
| - | As for the geometry, it is recommended to visually check whether the piece was meshed properly by opening a '' | + | As for the geometry, it is recommended to visually check whether the geometry |
| Line 361: | Line 327: | ||
| Now, the boundary conditions are considered. The set which handles all boundary conditions commands is called the '' | Now, the boundary conditions are considered. The set which handles all boundary conditions commands is called the '' | ||
| - | The X component of ligne 4 and the Y component of line 1 must be [[doc: | + | The X component of line 4 and the Y component of line 1 must be [[doc: |
| Line 388: | Line 354: | ||
| - | Setting fixed ends or displacements is done is the same way as the definition of points in the geometry, with the single '' | + | Setting fixed ends or displacements is done in the same way as the definition of points in the geometry, with the single '' |
| ==== Contact ==== | ==== Contact ==== | ||
| Line 422: | Line 388: | ||
| The deformable entity is specified with the command '' | The deformable entity is specified with the command '' | ||
| - | It should be noted that the contact interaction number must be different | + | It should be noted that the contact interaction number must be different |
| ==== Temporal Integration ==== | ==== Temporal Integration ==== | ||
| The description of this model is now over. What is left to consider is the way the '' | The description of this model is now over. What is left to consider is the way the '' | ||
| - | Many options are available, however the simplest one is chosen here, which is a quasi-static integration (where the inertia is neglected). What remains to define | + | Many options are available, however the simplest one is chosen here, which is a quasi-static integration (where the inertia is neglected). What remains to be defined |
| Line 446: | Line 412: | ||
| | | ||
| - | Afterwards, the '' | + | Afterwards, the '' |
| ==== Curves Extraction | ==== Curves Extraction | ||
| Line 453: | Line 419: | ||
| valuesmanager = metafor.getValuesManager() | valuesmanager = metafor.getValuesManager() | ||
| valuesmanager.add(1, | valuesmanager.add(1, | ||
| - | valuesmanager.add(2, | + | valuesmanager.add(2, |
| The first line fetches the '' | The first line fetches the '' | ||
doc/user/tutorials/tuto1.1420628542.txt.gz · Last modified: (external edit)
