Cardinal
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
NekRSStandaloneProblem Class Reference

#include <NekRSStandaloneProblem.h>

Inheritance diagram for NekRSStandaloneProblem:
[legend]

Public Member Functions

 NekRSStandaloneProblem (const InputParameters &params)
 
bool isDataTransferHappening (ExternalProblem::Direction direction)
 
unsigned int minimumScratchSizeForCoupling () const
 
unsigned int firstReservedUsrwrkSlot () const
 
void sendScalarValuesToNek ()
 Send values from NekScalarValue userobjects to NekRS. More...
 
void getNekScalarValueUserObjects ()
 Setup to fetch NekScalarValue user objects for sending scalar values into NekRS scratch space. More...
 
void mapFaceDataToNekFace (const unsigned int &e, const unsigned int &var_num, const Real &multiplier, double **outgoing_data)
 
void mapVolumeDataToNekVolume (const unsigned int &e, const unsigned int &var_num, const Real &multiplier, double **outgoing_data)
 
void mapFaceDataToNekVolume (const unsigned int &e, const unsigned int &var_num, const Real &multiplier, double **outgoing_data)
 Map nodal points on a MOOSE face element to the GLL points on a Nek volume element. More...
 
void writeFieldFile (const Real &time, const int &step) const
 
virtual void adjustNekSolution ()
 
virtual bool isOutputStep () const
 Whether nekRS should write an output file for the current time step. More...
 
virtual void initialSetup () override
 
virtual void externalSolve () override
 
virtual bool converged (unsigned int) override
 
virtual void addExternalVariables () override
 
virtual void syncSolutions (ExternalProblem::Direction direction) override
 
virtual bool nondimensional () const
 
virtual const bool hasMovingNekMesh () const
 
virtual bool synchronizeIn ()
 
virtual bool synchronizeOut ()
 
double L_ref () const
 
unsigned int nUsrWrkSlots () const
 
template<typename T >
void checkDuplicateEntries (const std::vector< T > &var, const std::string &name) const
 
void checkDuplicateVariableName (const std::string &name) const
 
bool stringHasEnding (std::string const &full, std::string const &ending) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

void copyScratchToDevice ()
 
void interpolateBoundarySolutionToNek (double *incoming_moose_value, double *outgoing_nek_value)
 
void interpolateVolumeSolutionToNek (const int elem_id, double *incoming_moose_value, double *outgoing_nek_value)
 
void writeVolumeSolution (const int elem_id, const field::NekWriteEnum &field, double *T, const std::vector< double > *add=nullptr)
 
void writeBoundarySolution (const int elem_id, const field::NekWriteEnum &field, double *T)
 
void volumeSolution (const field::NekFieldEnum &f, double *T)
 
void boundarySolution (const field::NekFieldEnum &f, double *T)
 
void initializeInterpolationMatrices ()
 Initialize interpolation matrices for transfers in/out of nekRS. More...
 
virtual void fillAuxVariable (const unsigned int var_number, const double *value)
 
virtual void extractOutputs ()
 
virtual InputParameters getExternalVariableParameters ()
 
virtual void addTemperatureVariable ()
 
std::string fieldFilePrefix (const int &number) const
 

Protected Attributes

std::unique_ptr< NumericVector< Number > > _serialized_solution
 
const std::string & _casename
 NekRS casename. More...
 
const bool & _nondimensional
 Whether the nekRS solution is performed in nondimensional scales. More...
 
const Real & _U_ref
 Reference characteristic velocity. More...
 
const Real & _T_ref
 Reference characteristic temperature. More...
 
const Real & _dT_ref
 Reference characteristic temperature delta. More...
 
const Real & _L_ref
 Reference characteristic length. More...
 
const Real & _rho_0
 Reference density. More...
 
const Real & _Cp_0
 Reference isobaric specific heat capacity. More...
 
const bool & _write_fld_files
 
const bool & _disable_fld_file_output
 Whether to turn off all field file writing. More...
 
unsigned int _n_usrwrk_slots
 
const unsigned int & _constant_interval
 For constant synchronization intervals, the desired frequency (in units of Nek time steps) More...
 
const bool & _skip_final_field_file
 Whether to skip writing a field file on NekRS's last time steo. More...
 
const unsigned int & _first_reserved_usrwrk_slot
 First slice in usrwrk for Cardinal to read/write data from. More...
 
int _n_surface_elems
 Number of surface elements in the data transfer mesh, across all processes. More...
 
int _n_vertices_per_surface
 Number of vertices per surface element of the transfer mesh. More...
 
int _n_volume_elems
 Number of volume elements in the data transfer mesh, across all processes. More...
 
int _n_vertices_per_volume
 Number of vertices per volume element of the transfer mesh. More...
 
int _n_vertices_per_elem
 Number of vertices per element in the data transfer mesh, which depends on whether boundary/volume coupling. More...
 
const std::vector< int > * _boundary = nullptr
 Boundary IDs through which to couple nekRS and MOOSE. More...
 
bool _volume
 Whether the mesh contains volume-based coupling. More...
 
double _start_time
 Start time of the simulation based on NekRS's .par file. More...
 
bool _is_output_step
 Whether the most recent time step was an output file writing step. More...
 
NekRSMesh_nek_mesh
 
NekTimeStepper_timestepper = nullptr
 The time stepper used for selection of time step size. More...
 
Transient * _transient_executioner = nullptr
 Underlying executioner. More...
 
bool _needs_interpolation
 
const MultiMooseEnum * _outputs = nullptr
 NekRS solution fields to output to the mesh mirror. More...
 
std::vector< std::string > _var_names
 Names of external variables when extracting the NekRS solution. More...
 
std::vector< unsigned int > _external_vars
 Numeric identifiers for the external variables. More...
 
std::string _var_string
 Descriptive string for the variables extracted from NekRS. More...
 
double * _external_data = nullptr
 Scratch space to place external NekRS fields before writing into auxiliary variables. More...
 
int _n_points
 Number of points for interpolated fields on the MOOSE mesh. More...
 
const PostprocessorValue * _transfer_in = nullptr
 Postprocessor containing the signal of when a synchronization has occurred. More...
 
double * _interpolation_outgoing = nullptr
 Vandermonde interpolation matrix (for outgoing transfers) More...
 
double * _interpolation_incoming = nullptr
 Vandermonde interpolation matrix (for incoming transfers) More...
 
unsigned int _minimum_scratch_size_for_coupling
 Minimum allowable scratch space size, strictly what is needed by Cardinal for coupling. More...
 
int _moose_Nq
 For the MOOSE mesh, the number of quadrature points in each coordinate direction. More...
 
const std::vector< unsigned int > * _usrwrk_output = nullptr
 Slots in the nrs->o_usrwrk array to write to a field file. More...
 
const std::vector< std::string > * _usrwrk_output_prefix = nullptr
 Filename prefix to use for naming the field files containing the nrs->o_usrwrk array slots. More...
 
double _elapsedStepSum
 Sum of the elapsed time in NekRS solves. More...
 
double _elapsedTime
 Sum of the total elapsed time in NekRS solves. More...
 
double _tSolveStepMin
 Minimum step solve time. More...
 
double _tSolveStepMax
 Maximum step solve time. More...
 
synchronization::SynchronizationEnum _synchronization_interval
 When to synchronize the NekRS solution with the mesh mirror. More...
 
std::vector< std::string > _usrwrk_indices
 quantities to write to nrs->usrwrk (and the order to write them) More...
 
std::vector< NekScalarValue * > _nek_uos
 Userobjects containing stochastic input data. More...
 
unsigned int _scratch_counter
 Counter for any potential NekScalarValue objects in the input file. More...
 
unsigned int _n_uo_slots
 Number of scratch space slots used for NekScalarValue usage. More...
 

Static Protected Attributes

static bool _first
 flag to indicate whether this is the first pass to serialize the solution More...
 

Detailed Description

Run NekRS as a standalone application, without any data transfers to/from MOOSE.

Constructor & Destructor Documentation

◆ NekRSStandaloneProblem()

NekRSStandaloneProblem::NekRSStandaloneProblem ( const InputParameters &  params)

Member Function Documentation

◆ addExternalVariables()

virtual void NekRSProblemBase::addExternalVariables ( )
overridevirtualinherited

Reimplemented in NekRSProblem, and NekRSSeparateDomainProblem.

◆ addTemperatureVariable()

virtual void NekRSProblemBase::addTemperatureVariable ( )
protectedvirtualinherited

Add a variable to represent the temperature of the NekRS solution. We allow this to be an entry point for derived classes because they might already be adding a temperature variable for coupling purposes.

Reimplemented in NekRSProblem.

◆ adjustNekSolution()

virtual void NekRSProblemBase::adjustNekSolution ( )
inlinevirtualinherited

Optional entry point called in externalSolve() where we can adjust the NekRS solution (such as to clip out high/low values of temperature). This is called after runStep(), but before writing anything to the Nek5000 backend or to output files.

Reimplemented in NekRSProblem.

◆ boundarySolution()

void NekRSProblemBase::boundarySolution ( const field::NekFieldEnum f,
double *  T 
)
protectedinherited

Interpolate the NekRS boundary solution onto the boundary MOOSE mesh mirror (re2 -> mirror)

Parameters
[in]ffield to interpolate
[out]Tinterpolated boundary value

◆ checkDuplicateEntries()

template<typename T >
void CardinalProblem::checkDuplicateEntries ( const std::vector< T > &  var,
const std::string &  name 
) const
inlineinherited

Check for duplicate entries in a 1-d vector

Parameters
[in]varinput vector
[in]namestring to use for printing error message

◆ checkDuplicateVariableName()

void CardinalProblem::checkDuplicateVariableName ( const std::string &  name) const
inherited

Check whether the user has already created a variable using one of the protected names that the wrapping is using.

Parameters
[in]namevariable name

◆ converged()

virtual bool NekRSProblemBase::converged ( unsigned int  )
inlineoverridevirtualinherited

◆ copyScratchToDevice()

void NekRSProblemBase::copyScratchToDevice ( )
protectedinherited

Copy the data sent from MOOSE->Nek from host to device.

◆ externalSolve()

virtual void NekRSProblemBase::externalSolve ( )
overridevirtualinherited

◆ extractOutputs()

virtual void NekRSProblemBase::extractOutputs ( )
protectedvirtualinherited

Extract user-specified parts of the NekRS CFD solution onto the mesh mirror

◆ fieldFilePrefix()

std::string NekRSProblemBase::fieldFilePrefix ( const int &  number) const
protectedinherited

Get a three-character prefix for use in writing output files for repeated Nek sibling apps.

Parameters
[in]numbermulti-app number

◆ fillAuxVariable()

virtual void NekRSProblemBase::fillAuxVariable ( const unsigned int  var_number,
const double *  value 
)
protectedvirtualinherited

Fill an outgoing auxiliary variable field with nekRS solution data

Parameters
[in]var_numberauxiliary variable number
[in]valuenekRS solution data to fill the variable with

◆ firstReservedUsrwrkSlot()

unsigned int NekRSProblemBase::firstReservedUsrwrkSlot ( ) const
inlineinherited

Get the index of the first slot in the usrwrk that Cardinal is managing

Returns
index of first slot

◆ getExternalVariableParameters()

virtual InputParameters NekRSProblemBase::getExternalVariableParameters ( )
protectedvirtualinherited

Get the parameters for the external variables to be added

Returns
external variable parameters

◆ getNekScalarValueUserObjects()

void NekRSProblemBase::getNekScalarValueUserObjects ( )
inherited

Setup to fetch NekScalarValue user objects for sending scalar values into NekRS scratch space.

◆ hasMovingNekMesh()

virtual const bool NekRSProblemBase::hasMovingNekMesh ( ) const
inlinevirtualinherited

Whether the mesh is moving

Returns
whether the mesh is moving

Reimplemented in NekRSProblem.

◆ initializeInterpolationMatrices()

void NekRSProblemBase::initializeInterpolationMatrices ( )
protectedinherited

Initialize interpolation matrices for transfers in/out of nekRS.

◆ initialSetup()

virtual void NekRSProblemBase::initialSetup ( )
overridevirtualinherited

Reimplemented in NekRSProblem, and NekRSSeparateDomainProblem.

◆ interpolateBoundarySolutionToNek()

void NekRSProblemBase::interpolateBoundarySolutionToNek ( double *  incoming_moose_value,
double *  outgoing_nek_value 
)
protectedinherited

Interpolate the MOOSE mesh mirror solution onto the NekRS boundary mesh (mirror -> re2)

Parameters
[in]incoming_moose_valueMOOSE face values
[out]outgoing_nek_valueinterpolated MOOSE face values onto the NekRS boundary mesh

◆ interpolateVolumeSolutionToNek()

void NekRSProblemBase::interpolateVolumeSolutionToNek ( const int  elem_id,
double *  incoming_moose_value,
double *  outgoing_nek_value 
)
protectedinherited

Interpolate the MOOSE mesh mirror solution onto the NekRS volume mesh (mirror -> re2)

Parameters
[in]elem_idelement ID
[in]incoming_moose_valueMOOSE face values
[out]outgoing_nek_valueinterpolated MOOSE face values onto the NekRS volume mesh

◆ isDataTransferHappening()

bool NekRSProblemBase::isDataTransferHappening ( ExternalProblem::Direction  direction)
inherited

Whether a data transfer to/from Nek is occurring

Parameters
[in]directiondirection of data transfer
Returns
whether a data transfer to Nek is about to occur

◆ isOutputStep()

virtual bool NekRSProblemBase::isOutputStep ( ) const
virtualinherited

Whether nekRS should write an output file for the current time step.

A nekRS output file (suffix .f000xx) is written if the time step is an integer multiple of the output writing interval or if the time step is the last time step.

Returns
whether to write a nekRS output file

◆ L_ref()

double NekRSProblemBase::L_ref ( ) const
inlineinherited

Get the characteristic length

Returns
characteristic length

◆ mapFaceDataToNekFace()

void NekRSProblemBase::mapFaceDataToNekFace ( const unsigned int &  e,
const unsigned int &  var_num,
const Real &  multiplier,
double **  outgoing_data 
)
inherited

Map nodal points on a MOOSE face element to the GLL points on a Nek face element.

Parameters
[in]eMOOSE element ID
[in]var_numvariable index to fetch MOOSE data from
[in]multipliermultiplier to apply to the MOOSE data before sending to Nek
[out]outgoing_datadata represented on Nek's GLL points, ready to be applied in Nek

◆ mapFaceDataToNekVolume()

void NekRSProblemBase::mapFaceDataToNekVolume ( const unsigned int &  e,
const unsigned int &  var_num,
const Real &  multiplier,
double **  outgoing_data 
)
inherited

Map nodal points on a MOOSE face element to the GLL points on a Nek volume element.

This function is to be used when MOOSE variables are defined over the entire volume (maybe the MOOSE transfer only sent meaningful values to the coupling boundaries), so we need to do a volume interpolation of the incoming MOOSE data into nrs->usrwrk, rather than a face interpolation. This could be optimized in the future to truly only just write the boundary values into the nekRS scratch space rather than the volume values, but it looks right now that our biggest expense occurs in the MOOSE transfer system, not these transfers internally to nekRS.

Parameters
[in]eMOOSE element ID
[in]var_numvariable index to fetch MOOSE data from
[in]multipliermultiplier to apply to the MOOSE data before sending to Nek
[out]outgoing_datadata represented on Nek's GLL points, ready to be applied in Nek

◆ mapVolumeDataToNekVolume()

void NekRSProblemBase::mapVolumeDataToNekVolume ( const unsigned int &  e,
const unsigned int &  var_num,
const Real &  multiplier,
double **  outgoing_data 
)
inherited

Map nodal points on a MOOSE volume element to the GLL points on a Nek volume element.

Parameters
[in]eMOOSE element ID
[in]var_numvariable index to fetch MOOSE data from
[in]multipliermultiplier to apply to the MOOSE data before sending to Nek
[out]outgoing_datadata represented on Nek's GLL points, ready to be applied in Nek

◆ minimumScratchSizeForCoupling()

unsigned int NekRSProblemBase::minimumScratchSizeForCoupling ( ) const
inlineinherited

Get the minimum scratch space required for coupling; this space is guaranteed to be filled with data incoming from MOOSE, like heat flux boundary conditions or mesh displacements

Returns
minimum scratch space reserved for coupling

◆ nondimensional()

virtual bool NekRSProblemBase::nondimensional ( ) const
inlinevirtualinherited

Whether the solve is in nondimensional form

Returns
whether solve is in nondimensional form

◆ nUsrWrkSlots()

unsigned int NekRSProblemBase::nUsrWrkSlots ( ) const
inlineinherited

Get the number of usrwrk slots allocated

Returns
number of allocated usrwrk slots

◆ sendScalarValuesToNek()

void NekRSProblemBase::sendScalarValuesToNek ( )
inherited

Send values from NekScalarValue userobjects to NekRS.

◆ stringHasEnding()

bool CardinalProblem::stringHasEnding ( std::string const &  full,
std::string const &  ending 
) const
inherited

Whether a string ends in a particular sub-string

Parameters
[in]fullfull string
[in]endingsub-string ending
Returns
whether full string has ending

◆ synchronizeIn()

virtual bool NekRSProblemBase::synchronizeIn ( )
virtualinherited

Whether data should be synchronized in to nekRS

Returns
whether inward data synchronization should occur

◆ synchronizeOut()

virtual bool NekRSProblemBase::synchronizeOut ( )
virtualinherited

Whether data should be synchronized out of nekRS

Returns
whether outward data synchronization should occur

◆ syncSolutions()

virtual void NekRSProblemBase::syncSolutions ( ExternalProblem::Direction  direction)
overridevirtualinherited

Reimplemented in NekRSProblem, and NekRSSeparateDomainProblem.

◆ validParams()

static InputParameters NekRSStandaloneProblem::validParams ( )
static

◆ volumeSolution()

void NekRSProblemBase::volumeSolution ( const field::NekFieldEnum f,
double *  T 
)
protectedinherited

Interpolate the NekRS volume solution onto the volume MOOSE mesh mirror (re2 -> mirror)

Parameters
[in]ffield to interpolate
[out]Tinterpolated volume value

◆ writeBoundarySolution()

void NekRSProblemBase::writeBoundarySolution ( const int  elem_id,
const field::NekWriteEnum field,
double *  T 
)
protectedinherited

Write into the NekRS solution space for coupling boundaries; for setting a mesh position in terms of a displacement, we need to add the displacement to the initial mesh coordinates.

Parameters
[in]elem_idelement ID
[in]fieldfield to write
[in]Tsolution values to write for the field for the given element

◆ writeFieldFile()

void NekRSProblemBase::writeFieldFile ( const Real &  time,
const int &  step 
) const
inherited

Write NekRS solution field file

Parameters
[in]timesolution time in NekRS (if NekRS is non-dimensional, this will be non-dimensional)
[in]steptime step index

◆ writeVolumeSolution()

void NekRSProblemBase::writeVolumeSolution ( const int  elem_id,
const field::NekWriteEnum field,
double *  T,
const std::vector< double > *  add = nullptr 
)
protectedinherited

Write into the NekRS solution space for coupling volumes; for setting a mesh position in terms of a displacement, we need to add the displacement to the initial mesh coordinates. For this, the 'add' parameter lets you pass in a vector of values (in NekRS's mesh order, i.e. the re2 order) to add.

Parameters
[in]elem_idelement ID
[in]fieldfield to write
[in]Tsolution values to write for the field for the given element
[in]addoptional vector of values to add to each value set on the NekRS end

Member Data Documentation

◆ _boundary

const std::vector<int>* NekRSProblemBase::_boundary = nullptr
protectedinherited

Boundary IDs through which to couple nekRS and MOOSE.

◆ _casename

const std::string& NekRSProblemBase::_casename
protectedinherited

NekRS casename.

◆ _constant_interval

const unsigned int& NekRSProblemBase::_constant_interval
protectedinherited

For constant synchronization intervals, the desired frequency (in units of Nek time steps)

◆ _Cp_0

const Real& NekRSProblemBase::_Cp_0
protectedinherited

Reference isobaric specific heat capacity.

◆ _disable_fld_file_output

const bool& NekRSProblemBase::_disable_fld_file_output
protectedinherited

Whether to turn off all field file writing.

◆ _dT_ref

const Real& NekRSProblemBase::_dT_ref
protectedinherited

Reference characteristic temperature delta.

◆ _elapsedStepSum

double NekRSProblemBase::_elapsedStepSum
protectedinherited

Sum of the elapsed time in NekRS solves.

◆ _elapsedTime

double NekRSProblemBase::_elapsedTime
protectedinherited

Sum of the total elapsed time in NekRS solves.

◆ _external_data

double* NekRSProblemBase::_external_data = nullptr
protectedinherited

Scratch space to place external NekRS fields before writing into auxiliary variables.

◆ _external_vars

std::vector<unsigned int> NekRSProblemBase::_external_vars
protectedinherited

Numeric identifiers for the external variables.

◆ _first

bool NekRSProblemBase::_first
staticprotectedinherited

flag to indicate whether this is the first pass to serialize the solution

◆ _first_reserved_usrwrk_slot

const unsigned int& NekRSProblemBase::_first_reserved_usrwrk_slot
protectedinherited

First slice in usrwrk for Cardinal to read/write data from.

◆ _interpolation_incoming

double* NekRSProblemBase::_interpolation_incoming = nullptr
protectedinherited

Vandermonde interpolation matrix (for incoming transfers)

◆ _interpolation_outgoing

double* NekRSProblemBase::_interpolation_outgoing = nullptr
protectedinherited

Vandermonde interpolation matrix (for outgoing transfers)

◆ _is_output_step

bool NekRSProblemBase::_is_output_step
protectedinherited

Whether the most recent time step was an output file writing step.

◆ _L_ref

const Real& NekRSProblemBase::_L_ref
protectedinherited

Reference characteristic length.

◆ _minimum_scratch_size_for_coupling

unsigned int NekRSProblemBase::_minimum_scratch_size_for_coupling
protectedinherited

Minimum allowable scratch space size, strictly what is needed by Cardinal for coupling.

◆ _moose_Nq

int NekRSProblemBase::_moose_Nq
protectedinherited

For the MOOSE mesh, the number of quadrature points in each coordinate direction.

◆ _n_points

int NekRSProblemBase::_n_points
protectedinherited

Number of points for interpolated fields on the MOOSE mesh.

◆ _n_surface_elems

int NekRSProblemBase::_n_surface_elems
protectedinherited

Number of surface elements in the data transfer mesh, across all processes.

◆ _n_uo_slots

unsigned int NekRSProblemBase::_n_uo_slots
protectedinherited

Number of scratch space slots used for NekScalarValue usage.

◆ _n_usrwrk_slots

unsigned int NekRSProblemBase::_n_usrwrk_slots
protectedinherited

Number of slices/slots to allocate in nrs->usrwrk to hold fields for coupling (i.e. data going into NekRS, written by Cardinal), or used for custom user actions, but not for coupling. By default, we just allocate 7 slots (no inherent reason, just a fairly big amount). For memory-limited cases, you can reduce this number to just the bare minimum necessary for your use case.

◆ _n_vertices_per_elem

int NekRSProblemBase::_n_vertices_per_elem
protectedinherited

Number of vertices per element in the data transfer mesh, which depends on whether boundary/volume coupling.

◆ _n_vertices_per_surface

int NekRSProblemBase::_n_vertices_per_surface
protectedinherited

Number of vertices per surface element of the transfer mesh.

◆ _n_vertices_per_volume

int NekRSProblemBase::_n_vertices_per_volume
protectedinherited

Number of vertices per volume element of the transfer mesh.

◆ _n_volume_elems

int NekRSProblemBase::_n_volume_elems
protectedinherited

Number of volume elements in the data transfer mesh, across all processes.

◆ _needs_interpolation

bool NekRSProblemBase::_needs_interpolation
protectedinherited

Whether an interpolation needs to be performed on the nekRS temperature solution, or if we can just grab the solution at specified points

◆ _nek_mesh

NekRSMesh* NekRSProblemBase::_nek_mesh
protectedinherited

Underlying mesh object on which NekRS exchanges fields with MOOSE or extracts NekRS's solution for I/O features

◆ _nek_uos

std::vector<NekScalarValue *> NekRSProblemBase::_nek_uos
protectedinherited

Userobjects containing stochastic input data.

◆ _nondimensional

const bool& NekRSProblemBase::_nondimensional
protectedinherited

Whether the nekRS solution is performed in nondimensional scales.

If nekRS is solving in non-dimensional form, this means that the nekRS solution is performed for:

  • nondimensional temperature \(T^\dagger\), defined as \(T^\dagger=\frac{T-T_{ref}}{\Delta T_{ref}}\). The 'T_ref' and 'dT_ref' variables here represent these scales.
  • nondimensional velocity \(U^\dagger=\frac{u}{U_{ref}}\). The 'U_ref' variable here represents this velocity scale.
  • nondimensional pressure \(P^dagger=\frac{P}{\rho_{0}U_{ref}^2}\). The 'rho_0' variable here represents this density parameter.

In terms of heat flux boundary conditions, the entire energy conservation equation in nekRS is multiplied by \(\frac{L_{ref}}{\rho_{0}C_{p,0}U_{ref}\Delta T_{ref}}\) in order to clear the coefficient on the convective. Therefore, the heat source in nekRS is expressed in nondimensional form as \(q^\dagger=\frac{q}{\rho_{0}C_{p,0}U_{ref}\Delta T_{ref}}\). Here, 'Cp_0' is the specific heat capacity scale.

Unfortunately, there is no systematic way to get these reference scales from nekRS, so we need to inform MOOSE of any possible scaling so that we can appropriately scale the nekRS temperature to the dimensional form that is usually expected in MOOSE. Therefore, these scales just need to match what is used in the nekRS input files used to specify boundary conditions. Conversion between dimensional MOOSE heat flux to dimensionless nekRS heat flux is performed automatically, and does not require any special treatment in the nekRS scalarNeumannBC kernel.

◆ _outputs

const MultiMooseEnum* NekRSProblemBase::_outputs = nullptr
protectedinherited

NekRS solution fields to output to the mesh mirror.

◆ _rho_0

const Real& NekRSProblemBase::_rho_0
protectedinherited

Reference density.

◆ _scratch_counter

unsigned int NekRSProblemBase::_scratch_counter
protectedinherited

Counter for any potential NekScalarValue objects in the input file.

◆ _serialized_solution

std::unique_ptr<NumericVector<Number> > NekRSProblemBase::_serialized_solution
protectedinherited

◆ _skip_final_field_file

const bool& NekRSProblemBase::_skip_final_field_file
protectedinherited

Whether to skip writing a field file on NekRS's last time steo.

◆ _start_time

double NekRSProblemBase::_start_time
protectedinherited

Start time of the simulation based on NekRS's .par file.

◆ _synchronization_interval

synchronization::SynchronizationEnum NekRSProblemBase::_synchronization_interval
protectedinherited

When to synchronize the NekRS solution with the mesh mirror.

This parameter determines when to synchronize the NekRS solution with the mesh mirror - this entails:

  • Mapping from the NekRS spectral element mesh to the finite element mesh mirror, to extract information from NekRS and make it available to MOOSE
  • Mapping from the finite element mesh mirror into the NekRS spectral element mesh, to send information from MOOSE into NekRS

Several options are available:

  • 'constant' will simply keep the NekRS solution and the mesh mirror entirely consistent with one another on a given constant frequency of time steps. By default, the 'constant_interval' is 1, so that NekRS and MOOSE communicate with each other on every single time step
  • 'parent_app' will only send data between NekRS and a parent application when (1) the main application has just sent "new" information to NekRS, and when (2) the main application is just about to run a new time step (with updated BCs/source terms from NekRS).

    nekRS is often subcycled relative to the application controlling it - that is, nekRS may be run with a time step 10x smaller than a conduction MOOSE app. If 'interpolate_transfers = false' in the master application, then the data going into nekRS is fixed for each of the subcycled time steps it takes, so these extra data transfers are completely unnecssary. This flag indicates that the information sent from MOOSE to NekRS should only be updated if the data from MOOSE is "new", and likewise whether the NekRS solution should only be interpolated to the mesh mirror once MOOSE is actually "ready" to solve a time step using it.

    NOTE: if 'interpolate_transfers = true' in the master application, then the data coming into nekRS is unique on each subcycled time step, so setting this to true will in effect override interpolate_transfers to be false. For the best performance, you should set interpolate_transfers to false so that you don't even bother computing the interpolated data, since it's not used if this parameter is set to true.

◆ _T_ref

const Real& NekRSProblemBase::_T_ref
protectedinherited

Reference characteristic temperature.

◆ _timestepper

NekTimeStepper* NekRSProblemBase::_timestepper = nullptr
protectedinherited

The time stepper used for selection of time step size.

◆ _transfer_in

const PostprocessorValue* NekRSProblemBase::_transfer_in = nullptr
protectedinherited

Postprocessor containing the signal of when a synchronization has occurred.

◆ _transient_executioner

Transient* NekRSProblemBase::_transient_executioner = nullptr
protectedinherited

Underlying executioner.

◆ _tSolveStepMax

double NekRSProblemBase::_tSolveStepMax
protectedinherited

Maximum step solve time.

◆ _tSolveStepMin

double NekRSProblemBase::_tSolveStepMin
protectedinherited

Minimum step solve time.

◆ _U_ref

const Real& NekRSProblemBase::_U_ref
protectedinherited

Reference characteristic velocity.

◆ _usrwrk_indices

std::vector<std::string> NekRSProblemBase::_usrwrk_indices
protectedinherited

quantities to write to nrs->usrwrk (and the order to write them)

◆ _usrwrk_output

const std::vector<unsigned int>* NekRSProblemBase::_usrwrk_output = nullptr
protectedinherited

Slots in the nrs->o_usrwrk array to write to a field file.

◆ _usrwrk_output_prefix

const std::vector<std::string>* NekRSProblemBase::_usrwrk_output_prefix = nullptr
protectedinherited

Filename prefix to use for naming the field files containing the nrs->o_usrwrk array slots.

◆ _var_names

std::vector<std::string> NekRSProblemBase::_var_names
protectedinherited

Names of external variables when extracting the NekRS solution.

◆ _var_string

std::string NekRSProblemBase::_var_string
protectedinherited

Descriptive string for the variables extracted from NekRS.

◆ _volume

bool NekRSProblemBase::_volume
protectedinherited

Whether the mesh contains volume-based coupling.

◆ _write_fld_files

const bool& NekRSProblemBase::_write_fld_files
protectedinherited

Whether to disable output file writing by NekRS and replace it by output file writing in Cardinal. Suppose the case name is 'channel'. If this parameter is false, then NekRS will write output files as usual, with names like channel0.f00001 for write step 1, channel0.f00002 for write step 2, and so on. If true, then NekRS itself does not output any files like this, and instead output files are written with names a01channel0.f00001, a01channel0.f00002 (for first Nek app), a02channel0.f00001, a02channel0.f00002 (for second Nek app), and so on. This feature should only be used when running repeated Nek sub apps so that the output from each app is retained. Otherwise, if running N repeated Nek sub apps, only a single output file is obtained because each app overwrites the output files of the other apps in the order that the apps reach the nekrs::outfld function.


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