Metafor

ULiege - Aerospace & Mechanical Engineering

User Tools

Site Tools


doc:user:elements:volumes:user_defined_materials

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:elements:volumes:user_defined_materials [2024/06/06 15:53] radermeckerdoc:user:elements:volumes:user_defined_materials [2024/10/22 14:15] (current) radermecker
Line 7: Line 7:
   * ''def PythonHyperMaterial.<nowiki>__init__</nowiki>(self, _no):'' with ''_no'' being the material number chosen.   * ''def PythonHyperMaterial.<nowiki>__init__</nowiki>(self, _no):'' with ''_no'' being the material number chosen.
   * ''def computeStressPython(self, FTotal):''   * ''def computeStressPython(self, FTotal):''
-    * **Input:** The total deformation gradient ''FTotal'', sent from C++ to Python through a `std::vector[F11, F12, F13, F21, F22, F23, F31, F32, F33]+    * **Input:** The total deformation gradient ''FTotal'', sent from C++ to Python through a ''std::vector'' [F11, F12, F13, F21, F22, F23, F31, F32, F33], hence ''FTotal[0] = F11'', etc.
     * **Output:** The Cauchy stress, in the current configuration, returned from Python to C++ through a Python list [Sig11, Sig22, Sig33, Sig12, Sig13, Sig23]     * **Output:** The Cauchy stress, in the current configuration, returned from Python to C++ through a Python list [Sig11, Sig22, Sig33, Sig12, Sig13, Sig23]
  
Line 13: Line 13:
          
 <WRAP center round important 60%> <WRAP center round important 60%>
-So far, global perturbation (of the internal forces) must be usedCfr+Selective integration with pressure report ''SRIPR'' for the integration will not work. 
 +</WRAP> 
 +<WRAP center round info 60%> 
 +The material tangent moduli is automatically approximated using finite central difference.
 </WRAP> </WRAP>
  
Line 20: Line 23:
 <code python> <code python>
 from wrap import *  from wrap import * 
 +import numpy as np
 metafor = None metafor = None
- 
-class PythonHyperMaterial: 
-    def __init__(self, _no): 
-        self._no = _no 
  
 class UserMat(PythonHyperMaterial): class UserMat(PythonHyperMaterial):
Line 53: Line 53:
     elementsProps = ElementProperties(Volume2DElement)     elementsProps = ElementProperties(Volume2DElement)
     elementsProps.put(MATERIAL, 1)     elementsProps.put(MATERIAL, 1)
-    elementsProps.put(STIFFMETHOD, STIFF_NUMERIC) 
  
     # ... some code ... #     # ... some code ... #
doc/user/elements/volumes/user_defined_materials.1717682004.txt.gz · Last modified: by radermecker

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki