Loading...
Searching...
No Matches
pairPotential Class Referenceabstract

#include <pairPotential.H>

Inheritance diagram for pairPotential:
Collaboration diagram for pairPotential:

Public Member Functions

 TypeName ("pairPotential")
 Runtime type information.
 declareRunTimeSelectionTable (autoPtr, pairPotential, dictionary,(const word &name, const dictionary &pairPotentialProperties),(name, pairPotentialProperties))
 pairPotential (const word &name, const dictionary &pairPotentialProperties)
 Construct from components.
virtual ~pairPotential ()=default
 Destructor.
void setLookupTables ()
scalar rMin () const
scalar dr () const
scalar rCut () const
scalar rCutSqr () const
scalar energy (const scalar r) const
scalar force (const scalar r) const
List< Pair< scalar > > energyTable () const
List< Pair< scalar > > forceTable () const
bool writeTables () const
virtual scalar unscaledEnergy (const scalar r) const =0
scalar scaledEnergy (const scalar r) const
scalar energyDerivative (const scalar r, const bool scaledEnergyDerivative=true) const
const dictionarypairPotentialProperties () const
bool writeEnergyAndForceTables (Ostream &os) const
virtual bool read (const dictionary &pairPotentialProperties)=0
 Read pairPotential dictionary.

Static Public Member Functions

static autoPtr< pairPotentialNew (const word &name, const dictionary &pairPotentialProperties)
 Return a reference to the selected viscosity model.

Protected Member Functions

void scaleEnergy (scalar &e, const scalar r) const
 pairPotential (const pairPotential &)=delete
 No copy construct.
void operator= (const pairPotential &)=delete
 No copy assignment.

Protected Attributes

word name_
dictionary pairPotentialProperties_
scalar rCut_
scalar rCutSqr_
scalar rMin_
scalar dr_
List< scalar > forceLookup_
List< scalar > energyLookup_
energyScalingFunctionesfPtr_
bool writeTables_

Detailed Description

Source files

Definition at line 56 of file pairPotential.H.

Constructor & Destructor Documentation

◆ pairPotential() [1/2]

pairPotential ( const pairPotential & )
protecteddelete

◆ pairPotential() [2/2]

pairPotential ( const word & name,
const dictionary & pairPotentialProperties )

Construct from components.

Definition at line 51 of file pairPotential.C.

References dr_, energyLookup_, esfPtr_, forceLookup_, Foam::name(), name_, pairPotentialProperties(), pairPotentialProperties_, rCut_, rCutSqr_, rMin_, and writeTables_.

Here is the call graph for this function:

◆ ~pairPotential()

virtual ~pairPotential ( )
virtualdefault

Destructor.

Member Function Documentation

◆ scaleEnergy()

void scaleEnergy ( scalar & e,
const scalar r ) const
protected

Definition at line 35 of file pairPotential.C.

References e, esfPtr_, name_, energyScalingFunction::New(), and pairPotentialProperties_.

Referenced by scaledEnergy().

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

◆ operator=()

void operator= ( const pairPotential & )
protecteddelete

No copy assignment.

References pairPotential().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "pairPotential" )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr ,
pairPotential ,
dictionary ,
(const word &name, const dictionary &pairPotentialProperties) ,
(name, pairPotentialProperties)  )

References Foam::name(), pairPotential(), and pairPotentialProperties().

Here is the call graph for this function:

◆ New()

Foam::autoPtr< Foam::pairPotential > New ( const word & name,
const dictionary & pairPotentialProperties )
static

Return a reference to the selected viscosity model.

Definition at line 27 of file pairPotentialNew.C.

References dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, Foam::Info, Foam::name(), and Foam::nl.

Here is the call graph for this function:

◆ setLookupTables()

void setLookupTables ( )

◆ rMin()

Foam::scalar rMin ( ) const
inline

Definition at line 23 of file pairPotentialI.H.

References rMin_.

◆ dr()

Foam::scalar dr ( ) const
inline

Definition at line 29 of file pairPotentialI.H.

References dr_.

◆ rCut()

Foam::scalar rCut ( ) const
inline

Definition at line 35 of file pairPotentialI.H.

References rCut_.

◆ rCutSqr()

Foam::scalar rCutSqr ( ) const
inline

Definition at line 41 of file pairPotentialI.H.

References rCutSqr_.

◆ energy()

Foam::scalar energy ( const scalar r) const

Definition at line 126 of file pairPotential.C.

References Foam::abort(), dr_, e, energyLookup_, Foam::FatalError, FatalErrorInFunction, k, name_, Foam::nl, and rMin_.

Here is the call graph for this function:

◆ force()

Foam::scalar force ( const scalar r) const

Definition at line 89 of file pairPotential.C.

References Foam::abort(), dr_, f(), Foam::FatalError, FatalErrorInFunction, forceLookup_, k, name_, Foam::nl, and rMin_.

Here is the call graph for this function:

◆ energyTable()

Foam::List< Foam::Pair< Foam::scalar > > energyTable ( ) const

Definition at line 148 of file pairPotential.C.

References dr_, energyLookup_, UList< T >::first(), forAll, k, and rMin_.

Referenced by writeEnergyAndForceTables().

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

◆ forceTable()

Foam::List< Foam::Pair< Foam::scalar > > forceTable ( ) const

Definition at line 111 of file pairPotential.C.

References dr_, UList< T >::first(), forAll, forceLookup_, k, and rMin_.

Referenced by writeEnergyAndForceTables().

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

◆ writeTables()

bool writeTables ( ) const
inline

Definition at line 47 of file pairPotentialI.H.

References writeTables_.

◆ unscaledEnergy()

virtual scalar unscaledEnergy ( const scalar r) const
pure virtual

Implemented in azizChen, coulomb, dampedCoulomb, exponentialRepulsion, lennardJones, maitlandSmith, and noInteraction.

Referenced by energyDerivative(), and scaledEnergy().

Here is the caller graph for this function:

◆ scaledEnergy()

Foam::scalar scaledEnergy ( const scalar r) const

Definition at line 163 of file pairPotential.C.

References e, scaleEnergy(), and unscaledEnergy().

Referenced by energyDerivative(), and setLookupTables().

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

◆ energyDerivative()

Foam::scalar energyDerivative ( const scalar r,
const bool scaledEnergyDerivative = true ) const

Definition at line 173 of file pairPotential.C.

References dr_, Ea(), scaledEnergy(), and unscaledEnergy().

Referenced by setLookupTables().

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

◆ pairPotentialProperties()

◆ writeEnergyAndForceTables()

bool writeEnergyAndForceTables ( Ostream & os) const

Definition at line 24 of file pairPotentialIO.C.

References e, Foam::endl(), energyTable(), UList< T >::first(), forAll, forceTable(), Foam::Info, name_, Foam::nl, os(), and token::SPACE.

Here is the call graph for this function:

◆ read()

bool read ( const dictionary & pairPotentialProperties)
pure virtual

Read pairPotential dictionary.

Implemented in azizChen, coulomb, dampedCoulomb, exponentialRepulsion, lennardJones, maitlandSmith, and noInteraction.

Definition at line 217 of file pairPotential.C.

References pairPotentialProperties(), and pairPotentialProperties_.

Referenced by azizChen::read(), coulomb::read(), dampedCoulomb::read(), exponentialRepulsion::read(), lennardJones::read(), maitlandSmith::read(), and noInteraction::read().

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

Member Data Documentation

◆ name_

word name_
protected

Definition at line 63 of file pairPotential.H.

Referenced by energy(), force(), pairPotential(), scaleEnergy(), and writeEnergyAndForceTables().

◆ pairPotentialProperties_

dictionary pairPotentialProperties_
protected

Definition at line 64 of file pairPotential.H.

Referenced by pairPotential(), pairPotentialProperties(), read(), and scaleEnergy().

◆ rCut_

scalar rCut_
protected

Definition at line 66 of file pairPotential.H.

Referenced by pairPotential(), rCut(), and setLookupTables().

◆ rCutSqr_

scalar rCutSqr_
protected

Definition at line 67 of file pairPotential.H.

Referenced by pairPotential(), and rCutSqr().

◆ rMin_

scalar rMin_
protected

◆ dr_

scalar dr_
protected

◆ forceLookup_

List<scalar> forceLookup_
protected

Definition at line 72 of file pairPotential.H.

Referenced by force(), forceTable(), pairPotential(), and setLookupTables().

◆ energyLookup_

List<scalar> energyLookup_
protected

Definition at line 73 of file pairPotential.H.

Referenced by energy(), energyTable(), pairPotential(), and setLookupTables().

◆ esfPtr_

energyScalingFunction* esfPtr_
mutableprotected

Definition at line 75 of file pairPotential.H.

Referenced by pairPotential(), and scaleEnergy().

◆ writeTables_

bool writeTables_
protected

Definition at line 77 of file pairPotential.H.

Referenced by pairPotential(), and writeTables().


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