Function1: Added squarePulse
This function gives a value of one during a user-specified duration, and
zero at all other times. It is useful for defining the time range in
which an injection or ignition heat source or similar operates.
Example usage, scaling a value:
<name>
{
type scale;
scale squarePulse;
start 0;
duration 1;
value 100;
}
This function has been utilised in a number of tutorial fvOption
configurations to provide a specific window in which the fvOption is
applied. This was previously achieved by "timeStart" and "duration"
controls hard coded into the fvOptions themselves.
This commit is contained in:
@ -21,9 +21,8 @@ options
|
||||
{
|
||||
type semiImplicitSource;
|
||||
|
||||
timeStart 0;
|
||||
duration 1e6;
|
||||
selectionMode all;
|
||||
|
||||
volumeMode specific;
|
||||
|
||||
sources
|
||||
|
||||
@ -15,6 +15,32 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ignition
|
||||
{
|
||||
type semiImplicitSource;
|
||||
|
||||
selectionMode cellSet;
|
||||
cellSet ignition;
|
||||
|
||||
volumeMode specific;
|
||||
|
||||
sources
|
||||
{
|
||||
h
|
||||
{
|
||||
explicit
|
||||
{
|
||||
type scale;
|
||||
scale squarePulse;
|
||||
start 0;
|
||||
duration 1;
|
||||
value 5e7; // kg/m/s^3
|
||||
}
|
||||
implicit 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
radiation
|
||||
{
|
||||
type radiation;
|
||||
|
||||
@ -19,8 +19,6 @@ momentumSource
|
||||
{
|
||||
type semiImplicitSource;
|
||||
|
||||
timeStart 0.0;
|
||||
duration 1000;
|
||||
selectionMode all;
|
||||
|
||||
volumeMode specific;
|
||||
|
||||
@ -48,8 +48,6 @@ massSource
|
||||
{
|
||||
type semiImplicitSource;
|
||||
|
||||
timeStart 0.2;
|
||||
duration 2.0;
|
||||
selectionMode points;
|
||||
points
|
||||
(
|
||||
@ -58,29 +56,53 @@ massSource
|
||||
|
||||
volumeMode absolute;
|
||||
|
||||
squarePulse
|
||||
{
|
||||
type scale;
|
||||
scale squarePulse;
|
||||
start 0.2;
|
||||
duration 2;
|
||||
}
|
||||
|
||||
sources
|
||||
{
|
||||
rho
|
||||
{
|
||||
explicit 1e-4; // kg/s
|
||||
explicit
|
||||
{
|
||||
$squarePulse;
|
||||
value 1e-4; // kg/s
|
||||
}
|
||||
implicit 0;
|
||||
}
|
||||
|
||||
U
|
||||
{
|
||||
explicit (0 0.005 0);
|
||||
explicit
|
||||
{
|
||||
$squarePulse;
|
||||
value (0 0.005 0);
|
||||
}
|
||||
implicit 0;
|
||||
}
|
||||
|
||||
h
|
||||
{
|
||||
explicit 10;
|
||||
explicit
|
||||
{
|
||||
$squarePulse;
|
||||
value 10;
|
||||
}
|
||||
implicit 0;
|
||||
}
|
||||
|
||||
H2O
|
||||
{
|
||||
explicit 1e-4; // kg/s
|
||||
explicit
|
||||
{
|
||||
$squarePulse;
|
||||
value 1e-4; // kg/s
|
||||
}
|
||||
implicit 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,10 +21,12 @@ source1
|
||||
|
||||
timeStart 0.1;
|
||||
duration 0.4;
|
||||
|
||||
selectionMode cellSet;
|
||||
cellSet ignitionCells;
|
||||
|
||||
mode uniform;
|
||||
|
||||
temperature 2000;
|
||||
}
|
||||
|
||||
|
||||
@ -32,9 +32,6 @@ option1
|
||||
|
||||
value (2 0 0);
|
||||
lambda 0.5;
|
||||
|
||||
timeStart 0;
|
||||
duration 1e6;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -31,9 +31,6 @@ option1
|
||||
}
|
||||
|
||||
lambda 0.5;
|
||||
|
||||
timeStart 0;
|
||||
duration 1e6;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -21,9 +21,6 @@ options
|
||||
{
|
||||
type massSource;
|
||||
|
||||
timeStart 0.1;
|
||||
duration 5;
|
||||
|
||||
selectionMode points;
|
||||
points
|
||||
(
|
||||
|
||||
@ -21,9 +21,6 @@ options
|
||||
{
|
||||
type massSource;
|
||||
|
||||
timeStart 1;
|
||||
duration 500;
|
||||
|
||||
selectionMode points;
|
||||
points
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user