Metafor

ULiege - Aerospace & Mechanical Engineering

User Tools

Site Tools


doc:user:geometry:import:tuto2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:user:geometry:import:tuto2 [2015/01/08 15:19] bomandoc:user:geometry:import:tuto2 [2016/03/30 15:23] (current) – external edit 127.0.0.1
Line 8: Line 8:
 <note important>Using BACON is not recommended! The user who wants to use a another preprocessor should have a look at [[:doc:user:geometry:import:importgmsh|gmsh]] which is modern, free, and sometimes more robust than BACON.</note> <note important>Using BACON is not recommended! The user who wants to use a another preprocessor should have a look at [[:doc:user:geometry:import:importgmsh|gmsh]] which is modern, free, and sometimes more robust than BACON.</note>
  
-===== BACON Part ===== +===== BACON ''.dat'' file =====
- +
-==== Input file description ====+
  
 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: 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:
Line 18: Line 16:
 The BACON input file named ''cubeCG.dat'' (located in ''apps/ale'') contains the commands used to create the geometry, the mesh and node groups (selections).  The BACON input file named ''cubeCG.dat'' (located in ''apps/ale'') contains the commands used to create the geometry, the mesh and node groups (selections). 
  
-==== Geometry ====+__Geometry__
  
 The geometry is created with the following BACON commands (see BACON manual for details): The geometry is created with the following BACON commands (see BACON manual for details):
Line 29: Line 27:
     * ''.DOM'' for the domain (one 3D domain - the cube - and one 2D domain - the lower side which will be meshed and extruded).     * ''.DOM'' for the domain (one 3D domain - the cube - and one 2D domain - the lower side which will be meshed and extruded).
  
-==== Mesh Generation ====+__Mesh Generation__
  
     * Performed with ''.GEN''.     * Performed with ''.GEN''.
Line 36: Line 34:
     * An attribute number must then be defined.     * An attribute number must then be defined.
  
-==== Choice of Element Type ====+__Choice of Element Type__
  
     * The command ''.HYP VOLUME'' is used (in 2D and 3D).     * The command ''.HYP VOLUME'' is used (in 2D and 3D).
  
-==== Definition of node/element groups (selections) ====+__Definition of node/element groups (selections)__
  
     * The command ''.SEL'' is used     * The command ''.SEL'' is used
Line 46: Line 44:
     * Node selections will be used to define boundary conditions (fixations, contact, ...) in the Metafor model.     * Node selections will be used to define boundary conditions (fixations, contact, ...) in the Metafor model.
  
-===== What can be imported from BACON? =====+__Manual Creation of the ''.fdb'' file__ 
 + 
 +BACON can be started manually with the command: 
 + 
 +  samcef ba aleCubeCg n 1 
 + 
 +From the ''.dat'' file, a ''.fdb'' is created with BACON with the commands: 
 +  INPUT 
 +  .SAUVE DB FORMAT 
 +  .STO 
 + 
 +__Summary:__ What can be imported from BACON?
  
     * Points     * Points
Line 59: Line 68:
     * "DAO -- Mesh" relations are not read again (''nodeOnLine'', ...)     * "DAO -- Mesh" relations are not read again (''nodeOnLine'', ...)
  
 +===== Metafor input file =====
  
-===== Creation of the ''.fdb'' BACON file ===== +__Reading the BACON file from Metafor__
- +
-BACON can be started manually with the command: +
- +
-  samcef ba aleCubeCg n 1 +
- +
-From the ''.dat'' file, a ''.fdb'' is created with BACON with the commands: +
-  INPUT +
-  .SAUVE DB FORMAT +
-  .STO +
- +
-===== Conversion of the data into a Python script =====+
  
 In Metafor, the file ''.dat'' is converted thanks to a conversion module named ''toolbox.samcef'' (see ''apps.ale.cubeCG''): In Metafor, the file ''.dat'' is converted thanks to a conversion module named ''toolbox.samcef'' (see ''apps.ale.cubeCG''):
Line 79: Line 78:
   bi.execute()   bi.execute()
      
-where ''domain'' is the domain that should be filled with the converted mesh and geometry. The second argument corresponds to the full path to the file ''cubeCG.dat'' (it is calculated from the full path of the python input file).+where ''domain'' is the domain that should be filled with the converted mesh and geometry. The second argument corresponds to the full path to the file ''cubeCG.dat'' (it is computed from the full path of the python input file).
    
 If all goes well, a file  ''cubeCG.fdb'' is then created in the folder ''workspace/apps_ale_cubeCG'' If all goes well, a file  ''cubeCG.fdb'' is then created in the folder ''workspace/apps_ale_cubeCG''
  
-===== Element Generation in Metafor =====+__Element Generation in Metafor__
  
 The BACON attributes are converted to ''Groups'' in Metafor. For example, if attribute #99 has been used when generating mesh in BACON, all the elements are stored in ''groupset(99)'' in Metafor.  The BACON attributes are converted to ''Groups'' in Metafor. For example, if attribute #99 has been used when generating mesh in BACON, all the elements are stored in ''groupset(99)'' in Metafor. 
Line 90: Line 89:
   interactionset.add(app)   interactionset.add(app)
      
-===== Boundary conditions in Metafor =====+__Boundary conditions in Metafor__
  
 Selections in BACON are translated into ''Groups'' with the same number. Boundary conditions such as prescribed displacements or contact can be thus defined easily in Metafor. For example, a selection such as ''.SEL GROUPE 4 NOEUDS'' can lead to the following command in the input file:  Selections in BACON are translated into ''Groups'' with the same number. Boundary conditions such as prescribed displacements or contact can be thus defined easily in Metafor. For example, a selection such as ''.SEL GROUPE 4 NOEUDS'' can lead to the following command in the input file: 
Line 96: Line 95:
  
 <note important>Consequence: Groups should be defined with a different number from attributes</note> <note important>Consequence: Groups should be defined with a different number from attributes</note>
- 
doc/user/geometry/import/tuto2.1420726759.txt.gz · Last modified: 2016/03/30 15:22 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki