@@ -40,6 +40,7 @@ class CSpeciesSolver : public CScalarSolver<CSpeciesVariable> {
4040 protected:
4141 unsigned short Inlet_Position; /* !< \brief Column index for scalar variables in inlet files. */
4242 vector<su2activematrix> Inlet_SpeciesVars; /* !< \brief Species variables at inlet profiles. */
43+ su2activematrix SpeciesPointSource; /* !< \brief Value of the Flow Direction. */
4344
4445 public:
4546 /* !
@@ -162,6 +163,16 @@ class CSpeciesSolver : public CScalarSolver<CSpeciesVariable> {
162163 */
163164 void Source_Residual (CGeometry* geometry, CSolver** solver_container, CNumerics** numerics_container, CConfig* config,
164165 unsigned short iMesh) override ;
166+ /* !
167+ * \brief Source term computation for axisymmetric flow.
168+ * \param[in] geometry - Geometrical definition of the problem.
169+ * \param[in] solver_container - Container vector with all the solutions.
170+ * \param[in] numerics_container - Container for description of the numerical method.
171+ * \param[in] config - Definition of the particular problem.
172+ * \param[in] iMesh - Index of the mesh in multigrid computations.
173+ */
174+ void Custom_Source_Residual (CGeometry* geometry, CSolver** solver_container, CNumerics** numerics_container, CConfig* config,
175+ unsigned short iMesh) override ;
165176
166177
167178/* !
@@ -183,4 +194,42 @@ class CSpeciesSolver : public CScalarSolver<CSpeciesVariable> {
183194 },
184195 geometry, solver_container, conv_numerics, visc_numerics, config);
185196 }
197+
198+
199+ /* !
200+ * \brief Set a component of the unit vector representing the flow direction at an inlet boundary.
201+ * \param[in] val_marker - Surface marker where the flow direction is set.
202+ * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the flow direction is set.
203+ * \param[in] val_dim - The component of the flow direction unit vector to be set
204+ * \param[in] val_flowdir - Component of a unit vector representing the flow direction.
205+ */
206+ inline void SetCustomPointSource (unsigned long val_point,
207+ vector<passivedouble> val_source) final {
208+ /* --- Since this call can be accessed indirectly using python, do some error
209+ * checking to prevent segmentation faults ---*/
210+ // cout << "***** set custom point source species *****" << endl;
211+ if (val_point > nPointDomain)
212+ SU2_MPI::Error (" Out-of-bounds point index used on solver." , CURRENT_FUNCTION);
213+ else if (val_source.size () > nVar)
214+ SU2_MPI::Error (" Out-of-bounds source size used on solver." , CURRENT_FUNCTION);
215+ else {
216+ for (size_t iVar=0 ; iVar < val_source.size (); iVar++) {
217+ SpeciesPointSource[val_point][iVar] = val_source[iVar];
218+ // if (SpeciesPointSource[val_point][iVar] > 1.0e-6)
219+ // cout << iVar<<", setcustompointsource: "<< SpeciesPointSource[val_point][iVar] << endl;
220+ }
221+ }
222+ }
223+ /* !
224+ * \brief A component of the unit vector representing the flow direction at an inlet boundary.
225+ * \param[in] val_marker - Surface marker where the flow direction is evaluated
226+ * \param[in] val_vertex - Vertex of the marker <i>val_marker</i> where the flow direction is evaluated
227+ * \param[in] val_dim - The component of the flow direction unit vector to be evaluated
228+ * \return Component of a unit vector representing the flow direction.
229+ */
230+ inline su2double GetCustomPointSource (unsigned long val_point,
231+ unsigned short val_var) const final {
232+ return SpeciesPointSource[val_point][val_var];
233+ }
234+
186235};
0 commit comments