Difference between revisions of "PeriodicXPIC Custom Task"

From OSUPDOCS
Jump to navigation Jump to search
Line 32: Line 32:
where the parameters are:
where the parameters are:


* <tt>(XPICOrder)</tt> - Enter XPIC order (the <tt>m</tt> in XPIC(m)) to use when doing periodic XPIC(m) calculations. See  [[Damping Options]] for details on this setting..
* <tt>(order)</tt> - Enter FMPM or XPIC order (the <tt>k</tt>) to use when doing periodic FMPM(k) or PIC(k) calculations. Select <tt>(order></tt> using an <tt>FMPMOrder</tt> command to run using FMPM(k) or an <tt>XPICOrder</tt> command to run using XPIC(k).
* <tt>(FMPMOrder)</tt> - Using this parameter instead of <tt>XPICOrder</tt> switched to a new mode in development called FMPM.
* <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.

Revision as of 15:57, 14 August 2019

A custom task to use XPIC(k) and FMPM(k) methods on all or selected time steps

Introduction

The XPIC(k) and FMPM(k) methods are advanced methods that filters out unwanted noise (in the null space) without damping out useful information. Their drawback is that they adds calculation time as order k increases. In many simulations, it is best to use XPIC(k) or FMPM(k) methods on every time step. This custom tasks lets create such simulations or you can covert them use XPIC(k) or FMPM(k) periodically instead of on every time step. Note that FMPM(k) is currently only available in OSParticulas.

Using XPIC(k) or FMPM(k) For Mechanics

MPM simulations will use these standard FLIP method be default. To switch to XPIC(k) or FMPM(k) for all time steps (or just for some), schedule this task and specify all needed parameters. In scripted files, a PeriodicXPIC custom task is scheduled with

CustomTask PeriodicXPIC
Parameter FMPMOrder,(order)
(... or Parameter XPICOrder,(order))
Parameter periodicSteps,(stepInterval)
Parameter periodicTime,(timeInterval)
Parameter periodicCFL,(CFLfactor)
Parameter verbose,{verbose}
Parameter GridBCOption,(BCoption)

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

<Schedule name='PeriodicXPIC'>
   <Parameter name='FMPMOrder'>(order)</Parameter>
   <!-- or <Parameter name='XPICOrder'>(order)</Parameter>-->
   <Parameter name='periodicSteps'>(stepInterval)</Parameter>
   <Parameter name='periodicTime'>(timeInterval)</Parameter>
   <Parameter name='periodicCFL'>(CFLfactor)</Parameter>
   <Parameter name='verbose'>(verbose)</Parameter>
   <Parameter name='GridBCOption'>(BCoption)</Parameter>
</Schedule>

where the parameters are:

  • (order) - Enter FMPM or XPIC order (the k) to use when doing periodic FMPM(k) or PIC(k) calculations. Select (order> using an FMPMOrder command to run using FMPM(k) or an XPICOrder command to run using XPIC(k).
  • (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.
  • (BCOption) - Use "lumped" to use lumped mass matrix methods for boundary conditions, "velocity" to all impose grid velocity conditions in the velocity field, or "combined" to do both. The default is "combined." Note that XPIC cannot use "velocity" option (that setting will be changed to "lumped" is used. This option only affects calculations when (XPICOrder) or (FMPMOrder) is greater than 1.

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). XPIC(m) seems to provide significant improvement of transport modeling and can eliminate oscillations sometimes seen for temperature or concentration for particles within one cell.

To use XPIC(m) for transport equations, select order and fraction PIC (using parameters in previous section) and then select periodicity of XPIC(m) for conduction and/or diffusion with following task parameters:

Parameter periodicStepsConduction,(stepInterval)
Parameter periodicTimeConduction,(timeInterval)
Parameter periodicCFLConduction,(CFLfactor)
Parameter periodicStepsDiffusion,(stepInterval)
Parameter periodicTimeDiffusion,(timeInterval)
Parameter periodicCFLDiffusion,(CFLfactor)

In XML files, this new parameter options within the <CustomTasks> block are

<Parameter name='periodicStepsConduction'>(stepInterval)</Parameter>
<Parameter name='periodicTimeConduction'>(timeInterval)</Parameter>
<Parameter name='periodicCFLConduction'>(CFLfactor)</Parameter>
<Parameter name='periodicStepsDiffusion'>(stepInterval)</Parameter>
<Parameter name='periodicTimeDiffusion'>(timeInterval)</Parameter>
<Parameter name='periodicCFLDiffusion'>(CFLfactor)</Parameter>

The meanings of values (stepInterval), (timeInterval) and (CFLfactor) are given in the previous section except that CFL factor is applied to transport time step and not the simulation time step.

When using XPIC(m) for transport equations, you should never pick m=1 because it causes too much numerical diffusion. Any higher order works, unless it XPIC(m) filtering is done too frequently. Because transport time step is usually much longer then mechanics time step, it is usually best to pick transport XPIC(m) frequency using the CFL parameter options and the chosen CFL factor should be 0.5 or higher to avoid any numerical diffusion.