www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PHAux Class Reference

The pH of the solution is defined as. More...

#include <PHAux.h>

Inheritance diagram for PHAux:
[legend]

Public Member Functions

 PHAux (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeValue () override
 

Protected Attributes

const VariableValue & _hplus
 Free molar concentration of H+ ions. More...
 
const VariableValue & _gamma
 Activity coefficient of H+ ions. More...
 

Detailed Description

The pH of the solution is defined as.

pH = - log10(a_H),

where a_H is the activity of the H+ ions, defined as

a_H = gamma C_H,

where gamma is the activity coefficient, and C_H is the molar concentration of free H+ ions in solution

Definition at line 32 of file PHAux.h.

Constructor & Destructor Documentation

◆ PHAux()

PHAux::PHAux ( const InputParameters &  parameters)

Definition at line 25 of file PHAux.C.

26  : AuxKernel(parameters), _hplus(coupledValue("h_conc")), _gamma(coupledValue("activity_coeff"))
27 {
28 }
const VariableValue & _gamma
Activity coefficient of H+ ions.
Definition: PHAux.h:43
const VariableValue & _hplus
Free molar concentration of H+ ions.
Definition: PHAux.h:41

Member Function Documentation

◆ computeValue()

Real PHAux::computeValue ( )
overrideprotectedvirtual

Definition at line 31 of file PHAux.C.

32 {
33  mooseAssert(_gamma[_qp] * _hplus[_qp] > 0.0, "Negative activity in pH is not possible");
34  return -std::log10(_gamma[_qp] * _hplus[_qp]);
35 }
const VariableValue & _gamma
Activity coefficient of H+ ions.
Definition: PHAux.h:43
const VariableValue & _hplus
Free molar concentration of H+ ions.
Definition: PHAux.h:41

Member Data Documentation

◆ _gamma

const VariableValue& PHAux::_gamma
protected

Activity coefficient of H+ ions.

Definition at line 43 of file PHAux.h.

Referenced by computeValue().

◆ _hplus

const VariableValue& PHAux::_hplus
protected

Free molar concentration of H+ ions.

Definition at line 41 of file PHAux.h.

Referenced by computeValue().


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