Foam::units Namespace Reference

Functions

unitSet newFraction ()
 
unitSet newPercent ()
 
unitSet newRadians ()
 
unitSet newRotations ()
 
unitSet newDegrees ()
 
const HashTable< unitSet > & table ()
 Get the table of unit conversions. More...
 
void add (const word &name, const unitSet &unit)
 Add a unit conversion. More...
 
const unitSetlookup (const word &unitName)
 Lookup and return the named unit from the table. More...
 
void setLength (const unitSet &length)
 Set the length scale to the given unit set. More...
 
void setLength (const scalar length)
 Set the length scale to the given value. More...
 

Variables

unitSet length_ (dimensionSet(0, 1, 0, 0, 0), 0, 0, 1)
 
const unitSet unitless
 
const unitSet any
 
const unitSet none
 
const unitSet fraction
 
const unitSet percent
 
const unitSet radians
 
const unitSet rotations
 
const unitSet degrees
 
const unitSetlength = Foam::units::length_
 

Function Documentation

◆ newFraction()

unitSet Foam::units::newFraction ( )

Definition at line 92 of file units.C.

◆ newPercent()

unitSet Foam::units::newPercent ( )

Definition at line 97 of file units.C.

Referenced by table().

Here is the caller graph for this function:

◆ newRadians()

unitSet Foam::units::newRadians ( )

Definition at line 102 of file units.C.

Referenced by table().

Here is the caller graph for this function:

◆ newRotations()

unitSet Foam::units::newRotations ( )

Definition at line 107 of file units.C.

References Foam::constant::mathematical::pi().

Referenced by table().

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

◆ newDegrees()

unitSet Foam::units::newDegrees ( )

Definition at line 112 of file units.C.

References Foam::constant::mathematical::pi().

Referenced by table().

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

◆ table()

◆ add()

void add ( const word name,
const unitSet unit 
)

Add a unit conversion.

Definition at line 331 of file units.C.

References Foam::addedUnitsPtr_(), Foam::deleteDemandDrivenData(), Foam::name(), Foam::unitsDictPtr_(), and Foam::unitsPtr_().

Referenced by engine::engine(), and engine::read().

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

◆ lookup()

◆ setLength() [1/2]

void setLength ( const unitSet length)

Set the length scale to the given unit set.

Definition at line 352 of file units.C.

References Foam::dimensions::length, length_, and unitSet::reset().

Here is the call graph for this function:

◆ setLength() [2/2]

void setLength ( const scalar  length)

Set the length scale to the given value.

Definition at line 358 of file units.C.

References Foam::dimLength, Foam::dimensions::length, length_, and unitSet::reset().

Here is the call graph for this function:

Variable Documentation

◆ length_

◆ unitless

◆ any

◆ none

◆ fraction

const Foam::unitSet fraction
extern

Referenced by coupledTemperatureFvPatchScalarField::coupledTemperatureFvPatchScalarField(), CrankNicolsonDdtScheme< Type >::CrankNicolsonDdtScheme(), LagrangianMesh::crossFaces(), reboundVelocityLagrangianPatchVectorField::evaluate(), stickVelocityLagrangianPatchVectorField::evaluate(), emptyLagrangianPatchField< Type >::evaluate(), processorCyclicLagrangianPatchField< Type >::evaluate(), symmetryLagrangianPatchField< Type >::evaluate(), symmetryPlaneLagrangianPatchField< Type >::evaluate(), cloudVelocityLagrangianPatch::evaluate(), nonConformalCyclicLagrangianPatch::evaluate(), nonConformalProcessorCyclicLagrangianPatch::evaluate(), processorLagrangianPatch::evaluate(), wedgeLagrangianPatch::evaluate(), externalTemperatureFvPatchScalarField::externalTemperatureFvPatchScalarField(), GodaJONSWAP::fFraction(), JONSWAP::fFraction(), PiersonMoskowitz::fFraction(), waveSpectrum::fFraction(), Foam::tracking::toCell< Foam::Pair< Foam::vector > >(), Foam::tracking::toFace< Foam::Pair< Foam::vector > >(), greyDiffusiveRadiationMixedFvPatchScalarField::greyDiffusiveRadiationMixedFvPatchScalarField(), particle::hitFace(), streamlinesParticle::hitNonConformalCyclicPatch(), particle::hitNonConformalCyclicPatch(), MomentumParcel< ParcelType >::hitNonConformalCyclicPatch(), nonConformalProcessorCyclicLagrangianPatch::initEvaluate(), processorLagrangianPatch::initEvaluate(), Square< Type >::integral(), LagrangianMesh::locate(), maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField(), mixedFvPatchField< Type >::mixedFvPatchField(), diskInjection::modify(), manualInjection::modify(), patchInjection::modify(), pointInjection::modify(), volumeInjection::modify(), LagrangianSubMesh::nf(), SprayCloud< CloudType >::penetration(), cloudFunctionObjectUList::postCrossFaces(), cloudBoundaryCollisionFlux::postCrossFaces(), cloudFlux::postCrossFaces(), cloudPosition::postCrossFaces(), cloudSurfaceDistribution::postCrossFaces(), cloudFunctionObjectUList::preCrossFaces(), cloudFlux::preCrossFaces(), radiationCoupledBase::radiationCoupledBase(), nonConformalCyclicPolyPatch::ray(), fvMatrix< Type >::setValue(), cloud::solve(), rays::srcToTgtRay(), rays::tgtToSrcRay(), thermalBaffle1DFvPatchScalarField< solidType >::thermalBaffle1DFvPatchScalarField(), Foam::tracking::toMovingTri(), Foam::tracking::toStationaryTri(), LagrangianMesh::track(), particle::track(), particle::trackToAndHitFace(), particle::trackToCell(), particle::trackToFace(), LagrangianSubMesh::Uf(), unitSet::unitSet(), ReitzDiwakar< CloudType >::update(), ReitzKHRT< CloudType >::update(), plenumPressureFvPatchScalarField::updateCoeffs(), Square< Type >::value(), and wideBandDiffusiveRadiationMixedFvPatchScalarField::wideBandDiffusiveRadiationMixedFvPatchScalarField().

◆ percent

const Foam::unitSet percent
extern

◆ radians

◆ rotations

const Foam::unitSet rotations
extern

◆ degrees

◆ length

const Foam::unitSet & length = Foam::units::length_
extern

Definition at line 137 of file units.C.