doc:user:geometry:import:tuto2
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:user:geometry:import:tuto2 [2015/01/08 10:43] – [Reading a SAMCEF Mesh/Geometry] boman | doc:user:geometry:import:tuto2 [2016/03/30 15:23] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Reading | + | ====== Reading SAMCEF |
===== Introduction ===== | ===== Introduction ===== | ||
- | Here, the complex | + | {{: |
+ | Due to historical reasons, the preprocessor of [[http:// | ||
- | * creation of a geometry and mesh with [[doc:user:general:glossaire# | + | <note important> |
- | * creation of parameters | + | |
- | * integration by Metafor. | + | |
- | Thiw way is **NOT recommended** for simple tests which can be meshed by Metafor meshers. Indeed, since [[doc: | + | ===== BACON '' |
- | ===== Bacon Part ===== | + | The example simulation consists of a sheared cube (lower and upper faces and fixed and moved one with respect to another). The figure below shows the geometry: |
- | ==== Test Case description ==== | + | {{ doc: |
- | The point of this exercise is to create | + | The BACON input file named '' |
- | {{ doc: | + | __Geometry__ |
- | The file named '' | + | The geometry is created with the following BACON commands (see BACON manual for details): |
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
- | ==== Geometry ==== | + | __Mesh Generation__ |
- | | + | * Performed with '' |
- | * Command '' | + | * Lines are meshed with the command "'' |
- | * Command '' | + | * The lower side is meshed |
- | * Command '' | + | |
- | * Command '' | + | |
- | * Commande '' | + | |
- | * Commande '' | + | |
- | + | ||
- | ==== Mesh ==== | + | |
- | + | ||
- | | + | |
- | * Lines are meshed with the command "'' | + | |
- | * The lower face is meshed | + | |
* An attribute number must then be defined. | * An attribute number must then be defined. | ||
- | ==== Type of elements declaration ==== | + | __Choice |
- | * The command '' | + | * The command '' |
- | ==== Definition | + | __Definition |
- | * The command '' | + | * The command '' |
- | * If '' | + | * If '' |
- | * Node selections | + | * Node selections |
- | ===== Creation of the .fdb Bacon file ===== | + | __Manual |
- | From the '' | + | BACON can be started manually |
- | | + | |
- | input | + | |
- | .sauve db format | + | |
- | .sto | + | |
- | ===== Conversion of the data into a Python script ===== | + | From the '' |
+ | INPUT | ||
+ | .SAUVE DB FORMAT | ||
+ | .STO | ||
- | In Metafor, the file '' | + | __Summary:__ What can be imported from BACON? |
- | + | ||
- | import toolbox.importFdb | + | |
- | toolbox.importFdb.bacon2PyMeta(' | + | |
- | + | ||
- | If all goes well, a file '' | + | |
- | + | ||
- | ===== Creation of the " | + | |
- | + | ||
- | The file with parameters and boundary conditions is created in Python. The list of commands is similar to what is found in [[doc: | + | |
- | + | ||
- | The relevant parameter file is named '' | + | |
- | + | ||
- | Data from Bacon can be retrieved when importing the Python module created by the converter '' | + | |
- | + | ||
- | import apps.bQs.aleCubeCgBacon | + | |
- | apps.bQs.aleCubeCgBacon.fillImportedFdb(dom) | + | |
- | + | ||
- | The other parameters are defined as usual. To distinguish the various mesh element groups (Bacon attributes), | + | |
- | + | ||
- | # ATTRIBUTES | + | |
- | prp99 = ElementProperties(Volume3DElement) | + | |
- | prp99.put(MATERIAL, | + | |
- | prp99.put(CAUCHYMECHVOLINTMETH, | + | |
- | prp99.put(STIFFMETHOD, | + | |
- | + | ||
- | interactionset = dom.getInteractionSet() | + | |
- | app99 = FieldApplicator(99) | + | |
- | app99.push(99, | + | |
- | interactionset.copy(app99) | + | |
- | interactionset(99).addProperty(prp99) | + | |
- | + | ||
- | ===== Metafor Integration ===== | + | |
- | + | ||
- | The temporal integration is launched with the command '' | + | |
- | + | ||
- | {{ doc: | + | |
- | + | ||
- | ===== Advice ===== | + | |
- | + | ||
- | + | ||
- | * groups should be defined with a different number from attributes (the father being put on a fictive group with the number of the attribute) unless the group contains the nodes from the attribute with the corresponding number. | + | |
- | * If [[doc: | + | |
- | * Nodes and mesh elements must be be numbered anew anymore. | + | |
- | + | ||
- | ===== Limits of bacon import ===== | + | |
* Points | * Points | ||
Line 116: | Line 67: | ||
* Selections: only groups of nodes are imported (other have no use in Metafor) | * Selections: only groups of nodes are imported (other have no use in Metafor) | ||
* "DAO -- Mesh" relations are not read again ('' | * "DAO -- Mesh" relations are not read again ('' | ||
+ | |||
+ | ===== Metafor input file ===== | ||
+ | |||
+ | __Reading the BACON file from Metafor__ | ||
+ | |||
+ | In Metafor, the file '' | ||
+ | |||
+ | import toolbox.samcef | ||
+ | bi = toolbox.samcef.BaconImporter(domain, | ||
+ | bi.execute() | ||
+ | | ||
+ | where '' | ||
+ | |||
+ | If all goes well, a file '' | ||
+ | |||
+ | __Element Generation in Metafor__ | ||
+ | |||
+ | The BACON attributes are converted to '' | ||
+ | app = FieldApplicator(1) | ||
+ | app.push(groupset(99)) | ||
+ | interactionset.add(app) | ||
+ | | ||
+ | __Boundary conditions in Metafor__ | ||
+ | |||
+ | Selections in BACON are translated into '' | ||
+ | loadingset.define(groupset(4), | ||
+ | |||
+ | <note important> |
doc/user/geometry/import/tuto2.1420710225.txt.gz · Last modified: 2016/03/30 15:22 (external edit)