Commit 1a9f067d authored by Mark Olesen's avatar Mark Olesen
Browse files

TUT: use expression and/or step function in a few places

parent 5105154b
/*--------------------------------*- 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
{
......
/*--------------------------------*- 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
{
......
/*--------------------------------*- 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
......
/*--------------------------------*- 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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment