Public Member Functions | List of all members
externalCoupledTemperatureMixedFvPatchScalarField Class Reference

This boundary condition provides a temperatue interface to an external application. More...

Inheritance diagram for externalCoupledTemperatureMixedFvPatchScalarField:
Inheritance graph
[legend]
Collaboration diagram for externalCoupledTemperatureMixedFvPatchScalarField:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("externalCoupledTemperature")
 
 externalCoupledTemperatureMixedFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 
 externalCoupledTemperatureMixedFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 
 externalCoupledTemperatureMixedFvPatchScalarField (const externalCoupledTemperatureMixedFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 
 externalCoupledTemperatureMixedFvPatchScalarField (const externalCoupledTemperatureMixedFvPatchScalarField &)
 
virtual tmp< fvPatchField< scalar > > clone () const
 
 externalCoupledTemperatureMixedFvPatchScalarField (const externalCoupledTemperatureMixedFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 
virtual tmp< fvPatchField< scalar > > clone (const DimensionedField< scalar, volMesh > &iF) const
 
virtual ~externalCoupledTemperatureMixedFvPatchScalarField ()=default
 
virtual void writeHeader (Ostream &os) const
 
virtual void writeData (Ostream &os) const
 
virtual void readData (Istream &is)
 
virtual void write (Ostream &os) const
 
- Public Member Functions inherited from externalCoupledMixedFvPatchField< scalar >
 TypeName ("externalCoupled")
 
 externalCoupledMixedFvPatchField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 
 externalCoupledMixedFvPatchField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 
 externalCoupledMixedFvPatchField (const externalCoupledMixedFvPatchField< scalar > &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 
 externalCoupledMixedFvPatchField (const externalCoupledMixedFvPatchField &)
 
 externalCoupledMixedFvPatchField (const externalCoupledMixedFvPatchField &, const DimensionedField< scalar, volMesh > &)
 
virtual tmp< fvPatchField< scalar > > clone () const
 
virtual ~externalCoupledMixedFvPatchField ()=default
 
- Public Member Functions inherited from mixedFvPatchField< scalar >
 TypeName ("mixed")
 
 mixedFvPatchField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 
 mixedFvPatchField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 
 mixedFvPatchField (const mixedFvPatchField< scalar > &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 
 mixedFvPatchField (const mixedFvPatchField< scalar > &)
 
 mixedFvPatchField (const mixedFvPatchField< scalar > &, const DimensionedField< scalar, volMesh > &)
 
virtual bool fixesValue () const
 
virtual bool assignable () const
 
virtual Field< scalar > & refValue ()
 
virtual const Field< scalar > & refValue () const
 
virtual Field< scalar > & refGrad ()
 
virtual const Field< scalar > & refGrad () const
 
virtual scalarFieldvalueFraction ()
 
virtual const scalarFieldvalueFraction () const
 
virtual Field< scalar > & source ()
 
virtual const Field< scalar > & source () const
 
virtual void autoMap (const fvPatchFieldMapper &)
 
virtual void rmap (const fvPatchField< scalar > &, const labelList &)
 
virtual tmp< Field< scalar > > snGrad () const
 
virtual void evaluate (const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
 
virtual tmp< Field< scalar > > valueInternalCoeffs (const tmp< scalarField > &) const
 
virtual tmp< Field< scalar > > valueBoundaryCoeffs (const tmp< scalarField > &) const
 
virtual tmp< Field< scalar > > gradientInternalCoeffs () const
 
virtual tmp< Field< scalar > > gradientBoundaryCoeffs () const
 
virtual void operator= (const UList< scalar > &)
 
virtual void operator= (const fvPatchField< scalar > &)
 
virtual void operator= (const scalar &)
 
virtual void operator+= (const fvPatchField< scalar > &)
 
virtual void operator+= (const Field< scalar > &)
 
virtual void operator+= (const scalar &)
 
virtual void operator-= (const fvPatchField< scalar > &)
 
virtual void operator-= (const Field< scalar > &)
 
virtual void operator-= (const scalar &)
 
virtual void operator*= (const fvPatchField< scalar > &)
 
virtual void operator*= (const Field< scalar > &)
 
virtual void operator*= (const scalar)
 
virtual void operator/= (const fvPatchField< scalar > &)
 
virtual void operator/= (const Field< scalar > &)
 
virtual void operator/= (const scalar)
 
- Public Member Functions inherited from fvPatchField< scalar >
 TypeName ("fvPatchField")
 
 declareRunTimeSelectionTable (tmp, fvPatchField, patch,(const fvPatch &p, const DimensionedField< Type, volMesh > &iF),(p, iF))
 
 declareRunTimeSelectionTable (tmp, fvPatchField, patchMapper,(const fvPatchField< Type > &ptf, const fvPatch &p, const DimensionedField< Type, volMesh > &iF, const fvPatchFieldMapper &m),(dynamic_cast< const fvPatchFieldType & >(ptf), p, iF, m))
 
 declareRunTimeSelectionTable (tmp, fvPatchField, dictionary,(const fvPatch &p, const DimensionedField< Type, volMesh > &iF, const dictionary &dict),(p, iF, dict))
 
 fvPatchField (const fvPatch &, const DimensionedField< Type, volMesh > &)
 
 fvPatchField (const fvPatch &, const DimensionedField< Type, volMesh > &, const Type &value)
 
 fvPatchField (const fvPatch &, const DimensionedField< Type, volMesh > &, const word &patchType)
 
 fvPatchField (const fvPatch &, const DimensionedField< Type, volMesh > &, const Field< Type > &)
 
 fvPatchField (const fvPatch &, const DimensionedField< Type, volMesh > &, const dictionary &, const bool valueRequired=true)
 
 fvPatchField (const fvPatchField< Type > &, const fvPatch &, const DimensionedField< Type, volMesh > &, const fvPatchFieldMapper &)
 
 fvPatchField (const fvPatchField< Type > &)
 
 fvPatchField (const fvPatchField< Type > &, const DimensionedField< Type, volMesh > &)
 
virtual tmp< fvPatchField< Type > > clone (const DimensionedField< Type, volMesh > &iF) const
 
Foam::tmp< Foam::fvPatchField< Type > > NewCalculatedType (const fvPatch &p)
 
Foam::tmp< Foam::fvPatchField< Type > > NewCalculatedType (const fvPatchField< Type2 > &pf)
 
virtual ~fvPatchField ()=default
 
bool useImplicit () const noexcept
 
bool useImplicit (bool on) noexcept
 
virtual bool coupled () const
 
const objectRegistrydb () const
 
const fvPatchpatch () const
 
const DimensionedField< Type, volMesh > & internalField () const
 
const Field< Type > & primitiveField () const
 
const wordpatchType () const
 
wordpatchType ()
 
bool updated () const
 
bool manipulatedMatrix () const
 
virtual void rmap (const fvPatchField< Type > &, const labelList &)
 
virtual tmp< Field< Type > > snGrad (const scalarField &deltaCoeffs) const
 
virtual void updateCoeffs ()
 
virtual void updateWeightedCoeffs (const scalarField &weights)
 
virtual tmp< Field< Type > > patchInternalField () const
 
virtual void patchInternalField (Field< Type > &) const
 
virtual tmp< Field< Type > > patchNeighbourField () const
 
virtual void initEvaluate (const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
 
virtual tmp< Field< Type > > valueInternalCoeffs (const tmp< Field< scalar >> &) const
 
virtual tmp< Field< Type > > valueBoundaryCoeffs (const tmp< Field< scalar >> &) const
 
virtual tmp< Field< Type > > gradientInternalCoeffs (const scalarField &deltaCoeffs) const
 
virtual tmp< Field< Type > > gradientBoundaryCoeffs (const scalarField &deltaCoeffs) const
 
virtual void manipulateMatrix (fvMatrix< Type > &matrix)
 
virtual void manipulateMatrix (fvMatrix< Type > &matrix, const scalarField &weights)
 
virtual void manipulateMatrix (fvMatrix< Type > &matrix, const label iMatrix, const direction cmp)
 
void check (const fvPatchField< Type > &) const
 
virtual void operator= (const UList< Type > &)
 
virtual void operator= (const fvPatchField< Type > &)
 
virtual void operator= (const Type &)
 
virtual void operator+= (const fvPatchField< Type > &)
 
virtual void operator+= (const Field< Type > &)
 
virtual void operator+= (const Type &)
 
virtual void operator-= (const fvPatchField< Type > &)
 
virtual void operator-= (const Field< Type > &)
 
virtual void operator-= (const Type &)
 
virtual void operator== (const fvPatchField< Type > &)
 
virtual void operator== (const Field< Type > &)
 
virtual void operator== (const Type &)
 

Additional Inherited Members

- Public Types inherited from fvPatchField< scalar >
typedef fvPatch Patch
 
typedef calculatedFvPatchField< Type > Calculated
 
- Static Public Member Functions inherited from fvPatchField< scalar >
static tmp< fvPatchField< Type > > New (const word &, const fvPatch &, const DimensionedField< Type, volMesh > &)
 
static tmp< fvPatchField< Type > > New (const word &, const word &actualPatchType, const fvPatch &, const DimensionedField< Type, volMesh > &)
 
static tmp< fvPatchField< Type > > New (const fvPatchField< Type > &, const fvPatch &, const DimensionedField< Type, volMesh > &, const fvPatchFieldMapper &)
 
static tmp< fvPatchField< Type > > New (const fvPatch &, const DimensionedField< Type, volMesh > &, const dictionary &)
 
static tmp< fvPatchField< Type > > NewCalculatedType (const fvPatch &)
 
static tmp< fvPatchField< Type > > NewCalculatedType (const fvPatchField< Type2 > &)
 
static const wordcalculatedType ()
 
- Static Public Attributes inherited from fvPatchField< scalar >
static int disallowGenericFvPatchField
 

Detailed Description

This boundary condition provides a temperatue interface to an external application.

Values are transferred as plain text files, where OpenFOAM data are written as follows:

    # Patch: <patch name>
    <magSf1> <value1> <qDot1> <htc1>
    <magSf2> <value2> <qDot2> <htc2>
    <magSf3> <value3> <qDot3> <htc2>
    ...
    <magSfN> <valueN> <qDotN> <htcN>

and received as the constituent pieces of the `mixed' condition, i.e.

    # Patch: <patch name>
    <value1> <gradient1> <valueFracion1>
    <value2> <gradient2> <valueFracion2>
    <value3> <gradient3> <valueFracion3>
    ...
    <valueN> <gradientN> <valueFracionN>

Data is sent/received as a single file for all patches from the directory

    $FOAM_CASE/<commsDir>

At start-up, the boundary creates a lock file, i.e..

    OpenFOAM.lock

... to signal the external source to wait. During the boundary condition update, boundary values are written to file, e.g.

    <fileName>.out

The lock file is then removed, instructing the external source to take control of the program execution. When ready, the external program should create the return values, e.g. to file

    <fileName>.in

... and then reinstate the lock file. The boundary condition will then read the return values, and pass program execution back to OpenFOAM.

To be used in combination with the functionObjects::externalCoupled functionObject.

Usage
Property Description Required Default
outputTemperature Output temperature: fluid/wall yes
htcRefTemperature Fluid temperature for htc: cell/user no cell
Tref Reference temperature [K] for htc conditional

The user-specified reference temperature Tref is specified as a Foam::Function1 of time but spatially uniform.

See also
externalCoupledFunctionObject mixedFvPatchField externalCoupledMixedFvPatchField
Source files

Definition at line 145 of file externalCoupledTemperatureMixedFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ externalCoupledTemperatureMixedFvPatchScalarField() [1/5]

Definition at line 77 of file externalCoupledTemperatureMixedFvPatchScalarField.C.

Referenced by externalCoupledTemperatureMixedFvPatchScalarField::clone().

Here is the caller graph for this function:

◆ externalCoupledTemperatureMixedFvPatchScalarField() [2/5]

externalCoupledTemperatureMixedFvPatchScalarField ( const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF,
const dictionary dict 
)

◆ externalCoupledTemperatureMixedFvPatchScalarField() [3/5]

◆ externalCoupledTemperatureMixedFvPatchScalarField() [4/5]

◆ externalCoupledTemperatureMixedFvPatchScalarField() [5/5]

◆ ~externalCoupledTemperatureMixedFvPatchScalarField()

Member Function Documentation

◆ TypeName()

TypeName ( "externalCoupledTemperature"  )

◆ clone() [1/2]

virtual tmp<fvPatchField<scalar> > clone ( ) const
inlinevirtual

◆ clone() [2/2]

virtual tmp<fvPatchField<scalar> > clone ( const DimensionedField< scalar, volMesh > &  iF) const
inlinevirtual

◆ writeHeader()

void writeHeader ( Ostream os) const
virtual

Reimplemented from externalCoupledMixedFvPatchField< scalar >.

Definition at line 58 of file externalCoupledTemperatureMixedFvPatchScalarField.C.

References Foam::endl(), and os().

Here is the call graph for this function:

◆ writeData()

void writeData ( Ostream os) const
virtual

◆ readData()

void readData ( Istream is)
virtual

Reimplemented from externalCoupledMixedFvPatchField< scalar >.

Definition at line 312 of file externalCoupledTemperatureMixedFvPatchScalarField.C.

References forAll, and ISstream::getLine().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Reimplemented from mixedFvPatchField< scalar >.

Definition at line 336 of file externalCoupledTemperatureMixedFvPatchScalarField.C.

References os(), and Foam::vtk::write().

Here is the call graph for this function:

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