chombo-discharge
Loading...
Searching...
No Matches
Enumerations | Functions
CD_IrregularDeposition.H File Reference

Declaration of cut-cell deposition strategies. More...

#include <string>
#include <MayDay.H>
#include <CD_NamespaceHeader.H>
#include <CD_NamespaceFooter.H>
#include <CD_IrregularDepositionImplem.H>
Include dependency graph for CD_IrregularDeposition.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum class  IrregularDeposition {
  Native , NGP , Mirror , Redistribute ,
  RedistributeBlended
}
 How a deposition scheme treats the cut cells. More...
 

Functions

IrregularDeposition irregularDepositionFromString (const std::string &a_str) noexcept
 Map a cut-cell deposition selector string to an IrregularDeposition.
 

Detailed Description

Declaration of cut-cell deposition strategies.

Author
Robert Marskar

Enumeration Type Documentation

◆ IrregularDeposition

enum class IrregularDeposition
strong

How a deposition scheme treats the cut cells.

Particle deposition divides by dx^D and never by the volume fraction kappa, so a cut cell holds kappa*n where the fluid solvers hold n. This enum selects what, if anything, is done about that. It is deliberately a single selector rather than a set of independent flags: the alternatives are mutually exclusive answers to one question, and a combination such as Mirror together with Redistribute is a silent 1/kappa error which no assertion further down can catch. Making it unrepresentable is the point of the type.

This is orthogonal to DepositionType, which selects the deposition kernel (NGP/CIC/TSC), and to CoarseFineDeposition, which selects how the refinement boundary is handled.

Enumerator
Native 

Deposit as-is, with no cut-cell treatment at all.

phi is then an extended state that runs into the embedded boundary, and a cut cell holds kappa*n.

NGP 

Put the particle's entire cloud in its own cell when that cell is a cut cell.

Nothing leaks into the solid, but the cut cell still holds kappa*n and the deposition is no longer a smooth function of the particle position.

Mirror 

Even extension of the density about the embedded boundary: deposit each particle's cloud and the cloud of its image reflected across the boundary.

Under this option A CUT CELL HOLDS n, NOT kappa*n – unlike every other option here, and unlike what the rest of the library has historically assumed. That is the whole point (the field is then a true density up to the wall, so a quasi-neutral plasma against a wall produces no spurious charge layer), but it is a change of meaning that consumers of phi must opt into knowingly. Readers that assume kappa*n in a cut cell need attention before they are used together with this option; DataOps::filterSmooth (CD_DataOps.cpp:679) and the arithmeticAverage sites are the known ones.

Incompatible with DepositionType::NGP, which puts the whole cloud in the particle's own cell – an image in that same cell would then simply double it. ItoSolver::parseDeposition rejects the combination.

Redistribute 

Hybrid divergence: the cut-cell mass excess deltaM = (1-kappa)*dc is redistributed to the neighbours.

Conservative, but kappa appears in a denominator, so small kappa is a singular limit.

RedistributeBlended 

As Redistribute, but the conservative divergence is first blended with the non-conservative one.

Function Documentation

◆ irregularDepositionFromString()

IrregularDeposition irregularDepositionFromString ( const std::string &  a_str)
inlinenoexcept

Map a cut-cell deposition selector string to an IrregularDeposition.

Valid input options are: 'native' -> Native 'ngp' -> NGP 'mirror' -> Mirror 'redistribute' -> Redistribute 'redistribute_blended' -> RedistributeBlended

Parameters
[in]a_strString selector. Must take one of the above strings.
Returns
The corresponding strategy; aborts on an unknown selector.