Difference between revisions of "FluidSource Custom Task"

From OSUPDOCS
Jump to navigation Jump to search
 
(21 intermediate revisions by the same user not shown)
Line 3: Line 3:
== Introduction ==
== Introduction ==


The <tt>FluidSource</tt> custom task injects particles at a constant rate from a defined inlet. Its main use of for injecting [[#Hyperelastic Materials|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.
The <tt>FluidSource</tt> custom task injects particles at a specified rate from a defined inlet. Its main use of for injecting [[#Hyperelastic Materials|liquid or liquid-like particles]] such as a [[Tait Liquid Material|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 ==
== Task Scheduling ==
Line 13: Line 13:
  Parameter matname,(matname)
  Parameter matname,(matname)


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


  <Schedule name='FluidSource'>
  <Schedule name='FluidSource'>
Line 20: Line 20:
  </Schedule>
  </Schedule>


The first two parameters are:
The the two parameters for defining the material are:


* <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.
* <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.
Line 34: Line 34:
  Parameter flow_z,(zNorm)
  Parameter flow_z,(zNorm)


or adding these command to the task definition in XML files:
or adding these command to the task definition in <tt>XML</tt> files:


     <Parameter name='FlowRate'>(rate)</Parameter>
     <Parameter name='FlowRate'>(rate)</Parameter>
Line 44: Line 44:
where
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>(rate)</tt> or <tt>(rateFxn)</tt> - specifies the inject rate 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> can provide a variable rate as a [[User Defined Functions|user-defined function]] of time. If both are provided, the <tt>(rateFxn)</tt> takes precedence.
* <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]].
* <tt>(xNorm),(yNorm),(zNorm)</tt> - provide three components to a normal vector in the direction of flow (the vector need not be normalized). In 2D, <tt>(xNorm)</tt> and <tt>(yNorm)</tt> can be in any direction. In 3D, the injection is currently limited being along the x, y, or z axis, which means only one component can be nonzero (all components default to zero, so just specify the one non-zero value; if none are specified, 3D injection will be in the z direction).


=== Defining the Injection Pipe ===
The injection pipe is a width in 2D or an area in 3D and specified in scripted files with the following commands:


  Parameter source_x,(xSrc)
  Parameter source_x,(xSrc)
Line 53: Line 56:
  Parameter inlet_width,(width)
  Parameter inlet_width,(width)
  Parameter inlet_depth,(depth)
  Parameter inlet_depth,(depth)
Parameter particle_size,(size)
In <tt>XML</tt> files, this task is created using a <tt><Schedule></tt> element, which must be within the single <tt><CustomTasks></tt> block:


<Schedule name='DeleteDamaged'>
or adding these command to the task definition in <tt>XML</tt> files:
     <Parameter name='material'>(matID)</Parameter>
 
     <Parameter name='matname'>(matname)</Parameter>
     <Parameter name='source_x'>(xSrc)</Parameter>
     <Parameter name='store_x'>(xloc)</Parameter>
     <Parameter name='source_y'>(ySrc)</Parameter>
     <Parameter name='store_y'>(yloc)</Parameter>
     <Parameter name='source_z'>(zSrc)</Parameter>
     <Parameter name='store_z'>(zloc)</Parameter>
     <Parameter name='inlet_width'>(width)</Parameter>
    <Parameter name='minCOD'>(cod)</Parameter>
     <Parameter name='inlet_depth'>(depth)</Parameter>
    <Parameter name='direction'>(dir)</Parameter>
 
     <Parameter name='deleteTime'>(time)</Parameter>
where
</Schedule>
 
* <tt>(xSrc),(ySrc),(zSrc)</tt> - specify a point at the center of the pipe (only x and y coordinates needed in 2D).
* <tt>(width)</tt> and <tt>(depth)</tt> - specifies the cross-sectional area of the rectangular pipe. In 2D, only <tt>(wdith)</tt> is needed and the depth of the pipe is the thickness of the 2D simulation. In 3D, the rectangle axes are aligned with the non-normal axes (''e.g.'', for flow in x direction, width and depth are in the y and z directions, ''etc.'').
 
=== Injected Particle Size ===
 
By default, the injected particle size will be the same as the default particle size for the current simulation (as set using the [[MPM Methods and Simulation Timing#Input Commands|<tt>PtsPerElement</tt> command]]). If desired, that size can be changed with the following addition to scripted files
 
Parameter particle_scale,(scaleSize)
 
or adding this command to the task definition in <tt>XML</tt> files:
 
     <Parameter name='particle_scale'>(scaleSize)</Parameter>
 
where


The parameters are
* <tt>(scaleSize)</tt> - specifies relative particle size compared to the simulation's default particle per cell (default is 1).


* <tt>(matID)</tt> or <tt>(matname)</tt> - specifies material type [[Material Command Block#Referencing Materials in XML Files|by number or name]].
== Task Action ==
* <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]].
* <tt>(minCOD)</tt> - 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 [[ConsistentUnits Command#Legacy and Consistent Units|length units]])
* <tt>(dir)</tt> - by default, the <tt>(minCOD)</tt> refers to magnitude of the COD. Alternatively, the minimum can apply to one component of the COD selected by entered integer
*# = use magnitude of the COD (the default and option used if you enter an invalid <tt>dir</tt>)
*# = use component of COD normal to the crack plane
*# = use component of COD tangential to the crack plane
*# = use xy shear slippage (same as 3 in 2D simulations)
*# = use xz shear slippage (only nonzero in 3D simulations)
* <tt>(time)</tt> - if this parameter is set, particles of the specified material type will all be deleted when time reaches the entered <tt>(time)</tt> in [[ConsistentUnits Command#Legacy and Consistent Units|alt time units]].


=== Task Action ===
Each time step checks the injection location and current flow rate. If enough time has passed since the last row of particles was injected, a new row of particles is injected into the simulation.


Each time step loops over all particles of the material type specified for the task. If <tt>(time)</tt> 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 <tt>(minCOD)</tt> (and optionally <tt>(dir)</tt>) where entered, the particle is deleted only if the crack opening displacement has passed the entered minimum.
In addition, this simulation will check for any particles in a region ahead of the pipe with the same cross-sectional area as the pipe and a length normal to the pipe of one grid cell. Any particle in that region will have their velocities set equal to the current flow rate. This action is effectively providing a velocity boundary condition to a small region ahead of the pipe. Once out of that region, the particles are within the simulation. If particles get blocked once leaving that region, the injection process might not work well.


== Notes ==
== Notes ==


* A single <tt>DeleteDamage</tt> task applies to one material type. A simulation can have multiple <tt>DeleteDamage</tt> tasks if you need particle deletions for more than one material type.
* This task places no restrictions on the material type that gets injected, but it was designed for use with [[#Hyperelastic Materials|liquid or liquid-like materials]]. It might also work for soft-elastic materials or even any material provided their motion once out on inlet region is not overly impeded by other particles.
* Deleting after decohesion only works for [[Material_Models#Softening_Materials|softening materials]]. Deleting after a specified time can be used for any material type.
* The injection of particles requires that the simulation is seeded with sufficient particles of the right material type and size in the [[Material Point Reservoir]]. If the reservoir is empty (or becomes empty), the simulation will continue, but no particles will be injected.
* If <tt>(minCOD)</tt> 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 <tt>(minCOD)</tt> to be larger than the material's COD at failure.

Latest revision as of 08:07, 14 January 2023

This custom task injects particles into a simulation.

Introduction

The FluidSource custom task injects particles at a specified 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 started 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 the two parameters for defining the material 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 rate in (length units)3 per time unit. The (rate) option specifies a fixed and constant rate while (rateFxn) can provide a variable rate as a user-defined function of time. If both are provided, the (rateFxn) takes precedence.
  • (xNorm),(yNorm),(zNorm) - provide three components to a normal vector in the direction of flow (the vector need not be normalized). In 2D, (xNorm) and (yNorm) can be in any direction. In 3D, the injection is currently limited being along the x, y, or z axis, which means only one component can be nonzero (all components default to zero, so just specify the one non-zero value; if none are specified, 3D injection will be in the z direction).

Defining the Injection Pipe

The injection pipe is a width in 2D or an area in 3D and specified in scripted files with the following commands:

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

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

   <Parameter name='source_x'>(xSrc)</Parameter>
   <Parameter name='source_y'>(ySrc)</Parameter>
   <Parameter name='source_z'>(zSrc)</Parameter>
   <Parameter name='inlet_width'>(width)</Parameter>
   <Parameter name='inlet_depth'>(depth)</Parameter>

where

  • (xSrc),(ySrc),(zSrc) - specify a point at the center of the pipe (only x and y coordinates needed in 2D).
  • (width) and (depth) - specifies the cross-sectional area of the rectangular pipe. In 2D, only (wdith) is needed and the depth of the pipe is the thickness of the 2D simulation. In 3D, the rectangle axes are aligned with the non-normal axes (e.g., for flow in x direction, width and depth are in the y and z directions, etc.).

Injected Particle Size

By default, the injected particle size will be the same as the default particle size for the current simulation (as set using the PtsPerElement command). If desired, that size can be changed with the following addition to scripted files

Parameter particle_scale,(scaleSize)

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

   <Parameter name='particle_scale'>(scaleSize)</Parameter>

where

  • (scaleSize) - specifies relative particle size compared to the simulation's default particle per cell (default is 1).

Task Action

Each time step checks the injection location and current flow rate. If enough time has passed since the last row of particles was injected, a new row of particles is injected into the simulation.

In addition, this simulation will check for any particles in a region ahead of the pipe with the same cross-sectional area as the pipe and a length normal to the pipe of one grid cell. Any particle in that region will have their velocities set equal to the current flow rate. This action is effectively providing a velocity boundary condition to a small region ahead of the pipe. Once out of that region, the particles are within the simulation. If particles get blocked once leaving that region, the injection process might not work well.

Notes

  • This task places no restrictions on the material type that gets injected, but it was designed for use with liquid or liquid-like materials. It might also work for soft-elastic materials or even any material provided their motion once out on inlet region is not overly impeded by other particles.
  • The injection of particles requires that the simulation is seeded with sufficient particles of the right material type and size in the Material Point Reservoir. If the reservoir is empty (or becomes empty), the simulation will continue, but no particles will be injected.