mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
TUT: use expression and/or step function in a few places
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1912 |
|
||||
| \\ / O peration | Version: v2006 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -21,16 +21,16 @@ internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
// Heater on at 60s
|
||||
inlet
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue table
|
||||
(
|
||||
(0 273)
|
||||
(60 273)
|
||||
(61 308)
|
||||
(100 308)
|
||||
);
|
||||
uniformValue
|
||||
{
|
||||
type expression;
|
||||
// arg() and time() are identical here
|
||||
expression #{ (arg() < 60) ? 273 : 308 #};
|
||||
}
|
||||
}
|
||||
outlet
|
||||
{
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1912 |
|
||||
| \\ / O peration | Version: v2006 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -21,16 +21,17 @@ internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
// Heater on at 60s
|
||||
inlet
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue table
|
||||
(
|
||||
(0 (0 0 0))
|
||||
(60 (0 0 0))
|
||||
(61 (-2 0 0))
|
||||
(100 (-2 0 0))
|
||||
);
|
||||
type uniformNormalFixedValue;
|
||||
uniformValue constant -2;
|
||||
ramp
|
||||
{
|
||||
type step;
|
||||
start 60;
|
||||
duration 1000;
|
||||
}
|
||||
}
|
||||
outlet
|
||||
{
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1912 |
|
||||
| \\ / O peration | Version: v2006 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -23,13 +23,13 @@ boundaryField
|
||||
inlet
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue table
|
||||
(
|
||||
(0 1)
|
||||
(1 1)
|
||||
(1.01 0)
|
||||
(14 0)
|
||||
);
|
||||
uniformValue
|
||||
{
|
||||
type expression;
|
||||
|
||||
// arg() and time() are identical here
|
||||
expression #{ time() <= 1 ? 1 : 0 #};
|
||||
}
|
||||
}
|
||||
|
||||
outlet
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v1912 |
|
||||
| \\ / O peration | Version: v2006 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -25,7 +25,7 @@ boundaryField
|
||||
type rotatingWallVelocity;
|
||||
axis (0 1 0);
|
||||
origin (0 0 0);
|
||||
omega constant 13.2; // 2.1 rev/s
|
||||
omega constant #eval{ 2.1 * (2*pi()) }; // rev/s -> rads/s
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user