Difference between revisions of "LoadControl Custom Task"

From OSUPDOCS
Jump to navigation Jump to search
Line 41: Line 41:
* <tt>direction</tt> - An integer [1,2,3] to choose the direction to consider for velocity and load.
* <tt>direction</tt> - An integer [1,2,3] to choose the direction to consider for velocity and load.
* <tt>MaxVelocity</tt> - A positive number that limits the velocity of the controlled material - defaults to 5 m/s.
* <tt>MaxVelocity</tt> - A positive number that limits the velocity of the controlled material - defaults to 5 m/s.
* <tt>Load_Function</tt> - A [[User Defined Functions|user defined function]] that gives the desired load. This task doesn't do well with discontinious functions.
* <tt>Load_Function</tt> - A [[User Defined Functions|user defined function]] that gives the desired load. This task doesn't work well with discontinuous functions.


These parameters are for the control algorithm :
These parameters are for the control algorithm :
* <tt>Kp</tt> - Proportional gain factor for PID algorithm. The default value of 0.1 seems to work well.
* <tt>Kp</tt> - Proportional gain factor for PID algorithm. The default value of 0.1 seems to work well.
* <tt>Ki</tt> - Integral and Derivative gain factor for PID algorithm. (Note: <tt>Ki = 0.25Kd</tt>) The default value of 0.001 seems to work well.
* <tt>Ki</tt> - Integral and Derivative gain factors for PID algorithm. (Note: <tt>Kd = 0.25Ki</tt>) The default value of 0.001 seems to work well.
* <tt>smooth</tt> - Exponential smoothing parameter in (0,1). Controls how fast the dynamic relationship between distance and load is updated and also how much smoothing is done on the load values. The default value of 0.95 works well.
* <tt>smooth</tt> - Exponential smoothing parameter in (0,1). Controls how fast the dynamic relationship between distance and load is updated and also how much smoothing is done on the load values. The default value of 0.95 works well.


=== Task Action ===
=== Task Action ===
 
This custom task tries to dynamically estimate the relationship between load and displacement of the rigid material using the following equation:
Once the specified crack length is reached (and all crack propagation stops) or the critical [[MPM Global Archiving Options|global archive quantity]] is reached, the task performs various actions specified by the <tt>(style)</tt> and <tt>(hold)</tt> parameters. Scripted files can enter text for the style, but <tt>XML</tt> files must use the <tt>(styleNumber)</tt>:
 
* <tt>reverse</tt> (or 0): Reverses all linearly increasing [[Setting Forces and Fluxes|loads or tractions]] (see [[Boundary Condition Styles|"linear" style]] in particle loads) and reverses direction of all [[Rigid Material|boundary-condition rigid particles]] moving at constant velocity (''i.e''., they have [[Rigid Material#Material Properties|set direction 1 to 7]] and do not use any [[Rigid Material#Material Properties|setting functions]]). This style will unload until the load or traction (on loaded particles) or displacement (on moving rigid particles) returns to zero at which point the analysis will stop (the analysis, however, may stop sooner if the [[MPM Methods and Simulation Timing#Input Commands|maximum time]] is reached before loading returns to zero).
* <tt>hold</tt> (or 1): Stops all linearly increasing [[Setting Forces and Fluxes|loads or tractions]] (see [[Boundary Condition Styles|"linear" style]] in particle loads) at the current values and sets all [[Rigid Material|boundary-condition rigid particles]] moving at constant velocity (''i.e''., they have [[Rigid Material#Material Properties|set direction 1 to 7]] and do not use any [[Rigid Material#Material Properties|setting functions]]) to zero velocity. The analysis continues until [[MPM Methods and Simulation Timing#Input Commands|maximum time]] is reached.
 
The default <tt>(style)</tt> is to reverse loads, tractions, and particles to unload the specimen (as implied by the task name). Notice that <tt>reverse</tt> and <tt>hold</tt> affects only selected types of boundary conditions. The task has no affect on other types of [[MPM Input Files#Boundary Conditions|boundary conditions]].
 
If <tt>(holdTime)</tt> is set to a positive number, it gives a time (in [[ConsistentUnits Command#Legacy and Consistent Units|alt time units]]) to hold at current conditions before applying the task's action. The <tt>(hold)</tt> parameter only applies when <tt>(style)</tt> is <tt>reverse</tt> or <tt>abort</tt>. The hold phase will only hold boundary conditions that can be reversed (see <tt>reverse</tt> optoins above). After the hold phase is done, the <tt>reverse</tt> style will unload to zero as described above and the <tt>abort</tt> style will stop the analysis.  The default <tt>(holdTime)</tt> is zero (or no hold phase).

Revision as of 16:44, 26 April 2016

A custom task run a load control simulation based on calculations contact or reaction forces. .

Introduction

A LoadControl custom task needs either global contact or global reaction for the specified Rigid material depending on if contact for that material is enabled.

This CustomTask tries to achieve the load requested from the user defined function by adjusting the velocity of that material. It does that by dynamically estimating the relationship between the displacement and load and then uses a PID control algorithm to adjust the velocity.

Task Scheduling

In scripted files, a LoadControl custom task is scheduled with the following block:

CustomTask LoadControl
Parameter velocity, (velocity)
Parameter material, (int)
Parameter direction, (int)
Parameter MaxVelocity,(number)
Parameter Load_Function (user-inputted function)
Parameter Kp,(number)
Parameter Ki,(number)
Parameter smooth,(number)

In XML files, these task options are scheduled using <Schedule> elements, which must be within the single <CustomTasks> block:

<Schedule name='LoadControl'>
   <Parameter name='velocity'>(number)</Parameter>
   <Parameter name='material'>(int)</Parameter>
   <Parameter name='direction'>(int)</Parameter>
   <Parameter name='MaxVelocity'>(number)</Parameter>
   <Parameter name='Load_Function (function)'/>
   <Parameter name='Kp'>(number)</Parameter>
   <Parameter name='Ki'>(number)</Parameter>
   <Parameter name='smooth'>(number)</Parameter>
</Schedule>


These are the parameters that this custom task needs to operate:

  • velocity - This is the starting velocity of the simulation for the specified Rigid material. The sign of this parameter is probably more important than its value, as long as it is something reasonable. It is needed for initializing the load control.
  • material - The material number of the Rigid material to be controlled.
  • direction - An integer [1,2,3] to choose the direction to consider for velocity and load.
  • MaxVelocity - A positive number that limits the velocity of the controlled material - defaults to 5 m/s.
  • Load_Function - A user defined function that gives the desired load. This task doesn't work well with discontinuous functions.

These parameters are for the control algorithm :

  • Kp - Proportional gain factor for PID algorithm. The default value of 0.1 seems to work well.
  • Ki - Integral and Derivative gain factors for PID algorithm. (Note: Kd = 0.25Ki) The default value of 0.001 seems to work well.
  • smooth - Exponential smoothing parameter in (0,1). Controls how fast the dynamic relationship between distance and load is updated and also how much smoothing is done on the load values. The default value of 0.95 works well.

Task Action

This custom task tries to dynamically estimate the relationship between load and displacement of the rigid material using the following equation: