Flow123d  jenkins-Flow123d-windows32-release-multijob-51
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Isotherm Class Reference

#include <isotherm.hh>

Collaboration diagram for Isotherm:
Collaboration graph
[legend]

Classes

struct  ConcPair
 Pair of soluted and adsorbed concentration. More...
 

Public Types

enum  SorptionType { none = 0, linear = 1, freundlich = 2, langmuir = 3 }
 Type of adsorption isotherm. More...
 

Public Member Functions

void reinit (enum SorptionType sorption_type, bool limited_solubility_on, double aqua_density, double scale_aqua, double scale_sorbed, double c_aqua_limit, double mult_coef, double second_coef)
 
void make_table (int n_points)
 
void compute (double &c_aqua, double &c_sorbed)
 
void interpolate (double &c_aqua, double &c_sorbed)
 
bool is_precomputed (void)
 

Protected Member Functions

template<class Func >
void make_table (const Func &isotherm, int n_points)
 
template<class Func >
ConcPair solve_conc (ConcPair c_pair, const Func &isotherm)
 
ConcPair solve_conc (ConcPair conc)
 
ConcPair compute_projection (ConcPair conc)
 
ConcPair precipitate (ConcPair conc)
 

Protected Attributes

enum SorptionType adsorption_type_
 Type of isotherm. More...
 
double mult_coef_
 Multiplication parameter of the isotherm. More...
 
double second_coef_
 Optional secod parameter of the isotherm. More...
 
double table_limit_
 
bool limited_solubility_on_
 Solubility limit flag. More...
 
double rho_aqua_
 density of the solvent More...
 
double scale_aqua_
 coefficient that convert soluted concentration to mass; porosity = k_W, originally rho_aqua*porosity = k_W More...
 
double scale_sorbed_
 coefficient that convert adsorbed molar concentration to mass; molar_weight * rho_rock * (1 - porosity) = k_H More...
 
double inv_scale_aqua_
 reciprocal values More...
 
double inv_scale_sorbed_
 
vector< double > interpolation_table
 
double total_mass_step_
 

Detailed Description

Class describing one isotherm with possibly precalculated interpolation table.

Definition at line 134 of file isotherm.hh.

Member Enumeration Documentation

Type of adsorption isotherm.

Enumerator
none 
linear 
freundlich 
langmuir 

Definition at line 138 of file isotherm.hh.

Member Function Documentation

void Isotherm::compute ( double &  c_aqua,
double &  c_sorbed 
)
inline

Direct calculation of the equilibrium adsorption using a non-linear solver. reinit has to be called just before this method.

Definition at line 314 of file isotherm.hh.

Isotherm::ConcPair Isotherm::compute_projection ( Isotherm::ConcPair  c_pair)
inlineprotected

Update concentrations using interopolation.

Definition at line 340 of file isotherm.hh.

Here is the caller graph for this function:

void Isotherm::interpolate ( double &  c_aqua,
double &  c_sorbed 
)
inline

Use interpolation to determine equilibrium state. Assumes previous call to make_table. If total mass is larger then table limit we either call precipitate (limit_solubility_on) or use direct computation.

Definition at line 328 of file isotherm.hh.

bool Isotherm::is_precomputed ( void  )
inline

Returns true if interpolation table is created.

Definition at line 191 of file isotherm.hh.

void Isotherm::make_table ( int  n_points)

Create interpolation table for isotherm in rotated coordinate system with X axes given by total mass in both phases. Size of the table is the only parameter. Currently we support only linear interpolation. reinit has to be called just before this method.

Definition at line 11 of file isotherm.cc.

template<class Func >
void Isotherm::make_table ( const Func &  isotherm,
int  n_points 
)
protected

Implementation of interpolation construction for particular isotherm functor.

Definition at line 429 of file isotherm.hh.

Isotherm::ConcPair Isotherm::precipitate ( Isotherm::ConcPair  c_pair)
inlineprotected

Modify concentrations after adsorption for limited solubility.

Definition at line 361 of file isotherm.hh.

Here is the caller graph for this function:

void Isotherm::reinit ( enum SorptionType  sorption_type,
bool  limited_solubility_on,
double  aqua_density,
double  scale_aqua,
double  scale_sorbed,
double  c_aqua_limit,
double  mult_coef,
double  second_coef 
)
inline

Setting adsorption parameters for general isotherm. These parameters are then used either for creation of the interpolation table via make_table method or just one adsorption is computed through compute method. Provided parameters are:

Parameters
sorption_type- type of isotherm
limited_solubility_on- true if c_aqua_limit is solubility limit
aqua_density- density of the liquid phase
scale_aqua- generalized porosity, fraction of the space with liquid phase
scale_sorbed- fraction of the space with the solid to which we adsorp
c_aqua_limit- limit for interpolation table, possibly solubility limit
mult_coef- multiplicative coefficient of the isotherm (all isotherms have one)
secodn_coef- possibly second parameter of the isotherm

Definition at line 295 of file isotherm.hh.

Here is the caller graph for this function:

template<class Func >
Isotherm::ConcPair Isotherm::solve_conc ( Isotherm::ConcPair  c_pair,
const Func &  isotherm 
)
inlineprotected

Find new values for concentrations in c_pair that has same total mass and lies on the isotherm (functor object).

Definition at line 370 of file isotherm.hh.

Here is the caller graph for this function:

Isotherm::ConcPair Isotherm::solve_conc ( Isotherm::ConcPair  conc)
inlineprotected

Dispatch isotherm type and use appropriate template.

Definition at line 395 of file isotherm.hh.

Member Data Documentation

enum SorptionType Isotherm::adsorption_type_
protected

Type of isotherm.

Definition at line 225 of file isotherm.hh.

vector<double> Isotherm::interpolation_table
protected

Interpolation table of isotherm in the rotated coordinates. The X axes of rotated system is total mass, the Y axes is perpendicular.

Definition at line 253 of file isotherm.hh.

double Isotherm::inv_scale_aqua_
protected

reciprocal values

Definition at line 248 of file isotherm.hh.

double Isotherm::inv_scale_sorbed_
protected

Definition at line 248 of file isotherm.hh.

bool Isotherm::limited_solubility_on_
protected

Solubility limit flag.

Definition at line 239 of file isotherm.hh.

double Isotherm::mult_coef_
protected

Multiplication parameter of the isotherm.

Definition at line 228 of file isotherm.hh.

double Isotherm::rho_aqua_
protected

density of the solvent

Definition at line 242 of file isotherm.hh.

double Isotherm::scale_aqua_
protected

coefficient that convert soluted concentration to mass; porosity = k_W, originally rho_aqua*porosity = k_W

Definition at line 244 of file isotherm.hh.

double Isotherm::scale_sorbed_
protected

coefficient that convert adsorbed molar concentration to mass; molar_weight * rho_rock * (1 - porosity) = k_H

Definition at line 246 of file isotherm.hh.

double Isotherm::second_coef_
protected

Optional secod parameter of the isotherm.

Definition at line 231 of file isotherm.hh.

double Isotherm::table_limit_
protected

Definition at line 236 of file isotherm.hh.

double Isotherm::total_mass_step_
protected

Step on the rotated X axes (total mass).

Definition at line 257 of file isotherm.hh.


The documentation for this class was generated from the following files: