Public Member Functions | Private Member Functions | Private Attributes
syringePressureFvPatchScalarField Class Reference

This boundary condition provides a pressure condition, obtained from a zero-D model of the cylinder of a syringe. More...

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

Public Member Functions

 TypeName ("syringePressure")
 Runtime type information. More...
 
 syringePressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field. More...
 
 syringePressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 syringePressureFvPatchScalarField (const syringePressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given syringePressureFvPatchScalarField. More...
 
virtual tmp< fvPatchScalarFieldclone () const
 Construct and return a clone. More...
 
 syringePressureFvPatchScalarField (const syringePressureFvPatchScalarField &)
 Construct as copy. More...
 
 syringePressureFvPatchScalarField (const syringePressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Construct as copy setting internal field reference. More...
 
virtual tmp< fvPatchScalarFieldclone (const DimensionedField< scalar, volMesh > &iF) const
 Construct and return a clone setting internal field reference. More...
 
virtual void updateCoeffs ()
 Update the coefficients associated with the patch field. More...
 
virtual void write (Ostream &) const
 Write. More...
 

Private Member Functions

scalar Vs (const scalar t) const
 Return the volume of the syringe at time t. More...
 

Private Attributes

scalar Ap_
 Syringe piston area. More...
 
scalar Sp_
 Syringe piston speed. More...
 
scalar VsI_
 Initial syringe volume. More...
 
scalar tas_
 Start of piston acceleration. More...
 
scalar tae_
 End of piston acceleration. More...
 
scalar tds_
 Start of piston deceleration. More...
 
scalar tde_
 End of piston deceleration. More...
 
scalar psI_
 Initial syringe pressure. More...
 
scalar psi_
 Gas compressibility. More...
 
scalar ams_
 Added gas mass. More...
 
scalar ams0_
 Added gas mass at previous time step. More...
 
word phiName_
 Name of the flux transporting the field. More...
 
label curTimeIndex_
 Current time index used to store ms0_. More...
 

Detailed Description

This boundary condition provides a pressure condition, obtained from a zero-D model of the cylinder of a syringe.

The syringe cylinder is defined by its initial volume, piston area and velocity profile specified by regions of constant acceleration, speed and deceleration. The gas in the cylinder is described by its initial pressure and compressibility which is assumed constant, i.e. isothermal expansion/compression.


Patch usage

Property Description Required Default value
Ap syringe piston area [m2] yes
Sp syringe piston speed [m/s] yes
VsI initial syringe volume [m3] yes
tas start of piston acceleration [s] yes
tae end of piston acceleration [s] yes
tds start of piston deceleration [s] yes
tde end of piston deceleration [s] yes
psI initial syringe pressure [Pa] yes
psi gas compressibility [m2/s2] yes
ams added (or removed) gas mass [kg] yes

Example of the BC specification:

    myPatch
    {
        type            syringePressure;
        Ap              1.388e-6;
        Sp              0.01;
        VsI             1.388e-8;
        tas             0.001;
        tae             0.002;
        tds             0.005;
        tde             0.006;
        psI             1e5;
        psi             1e-5;
        ams             0;
        value           uniform 0;
    }
See also
Foam::fixedValueFvPatchField
Source files

Definition at line 151 of file syringePressureFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ syringePressureFvPatchScalarField() [1/5]

syringePressureFvPatchScalarField ( const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF 
)

Construct from patch and internal field.

Definition at line 35 of file syringePressureFvPatchScalarField.C.

Referenced by syringePressureFvPatchScalarField::clone().

Here is the caller graph for this function:

◆ syringePressureFvPatchScalarField() [2/5]

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

Construct from patch, internal field and dictionary.

Definition at line 47 of file syringePressureFvPatchScalarField.C.

◆ syringePressureFvPatchScalarField() [3/5]

syringePressureFvPatchScalarField ( const syringePressureFvPatchScalarField sppsf,
const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF,
const fvPatchFieldMapper mapper 
)

Construct by mapping given syringePressureFvPatchScalarField.

onto a new patch

Definition at line 74 of file syringePressureFvPatchScalarField.C.

◆ syringePressureFvPatchScalarField() [4/5]

Construct as copy.

Definition at line 122 of file syringePressureFvPatchScalarField.C.

◆ syringePressureFvPatchScalarField() [5/5]

Construct as copy setting internal field reference.

Definition at line 99 of file syringePressureFvPatchScalarField.C.

Member Function Documentation

◆ Vs()

Foam::scalar Vs ( const scalar  t) const
private

◆ TypeName()

TypeName ( "syringePressure"  )

Runtime type information.

◆ clone() [1/2]

virtual tmp<fvPatchScalarField> clone ( ) const
inlinevirtual

Construct and return a clone.

Definition at line 237 of file syringePressureFvPatchScalarField.H.

References syringePressureFvPatchScalarField::syringePressureFvPatchScalarField().

Here is the call graph for this function:

◆ clone() [2/2]

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

Construct and return a clone setting internal field reference.

Definition at line 260 of file syringePressureFvPatchScalarField.H.

References syringePressureFvPatchScalarField::syringePressureFvPatchScalarField().

Here is the call graph for this function:

◆ updateCoeffs()

void updateCoeffs ( )
virtual

Update the coefficients associated with the patch field.

Definition at line 184 of file syringePressureFvPatchScalarField.C.

References Foam::dimArea, Foam::dimDensity, dimensionedInternalField(), Foam::dimVelocity, Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::operator==(), phi, Foam::sum(), and timeIndex.

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Definition at line 232 of file syringePressureFvPatchScalarField.C.

References token::END_STATEMENT, Foam::nl, fvPatchField::write(), and Ostream::writeKeyword().

Here is the call graph for this function:

Field Documentation

◆ Ap_

scalar Ap_
private

Syringe piston area.

Definition at line 158 of file syringePressureFvPatchScalarField.H.

Referenced by syringePressureFvPatchScalarField::Vs().

◆ Sp_

scalar Sp_
private

Syringe piston speed.

Definition at line 161 of file syringePressureFvPatchScalarField.H.

Referenced by syringePressureFvPatchScalarField::Vs().

◆ VsI_

scalar VsI_
private

Initial syringe volume.

Definition at line 164 of file syringePressureFvPatchScalarField.H.

Referenced by syringePressureFvPatchScalarField::Vs().

◆ tas_

scalar tas_
private

Start of piston acceleration.

Definition at line 167 of file syringePressureFvPatchScalarField.H.

Referenced by syringePressureFvPatchScalarField::Vs().

◆ tae_

scalar tae_
private

End of piston acceleration.

Definition at line 170 of file syringePressureFvPatchScalarField.H.

Referenced by syringePressureFvPatchScalarField::Vs().

◆ tds_

scalar tds_
private

Start of piston deceleration.

Definition at line 173 of file syringePressureFvPatchScalarField.H.

Referenced by syringePressureFvPatchScalarField::Vs().

◆ tde_

scalar tde_
private

End of piston deceleration.

Definition at line 176 of file syringePressureFvPatchScalarField.H.

Referenced by syringePressureFvPatchScalarField::Vs().

◆ psI_

scalar psI_
private

Initial syringe pressure.

Definition at line 179 of file syringePressureFvPatchScalarField.H.

◆ psi_

scalar psi_
private

Gas compressibility.

Definition at line 182 of file syringePressureFvPatchScalarField.H.

◆ ams_

scalar ams_
private

Added gas mass.

Definition at line 185 of file syringePressureFvPatchScalarField.H.

◆ ams0_

scalar ams0_
private

Added gas mass at previous time step.

Definition at line 188 of file syringePressureFvPatchScalarField.H.

◆ phiName_

word phiName_
private

Name of the flux transporting the field.

Definition at line 191 of file syringePressureFvPatchScalarField.H.

◆ curTimeIndex_

label curTimeIndex_
private

Current time index used to store ms0_.

Definition at line 194 of file syringePressureFvPatchScalarField.H.


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