OpenImpala
Image-based parallel transport property solver
Loading...
Searching...
No Matches
CathodeWrite.H
Go to the documentation of this file.
1
4#ifndef CATHODE_WRITE_H // Corrected and styled header guard
5#define CATHODE_WRITE_H
6
7#include <AMReX_REAL.H>
8#include <string>
9#include <vector> // Often useful for parameters like stoichiometric ranges, etc.
10// #include <map> // May be needed depending on parameter complexity
11
12namespace OpenImpala { // Wrap in project namespace
13
24 // Example parameters - ADD ALL NECESSARY PARAMETERS HERE
25 amrex::Real volume_fraction_solid = 0.5; // [-] Volume fraction of active material
26 amrex::Real particle_radius = 5e-6; // [m] Average particle radius
27 amrex::Real active_material_conductivity = 100.0; // [S/m] Solid phase conductivity
28 amrex::Real max_concentration = 51000.0; // [mol/m^3] Max concentration in solid
29 // Add diffusivity, reaction rates, porosity (1-vf), Bruggeman coeffs, etc.
30 // Add thermal parameters if needed.
31 // Add stoichiometric coefficients/ranges if needed.
32
33 // Constructor (optional, can use aggregate initialization)
34 CathodeParams() = default;
35};
36
37
46public:
55 explicit CathodeWrite(const CathodeParams& params); // Use explicit
56
60 virtual ~CathodeWrite() = default;
61
62 // --- Deleted Copy Operations ---
63 // Prevent copying; writer is configured at construction.
64 CathodeWrite(const CathodeWrite&) = delete;
66
74 const std::string& filename) const; // Mark const if state doesn't change
75
82 bool
83 writePyBammParameters(const std::string& filename) const; // Mark const if state doesn't change
84
85private:
86 // --- Member Variables ---
87 // Store copies of parameters needed for writing files.
88 // Mark 'const' if they are immutable after construction.
89 // Example parameters (match CathodeParams):
90 const amrex::Real m_vf_solid;
91 const amrex::Real m_particle_radius;
92 const amrex::Real m_conductivity;
93 const amrex::Real m_max_concentration;
94 // Add other stored parameters corresponding to CathodeParams
95
96 // Internal helper methods could go here if needed
97};
98
99} // namespace OpenImpala
100
101#endif // CATHODE_WRITE_H
virtual ~CathodeWrite()=default
Virtual default destructor. Important if inheriting.
CathodeWrite(const CathodeWrite &)=delete
CathodeWrite & operator=(const CathodeWrite &)=delete
bool writePyBammParameters(const std::string &filename) const
Writes a parameter file compatible with the PyBamm model.
Definition CathodeWrite.cpp:109
bool writeDandeLiionParameters(const std::string &filename) const
Writes a parameter file compatible with the DandeLiion model.
Definition CathodeWrite.cpp:34
CathodeWrite(const CathodeParams &params)
Constructs the CathodeWrite object using provided parameters.
Definition CathodeWrite.cpp:15
Definition CathodeWrite.cpp:12
Structure to hold cathode material and electrode parameters.
Definition CathodeWrite.H:23
amrex::Real particle_radius
Definition CathodeWrite.H:26
amrex::Real volume_fraction_solid
Definition CathodeWrite.H:25
amrex::Real active_material_conductivity
Definition CathodeWrite.H:27
amrex::Real max_concentration
Definition CathodeWrite.H:28