Metafor

ULiege - Aerospace & Mechanical Engineering

User Tools

Site Tools


doc:user:elements:volumes:fluid_iso_hypo_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:fluid_iso_hypo_materials [2016/04/01 15:21] – [NortonHoffHypoMaterial] carrettadoc:user:elements:volumes:fluid_iso_hypo_materials [2017/12/01 12:11] (current) – [NortonHoffHypoMaterial] boemer
Line 10: Line 10:
  
 $$ $$
-\sigma_{ij} = s_{ij} + \delta_{ij} p+\sigma_{ij} = s_{ij} + p\delta_{ij}
 $$ $$
 +
 with $ s_{ij} = 0 $ in a non viscous fluid. with $ s_{ij} = 0 $ in a non viscous fluid.
  
 The equation which associates pressure and volume is  The equation which associates pressure and volume is 
 +
 $$ $$
-dP -K \frac{dV}{V}+dp = K \frac{dV}{V}
 $$ $$
 +
 where $K$ is the bulk modulus. where $K$ is the bulk modulus.
 +
 +<note warning>
 +Convergence when using this law may be difficult to achieve since there is no stiffness when shearing the material. If you encounter this kind of issue, you may use **NortonHoffHypoMaterial** discussed below with a low viscosity parameter and NORTON_M = 1 to model a Newtonian fluid. 
 +</note>
  
 === Parameters === === Parameters ===
Line 24: Line 31:
 | Density                                       ''MASS_DENSITY''    |              | | Density                                       ''MASS_DENSITY''    |              |
 | Bulk Modulus                                |   ''BULK_MODULUS''    |              | | Bulk Modulus                                |   ''BULK_MODULUS''    |              |
 +
 +
  
 ===== NortonHoffHypoMaterial===== ===== NortonHoffHypoMaterial=====
Line 29: Line 38:
 === Description === === Description ===
  
-Norton-Hoff law descriding a viscous fluid.+Norton-Hoff law describing a viscous fluid.
  
 Stresses are computed with Stresses are computed with
Line 53: Line 62:
  
 where $K$ is the bulk modulus and $V$ the volume. where $K$ is the bulk modulus and $V$ the volume.
 +
 +=== Parameters ===
 +
 +^   Name                   Metafor Code      Dependency ^
 +| Viscosity parameter  |     ''NORTON_MU''         TM     |
 +| Bulk modulus           ''BULK_MODULUS''    |     TM     |
 +| Parameter m          |     ''NORTON_M''      |     TM     |
 +| Density              |   ''MASS_DENSITY''    |     TM     |
 +
 +
 +=== Advice for modelling low viscosity fluid ===
  
 <note warning> <note warning>
-To model low viscosity fluid (0.3 Pa.s for instance) it is important to used SRI elements instead of SRIPR. Indeed, SRIPR elements might induce oscillations in pressure and velocity fields. This seems to come from the different pressure value that can be stored at the deviatoric gauss points of SRIPR elements. For SRI elements, the hydrostatic pressure value is computed and stored at centre of each element. In that case, the pressure value on each element is unique.+To model Newtonian fluid with low viscosity (0.3 Pa.s for instance) it is important to use SRI elements instead of SRIPR. Indeed, SRIPR elements might induce oscillations in pressure and velocity fields. This seems to come from the different pressure values that can be stored at the deviatoric Gauss points of SRIPR elements. For SRI elements, the hydrostatic pressure value is computed and stored at centre of each element. In that case, the pressure value on each element is unique.
 </note> </note>
  
 <note important> <note important>
-Boundary conditions might also have a huge impact on the convergence and the validity of the results. It is therefore crucial to check the way the elements deform along the boundaries and the corners.+Boundary conditions might also have a huge impact on the convergence and the validity of the results. It is therefore crucial to check the way the elements deform along the boundaries and the corners. From these observations, you will be able to adapt the boundary conditions.
 </note> </note>
  
 <note warning> <note warning>
-A good compromise must be reached between the elements size and the time step value. If elements are too small, low viscous fluid elements may reach configurations where Negative Jacobian take place during Newton-Raphson procedure. The more elements you have for low viscous fluid, the more difficult is the convergence and therefore the time step is decreased automatically by Metafor. It is therefore better to avoid refining mesh elements too much where it is not needed.+A good compromise must be reached between the elements size and the time step value. If elements are too small, low viscous fluid elements may reach configurations where the Jacobian of some element can become negative during the Newton-Raphson procedure. The more elements you have for low viscous fluid, the more difficult is the convergence and therefore the time step is decreased automatically by Metafor. It is therefore better to avoid refining mesh elements too much where it is not needed.
 </note> </note>
  
Line 70: Line 90:
 </note> </note>
  
-=== Parameters === 
  
-^   Name                   Metafor Code      Dependency ^ 
-| Viscosity parameter  |     ''NORTON_MU''         TM     | 
-| Bulk modulus           ''BULK_MODULUS''    |     TM     | 
-| Parameter m          |     ''NORTON_M''      |     TM     | 
-| Density              |   ''MASS_DENSITY''    |     TM     | 
  
  
Line 91: Line 105:
  
 <note warning> <note warning>
-Both bulk modulus and the viscosity parameter are constant during a time step and are updated at the end of each time step. It is therefore important to assess the influence of the time step size. A time step too large might have an effect on the solution.+Both bulk modulus and the viscosity parameter are constant during a time step and are updated at the end of each time step. It is therefore important to assess the influence of the time step size: a time step too large might have an effect on the solution.
 </note> </note>
  
Line 103: Line 117:
  
  
-=== Accounting for bulk modulus variation with pressure ===+=== Accounting for bulk modulus and viscosity variation with pressure ===
  
-self.p['k0']+self.p['dkdp']*pres+As mentionned above, the bulk modulus dependance with pressure must be linear 
 + 
 +$$ 
 +K(p) = K_0 \frac{dK}{dp} p 
 +$$ 
 + 
 +Therefore two parameters must be provided by the user: the bulk modulus at atmospheric pressure and the derivative $\frac{dK}{dp}$ 
 + 
 +<note warning> 
 +With Metafor, the pressure is negative in compressionTherefore, the value of $\frac{dK}{dp}$ has to be negative (otherwise the bulk modulus would decrease in compression which has no physical meaning). 
 +</note> 
 + 
 +The function $K(p)$ is provided by the user through a **PythonDirectorOneParameterFunction**:
  
 <code> <code>
Line 133: Line 159:
 </code> </code>
  
 +The user has more freedom for the viscosity evolution with pressure. The viscosity variation and its derivative have to be provided trough a class similar to the one below
  
 <code> <code>
-    bulkLaw  = MyBulkFunction(p)  +class MyViscoPFunction(PythonDirectorOneParameterFunction): 
-    #print "help(bulkLaw) = ", help(bulkLaw)+    def __init__(self,_p): 
 +        print "MyViscoPFunction : __init__" 
 +        PythonDirectorOneParameterFunction.__init__(self) 
 +        self.debugRefs() 
 +        self.p      _p 
 +        print "MyViscoPFunction : __init__ finished" 
 +    def __del__(self): 
 +        print "MyViscoPFunction : __del__ \n" 
 +        print "callToDestructor of MyViscoPFunction not allowed. Add MyViscoPFunction.__disown__()" 
 +        exit(1) 
 +    def evaluate(self,pres): 
 +        if pres>0.0: # pression positive en traction ! 
 +            return self.p['mu0'
 +        else :       # pression négative en compression ! 
 +            return self.p['mu0']*math.exp(-self.p['alpha']*pres)
  
 +    def computeDerivation(self,pres):
 +        if pres>0.0:
 +            return 0.0
 +        else :
 +            return -self.p['mu0']*self.p['alpha']*math.exp(-self.p['alpha']*pres)
 +</code>
 +
 +The instances of MyBulkFunction and MyViscoPFunction are passed to the Norton-Hoff material law through the commands below
 +
 +<code>
 +    bulkLaw  = MyBulkFunction(p)   # <-- p stands 
 +    viscoLaw = MyViscoPFunction(p) # <-  "     "
 +    # for parameters dictionnary and not pressure
 +    
     materset = domain.getMaterialSet()     materset = domain.getMaterialSet()
     materset.define(1,NortonHoffPHypoMaterial)     materset.define(1,NortonHoffPHypoMaterial)
-    materset(1).put(BULK_MODULUS     ,  1.0) +    materset(1).put   (BULK_MODULUS ,  1.0) 
-    materset(1).depend(BULK_MODULUS  ,  bulkLaw,     Field(IF_P))+    materset(1).depend(BULK_MODULUS ,  bulkLaw  , Field(IF_P)) 
 +    materset(1).put   (NORTON_MU    ,  1.0) 
 +    materset(1).depend(NORTON_MU    ,  viscoLaw , Field(IF_P)) 
 +    materset(1).put   (NORTON_M     ,  1.0      ) 
 +    materset(1).put   (MASS_DENSITY ,  p['rho'] )    
 </code> </code>
  
doc/user/elements/volumes/fluid_iso_hypo_materials.1459516918.txt.gz · Last modified: 2016/04/01 15:21 by carretta

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki