Cardinal
|
#include <NekBoundaryFlux.h>
Public Member Functions | |
NekBoundaryFlux (const InputParameters ¶meters) | |
virtual void | sendDataToNek () override |
Send data to Nek. More... | |
virtual void | readDataFromNek () override |
Read data from Nek. More... | |
const MooseEnum & | direction () const |
Get the direction of the transfer. More... | |
Static Public Member Functions | |
static InputParameters | validParams () |
static std::map< unsigned int, std::string > | usrwrkMap () |
Protected Member Functions | |
void | checkInitialFluxValues (const Real &nek_flux, const Real &moose_flux) const |
bool | normalizeFlux (const double moose_integral, double nek_integral, double &normalized_nek_integral) |
bool | normalizeFluxBySideset (const std::vector< double > &moose_integral, std::vector< double > &nek_integral, double &normalized_nek_integral) |
std::string | normalizationHint () const |
void | fillAuxVariable (const unsigned int var_number, const double *value) |
void | addExternalVariable (const std::string name) |
void | addExternalVariable (const unsigned int slot, const std::string name) |
void | addExternalPostprocessor (const std::string name, const Real initial) |
void | checkAllocatedUsrwrkSlot (const unsigned int &u) const |
Protected Attributes | |
const bool & | _conserve_flux_by_sideset |
const Real & | _initial_flux_integral |
Initial value to use for the total flux integral for ensuring conservation. More... | |
const std::vector< int > * | _boundary |
Boundaries through which the flux transfer occurs. More... | |
const Real | _reference_flux_integral |
Dimensional reference flux, computed from characteristic scales. More... | |
const PostprocessorValue * | _flux_integral = nullptr |
Total surface-integrated flux coming from the coupled MOOSE app. More... | |
const VectorPostprocessorValue * | _flux_integral_vpp = nullptr |
Sideset-wise surface-integrated flux coming from the coupled MOOSE app. More... | |
const Real & | _abs_tol |
Absolute tolerance for checking conservation. More... | |
const Real & | _rel_tol |
Relative tolerance for checking conservation. More... | |
std::string | _postprocessor_name |
Name of the postprocessor/vectorpostprocessor used to apply conservation. More... | |
std::string | _variable |
Variable name (or prefix of names) to create in MOOSE to facilitate data passing. More... | |
std::vector< unsigned int > | _usrwrk_slot |
Slot in usrwrk array to use for writing data, if 'direction = to_nek'. More... | |
std::map< std::string, unsigned int > | _variable_number |
Internal number for the variable(s) created in MOOSE (name, number) More... | |
int | _n_per_surf |
Number of points on the MOOSE mesh to write per element surface. More... | |
int | _n_per_vol |
Number of points on the MOOSE mesh to write per element volume. More... | |
double * | _v_face = nullptr |
MOOSE data interpolated onto the (boundary) data transfer mesh. More... | |
double * | _v_elem = nullptr |
MOOSE data interpolated onto the (volume) data transfer mesh. More... | |
double * | _external_data = nullptr |
Scratch space to place external NekRS fields before writing into auxiliary variables. More... | |
NekRSProblem & | _nek_problem |
The NekRSProblem using the field transfer interface. More... | |
NekRSMesh * | _nek_mesh |
The underlying NekRSMesh mirror. More... | |
const MooseEnum & | _direction |
Direction of the transfer. More... | |
Static Protected Attributes | |
static std::map< unsigned int, std::string > | _field_usrwrk_map |
Performs a transfer of a boundary flux between NekRS and MOOSE. The mesh used for the MOOSE app may be very different from the mesh used by nekRS. Elements may be much finer/coarser, and one element on the MOOSE app may not be a clear subset/superset of the elements on the nekRS mesh. Therefore, to ensure conservation, we send the flux integrals (either for all sidesets lumped together or on a per-sideset basis) to nekRS for internal normalization of the flux applied on the nekRS mesh.
NekBoundaryFlux::NekBoundaryFlux | ( | const InputParameters & | parameters | ) |
|
protectedinherited |
Add a postprocessor to facilitate coupling
[in] | name | postprocessor name |
[in] | initial | initial value to use for the postprocessor |
|
protectedinherited |
Add a MOOSE variable to facilitate coupling
[in] | name | variable name |
|
protectedinherited |
Add a MOOSE variable to facilitate coupling
[in] | slot | slot in usrwrk array holding this field |
[in] | name | variable name |
|
protectedinherited |
Check if a specified slot in the usrwrk array has been allocated
[in] | u | slice in usrwrk array |
|
protected |
Print a warning to the user if the initial fluxes (before normalization) differ significantly, since this can (but not always) indicate an error with model setup.
[in] | nek_flux | flux to be received by Nek |
[in] | moose_flux | flux sent by MOOSE |
|
inlineinherited |
Get the direction of the transfer.
|
protectedinherited |
Fill an outgoing auxiliary variable field with nekRS solution data
[in] | var_number | auxiliary variable number |
[in] | value | nekRS solution data to fill the variable with |
|
protectedinherited |
Return a string to print in error messages upon failed normalizations
|
protected |
Normalize the flux sent to nekRS to conserve the total flux
[in] | moose_integral | total integrated flux from MOOSE to conserve |
[in] | nek_integral | total integrated flux in nekRS to adjust |
[out] | normalized_nek_integral | final normalized nek flux integral |
|
protected |
Normalize the flux sent to nekRS to conserve the total flux
[in] | moose_integral | total integrated flux from MOOSE to conserve |
[in] | nek_integral | total integrated flux in nekRS to adjust |
[out] | normalized_nek_integral | final normalized nek flux integral |
|
overridevirtual |
Read data from Nek.
Reimplemented from NekTransferBase.
|
overridevirtual |
Send data to Nek.
Reimplemented from NekTransferBase.
|
inlinestaticinherited |
Get the mapping of usrwrk slots to variable names for all field transfers
|
static |
|
protectedinherited |
Absolute tolerance for checking conservation.
|
protected |
Boundaries through which the flux transfer occurs.
|
protected |
Whether to conserve flux received in NekRS by individually re-normalizing with integrals over individual sideset. This approach is technically more accurate, but places limitations on how the sidesets are defined (they should NOT share any nodes with one another) and more effort with vector postprocessors, so it is not the default.
|
protectedinherited |
Direction of the transfer.
|
protectedinherited |
Scratch space to place external NekRS fields before writing into auxiliary variables.
|
staticprotectedinherited |
Information about data stored in the usrwrk array for error checking and diagnostics; stored as (slot, variable name in MOOSE)
|
protected |
Total surface-integrated flux coming from the coupled MOOSE app.
|
protected |
Sideset-wise surface-integrated flux coming from the coupled MOOSE app.
|
protected |
Initial value to use for the total flux integral for ensuring conservation.
|
protectedinherited |
Number of points on the MOOSE mesh to write per element surface.
|
protectedinherited |
Number of points on the MOOSE mesh to write per element volume.
|
protectedinherited |
The NekRSProblem using the field transfer interface.
|
protectedinherited |
Name of the postprocessor/vectorpostprocessor used to apply conservation.
|
protected |
Dimensional reference flux, computed from characteristic scales.
|
protectedinherited |
Relative tolerance for checking conservation.
|
protectedinherited |
Slot in usrwrk array to use for writing data, if 'direction = to_nek'.
|
protectedinherited |
MOOSE data interpolated onto the (volume) data transfer mesh.
|
protectedinherited |
MOOSE data interpolated onto the (boundary) data transfer mesh.
|
protectedinherited |
Variable name (or prefix of names) to create in MOOSE to facilitate data passing.
|
protectedinherited |
Internal number for the variable(s) created in MOOSE (name, number)