mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: support frequency or period for Sine/Square Function1 (#1917)
- For slow oscillations it can be more intuitive to specify the period. ENH: separate mark/space for Square - makes it easier to tailor the desired intervals. BUG: incorrect square wave fraction with negative phase shifts ENH: additional cosine Function1 STYLE: avoid code duplication by inheriting Cosine/Square from Sine.
This commit is contained in:
@ -23,11 +23,10 @@ boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type uniformFixedValue; // oscillatingFixedValue;
|
||||
type uniformFixedValue;
|
||||
uniformValue sine;
|
||||
uniformValueCoeffs
|
||||
{
|
||||
amplitude constant 1;
|
||||
frequency constant 3000;
|
||||
scale constant 50;
|
||||
level constant 101325;
|
||||
|
||||
@ -63,12 +63,10 @@ functions
|
||||
libs (fieldFunctionObjects);
|
||||
writeControl writeTime;
|
||||
mode vortex2D;
|
||||
scale sine;
|
||||
scale cosine;
|
||||
scaleCoeffs
|
||||
{
|
||||
amplitude 1;
|
||||
frequency 0.0625; // = 1/16
|
||||
t0 -4; // want cos -> time shift = -(pi/2)/(2 pi f)
|
||||
period 16
|
||||
scale 1;
|
||||
level 0;
|
||||
}
|
||||
|
||||
@ -64,14 +64,12 @@ functions
|
||||
libs (fieldFunctionObjects);
|
||||
writeControl writeTime;
|
||||
mode vortex3D;
|
||||
scale sine;
|
||||
scale cosine;
|
||||
scaleCoeffs
|
||||
{
|
||||
amplitude 1;
|
||||
frequency 0.16666;// = 1/6
|
||||
t0 -1.5; // want cos -> time shift = -(pi/2)/(2 pi f)
|
||||
scale 1;
|
||||
level 0;
|
||||
period 6;
|
||||
scale 1;
|
||||
level 0;
|
||||
}
|
||||
origin (0 0 0);
|
||||
refDir (1 0 0);
|
||||
|
||||
Reference in New Issue
Block a user