https://mooseframework.inl.gov
Loading...
Searching...
No Matches
GeochemistryUnitConverter.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include "MooseTypes.h"
14
19{
21{
23 MOLES,
24 MOLAL,
25 KG,
26 G,
27 MG,
28 UG,
33 CM3
34};
35
51Real fromMoles(Real moles,
52 const GeochemistryUnit unit,
53 const std::string & species_name,
55
73Real toMoles(Real quantity,
74 const GeochemistryUnit unit,
75 const std::string & species_name,
77
97 unsigned ind,
98 const std::string & name,
99 const std::vector<Real> & mol_weight,
100 const std::vector<Real> & mol_volume,
101 const std::vector<bool> & is_mineral);
102}
const ModelGeochemicalDatabase mgd
const std::string name
Definition Setup.h:21
Utilities to convert to and from mole units.
Real fromMoles(Real moles, const GeochemistryUnit unit, const std::string &species_name, const ModelGeochemicalDatabase &mgd)
Calculates the amount of "unit"s of species_name in 1 mole, OR in 1 molal, whichever is appropriate.
Real conversionFactor(const GeochemistryUnit unit, unsigned ind, const std::string &name, const std::vector< Real > &mol_weight, const std::vector< Real > &mol_volume, const std::vector< bool > &is_mineral)
Calculates the number of "unit" in 1 mole of substance, OR calculates the number of "unit" in 1 molal...
Real toMoles(Real quantity, const GeochemistryUnit unit, const std::string &species_name, const ModelGeochemicalDatabase &mgd)
Calculates the amount of moles corresponding to "quantity" "unit"s of species name,...
Data structure to hold all relevant information from the database file.