chombo-discharge
Loading...
Searching...
No Matches
EBFluxRedistribution Class Reference

Flux redistribution: the hybrid divergence with mass redistribution, as an EBRedistribution. More...

#include <CD_EBFluxRedistribution.H>

Inheritance diagram for EBFluxRedistribution:
Collaboration diagram for EBFluxRedistribution:

Public Member Functions

 EBFluxRedistribution ()=delete
 Disallowed weak construction.
 EBFluxRedistribution (const RefCountedPtr< AmrMesh > &a_amr, const std::string &a_realm, const phase::which_phase a_phase, const bool a_blendConservation, const bool a_redistribute) noexcept
 Constructor. Allocates the scratch data on the current grids, so the object must be rebuilt after a regrid.
virtual ~EBFluxRedistribution () noexcept
 Destructor.
void redistribute (EBAMRCellData &a_divG, const EBAMRCellData &a_phi, const Real a_dt) noexcept override
 Turn kappa*D into the hybrid divergence and redistribute the missed mass.
Public Member Functions inherited from EBRedistribution
 EBRedistribution () noexcept
 Default constructor.
 EBRedistribution (const EBRedistribution &a_other)=delete
 Disallowed copy constructor.
 EBRedistribution (const EBRedistribution &&a_other)=delete
 Disallowed move constructor.
EBRedistribution & operator= (const EBRedistribution &a_other)=delete
 Disallowed copy assignment.
EBRedistribution & operator= (const EBRedistribution &&a_other)=delete
 Disallowed move assignment.
virtual ~EBRedistribution () noexcept
 Destructor.

Protected Member Functions

void hybridDivergence (LevelData< EBCellFAB > &a_hybridDivergence, LevelData< BaseIVFAB< Real > > &a_massDifference, const LevelData< BaseIVFAB< Real > > &a_nonConservativeDivergence, const int a_level) const noexcept
 Make the hybrid divergence on one level.

Protected Attributes

RefCountedPtr< AmrMesh > m_amr
 AMR mesh.
std::string m_realm
 Realm.
phase::which_phase m_phase
 Phase.
bool m_blendConservation
 If false, the non-conservative divergence is zero.
bool m_redistribute
 If false, the missed mass is not redistributed.
EBAMRIVData m_nonConservativeDivergence
 Non-conservative divergence in the cut cells.
EBAMRIVData m_massDifference
 Mass that the hybrid divergence misses in the cut cells.

Detailed Description

Flux redistribution: the hybrid divergence with mass redistribution, as an EBRedistribution.

In a cut cell with volume fraction kappa, the right-hand side is the hybrid divergence

R = kappa*D + (1-kappa)*D_nc,

where D is the conservative divergence and D_nc the non-conservative divergence, a kappa-weighted average of kappa*D over the neighbouring cells. The mass that this misses, (1-kappa)*(kappa*D - kappa*D_nc), is redistributed to the neighbouring cells through the EBMassRedistribution operators of the AmrMesh, on this level and across refinement boundaries. The result depends on neither the state nor the time step.

Constructor & Destructor Documentation

◆ EBFluxRedistribution()

EBFluxRedistribution::EBFluxRedistribution ( const RefCountedPtr< AmrMesh > & a_amr,
const std::string & a_realm,
const phase::which_phase a_phase,
const bool a_blendConservation,
const bool a_redistribute )
noexcept

Constructor. Allocates the scratch data on the current grids, so the object must be rebuilt after a regrid.

The realm must have the operators for the non-conservative divergence and, with a_redistribute, for the redistribution registered.

Parameters
[in]a_amrAMR mesh
[in]a_realmRealm
[in]a_phasePhase
[in]a_blendConservationIf false, the non-conservative divergence is zero, and R = kappa*D in cut cells.
[in]a_redistributeIf false, the missed mass is not redistributed, and the update is not conservative.

Member Function Documentation

◆ hybridDivergence()

void EBFluxRedistribution::hybridDivergence ( LevelData< EBCellFAB > & a_hybridDivergence,
LevelData< BaseIVFAB< Real > > & a_massDifference,
const LevelData< BaseIVFAB< Real > > & a_nonConservativeDivergence,
const int a_level ) const
protectednoexcept

Make the hybrid divergence on one level.

On input, a_hybridDivergence holds kappa*D. On output, it holds the hybrid divergence in the cut cells, and a_massDifference the mass that it misses.

Parameters
[in,out]a_hybridDivergenceOn input kappa*D, on output the hybrid divergence.
[out]a_massDifferenceMass that the hybrid divergence misses.
[in]a_nonConservativeDivergenceNon-conservative divergence.
[in]a_levelGrid level

◆ redistribute()

void EBFluxRedistribution::redistribute ( EBAMRCellData & a_divG,
const EBAMRCellData & a_phi,
const Real a_dt )
overridevirtualnoexcept

Turn kappa*D into the hybrid divergence and redistribute the missed mass.

See EBRedistribution::redistribute. The state and the time step are not used.

Parameters
[in,out]a_divGOn input kappa*D, on output R.
[in]a_phiState that the update starts from (not used).
[in]a_dtTime step of the update (not used).

Implements EBRedistribution.


The documentation for this class was generated from the following files: