doc:user:tutorials:tuto1
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
doc:user:tutorials:tuto1 [2014/08/07 22:45] – joris | doc:user:tutorials:tuto1 [2016/07/11 16:40] – [Contact] boemer | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | |
+ | ====== | ||
Line 7: | 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 21: | 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 66: | 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 136: | Line 103: | ||
geometry = domain.getGeometry() | geometry = domain.getGeometry() | ||
- | geometry.setDimPlaneStrain() | + | geometry.setDimPlaneStrain(1.0) |
Line 165: | 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 262: | 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 288: | Line 255: | ||
- | ==== Defining | + | ==== Defining |
- | Now that the geometry is defined, physical properties must be assigned to the domain, by associating ([[doc: | + | Now that the geometry is defined, physical properties must be assigned to the domain, by associating ([[doc: |
=== Material === | === Material === | ||
- | First, the volumic | + | First, the volume |
materialset = domain.getMaterialSet() | materialset = domain.getMaterialSet() | ||
Line 336: | Line 303: | ||
=== Element Generator - FieldApplicator === | === Element Generator - FieldApplicator === | ||
- | Finally, an element generator is used to apply the newly defined Element Properties to the meshed geometry. In Metafor, these objects are called [[doc: | + | Finally, an element generator is used to apply the newly defined Element Properties to the meshed geometry. In Metafor, these objects are called [[doc: |
app = FieldApplicator(1) | app = FieldApplicator(1) | ||
Line 360: | 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 387: | 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 421: | 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 ==== | ||
Line 452: | 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.txt · Last modified: 2016/07/11 16:45 by boemer