Cardinal
NekRSSeparateDomainProblem.h
Go to the documentation of this file.
1 /********************************************************************/
2 /* SOFTWARE COPYRIGHT NOTIFICATION */
3 /* Cardinal */
4 /* */
5 /* (c) 2021 UChicago Argonne, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by UChicago Argonne, LLC */
9 /* Under Contract No. DE-AC02-06CH11357 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* Prepared by Battelle Energy Alliance, LLC */
13 /* Under Contract No. DE-AC07-05ID14517 */
14 /* With the U. S. Department of Energy */
15 /* */
16 /* See LICENSE for full restrictions */
17 /********************************************************************/
18 
19 #pragma once
20 
21 #include "NekRSProblemBase.h"
22 #include "NekTimeStepper.h"
23 #include "NekRSMesh.h"
24 #include "Transient.h"
25 
26 #include <memory>
27 
36 {
37 public:
38  NekRSSeparateDomainProblem(const InputParameters & params);
39 
40  static InputParameters validParams();
41 
43 
44  virtual void initialSetup() override;
45 
48 
51 
54  const int scalarId,
55  const double scalarValue);
56 
57  virtual void syncSolutions(ExternalProblem::Direction direction) override;
58 
59  virtual void addExternalVariables() override;
60 
61 protected:
68  void velocity(const nek_mesh::NekMeshEnum pp_mesh, const int elem_id, const double velocity);
69 
76  void temperature(const nek_mesh::NekMeshEnum pp_mesh, const int elem_id, const double temperature);
77 
85  void scalar(const nek_mesh::NekMeshEnum pp_mesh, const int elem_id, const int scalarId, const double scalarValue);
86 
88  const MultiMooseEnum _coupling_type;
89 
91  const std::vector<int> & _outlet_boundary;
92 
94  const std::vector<int> & _inlet_boundary;
95 
98 
101 
103  const MultiMooseEnum _coupled_scalars;
104 
109 
111  const PostprocessorValue * _toNekRS_velocity = nullptr;
112 
114  const PostprocessorValue * _toNekRS_temp = nullptr;
115 
117  const PostprocessorValue * _toNekRS_scalar01 = nullptr;
118  const PostprocessorValue * _toNekRS_scalar02 = nullptr;
119  const PostprocessorValue * _toNekRS_scalar03 = nullptr;
120 
122  const PostprocessorValue * _transfer_in = nullptr;
123 
126 };
const PostprocessorValue * _toNekRS_temp
Temperature boundary condition coming from external App to NekRS.
Definition: NekRSSeparateDomainProblem.h:114
static InputParameters validParams()
const MultiMooseEnum _coupled_scalars
Scalars coupled to NekRS.
Definition: NekRSSeparateDomainProblem.h:103
bool _outlet_coupling
Whether the NekRS outlet boundary feeds BCs to a coupled MOOSE app.
Definition: NekRSSeparateDomainProblem.h:100
bool _scalar02_coupling
Definition: NekRSSeparateDomainProblem.h:107
const PostprocessorValue * _toNekRS_scalar02
Definition: NekRSSeparateDomainProblem.h:118
const nek_mesh::NekMeshEnum _pp_mesh
Which NekRS mesh to act on (always the fluid mesh)
Definition: NekRSSeparateDomainProblem.h:125
bool _scalar01_coupling
Whether the NekRS scalar01-03 are coupled to MOOSE app.
Definition: NekRSSeparateDomainProblem.h:106
const MultiMooseEnum _coupling_type
Type of coupling to apply to NekRS.
Definition: NekRSSeparateDomainProblem.h:88
virtual void addExternalVariables() override
const PostprocessorValue * _toNekRS_scalar03
Definition: NekRSSeparateDomainProblem.h:119
Definition: CardinalEnums.h:47
const std::vector< int > & _inlet_boundary
Boundary ID for NekRS inlet.
Definition: NekRSSeparateDomainProblem.h:94
const PostprocessorValue * _toNekRS_velocity
Velocity boundary condition coming from external App to NekRS.
Definition: NekRSSeparateDomainProblem.h:111
NekRSSeparateDomainProblem(const InputParameters &params)
const PostprocessorValue * _transfer_in
Postprocessor containing the signal of when a synchronization has occurred.
Definition: NekRSSeparateDomainProblem.h:122
void temperature(const nek_mesh::NekMeshEnum pp_mesh, const int elem_id, const double temperature)
NekMeshEnum
Definition: CardinalEnums.h:45
void scalar(const nek_mesh::NekMeshEnum pp_mesh, const int elem_id, const int scalarId, const double scalarValue)
Solve NekRS coupled to 1d thermal hydraulic code.
Definition: NekRSSeparateDomainProblem.h:35
virtual void initialSetup() override
void sendBoundaryTemperatureToNek(const nek_mesh::NekMeshEnum pp_mesh)
Send boundary temperature to nekRS.
const std::vector< int > & _outlet_boundary
Boundary ID for NekRS outlet.
Definition: NekRSSeparateDomainProblem.h:91
virtual void syncSolutions(ExternalProblem::Direction direction) override
void velocity(const nek_mesh::NekMeshEnum pp_mesh, const int elem_id, const double velocity)
Definition: NekRSProblemBase.h:40
bool _scalar03_coupling
Definition: NekRSSeparateDomainProblem.h:108
void sendBoundaryVelocityToNek(const nek_mesh::NekMeshEnum pp_mesh)
Send boundary velocity to nekRS.
void sendBoundaryScalarToNek(const nek_mesh::NekMeshEnum pp_mesh, const int scalarId, const double scalarValue)
Send scalar to NekRS.
const PostprocessorValue * _toNekRS_scalar01
Scalar01-03 boundary condition coming from external App to NekRS.
Definition: NekRSSeparateDomainProblem.h:117
bool _inlet_coupling
Whether the NekRS inlet boundary is fed BCs from a coupled MOOSE app.
Definition: NekRSSeparateDomainProblem.h:97