Loading...
Searching...
No Matches
binaryNode< CompType, ThermoType > Class Template Reference

Node of the binary tree. More...

#include <binaryNode.H>

Collaboration diagram for binaryNode< CompType, ThermoType >:

Public Member Functions

void calcV (chemPointISAT< CompType, ThermoType > *&elementLeft, chemPointISAT< CompType, ThermoType > *&elementRight, scalarField &v)
 Compute vector v:
scalar calcA (chemPointISAT< CompType, ThermoType > *elementLeft, chemPointISAT< CompType, ThermoType > *elementRight)
 Compute a the product v^T.phih, with phih = (phi0 + phiq)/2.
 binaryNode ()
 Construct null.
 binaryNode (chemPointISAT< CompType, ThermoType > *elementLeft, chemPointISAT< CompType, ThermoType > *elementRight, binaryNode< CompType, ThermoType > *parent)
 Construct from components.
chemPointISAT< CompType, ThermoType > *& leafLeft ()
 Access.
chemPointISAT< CompType, ThermoType > *& leafRight ()
binaryNode< CompType, ThermoType > *& nodeLeft ()
binaryNode< CompType, ThermoType > *& nodeRight ()
binaryNode< CompType, ThermoType > *& parent ()
const scalarFieldv () const
 Topology.
scalarFieldv ()
const scalar & a () const
scalar & a ()

Public Attributes

chemPointISAT< CompType, ThermoType > * leafLeft_
 Element on the left.
chemPointISAT< CompType, ThermoType > * leafRight_
 Element on the right.
binaryNode< CompType, ThermoType > * nodeLeft_
 Node which follows on the left.
binaryNode< CompType, ThermoType > * nodeRight_
 Node which follows on the right.
binaryNode< CompType, ThermoType > * parent_
 Parent node.
label nAdditionalEqns_
 Number of equations in addition to the species eqs.
scalarField v_
scalar a_

Detailed Description

template<class CompType, class ThermoType>
class Foam::binaryNode< CompType, ThermoType >

Node of the binary tree.

SourceFile binaryNode.C

Definition at line 45 of file binaryNode.H.

Constructor & Destructor Documentation

◆ binaryNode() [1/2]

template<class CompType, class ThermoType>
binaryNode ( )

Construct null.

Definition at line 26 of file binaryNode.C.

References leafLeft_, leafRight_, nAdditionalEqns_, nodeLeft_, nodeRight_, and parent_.

Referenced by binaryNode(), nodeLeft(), nodeRight(), and parent().

Here is the caller graph for this function:

◆ binaryNode() [2/2]

template<class CompType, class ThermoType>
binaryNode ( chemPointISAT< CompType, ThermoType > * elementLeft,
chemPointISAT< CompType, ThermoType > * elementRight,
binaryNode< CompType, ThermoType > * parent )

Construct from components.

Definition at line 38 of file binaryNode.C.

References a_, binaryNode(), calcA(), calcV(), leafLeft_, leafRight_, nodeLeft_, nodeRight_, parent(), parent_, v_, and chemPointISAT< CompType, ThermoType >::variableTimeStep().

Here is the call graph for this function:

Member Function Documentation

◆ calcV()

template<class CompType, class ThermoType>
void calcV ( chemPointISAT< CompType, ThermoType > *& elementLeft,
chemPointISAT< CompType, ThermoType > *& elementRight,
scalarField & v )

Compute vector v:

Let E be the ellipsoid which covers the region of accuracy of the left leaf (previously defined). E is described by E={phi| ||L^T.(phi-phi0)|| <= 1}, (see chemPoint for more details). let E' be the transformation of E in a space where E' is a hypersphere centered at the origin, in this space y=L^T.(phi-phi0) and then E'={y| ||y||<=1} let u be the unit vector joining the center of E' and the newly added composition point in the transformed space (y2=L^T.(phiq-phi0)),u = y2/||y2| Then the hyperplane separating the two points is defined as the perpendicular bisector of the segment linking 0 to y2 H' = {y| u^T.(y-yh) = 0}, where yh = y2/2. In the original composition space, the hyperplane H is defined by H = {y| v^T(phi-phih) = 0}, where phih = phi0 + L^-T.yh = (phi0 + phiq) / 2 and v is L.L^T (phiq-phi0) v = ——————– . ||L.L^T (phiq-phi0)||

Note : v is not normalised in this implementation since it is used on both side of an equality to know if one should go on the left or the right in the binary tree Parameter: elementLeft : chemPoint of the left element elementRight: chemPoint of the right element v : empty scalar field to store v Return: void (v is stored in the empty scalarField)

Definition at line 69 of file binaryNode.C.

References chemPointISAT< CompType, ThermoType >::chemistry(), chemPointISAT< CompType, ThermoType >::completeSpaceSize(), chemPointISAT< CompType, ThermoType >::completeToSimplifiedIndex(), k, chemPointISAT< CompType, ThermoType >::LT(), TDACChemistryModel< ReactionThermo, ThermoType >::mechRed(), Foam::min(), chemPointISAT< CompType, ThermoType >::nActiveSpecies(), nAdditionalEqns_, chemPointISAT< CompType, ThermoType >::phi(), chemPointISAT< CompType, ThermoType >::scaleFactor(), Foam::sqr(), chemPointISAT< CompType, ThermoType >::tolerance(), and v().

Referenced by binaryNode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calcA()

template<class CompType, class ThermoType>
Foam::scalar calcA ( chemPointISAT< CompType, ThermoType > * elementLeft,
chemPointISAT< CompType, ThermoType > * elementRight )

Compute a the product v^T.phih, with phih = (phi0 + phiq)/2.

When travelling in the binary tree, to know in which part of the composition space the query point 'phi' belongs to, v^T.phi is performed. If the result is "> a" then it belongs to the right part (where phiq is), otherwise it belongs to the left part (where phi0 is).

Definition at line 156 of file binaryNode.C.

References a(), forAll, chemPointISAT< CompType, ThermoType >::phi(), and v_.

Referenced by binaryNode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ leafLeft()

template<class CompType, class ThermoType>
chemPointISAT< CompType, ThermoType > *& leafLeft ( )
inline

Access.

Definition at line 162 of file binaryNode.H.

References leafLeft_.

Referenced by binaryTree< CompType, ThermoType >::treeMin().

Here is the caller graph for this function:

◆ leafRight()

template<class CompType, class ThermoType>
chemPointISAT< CompType, ThermoType > *& leafRight ( )
inline

Definition at line 167 of file binaryNode.H.

References leafRight_.

◆ nodeLeft()

template<class CompType, class ThermoType>
binaryNode< CompType, ThermoType > *& nodeLeft ( )
inline

Definition at line 172 of file binaryNode.H.

References binaryNode(), and nodeLeft_.

Referenced by binaryTree< CompType, ThermoType >::depth(), and binaryTree< CompType, ThermoType >::treeMin().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nodeRight()

template<class CompType, class ThermoType>
binaryNode< CompType, ThermoType > *& nodeRight ( )
inline

Definition at line 177 of file binaryNode.H.

References binaryNode(), and nodeRight_.

Referenced by binaryTree< CompType, ThermoType >::depth().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parent()

template<class CompType, class ThermoType>
binaryNode< CompType, ThermoType > *& parent ( )
inline

Definition at line 182 of file binaryNode.H.

References binaryNode(), and parent_.

Referenced by binaryNode(), and binaryTree< CompType, ThermoType >::deleteLeaf().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ v() [1/2]

template<class CompType, class ThermoType>
const scalarField & v ( ) const
inline

Topology.

Definition at line 191 of file binaryNode.H.

References v_.

Referenced by calcV().

Here is the caller graph for this function:

◆ v() [2/2]

template<class CompType, class ThermoType>
scalarField & v ( )
inline

Definition at line 196 of file binaryNode.H.

References v_.

◆ a() [1/2]

template<class CompType, class ThermoType>
const scalar & a ( ) const
inline

Definition at line 201 of file binaryNode.H.

References a_.

Referenced by calcA().

Here is the caller graph for this function:

◆ a() [2/2]

template<class CompType, class ThermoType>
scalar & a ( )
inline

Definition at line 206 of file binaryNode.H.

References a_.

Member Data Documentation

◆ leafLeft_

template<class CompType, class ThermoType>
chemPointISAT<CompType, ThermoType>* leafLeft_

Element on the left.

Definition at line 53 of file binaryNode.H.

Referenced by binaryNode(), binaryNode(), and leafLeft().

◆ leafRight_

template<class CompType, class ThermoType>
chemPointISAT<CompType, ThermoType>* leafRight_

Element on the right.

Definition at line 58 of file binaryNode.H.

Referenced by binaryNode(), binaryNode(), and leafRight().

◆ nodeLeft_

template<class CompType, class ThermoType>
binaryNode<CompType, ThermoType>* nodeLeft_

Node which follows on the left.

Definition at line 63 of file binaryNode.H.

Referenced by binaryNode(), binaryNode(), and nodeLeft().

◆ nodeRight_

template<class CompType, class ThermoType>
binaryNode<CompType, ThermoType>* nodeRight_

Node which follows on the right.

Definition at line 68 of file binaryNode.H.

Referenced by binaryNode(), binaryNode(), and nodeRight().

◆ parent_

template<class CompType, class ThermoType>
binaryNode<CompType, ThermoType>* parent_

Parent node.

Definition at line 73 of file binaryNode.H.

Referenced by binaryNode(), binaryNode(), and parent().

◆ nAdditionalEqns_

template<class CompType, class ThermoType>
label nAdditionalEqns_

Number of equations in addition to the species eqs.

Definition at line 78 of file binaryNode.H.

Referenced by binaryNode(), and calcV().

◆ v_

template<class CompType, class ThermoType>
scalarField v_

Definition at line 80 of file binaryNode.H.

Referenced by binaryNode(), calcA(), v(), and v().

◆ a_

template<class CompType, class ThermoType>
scalar a_

Definition at line 82 of file binaryNode.H.

Referenced by a(), a(), and binaryNode().


The documentation for this class was generated from the following files:
  • src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryNode/binaryNode.H
  • src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryNode/binaryNode.C