chombo-discharge
Loading...
Searching...
No Matches
CD_NeutralSpeciesJSON.H
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2022-2026 SINTEF Energy Research
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
13#ifndef CD_NEUTRALSPECIESJSON_H
14#define CD_NEUTRALSPECIESJSON_H
15
16// Std includes
17#include <list>
18
19// Chombo includes
20#include <RealVect.H>
21
22// Our includes
23#include <CD_NamespaceHeader.H>
24
25namespace Physics {
26 namespace CdrPlasma {
27
32 {
33 public:
37 using NumberDensityFunction = std::function<Real(const RealVect a_pos)>;
38
43
50 NeutralSpeciesJSON(const std::string& a_name,
51 const Real a_molarFraction,
52 const NumberDensityFunction& a_function);
53
58
65 void
66 define(const std::string& a_name, const Real a_molarFraction, const NumberDensityFunction& a_function);
67
73 Real
74 operator()(const RealVect& a_pos) const;
75
80 Real
81 getMolarFraction() const;
82
87 std::string
88 getName() const;
89
90 protected:
95
99 std::string m_name;
100
105
110 };
111 } // namespace CdrPlasma
112} // namespace Physics
113
114#include <CD_NamespaceFooter.H>
115
116#endif
Encapsulation of species settings and initial conditiosn for use with CdrPlasma. This is for tracked ...
Definition CD_NeutralSpeciesJSON.H:32
std::string getName() const
Get the species name.
Definition CD_NeutralSpeciesJSON.cpp:42
Real operator()(const RealVect &a_pos) const
Get (number) density at the physical coordinates.
Definition CD_NeutralSpeciesJSON.cpp:54
void define(const std::string &a_name, const Real a_molarFraction, const NumberDensityFunction &a_function)
Full constructor. Calls the define function.
Definition CD_NeutralSpeciesJSON.cpp:32
NeutralSpeciesJSON()
Default constructor. Must subsequently call define.
Definition CD_NeutralSpeciesJSON.cpp:19
NumberDensityFunction m_function
Initial data function. Set by CdrPlasmaGenericModel.
Definition CD_NeutralSpeciesJSON.H:109
std::function< Real(const RealVect a_pos)> NumberDensityFunction
Alias for initial data function.
Definition CD_NeutralSpeciesJSON.H:37
virtual ~NeutralSpeciesJSON()
Destructor.
Real m_molarFraction
Molar fraction.
Definition CD_NeutralSpeciesJSON.H:104
bool m_isDefined
Make sure model has initial data.
Definition CD_NeutralSpeciesJSON.H:94
std::string m_name
Neutral species name.
Definition CD_NeutralSpeciesJSON.H:99
Real getMolarFraction() const
Get the molar fraction.
Definition CD_NeutralSpeciesJSON.cpp:48
Namespace containing physics models for use with chombo-discharge.
Definition CD_AdvectionDiffusion.H:16