Metafor

ULiege - Aerospace & Mechanical Engineering

User Tools

Site Tools


doc:user:results:courbes_res

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:results:courbes_res [2016/04/22 17:21] wauteletdoc:user:results:courbes_res [2023/05/25 11:28] (current) papeleux
Line 4: Line 4:
 ===== Introduction ===== ===== Introduction =====
  
-In this section, it will be shown how to archive the evolution of given fields on disk (for example the contact force as function of time). This is done with what is called "result curves".+In this section, it will be shown how to write the evolution of given fields to disk, e.g. the contact force as function of time. This is done with what is called "result curves".
  
-These [[doc:user:general:glossaire#curves]] are saved for each time step, in opposition to [[doc:user:integration:general:time_step|archiving files]] (''bfac''). This leads to a very good temporal resolution. +These [[doc:user:general:glossaire#curves]] are saved for each time step while [[doc:user:integration:general:time_step|archiving files]] (''bfac''are usually saved at a lower sampling frequency. This leads to a very good temporal resolution for these curves.
  
-These files are found in the folder of the test case (''workspace/test_name'' by default). Each curve is written twofold : a binary file used internally (''valeurs.v''), and a text file (''valeurs.ascii''), easy to load in Matlab, Excel, etc +The respective files are saved in the folder of the test case (''workspace/test_name'' by default). The information of each curve is saved twice, once as a binary file used internally (''values.v''), and once as a text file (''valeurs.ascii''), easy to load in Matlab, Excel, ... 
  
-The class named "''ValuesManager''" manages the interfac, allowing : +The class "''ValuesManager''" manages the interfac, allowing : 
   * the definition of a ''ValueExtractor'' (extracting results),    * the definition of a ''ValueExtractor'' (extracting results), 
   * the retrieval of a vector to view it in real time,    * the retrieval of a vector to view it in real time, 
Line 25: Line 25:
 ===== ValuesManager ===== ===== ValuesManager =====
  
-''ValuesManager'' manages the extraction of data at each time time. It is a container of ''ValueExtractor'' defined in the analysis ''metafor''+The ''ValuesManager'' manages the extraction of data at each time step. It is a container of ''ValueExtractors'' defined in the analysis ''metafor''
  
   valuesmanager = metafor.getValuesManager()   valuesmanager = metafor.getValuesManager()
-  valuesmanager.add(no, extractor, name = ""       # manages extraction, result storage...  +  valuesmanager.add(nbr, extractor, name = ""       # manages extraction, result storage...  
-  valuesmanager.add(no, extractor, v2sOp, name = "") # same + transformation from vector to scalar                 #  +  valuesmanager.add(nbr, extractor, v2sOp, name = "") # same + transformation from vector to scalar 
-  valuesmanager.getDataVector(no)                    # returns a reference of the vector storing values      +  valuesmanager.getDataVector(nbr)                    # returns a reference of the vector storing values      
-                                                     # (for example to create and view curves) +                                                      # (for example to create and view curves) 
-  valuesmanager.setOnFile(False)                     # Keep curves in memory instead of writing  +  valuesmanager.setOnFile(False)                      # Keep curves in memory instead of writing  
-                                                     # .v and .ascii files+                                                      # .v and .ascii files 
 +                                                      
 where  where 
  
-| ''no''        | number of the curve (unique) | +| ''nbr''       | number of the curve (unique) | 
 | ''extractor'' | reference of a [[#ValueExtractor]] |  | ''extractor'' | reference of a [[#ValueExtractor]] | 
 | ''v2sOp'' | Operator such as [[#VectorToScalarOperator]] | | ''v2sOp'' | Operator such as [[#VectorToScalarOperator]] |
Line 47: Line 48:
 \\ \\
  
 +
 +
 +===== FacValuesManager =====
 +
 +The ''FacValuesManager'' manages the extraction of data at each time a "bfac" file is written. It is exactly the same object as the ''ValuesManager'', but called at different times of the time integration.
 +
 +To access the ''FacValuesManager'', just get it from metafor. The rest of the syntax is the same.
 +
 +  facValuesManager = metafor.getFacValuesManager()
 +  
 +<note important>Be carefull that ThermoDynamics Fields (TdFieldValueExtractor) will give false values, as they accumulate values from each time step !!! Metafor will not prohibit the use of them (it is up to you to NOT define them).</note>
 +
 +===== StageValuesManager =====
 +
 +The ''StageValuesManager'' manages the extraction of data at the end of each stage. It is exactly the same object as the ''ValuesManager'', but called at different times of the time integration. 
 +
 +To access the ''StageValuesManager'', just get it from metafor. The rest of the syntax is the same. 
 +
 +    stageValuesManager = metafor.getStageValuesManager()
 +
 +<note important>Be carefull that ThermoDynamics Fields (TdFieldValueExtractor) will give false values, as they accumulate values from each time step !!! Metafor will not prohibit the use of them (it is up to you to NOT define them).</note>
  
 ===== ValueExtractor ===== ===== ValueExtractor =====
Line 106: Line 128:
 Extract values stored in the data base, On geometrically defined point (positions, displacements, temperature, forces, velocities, ...).  Extract values stored in the data base, On geometrically defined point (positions, displacements, temperature, forces, velocities, ...). 
  
-  valueExtractor = DbGeoPointValueExtractor (pointList, mesh, field)+  valueExtractor = DbGeoPointValueExtractor (pointList, meshedObject, field) 
 +  valueExtractor = DbGeoPointValueExtractor (pointList, meshedObjectList, field)
   valueExtractor.setEulerian(True)    valueExtractor.setEulerian(True) 
   valueExtractor.setOutsideTol(tol)   valueExtractor.setOutsideTol(tol)
Line 112: Line 135:
 where where
  
-| ''listPt''  | List of points where the field is extracted                         | +| ''listPt''         | List of points where the field is extracted                         | 
-| ''mesh''    | Mesh from which the value is extracted                              |  +| ''meshObject''     Meshed Object from where the point will try to find the element from which the value is interpolated |  
-| ''dbField'' | [[doc:user:general:locks|Field1D]] describing the scalar to extract |  +| ''meshObjectList'' | List of Mesh Meshed Object from where the point will try to find the element from which the value is interpolated |  
-| ''tol''     | Outside tolerance in terms of reduced coordinate (default = 0.2)    | +| ''dbField''        | [[doc:user:general:locks|Field1D]] describing the scalar to extract |  
 +| ''tol''            | Outside tolerance in terms of reduced coordinate (default = 0.2)    | 
  
  
Line 122: Line 146:
  
     pt102 = pointset.define(102,0.15*Lx,0.75*Ly,0)     # geo point of extraction (must be in pointset)     pt102 = pointset.define(102,0.15*Lx,0.75*Ly,0)     # geo point of extraction (must be in pointset)
-    dyPt102 = DbGeoPointValueExtractor([pt102,], geometry.getMesh(), Field1D(TY, RE))+    dyPt102 = DbGeoPointValueExtractor([pt102,], [volset(idx+1), volset(idx+2)], Field1D(TY, RE))
     dyPt102.setEulerian(True)                       # Eulerian point (not moving with elements)     dyPt102.setEulerian(True)                       # Eulerian point (not moving with elements)
     dyPt102.setOutsideTol(0.5)                      # half an element outside detection tolerance     dyPt102.setOutsideTol(0.5)                      # half an element outside detection tolerance
Line 132: Line 156:
 Value are interpolated from Integration Points Values. Value are interpolated from Integration Points Values.
  
-  valueExtractor = IFGeoPointValueExtractor (pointList, mesh, InternalField)+  valueExtractor = IFGeoPointValueExtractor (pointList, meshedObject, InternalField) 
 +  valueExtractor = IFGeoPointValueExtractor (pointList, meshedObjectList, InternalField)
   valueExtractor.setEulerian(True)    valueExtractor.setEulerian(True) 
   valueExtractor.setOutsideTol(tol)   valueExtractor.setOutsideTol(tol)
Line 138: Line 163:
 where where
  
-| ''listPt''  | List of points where the field is extracted                         | +| ''listPt''         | List of points where the field is extracted                         | 
-| ''mesh''    | Mesh from which the value is extracted                              |  +| ''meshObject''     Meshed Object from where the point will try to find the element from which the value is interpolated |  
-| ''InternalField'' | [[doc:user:general:ifields|internal field]] of the element extrapolated in the node |  +| ''meshObjectList'' | List of Mesh Meshed Object from where the point will try to find the element from which the value is interpolated |  
-| ''tol''     | Outside tolerance in terms of reduced coordinate (default = 0.2)    | +| ''InternalField''  | [[doc:user:general:ifields|internal field]] of the element extrapolated in the node |  
 +| ''tol''            | Outside tolerance in terms of reduced coordinate (default = 0.2)    | 
  
 __Example:__ __Example:__
  
     pt102 = pointset.define(102,0.15*Lx,0.75*Ly,0)     # geo point of extraction (must be in pointset)     pt102 = pointset.define(102,0.15*Lx,0.75*Ly,0)     # geo point of extraction (must be in pointset)
-    eplPt102 = IFGeoPointValueExtractor([pt102,], geometry.getMesh(), IF_EPL) +    eplPt102 = IFGeoPointValueExtractor([pt102,], volset(101), IF_EPL) 
     eplPt102.setEulerian(True)                        # Eulerian point (not moving with elements)     eplPt102.setEulerian(True)                        # Eulerian point (not moving with elements)
     eplPt102.setOutsideTol(0.5)                       # half an element outside detection tolerance      eplPt102.setOutsideTol(0.5)                       # half an element outside detection tolerance 
          
  
-=== GeoPtValueExtractor ===+=== StrainGaugeValueExtractor ===
  
-Extract fields at given positionInterpolates nodal value of the corresponding element. These nodal values are either variables stored in these nodes (positions, displacements, temperature, fores, velocities, ...or an extrapolation and average of variables stored at the integration points.+It is possible to modelize strainGauge in Metafor using GeoPointValueExtractorsSelecting the 2 geometrical points  (anywhere in the meshdefining the Strain Gauge, the distance between the tho points can be computed during the simulation allowing to define a StrainGaufeValueExtractorThe strain measure define the kind of extractor : 
  
-  valueExtractor = GeoPtValueExtractor (listPt, meshfield+  valueExtractor = BiotStrainGaugeValueExtractor(listPt, meshedObject) 
-  valueExtractor = GeoPtValueExtractor (listPt, meshfieldsOp None)+  valueExtractor = BiotStrainGaugeValueExtractor(listPtmeshedObjectList
 +  valueExtractor = GLStrainGaugeValueExtractor(listPt, meshedObject) 
 +  valueExtractor = GLStrainGaugeValueExtractor(listPtmeshedObjectList) 
 +  valueExtractor = NatStrainGaugeValueExtractor(listPtmeshedObject) 
 +  valueExtractor NatStrainGaugeValueExtractor(listPt, meshedObjectList)
  
 where where
  
-| ''listPt''  | List of points where the field is extracted +| ''listPt''         | List of the 2 points defining the strain Gauge 
-| ''mesh''    Mesh from which the value is extracted |  +| ''meshObject''     Meshed Object from where the point will try to find the element from which the value is interpolated |  
-| ''field''   [[doc:user:general:locks|Field1D]] describing the scalar to extract or [[doc:user:general:ifields|internal field]] of the element extrapolated and averaged in the node |  +| ''meshObjectList''List of Mesh Meshed Object from where the point will try to find the element from which the value is interpolated  
-''sOp''     [[doc:user:general:SortingOperator|SortingOperator]] : sort nodes according to a geometric criterion  ''def=None'' will give the order in which these nodes are generated (not reliable) | +and if $\lambda = \frac{l}{l_0}$ the ratio of current to initial length of the Strain Gauge 
- +BiotStrainGaugeValueExtractor $\epsilon  \lambda-1 = \frac{l}{l_0}-1$ (Engineer Strain) | 
-__Example:__ +| GLStrainGaugeValueExtractor   | $\epsilon  = 0.5*(\lambda^2-1) $ | 
- +| NatStrainGaugeValueExtractor  | $\epsilon  = ln(\lambda)$ |
-  valuesmanager.add(8, GeoPtValueExtractor [point1, point2], Field1D(T0,RE)), 'temperature_P1_P2')+
  
-Extract a result curve numbered 8 defined by the temperature in points 1 and 2. This curve is named ''temperature_P1_P2''. 
 === TdFieldValueExtractor === === TdFieldValueExtractor ===
  
Line 242: Line 270:
 |              | 3D : Topological volume | |              | 3D : Topological volume |
 | ''ifield''   | [[doc:user:general:ifields|internal field]] of the element extrapolated to the node |  | ''ifield''   | [[doc:user:general:ifields|internal field]] of the element extrapolated to the node | 
-|              | ''TX'' : X coordinate|  
-|              | ''TY'' : Y coordinate| 
-|              | ''TZ'' : Z coordinate| 
- 
 :!: works, but :!::!::!: :!: works, but :!::!::!:
  
Line 261: Line 285:
 |              | 2D : Topological face |  |              | 2D : Topological face | 
 |              | 3D : Topological volume | |              | 3D : Topological volume |
-| ''ifield''   | [[doc:user:general:ifields|internal field]] of the element extrapolated to the node +| ''ifield''   | [[doc:user:general:ifields|internal field]] of the element averaged over the element 
  
 :!: works, but :!::!::!: :!: works, but :!::!::!:
Line 276: Line 300:
 |          | ''EXT_T''  : time | |          | ''EXT_T''  : time |
 |          | ''EXT_DT'' : time step | |          | ''EXT_DT'' : time step |
-|          | ''EXT_NT''number of time step | +|          | ''EXT_NT'' : time step number 
-|          | ''EXT_ITE'' : number of mechanical iterations over a time steps | +|          | ''EXT_ITE'' : number of mechanical iterations over a time step | 
-|          | ''EXT_ITE_TH'' : number of thermal iterations over a time steps | +|          | ''EXT_ITE_TOT'' : total number of mechanical iterations (included failed steps !)
-|          | ''EXT_ITE_AR'' : number of iterations with updates of tangent stiffness matrix | +|          | ''EXT_ITE_TH'' : number of thermal iterations over a time step | 
-|          | ''EXT_ITE_SR'' : number of iterations with updates of tangent stiffness matrix | +|          | ''EXT_ITE_TH_TOT'' : total number of thermal iterations (included failed steps !) 
-|          | ''EXT_ITE_LS'' : number of line-search iterations | +|          | ''EXT_ITE_AR'' : number of mechanical iterations with update of tangent stiffness matrix over a time step
-|          | ''EXT_ITE_ALM'' : number of augmentations |+|          | ''EXT_ITE_SR'' : number of mechanical iterations without update of tangent stiffness matrix over a time step| 
 +|          | ''EXT_ITE_AR_TOT'' : total number of mechanical iterations with update of tangent stiffness matrix  (included failed steps !)| 
 +|          | ''EXT_ITE_SR_TOT'' : total number of mechanical iterations without update of tangent stiffness matrix  (included failed steps !)| 
 +|          | ''EXT_ITE_TH_AR'' : number of thermal iterations with update of tangent stiffness matrix over a time step | 
 +|          | ''EXT_ITE_TH_SR'' : number of thermal iterations without update of tangent stiffness matrix over a time step| 
 +|          | ''EXT_ITE_TH_AR_TOT'' : total number of thermal iterations with update of tangent stiffness matrix  (included failed steps !)| 
 +|          | ''EXT_ITE_TH_SR_TOT'' : total number of thermal iterations without update of tangent stiffness matrix  (included failed steps !)
 +|          | ''EXT_ITE_LS'' : number of mechanical line-search iterations over a time step | 
 +|          | ''EXT_ITE_LS_TOT'' : total number of mechanical line-search iterations (included failed steps !)| 
 +|          | ''EXT_ITE_TH_LS'' : number of thermal line-search iterations over a time step | 
 +|          | ''EXT_ITE_TH_LS_TOT'' : total number of thermal line-search iterations (included failed steps !)
 +|          | ''EXT_ITE_ALM'' : number of augmentations over a time step| 
 +|          | ''EXT_ITE_ALM_TOT'' : total number of augmentations (included failed steps !)|
 |          | ''EXT_RCOND'' : reciprocal condition number of the mechanical tangent stiffness matrix | |          | ''EXT_RCOND'' : reciprocal condition number of the mechanical tangent stiffness matrix |
 |          | ''EXT_VM....'' : Extractors of virtual memory (see table below) | |          | ''EXT_VM....'' : Extractors of virtual memory (see table below) |
Line 328: Line 364:
 |              | ''GEN_DIAG_MASS_FORC'' : Generalized inertial forces (diagonalized mass matrix) | |              | ''GEN_DIAG_MASS_FORC'' : Generalized inertial forces (diagonalized mass matrix) |
 |              | ''GEN_DIS_FORC'' : Generalized dissipation forces | |              | ''GEN_DIS_FORC'' : Generalized dissipation forces |
 +
 +=== InteractionGravityCenterAndMassValueExtractor ===
 +
 +Extract the time evolution of the position of the center of gravity and mass of an interaction. At each archiving step the extractor fills a four columns text file, where columns 1-3 contain x, y, and z coordinates of the center of gravity respectively, and column 4 contains the value of the mass.
 +
 +  valueExtractor = InteractionGravityCenterAndMassValueExtractor (interaction)
 +
 +where
 +  
 +''interaction'' --> Reference of an interaction.
  
 ==== Extracting values on a contact interaction ==== ==== Extracting values on a contact interaction ====
Line 409: Line 455:
 ^ Status          ^ Extracted value ^ ^ Status          ^ Extracted value ^
 | Inactive contact | 0.0 | | Inactive contact | 0.0 |
-| Active contact | normal gap (signed value) |+| Active contact | normal gap (signed value, **positive if overlap???**) |
  
 The maximal normal gap is easily deduced: The maximal normal gap is easily deduced:
Line 493: Line 539:
 == PressureContactValueExtractor == == PressureContactValueExtractor ==
  
-Extract the contact pressure in each slave node:+Extract the contact pressure (**negative or positive, if bodies are pushed against each other ???**) in each slave node:
  
   valueExtractor = PressureContactValueExtractor(contInt, sOp=None, maxV=-1)   valueExtractor = PressureContactValueExtractor(contInt, sOp=None, maxV=-1)
Line 734: Line 780:
  
 The transfer error is defined as: The transfer error is defined as:
-$+ 
-$\frac{\int f^{old}-f^{new}}{\int f^{new} }$ +$$\frac{\int f^{old}-f^{new}}{\int f^{new} }$
-$$+
  
  
Line 798: Line 844:
   * ''None'': no operator (all component,s by default)   * ''None'': no operator (all component,s by default)
   * ''MaxOperator'': maximal value   * ''MaxOperator'': maximal value
-  * ''MinOperator'': minimale value+  * ''MinOperator'': minimal value
   * ''AbsMaxOperator'': compute the value whose absolute value is maximal (but keeps its sign)   * ''AbsMaxOperator'': compute the value whose absolute value is maximal (but keeps its sign)
   * ''AbsMinOperator'': compute the value whose absolute value is minimal (but keeps its sign)   * ''AbsMinOperator'': compute the value whose absolute value is minimal (but keeps its sign)
   * ''MaxAbsOperator'': compute the maximal value of the vector containing absolute values (always positive)   * ''MaxAbsOperator'': compute the maximal value of the vector containing absolute values (always positive)
   * ''MinAbsOperator'': compute the minimal value of the vector containing absolute values (always positive)   * ''MinAbsOperator'': compute the minimal value of the vector containing absolute values (always positive)
 +  * ''MaxOfNonZeroOperator'': maximal value excluding zero values
 +  * ''MinOfNonZeroOperator'': minimal value excluding zero values
 +  * ''AbsMaxNonZeroOperator'': compute the value whose absolute value is maximal (but keeps its sign), excluding zero values
 +  * ''AbsMinNonZeroOperator'': compute the value whose absolute value is minimal (but keeps its sign), excluding zero values
 +  * ''MaxAbsNonZeroOperator'': compute the maximal value of the vector containing absolute values (always positive), excluding zero values
 +  * ''MinAbsNonZeroOperator'': compute the minimal value of the vector containing absolute values (always positive), excluding zero values
   * ''MeanOperator'': compute the average value   * ''MeanOperator'': compute the average value
   * ''SumOperator'': compute the sum (used toe extract the resultant force exercised on a given geometric entity)   * ''SumOperator'': compute the sum (used toe extract the resultant force exercised on a given geometric entity)
doc/user/results/courbes_res.1461338472.txt.gz · Last modified: 2016/04/22 17:21 by wautelet

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki