Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F71194935
data_container.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Jul 10, 05:41
Size
3 KB
Mime Type
text/x-c
Expires
Fri, Jul 12, 05:41 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
18919246
Attached To
rSPECMICP SpecMiCP / ReactMiCP
data_container.hpp
View Options
/*-------------------------------------------------------
- Module : database
- File : data_container.hpp
- Author : Fabien Georget
Copyright (c) 2014, Fabien Georget, Princeton University
---------------------------------------------------------*/
#ifndef SPECMICP_DATABASE_DATACONTAINER_HPP
#define SPECMICP_DATABASE_DATACONTAINER_HPP
//! \file data_container.hpp Storage class for thermodynamics database
#include "common_def.hpp"
#include <map>
namespace
specmicp
{
namespace
database
{
//! \brief Storage class - Contains the database
//!
//! - Should not be accessed directly but through interfaces
//! Correct interfaces are subclasses of DatabaseModule
//! - Should be shared with a smart pointer
struct
DataContainer
{
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
DataContainer
()
:
is_canonical
(
false
)
{}
// Basis
// ------
int
nb_component
;
//!< Number of components == size of the basis
vector_labels_t
labels_basis
;
//!< labels of the components
std
::
map
<
std
::
string
,
int
>
map_labels_basis
;
//!< map labels <-> id
data_vector_t
molar_mass_basis
;
//!< molar mass of the basis // (g/mol)
Eigen
::
Matrix
<
double
,
Eigen
::
Dynamic
,
3
>
param_aq
;
//!< Aqueous parameters (both for basis and secondary species)
// Secondary aqueous species
// -------------------------
int
nb_aqueous
;
//!< Number of aqueous species (not taking into acount the basis)
vector_labels_t
labels_aqueous
;
//!< labels of the aqueous species
reaction_mat_t
nu_aqueous
;
//!< Stoechiometric coefficient for aqueous species
logK_vector_t
logk_aqueous
;
//!< LogK for aqueous species
// Minerals
// ---------
int
nb_mineral
;
//!< Number of minerals (used in computation)
vector_labels_t
labels_minerals
;
//!< labels of the minerals
reaction_mat_t
nu_mineral
;
//!< Stoichiometric coefficient for minerals
logK_vector_t
logk_mineral
;
//!< LogK for minerals
data_vector_t
_molar_volume_mineral
;
//!< molar volume of mineral (cm3/mol)
int
nb_mineral_kinetic
;
//!< Number of minerals (governed by kinetics)
vector_labels_t
labels_minerals_kinetic
;
//!< labels of the minerals (governed by kinetics)
reaction_mat_t
nu_mineral_kinetic
;
//!< Stoichiometric coefficient for minerals (governed by kinetics)
logK_vector_t
logk_mineral_kinetic
;
//!< LogK for minerals (governed by kinetics)
data_vector_t
_molar_volume_mineral_kinetic
;
//!< molar volume of mineral (cm3/mol)
// Gas
// ----
int
nb_gas
;
//!< Number of gas
vector_labels_t
labels_gas
;
//!< labels of the gas phase
reaction_mat_t
nu_gas
;
//!< Stoichiometric coefficient for the gas
logK_vector_t
logk_gas
;
//!< log(K) gas
bool
is_canonical
;
// The following functions are provided for convenience
// They provide variables computed from the main data
//! \brief Return the molar mass (kg/mol) of a mineral
double
molar_mass_mineral
(
int
m
);
//! \brief Return the molar mass (kg/mol) of a mineral governed by kinetic
double
molar_mass_mineral_kinetic
(
int
m
);
//! \brief Return the molar volume (m^3/mol) of a mineral
double
molar_volume_mineral
(
int
m
);
//! \brief Return the molar volume (m^3/mol) of a mineral governed by kinetic
double
molar_volume_mineral_kinetic
(
int
m
);
};
}
// end namespace database
}
// end namespace specmicp
#endif
// SPECMICP_DATABASE_DATACONTAINER_HPP
Event Timeline
Log In to Comment