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 {
26namespace CdrPlasma {
27
32{
33public:
37 using NumberDensityFunction = std::function<Real(const RealVect a_pos)>;
38
43
50 NeutralSpeciesJSON(const std::string& a_name, const Real a_molarFraction, const NumberDensityFunction& a_function);
51
56
63 void
64 define(const std::string& a_name, const Real a_molarFraction, const NumberDensityFunction& a_function);
65
71 Real
72 operator()(const RealVect& a_pos) const;
73
78 Real
79 getMolarFraction() const;
80
85 std::string
86 getName() const;
87
88protected:
93
97 std::string m_name;
98
103
108};
109} // namespace CdrPlasma
110} // namespace Physics
111
112#include <CD_NamespaceFooter.H>
113
114#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:107
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:102
bool m_isDefined
Make sure model has initial data.
Definition CD_NeutralSpeciesJSON.H:92
std::string m_name
Neutral species name.
Definition CD_NeutralSpeciesJSON.H:97
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