mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Function1: Added "Ramp" to the names of the ramp functions to avoid conflict
with more general forms of those functions.
This commit is contained in:
@ -79,11 +79,11 @@ primitives/triad/triad.C
|
||||
/* Run-time selectable functions */
|
||||
primitives/functions/Function1/makeDataEntries.C
|
||||
primitives/functions/Function1/ramp/ramp.C
|
||||
primitives/functions/Function1/linear/linear.C
|
||||
primitives/functions/Function1/quadratic/quadratic.C
|
||||
primitives/functions/Function1/quarterSine/quarterSine.C
|
||||
primitives/functions/Function1/quarterCosine/quarterCosine.C
|
||||
primitives/functions/Function1/halfCosine/halfCosine.C
|
||||
primitives/functions/Function1/linearRamp/linearRamp.C
|
||||
primitives/functions/Function1/quadraticRamp/quadraticRamp.C
|
||||
primitives/functions/Function1/quarterSineRamp/quarterSineRamp.C
|
||||
primitives/functions/Function1/quarterCosineRamp/quarterCosineRamp.C
|
||||
primitives/functions/Function1/halfCosineRamp/halfCosineRamp.C
|
||||
primitives/functions/Polynomial/polynomialFunction.C
|
||||
|
||||
primitives/subModelBase/subModelBase.C
|
||||
|
||||
@ -23,7 +23,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "halfCosine.H"
|
||||
#include "halfCosineRamp.H"
|
||||
#include "mathematicalConstants.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -32,14 +32,14 @@ namespace Foam
|
||||
{
|
||||
namespace Function1Types
|
||||
{
|
||||
makeScalarFunction1(halfCosine);
|
||||
makeScalarFunction1(halfCosineRamp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::Function1Types::halfCosine::halfCosine
|
||||
Foam::Function1Types::halfCosineRamp::halfCosineRamp
|
||||
(
|
||||
const word& entryName,
|
||||
const dictionary& dict
|
||||
@ -51,13 +51,13 @@ Foam::Function1Types::halfCosine::halfCosine
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::Function1Types::halfCosine::~halfCosine()
|
||||
Foam::Function1Types::halfCosineRamp::~halfCosineRamp()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::scalar Foam::Function1Types::halfCosine::value(const scalar t) const
|
||||
Foam::scalar Foam::Function1Types::halfCosineRamp::value(const scalar t) const
|
||||
{
|
||||
return 0.5*(1 - cos(constant::mathematical::pi*linearRamp(t)));
|
||||
}
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::Function1Types::halfCosine
|
||||
Foam::Function1Types::halfCosineRamp
|
||||
|
||||
Description
|
||||
Half-cosine ramp function starting from 0 and increasing to 1 from \c start
|
||||
@ -32,12 +32,12 @@ See also
|
||||
Foam::Function1Types::ramp
|
||||
|
||||
SourceFiles
|
||||
halfCosine.C
|
||||
halfCosineRamp.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef halfCosine_H
|
||||
#define halfCosine_H
|
||||
#ifndef halfCosineRamp_H
|
||||
#define halfCosineRamp_H
|
||||
|
||||
#include "ramp.H"
|
||||
|
||||
@ -49,29 +49,29 @@ namespace Function1Types
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class halfCosine Declaration
|
||||
Class halfCosineRamp Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class halfCosine
|
||||
class halfCosineRamp
|
||||
:
|
||||
public ramp
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const halfCosine&);
|
||||
void operator=(const halfCosineRamp&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Runtime type information
|
||||
TypeName("halfCosine");
|
||||
TypeName("halfCosineRamp");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from entry name and dictionary
|
||||
halfCosine
|
||||
halfCosineRamp
|
||||
(
|
||||
const word& entryName,
|
||||
const dictionary& dict
|
||||
@ -79,7 +79,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~halfCosine();
|
||||
virtual ~halfCosineRamp();
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -23,7 +23,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "linear.H"
|
||||
#include "linearRamp.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
@ -31,14 +31,14 @@ namespace Foam
|
||||
{
|
||||
namespace Function1Types
|
||||
{
|
||||
makeScalarFunction1(linear);
|
||||
makeScalarFunction1(linearRamp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::Function1Types::linear::linear
|
||||
Foam::Function1Types::linearRamp::linearRamp
|
||||
(
|
||||
const word& entryName,
|
||||
const dictionary& dict
|
||||
@ -50,15 +50,15 @@ Foam::Function1Types::linear::linear
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::Function1Types::linear::~linear()
|
||||
Foam::Function1Types::linearRamp::~linearRamp()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::scalar Foam::Function1Types::linear::value(const scalar t) const
|
||||
Foam::scalar Foam::Function1Types::linearRamp::value(const scalar t) const
|
||||
{
|
||||
return linearRamp(t);
|
||||
return ramp::linearRamp(t);
|
||||
}
|
||||
|
||||
|
||||
@ -22,22 +22,22 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::Function1Types::linear
|
||||
Foam::Function1Types::linearRamp
|
||||
|
||||
Description
|
||||
Linear ramp function starting from 0 and increasing linearly to 1 from \c
|
||||
start over the \c duration and remaining at 1 thereafter.
|
||||
Linear ramp function starting from 0 and increasing linearRamply to 1 from
|
||||
\c start over the \c duration and remaining at 1 thereafter.
|
||||
|
||||
See also
|
||||
Foam::Function1Types::ramp
|
||||
|
||||
SourceFiles
|
||||
linear.C
|
||||
linearRamp.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef linear_H
|
||||
#define linear_H
|
||||
#ifndef linearRamp_H
|
||||
#define linearRamp_H
|
||||
|
||||
#include "ramp.H"
|
||||
|
||||
@ -49,29 +49,29 @@ namespace Function1Types
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class linear Declaration
|
||||
Class linearRamp Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class linear
|
||||
class linearRamp
|
||||
:
|
||||
public ramp
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const linear&);
|
||||
void operator=(const linearRamp&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Runtime type information
|
||||
TypeName("linear");
|
||||
TypeName("linearRamp");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from entry name and dictionary
|
||||
linear
|
||||
linearRamp
|
||||
(
|
||||
const word& entryName,
|
||||
const dictionary& dict
|
||||
@ -79,7 +79,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~linear();
|
||||
virtual ~linearRamp();
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -23,7 +23,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "quadratic.H"
|
||||
#include "quadraticRamp.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
@ -31,14 +31,14 @@ namespace Foam
|
||||
{
|
||||
namespace Function1Types
|
||||
{
|
||||
makeScalarFunction1(quadratic);
|
||||
makeScalarFunction1(quadraticRamp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::Function1Types::quadratic::quadratic
|
||||
Foam::Function1Types::quadraticRamp::quadraticRamp
|
||||
(
|
||||
const word& entryName,
|
||||
const dictionary& dict
|
||||
@ -50,13 +50,13 @@ Foam::Function1Types::quadratic::quadratic
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::Function1Types::quadratic::~quadratic()
|
||||
Foam::Function1Types::quadraticRamp::~quadraticRamp()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::scalar Foam::Function1Types::quadratic::value(const scalar t) const
|
||||
Foam::scalar Foam::Function1Types::quadraticRamp::value(const scalar t) const
|
||||
{
|
||||
return sqr(linearRamp(t));
|
||||
}
|
||||
@ -22,22 +22,22 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::Function1Types::quadratic
|
||||
Foam::Function1Types::quadraticRamp
|
||||
|
||||
Description
|
||||
Quadratic ramp function starting from 0 and increasing quadratically to 1
|
||||
from \c t_0 over the \c duration and remaining at 1 thereafter.
|
||||
Quadratic ramp function starting from 0 and increasing quadraticRampally
|
||||
to 1 from \c t_0 over the \c duration and remaining at 1 thereafter.
|
||||
|
||||
See also
|
||||
Foam::Function1Types::ramp
|
||||
|
||||
SourceFiles
|
||||
quadratic.C
|
||||
quadraticRamp.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef quadratic_H
|
||||
#define quadratic_H
|
||||
#ifndef quadraticRamp_H
|
||||
#define quadraticRamp_H
|
||||
|
||||
#include "ramp.H"
|
||||
|
||||
@ -49,29 +49,29 @@ namespace Function1Types
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class quadratic Declaration
|
||||
Class quadraticRamp Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class quadratic
|
||||
class quadraticRamp
|
||||
:
|
||||
public ramp
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const quadratic&);
|
||||
void operator=(const quadraticRamp&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Runtime type information
|
||||
TypeName("quadratic");
|
||||
TypeName("quadraticRamp");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from entry name and dictionary
|
||||
quadratic
|
||||
quadraticRamp
|
||||
(
|
||||
const word& entryName,
|
||||
const dictionary& dict
|
||||
@ -79,7 +79,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~quadratic();
|
||||
virtual ~quadraticRamp();
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -23,7 +23,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "quarterCosine.H"
|
||||
#include "quarterCosineRamp.H"
|
||||
#include "mathematicalConstants.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -32,14 +32,14 @@ namespace Foam
|
||||
{
|
||||
namespace Function1Types
|
||||
{
|
||||
makeScalarFunction1(quarterCosine);
|
||||
makeScalarFunction1(quarterCosineRamp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::Function1Types::quarterCosine::quarterCosine
|
||||
Foam::Function1Types::quarterCosineRamp::quarterCosineRamp
|
||||
(
|
||||
const word& entryName,
|
||||
const dictionary& dict
|
||||
@ -51,13 +51,16 @@ Foam::Function1Types::quarterCosine::quarterCosine
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::Function1Types::quarterCosine::~quarterCosine()
|
||||
Foam::Function1Types::quarterCosineRamp::~quarterCosineRamp()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::scalar Foam::Function1Types::quarterCosine::value(const scalar t) const
|
||||
Foam::scalar Foam::Function1Types::quarterCosineRamp::value
|
||||
(
|
||||
const scalar t
|
||||
) const
|
||||
{
|
||||
return 1 - cos(0.5*constant::mathematical::pi*linearRamp(t));
|
||||
}
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::Function1Types::quarterCosine
|
||||
Foam::Function1Types::quarterCosineRamp
|
||||
|
||||
Description
|
||||
Quarter-cosine ramp function starting from 0 and increasing to 1 from \c
|
||||
@ -32,12 +32,12 @@ See also
|
||||
Foam::Function1Types::ramp
|
||||
|
||||
SourceFiles
|
||||
quarterCosine.C
|
||||
quarterCosineRamp.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef quarterCosine_H
|
||||
#define quarterCosine_H
|
||||
#ifndef quarterCosineRamp_H
|
||||
#define quarterCosineRamp_H
|
||||
|
||||
#include "ramp.H"
|
||||
|
||||
@ -49,29 +49,29 @@ namespace Function1Types
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class quarterCosine Declaration
|
||||
Class quarterCosineRamp Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class quarterCosine
|
||||
class quarterCosineRamp
|
||||
:
|
||||
public ramp
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const quarterCosine&);
|
||||
void operator=(const quarterCosineRamp&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Runtime type information
|
||||
TypeName("quarterCosine");
|
||||
TypeName("quarterCosineRamp");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from entry name and dictionary
|
||||
quarterCosine
|
||||
quarterCosineRamp
|
||||
(
|
||||
const word& entryName,
|
||||
const dictionary& dict
|
||||
@ -79,7 +79,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~quarterCosine();
|
||||
virtual ~quarterCosineRamp();
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -23,7 +23,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "quarterSine.H"
|
||||
#include "quarterSineRamp.H"
|
||||
#include "mathematicalConstants.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -32,14 +32,14 @@ namespace Foam
|
||||
{
|
||||
namespace Function1Types
|
||||
{
|
||||
makeScalarFunction1(quarterSine);
|
||||
makeScalarFunction1(quarterSineRamp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::Function1Types::quarterSine::quarterSine
|
||||
Foam::Function1Types::quarterSineRamp::quarterSineRamp
|
||||
(
|
||||
const word& entryName,
|
||||
const dictionary& dict
|
||||
@ -51,13 +51,13 @@ Foam::Function1Types::quarterSine::quarterSine
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::Function1Types::quarterSine::~quarterSine()
|
||||
Foam::Function1Types::quarterSineRamp::~quarterSineRamp()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::scalar Foam::Function1Types::quarterSine::value(const scalar t) const
|
||||
Foam::scalar Foam::Function1Types::quarterSineRamp::value(const scalar t) const
|
||||
{
|
||||
return sin(0.5*constant::mathematical::pi*linearRamp(t));
|
||||
}
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::Function1Types::quarterSine
|
||||
Foam::Function1Types::quarterSineRamp
|
||||
|
||||
Description
|
||||
Quarter-sine ramp function starting from 0 and increasing to 1 from \c start
|
||||
@ -32,12 +32,12 @@ See also
|
||||
Foam::Function1Types::ramp
|
||||
|
||||
SourceFiles
|
||||
quarterSine.C
|
||||
quarterSineRamp.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef quarterSine_H
|
||||
#define quarterSine_H
|
||||
#ifndef quarterSineRamp_H
|
||||
#define quarterSineRamp_H
|
||||
|
||||
#include "ramp.H"
|
||||
|
||||
@ -49,29 +49,29 @@ namespace Function1Types
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class quarterSine Declaration
|
||||
Class quarterSineRamp Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class quarterSine
|
||||
class quarterSineRamp
|
||||
:
|
||||
public ramp
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const quarterSine&);
|
||||
void operator=(const quarterSineRamp&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Runtime type information
|
||||
TypeName("quarterSine");
|
||||
TypeName("quarterSineRamp");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from entry name and dictionary
|
||||
quarterSine
|
||||
quarterSineRamp
|
||||
(
|
||||
const word& entryName,
|
||||
const dictionary& dict
|
||||
@ -79,7 +79,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~quarterSine();
|
||||
virtual ~quarterSineRamp();
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -41,19 +41,28 @@ boundaryField
|
||||
normalVelocity
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue sine;
|
||||
uniformValueCoeffs
|
||||
|
||||
uniformValue
|
||||
{
|
||||
type scale;
|
||||
|
||||
value
|
||||
{
|
||||
type sine;
|
||||
|
||||
frequency 1;
|
||||
amplitude table
|
||||
(
|
||||
( 0 0)
|
||||
( 10 0.025)
|
||||
(1000 0.025)
|
||||
);
|
||||
amplitude 0.025;
|
||||
scale (0 1 0);
|
||||
level (0 0 0);
|
||||
}
|
||||
|
||||
scale
|
||||
{
|
||||
type linearRamp;
|
||||
|
||||
duration 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
value uniform (0 0 0);
|
||||
|
||||
Reference in New Issue
Block a user