PropertyRamp Custom Task

From OSUPDOCS
Jump to navigation Jump to search

A custom task to apply temperature difference to all particles.

Introduction

One way to run simulations with initial thermal stresses is set the temperature to all particles at the start of the calculations to a temperature that differs from the stress free temperature. Such an instantaneous temperature change is analogous to impact loading and may cause stress and strain oscillations. To avoid these dynamic effects, it is better to ramp up particle temperature difference by using a thermal ramp by using this custom task.

Thermal ramps can be used for residual stress calculations. Because they create uniform temperature changes they do not lead to any conduction. Thus a ramp can be used without doing conduction calculations or it can be used in combination with conduction calculations and other thermal boundary conditions.

Task Scheduling

In scripted files, a ThermalRamp custom task is scheduled by starting with

CustomTask ThermalRamp
Parameter time,(time)
Parameter start,(start)
Parameter sigmoidal,(style)

In XML files, this task is started using a <Schedule> element, which must be within the single <CustomTasks> block:

<Schedule name='ThermalRamp'>
   <Parameter name='time'>(time)</Parameter>
   <Parameter name='start'>(start)</Parameter>
   <Parameter name='sigmoidal'>(style)</Parameter>
</Schedule>

where the parameters are:

  • (time) - Enter the time interval for applying the temperature difference (in alt time units). This parameter is optional; if omitted, temperate difference is applied in one time step.
  • (start) - Enter the start time for the thermal ramp (in alt time units). This parameter is optional; if omitted, the ramp starts at time zero. The ramp ends at time (start)+(time).
  • (style) - Enter 0 or 1 for a linear or sigmoidal thermal ramp. A sigmoidal ramp may reduce dynamic effects at the start and end of the ramp. This parameter is optional; if omitted, the ramp is linear.

The above parameters create a thermal ramp. The next sections explain four different ways to apply temperature change to the particles.

Constant Temperature Change

To ramp all particle to the same temperature change, add the following command in scripted files:

Parameter DeltaT,(deltaT)

or in tt>XML files, add:

   <Parameter name='DeltaT'>(deltaT)</Parameter>

where

  • (deltaT) - Enter the final temperature difference (in degrees) to apply to all particles (in degrees). The thermal ramp will change particle temperature from zero to this value over the duration of the ramp.

Position Dependent Thermal Field

To apply a position-dependent thermal field to all particles, add the following two commands in scripted files:

Parameter DeltaT,(deltaT)
Parameter scale,(function)

or in tt>XML files, add:

   <Parameter name='DeltaT'>(deltaT)</Parameter>
   <Parameter name='scale'>(function)</Parameter>

where (deltaT) is the same as above, but the final temperature on each particle can be scaled using

  • (function) - when this optional parameter is used, the applied (deltaT) ramp is scaled by any user-defined function of time and particle position. The final temperature on any particle will be (deltaT) times the value of (function) evaluated at the particle location.

Thermal Field from Image Data

An alternative method for ramping up temperature is to ramp to any distribution of temperatures as represented within a bit mapped file. This feature is currently only available in OSParticulas. In scripted files, a ThermalRamp custom task takes the following additional parameters

Parameter file,(bmpFileName)
Parameter width,(width)
Parameter height,(height)
Parameter xorigin,(xO)
Parameter yorigin,(yO)
Parameter zlevel,(zO)
Parameter flipped,(flipped)
Parameter DeltaTmin,(deltaTmin)
Parameter DeltaTmax,(deltaTmax)

In XML files, this task is scheduled using a <Schedule> element, which must be within the single <CustomTasks> block:

   <Parameter name='file'>(bmpFileName)</Parameter>
   <Parameter name='width'>(width)</Parameter>
   <Parameter name='height'>(height)</Parameter>
   <Parameter name='xorigin'>(xO)</Parameter>
   <Parameter name='yorigin'>(yO)</Parameter>
   <Parameter name='zlevel'>(zO)</Parameter>
   <Parameter name='flipped'>(flipped)</Parameter>
   <Parameter name='DeltaTmin'>(deltaTmin)</Parameter>
   <Parameter name='DeltaTmax'>(deltaTmax)</Parameter>

where

  • (bmpFile) is the full or relative path name to a BMP file. The file must be an uncompressed, gray-scale, BMP file with 8 or less bits per pixel. The most useful is an 8-bit file with 256 levels of gray.
  • (width) and (height) specify the width and height for the image, but there are several ways to specify them.
  • (xO), (yO), and (zO) give the (x,y,z) coordinate for the origin of the image when mapped to the grid or mesh in length units. The (zO) coordinate is only needed for 3D calculations and gives z value for each 2D slice of the x-y plane of the data.
  • (flip) is 0 (default) or 1; if it is 1, the origin will move to the upper-left corner of the image with y increasing in the downward direction and x increasing to the right. This change will flip the image in the y direction in the analysis compared to the image graphics.
  • (deltaTmin) and (deltaTmax) map gray values 0 and 255 to a temperature difference. All other gray values are linearly interpolated between these value.

In other words, the temperature applied to particles under an image is:

      [math]\displaystyle{ \Delta T = (deltaTmin) + {\bigl((deltaTmax)-(deltaTmin)\bigr) g\over 255} }[/math]

where g is the average gray value over the domain of the particle.

Thermal Field from Image Blocks

Alternatively, the particle temperature can be determined for ranges of intensity by the same method that bit mapped files can be used to assign particle material type. This method is done by replacing (deltaTmin) and (deltaTmax) with one or more map commands. In scripted files, the new commands are:

Parameter "map #1 #2",(deltaT)
Parameter "map #1 #2",(deltaT)

or in XML files, they are:

   <Parameter name='map #1 #2'>(deltaT)</Parameter>
   <Parameter name='map #1 #2'>(deltaT)</Parameter>

where

  • #1 and #2 are a range of gray scale values (from 0 to 255 with #2 ≥ #1). These values must be embedded in the text of the parameter name, which must begin in "map" (e.g., "map 20 75").
  • (deltaT) is temperature difference to apply to particles under regions within the gray scale range specified by #1 and #2.

Unlike the previous section, this method selects (deltaT) by the most prominent matched range under the particle domain and not by the average gray value. This method is actually identical to method used to assign material types in a BMPRegion Command. Because the methods are the same, one could use the same image to assign material types and thermal ramps and this method would let you pick a different temperature difference for each material type.

Multiple Thermal Ramps

A single calculation may use multiple thermal ramps and the resulting temperature changes will be sum of all ramp values. This feature can be used to increase and then decrease temperature or even to have overlapping ramps.