diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files
index 331f1439f5..92e61cecc0 100644
--- a/src/finiteVolume/Make/files
+++ b/src/finiteVolume/Make/files
@@ -157,7 +157,6 @@ $(derivedFvPatchFields)/mappedFixedValue/mappedFixedValueFvPatchFields.C
$(derivedFvPatchFields)/mappedFlowRate/mappedFlowRateFvPatchVectorField.C
$(derivedFvPatchFields)/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C
$(derivedFvPatchFields)/movingWallVelocity/movingWallVelocityFvPatchVectorField.C
-$(derivedFvPatchFields)/oscillatingFixedValue/oscillatingFixedValueFvPatchFields.C
$(derivedFvPatchFields)/outletInlet/outletInletFvPatchFields.C
$(derivedFvPatchFields)/outletMappedUniformInlet/outletMappedUniformInletFvPatchFields.C
$(derivedFvPatchFields)/partialSlip/partialSlipFvPatchFields.C
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.H
index 6d6bb2e736..a578e09948 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.H
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -59,16 +59,20 @@ Description
fixTangentialInflow false;
normalVelocity
{
- type oscillatingFixedValue;
- refValue uniform (0 1 0);
- offset (0 -1 0);
- amplitude table
- (
- ( 0 0)
- ( 2 0.088)
- ( 8 0.088)
- );
- frequency constant 1;
+ type uniformFixedValue;
+ uniformValue sine;
+ uniformValueCoeffs
+ {
+ frequency 1;
+ amplitude table
+ (
+ (0 0)
+ (2 0.088)
+ (8 0.088)
+ );
+ scale (0 1 0);
+ level (0 0 0);
+ }
}
value uniform (0 0 0);
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.C
deleted file mode 100644
index 87d567747d..0000000000
--- a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.C
+++ /dev/null
@@ -1,205 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
- \\ / O peration |
- \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
- \\/ M anipulation |
--------------------------------------------------------------------------------
-License
- This file is part of OpenFOAM.
-
- OpenFOAM is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with OpenFOAM. If not, see .
-
-\*---------------------------------------------------------------------------*/
-
-#include "oscillatingFixedValueFvPatchField.H"
-#include "mathematicalConstants.H"
-
-// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
-
-template
-Foam::scalar Foam::oscillatingFixedValueFvPatchField::currentScale() const
-{
- const scalar t = this->db().time().timeOutputValue();
- const scalar a = amplitude_->value(t);
- const scalar f = frequency_->value(t);
-
- return 1.0 + a*sin(constant::mathematical::twoPi*f*t);
-}
-
-
-// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
-
-template
-Foam::oscillatingFixedValueFvPatchField::oscillatingFixedValueFvPatchField
-(
- const fvPatch& p,
- const DimensionedField& iF
-)
-:
- fixedValueFvPatchField(p, iF),
- refValue_(p.size()),
- offset_(pTraits::zero),
- amplitude_(),
- frequency_(),
- curTimeIndex_(-1)
-{}
-
-
-template
-Foam::oscillatingFixedValueFvPatchField::oscillatingFixedValueFvPatchField
-(
- const fvPatch& p,
- const DimensionedField& iF,
- const dictionary& dict
-)
-:
- fixedValueFvPatchField(p, iF),
- refValue_("refValue", dict, p.size()),
- offset_(dict.lookupOrDefault("offset", pTraits::zero)),
- amplitude_(Function1::New("amplitude", dict)),
- frequency_(Function1::New("frequency", dict)),
- curTimeIndex_(-1)
-{
- if (dict.found("value"))
- {
- fixedValueFvPatchField::operator==
- (
- Field("value", dict, p.size())
- );
- }
- else
- {
- fixedValueFvPatchField::operator==
- (
- refValue_*currentScale()
- + offset_
- );
- }
-}
-
-
-template
-Foam::oscillatingFixedValueFvPatchField::oscillatingFixedValueFvPatchField
-(
- const oscillatingFixedValueFvPatchField& ptf,
- const fvPatch& p,
- const DimensionedField& iF,
- const fvPatchFieldMapper& mapper
-)
-:
- fixedValueFvPatchField(ptf, p, iF, mapper),
- refValue_(ptf.refValue_, mapper),
- offset_(ptf.offset_),
- amplitude_(ptf.amplitude_, false),
- frequency_(ptf.frequency_, false),
- curTimeIndex_(-1)
-{}
-
-
-template
-Foam::oscillatingFixedValueFvPatchField::oscillatingFixedValueFvPatchField
-(
- const oscillatingFixedValueFvPatchField& ptf
-)
-:
- fixedValueFvPatchField(ptf),
- refValue_(ptf.refValue_),
- offset_(ptf.offset_),
- amplitude_(ptf.amplitude_, false),
- frequency_(ptf.frequency_, false),
- curTimeIndex_(-1)
-{}
-
-
-template
-Foam::oscillatingFixedValueFvPatchField::oscillatingFixedValueFvPatchField
-(
- const oscillatingFixedValueFvPatchField& ptf,
- const DimensionedField& iF
-)
-:
- fixedValueFvPatchField(ptf, iF),
- refValue_(ptf.refValue_),
- offset_(ptf.offset_),
- amplitude_(ptf.amplitude_, false),
- frequency_(ptf.frequency_, false),
- curTimeIndex_(-1)
-{}
-
-
-// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
-
-template
-void Foam::oscillatingFixedValueFvPatchField::autoMap
-(
- const fvPatchFieldMapper& m
-)
-{
- fixedValueFvPatchField::autoMap(m);
- refValue_.autoMap(m);
-}
-
-
-template
-void Foam::oscillatingFixedValueFvPatchField::rmap
-(
- const fvPatchField& ptf,
- const labelList& addr
-)
-{
- fixedValueFvPatchField::rmap(ptf, addr);
-
- const oscillatingFixedValueFvPatchField& tiptf =
- refCast>(ptf);
-
- refValue_.rmap(tiptf.refValue_, addr);
-}
-
-
-template
-void Foam::oscillatingFixedValueFvPatchField::updateCoeffs()
-{
- if (this->updated())
- {
- return;
- }
-
- if (curTimeIndex_ != this->db().time().timeIndex())
- {
- fixedValueFvPatchField::operator==
- (
- refValue_*currentScale()
- + offset_
- );
-
- curTimeIndex_ = this->db().time().timeIndex();
- }
-
- fixedValueFvPatchField::updateCoeffs();
-}
-
-
-template
-void Foam::oscillatingFixedValueFvPatchField::write(Ostream& os) const
-{
- fixedValueFvPatchField::write(os);
- refValue_.writeEntry("refValue", os);
- os.writeKeyword("offset") << offset_ << token::END_STATEMENT << nl;
- amplitude_->writeData(os);
- frequency_->writeData(os);
-}
-
-
-// ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.H
deleted file mode 100644
index bfc323d70e..0000000000
--- a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchField.H
+++ /dev/null
@@ -1,277 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
- \\ / O peration |
- \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
- \\/ M anipulation |
--------------------------------------------------------------------------------
-License
- This file is part of OpenFOAM.
-
- OpenFOAM is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with OpenFOAM. If not, see .
-
-Class
- Foam::oscillatingFixedValueFvPatchField
-
-Group
- grpGenericBoundaryConditions
-
-Description
- This boundary condition provides an oscillating condition in terms of
- amplitude and frequency.
-
- \f[
- x_p = (1 + a sin(2 \pi f t))x_{ref} + x_o
- \f]
-
- where
-
- \vartable
- x_p | patch values
- x_{ref} | patch reference values
- x_o | patch offset values
- a | amplitude
- f | frequency [1/s]
- t | time [s]
- \endvartable
-
- \heading Patch usage
-
- \table
- Property | Description | Required | Default value
- refValue | reference value | yes |
- offset | offset value | no | 0.0
- amplitude | oscillation amplitude | yes |
- frequency | oscillation frequency | yes |
- \endtable
-
- Example of the boundary condition specification:
- \verbatim
- myPatch
- {
- type oscillatingFixedValue;
- refValue uniform 5.0;
- offset 0.0;
- amplitude constant 0.5;
- frequency constant 10;
- }
- \endverbatim
-
-Note
- The amplitude and frequency entries are Function1 types, able to describe
- time varying functions. The example above gives the usage for supplying
- constant values.
-
-SeeAlso
- Foam::Function1
-
-SourceFiles
- oscillatingFixedValueFvPatchField.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef oscillatingFixedValueFvPatchField_H
-#define oscillatingFixedValueFvPatchField_H
-
-#include "Random.H"
-#include "fixedValueFvPatchFields.H"
-#include "Function1.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-/*---------------------------------------------------------------------------*\
- Class oscillatingFixedValueFvPatchField Declaration
-\*---------------------------------------------------------------------------*/
-
-template
-class oscillatingFixedValueFvPatchField
-:
- public fixedValueFvPatchField
-{
- // Private data
-
- //- Reference value
- Field refValue_;
-
- //- Offset
- Type offset_;
-
- //- Amplitude
- autoPtr> amplitude_;
-
- //- Frequency
- autoPtr> frequency_;
-
- //- Current time index
- label curTimeIndex_;
-
-
- // Private Member Functions
-
- //- Return current scale
- scalar currentScale() const;
-
-
-public:
-
- //- Runtime type information
- TypeName("oscillatingFixedValue");
-
-
- // Constructors
-
- //- Construct from patch and internal field
- oscillatingFixedValueFvPatchField
- (
- const fvPatch&,
- const DimensionedField&
- );
-
- //- Construct from patch, internal field and dictionary
- oscillatingFixedValueFvPatchField
- (
- const fvPatch&,
- const DimensionedField&,
- const dictionary&
- );
-
- //- Construct by mapping given oscillatingFixedValueFvPatchField
- // onto a new patch
- oscillatingFixedValueFvPatchField
- (
- const oscillatingFixedValueFvPatchField&,
- const fvPatch&,
- const DimensionedField&,
- const fvPatchFieldMapper&
- );
-
- //- Construct as copy
- oscillatingFixedValueFvPatchField
- (
- const oscillatingFixedValueFvPatchField&
- );
-
- //- Construct and return a clone
- virtual tmp> clone() const
- {
- return tmp>
- (
- new oscillatingFixedValueFvPatchField(*this)
- );
- }
-
- //- Construct as copy setting internal field reference
- oscillatingFixedValueFvPatchField
- (
- const oscillatingFixedValueFvPatchField&,
- const DimensionedField&
- );
-
- //- Construct and return a clone setting internal field reference
- virtual tmp> clone
- (
- const DimensionedField& iF
- ) const
- {
- return tmp>
- (
- new oscillatingFixedValueFvPatchField(*this, iF)
- );
- }
-
-
- // Member functions
-
- // Access
-
- //- Return the ref value
- const Field& refValue() const
- {
- return refValue_;
- }
-
- //- Return reference to the ref value to allow adjustment
- Field& refValue()
- {
- return refValue_;
- }
-
- //- Return amplitude
- scalar amplitude() const
- {
- return amplitude_;
- }
-
- scalar& amplitude()
- {
- return amplitude_;
- }
-
- //- Return frequency
- scalar frequency() const
- {
- return frequency_;
- }
-
- scalar& frequency()
- {
- return frequency_;
- }
-
-
- // Mapping functions
-
- //- Map (and resize as needed) from self given a mapping object
- virtual void autoMap
- (
- const fvPatchFieldMapper&
- );
-
- //- Reverse map the given fvPatchField onto this fvPatchField
- virtual void rmap
- (
- const fvPatchField&,
- const labelList&
- );
-
-
- // Evaluation functions
-
- //- Update the coefficients associated with the patch field
- virtual void updateCoeffs();
-
-
- //- Write
- virtual void write(Ostream&) const;
-};
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#ifdef NoRepository
-# include "oscillatingFixedValueFvPatchField.C"
-#endif
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchFields.C b/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchFields.C
deleted file mode 100644
index a75aa80c34..0000000000
--- a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchFields.C
+++ /dev/null
@@ -1,43 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
- \\ / O peration |
- \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
- \\/ M anipulation |
--------------------------------------------------------------------------------
-License
- This file is part of OpenFOAM.
-
- OpenFOAM is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with OpenFOAM. If not, see .
-
-\*---------------------------------------------------------------------------*/
-
-#include "oscillatingFixedValueFvPatchFields.H"
-#include "addToRunTimeSelectionTable.H"
-#include "volFields.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-makePatchFields(oscillatingFixedValue);
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchFields.H b/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchFields.H
deleted file mode 100644
index 557d4973e7..0000000000
--- a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchFields.H
+++ /dev/null
@@ -1,49 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
- \\ / O peration |
- \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
- \\/ M anipulation |
--------------------------------------------------------------------------------
-License
- This file is part of OpenFOAM.
-
- OpenFOAM is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with OpenFOAM. If not, see .
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef oscillatingFixedValueFvPatchFields_H
-#define oscillatingFixedValueFvPatchFields_H
-
-#include "oscillatingFixedValueFvPatchField.H"
-#include "fieldTypes.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-makePatchTypeFieldTypedefs(oscillatingFixedValue);
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchFieldsFwd.H b/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchFieldsFwd.H
deleted file mode 100644
index f46b9216b9..0000000000
--- a/src/finiteVolume/fields/fvPatchFields/derived/oscillatingFixedValue/oscillatingFixedValueFvPatchFieldsFwd.H
+++ /dev/null
@@ -1,50 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
- \\ / O peration |
- \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
- \\/ M anipulation |
--------------------------------------------------------------------------------
-License
- This file is part of OpenFOAM.
-
- OpenFOAM is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with OpenFOAM. If not, see .
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef oscillatingFixedValueFvPatchFieldsFwd_H
-#define oscillatingFixedValueFvPatchFieldsFwd_H
-
-#include "fieldTypes.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-template class oscillatingFixedValueFvPatchField;
-
-makePatchTypeFieldTypedefs(oscillatingFixedValue);
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/0.org/U b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/0.org/U
index 4be67ee364..32e07b0044 100644
--- a/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/0.org/U
+++ b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/0.org/U
@@ -26,11 +26,13 @@ boundaryField
type pressureInletOutletParSlipVelocity;
value uniform (0 0 0);
}
+
walls
{
type fixedValue;
value uniform (0 0 0);
}
+
floatingObject
{
type fixedNormalInletOutletVelocity;
@@ -39,21 +41,25 @@ boundaryField
normalVelocity
{
- type oscillatingFixedValue;
- refValue uniform (0 1 0);
- offset (0 -1 0);
- amplitude table
- (
- ( 0 0)
- ( 10 0.025)
- (1000 0.025)
- );
- frequency constant 1;
- value uniform (0 0 0);
+ type uniformFixedValue;
+ uniformValue sine;
+ uniformValueCoeffs
+ {
+ frequency 1;
+ amplitude table
+ (
+ ( 0 0)
+ ( 10 0.025)
+ (1000 0.025)
+ );
+ scale (0 1 0);
+ level (0 0 0);
+ }
}
value uniform (0 0 0);
}
+
frontAndBack
{
type empty;