Difference between revisions of "FluidSource Custom Task"

From OSUPDOCS
Jump to navigation Jump to search
Line 22: Line 22:
The first two parameters are:
The first two parameters are:


* <tt>(matID)</tt> or <tt>(matname)</tt> - specifies material type [[Material Command Block#Referencing Materials in XML Files|by number or name]].
* <tt>(matID)</tt> or <tt>(matname)</tt> - specifies material type [[Material Command Block#Referencing Materials in XML Files|by number or name]]. If both are provided, the <tt>(matname)</tt> takes precedence.


=== Setting Injection Rate ===
=== Setting Injection Rate ===


The rate of injection is determined by adding the following commands to scripted files:


  Parameter FlowRate,(rate)
  Parameter FlowRate,(rate)
Line 32: Line 33:
  Parameter flow_y,(yNorm)
  Parameter flow_y,(yNorm)
  Parameter flow_z,(zNorm)
  Parameter flow_z,(zNorm)
or adding these command to the task definition in XML files:
    <Parameter name='FlowRate'>(rate)</Parameter>
    <Parameter name='FlowFunction'>(rateFxn)</Parameter>
    <Parameter name='flow_x'>(xNorm)</Parameter>
    <Parameter name='flow_y'>(yNorm)</Parameter>
    <Parameter name='flow_z'>(zNorm)</Parameter>
where
* <tt>(rate)</tt> or <tt>(rateFxn)</tt> - specifies the inject rates in [[ConsistentUnits Command#Legacy and Consistent Units|(length units)<sup>3</sup>]] per [[ConsistentUnits Command#Legacy and Consistent Units|time unit]] The <tt>(rate)</tt> option specifies a fixed and constant rate while <tt>(rateFxn)</tt> provides a [[User-Defined Function]].
* <tt>(xloc),(yloc),(zloc)</tt> - deleted particles are moved to this location on the background grid. This location must be empty such that particles will not interact with active particles. Enter in [[ConsistentUnits Command#Legacy and Consistent Units|length units]].
  Parameter source_x,(xSrc)
  Parameter source_x,(xSrc)
  Parameter source_y,(ySrc)
  Parameter source_y,(ySrc)

Revision as of 09:39, 22 July 2021

This custom task injects particles into a simulation.

Introduction

The FluidSource custom task injects particles at a constant rate from a defined inlet. Its main use of for injecting liquid or liquid-like particles such as a Tait Liquid. While it can be used with other materials, the injection process does not work well unless the injected material clears out of the inlet region in time for the next injected particles.

Task Scheduling

In scripted files, a FluidSource starts by defining the material to inject:

CustomTask FluidSource
Parameter material,(matID)
Parameter matname,(matname)

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

<Schedule name='FluidSource'>
   <Parameter name='material'>(matID)</Parameter>
   <Parameter name='matname'>(matname)</Parameter>
</Schedule>

The first two parameters are:

  • (matID) or (matname) - specifies material type by number or name. If both are provided, the (matname) takes precedence.

Setting Injection Rate

The rate of injection is determined by adding the following commands to scripted files:

Parameter FlowRate,(rate)
Parameter FlowFunction,(rateFxn)
Parameter flow_x,(xNorm)
Parameter flow_y,(yNorm)
Parameter flow_z,(zNorm)

or adding these command to the task definition in XML files:

   <Parameter name='FlowRate'>(rate)</Parameter>
   <Parameter name='FlowFunction'>(rateFxn)</Parameter>
   <Parameter name='flow_x'>(xNorm)</Parameter>
   <Parameter name='flow_y'>(yNorm)</Parameter>
   <Parameter name='flow_z'>(zNorm)</Parameter>

where

  • (rate) or (rateFxn) - specifies the inject rates in (length units)3 per time unit The (rate) option specifies a fixed and constant rate while (rateFxn) provides a User-Defined Function.
  • (xloc),(yloc),(zloc) - deleted particles are moved to this location on the background grid. This location must be empty such that particles will not interact with active particles. Enter in length units.


Parameter source_x,(xSrc)
Parameter source_y,(ySrc)
Parameter source_z,(zSrc)
Parameter inlet_width,(width)
Parameter inlet_depth,(depth)
Parameter particle_size,(size)

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

<Schedule name='DeleteDamaged'>
   <Parameter name='material'>(matID)</Parameter>
   <Parameter name='matname'>(matname)</Parameter>
   <Parameter name='store_x'>(xloc)</Parameter>
   <Parameter name='store_y'>(yloc)</Parameter>
   <Parameter name='store_z'>(zloc)</Parameter>
   <Parameter name='minCOD'>(cod)</Parameter>
   <Parameter name='direction'>(dir)</Parameter>
   <Parameter name='deleteTime'>(time)</Parameter>
</Schedule>

The parameters are

  • (matID) or (matname) - specifies material type by number or name.
  • (xloc),(yloc),(zloc) - deleted particles are moved to this location on the background grid. This location must be empty such that particles will not interact with active particles. Enter in length units.
  • (minCOD) - normally particles are deleted right after they fail. Alternatively, you can require the implied crack in the particle to open further before deletion by entering a minimum crack opening displacement (COD) (in length units)
  • (dir) - by default, the (minCOD) refers to magnitude of the COD. Alternatively, the minimum can apply to one component of the COD selected by entered integer
    1. = use magnitude of the COD (the default and option used if you enter an invalid dir)
    2. = use component of COD normal to the crack plane
    3. = use component of COD tangential to the crack plane
    4. = use xy shear slippage (same as 3 in 2D simulations)
    5. = use xz shear slippage (only nonzero in 3D simulations)
  • (time) - if this parameter is set, particles of the specified material type will all be deleted when time reaches the entered (time) in alt time units.

Task Action

Each time step loops over all particles of the material type specified for the task. If (time) was entered and current time has reached that time, the particle is deleted. Otherwise, the particle is checked to see if it has failed by decohesion. If it has, it is deleted, but if (minCOD) (and optionally (dir)) where entered, the particle is deleted only if the crack opening displacement has passed the entered minimum.

Notes

  • A single DeleteDamage task applies to one material type. A simulation can have multiple DeleteDamage tasks if you need particle deletions for more than one material type.
  • Deleting after decohesion only works for softening materials. Deleting after a specified time can be used for any material type.
  • If (minCOD) is less the the material COD at failure, the particle will be deleted right after failure (and not before). To delay failure until after some post-decohesion deformation, set (minCOD) to be larger than the material's COD at failure.