Difference between revisions of "PeriodicXPIC Custom Task"

From OSUPDOCS
Jump to navigation Jump to search
Line 5: Line 5:
The [[XPIC Features|XPIC(m) method]] is an advanced damping method that filters out unwanted noise (in the null space) without damping out useful information. Its drawback is that it adds calculation time as m in XPIC(m) increases. In some simulations, it may not be necessary to use XPIC(m) update methods on every time step. This custom tasks lets you convert such simulations to use XPIC(m) periodically instead of on every time step. Note that both the [[XPIC Features|XPIC(m) method]] and this custom tasks are only available in [[OSParticulas]].
The [[XPIC Features|XPIC(m) method]] is an advanced damping method that filters out unwanted noise (in the null space) without damping out useful information. Its drawback is that it adds calculation time as m in XPIC(m) increases. In some simulations, it may not be necessary to use XPIC(m) update methods on every time step. This custom tasks lets you convert such simulations to use XPIC(m) periodically instead of on every time step. Note that both the [[XPIC Features|XPIC(m) method]] and this custom tasks are only available in [[OSParticulas]].


== Task Scheduling ==
== Using XPIC(m) For Particle Velocities ==


The first step is to select default update method. Normally, the default method would be a standard FLIP method selected by using [[Damping Options#Damping Commands|Damping commands]] and picking <tt>(fractionPIC)</tt> to 1. Next, you schedule this task and use it to select an XPIC order (the <tt>m</tt> in XPIC(m)) and frequency to run the XPIC(m) calculations. In scripted files, a <tt>PeriodicXPIC</tt> custom task is scheduled with
The first step is to select default update method. Normally, the default method would be a standard FLIP method selected by using [[Damping Options#Damping Commands|Damping commands]] and setting <tt>(fractionPIC)</tt> to 1. Next, you schedule this task and use it to select an XPIC order (the <tt>m</tt> in XPIC(m)) and frequency to run the XPIC(m) calculations. In scripted files, a <tt>PeriodicXPIC</tt> custom task is scheduled with


  CustomTask PeriodicXPIC
  CustomTask PeriodicXPIC
Line 33: Line 33:
* <tt>(stepInterval)</tt>, <tt>(timeInterval)</tt>, and <tt>(CFLfactor)</tt> - sets the frequency for running periodic XPIC(m) calculations for mechanics. The <tt>(stepInterval)</tt> option sets number of time steps between each XPIC(m) calculation, <tt>(timeInterval)</tt> sets frequency in  [[ConsistentUnits Command#Legacy and Consistent Units|alt time units]], and <tt>(CFLfactor)</tt> sets frequency relative to the basic time step for the momentum equation. If <tt>(stepInterval)</tt> is used, it is used and the other two are ignored. If <tt>(stepInterval)</tt> is not used, the time step is found from the <tt>(CFLfactor)</tt> (if provided) or from <tt>(timeInterval)</tt>. One of these three parameters is required to enable periodic XPIC calculations.
* <tt>(stepInterval)</tt>, <tt>(timeInterval)</tt>, and <tt>(CFLfactor)</tt> - sets the frequency for running periodic XPIC(m) calculations for mechanics. The <tt>(stepInterval)</tt> option sets number of time steps between each XPIC(m) calculation, <tt>(timeInterval)</tt> sets frequency in  [[ConsistentUnits Command#Legacy and Consistent Units|alt time units]], and <tt>(CFLfactor)</tt> sets frequency relative to the basic time step for the momentum equation. If <tt>(stepInterval)</tt> is used, it is used and the other two are ignored. If <tt>(stepInterval)</tt> is not used, the time step is found from the <tt>(CFLfactor)</tt> (if provided) or from <tt>(timeInterval)</tt>. One of these three parameters is required to enable periodic XPIC calculations.
* <tt>(verbose)</tt> - If a non-zero integer, a comment line is printed in the output file every time XPIC(m) calculations are done. The default is 0.
* <tt>(verbose)</tt> - If a non-zero integer, a comment line is printed in the output file every time XPIC(m) calculations are done. The default is 0.
== Using XPIC(m) For Transport Properties ==
You can also use XPIC(m) for temperature (when doing conduction calculations) or for concentration (when doing diffusion calculations)

Revision as of 20:42, 11 February 2018

A custom task to use XPIC(m) method on selected time steps

Introduction

The XPIC(m) method is an advanced damping method that filters out unwanted noise (in the null space) without damping out useful information. Its drawback is that it adds calculation time as m in XPIC(m) increases. In some simulations, it may not be necessary to use XPIC(m) update methods on every time step. This custom tasks lets you convert such simulations to use XPIC(m) periodically instead of on every time step. Note that both the XPIC(m) method and this custom tasks are only available in OSParticulas.

Using XPIC(m) For Particle Velocities

The first step is to select default update method. Normally, the default method would be a standard FLIP method selected by using Damping commands and setting (fractionPIC) to 1. Next, you schedule this task and use it to select an XPIC order (the m in XPIC(m)) and frequency to run the XPIC(m) calculations. In scripted files, a PeriodicXPIC custom task is scheduled with

CustomTask PeriodicXPIC
Parameter XPICOrder,(order)
Parameter fractionPIC,(fractionPIC)
Parameter periodicSteps,(stepInterval)
Parameter periodicTime,(timeInterval)
Parameter periodicCFL,(CFLfactor)
Parameter verbose,{verbose}

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

<Schedule name='PeriodicXPIC'>
   <Parameter name='XPICOrder'>(order)</Parameter>
   <Parameter name='fractionPIC'>(fractionPIC)</Parameter>
   <Parameter name='periodicSteps'>(stepInterval)</Parameter>
   <Parameter name='periodicTime'>(timeInterval)</Parameter>
   <Parameter name='periodicCFL'>(CFLfactor)</Parameter>
   <Parameter name='verbose'>(verbose)</Parameter>
</Schedule>

where the parameters are:

  • (XPICOrder) and (fractionPIC) - Enter XPIC order (the m in XPIC(m)) and fraction XPIC(m) (0 to 1) to use when doing periodic XPIC(m) calculations. See Damping Options for details on these settings. The defaults are(XPICOrder)=5 with (fractionPIC)=1.
  • (stepInterval), (timeInterval), and (CFLfactor) - sets the frequency for running periodic XPIC(m) calculations for mechanics. The (stepInterval) option sets number of time steps between each XPIC(m) calculation, (timeInterval) sets frequency in alt time units, and (CFLfactor) sets frequency relative to the basic time step for the momentum equation. If (stepInterval) is used, it is used and the other two are ignored. If (stepInterval) is not used, the time step is found from the (CFLfactor) (if provided) or from (timeInterval). One of these three parameters is required to enable periodic XPIC calculations.
  • (verbose) - If a non-zero integer, a comment line is printed in the output file every time XPIC(m) calculations are done. The default is 0.

Using XPIC(m) For Transport Properties

You can also use XPIC(m) for temperature (when doing conduction calculations) or for concentration (when doing diffusion calculations)