Metafor

ULiege - Aerospace & Mechanical Engineering

User Tools

Site Tools


doc:user:tutorials:ownfemodel

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
Last revisionBoth sides next revision
doc:user:tutorials:ownfemodel [2015/01/09 13:00] bomandoc:user:tutorials:ownfemodel [2016/03/30 15:23] – external edit 127.0.0.1
Line 1: Line 1:
-====== How to build my own FE model? [new] ====== +====== How to build my own FE model? ====== 
 +{{:doc:user:ico-worker.png?40 |Under construction}}
 Crushing of a block made of steel by a cylindrical punch Crushing of a block made of steel by a cylindrical punch
  
Line 16: Line 16:
 Main idea: Main idea:
 The input file creates a complete data structure and returns it to the FE code The input file creates a complete data structure and returns it to the FE code
 +
 +Data structure of a model
 +
 +{{:doc:user:tutorials:datastructure.png|}}
 +
 +First lines – header of the file
 +
 +<code>
 +# -*- coding: latin-1; -*-
 +# $Id: tutorial1.py 1875 2014-01-02 10:10:56Z boman $
 +########################################
 +#   tutorial 1                         #
 +#--------------------------------------#
 +#   geometrie 2D etat plan defo        #
 +#   materiau elastoviscoplastique      #
 +#           a écrouissage isotrope     #
 +#   definition outil                   #
 +#   contact rigide-defo collant        #
 +#   archivage + visu courbes           #
 +########################################
 +# Tutorial
 +
 +from wrap import *
 +import math
 +</code>
 +
 +
 +  * coding:latin1 is required for French accentuated characters
 +  * miscellaneous comments
 +  * import the C++/python interface of the program (remember the wrap folder in the installation tree)
 +  * import the math module of python for later use
 +
 +<code>
 +metafor = Metafor()
 +domain = metafor.getDomain()
 +
 +def getMetafor(p={}): return metafor
 +</code>
 +{{ :doc:user:tutorials:datastr01.png|At that point, the data structure simply looks like this}}
 +Creation of an instance of the Metafor class
 +(for now it is almost empty)
 +We name it metafor
 +
 +Any Metafor object contains a Domain object.
 +We retreive the Domain and we name it domain
 +
 +We define the getMetafor() function (same for all models)
 +
 +
  
  
  
  
doc/user/tutorials/ownfemodel.txt · Last modified: 2018/10/05 10:10 by boman

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki